Method and system for automatically testing virtual power plant regulation and control system
Technical Field
The invention relates to a test method and a test system of a virtual power plant, in particular to a method and a system for automatically testing a regulation and control system of a virtual power plant.
Background
The virtual power plant is used as an energy aggregation form, and distributed adjustable and controllable resources such as large-scale distributed generator sets, controllable loads, distributed energy storage and the like are integrated into a virtual power plant regulation and control system; the system test of the resource widely distributed in the region is very difficult, the test work is heavy, the test efficiency is low, and the accuracy and the completeness of the test are difficult to ensure.
In order to solve the above problems, a method and a system for automatically testing a virtual power plant regulation and control system are needed.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method and a system for automatically testing a virtual power plant regulation and control system, which can quickly verify whether the virtual power plant regulation and control system operates correctly, can simulate the test workload of the power plant regulation and control system, and improve the test efficiency and the test accuracy.
In order to solve the technical problem, in an aspect of the present invention, a method for automatically testing a virtual power plant regulation and control system is provided, where the virtual power plant regulation and control system includes a regulation and control master station and a plurality of regulation and control terminals, and the method includes the following steps:
step S1, a test configuration module arranged in the control master station automatically reads a control object model and parameters configured by the control master station, automatically generates a system test script, a test case and test simulation data, and sends the system test script, the test case and the test simulation data to the control terminal;
step S2, a simulation data module arranged in the regulation terminal receives the test simulation data file, generates real-time data of test use and sends the real-time data to the regulation master station;
step S3, the optimization operation module arranged in the regulation and control main station performs optimization operation calculation on the real-time test data received by the regulation and control main station from each regulation and control terminal, and stores the optimization result;
and S4, reading the expected result of the test case and the optimized operation calculation result of the test data by a test verification module arranged in the regulation and control main station, comparing the expected result with the optimized operation calculation result of the test data, and judging whether the operation of the virtual power plant regulation and control system is abnormal or not according to the comparison result.
Preferably, the simulation data format generated by the test configuration module is a general format for transient data exchange of the power system; the simulation data generated by the test configuration module includes current, voltage values, and power.
Preferably, the test configuration module sends the test simulation data to a signal generator connected to the control terminal, and generates simulation test data by receiving data of the signal generator.
Preferably, the system test script generated by the test configuration module includes all test cases and test simulation data corresponding to the test cases, and when the test system executes the script, each test case is automatically executed in sequence until the script is finished.
Preferably, the step S4 further includes:
if the test data optimization operation calculation result is the same as the expected result of the test case or within the error range specified by the expected result, judging that the virtual power plant regulation and control system operates correctly; otherwise, judging that the virtual power plant regulation and control system is abnormal in operation.
In another aspect of the present invention, a system for automatically testing a virtual power plant regulation and control system is further provided, where the virtual power plant regulation and control system includes a regulation and control master station and a plurality of regulation and control terminals, and the system for automatically testing the virtual power plant regulation and control system includes:
the test configuration module is arranged in the regulation and control main station and used for automatically reading a regulation and control object model and parameters configured by the regulation and control main station, automatically generating a system test script, a test case and test simulation data and sending the system test script, the test case and the test simulation data to the regulation and control terminal;
the simulation data module is arranged in the regulation and control terminal and used for receiving the test simulation data file, generating real-time data for test purposes and sending the real-time data to the regulation and control master station;
the optimization operation module is arranged in the regulation and control main station and used for performing optimization operation calculation on the real-time test data received by the regulation and control main station from each regulation and control terminal and storing an optimization result;
and the test verification module is arranged in the regulation and control main station and used for reading the expected result of the test case and comparing the result with the optimized operation calculation result of the test data obtained by the optimized operation module, and judging whether the operation of the virtual power plant regulation and control system is abnormal or not according to the comparison result.
Preferably, the simulation data format generated by the test configuration module is a general format for transient data exchange of the power system; the simulation data generated by the test configuration module includes current, voltage values, and power.
Preferably, further comprising:
and the signal generator is connected with the regulation and control terminal and used for receiving the test simulation data from the test configuration module and generating simulation test data.
Preferably, the system test script generated by the test configuration module includes all test cases and test simulation data corresponding to the test cases, and when the test system executes the script, each test case is automatically executed in sequence until the script is finished.
Preferably, the test verification module further comprises:
the comparison unit is used for reading the expected result of the test case and comparing the expected result with the optimized operation calculation result of the test data obtained by the optimized operation module;
the operation state judging unit is used for judging that the virtual power plant regulation and control system operates correctly when the comparison result of the comparison unit is that the optimal operation calculation result is the same as the expected result of the test case or is within the error range specified by the expected result; otherwise, judging that the virtual power plant regulation and control system is abnormal in operation.
By implementing the embodiment of the invention, the invention has the following beneficial effects:
in the method and the system for automatically testing the virtual power plant regulation and control system, the virtual power plant test configuration module reads the configuration and data of the regulation and control master station of the virtual power plant, automatically generates the test script, automatically tests the virtual power plant regulation and control system, and verifies the test result, thereby realizing the complete automatic test of the whole virtual power plant regulation and control system. The application of the method reduces the test workload of the virtual power plant regulation and control system, improves the test efficiency and the test accuracy, and is effective in the correct and stable operation of the virtual power plant regulation and control system.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic main flow chart of a method for automatically testing a virtual power plant regulation and control system according to the present invention;
FIG. 2 is a schematic structural diagram of an embodiment of a system for automatically testing a regulation system of a virtual power plant according to the present invention;
fig. 3 is a schematic structural diagram of the test verification module in fig. 2.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather should be construed as broadly as the present invention is capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Referring to fig. 1, a main flow diagram of a method for automatically testing a virtual power plant regulation and control system provided by the present invention is shown. In this embodiment, the virtual power plant regulation and control system includes a regulation and control master station and a plurality of regulation and control terminals, and the method includes the following steps:
step S1, a test configuration module arranged in the control master station automatically reads a control object model and parameters configured by the control master station, automatically generates a system test script, a test case and test simulation data, and sends the system test script, the test case and the test simulation data to the control terminal;
specifically, in a practical example, the simulation data format generated by the test configuration module is a common format for transient data exchange of the power system; the simulation data generated by the test configuration module includes current, voltage values, and power. For example, in one example, the test simulation data is stored in a common format of transient data exchange of the power system, that is, a COMTRADE format file, and a COMTRADE format test simulation data file is created for all the regulation and control terminals participating in the test in the virtual power plant, and the virtual power plant master station establishes a communication link with each regulation and control terminal of the virtual power plant and correctly transmits the corresponding COMTRADE file to each regulation and control terminal in the virtual power plant.
Step S2, a simulation data module arranged in the regulation terminal receives the test simulation data file, generates real-time data of test use and sends the real-time data to the regulation master station; specifically, a simulation data module deployed at a virtual power plant regulation and control terminal interprets a received test simulation data file, the data file specifies that a data source is the module (such as the regulation and control terminal), and the simulation data module generates real-time test data according to the simulation data file and transmits the real-time test data to a virtual power plant master station;
specifically, in another practical example, the test configuration module sends the test simulation data to a signal generator connected to the regulation and control terminal, and generates simulation test data by receiving data from the signal generator. For example, a simulation data module deployed at a virtual power plant regulation and control terminal interprets a received test simulation data file, the data file specifies that a data source is an external signal generator, the virtual power plant simulation data module sends the simulation data file to the external signal generator, the external signal generator sends output simulation data to the regulation and control terminal, and the simulation data module reads data of the signal generator, generates real-time test data, and sends the real-time test data to a virtual power plant master station.
Step S3, the optimization operation module arranged in the regulation and control main station performs optimization operation calculation on the real-time test data received by the regulation and control main station from each regulation and control terminal, and stores the optimization result;
in one example, the virtual power plant master station receives real-time test data sent by all the regulation and control terminals, and the real-time test data are sent to an optimization operation module for optimization operation calculation, wherein the module is a basic module of the virtual power plant master station and does not belong to the invention content of the invention, and after the optimization operation of the virtual power plant is finished, an optimization result is stored;
and S4, reading the expected result of the test case and the optimized operation calculation result of the test data by a test verification module arranged in the regulation and control main station, comparing the expected result with the optimized operation calculation result of the test data, and judging whether the operation of the virtual power plant regulation and control system is abnormal or not according to the comparison result.
In a practical example, the step S4 further includes:
if the test data optimization operation calculation result is the same as the expected result of the test case or within the error range specified by the expected result, judging that the virtual power plant regulation and control system operates correctly; otherwise, judging that the virtual power plant regulation and control system is abnormal in operation.
Specifically, in an actual example, the system test script generated by the test configuration module includes all test cases and test simulation data corresponding to the test cases, and when the test system executes the script, the test cases are automatically executed in sequence until the script is finished running.
As shown in fig. 2, which is a schematic structural diagram illustrating a system for automatically testing a virtual power plant regulation and control system provided by the present invention, and is shown in fig. 3, in this embodiment, the virtual power plant regulation and control system includes a regulation and control master station 1 and a plurality of regulation and control terminals 2, and the system for automatically testing a virtual power plant regulation and control system includes:
the test configuration module 11 is arranged in the regulation and control master station 1 and used for automatically reading a regulation and control object model and parameters configured by the regulation and control master station, automatically generating a system test script, a test case and test simulation data and sending the system test script, the test case and the test simulation data to the regulation and control terminal;
the simulation data module 21 is arranged in the regulation and control terminal 2 and used for receiving the test simulation data file, generating real-time data for test purposes and sending the real-time data to the regulation and control master station;
the optimized operation module 12 is arranged in the regulation and control main station 1 and is used for performing optimized operation calculation on the real-time test data received by the regulation and control main station from each regulation and control terminal and storing an optimized result;
and the test verification module 12 is arranged in the regulation and control main station 1 and is used for reading the expected result of the test case and comparing the result with the optimized operation calculation result of the test data obtained by the optimized operation module, and judging whether the operation of the virtual power plant regulation and control system is abnormal or not according to the comparison result.
The test system further comprises a signal generator 4 connected with the regulation and control terminal 2 and used for receiving the test simulation data from the test configuration module 11 and generating simulation test data.
Specifically, in a practical example, the simulation data format generated by the test configuration module 11 is a common format for power system transient data exchange; the simulation data generated by the test configuration module 11 includes current, voltage values and power.
Specifically, in an actual example, the system test script generated by the test configuration module 11 includes all test cases and test simulation data corresponding to the test cases, and when the test system executes the script, the test cases are automatically executed in sequence until the script is finished running.
The test validation module 12 further comprises:
a comparing unit 120, configured to read an expected result of the test case of this time and compare the expected result with an optimized operation calculation result of the test data obtained by the optimized operation module;
the operation state judging unit 121 is configured to judge that the virtual power plant regulation and control system operates correctly when the comparison result of the comparing unit 120 is that the optimal operation calculation result is the same as the expected result of the test case, or is within an error range specified by the expected result; otherwise, judging that the virtual power plant regulation and control system is abnormal in operation.
For more details, reference may be made to the preceding description of fig. 1, which is not detailed here.
By implementing the embodiment of the invention, the invention has the following beneficial effects:
in the method and the system for automatically testing the virtual power plant regulation and control system, the virtual power plant test configuration module reads the configuration and data of the regulation and control master station of the virtual power plant, automatically generates the test script, automatically tests the virtual power plant regulation and control system, and verifies the test result, thereby realizing the complete automatic test of the whole virtual power plant regulation and control system. The application of the method reduces the test workload of the virtual power plant regulation and control system, improves the test efficiency and the test accuracy, and is effective in the correct and stable operation of the virtual power plant regulation and control system.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.