Test case generation method for protecting logic visualization teaching and training system
By performing multi-level analysis of relay protection devices and establishing equipment models, and using a visual editing module to generate test cases, the problems of complex operation and limited test case generation in existing systems have been solved. This has enabled intelligent management and the generation of diverse test cases, thereby improving training quality and the safety and stability of system operation.
Patent Information
- Application Number
- CN202511635549.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-04-10
AI Technical Summary
Existing relay protection training systems lack simulation of actual power system operation scenarios, are complex to operate, require trainees to have a high level of understanding to operate, and have limited test case generation capabilities, making it difficult to meet the teaching needs of diverse protection strategies.
By performing multi-level analysis of the relay protection device under test, establishing a device model, and using a visual test case editing module to generate test cases, including intuitive selection of protection function criteria, action area and result criteria, interactive operation is achieved, and diverse protection test cases are generated.
It enables intelligent generation and visual management of test cases, lowers the learning and training threshold, improves trainees' operational efficiency and practical ability, enhances the professional skills and emergency response capabilities of power system operation and maintenance personnel, and strengthens the security and stability of the system.
Smart Images

Figure CN121836973A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric power operation and maintenance teaching and training, and particularly relates to a test case generation method for a protection logic visualized teaching and training system. BACKGROUND
[0002] With the continuous increase of new energy generation proportion, the access of renewable energy such as wind power and photovoltaic in the power system puts forward higher requirements for system stability and power quality, making the operation environment of the power system more complex and changeable. Under this background, as the core link to ensure the safe and stable operation of the power system, the design, debugging and operation and maintenance of the relay protection put forward higher requirements on the technical level of professionals.
[0003] However, the existing relay protection teaching and training system has obvious deficiencies in actual application. On the one hand, the traditional training mode still mainly relies on classroom theoretical teaching, lacks simulation of actual operation scenes of the power system, and students lack sufficient opportunities for practical operation, resulting in difficulty in effectively combining theoretical knowledge with actual work scenes; on the other hand, the existing teaching and training system is complex to operate, the system interface and operation logic are not intuitive enough, and students need to have a high understanding ability of relay protection principles to operate normally, which makes the learning curve steep and the training efficiency low. In addition, the existing system has limited functions in test case generation, simulated fault application and protection action criterion analysis, and it is difficult to meet the teaching needs of diversified protection strategies. SUMMARY
[0004] (I) Invention purpose The purpose of the present application is to provide a test case generation method for a protection logic visualized teaching and training system, which can be intuitively operated, has strong interactivity, and generates various protection test cases, so as to improve the professional technical level of power system operation and maintenance personnel and ensure the safe and stable operation of the system.
[0005] (II) Technical solution To solve the above problems, the present application provides a test case generation method for a protection logic visualized teaching and training system, comprising: performing first analysis on the to-be-tested relay protection device to obtain first analysis information, wherein the first analysis information includes SCD basic information of the to-be-tested relay protection device; establishing a device model of the to-be-tested relay protection device based on the first analysis information; performing second analysis on the to-be-tested relay protection device based on the device model to obtain second analysis information, wherein the second analysis information includes SCD configuration information of the to-be-tested relay protection device; based on the second analysis information, using a visualized case editing module to obtain constituent objects of the test case, and generating the test case.
[0006] In another aspect of the present application, preferably, the SCD basic information of the to-be-tested relay protection device comprises: a logical device, a logical node, a data object, and a data attribute. The SCD configuration information of the to-be-tested relay protection device comprises: a platen information, a protection setting value information, a protection control word information, a protection event information, and a device parameter information.
[0007] In another aspect of the present application, preferably, based on the second analysis information, a test case composition object is obtained by using a visualization use case editing module, and a test case is generated, comprising: determining a protection function criterion of the to-be-tested relay protection device, and constructing an action condition of each protection type of the test case based on the protection function criterion; determining a protection action region corresponding to a fault point of the to-be-tested protection device, and obtaining an analog value applied to the to-be-tested protection device based on a feature of the fault point and an action curve corresponding to the protection type; determining a result criterion of the test case, and associating the result criterion with the action condition and the analog value to obtain the test case composition object.
[0008] In another aspect of the present application, preferably, the protection function criterion comprises at least one of a protection platen, a protection control word, and a protection setting value.
[0009] In another aspect of the present application, preferably, the protection action region corresponding to the fault point of the to-be-tested protection device is determined, and the analog value applied to the to-be-tested protection device is obtained based on a feature of the fault point and an action curve corresponding to the protection type, comprising: based on the protection type, determining a corresponding action curve, and extracting the feature of the fault point; based on the feature of the fault point, inversely solving an equation of the action curve to obtain an electrical value corresponding to the fault point; based on the electrical value and the determined protection function criterion, calculating an analog value of the protection action applied to the to-be-tested protection device; calculating an absolute error and a relative error of the analog value and the determined protection function criterion, and generating the analog value, the absolute error, and the relative error as an analog quantity state sequence file.
[0010] In another aspect of the present application, preferably, the protection type comprises longitudinal differential protection, and an equation of an action curve corresponding to the longitudinal differential protection is represented by using the following formula: wherein, is a differential current, is a differential protection starting current setting value, is a braking current, is a reference current for differential protection.
[0011] In another aspect of the present application, preferably, the differential current and the braking current are calculated using the following formula: wherein, is a differential current, is a braking current, is a current at the secondary side of a current transformer at a high voltage side and a low voltage side of a transformer, respectively.
[0012] In another aspect of the present application, preferably, the result criterion includes a protection event and an in-out selection.
[0013] In another aspect of the present application, preferably, it further comprises: executing the test case based on a composition object of the test case and a preset test framework; The preset test framework includes a plurality of test modules, each test module is provided with a corresponding test script, and each test module is configured with a corresponding test parameter; The test script of each test module is executed in sequence according to the composition object of the test case, and an execution result is obtained; A test report is generated based on the execution result.
[0014] In another aspect of the present application, preferably, the preset test framework further includes a test management module; the test management module is used for managing test cases, test scripts and test data, and controlling the execution order and execution mode of each test module.
[0015] (Three) beneficial effects The above technical solution of the present application has the following beneficial technical effects: The present application realizes intelligent generation and visual management of test cases by multi-level analysis of the relay protection device to be tested and establishment of a device model. Protection function criteria, action areas and result criteria can be intuitively selected in a graphical interface, interactive operation is realized, the learning and training threshold is reduced, the operation efficiency and practical ability of students are improved, diversified protection test cases can be automatically generated, including action conditions, analog values and result criteria, covering different protection types and action curves, meeting the training needs of complex power systems, helping to improve the professional skills and emergency disposal ability of power system operation and maintenance personnel, and significantly improving the quality of relay protection training and the safety and stability of system operation. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is a whole flowchart of an embodiment of the present application; Figure 2 is an action curve diagram of the longitudinal differential protection of an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail below with reference to the embodiments and accompanying drawings. It should be understood that the description is only exemplary but not intended to limit the scope of the present application. Moreover, in the following description, the description of the well-known structures and techniques will be omitted so as not to unnecessarily obscure the concept of the present application.
[0018] Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0019] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as there is no conflict.
[0020] Embodiment one A test case generation method for protecting a logic visualization teaching and training system, the implementation environment includes a computer (hereinafter referred to as a teaching and training host) installed with a teaching and training system, and at least one relay protection device to be tested, the teaching and training host is connected with the relay protection device to be tested through Ethernet, the network environment is stable, and the normal operation of the communication protocol is ensured. Figure 1 The overall flowchart of one embodiment of the present application is shown as Figure 1 As shown, it includes: On the teaching and training host, the master station communication module is started, and the communication protocol is configured as IEC61850. The specific configuration parameters include data format, MMS service, etc., to ensure that the communication protocol is consistent with the relay protection device to be tested; the master station communication module and the relay protection device to be tested establish a connection through the configured communication protocol. In the communication state interface of the teaching and training host, the connection state is displayed as “connected”, and the basic information such as the IP address and the device model of the relay protection device to be tested is displayed.
[0021] The first analysis is performed on the relay protection device to be tested, and first analysis information is obtained, the first analysis information includes SCD basic information of the relay protection device to be tested; in this embodiment, the SCD basic information of the relay protection device to be tested includes: logical device, logical node, data object and data attribute, and these information is stored in the device model database. Based on the first analysis information, the device model of the relay protection device to be tested is established; Based on the device model, a second analysis is performed on the relay protection device under test to obtain second analysis information, including the SCD configuration information of the relay protection device under test. The analyzed device model is loaded into the system, and the second analysis information of the device model is displayed on the device model management interface. Specifically, the SCD configuration information of the relay protection device under test includes: pressure plate information, protection setting information, protection control word information, protection event information, and device parameter information. The test environment is initialized, including setting communication parameters and initializing test scripts, to ensure that the configuration file of the relay protection device under test has been correctly loaded into the system, and a "initialization successful" message is displayed on the test environment initialization interface.
[0022] Based on the second parsed information, the second parsed information is displayed in tabular form, with each row representing an information item, including columns such as information name, current value, and default value. The visual test case editing module is used to obtain the component objects of the test cases; in this embodiment, the step of obtaining the component objects of the test cases and generating test cases based on the second parsed information using the visual test case editing module includes: The protection function criteria of the relay protection device under test are determined. Based on these criteria, the operating conditions for each protection type of the test cases are constructed. The protection function criteria are derived from the protection function unit information extracted from the SCD file or configuration description of the relay protection device, and parsed using a standardized protection logic template to obtain basic parameters such as the start-up conditions, operating conditions, reset conditions, and delay characteristics corresponding to each protection function. Through the structured definition of the above criteria, it is ensured that the test cases accurately map the functional characteristics of the device during generation. The protection function criteria include at least one of protection pressure plates, protection control words, and protection settings. Based on these criteria, the operating conditions for each protection type of the test cases are constructed. The operating conditions define the action response that the protection device should take under specific input signals or system states. For example, for overcurrent protection, the operating current value and duration combination under different operating conditions can be generated according to the set operating current threshold and delay parameters; for distance protection, the operating boundary conditions for different regions can be defined based on the impedance characteristic curve. This step, through parameterized operating condition modeling, enables the test cases to have scalability and automatic adjustment capabilities. To manually select a protection function criterion, drag it to the "Action Condition" area of the protection logic module. For example, select "Protection Plate 1" and "Protection Setting 2" and drag them to the "Action Condition" area to form the action condition part of the protection test case.
[0023] The system determines the protection action area, which corresponds to the fault point of the protection device under test (DUT). Based on the characteristics of the fault point and the corresponding action curve of the protection type, analog values applied to the DUT are obtained. The protection action area corresponds to the protection range or protection section of the DUT, which is determined by the primary system topology and device configuration information. The system identifies the distribution of fault points covered by each protection function by analyzing the primary electrical wiring structure and component node relationships. Combining the electrical characteristics of the fault point (such as fault type, fault impedance, fault location, etc.) and the corresponding protection type's action curve, the system calculates and generates analog values (including voltage, current, phase angle, etc.) applied to the DUT. These analog values serve as test input signals and can be used in the test platform to drive the protection logic response, thereby verifying the protection characteristics.
[0024] The result criteria for test cases are determined, and these criteria are associated with action conditions and analog values to obtain the component objects of the test cases. Selected result criteria are manually dragged to the "Action Criteria" area of the protection logic module. For example, selecting "Protection Event 1" and "Input / Output Selection 2" and dragging them to the "Action Criteria" area constitutes the action criteria part of the protection test case. The result criteria define the expected output and evaluation standards of the test cases, used to judge the correctness of the protection device's actions. The result criteria include protection events and input / output selections. The final test case component objects include a set of action conditions, a set of analog inputs, and a set of result criteria. These three constitute a complete test logic unit, which can be graphically displayed, parameterized, and automatically executed in the visual test case editing module. This not only ensures the scientific nature and consistency of test case generation but also supports adaptive expansion for different protection device models and functions, significantly improving testing efficiency and the system's intelligence level.
[0025] Furthermore, in this embodiment, determining the protection action area, where the protection action area corresponds to the fault point of the protection device under test, and obtaining the analog quantity value applied to the protection device under test based on the characteristics of the fault point and the action curve corresponding to the protection type, includes: Based on the protection type, the corresponding action curve is determined, and the characteristics of the fault point are extracted. Different protection types have different action patterns. For example, the action curve of overcurrent protection is usually an inverse relationship curve between current and time; the action curve of distance protection is a polygonal or circular feature boundary in the impedance plane; and the action curve of differential protection is a function of differential current and braking current. According to the protection type identified in the second analysis information, a preset action curve model library is called, and the corresponding mathematical description equation is extracted.
[0026] Based on the characteristics of the fault point, the equation of the action curve is solved in reverse to obtain the electrical value corresponding to the fault point; for example... Figure 2 The diagram shows the operation curve of longitudinal differential protection according to an embodiment of the present invention, as follows: Figure 2 As shown, the protection type includes longitudinal differential protection, and the equation for the operating curve corresponding to the longitudinal differential protection is expressed by the following formula: in, For differential current, The starting current setting for differential protection, For braking current, This is the reference current for differential protection.
[0027] The differential current and braking current are calculated using the following formula: in, For differential current, For braking current, These are the currents on the secondary sides of the current transformers on the high and low voltage sides of the transformer, respectively. Based on the fault point, for example, selecting a point in the second segment of the curve, the calculation is performed according to the formula for the second segment's operating curve. By solving in reverse, the current value corresponding to the fault point is obtained. The three-phase electrical quantities are then reconstructed using the symmetrical component method. For example, based on the current and time values at the fault point, the magnitude and phase of the three-phase currents are calculated.
[0028] Based on the electrical values and the determined protection function criteria, the analog value applied to the protection device under test by the protection action is calculated; for example, a preset protection setting value 3 is used in the calculation, and by solving the set of equations, the analog value that the protection action needs to apply, i.e. the fault value, is obtained.
[0029] The absolute and relative errors of the analog value and the determined protection function criterion are calculated, and the analog value, absolute error, and relative error are generated into an analog state sequence file. After obtaining the analog value, the absolute and relative errors between it and the actual value are calculated. For example, if the calculated analog value is 10A and the actual value is 10.5A, then the absolute error is 0.5A, and the relative error is 0.5 / 10.5≈0.0476. Based on the calculation results, the tester's analog state sequence file is generated. The calculation results and error information are formatted into a file of a specified format, such as an XML file, for the tester to read and execute.
[0030] Based on the constituent objects of the test cases and a preset test framework, the test cases are executed. The preset test framework includes multiple test modules, each with a corresponding test script; the preset test framework is started on the training host. The preset test framework divides the entire application in the test into multiple logical and independent modules, such as a communication module, a data acquisition module, a fault simulation module, and a result judgment module. Each module has a corresponding test script, and all test scripts are combined to form a larger test script, representing the collaborative work of multiple modules. In the test framework configuration interface, the parameters of each module are configured, such as the IP address and port number of the communication module, and the sampling frequency of the data acquisition module. In this embodiment, executing the test cases based on the constituent objects of the test cases and the preset test framework includes: configuring corresponding test parameters for each test module; The test scripts of each test module are executed sequentially according to the constituent objects of the test cases to obtain the execution results; a test report is generated based on the execution results. For example, the communication module first establishes a communication connection with the relay protection device under test, the data acquisition module collects real-time data from the relay protection device under test, the fault simulation module applies a fault signal to the relay protection device under test according to the simulated values in the test cases, and the result judgment module judges whether the response of the relay protection device under test is correct according to the result criteria in the test cases.
[0031] Furthermore, in this embodiment, the preset testing framework also includes a test management module; the test management module is used to manage test cases, test scripts, and test data, and to control the execution order and execution method of each test module. The test management module is responsible for managing test cases, test scripts, and test data. The test management module can also control the execution order and execution method of tests. Each module has its own test scripts and test data. These test scripts and test data are designed according to the module's function and business logic. During test execution, the test management module calls the test scripts and test data of each module and feeds back the test results to the testers.
[0032] This invention achieves intelligent generation and visual management of test cases by performing multi-level analysis and establishing equipment models for the relay protection device under test. The graphical interface allows for intuitive selection of protection function criteria, action areas, and result criteria, enabling interactive operation, lowering the learning and training threshold, and improving trainees' operational efficiency and practical skills. It can automatically generate diverse protection test cases, including action conditions, simulated values, and result criteria, covering different protection types and action curves, meeting the training needs of complex power systems. This helps improve the professional skills and emergency response capabilities of power system operation and maintenance personnel, significantly enhancing the quality of relay protection training and the safety and stability of system operation.
[0033] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
[0034] The present invention has been described above with reference to embodiments thereof. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. The scope of the invention is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.
[0035] Although embodiments of the present invention have been described in detail, it should be understood that various changes, substitutions, and modifications can be made to the embodiments of the present invention without departing from the spirit and scope of the invention.
[0036] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for generating test cases for protecting a logic visualization training system, characterized in that, include: The relay protection device under test is analyzed first to obtain first analysis information, which includes the SCD basic information of the relay protection device under test. Based on the first parsed information, a device model of the relay protection device under test is established. Based on the device model, a second analysis is performed on the relay protection device under test to obtain second analysis information, which includes the SCD configuration information of the relay protection device under test. Based on the second parsed information, the component objects of the test cases are obtained using the visual test case editing module, and test cases are generated.
2. The test case generation method for protecting a logic visualization training system according to claim 1, characterized in that, The basic SCD information of the relay protection device under test includes: logic device, logic node, data object and data attributes; The SCD configuration information of the relay protection device under test includes: pressure plate information, protection setting information, protection control word information, protection event information, and equipment parameter information.
3. The test case generation method for protecting a logic visualization training system according to claim 1, characterized in that, Based on the second parsed information, the step of using the visual test case editing module to obtain the component objects of the test cases and generate test cases includes: Determine the protection function criteria of the relay protection device under test, and based on the protection function criteria, construct the action conditions of each protection type of the test case; Determine the protection action area, which corresponds to the fault point of the protection device under test. Based on the characteristics of the fault point and the action curve corresponding to the protection type, obtain the analog value applied to the protection device under test. Determine the result criteria for the test cases, associate the result criteria with the action conditions and simulated values, and obtain the constituent objects of the test cases.
4. The test case generation method for protecting a logic visualization training system according to claim 3, characterized in that, The protection function criteria include at least one of the following: protection pressure plate, protection control word, and protection setting value.
5. The test case generation method for protecting a logic visualization training system according to claim 4, characterized in that, The process of determining the protection action area, which corresponds to the fault point of the protection device under test, and obtaining the analog quantity value applied to the protection device under test based on the characteristics of the fault point and the action curve corresponding to the protection type, includes: Based on the protection type, the corresponding action curve is determined, and the features of the fault point are extracted. Based on the characteristics of the fault point, the equation of the action curve is solved in reverse to obtain the electrical value corresponding to the fault point; Based on the electrical values and the determined protection function criteria, the analog values of the protection action applied to the protection device under test are calculated. Calculate the absolute error and relative error between the analog value and the determined protection function criterion, and generate the analog value, absolute error and relative error into an analog state sequence file.
6. The test case generation method for protecting a logic visualization training system according to claim 5, characterized in that, The protection type includes longitudinal differential protection, and the equation for the operating curve corresponding to the longitudinal differential protection is expressed by the following formula: in, For differential current, The starting current setting for differential protection, For braking current, This is the reference current for differential protection.
7. The test case generation method for protecting a logic visualization training system according to claim 6, characterized in that, The differential current and braking current are calculated using the following formula: in, For differential current, For braking current, These are the currents on the secondary sides of the current transformers on the high and low voltage sides of the transformer, respectively.
8. The test case generation method for protecting a logic visualization training system according to claim 7, characterized in that, The result criteria include protection events and input / output selection.
9. The test case generation method for protecting a logic visualization training system according to claim 8, characterized in that, It also includes: executing the test cases based on the constituent objects of the test cases and a preset test framework; The preset test framework includes multiple test modules, each with a corresponding test script and corresponding test parameters configured for each module. The test scripts of each test module are executed sequentially according to the constituent objects of the test cases to obtain the execution results; A test report is generated based on the execution results.
10. The test case generation method for protecting a logic visualization training system according to claim 9, characterized in that, The pre-defined testing framework also includes a test management module; the test management module is used to manage test cases, test scripts and test data, and control the execution order and execution method of each test module.