A dynamic equivalent method for microgrid groups based on neural differential equation network
The dynamic equivalent model of the microgrid group was obtained through neural differential equation network training, which solved the problems of difficulty in use and narrow application range in the existing technology, and achieved efficient and wide application of microgrid group stability analysis.
Patent Information
- Application Number
- CN202111239298.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-25
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-10-25
AI Technical Summary
The existing dynamic equivalent method of microgrid group has difficulties in use and narrow application scope, especially the homomodulation equivalent method and pattern equivalent method have large calculations and require complete information, while the model obtained by estimating equivalent method cannot reflect the internal system. Structural features, limited application scope.
Using a method based on neural differential equation network, a mathematical model of microgrid groups is established, and a dynamic equivalent model is obtained using deep neural network training. The error between the measured data and theoretical values is optimized to construct a multi-layer feedforward neural network. , and trained through backpropagation and Lagrangian functions, and update the weight parameters to obtain the dynamic equal value model of the microgrid group.
A dynamic equivalent method of microgrid group with simple use and wide application range is realized, which improves the efficiency and accuracy of microgrid group stability analysis, reduces the difficulty of use and expands the application range.
Smart Images

Figure CN114090947B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a dynamic equivalence method for a microgrid group based on a neural differential equation network, which is mainly suitable for reducing the difficulty of use and increasing the scope of application. Background Art
[0002] The microgrid cluster system is usually composed of multiple interconnected microgrids with close spatial distances. It has a large number of distributed power sources, a complex network structure, and a high proportion of power electronic equipment. It is a complex nonlinear dynamic system. The detailed model of the microgrid cluster is composed of a group of algebraic equations describing the network and a group of nonlinear differential equations describing the dynamic characteristics of distributed power sources. Considering the amount of calculation and the calculation time, it is very difficult to perform stability analysis on the detailed modeling.
[0003] To solve this problem, the microgrid group can be divided into an internal network and an external network, where the internal network is the area that needs to be studied in detail, and the external network is the area that does not need to be studied. The dynamic equivalent method is used to simplify the external network, so as to shorten the calculation time and improve the work efficiency. The existing dynamic equivalent method considers the mutual influence of each generator and the role of the control system under large disturbances, and is mainly divided into three categories: the coherent equivalent method, the mode equivalent method and the estimated equivalent method. Among them, the coherent equivalent method and the mode equivalent method both have problems such as large amount of calculation and need to know the complete information of the external system, which are difficult to use in practice. The estimated equivalent method uses the measured disturbance data for identification to obtain the dynamic equivalent model, which does not require detailed data of the external system. However, the dynamic equivalent model obtained by this method is a black box that cannot reflect the internal structure characteristics of the system, and its application scope has certain limitations. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects and problems of the prior art, such as difficulty in use and narrow application range, and to provide a microgrid group dynamic equivalence method based on a neural differential equation network which is simple to use and has a wide range of applications.
[0005] To achieve the above objectives, the technical solution of the present invention is: a microgrid group dynamic equivalent method based on a neural differential equation network, comprising the following steps:
[0006] S1. Establish a mathematical model of microgrid group;
[0007] The electromechanical transient process of the microgrid group is expressed as the following differential equations:
[0008] (1)
[0009] In formula (1), , is the external network dynamic equivalent model to be sought, Inject current into external network nodes, Control signals for external network nodes, Inject current into internal network nodes, is the internal network node state variable, is the output power of the distributed power source in the internal network, Output power to distributed power sources in external networks;
[0010] Rewrite equation (1) as:
[0011] (2)
[0012] In formula (2), is the state space function to be determined, is the theoretical value of the state variable, is the theoretical value of the input variable;
[0013] The external network is obtained by installing metering devices at the boundaries of the internal and external networks of the microgrid group. The state variable measurement data at time , including node voltage, internal and external network interconnection line current and power, is expressed as At the same time, obtain The control signal for interaction between internal and external networks at the moment is expressed as ;
[0014] Then the deep neural network can be trained to obtain the equivalent model of the microgrid group :
[0015] (3)
[0016] The dynamic equivalent model of the microgrid group is equivalent to minimizing the state variable measurement data Theoretical value of state variable The error between them can be expressed as the following optimization problem:
[0017] (4)
[0018] In formula (4), is the loss function, is the neural differential equation network to be solved, is the neural differential equation network weight parameter, is the measurement data serial number, is the total number of measurement data, For the Group measurement data The corresponding theoretical value is Initial value of the measurement data The corresponding theoretical value is for The measurement data collected at all times, is the acquisition time of the initial value of the measurement data, For the The collection time of the group measurement data;
[0019] S2, construct a neural differential equation network;
[0020] Construct a multi-layer feedforward neural network, including 1 input layer, hidden layers and 1 output layer, where The state of the hidden layer It is expressed as:
[0021] (5)
[0022] In formula (5), is the neuron activation function, For the The state of the hidden layer, For the Layer and The weight coefficients between the layers and hidden layers;
[0023] S3, training neural differential equation network;
[0024] Introducing adjoint coefficient , transform equation (4) into the following Lagrangian function:
[0025] (6)
[0026] In formula (6), For the The collection time of the group measurement data, For the matrix The transpose of is the integration variable;
[0027] The back propagation method is used to obtain the above Lagrangian function about The gradient is:
[0028] (7)
[0029] In formula (7), For the The collection time of the group measurement data, For the The collection time of the group measurement data;
[0030] The boundary condition of the adjoint coefficient is , , and its time derivative , then formula (7) can be expanded and simplified as:
[0031] (8)
[0032] In formula (8), For the Group measurement data The corresponding theoretical value;
[0033] Formula (4) is equivalent to solving the following ordinary differential equation:
[0034] (9)
[0035] Given terminal value , using the reverse mode integration, we can solve equation (9) as shown below:
[0036] (10)
[0037] In formula (10), is the collection time of the first group of measurement data;
[0038] Neural differential equation network Weight coefficient after round training Updated by:
[0039] (11)
[0040] In formula (11), is the learning rate;
[0041] When the preset maximum number of training rounds is reached Stop training when the weight coefficient That is the required dynamic equivalent model parameter of the microgrid group.
[0042] In step S1, data preprocessing is performed on the acquired measurement data time series, including missing value filling and numerical normalization.
[0043] In step S1, the missing value filling adopts the Lagrange difference method to fill and correct the identified missing values. Difference points , then for any interpolation interval and its function value The Lagrange interpolation polynomial is used to solve the problem. The calculation expression is:
[0044] .
[0045] In step S1, the numerical normalization uses Z-Score standardization to convert the original measurement data into processed data with a mean of 0 and a variance of 1. The calculation formula is:
[0046]
[0047] In the above formula, is the original data mean, is the standard deviation.
[0048] In step S2, the neuron activation function may adopt a hyperbolic tangent function tanh or a linear rectification function ReLU.
[0049] In step S3, an adaptive momentum estimation method is used to automatically adjust the learning rate.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] In a microgrid group dynamic equivalent method based on a neural differential equation network of the present invention, the neural differential equation network is trained using the differential equation structure characteristics of the microgrid group and the operation measurement data to obtain a dynamic equivalent model of the microgrid group, which can be used for stability analysis of the microgrid group. In addition, since the physical structure of the microgrid group is fully utilized, the training rate of the neural differential equation network is greatly improved. The above method is not only simple to use, but also has a wide range of applications. Therefore, the present invention not only reduces the difficulty of use, but also increases the scope of application. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a schematic diagram of the differential neural network equivalent model of the microgrid group in the present invention.
[0053] Figure 2 It is a schematic diagram of the network division of the microgrid group in the present invention. DETAILED DESCRIPTION
[0054] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0055] See also Figure 1 , Figure 2 , a dynamic equivalent method of a microgrid group based on a neural differential equation network, comprising the following steps:
[0056] S1. Establish a mathematical model of microgrid group;
[0057] The electromechanical transient process of the microgrid group is expressed as the following differential equations:
[0058] (1)
[0059] In formula (1), , is the external network dynamic equivalent model to be sought, Inject current into external network nodes, Control signals for external network nodes, Inject current into internal network nodes, is the internal network node state variable, is the output power of the distributed power source in the internal network, Output power to distributed power sources in external networks;
[0060] Rewrite equation (1) as:
[0061] (2)
[0062] In formula (2), is the state space function to be determined, is the theoretical value of the state variable, is the theoretical value of the input variable;
[0063] The external network is obtained by installing metering devices at the boundaries of the internal and external networks of the microgrid group. The state variable measurement data at time , including node voltage, internal and external network interconnection line current and power, is expressed as At the same time, obtain The control signal for interaction between internal and external networks at the moment is expressed as ;
[0064] Then the deep neural network can be trained to obtain the equivalent model of the microgrid group :
[0065] (3)
[0066] The dynamic equivalent model of the microgrid group is equivalent to minimizing the state variable measurement data Theoretical value of state variable The error between them can be expressed as the following optimization problem:
[0067] (4)
[0068] In formula (4), is the loss function, is the neural differential equation network to be solved, is the neural differential equation network weight parameter, is the measurement data serial number, is the total number of measurement data, For the Group measurement data The corresponding theoretical value is Initial value of the measurement data The corresponding theoretical value is for The measurement data collected at all times, is the acquisition time of the initial value of the measurement data, For the The collection time of the group measurement data;
[0069] S2, construct a neural differential equation network;
[0070] Construct a multi-layer feedforward neural network, including 1 input layer, hidden layers and 1 output layer, where The state of the hidden layer It is expressed as:
[0071] (5)
[0072] In formula (5), is the neuron activation function, For the The state of the hidden layer, For the Layer and The weight coefficients between the layers and hidden layers;
[0073] S3, training neural differential equation network;
[0074] Introducing adjoint coefficient , transform equation (4) into the following Lagrangian function:
[0075] (6)
[0076] In formula (6), For the The collection time of the group measurement data, For the matrix The transpose of is the integration variable;
[0077] The back propagation method is used to obtain the above Lagrangian function about The gradient is:
[0078] (7)
[0079] In formula (7), For the The collection time of the group measurement data, For the The collection time of the group measurement data;
[0080] The boundary condition of the adjoint coefficient is , , and its time derivative , then formula (7) can be expanded and simplified as:
[0081] (8)
[0082] In formula (8), For the Group measurement data The corresponding theoretical value;
[0083] Formula (4) is equivalent to solving the following ordinary differential equation:
[0084] (9)
[0085] Given terminal value , using the reverse mode integration, we can solve equation (9) as shown below:
[0086] (10)
[0087] In formula (10), is the collection time of the first group of measurement data;
[0088] Neural differential equation network Weight coefficient after round training Updated by:
[0089] (11)
[0090] In formula (11), is the learning rate;
[0091] When the preset maximum number of training rounds is reached Stop training when the weight coefficient That is the required dynamic equivalent model parameter of the microgrid group.
[0092] In step S1, data preprocessing is performed on the acquired measurement data time series, including missing value filling and numerical normalization.
[0093] In step S1, the missing value filling adopts the Lagrange difference method to fill and correct the identified missing values. Difference points , then for any interpolation interval and its function value The Lagrange interpolation polynomial is used to solve the problem. The calculation expression is:
[0094] .
[0095] In step S1, the numerical normalization uses Z-Score standardization to convert the original measurement data into processed data with a mean of 0 and a variance of 1. The calculation formula is:
[0096]
[0097] In the above formula, is the original data mean, is the standard deviation.
[0098] In step S2, the neuron activation function may adopt a hyperbolic tangent function tanh or a linear rectification function ReLU.
[0099] In step S3, an adaptive momentum estimation method is used to automatically adjust the learning rate.
[0100] The principle of the present invention is described as follows:
[0101] for About Time The derivative of ; for About Time The derivative of ; for About Time The derivative of .
[0102] Example:
[0103] The microgrid group can be divided into internal network and external network, such as Figure 2 As shown, the internal network structure and parameters are known, and the external network parameters need to obtain their dynamic equivalent model through the equivalent method;
[0104] A dynamic equivalent method for a microgrid group based on a neural differential equation network comprises the following steps:
[0105] S1. Establish a mathematical model of microgrid group;
[0106] The electromechanical transient process of the microgrid group is expressed as the following differential equations:
[0107] (1)
[0108] In formula (1), , is the external network dynamic equivalent model to be sought, Inject current into external network nodes, Control signals for external network nodes, Inject current into internal network nodes, is the internal network node state variable, is the output power of the distributed power source in the internal network, Output power to distributed power sources in external networks;
[0109] Rewrite equation (1) as:
[0110] (2)
[0111] In formula (2), is the state space function to be determined, is the theoretical value of the state variable, is the theoretical value of the input variable;
[0112] The external network is obtained by installing metering devices at the boundaries of the internal and external networks of the microgrid group. The state variable measurement data at time , including node voltage, internal and external network interconnection line current and power, is expressed as At the same time, obtain The control signal for interaction between internal and external networks at the moment is expressed as ;
[0113] Perform data preprocessing on the acquired measurement data time series, including missing value filling and numerical normalization;
[0114] The missing value filling adopts the Lagrange difference method to fill and correct the identified missing values. Difference points , then for any interpolation interval and its function value The Lagrange interpolation polynomial is used to solve the problem. The calculation expression is:
[0115] ;
[0116] The numerical normalization uses Z-Score standardization to convert the original measurement data into processed data with a mean of 0 and a variance of 1. The calculation formula is:
[0117]
[0118] In the above formula, is the original data mean, is the standard deviation;
[0119] Then the deep neural network can be trained to obtain the equivalent model of the microgrid group :
[0120] (3)
[0121] The dynamic equivalent model of the microgrid group is equivalent to minimizing the state variable measurement data Theoretical value of state variable The error between them can be expressed as the following optimization problem:
[0122] (4)
[0123] In formula (4), is the loss function, is the neural differential equation network to be solved, is the neural differential equation network weight parameter, is the measurement data serial number, is the total number of measurement data, For the Group measurement data The corresponding theoretical value is Initial value of the measurement data The corresponding theoretical value is for The measurement data collected at all times, is the acquisition time of the initial value of the measurement data, For the The collection time of the group measurement data;
[0124] S2, construct a neural differential equation network;
[0125] Structure as Figure 1 The multi-layer feedforward neural network shown in Figure 1 contains 1 input layer, hidden layers and 1 output layer, where The state of the hidden layer It is expressed as:
[0126] (5)
[0127] In formula (5), is the neuron activation function, which can use the hyperbolic tangent function tanh or the linear rectification function ReLU; For the The state of the hidden layer, For the Layer and The weight coefficients between the layers and hidden layers;
[0128] S3, training neural differential equation network;
[0129] To facilitate the training of the neural differential equation network described in step S2, the adjoint coefficients are introduced , transform equation (4) into the following Lagrangian function:
[0130] (6)
[0131] In formula (6), For the The collection time of the group measurement data, For the matrix The transpose of is the integration variable;
[0132] The back propagation method is used to obtain the above Lagrangian function about The gradient is:
[0133] (7)
[0134] In formula (7), For the The collection time of the group measurement data, For the The collection time of the group measurement data;
[0135] The boundary condition of the adjoint coefficient is , , and its time derivative , then formula (7) can be expanded and simplified as:
[0136] (8)
[0137] In formula (8), For the Group measurement data The corresponding theoretical value;
[0138] Formula (4) is equivalent to solving the following ordinary differential equation:
[0139] (9)
[0140] Given terminal value , using the reverse mode integration, we can solve equation (9) as shown below:
[0141] (10)
[0142] In formula (10), is the collection time of the first group of measurement data;
[0143] Neural differential equation network Weight coefficient after round training Updated by:
[0144] (11)
[0145] In formula (11), The learning rate is the learning rate. In actual use, the adaptive momentum estimation method (Adam) can be used to automatically adjust the learning rate. The initial rate can be freely selected according to the specific model characteristics.
[0146] When the preset maximum number of training rounds is reached Stop training when the weight coefficient That is the required dynamic equivalent model parameter of the microgrid group.
Claims
1. A dynamic equivalent method for microgrid groups based on neural differential equation networks, characterized in that: The following steps are involved: S1. Establish a mathematical model of microgrid group; The electromechanical transient process of the microgrid group is expressed as the following differential equations: (1) In formula (1), , is the external network dynamic equivalent model to be sought, Inject current into external network nodes, Control signals for external network nodes, Inject current into internal network nodes, is the internal network node state variable, is the output power of the distributed power source in the internal network, Output power to distributed power sources in external networks; Rewrite equation (1) as: (2) In formula (2), is the state space function to be determined, is the theoretical value of the state variable, is the theoretical value of the input variable; The external network is obtained by installing metering devices at the boundaries of the internal and external networks of the microgrid group. The state variable measurement data at time , including node voltage, internal and external network interconnection line current and power, is expressed as At the same time, obtain The control signal for interaction between internal and external networks at the moment is expressed as ; Then the deep neural network can be trained to obtain the equivalent model of the microgrid group : (3) The dynamic equivalent model of the microgrid group is equivalent to minimizing the state variable measurement data Theoretical value of state variable The error between them can be expressed as the following optimization problem: (4) In formula (4), is the loss function, is the neural differential equation network to be solved, is the neural differential equation network weight parameter, is the measurement data serial number, is the total number of measurement data, For the Group measurement data The corresponding theoretical value is Initial value of the measurement data The corresponding theoretical value is for The measurement data collected at all times, is the acquisition time of the initial value of the measurement data, For the The collection time of the group measurement data; S2, construct a neural differential equation network; Construct a multi-layer feedforward neural network, including 1 input layer, hidden layers and 1 output layer, where The state of the hidden layer It is expressed as: (5) In formula (5), is the neuron activation function, For the The state of the hidden layer, For the Layer and The weight coefficients between the layers and hidden layers; S3, training neural differential equation network; Introducing adjoint coefficient , transform equation (4) into the following Lagrangian function: (6) In formula (6), For the The collection time of the group measurement data, For the matrix The transpose of is the integration variable; The back propagation method is used to obtain the above Lagrangian function about The gradient is: (7) In formula (7), For the The collection time of the group measurement data, For the The collection time of the group measurement data; The boundary condition of the adjoint coefficient is , , and its time derivative , then formula (7) can be expanded and simplified as: (8) In formula (8), For the Group measurement data The corresponding theoretical value; Formula (4) is equivalent to solving the following ordinary differential equation: (9) Given terminal value , using the reverse mode integration, we can solve equation (9) as shown below: (10) In formula (10), is the collection time of the first group of measurement data; Neural differential equation network Weight coefficient after round training Updated by: (11) In formula (11), is the learning rate; When the preset maximum number of training rounds is reached Stop training when the weight coefficient That is the required dynamic equivalent model parameter of the microgrid group.
2. The method for dynamic equivalence of a microgrid group based on a neural differential equation network according to claim 1, characterized in that: In step S1, data preprocessing is performed on the acquired measurement data time series, including missing value filling and numerical normalization.
3. The method for dynamic equivalence of a microgrid group based on a neural differential equation network according to claim 2, characterized in that: In step S1, the missing value filling adopts the Lagrange difference method to fill and correct the identified missing values. Difference points , then for any interpolation interval and its function value The Lagrange interpolation polynomial is used to solve the problem. The calculation expression is: 。 4. The method for dynamic equivalence of a microgrid group based on a neural differential equation network according to claim 2, characterized in that: In step S1, the numerical normalization uses Z-Score standardization to convert the original measurement data into processed data with a mean of 0 and a variance of 1. The calculation formula is: In the above formula, is the original data mean, is the standard deviation.
5. The method for dynamic equivalence of a microgrid group based on a neural differential equation network according to claim 1, characterized in that: In step S2, the neuron activation function may adopt a hyperbolic tangent function tanh or a linear rectification function ReLU.
6. The method for dynamic equivalence of a microgrid group based on a neural differential equation network according to claim 1, characterized in that: In step S3, an adaptive momentum estimation method is used to automatically adjust the learning rate.
Citation Information
Patent Citations
Electric power system state estimation method based on convolutional neural network
CN109784480A
Micro-grid dynamic equivalent modeling method based on GRU recurrent neural network
CN112883522A