Power monitoring system simulation detection method and system based on customizable calculation formula
Through the simulation detection method of the power monitoring system based on customizable calculation formulas, the problem of inefficiency of traditional detection methods is solved, automated detection is realized, detection efficiency and applicability are improved, and simulation verification of various power monitoring systems is suitable.
Patent Information
- Application Number
- CN202411478129.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-10
AI Technical Summary
During the simulation and testing process of traditional power monitoring systems, there are many inspection projects, large workloads, and long inspection cycles. The traditional methods rely on manual operations and are inefficient, making it difficult to meet the rapid detection needs of intelligent substation monitoring systems.
Using the power monitoring system simulation detection method based on customizable calculation formulas, the test case script configuration module simulates the parallel operation of secondary devices on the acquisition end and the main station simulation host, and generates calculation formulas based on the communication protocol and variable definitions to realize automated detection. Simulate with data interactively to reduce manual intervention.
It greatly saves the cost and detection time of simulation testing environment construction, improves detection efficiency, can automatically perform test tasks and identify detection results, reduces detection complexity and labor costs, and is suitable for function and performance detection of a variety of power monitoring systems.
Smart Images

Figure CN119294117A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulation operation and automatic detection of electric power secondary systems, and in particular to a simulation detection method and system for an electric power monitoring system based on a customizable calculation formula. Background Art
[0002] In recent years, with the continuous development of intelligent technology, today's society is vigorously promoting the construction of smart grid systems. In smart grid systems, it is particularly important to build smart substations, and the integrated monitoring system that matches it is an important node in the construction of smart substations. With the continuous updating and improvement of relevant technical specifications for smart substations, secondary manufacturers will conduct regular function and performance tests on substation monitoring systems in order to ensure product quality, and power testing agencies will also regularly conduct network access testing of substation monitoring system products.
[0003] For a long time, due to the continuous development of substation integrated monitoring system, the application of intelligent and professional degree is constantly improving, the functions and performances that need to be tested are increasing day by day, and the routine test items are often as many as hundreds or even thousands of items. There are many items to be tested, the workload is large, the test cycle is long, and the contradiction between heavy test tasks and tight human resources is becoming increasingly prominent. The construction of the simulation environment and the simulation of input and output signals in the detection process of the power monitoring system are the key and difficulty of the entire test work. The traditional method is generally to set up multiple secondary equipment entities and dispatch the main station machine, and specially arrange the test personnel to manually set the changes of secondary measurements to simulate the upstream and downstream data interaction environment of the object under test. The configuration is cumbersome, the operation method is complex, error-prone and inefficient; and the required simulation data change methods for different test function items are also quite different, which puts high demands on the professionalism and concentration of the test personnel, so there is an urgent need for an overall solution that can improve the test work. Summary of the invention
[0004] The purpose of the present invention is to solve at least one technical problem in the background technology and to provide a simulation detection method and system for an electric power monitoring system based on a customizable calculation formula.
[0005] To achieve the above object, the present invention provides a power monitoring system simulation detection method based on a customizable calculation formula, comprising:
[0006] S1. Configure the test case script on the test case configuration host;
[0007] S2. The test case configuration host sends a test case script to be executed to the acquisition end simulation host and the master station simulation host respectively;
[0008] S3. The GPS timing device sends timing signals to the object under test, the collection end simulation host and the main station simulation host respectively before the test case starts to execute, to ensure the consistency of time processing of each host during the detection process;
[0009] S4. The collection end simulation host loads and parses the test case script, simulates the parallel operation of various types of collected secondary devices based on the mapping relationship between the communication configuration table and the variable definition of the collection communication protocol agreed by the power monitoring system, and gradually simulates and outputs the change information of the secondary measurement according to the time sequence in the test case script;
[0010] S5. The measured object obtains the secondary measurement change information output by the acquisition end simulation host, processes the data according to the detection requirements, and finally outputs the event information and measurement change information;
[0011] S6. The master station simulation host starts the master station communication simulation program, loads and parses the test case script being executed, and receives and monitors the measurement change information and event information of the measured object after data processing during the detection process;
[0012] S7. The master station communication simulation program is based on a test case script with a customizable calculation formula. It compares the measurement change information and event information of the object under test during the detection process one by one according to the time series and variable definition to see if they are consistent with the expectations. If they are inconsistent, it is determined that the detection fails, the current test case detection task is terminated and the detection result is output; if they are consistent, the next step is executed;
[0013] S8. The master station communication simulation program determines whether the last measurement change information has been executed. If not, it continues to monitor the output information of the object under test, and the acquisition end simulation host continues to execute subsequent simulation changes from step S4; if it is determined that it is the last item or exceeds the expected detection time, it can be considered that the current test case detection task has been completed, the detection result is output, and the task execution is terminated;
[0014] S9. Manually confirm the selection or the program automatically executes the next test case script, and repeats steps S2-S8 until the detection tasks of all test cases are completed.
[0015] According to one aspect of the present invention, configuring a test case script on a test case configuration host includes:
[0016] On the test case configuration host, based on the communication protocol between the object under test, the acquisition terminal and the master station, define variables for the secondary measurement object of the communication protocol;
[0017] Configure calculation formulas based on variable definitions of secondary measurement objects, computer operation symbols, and common function abbreviations;
[0018] According to the detection requirements, select the change trigger mode, set the time series elements of the secondary measurement changes, and complete the test case script configuration.
[0019] According to one aspect of the present invention, the variable definition operation is performed by two methods: manual configuration and automatic creation;
[0020] The variable definition operation of manual configuration is to parse the communication point table or configuration file of the communication protocol through the configuration tool, obtain the type and description information of the secondary measurement required for the simulation, and set the corresponding globally unique variable name for each of the secondary measurement objects required for the test case execution;
[0021] The automatically created variable definition operation is to configure the tool program according to the measurement description information of the communication protocol, and the program automatically creates the corresponding variable name according to the internal rules.
[0022] According to one aspect of the present invention, the calculation formula is an equation expression, the left side of the equal sign is a variable definition as an output quantity, and the right side of the equal sign is a mathematical expression composed of a plurality of variable definitions as input quantities, operators and common functions;
[0023] The calculation formula has one and only one output;
[0024] The number of input quantities of the calculation formula is ≥ 0. When the number of input quantities is equal to 0, the output result of the calculation formula is a constant.
[0025] According to one aspect of the present invention, the simulation program substitutes the real-time value of the measurement object defined by the input quantity on the right side of the calculation formula into the expression for calculation, and assigns the calculated output result to the change target value of the measurement object corresponding to the output quantity, and simulates the output of a secondary measurement change signal according to the time series and change pattern requirements.
[0026] According to one aspect of the present invention, the change mode includes a timing change mode, a periodic change mode and a change trigger mode;
[0027] The timing change mode is that when the test case is executed, the simulation program executes a calculation formula at a specific time point, and outputs a change signal for the secondary measurement object corresponding to the formula output; the time series configuration mode in this mode includes two types: wildcard time change and counting time change;
[0028] The periodic change mode is that after the test case starts to be executed, the simulation program periodically executes the calculation formula according to the preset time interval, and outputs the change signal of the secondary measurement object corresponding to the formula output; in the periodic change mode, an integer value greater than 0 will be saved in the corresponding time series configuration, which is in seconds by default, indicating the execution time period of the test case;
[0029] The change trigger mode is that after the test case starts to execute, the simulation program monitors the data of the secondary measurement objects corresponding to each input quantity in the calculation formula. When the collected value or simulation value of any measurement object changes, the calculation formula is executed immediately or with a delay according to the configuration value in the time series format, and the secondary measurement object corresponding to the formula output quantity outputs a change signal.
[0030] According to one aspect of the present invention, in the S7 step, the expected execution result information is gradually set in the test case script according to the detection requirements and in combination with the measurement sequence change signal corresponding to the acquisition end simulation host. The configuration method of the expected execution result is composed of a calculation formula, a change pattern and a time series, and the delay judgment time can be set; after receiving the measurement change information forwarded by the processing of the object under test, the main station communication simulation program compares it with the expected execution result information of the measurement sequence change currently being executed. If they are consistent within the delay range, it is considered that the current test step meets expectations, otherwise it is judged as failing the detection.
[0031] To achieve the above object, the present invention also provides a power monitoring system simulation detection system based on a customizable calculation formula, comprising:
[0032] A test case script configuration module configures the test case script on the test case configuration host;
[0033] The test case script distribution module, the test case configuration host sends a test case script to be executed to the acquisition end simulation host and the main station simulation host respectively;
[0034] Timing module: GPS timing equipment sends timing signals to the object under test, the acquisition end simulation host and the main station simulation host before the test case starts to execute, to ensure the consistency of time processing of each host during the detection process;
[0035] Secondary measurement change information output module: The collection end simulation host loads and parses the test case script, based on the mapping relationship between the communication configuration table and the variable definition of the collection communication protocol agreed by the power monitoring system, simulates the parallel operation of various types of collected secondary devices, and gradually simulates and outputs the secondary measurement change information according to the time sequence in the test case script;
[0036] Information output module: the object under test obtains the secondary measurement change information output by the acquisition end simulation host, processes the data according to the detection requirements, and finally outputs the event information and measurement change information;
[0037] In the detection module, the master station simulation host starts the master station communication simulation program, loads and parses the test case script being executed, and receives and monitors the measurement change information and event information of the object under test after data processing during the detection process;
[0038] In the detection judgment module, the master station communication simulation program is based on the test case script with customizable calculation formulas. It compares the measurement change information and event information of the object under test during the detection process one by one according to the time series and variable definitions to see if they are consistent with the expectations. If they are inconsistent, it is judged as failure to detect, terminates the current test case detection task and outputs the detection result; if they are consistent, executes the next step;
[0039] In the current test case detection module, the main station communication simulation program determines whether the last measurement change information has been executed. If not, it continues to monitor the output information of the object under test, and the acquisition end simulation host continues to execute subsequent simulation changes from the secondary measurement change information output module; if it is determined that it is the last item or exceeds the expected detection time, it can be considered that the current test case detection task has been completed, the detection result is output, and the task execution is terminated;
[0040] The test case script execution module manually confirms the selection or the program automatically executes the next test case script, and repeatedly executes the contents of the test case script allocation module, timing module, secondary measurement change information output module, information output module, detection module, detection judgment module and current test case detection module until the detection tasks of all test cases are completed.
[0041] To achieve the above-mentioned purpose, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the power monitoring system simulation detection method based on the customizable calculation formula as described above is implemented.
[0042] To achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the power monitoring system simulation detection method based on a customizable calculation formula as described above is implemented.
[0043] According to the solution of the present invention, the present invention sets the acquisition end input information in the test case script based on the calculation formula, and the acquisition end simulation program on the acquisition end simulation host can simulate the secondary equipment operation information and measurement changes collected by the power monitoring system during the detection process, which greatly saves the cost of setting up the simulation test environment of the power monitoring system;
[0044] The present invention checks and sets the control instructions and output information in the test case script based on the calculation formula. The master station communication simulation program on the master station simulation host can simulate the master-substation interactive communication of the object under test during the detection process, effectively saving the construction cost of the scheduling master station simulation test environment.
[0045] Through the configuration and application of the test case script of the customizable calculation formula in the present invention, various trigger modes such as periodic change, timing change, change trigger, etc. can be freely customized according to the detection function requirements, and the data interaction simulation requirements of various power monitoring system functions and performance detection can be flexibly adapted;
[0046] The variable definition and formula configuration in the present invention can be applied to the master-substation interactive communication protocol and the station acquisition communication protocol of various power monitoring systems, including but not limited to: IEC 101, IEC 102, IEC 103, IEC 104, Modbus, IEC 61850, GSP and other communication protocols; therefore, the present method can be widely used in product testing and simulation verification of power monitoring systems in various scenarios such as substations, thermal power plants, hydropower stations, and new energy power stations;
[0047] The present invention can automatically simulate the measurement changes of the acquisition end based on the calculation formula and time series in the test case script, and can automatically execute the test task and identify the test results in conjunction with the expected execution result setting information predefined by the master station end, thereby upgrading the original detection work that requires manual operation to fully automatic detection, greatly improving the detection work efficiency;
[0048] The present invention can automatically generate a test report during the detection process, greatly shortening the time for testing the monitored product, reducing the test complexity, and greatly saving the labor cost of testing;
[0049] The test case scripts generated based on the configuration of the present invention can be created and saved in batches according to detection requirements, and a test case library that can be reused and iteratively modified can be constructed, providing strong support for the detection work of the power monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram showing a basic structure framework layout diagram of a power monitoring system simulation detection method based on a customizable calculation formula according to an embodiment of the present invention;
[0051] Figure 2 A flowchart schematically showing a power monitoring system simulation detection method based on a customizable calculation formula according to an embodiment of the present invention;
[0052] Figure 3 The flowchart schematically shows a process of configuring a test case script on a test case configuration host according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The present invention will now be discussed with reference to exemplary embodiments. It should be understood that the embodiments discussed are only to enable those skilled in the art to better understand and thus implement the present invention, rather than implying any limitation on the scope of the present invention.
[0054] As used herein, the term “including” and variations thereof are to be interpreted as open-ended terms meaning “including, but not limited to.” The term “based on” is to be interpreted as “based, at least in part, on.” The terms “one embodiment” and “an embodiment” are to be interpreted as “at least one embodiment.”
[0055] Figure 1 The schematic diagram shows the basic structure framework layout of the power monitoring system simulation detection method based on the customizable calculation formula according to an embodiment of the present invention. Figure 1 As shown, the infrastructure includes:
[0056] 1) Power monitoring system
[0057] The power monitoring system is the application object of the method of the present invention, including a monitoring host and a communication gateway service device;
[0058] The monitoring host and communication gateway business equipment collect the measurement information of the secondary equipment in the bay layer of the centralized control station and substation, and process the secondary measurement data to obtain and output the processing results;
[0059] The communication gateway service equipment sends the secondary measurement and processing results to the communication front-end equipment of each remote service master station;
[0060] 2) Test case configuration host
[0061] The test case configuration host defines variables and configures calculation formulas based on the external input and output communication protocols of the object under test according to the detection requirements, and customizes the test case script based on this combined with the time series and trigger mode settings;
[0062] 3) Collection end simulation host
[0063] The collection end simulation program is deployed on the collection end simulation host. The simulation program is based on the communication configuration table of the collection communication protocol agreed by the power monitoring system. It can simulate the parallel operation of various types of collected secondary equipment and output various events and measurement change information;
[0064] 4) Master station simulation host
[0065] The master station simulation host deploys the master station communication simulation program. The master station communication simulation program is based on the communication configuration table of the master-substation interactive communication protocol agreed upon by the power monitoring system, and receives the measurement changes and event information output by the measured object during the detection process;
[0066] 5) GPS timing equipment
[0067] The GPS timing equipment sends timing signals to the object under test, the collection end simulation host and the main station simulation host at regular intervals before and during the test to ensure the consistency of time processing of each host and the effectiveness of the comparison of test results.
[0068] The hosts and related simulation programs of the above components can be flexibly deployed according to the detection requirements, and can be deployed in different computer devices in a dispersed manner or in the same computer device.
[0069] According to one embodiment of the present invention, based on the above basic structure, Figure 2 As shown, the power monitoring system simulation detection method based on a customizable calculation formula of the present invention includes:
[0070] S1. On the test case configuration host, based on the communication protocol between the object under test and the acquisition terminal and the master station, the calculation formula, the change trigger mode and the time series elements of the secondary measurement change, complete the test case script configuration. According to the detection requirements, multiple test case scripts are generally configured to build a test case library;
[0071] S2. The test case configuration host sends a test case script to be executed to the acquisition end simulation host and the master station simulation host respectively;
[0072] S3. Before the test case starts to be executed, the GPS timing device sends timing signals to the object under test, the collection end simulation host and the main station simulation host respectively to ensure the consistency of time processing of each host during the test process, so as to ensure the validity of the comparison of the test results;
[0073] S4. The collection end simulation host loads and parses the test case script, and based on the mapping relationship between the communication configuration table of the collection communication protocol agreed by the power monitoring system and the variable definition, simulates the parallel operation of various types of collected secondary devices (collection devices under the measured object, and simulates the secondary measurement change information to collect the measured object through the simulation program), and gradually simulates and outputs the secondary measurement change information according to the time sequence in the test case script;
[0074] S5. The measured object obtains the secondary measurement change information output by the acquisition end simulation host, processes the data according to the detection requirements, and finally outputs the event information and measurement change information;
[0075] S6. The master station simulation host starts the master station communication simulation program, loads and parses the test case script being executed, and receives and monitors the measurement change information and event information of the object under test after data processing during the detection process; this step is performed synchronously with the above S4 step after the detection task starts to execute;
[0076] S7. The master station communication simulation program is based on a test case script with a customizable calculation formula. It compares the measured change information and event information of the object under test during the detection process one by one according to the time series and variable definition to see if they are consistent with the expectations. If they are inconsistent, it is determined that the detection fails, the current test case detection task is terminated and the detection result is output; if they are consistent, step S8 is executed;
[0077] S8. The master station communication simulation program determines whether the last measurement change information has been executed (each measurement change information corresponds to a calculation formula). If not, it continues to monitor the output information of the object under test, and the acquisition end simulation host continues to execute subsequent simulation changes from step S4; if it is determined that it is the last item or exceeds the expected detection time, it can be considered that the current test case detection task has been completed, the detection result is output, and the task execution is terminated;
[0078] S9. Manually confirm the selection or the program automatically executes the next test case script, and repeats steps S2-S8 until the detection tasks of all test cases are completed.
[0079] Further, Figure 3 The following is a schematic diagram showing a process flow chart of configuring a test case script on a test case configuration host according to an embodiment of the present invention. Figure 3 As shown, in this embodiment, configuring the test case script on the test case configuration host includes:
[0080] On the test case configuration host, based on the communication protocol between the object under test, the acquisition terminal and the master station, define variables for the secondary measurement object of the communication protocol;
[0081] Configure calculation formulas based on variable definitions of secondary measurement objects, computer operation symbols, and common function abbreviations;
[0082] According to the detection requirements, select the change trigger mode, set the time series elements of the secondary measurement changes, and complete the test case script configuration.
[0083] Further, according to an embodiment of the present invention, the variable definition operation is performed by two methods: manual configuration and automatic creation;
[0084] The manually configured variable definition operation is to parse the communication point table or configuration file of the communication protocol through the configuration tool, such as the telecontrol configuration description file (RCD) of IEC 104 and the station configuration description file (SCD) of IEC 61850, obtain the type and description information of the secondary measurement required for the simulation, and set the corresponding globally unique variable name for each of the secondary measurement objects required for the test case execution. In this embodiment, the constituent elements of the variable name include uppercase and lowercase English letters, a combination of numbers and a specific separator character "_", and the first character must be an English letter. In order to facilitate reference in the subsequent formula configuration step, the variable name should be represented by a combination of letters and numbers with certain meanings, for example:
[0085] Example 1: If the first gear is measured, the variable name can be defined as dw1;
[0086] Example 2: For example, if the active power of the 213 interval in a substation is measured, the variable name can be defined as P_213;
[0087] The automatically created variable definition operation is to configure the tool program according to the measurement description information of the communication protocol, and the program automatically creates the corresponding variable name according to the internal rules.
[0088] In this embodiment, the automatically created variable definition method is based on the consideration that if there are many variables to be defined for detection, it is time-consuming and labor-intensive to manually configure them one by one, and it is also prone to errors. Therefore, in order to improve work efficiency and simplify workload, a dedicated configuration tool program can be used to automatically create corresponding variable names according to the measurement description information of different communication protocols according to the internal rules. At present, the communication protocols between various acquisition terminals and master substations of the power monitoring system can be divided into traditional point tables and object modeling according to the differences in the measurement models transmitted by the protocols. The automatically created variable definition method can be applied to these two different communication protocol types. The specific implementation methods are described as follows:
[0089] 1) Instructions for automatically creating variable definitions for traditional point table type communication protocols:
[0090] The communication protocols of traditional point meters in current power systems generally include IEC 101, IEC 102, IEC 103, IEC 104, Modbus and other communication protocols. The description characteristics of their measurement models are generally including elements such as measurement type and information serial number. The configuration tool can automatically define variable names based on these communication elements. An example of variable naming is to use "acquisition device serial number_type abbreviation_information serial number" or similar formats for processing. It should be noted that the first character must be a letter. The following is an example of the IEC 104 communication protocol:
[0091] The collection end of a new energy power station has 4 IEC 104 protocol collection devices. The first 100 information points of the first collection device are telemetering quantities, and the 101st to 200th information points are telemetering quantities. Then the configuration tool can automatically assign the variable definitions of each telemetering point to it as follows:
[0092] The first information point variable definition (remote signal): Dev1_Yx_001;
[0093] The second information point variable definition (remote signal): Dev1_Yx_002;
[0094] …(and so on for subsequent information points)
[0095] Variable definition of information point 101 (telemetry): Dev1_Yc_101;
[0096] Variable definition of information point 102 (telemetry): Dev1_Yc_102;
[0097] …(and so on for subsequent information points)
[0098] The above method can ensure the global uniqueness of automatically named variable names;
[0099] 2) Automatic creation of variable definition processing instructions for object modeling type communication protocol:
[0100] The communication protocols of object modeling in current power systems generally include IEC 61850, GSP and other types. The description characteristics of their measurement models are that the information keywords generally contain the layer-by-layer path description information of the parent-child relationship. The configuration tool can automatically replace the hierarchical identifiers that conflict with the calculation formula based on these information keywords to complete the definition of globally unique variable names. The following is an example of the IEC 61850 communication protocol:
[0101] The station configuration description file (SCD) of a certain smart substation contains a telemetry information object that needs to participate in the variable definition. The corresponding globally unique information keyword (Reference ID) is "CL2201 / MEAS / CBMMXU1$MX$A$phsA$cVal$mag$f". The " / " and "$" symbols are the separators of the parent and child object keywords at each level. The configuration tool can replace them with "_". The final variable name is "CL2201_MEAS_CBMMXU1_MX_A_phsA_cVal_mag_f". This method can ensure the global uniqueness of the automatically named variable name. Considering the problem that the variable name is too long or needs to be remembered, the automatically named variable can also be modified through manual configuration.
[0102] Further, according to an embodiment of the present invention, the calculation formula is an equation expression, the left side of the equal sign is a variable definition as an output quantity, and the right side of the equal sign is a mathematical expression composed of a plurality of variable definitions as input quantities, operators and common functions;
[0103] The calculation formula has only one output quantity;
[0104] The number of input quantities of the calculation formula is ≥ 0. When the number of input quantities is equal to 0, the output result of the calculation formula is a constant.
[0105] For example, a typical calculation formula is: Yc002=100*dw1+10*dw2+F_atag(dw3), where Yc002 is the output, dw1, dw2 and dw3 are the inputs, and F_atag is a commonly used function.
[0106] Furthermore, according to one embodiment of the present invention, the simulation program at the acquisition end substitutes the real-time value of the measurement object defined by the input quantity on the right side of the calculation formula into the expression for calculation, and assigns the calculated output result to the change target value of the measurement object corresponding to the output quantity, and simulates and outputs a secondary measurement change signal according to the time series and change pattern requirements.
[0107] Furthermore, according to one embodiment of the present invention, the operators in the above calculation formula are operation expression symbols commonly used in computer languages. The following Table 1 lists the operators supported by the present invention and their corresponding meanings. It should be particularly pointed out that the periodic operators can only be applied when the time series described later is configured as a periodic change mode.
[0108] Operators illustrate + add - reduce * take / remove % Remainder = equal == Liandeng (used for conditional judgment) != Not equal (used for conditional judgment) () Left and right brackets || or && and ! Negation | Bitwise OR & Bitwise AND ^ Bitwise XOR ?: Conditional operators (e.g. (z>1)?x:y) [,,] Periodic operator (e.g. [1,2,3])
[0109] Table 1
[0110] The "F_atag(...)" in the above calculation formula is the usage of common functions commonly used in computer languages. It starts with "F_" as a function adaptation identifier, atag(...) is the function identifier, and the brackets are the input parameters of the function, which can be input quantities or constant values. The following Table 2 lists the function identifier types and corresponding meanings supported by the present invention.
[0111]
[0112] Table 2
[0113] Further, according to an embodiment of the present invention, the above-mentioned change mode includes a timing change mode, a periodic change mode and a change trigger mode; in this embodiment, the typical time sequence configuration and execution time comparison table corresponding to the three change modes are as shown in Table 3:
[0114]
[0115]
[0116] Table 3
[0117] According to an embodiment of the present invention, in the timing change mode, when the test case is executed, the simulation program at the acquisition end executes a calculation formula at a specific time point, and outputs a change signal of the secondary measurement object corresponding to the output of the formula; in this mode, the time series configuration mode includes two types: wildcard time change and counting time change;
[0118] In this embodiment, the wildcard time change is: the time series is configured with a time format containing a wildcard "$", and a typical embodiment is configured in the form of "$ / $ / $,$:$:$", and the six wildcards represent the adaptation of year, month, day, hour, minute, and second respectively; for example, the time is set to "$ / $ / $, 20:0:0", which means that the simulation program is executed and output once at 8 o'clock every night according to the calculated value at that time.
[0119] The counting time change is: configure the time series as an integer value, with seconds as the unit, which means counting in seconds from the time when the test case starts to execute. When the set integer value is reached, the simulation program executes and outputs a measurement change signal according to the calculated value.
[0120] Further, according to an embodiment of the present invention, in the periodic variation mode, after the test case starts to be executed, the simulation program at the acquisition end periodically executes the calculation formula at a predetermined time interval, and outputs a change signal of the secondary measurement object corresponding to the output of the formula; in the periodic variation mode, an integer value greater than 0 will be saved in the corresponding time series configuration, which is in seconds by default, indicating the execution time period of the test case;
[0121] In this embodiment, in the periodic change mode, a periodic operator is generally set in the expression on the right side of the calculation formula to participate in the operation. The expression format is left and right brackets, and the brackets contain constant or variable operation expressions separated by "," characters. For example, [1,2,3]. The meaning of this operator is that each time a cycle is executed, the constant or expression operation value is output as the calculation result in sequence. After the last calculation result is output, the next cycle will start from the beginning to re-take the value, so the periodic operation result of this embodiment is 1,2,3,1,2,3...
[0122] Further, according to one embodiment of the present invention, the change trigger mode is that after the test case starts to execute, the collection end simulation program monitors the data of the secondary measurement objects corresponding to each input quantity in the calculation formula. When the collection value or simulation value of any measurement object changes, the calculation formula is executed immediately or with a delay according to the configuration value in the time series format, and the secondary measurement object corresponding to the formula output quantity outputs a change signal.
[0123] In this embodiment, the time series format in the change trigger mode is generally set to an integer value greater than or equal to 0, and the default counting unit is seconds; when the value is 0, it means that the calculation formula is executed immediately after the input quantity changes, triggering the measurement change signal; when the value is greater than 0 (such as set to n), it means that the calculation formula is executed after a delay of n seconds, and then the measurement change signal is triggered.
[0124] Furthermore, in this embodiment, the configuration information file format of the above test case script is saved locally or written into a database, and the file format types include but are not limited to: INI format or XML format.
[0125] Further, according to an embodiment of the present invention, in the above-mentioned S7 step, the expected execution result information is gradually set in the test case script according to the detection requirements and in combination with the measurement sequence change signal corresponding to the acquisition end simulation host. The configuration method of the expected execution result is composed of a calculation formula, a change pattern and a time series, and the delay judgment time (seconds / milliseconds) can be set; after receiving the measurement change information forwarded by the processing of the object under test, the main station communication simulation program compares it with the expected execution result information of the measurement sequence change currently being executed. If they are consistent within the delay range, it is considered that the current test step meets expectations, otherwise it is judged as failing the detection.
[0126] According to the above scheme of the present invention, the present invention sets the acquisition end input information in the test case script based on the calculation formula, and the acquisition end simulation program on the acquisition end simulation host can simulate the secondary equipment operation information and measurement changes collected by the power monitoring system during the detection process, which greatly saves the cost of setting up the simulation test environment of the power monitoring system;
[0127] The present invention checks and sets the control instructions and output information in the test case script based on the calculation formula. The master station communication simulation program on the master station simulation host can simulate the master-substation interactive communication of the object under test during the detection process, effectively saving the construction cost of the scheduling master station simulation test environment.
[0128] Through the configuration and application of the test case script of the customizable calculation formula in the present invention, various trigger modes such as periodic change, timing change, change trigger, etc. can be freely customized according to the detection function requirements, and the data interaction simulation requirements of various power monitoring system functions and performance detection can be flexibly adapted;
[0129] The variable definition and formula configuration in the present invention can be applied to the master-substation interactive communication protocol and the station acquisition communication protocol of various power monitoring systems, including but not limited to: IEC 101, IEC 102, IEC 103, IEC 104, Modbus, IEC 61850, GSP and other communication protocols; therefore, the present method can be widely used in product testing and simulation verification of power monitoring systems in various scenarios such as substations, thermal power plants, hydropower stations, and new energy power stations;
[0130] The present invention can automatically simulate the measurement changes of the acquisition end based on the calculation formula and time series in the test case script, and can automatically execute the test task and identify the test results in conjunction with the expected execution result setting information predefined by the master station end, thereby upgrading the original detection work that requires manual operation to fully automatic detection, greatly improving the detection work efficiency;
[0131] The present invention can automatically generate a test report during the detection process, greatly shortening the time for testing the monitored product, reducing the test complexity, and greatly saving the labor cost of testing;
[0132] The test case scripts generated based on the configuration of the present invention can be created and saved in batches according to detection requirements, and a test case library that can be reused and iteratively modified can be constructed, providing strong support for the detection work of the power monitoring system.
[0133] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a power monitoring system simulation detection system based on a customizable calculation formula, comprising:
[0134] A test case script configuration module configures the test case script on the test case configuration host;
[0135] The test case script distribution module, the test case configuration host sends a test case script to be executed to the acquisition end simulation host and the main station simulation host respectively;
[0136] Timing module: GPS timing equipment sends timing signals to the object under test, the acquisition end simulation host and the main station simulation host before the test case starts to execute, to ensure the consistency of time processing of each host during the detection process;
[0137] Secondary measurement change information output module: The collection end simulation host loads and parses the test case script, based on the mapping relationship between the communication configuration table and the variable definition of the collection communication protocol agreed by the power monitoring system, simulates the parallel operation of various types of collected secondary devices, and gradually simulates and outputs the secondary measurement change information according to the time sequence in the test case script;
[0138] Information output module: the object under test obtains the secondary measurement change information output by the acquisition end simulation host, processes the data according to the detection requirements, and finally outputs the event information and measurement change information;
[0139] In the detection module, the master station simulation host starts the master station communication simulation program, loads and parses the test case script being executed, and receives and monitors the measurement change information and event information of the object under test after data processing during the detection process;
[0140] In the detection judgment module, the master station communication simulation program is based on the test case script with customizable calculation formulas. It compares the measurement change information and event information of the object under test during the detection process one by one according to the time series and variable definitions to see if they are consistent with the expectations. If they are inconsistent, it is judged as failure to detect, terminates the current test case detection task and outputs the detection result; if they are consistent, executes the next step;
[0141] In the current test case detection module, the master station communication simulation program determines whether the last measurement change information has been executed. If not, it continues to monitor the output information of the object under test, and the acquisition end simulation host continues to execute subsequent simulation changes from step S4; if it is determined that it is the last item or exceeds the expected detection time, it can be considered that the current test case detection task has been completed, the detection result is output, and the task execution is terminated;
[0142] The test case script execution module manually confirms the selection or the program automatically executes the next test case script, and repeatedly executes the contents of the test case script allocation module, timing module, secondary measurement change information output module, information output module, detection module, detection judgment module and current test case detection module until the detection tasks of all test cases are completed.
[0143] The power monitoring system simulation detection system based on customizable calculation formulas according to the present invention can implement the above-mentioned power monitoring system simulation detection method based on customizable calculation formulas. The specific steps are as described above and will not be repeated herein.
[0144] Furthermore, to achieve the above-mentioned purpose, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the power monitoring system simulation detection method based on the customizable calculation formula as described above is implemented.
[0145] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the power monitoring system simulation detection method based on the customizable calculation formula as described above is implemented.
[0146] Those skilled in the art will appreciate that the modules and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method implementation methods, and will not be repeated here.
[0148] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0149] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0150] In addition, each functional module in the embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0151] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the energy-saving signal sending / receiving method of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0152] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.
[0153] It should be understood that the size of the serial numbers of each step in the content of the invention and the implementation methods of the present invention does not absolutely mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of the present invention.
Claims
1. A simulation detection method for a power monitoring system based on a customizable calculation formula, characterized in that: include: S1. Configure the test case script on the test case configuration host; S2. The test case configuration host sends a test case script to be executed to the acquisition end simulation host and the master station simulation host respectively; S3. The GPS timing device sends timing signals to the object under test, the collection end simulation host and the main station simulation host respectively before the test case starts to execute, to ensure the consistency of time processing of each host during the detection process; S4. The collection end simulation host loads and parses the test case script, simulates the parallel operation of various types of collected secondary devices based on the mapping relationship between the communication configuration table and the variable definition of the collection communication protocol agreed by the power monitoring system, and gradually simulates and outputs the change information of the secondary measurement according to the time sequence in the test case script; S5. The measured object obtains the secondary measurement change information output by the acquisition end simulation host, processes the data according to the detection requirements, and finally outputs the event information and measurement change information; S6. The master station simulation host starts the master station communication simulation program, loads and parses the test case script being executed, and receives and monitors the measurement change information and event information of the measured object after data processing during the detection process; S7. The master station communication simulation program is based on a test case script with a customizable calculation formula. It compares the measurement change information and event information of the object under test during the detection process one by one according to the time series and variable definition to see if they are consistent with the expectations. If they are inconsistent, it is determined that the detection fails, the current test case detection task is terminated and the detection result is output; if they are consistent, the next step is executed; S8. The master station communication simulation program determines whether the last measurement change information has been executed. If not, it continues to monitor the output information of the object under test, and the acquisition end simulation host continues to execute subsequent simulation changes from step S4; if it is determined that it is the last item or exceeds the expected detection time, it can be considered that the current test case detection task has been completed, the detection result is output, and the task execution is terminated; S9. Manually confirm the selection or the program automatically executes the next test case script, and repeats steps S2-S8 until the detection tasks of all test cases are completed.
2. The power monitoring system simulation detection method based on a customizable calculation formula according to claim 1 is characterized in that: The step of configuring the test case script on the test case configuration host includes: On the test case configuration host, based on the communication protocol between the object under test, the acquisition terminal and the master station, define variables for the secondary measurement object of the communication protocol; Configure calculation formulas based on variable definitions of secondary measurement objects, computer operation symbols, and common function abbreviations; According to the detection requirements, select the change trigger mode, set the time series elements of the secondary measurement changes, and complete the test case script configuration.
3. The power monitoring system simulation detection method based on a customizable calculation formula according to claim 2 is characterized in that: The variable definition operation is performed by two methods: manual configuration and automatic creation; The variable definition operation of manual configuration is to parse the communication point table or configuration file of the communication protocol through the configuration tool, obtain the type and description information of the secondary measurement required for the simulation, and set the corresponding globally unique variable name for each of the secondary measurement objects required for the test case execution; The automatically created variable definition operation is to configure the tool program according to the measurement description information of the communication protocol, and the program automatically creates the corresponding variable name according to the internal rules.
4. The power monitoring system simulation detection method based on a customizable calculation formula according to claim 3 is characterized in that: The calculation formula is an equation expression, the left side of the equal sign is the variable definition as the output quantity, and the right side of the equal sign is a mathematical expression composed of several variable definitions as input quantities, operators and common functions; The calculation formula has one and only one output; The number of input quantities of the calculation formula is ≥ 0. When the number of input quantities is equal to 0, the output result of the calculation formula is a constant.
5. The power monitoring system simulation detection method based on a customizable calculation formula according to claim 4 is characterized in that: The simulation program at the acquisition end substitutes the real-time value of the measurement object defined by the input quantity on the right side of the calculation formula into the expression for calculation, and assigns the calculated output result to the change target value of the measurement object corresponding to the output quantity, and simulates the output of the secondary measurement change signal according to the time series and change pattern requirements.
6. The power monitoring system simulation detection method based on a customizable calculation formula according to claim 5 is characterized in that: The change modes include a timing change mode, a periodic change mode and a change trigger mode; The timing change mode is that when the test case is executed, the simulation program on the acquisition end executes a calculation formula at a specific time point, and outputs a change signal for the secondary measurement object corresponding to the output of the formula; the time series configuration methods in this mode include wildcard time change and counting time change; The periodic change mode is that after the test case starts to be executed, the simulation program at the acquisition end periodically executes the calculation formula according to the preset time interval, and outputs the change signal of the secondary measurement object corresponding to the formula output; in the periodic change mode, an integer value greater than 0 will be saved in the corresponding time series configuration, which is in seconds by default, indicating the execution time period of the test case; The change trigger mode is that after the test case starts to execute, the acquisition-end simulation program monitors the data of the secondary measurement objects corresponding to each input quantity in the calculation formula. When the acquisition value or simulation value of any measurement object changes, the calculation formula is executed immediately or with a delay according to the configuration value in the time series format, and the secondary measurement object corresponding to the formula output quantity outputs a change signal.
7. The power monitoring system simulation detection method based on a customizable calculation formula according to any one of claims 1 to 6, characterized in that: In the S7 step, the expected execution result information is gradually set in the test case script according to the detection requirements and in combination with the measurement sequence change signal corresponding to the acquisition end simulation host. The configuration method of the expected execution result is composed of a calculation formula, a change mode and a time series, and the delay judgment time can be set; after receiving the measurement change information forwarded by the processing of the object under test, the main station communication simulation program compares it with the expected execution result information of the measurement sequence change currently being executed. If they are consistent within the delay range, it is considered that the current test step meets expectations, otherwise it is judged as failing the detection.
8. The power monitoring system simulation detection system based on customizable calculation formula is characterized by: include: A test case script configuration module configures the test case script on the test case configuration host; The test case script distribution module, the test case configuration host sends a test case script to be executed to the acquisition end simulation host and the main station simulation host respectively; Timing module: GPS timing equipment sends timing signals to the object under test, the acquisition end simulation host and the main station simulation host before the test case starts to execute, to ensure the consistency of time processing of each host during the detection process; Secondary measurement change information output module: The collection end simulation host loads and parses the test case script, based on the mapping relationship between the communication configuration table and the variable definition of the collection communication protocol agreed by the power monitoring system, simulates the parallel operation of various types of collected secondary devices, and gradually simulates and outputs the secondary measurement change information according to the time sequence in the test case script; Information output module: the object under test obtains the secondary measurement change information output by the acquisition end simulation host, processes the data according to the detection requirements, and finally outputs the event information and measurement change information; In the detection module, the master station simulation host starts the master station communication simulation program, loads and parses the test case script being executed, and receives and monitors the measurement change information and event information of the object under test after data processing during the detection process; In the detection judgment module, the master station communication simulation program is based on the test case script with customizable calculation formulas. It compares the measurement change information and event information of the object under test during the detection process one by one according to the time series and variable definitions to see if they are consistent with the expectations. If they are inconsistent, it is judged as failure to detect, terminates the current test case detection task and outputs the detection result; if they are consistent, executes the next step; In the current test case detection module, the master station communication simulation program determines whether the last measurement change information has been executed. If not, it continues to monitor the output information of the object under test, and the acquisition end simulation host continues to execute subsequent simulation changes from step S4; if it is determined that it is the last item or exceeds the expected detection time, it can be considered that the current test case detection task has been completed, the detection result is output, and the task execution is terminated; The test case script execution module manually confirms the selection or the program automatically executes the next test case script, and repeatedly executes the contents of the test case script allocation module, timing module, secondary measurement change information output module, information output module, detection module, detection judgment module and current test case detection module until the detection tasks of all test cases are completed.
9. An electronic device, characterized in that It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the power monitoring system simulation detection method based on a customizable calculation formula as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the power monitoring system simulation detection method based on a customizable calculation formula as described in any one of claims 1 to 7 is implemented.