Modeling method and device of dynamic components of power system based on differential neural network
Through the data-driven method based on differential neural networks, the dynamic component model of the power system is established, which solves the problem of difficulty in modeling complex power systems with traditional modeling methods and achieves higher simulation accuracy and scientific control.
Patent Information
- Application Number
- CN202110691963.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-22
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-06-22
AI Technical Summary
Traditional theory-driven power system modeling methods are difficult to model dynamic components when faced with complex components, complex system mechanisms, missing internal structures, and missing parameters, resulting in inaccurate simulations and increased control difficulty.
Using a data-driven method based on differential neural networks, the differential neural network model is trained through system data sets, and a power system dynamic component model including differential equations and algebraic equations is established to directly learn the relationship between state variables and output variables from the data, reducing Reliance on component mechanism analysis.
It realizes dynamic component modeling in complex power systems without in-depth analysis of component mechanisms, improves simulation accuracy and scientific control decision-making, and reduces the occurrence of simulation inaccuracies.
Smart Images

Figure CN113505525B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system analysis, and in particular to a method and device for modeling dynamic components of a power system based on differential neural networks. Background Art
[0002] Power system simulation is an important tool for analyzing, predicting and controlling power systems, and power system modeling is the basis of simulation.
[0003] The classical method of establishing component models in power systems is driven by theory. When modeling, the internal mechanism of the component is first studied and analyzed based on relevant physical theorems and laws, and then the mathematical model equation is derived after simplification based on the internal mechanism and the component parameters are determined using numerical calculation methods; then the mathematical model is compared with the behavior of the actual component. If there is a difference, the problem is caused by factors that were ignored during the establishment of the mathematical model, and then the mathematical model is modified until a mathematical model that meets the needs is obtained; when simulating, the accuracy and calculation amount are weighed and the appropriate mathematical model is selected.
[0004] In recent years, with the increase in the scale and complexity of power systems, and the development of technologies such as smart grids, microgrids, distributed generation, wind power generation, and solar power generation, traditional theory-driven modeling methods face the challenges of complex components, complex internal system mechanisms, missing internal structures of modeling objects, missing parameters, and other situations that are difficult to describe with conventional mathematics as the power system continues to develop. This makes it impossible to model the dynamic components of the power system. Summary of the invention
[0005] The present invention provides a method and device for modeling dynamic components of an electric power system based on a differential neural network, which is used to solve the problem in the prior art that modeling cannot be performed when the components of the electric power system are complex, the system mechanism is complex, or parameters are missing, and realizes modeling of dynamic components of the electric power system by training a system data set without analyzing the mechanism of the system components.
[0006] The present invention provides a method for modeling dynamic components of a power system based on a differential neural network, comprising:
[0007] Determine the state variables of the power system to be modeled;
[0008] Acquire a system data set; wherein the system data set is obtained through measurement or simulation experiments, and the system data set includes state variables, input variables, and output variables used for model training;
[0009] A differential neural network model is trained according to the system data set to obtain a power system dynamic element model; wherein the power system dynamic element model includes a differential equation expression and an algebraic equation expression; wherein the differential equation expression is used to describe the state information of the power system, and the algebraic equation expression is used to describe the output information of the power system.
[0010] According to a method for modeling a power system dynamic component based on a differential neural network provided by the present invention, the differential neural network model is trained according to the system data set to obtain a power system dynamic component model, including:
[0011] In the differential neural network model, the constraints of the input equation module and the output equation module are respectively added; wherein the input equation module describes the functional relationship between the state variable, the state variable derivative and the input variable, and the output equation describes the functional relationship between the state variable, the output variable and the input variable related to the output variable;
[0012] Inputting the state variables in the system data set into the input equation module of the differential neural network model to train it, and obtaining the result expressed by the differential equation in the power system dynamic element model;
[0013] The system input algebraic quantity and the system output algebraic quantity are input into the output equation module of the differential neural network model for training, so as to obtain the result expressed by the algebraic equation in the dynamic element model of the power system.
[0014] According to a method for modeling dynamic components of a power system based on a differential neural network provided by the present invention, the constraints of the input equation module and the output equation module are added to the differential neural network model respectively, including:
[0015] The input equation module of the differential neural network model applied to the power system to be modeled is a model about the relationship between each state variable derivative and other state variables and input variables; the definite correlation between each state variable derivative and other state variables and input variables in the input equation module is obtained through the data and theory fusion method.
[0016] According to a method for modeling dynamic components of a power system based on a differential neural network provided by the present invention, the constraints of the input equation module and the output equation module are added to the differential neural network model respectively, including:
[0017] Add the input equation module to the differential neural network model, so that the differential neural network model can be expressed as
[0018] X(t)=Model(t,X(0),Input 1 )
[0019] in X(0) is the known initial value, t∈{0…T} is the time when the differential neural network model needs to output X(t), Input 1 The value of the input variable at the time when the derivative of X is calculated in the time period 0-T;
[0020] By adding the output equation module to the differential neural network model, the differential neural network model can be expressed as
[0021] X(t),Y(t)=Model(t,X(0),Input 1 ,Input 2 )
[0022] in X(0) is the known initial value, x∈{0…T} is the time when the differential neural network model needs to output X(t) and Y(t), Input 1 Input is the value of the input variable required to calculate the derivative of X in the time period 0-T. The specific time is related to the integration step size. 2 The input variable values required to calculate Y(t) in the time period 0-T.
[0023] According to a method for modeling a power system dynamic component based on a differential neural network provided by the present invention, a differential neural network model is trained according to the system data set to obtain a power system dynamic component model, including: the power system dynamic component model is represented as
[0024]
[0025] y=g(x,v)
[0026] in is the state variable of the system, is the input variable that affects the state variable, is a differential equation determined by the system; is the output variable of the system, are input variables that directly affect the output variables. is an algebraic equation determined by the system.
[0027] According to a method for modeling dynamic components of a power system based on a differential neural network provided by the present invention, an input equation module is added to the differential neural network model, so that the differential neural network model is expressed as X(t)=Model(t,X(0),Input 1 ), including: the output of the differential neural network model is represented as a differential result
[0028]
[0029] According to a method for modeling dynamic components of a power system based on a differential neural network provided by the present invention,
[0030] The output equation module is added to the differential neural network model, so that the differential neural network model is expressed as X(t), Y(t) = Model(t, X(0), Input 1 ,Input 2 ), including: the output of the differential neural network model also includes an algebraic part
[0031] Y(t)=f y (X(t),Input 2 (t))
[0032] where f y Input variable in the differential neural network model 2 (t) and the differential output result X(t).
[0033] The present invention also provides a power system dynamic element modeling device based on differential neural network, comprising:
[0034] A state variable determination unit, used for determining state variables of the power system to be modeled;
[0035] A system data set establishing unit, used to establish a system data set, wherein the system data set includes state variables, input variables, and output variables for model training;
[0036] The power system dynamic element model building unit is used to establish a differential equation expression including the description of the power system state information and an algebraic equation including the power system output information.
[0037] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for modeling dynamic elements of a power system based on a differential neural network as described above are implemented.
[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for modeling dynamic elements of a power system based on a differential neural network as described above are implemented.
[0039] The power system dynamic component modeling method based on differential neural network and the power system component modeling method based on data driven by neural network provided by the present invention have the following advantages: when the power system component mechanism is complex, the internal structure of the modeling object is missing, the parameters are missing, and other situations where traditional modeling methods are not competent, there is no need to analyze the mechanism of each component of the power system and the mechanism relationship between each component. The component modeling or parameter correction can be completed through system data set training, thereby reducing the occurrence of simulation inaccuracy. . BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 is a flow chart of a method for modeling dynamic components of a power system based on a differential neural network provided by an embodiment of the present invention;
[0042] Figure 2 yes Figure 1 The specific flow chart of step 103;
[0043] Figure 3 It is a structural diagram of a differential neural network model in the prior art provided by an embodiment of the present invention;
[0044] Figure 4 yes Figure 3 Improved structural diagram of the model in Figure 2;
[0045] Figure 5 is Figure 4 The structure diagram of the differential neural network model after adding the input equation module to the model structure;
[0046] Figure 6 is Figure 5 The structure diagram of the differential neural network model after adding the output equation module to the model structure;
[0047] Figure 7 It is a simulation diagram of the model of the power system dynamic element modeling method based on differential neural network provided by an embodiment of the present invention after the second-order generator is modeled on the test set;
[0048] Figure 8 It is a structural diagram of a power system dynamic element modeling device based on a differential neural network provided by an embodiment of the present invention;
[0049] Fig. 9It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Power system simulation is an important tool for analyzing, predicting and controlling power systems, and power system modeling is the basis of simulation.
[0052] The classical method of establishing component models in power systems is driven by theory. When modeling, the internal mechanism of the component is first studied and analyzed based on relevant physical theorems and laws, and then the mathematical model equation is derived after simplification based on the internal mechanism and the component parameters are determined using numerical calculation methods; then the mathematical model is compared with the behavior of the actual component. If there is a difference, the problem is caused by factors that were ignored during the establishment of the mathematical model, and then the mathematical model is modified until a mathematical model that meets the needs is obtained; when simulating, the accuracy and calculation amount are weighed and the appropriate mathematical model is selected.
[0053] In recent years, with the increase in the scale and complexity of power systems, as well as the development of technologies such as smart grids, microgrids, distributed generation, wind power generation, and solar power generation, traditional theory-driven modeling methods face the following problems from modeling to application:
[0054] (1) Complex components are constantly evolving, and their internal mechanisms are complex, which may be difficult to describe with conventional mathematics;
[0055] Wind turbines, solar cells and other new components of the power system are constantly evolving. For these new components, their internal mechanisms are often not fully understood, and they are high-order complex systems that are difficult to model. After modeling, if it is found that there is a large difference between the behavior of the built mathematical model and the actual component, it is difficult to analyze and consider the source of the difference, especially it is difficult to use conventional mathematical models to describe the complex processes or factors in the component.
[0056] (2) It is difficult to handle the situation where the internal structure of the modeling object is unknown during modeling;
[0057] With the development of power systems and energy internet, the current power system modeling and simulation involves modeling of microgrids. The inability to obtain accurate models of each microgrid has become an important challenge for simulation analysis of networked microgrid systems. For example, for microgrids owned by users, when it is necessary to protect user privacy or when there is a lack of sufficient measurement conditions within the user's microgrid, it is difficult to obtain the internal structure information and internal measurement data of the microgrid, and it is difficult to establish an accurate physical model. If an empirical model is used, it may be seriously inaccurate.
[0058] (3) It is difficult to handle situations where component parameters are missing or inaccurate;
[0059] After establishing the mechanism model based on the physical laws of equipment operation using a theory-driven approach, there are still a large number of component parameters in the model that need to be determined, such as friction coefficient, medium specific heat capacity, etc. Even if empirical data is available, the parameter settings based on empirical data may not be accurate and may lead to inaccurate dynamic models.
[0060] (4) It is difficult to perform variable derivative operations, which is not conducive to power system operation control decision-making;
[0061] In the operation and control of power systems, if the derivative of the variable to be controlled in the component model to the variable that is easy to directly control can be obtained, it will greatly reduce the decision-making difficulty of the operation and control personnel, improve the scientific nature of the decision and the stability and controllability of the power system operation. However, for more complex component equipment, its theoretical mathematical model may be a high-order nonlinear equation, and the derivative operation requires complicated mathematical derivation and calculation; the power system simulation based on the theoretical mathematical model usually does not support the calculation of derivatives, and it is difficult to meet the actual needs in the operation and control of the power system.
[0062] In summary, at a time when traditional modeling methods are facing challenges, data-driven or data and theory-driven modeling methods may play an important role in power systems, and machine learning is a key technology for data-driven modeling methods. Currently, many machine learning methods have been applied to power system dynamic analysis, but there is still a lack of relevant research on applying machine learning methods to power system modeling. Differential neural networks, a cutting-edge branch of machine learning, provide possibilities for the practice of this system modeling idea.
[0063] The modeling objects of power systems can be divided into two categories, namely component modeling and equivalent modeling. Component modeling, such as synchronous generator modeling, is generally small in scope and has a single component; equivalent modeling, such as power load modeling, is often large in scope and includes multiple components. The modeling of synchronous generator sets is an important topic in power system modeling technology. The models and parameters of synchronous generator sets are of great significance for power system analysis, operation and control.
[0064] Existing research in the field of current power systems is mainly based on neural network methods to perform power system load forecasting, transient stability assessment, reliability analysis, etc., while the power system modeling referred to in the embodiments of the present invention refers to component modeling or subsystem equivalent modeling. The application methods and scenarios of neural networks are quite different from the prior art.
[0065] like Figure 1 The flowchart of a method for modeling a dynamic element of a power system based on a differential neural network provided by an embodiment of the present invention includes:
[0066] Step 101: determining state variables of the power system to be modeled;
[0067] In this step, the state variables required for modeling the power system to be modeled are determined according to its internal structure.
[0068] In the embodiment of the present invention, a second-order generator is taken as a specific example as a modeling object for specific description. According to the theory of the existing mechanism analysis method of the second-order generator, it can be known that the state variables related to the modeling include the power angle δ and the speed ω.
[0069] Step 102: Obtain a system data set; wherein the system data set is obtained through measurement or simulation experiments, and the system data set includes state variables, input variables, and output variables used for model training;
[0070] In the second-order generator model, the input variable is the generator terminal voltage and the output variable is the outflow current.
[0071] Step 103: Train a differential neural network model according to the system data set to obtain a power system dynamic element model; wherein the power system dynamic element model includes a differential equation expression and an algebraic equation expression; wherein the differential equation expression is used to describe the state information of the power system, and the algebraic equation expression is used to describe the output information of the power system.
[0072] In the second-order generator model, the differential equation reflects the mechanical power P input to the generator by the prime mover and the speed regulator. m and the generator output power P e The change of rotor motion state when unbalanced, including the change of power angle δ and speed ω, the mechanical power P in each simulation m is a constant. In the second-order generator model, the algebraic equation expresses the electromagnetic equation, and the excitation voltage is used as the input, thus approximately simulating the function of the excitation regulator.
[0073] like Figure 2 As shown, step 103 specifically includes:
[0074] Step 1031: adding constraints of an input equation module and an output equation module to the differential neural network model; wherein the input equation module describes the functional relationship between the state variable, the state variable derivative and the input variable, and the output equation describes the functional relationship between the state variable, the output variable and the input variable related to the output variable;
[0075] The embodiment of the present invention is improved under the model framework called Neural Dynamics on Complex Networks (NDCN), that is, the constraints of the input equation module and the output equation module are added to the NDCN model.
[0076] The overall NDCN model is expressed as
[0077] X(t)=NDCN(t,X(0)) (1)
[0078] in X(0) is the known initial value, and t∈{0…T} is the time when the model output X(t) is required.
[0079] like Figure 3 The following is a schematic diagram of the structure of the NDCN model. Specifically, the first step is to enter the encoding module (Encoder Layer) of the hidden space:
[0080] X h (0) = f e (X(0)) (2)
[0081] This process realizes the process of upgrading the initial value of the original state variable to a high-dimensional state variable through the Encoder. As can be seen from the figure, the input data is 2 1-dimensional data, which are transformed into 2 20-dimensional data after dimensionality upgrading.
[0082] After entering the hidden space, there is a h Calculate the derivative over time The neural network module f h (HiddenLayer Diffusion):
[0083]
[0084] This process realizes the process of finding the differential quantity in the high-dimensional space of high-dimensional state variables.
[0085] In the latent space, based on f h Solve for X using the integrator h Track (Hidden Layer Weight):
[0086]
[0087] This process realizes the process of numerical integration and obtains high-dimensional state variables at different times.
[0088] Finally, there is the decoding module (Decoder Layer) that leaves the hidden space:
[0089] X(t)=f d (X h (t)) (5)
[0090] This process realizes the process of converting high-dimensional state variables into low-dimensional state variables through Decoder dimensionality reduction. As can be seen from the figure, the input of the decoding module (Decoder Layer) is 2 20-dimensional data and the output is 2 1-dimensional data.
[0091] Therefore, the core "differential neural network" of the NDCN model learns the differential quantity and retains the original integral structure, so it can learn the dynamics of differential equation systems, and the final effect is the "equivalence" of differential equations.
[0092] When the topological relationship of each state variable in the system is unclear, the test results of the NDCN model show that when the training set is small, it can better fit the real trajectory through strong expression ability, but when the training set is large, it always introduces errors and becomes a bottleneck for improving prediction accuracy. To eliminate this error, the information of the unclear topological relationship is replaced by another neural network module, such as Figure 4 As shown in the figure, this change mainly improves the performance of the NDCN model in the following cases: first, similar to the example in this case, the state variable derivatives should be calculated using the values of the linear combination of the state variables, but the topological relationship between the state variables is unclear, that is, it is unclear how to perform the linear combination. In this case, the use of neural network modules and a larger number of training sets can solve this problem; secondly, when the example no longer uses the values of the linear combination of the state variables to calculate the state variable derivatives, but requires the use of more complex function forms, the processing of the original NDCN model is no longer suitable, and the improvement greatly improves the expression ability.
[0093] Depend on Figure 3 and Figure 4It can be seen that in the existing differential neural network NDCN (or improved NDCN) model, there are no input and output restrictions. In order to apply the NDCN (or improved NDCN) model to the modeling of dynamic elements in the power system, it is necessary to improve the differential neural network NDCN (or improved NDCN) model in the prior art, and gradually modify the differential neural network NDCN model or its improved model according to the actual needs in modeling, so that the modeled power system dynamic element model is expanded to a complete differential neural network model that includes both differential equations and algebraic equations, and both inputs and outputs.
[0094] like Figure 5 The figure shows a schematic diagram of the model structure when the input equation module (Input_layer) is added to the NDCN improved model. When the generator is in steady-state operation, the derivatives of the state variables in the rotor motion equation are all 0. When the input variables change, the state variables can change and enter the transient state. Therefore, when studying generator modeling from the perspective of transient simulation, it is necessary to make corresponding modifications to the differential neural network method used and add an input equation module. The small gear symbol in the figure indicates that the input variables in the input equation module need to be continuously input during the numerical integration process, and the output data of the Input_layer is spliced with the output data of the Encoder Layer to form a connection module (Concatenate). The NDCN improved model with the input equation module added is expressed as
[0095] X(t)=Model(t,X(0),Input 1 ) (6)
[0096] in X(0) is the known initial value, x∈{0…T} is the time when the differential neural network model needs to output X(t), Input 1 The value of the input variable at the time when the derivative of X is calculated in the time period 0-T;
[0097] At this time, the output of the differential neural network model is expressed as the differential result form
[0098]
[0099] where f I is the differential equation of the input equation module, f A is the differential equation of the Hidden Layer Diffusion module in the figure, f h It is the differential equation of the Hidden Layer Weight module in the figure.
[0100] like Figure 6As shown, the output equation module (Output_layer) is added to the differential neural network model, so that the differential neural network model is expressed as
[0101] X(t),Y(t)=Model(t,X(0),Input1 1 ,Input1 2 ) (8)
[0102] in X(0) is the known initial value, t∈{0…T} is the time when the differential neural network model needs to output X(t) and Y(t), Input 1 Input is the value of the input variable required to calculate the derivative of X in the time period 0-T. The specific time is related to the integration step size. 2 The input variable values required to calculate Y(t) in the 0-T time period;
[0103] The output of the differential neural network model also includes an algebraic part
[0104] Y(t)=f y (X(t),Input 2 (t)) (9)
[0105] where f y Input variable in the differential neural network model 2 (t) and the differential output result X(t).
[0106] Step 1032: inputting the state variables in the system data set into the input equation module of the differential neural network model to train it, and obtaining the result expressed by the differential equation in the power system dynamic element model;
[0107] Step 1033: input the system input algebraic quantity and the system output algebraic quantity into the output equation module of the differential neural network model to train it, and obtain the result expressed by the algebraic equation in the power system dynamic element model.
[0108] According to step 1032 and step 1033, the dynamic element model of the power system is expressed as
[0109]
[0110] y=g(x,v) (11)
[0111] in is the state variable of the system, is the input variable that affects the state variable, is a differential equation determined by the system; is the output variable of the system, are input variables that directly affect the output variables. is an algebraic equation determined by the system.
[0112] The data in the system data set is input into a differential neural network model with an input equation module and an output equation module. The model output value is compared with the output variable in the system data set, and then the model parameters are adjusted to finally form a power system dynamic component model. The model includes a differential equation expression part and an algebraic equation expression part. The expression form of the modeled power system dynamic component model is as shown in formulas (10) and (11).
[0113] In a preferred implementation of step 1031: the input equation module applied to the differential neural network model of the power system to be modeled is a model about the relationship between each state variable derivative and other state variables and input variables; the definite correlation between each state variable derivative and other state variables and input variables in the input equation module is obtained by a data and theory fusion method.
[0114] In the modeling example of a second-order generator, the differential equation to be learned in the differential neural network model of the power system to be modeled is expressed as
[0115]
[0116]
[0117] Among them, U x is the component voltage of the generator terminal voltage phasor on the x-axis, U y is the component voltage of the generator terminal voltage phasor on the y-axis, U x with U y is the input variable, U x0 with U x0 is the initial value of the terminal voltage phasor on the x-axis and y-axis.
[0118] According to the method of this preferred embodiment, it can be known from the existing theoretical model of the second-order generator that the derivative of the power angle δ is only related to the speed ω, and the derivative of the speed ω is only related to δ, U x , U y , U x0 and U y0 The generator outputs electrical power in and are the generator outflow current and terminal voltage respectively, so formula (12) and formula (13) are optimized as
[0119]
[0120]
[0121] That is, in the local structure of the differential neural network, the theory that reflects the topological relationship between state variables, derivatives of state variables, and input variables is obtained through the existing theoretical model, so that the differential neural network model no longer needs to mine this information from the data, thereby reducing the difficulty of model training.
[0122] In the modeling example of a second-order generator, the algebraic equation to be learned in the differential neural network model of the power system to be modeled is expressed as
[0123] I x =g 1 (δ,U x ,U y ,I x0 ,I y0 ,U x0 ,U y0 ) (16)
[0124] I y =g 2 (δ,U x ,U y ,I x0 ,I y0 ,U x0 ,U y0 ) (17)
[0125] The voltage phasor in xy coordinates Current phasor Split into U x , U y and I x ,I y To perform calculations, and to ensure that the model is universal for faults under different initial power flows, I x0 ,I y0 ,U x0 ,U y0 .
[0126] Based on the differential neural network model that includes both the state equation (expressed by differential equations) and the output equation (expressed by algebraic equations), after adjusting the model structure according to the theoretical fusion driven method (a preferred implementation of step 1031), the equations to be trained are formulas (14) to (17). The system data set generated by the PSOPS simulation tool in the IEEE39 node system is used for training and testing. The simulations are all for situations where the system does not become seriously unstable. A total of 3 seconds of data is captured from the time the fault occurs, and the sampling frequency is the same as 100 samples per second.
[0127] The performance of the trained model on the test set is as follows Figure 7As shown in the figure, they are the power angle, speed, and I in the same simulation. x and I y The curve changes with time. The solid line in the figure is the simulation output value, and the dotted line is the predicted value of the differential neural network model in this part. It can be seen from the figure that the dotted line prediction value and the solid line have a high degree of overlap, achieving a high prediction accuracy.
[0128] The model built by the method of the embodiment of the present invention may encounter the special situation of missing measurement data of state variables in actual engineering applications. The processing methods are as follows:
[0129] ① Both initial values and transient measurements are present: retain this state variable and perform supervised learning.
[0130] ② The initial value is not missing, but the transient measurement is missing: it is used as a hidden state variable and unsupervised learning is performed, and the initial value is selected as a known initial value.
[0131] ③ Both initial values and transient measurements are missing: As hidden state variables and unsupervised learning, the initial value is selected as "a combination of known quantities that carries as much initial state information as possible" and is processed by the encoding module of the neural network.
[0132] After introducing hidden state variables, a high-order differential neural network model can be used to model the low-order system model, which can be divided into two cases:
[0133] ① Due to the lack of theoretical knowledge of the actual system, it is unclear what the minimum order of differential neural network model should be used to model the system. At this time, a higher order should be appropriately selected to avoid insufficient order.
[0134] ② For actual systems of a certain order, if the initial values and transient measurements of one or even several order state variables are missing, the use of a higher order differential neural network model can enhance the model's expressiveness, so as to make full use of the existing information as much as possible in the absence of information and achieve better modeling results.
[0135] like Figure 8 As shown, an embodiment of the present invention provides a power system dynamic element modeling device based on a differential neural network, comprising:
[0136] The state variable determination unit 801 is used to determine the state variables of the power system to be modeled; and to determine the types of state variables related to the modeling according to the system theory of the pre-modeled power system.
[0137] The system data set establishment unit 802 is used to establish a system data set, and the system data set includes state variables, input variables, and output variables for model training; through the system data set establishment unit 802, a simulation data set or a measurement data set including state variables, input variables, and output variables can be obtained, and the data in the data set is not only used for model training but also for the testing process when training the model.
[0138] The power system dynamic component model building unit 803 is used to establish a differential equation expression including the power system state information and an algebraic equation including the power system output information. By further improving the NDCN improved model in the prior art, adding input and output restrictions to improve the model structure, and training with the data in the data set obtained by the system data set building unit 802, the power system dynamic component model that meets the system requirements is established.
[0139] Combine the following Fig. 9 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is described as follows: Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute the power system dynamic element modeling method based on the differential neural network, the method comprising: determining the state variables of the power system to be modeled; obtaining a system data set; wherein the system data set is obtained by measurement or simulation experiment, and the system data set includes the state variables, input variables and output variables for model training; the differential neural network model is trained according to the system data set to obtain the power system dynamic element model; wherein the power system dynamic element model includes differential equation expression and algebraic equation expression; wherein the differential equation expression is used to describe the state information of the power system, and the algebraic equation expression is used to describe the output information of the power system.
[0140] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the embodiment of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0141] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the differential neural network-based power system dynamic element modeling method provided by the above-mentioned methods, the method including: determining the state variables of the power system to be modeled; obtaining a system data set; wherein the system data set is obtained through measurement or simulation experiments, and the system data set includes state variables, input variables, and output variables for model training; training a differential neural network model according to the system data set to obtain a power system dynamic element model; wherein the power system dynamic element model includes a differential equation expression and an algebraic equation expression; wherein the differential equation expression is used to describe the state information of the power system, and the algebraic equation expression is used to describe the output information of the power system.
[0142] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned methods for modeling dynamic components of a power system based on differential neural networks, the method comprising: determining state variables of the power system to be modeled; obtaining a system data set; wherein the system data set is obtained through measurement or simulation experiments, and the system data set includes state variables, input variables, and output variables for model training; training a differential neural network model based on the system data set to obtain a dynamic component model of the power system; wherein the dynamic component model of the power system includes a differential equation expression and an algebraic equation expression; wherein the differential equation expression is used to describe the state information of the power system, and the algebraic equation expression is used to describe the output information of the power system.
[0143] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. Those of ordinary skill in the art may understand and implement them without creative effort.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A power system dynamic component modeling method based on differential neural network, characterized in that: include: Determine the state variables of the power system to be modeled; Acquire a system data set; wherein the system data set is obtained through measurement or simulation experiments, and the system data set includes state variables, input variables, and output variables used for model training; Training a differential neural network model according to the system data set to obtain a power system dynamic component model; Wherein, the differential neural network model is obtained by adding an input equation module and an output equation module to the complex network dynamic system neural network, and the power system dynamic element model includes differential equation expression and algebraic equation expression; The differential equation expression is used to describe the state information of the power system, and the algebraic equation expression is used to describe the output information of the power system.
2. The method for modeling dynamic components of a power system based on differential neural network according to claim 1, characterized in that: The step of training a differential neural network model according to the system data set to obtain a power system dynamic component model includes: In the differential neural network model, the constraints of the input equation module and the output equation module are respectively added; wherein the input equation module describes the functional relationship between the state variable, the state variable derivative and the input variable, and the output equation describes the functional relationship between the state variable, the output variable and the input variable related to the output variable; Inputting the state variables in the system data set into the input equation module of the differential neural network model to train it, and obtaining the result expressed by the differential equation in the power system dynamic element model; The system input algebraic quantity and the system output algebraic quantity are input into the output equation module of the differential neural network model for training, so as to obtain the result expressed by the algebraic equation in the dynamic element model of the power system.
3. The method for modeling dynamic components of a power system based on differential neural networks according to claim 2 is characterized in that: The constraints of adding the input equation module and the output equation module to the differential neural network model respectively include: The input equation module of the differential neural network model applied to the power system to be modeled is a model about the relationship between each state variable derivative and other state variables and input variables; the definite correlation between each state variable derivative and other state variables and input variables in the input equation module is obtained through the data and theory fusion method.
4. The method for modeling dynamic components of a power system based on differential neural network according to claim 3 is characterized in that: The constraints of adding the input equation module and the output equation module to the differential neural network model respectively include: Add the input equation module to the differential neural network model, so that the differential neural network model can be expressed as X(t)=Model(t,X(0),Input1) in X(0) is the known initial value, t∈{0...T} is the time when the differential neural network model needs to output X(t), and Input1 is the input variable value at the time when the derivative of X is calculated in the time period 0-T; By adding the output equation module to the differential neural network model, the differential neural network model can be expressed as X(t), Y(t)=Model(t, X(0), Input1, Input2) in X(0) is the known initial value, t∈{0...T} is the time when the differential neural network model needs to output X(t) and Y(t), Input1 is the input variable value required to calculate the derivative of X within the time period of 0-T, and the specific time is related to the integration step size; Input2 is the input variable value required to calculate Y(t) within the time period of 0-T.
5. The method for modeling dynamic components of a power system based on differential neural network according to claim 4, characterized in that: The differential neural network model is trained according to the system data set to obtain the power system dynamic component model, including: the power system dynamic component model is expressed as y = g(x, v) in is the state variable of the system, is the input variable that affects the state variable, is a differential equation determined by the system; is the output variable of the system, are input variables that directly affect the output variables. is an algebraic equation determined by the system.
6. The method for modeling dynamic components of a power system based on differential neural network according to claim 5, characterized in that: The input equation module is added to the differential neural network model so that the differential neural network model is expressed as X(t)=M0del(t, X(0), Input1), including: the output of the differential neural network model is expressed as the differential result 7. The method for modeling dynamic components of a power system based on differential neural networks according to claim 6, characterized in that: The output equation module is added to the differential neural network model, so that the differential neural network model is expressed as X(t), Y(t) = Model(t, X(0), Input1, Input2), including: the output of the differential neural network model also includes an algebraic part Y(t)=f y (X(t),Input2(t)) where f y It is the differential equation of the input variable Input2(t) and the differential output result X(t) in the differential neural network model.
8. A power system dynamic component modeling device based on differential neural network, using the power system dynamic component modeling method based on differential neural network described in any one of claims 1 to 7, characterized in that: include: A state variable determination unit, used for determining state variables of the power system to be modeled; A system data set establishing unit, used to establish a system data set, wherein the system data set includes state variables, input variables, and output variables for model training; The power system dynamic element model building unit is used to establish a differential equation expression including the description of the power system state information and an algebraic equation including the power system output information.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for modeling dynamic components of a power system based on a differential neural network as described in any one of claims 1 to 7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for modeling dynamic components of a power system based on a differential neural network as claimed in any one of claims 1 to 7 are implemented.
