Energy storage power station semi-physical real-time simulation architecture building method based on embedded systemTechnical Field
The invention relates to the technical field of power systems, in particular to a construction method of a semi-physical real-time simulation framework of an energy storage power station based on an embedded system.
Background
Simulation is an important means and tool for studying the performance of large-scale power systems, and has been widely applied in various fields of power systems, such as system planning, operation optimization, fault analysis, and the like, and can help related personnel to make reasonable decisions to avoid or reduce problems which may occur in the operation of the system. Along with the large-scale development of electrochemical energy storage, higher and higher requirements are put forward on the functions of the whole energy storage power station and the control equipment of the energy storage power station, and by means of simulation of the energy storage power station and the control equipment, performance indexes of the energy storage power station and the control equipment can be effectively judged, and the quality of the control equipment is controlled.
At present, the simulation means commonly adopted by the energy storage power station mainly comprises software offline simulation and semi-physical real-time simulation. The software off-line simulation mainly verifies the control algorithm at a principle level, generally only uses software to realize the verification, and has the defects that the interaction with actual equipment is not carried out, and meanwhile, the simulation real-time performance is not strong because the simulation algorithm runs on a general operating system. The semi-physical real-time simulation mainly verifies the control performance of actual equipment, generally combines software and hardware, can perform information interaction with an actual equipment control board card, and has powerful simulation function because a self-contained software model library faces to a specific professional field. However, the existing semi-physical real-time simulation has the defects that software and hardware systems are generally difficult to expand and lack flexibility. Meanwhile, the support on the communication protocol is weak, and the requirement of communication interaction with various actual devices is difficult to meet. In addition, the current semi-physical real-time simulation system is large in size, heavy, inconvenient to carry and generally used in a laboratory.
Disclosure of Invention
The invention provides a construction method of a semi-physical real-time simulation framework of an energy storage power station based on an embedded system, and aims to solve the problems in the prior art.
In order to achieve the purpose, the invention is realized by the following technical scheme:
the invention provides an energy storage power station semi-physical real-time simulation architecture building method based on an embedded system, which comprises the following steps:
s1: building an energy storage power station system model;
s2: converting the energy storage power station system model into a target model file;
s3: transplanting the target model file to an embedded real-time kernel system to enable the energy storage power station system model to run in real time in the embedded real-time kernel system;
s4: and connecting an external upper computer and an actual PCS board to the embedded real-time kernel system to realize semi-physical real-time joint simulation of the energy storage power station system.
Optionally, the energy storage power station system model includes two PCS primary main circuits connected in parallel, which are a first PCS primary main circuit and a second PCS primary main circuit, respectively, where the first PCS primary main circuit is connected to a PCS simulation control loop for self-simulation operation of the energy storage power station, and the second PCS primary main circuit is connected to a control loop for external connection of an actual PCS.
Optionally, when the energy storage power station system model is built, a PCS simulation control ring input interface, a single-machine infinite system power output interface and a PCS external control board interaction interface are reserved.
Optionally, when the energy storage power station system model is converted into a target model file, the reserved PCS simulation control ring input interface is configured into an input structural body, and the reserved single-machine infinite system power output interface is configured into an output structural body.
Optionally, the S3 includes:
constructing a control main thread, a communication thread, a model thread and a system IO thread program by utilizing an embedded real-time kernel system multithreading technology, wherein the main thread is used for generating the communication thread, the model thread and the system IO thread, and the main thread regenerates the communication thread after the communication thread crashes; the communication thread is used for carrying out communication interaction with an external GUI (graphical user interface), an actual PCS (physical control System) board card control quantity and a model thread;
in a communication thread program, establishing a bidirectional interactive interface with an external GUI (graphical user interface), an actual PCS (physical System controller) board card control quantity and a model thread program based on a preset protocol; the model thread is used for simulating a single-machine infinite system, a PCS primary main circuit and a PCS simulation control loop; the system IO thread is used for interacting with an IO interface of an embedded system IO and an external PCS.
Optionally, the S4 includes:
and connecting an external upper computer and an actual PCS board card to the embedded real-time kernel system, and realizing semi-physical real-time simulation of the energy storage power station by utilizing the program control interaction of the upper computer and a model thread and the control interaction of the upper computer and the actual PCS control board card.
Has the advantages that:
the invention provides an energy storage power station semi-physical real-time simulation architecture building method based on an embedded system, which is characterized by comprising the following steps: building an energy storage power station system model; converting the energy storage power station system model into a target model file; transplanting the target model file to an embedded real-time kernel system to enable the energy storage power station system model to run in real time in the embedded real-time kernel system; and connecting an external upper computer and an actual PCS board to the embedded real-time kernel system to realize semi-physical real-time joint simulation of the energy storage power station system. Therefore, the overall performance test of the whole station and the equipment of the energy storage power station can be performed, and accurate reference is provided for judging the specific performance of the equipment.
Drawings
FIG. 1 is a flow chart of a construction method of an energy storage power station semi-physical real-time simulation architecture based on an embedded system according to a preferred embodiment of the invention;
fig. 2 is a schematic block diagram of an embedded real-time kernel system according to a preferred embodiment of the present invention.
Detailed Description
The technical solutions of the present invention are described clearly and completely below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, an embodiment of the present application provides a method for building a semi-physical real-time simulation architecture of an energy storage power station based on an embedded system, including:
s1: building an energy storage power station system model;
s2: converting the energy storage power station system model into a target model file;
in this step, the target model file may be a C-code file.
S3: transplanting the target model file to an embedded real-time kernel system to enable the energy storage power station system model to run in real time in the embedded real-time kernel system;
s4: and connecting an external upper computer and an actual PCS board to the embedded real-time kernel system to realize semi-physical real-time joint simulation of the energy storage power station system.
The energy storage power station semi-physical real-time simulation architecture building method based on the embedded system can be used for carrying out comprehensive performance test on the whole energy storage power station and equipment, and provides accurate reference for judging the specific performance of the equipment.
Optionally, the energy storage power station system model includes two PCS primary main circuits connected in parallel, which are a first PCS primary main circuit and a second PCS primary main circuit, respectively, where the first PCS primary main circuit is connected to a PCS simulation control loop for self-simulation operation of the energy storage power station, and the second PCS primary main circuit is connected to a control loop for external connection of an actual PCS.
Optionally, when an energy storage power station system model is built, a PCS simulation control ring input interface, a single-machine infinite system power output interface and a PCS external control board interaction interface are reserved.
In the optional embodiment, the energy storage power station system model is built in Matlab/Simulink, the energy storage power station system model is composed of a single-machine infinite system, a PCS primary main circuit and a PCS simulation control loop model, simulation verification is completed on the energy storage power station system, and effectiveness and correctness of the simulation control model and parameters are guaranteed. The model comprises two PCS primary main circuits which are connected in parallel, a PCS simulation control ring which is connected with the energy storage power station for self simulation operation, and a control ring which is connected with an external actual PCS.
And reserving a PCS simulation control ring input interface for GUI control interaction, and reserving a single-machine infinite system power output interface for displaying a simulation result. And reserving a PCS external control board card interactive interface for actual PCS control quantity access. Thus, the expandability can be improved by reserving the interface.
Optionally, when the energy storage power station system model is converted into a target model file, the reserved PCS simulation control ring input interface is configured into an input structural body, and the reserved single-machine infinite system power output interface is configured into an output structural body.
In the optional embodiment, the energy storage power station system model is converted into a C code file by using a code automatic generation tool, wherein a reserved PCS simulation model input interface is configured as an input structural body in the code, and a reserved output interface is configured as an output structural body.
Optionally, S3 includes:
constructing a control main thread, a communication thread, a model thread and a system IO thread program by utilizing an embedded real-time kernel system multithreading technology, wherein the main thread is used for generating the communication thread, the model thread and the system IO thread, and the main thread regenerates the communication thread after the communication thread crashes; the communication thread is used for carrying out communication interaction with an external GUI, the actual PCS board control quantity and the model thread; in a communication thread program, establishing a bidirectional interactive interface with an external GUI (graphical user interface), an actual PCS (physical System controller) board card control quantity and a model thread program based on a preset protocol; the model thread is used for simulating a single-machine infinite system, a PCS primary main circuit and a PCS simulation control loop; the system IO thread is used for interacting with an IO interface of an embedded system IO and an external PCS. Thus, the degree of supporting various communication protocols can be improved by integrating various communication protocol libraries.
Optionally, S4 includes:
and connecting an external upper computer and an actual PCS board card to the embedded real-time kernel system, and realizing semi-physical real-time simulation of the energy storage power station by utilizing the program control interaction of the upper computer and a model thread and the control interaction of the upper computer and the actual PCS control board card.
In summary, according to the energy storage power station semi-physical real-time simulation architecture building method based on the embedded system, the energy storage system model is operated in the embedded system, and the problem that various communication protocols are difficult to be compatible due to the fact that the embedded system can integrate various communication protocol libraries can be solved; and moreover, the embedded system thread calls a high-precision timer in real time, so that the simulation can run in real time.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.