Power grid dynamic modeling method based on physical information neural network and related device
By introducing a physical information neural network into the dynamic modeling of the power grid, combining real-time data and physical constraints, the simulation deviation problem of traditional modeling methods under the topology changes of the power grid and the drift of equipment parameters is solved, and high-precision and real-time grid state prediction and dynamic characteristic capture are achieved.
Patent Information
- Application Number
- CN202510699822.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-08-19
AI Technical Summary
Traditional power grid dynamic modeling methods are difficult to adapt to the dynamic changes in power grid topology, equipment parameter drift and the randomness of new energy output, resulting in significant deviations from the actual operating status, which seriously restricts the grid's intelligent scheduling and fault warning capabilities.
The dynamic modeling method of power grid based on physical information neural network is adopted, and the basic laws of the power system and equipment dynamic equations are embedded in the loss function, and the model is trained using real-time measurement data to realize online parameter identification, multi-time scale efficient modeling, global dynamic feature capture and real-time high-precision prediction.
It improves the accuracy, real-time and stability of dynamic modeling of the power grid, can reflect changes in equipment characteristics in real time, adapt to the fluctuations in system inertia caused by new energy access, and improves the accuracy of grid state prediction and the physical consistency of the model.
Smart Images

Figure CN120509799A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power system modeling, and in particular to a method for dynamic modeling of a power grid based on a physical information neural network and related devices. Background Art
[0002] Power system dynamic modeling is a core technology for ensuring the safe and stable operation of power grids. This is particularly true in emerging power systems with high penetration rates of renewable energy and a large number of power electronic devices. The complex dynamic characteristics of the power grid (such as high-frequency oscillations, sudden voltage fluctuations, and multi-timescale coupling effects) place higher demands on modeling accuracy and real-time performance. Traditional modeling methods rely on fixed physical models or purely data-driven models, which are difficult to adapt to dynamic changes in grid topology, device parameter drift, and the randomness of renewable energy output. This leads to significant deviations between simulation results and actual operating conditions, severely restricting the power grid's intelligent scheduling and fault warning capabilities. Summary of the Invention
[0003] The present application provides a power grid dynamic modeling method and related devices based on physical information neural network, which are used to improve the accuracy of power grid dynamic modeling.
[0004] In view of this, the first aspect of the present application provides a method for dynamic modeling of a power grid based on a physical information neural network, comprising:
[0005] Obtaining grid observation data, inputting the grid observation data into a neural network to predict grid dynamic behavior and obtain grid state prediction values;
[0006] The data item loss is calculated using the predicted value of the grid state and the actual measured value of the grid state, and the physical residual item loss is calculated using the grid observation data; the physical residual item loss includes the current conservation constraint loss, the voltage closed-loop constraint loss, and the generator dynamic response loss;
[0007] The network parameters of the neural network are updated through data term loss and physical residual term loss until the neural network converges to obtain the power grid state model.
[0008] Optionally, the power grid observation data includes node voltage, node frequency, branch current, time parameters and boundary conditions, and the boundary conditions include power grid load forecast results, power grid dispatch plan and power grid topology coding results.
[0009] Optionally, the current conservation constraint loss is calculated as:
[0010]
[0011] Where, is the current observation value of branch (i, j) at time t; N(i) is the set of adjacent nodes connected to node i.
[0012] Optionally, the voltage closed-loop constraint loss is calculated as:
[0013]
[0014] Where C is the set of closed loops in the power grid; 、 are the voltage observation values of node i and node j at time t respectively; is the current observation value of branch (i, j) at time t; Z ij is the complex impedance of branch (i, j).
[0015] Optionally, the calculation formula for the generator dynamic response loss is:
[0016]
[0017] Where G is the generator set; M g is the inertia constant of the generator g; D g is the damping coefficient of the generator g; is the predicted value of the rotor angle of generator g at time t; 、 They are The first and second derivatives of ; is the mechanical input power of generator g at time t; is the predicted value of the electromagnetic output power of generator g at time t.
[0018] Optionally, the network parameters of the neural network are updated by using the data term loss and the physical residual term loss until the neural network converges to obtain a power grid state model, including:
[0019] The total loss is calculated by taking into account the data term loss, current conservation constraint loss, voltage closed-loop constraint loss, and generator dynamic response loss. The network parameters of the neural network are updated using the total loss until the neural network converges to obtain the grid state model.
[0020] Alternatively, the network parameters of the neural network are updated through the data loss until the neural network converges to obtain the first stage neural network;
[0021] Based on the power grid observation data, the data item loss and current conservation constraint loss corresponding to the first-stage neural network are calculated. The network parameters of the first-stage neural network are updated by the weighted sum of the data item loss and the current conservation constraint loss until the first-stage neural network converges to obtain the second-stage neural network.
[0022] Based on the power grid observation data, the data item loss, current conservation constraint loss and voltage closed-loop constraint loss corresponding to the second-stage neural network are calculated. The network parameters of the second-stage neural network are updated by the weighted sum of the data item loss, current conservation constraint loss and voltage closed-loop constraint loss until the second-stage neural network converges to obtain the third-stage neural network.
[0023] Based on the grid observation data, the data item loss, current conservation constraint loss, voltage closed-loop constraint loss and generator dynamic response constraint corresponding to the third-stage neural network are calculated. The network parameters of the third-stage neural network are updated by the weighted sum of the data item loss, current conservation constraint loss, voltage closed-loop constraint loss and generator dynamic response constraint until the third-stage neural network converges to obtain the grid state model.
[0024] Optionally, the network parameters of the neural network include the weight and bias of the neural network and the physical parameters of the generator, and the physical parameters of the generator include the inertia parameters and damping coefficient of the generator.
[0025] A second aspect of the present application provides a power grid dynamic modeling device based on a physical information neural network, comprising:
[0026] A state prediction unit is used to obtain grid observation data, input the grid observation data into a neural network to predict the dynamic behavior of the grid, and obtain a grid state prediction value;
[0027] A loss calculation unit is used to calculate data item losses using the predicted value of the power grid state and the actual measured value of the power grid state, and to calculate physical residual item losses using the power grid observation data; the physical residual item losses include current conservation constraint losses, voltage closed-loop constraint losses, and generator dynamic response losses;
[0028] The parameter updating unit is used to update the network parameters of the neural network through the data term loss and the physical residual term loss until the neural network converges to obtain the power grid state model.
[0029] A third aspect of the present application provides an electronic device, the device comprising a processor and a memory;
[0030] The memory is used to store program code and transmit the program code to the processor;
[0031] The processor is used to execute the power grid dynamic modeling method based on physical information neural network according to any one of the first aspects according to the instructions in the program code.
[0032] In a fourth aspect, the present application provides a computer-readable storage medium for storing program code. When the program code is executed by a processor, the method for dynamic modeling of a power grid based on a physical information neural network as described in any one of the first aspects is implemented.
[0033] It can be seen from the above technical solutions that this application has the following advantages:
[0034] The power grid dynamic modeling method based on physical information neural network provided in this application uses neural network to establish the mapping relationship between power grid state variables and time and system input. During the model training process, the physical laws of the power grid are introduced as hard constraints in the loss function, achieving physical consistency control when modeling the dynamic behavior of the power system, thereby improving the accuracy of the power grid state prediction results.
[0035] Furthermore, this application embeds the physical parameters of key equipment such as generators as learnable parameters in the neural network during the training process, combines observation data with physical losses for joint optimization, and realizes online dynamic identification and updating of equipment parameters, enabling the model to reflect the non-static behavior of equipment characteristics in the power grid as they change with operating status in real time;
[0036] Furthermore, this application constructs the time-varying boundary conditions of power grid operation as auxiliary input features, which are input into the neural network together with observations such as node voltage and current, to form a mechanism for dynamically controlling the model input space, thereby realizing the model's ability to respond immediately to changes in scheduling strategies and system operating conditions, so that the modeling results can be adjusted in real time with the operating conditions, further improving the model's prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in 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 only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 A schematic flow chart of a method for dynamic modeling of a power grid based on a physical information neural network provided in an embodiment of the present application;
[0039] Figure 2 A structural schematic diagram of a power grid dynamic modeling device based on a physical information neural network provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 those skilled in the art without creative work are within the scope of protection of this application.
[0041] Current grid dynamic modeling relies primarily on five technical approaches: traditional physical model-driven methods, pure data-driven methods, hybrid modeling methods, traditional reactive / voltage control methods, and traditional load forecasting methods. These methods, based on differential equation simulation, deep learning models, a shallow combination of physical constraints and data-driven methods, heuristic optimization algorithms, and statistical regression models, attempt to address the modeling challenges brought about by the complexity of grid dynamic characteristics. However, all of the above technical approaches have significant limitations, which severely restrict the intelligence and stability of new power systems, as follows:
[0042] (1) The separation of physical constraints and data-driven models: Data-driven models lack physical rationality (e.g., predicted voltage values violate Kirchhoff's law), while traditional physical models (e.g., generator transient equations) cannot dynamically update parameters using real-time data;
[0043] (2) Insufficient dynamic parameter identification capabilities: Traditional methods rely on manual adjustment of equipment parameters (such as generator inertia time constant) and are unable to track parameter drift online (such as line impedance changes or virtual inertia of new energy inverters);
[0044] (3) Inefficient multi-time scale modeling: unable to efficiently couple millisecond-level transient processes (such as short-circuit faults) with minute-level steady-state fluctuations (such as load changes);
[0045] (4) Insufficient capture of global dynamic characteristics: Local modeling methods (such as single feeder analysis) cannot reflect the coupling effect of the entire network, resulting in significant deviations between the predicted results and the actual results;
[0046] (5) It is difficult to strike a balance between real-time performance and accuracy: Traditional physical models pursue accuracy but have low computational efficiency, while pure data-driven models are fast but violate the laws of physics.
[0047] In response to the shortcomings of existing technologies, this enhancement aims to solve the problems of traditional power grid dynamic modeling, such as the separation of physical constraints and data-driven, insufficient dynamic parameter identification, low efficiency at multiple time scales, weak global optimization capabilities, poor real-time performance, and poor adaptability to new energy. A power grid dynamic modeling method based on physical information neural networks is proposed. By deeply integrating physical equations with data-driven capabilities, it achieves online parameter identification, efficient modeling at multiple time scales, global dynamic characteristic capture, real-time high-precision prediction, and deep adaptation to new energy sources, significantly improving the accuracy, real-time performance, and stability of power grid dynamic modeling.
[0048] For easier understanding, please refer to Figure 1 The present invention provides a method for modeling power grid dynamics based on a physical information neural network. This method embeds the basic laws of the power system and the dynamic equations of the equipment into the network loss function in the form of constraints, and uses real-time measurement data to train the model to achieve dynamic behavior modeling of the power grid and online identification of system parameters. The method includes:
[0049] Step 110: Obtain grid observation data, input the grid observation data into a neural network to predict grid dynamic behavior, and obtain a grid state prediction value;
[0050] The grid observation data in the embodiment of the present application includes node voltage, node frequency, branch current, time parameters, and boundary conditions. Assuming that the length of the grid observation time series is T, at each time point t∈[0,T], the input vector of the neural network can be expressed as , where N is the node set, is the voltage of node i at time t, is the frequency of node i at time t, is the current of branch (i, j) at time t, B(t) is the boundary condition of the power system at time t, d in is the input vector dimension.
[0051] In the practice of power grid dispatching, the system operation mode, load distribution, topology, etc. are all time-varying external factors. To adapt to this dynamic environment, the boundary conditions in the embodiment of this application include the power grid load forecast results, power grid dispatch plan and power grid topology coding results, that is, , where LoadForecast(t) is the load forecast value of the power system at time t, DispatchPlan(t) is the dispatch plan of the power system at time t, and TopologyCode(t) is the topology coding result of the power system at time t.
[0052] This application uses the boundary condition variable B(t) as part of the neural network input, inputting it into the neural network along with basic variables (including node voltage, node frequency, and branch current). The neural network learns the implicit association between the boundary condition B(t) and the dynamic behavior of the power system, achieving immediate response to changes in the simulated boundary conditions. For example, when the load forecast indicates that a peak load is about to occur in a certain area, the neural network model can adaptively adjust its prediction of the generator output dynamics, thereby reflecting the power system's response behavior in advance.
[0053] The neural network in the embodiments of the present application can be a multi-layer feedforward neural network, a recurrent neural network, a long short-term memory network, or a self-attention structure. The neural network extracts high-dimensional features from the input data through nonlinear mapping to approximate the complex mapping between time and state variables. Taking a multi-layer feedforward neural network as an example, its specific structure is as follows:
[0054]
[0055] Among them, the mapping function of the lth layer is , is the weight matrix of the lth layer, is the bias vector of the lth layer, is the activation function, which can be Tanh activation function, ReLU activation function or Swish activation function, L is the total number of network layers, are the network parameters of the neural network, including weights and biases.
[0056] The time parameter t is explicitly used as one of the neural network input variables to guide the model to learn the time evolution behavior of the state variables, avoiding modeling time as an implicit sequence dependency. In addition, you can also choose to enhance the temporal feature modeling in the following two ways:
[0057] The first method is to perform Fourier feature expansion on time variables (node voltage, node frequency, branch current, boundary conditions) to improve the learning ability of high-frequency dynamic response and expand the time variables into a set of periodic function inputs. ;
[0058] The second method is to input the input variables at multiple time points into the network to capture the temporal dynamic memory of the system, e.g. .
[0059] The neural network in the embodiment of the present application adopts a parameter sharing mechanism, that is, all time points share the same set of model parameters. , to improve the model's temporal generalization capabilities. At the same time, the model also has the ability to migrate between different network topologies through transfer learning, that is, by fine-tuning the existing network weights to adapt to new scenarios.
[0060] This application uses a deep feedforward neural network Simulate the time evolution of state variables. The output grid state variables may include frequency change rate, electromotive force and other dynamic response variables:
[0061]
[0062] The output of the neural network is the estimate of the grid state variables ,in, is the predicted value of the frequency change rate of node i at time t, is the predicted value of the rotor angle of generator g at time t, is the predicted value of the electromotive force of generator g at time t, is the predicted value of the electromagnetic output power of generator g at time t, d out is the output vector dimension.
[0063] Step 120: Calculate the data item loss using the predicted value of the grid state and the actual measured value of the grid state, and calculate the physical residual item loss using the grid observation data;
[0064] The loss function of the neural network in the embodiment of the present application is based on the traditional loss function. It also introduces the physical laws of the power grid as hard constraints into the loss function to achieve physical consistency control when modeling the dynamic behavior of the power system, improve the credibility and generalization ability of the prediction results, and is particularly suitable for unstructured complex scenarios. The physical residual term loss in the embodiment of the present application includes current conservation constraint loss, voltage closed-loop constraint loss and generator dynamic response loss. Specifically, the present application constructs a current conservation constraint loss term based on Kirchhoff's current law:
[0065]
[0066] Where, is the current observation value of branch (i, j) at time t; N(i) is the set of adjacent nodes connected to node i.
[0067] Based on Kirchhoff's voltage law, the voltage closed-loop constraint loss term is constructed:
[0068]
[0069] Where C is the set of closed loops in the power grid; 、 are the voltage observation values of node i and node j at time t respectively; is the current observation value of branch (i, j) at time t; Z ij is the complex impedance of branch (i, j), which represents the electrical characteristics of the branch and is generally expressed as Z ij =R ij+ jX ij , where R ij is the resistance of branch (i, j), X ij is the reactance of branch (i, j). Voltage and current are both input characteristic variables.
[0070] The generator dynamic response loss term is constructed based on the generator dynamic equation constraints:
[0071]
[0072] Where G is the generator set; M g is the inertia constant of the generator g; D g is the damping coefficient of the generator g; is the predicted value of the rotor angle of generator g at time t; 、 They are The first and second derivatives of ; is the mechanical input power of generator g at time t; is the predicted value of the electromagnetic output power of generator g at time t.
[0073] In order to calculate the generator dynamic constraints (such as ) The application uses the automatic differentiation mechanism to derive the neural network output:
[0074] The formula for calculating the first-order derivative is:
[0075]
[0076] The second-order derivative calculation formula is:
[0077]
[0078] The above derivatives are used to calculate the generator dynamic response losses. All derivatives are calculated through automatic differentiation, without the need for explicit symbolic differentiation.
[0079] This application also constructs data item loss:
[0080]
[0081] Where y(t) is the actual measured value of the grid state at time t. The actual measured value of the grid state is obtained through synchronized phasor measurement units (PMUs) or supervisory control and data acquisition (SCADA). The data loss is calculated to constrain the model prediction to be close to the actual observation.
[0082] Step 130: updating the network parameters of the neural network by using the data term loss and the physical residual term loss until the neural network converges to obtain a power grid state model;
[0083] In one embodiment, the total loss can be calculated by using the data item loss, current conservation constraint loss, voltage closed-loop constraint loss, and generator dynamic response loss. The network parameters of the neural network are updated using the total loss until the neural network converges to obtain the grid state model. The total loss of the neural network is:
[0084]
[0085] Where, These are all hyperparameters that can be adjusted dynamically or learned through meta-learning methods.
[0086] The Adam optimizer with momentum or LBFGS (second-order optimization) can be used to minimize the total loss. The network parameters of the neural network are updated by the calculated total loss until the neural network converges and a trained power grid state model is obtained.
[0087] The training process of a neural network can be:
[0088] S11. Initialize network parameters and hyperparameters ;
[0089] S12. Sample time segments from the training set ;
[0090] S13. Calculate all derivative terms using the automatic differentiation framework;
[0091] S14. Calculate all residual losses to get the total loss;
[0092] S15, update the network parameters of the neural network through the total loss:
[0093]
[0094] Where, is the learning rate;
[0095] S16. Iterate until convergence (reaching the maximum number of iterations or the validation set loss no longer decreases), and output the trained neural network model.
[0096] The proposed method for dynamic power grid modeling based on a physical information neural network has excellent scalability and system integration capabilities, making it suitable for dynamic analysis and modeling of new power systems, online state estimation and parameter tracking systems, and power system simulation platforms / digital twin systems. This method can be combined with a distributed training framework to achieve large-scale deployment on edge servers or cloud platforms. It can also be integrated into existing power grid monitoring systems to enhance their modeling intelligence and physical interpretability. For example, real-time grid observation data can be input into a trained grid state model to predict the online state of the power system and analyze its dynamic behavior.
[0097] In another embodiment, a multi-stage training strategy can be introduced to train the network parameters of the neural network. For example, first train only the data loss term, then gradually introduce the physical residual loss term (current conservation constraint loss, voltage closed-loop constraint loss, and generator dynamic response loss) to prevent the physical residual gradient from being too large at the beginning and disrupting training stability. The specific training process is as follows:
[0098] Phase 1: Data-driven pre-training phase. Update the network parameters of the neural network through the data loss until the neural network converges to obtain the first phase neural network. This phase is close to minimizing the data loss function L data ,Right now:
[0099] L stage1 =L data
[0100] At this time, the neural network only learns to fit the time series evolution law of the observed data without considering the physical constraints; using a larger learning rate (such as ) to speed up initial convergence; the training cycle can be set to a number of epochs or until the validation set error converges.
[0101] Phase 2: Gradual introduction of physical constraints. First, the data item loss and current conservation constraint loss corresponding to the first-stage neural network are calculated based on the power grid observation data. The network parameters of the first-stage neural network are updated by the weighted sum of the data item loss and the current conservation constraint loss until the first-stage neural network converges, resulting in the second-stage neural network. Then, the data item loss, current conservation constraint loss, and voltage closed-loop constraint loss corresponding to the second-stage neural network are calculated based on the power grid observation data. The network parameters of the second-stage neural network are updated by the weighted sum of the data item loss, current conservation constraint loss, and voltage closed-loop constraint loss until the second-stage neural network converges, resulting in the third-stage neural network.
[0102] On the basis that the neural network has a certain prediction ability in the first stage, physical residual loss is gradually added. First, the current conservation constraint loss term L is added KCL :
[0103]
[0104] The grid observation data (the grid observation data at this time can be new grid observation data, or new grid observation data can be added on the basis of the original grid observation data) is input into the first-stage neural network to predict the grid dynamic behavior. The data item loss is calculated based on the grid state prediction value output by the first-stage neural network and the grid observation data. The current conservation constraint loss item is calculated through the grid observation data. The loss L is calculated through the data item loss and the current conservation constraint loss item. stage2a ; Then through the loss L stage2a Update the network parameters of the first stage neural network.
[0105] After training converges, the voltage closed-loop constraint loss L is added KVL :
[0106]
[0107] The grid observation data (the grid observation data at this time can be new grid observation data, or new grid observation data can be added on the basis of the grid observation data in the previous process (stage2a)) is input into the second-stage neural network to predict the dynamic behavior of the grid. The data item loss is calculated based on the grid state prediction value output by the second-stage neural network and the grid observation data. The current conservation constraint loss item and the voltage closed-loop constraint loss are calculated through the grid observation data. The loss L is calculated through the data item loss, the current conservation constraint loss item, and the voltage closed-loop constraint loss. stage2b ; Then through the loss L stage2b Update the network parameters of the second stage neural network.
[0108] It should be noted that when the physical residual term is first introduced, a smaller weight coefficient (such as ) to alleviate gradient explosion; as training progresses, the weight coefficient of the physical residual term can be increased linearly or exponentially, and eventually converges to the set value (such as ).
[0109] Phase 3: Joint training and dynamic response enhancement. Based on grid observation data, the data item loss, current conservation constraint loss, voltage closed-loop constraint loss, and generator dynamic response constraint corresponding to the third-phase neural network are calculated. The network parameters of the third-phase neural network are updated using the weighted sum of these losses until the third-phase neural network converges and the grid state model is obtained.
[0110] After the above two stages are completed, the generator dynamic response constraint L is introduced. ODE , construct the complete loss function:
[0111]
[0112] The grid observation data (the grid observation data at this time can be new grid observation data, or new grid observation data can be added based on the grid observation data in the previous process (stage2b)) is input into the third-stage neural network to predict the grid dynamic behavior. The data item loss is calculated based on the grid state prediction value output by the third-stage neural network and the grid observation data. The current conservation constraint loss item, voltage closed-loop constraint loss and generator dynamic response constraint are calculated through the grid observation data; the loss L is calculated through the data item loss, current conservation constraint loss item, voltage closed-loop constraint loss and generator dynamic response loss. stage3 ; Then through the loss L stage3 Update the network parameters of the third stage neural network.
[0113] The learning rate can be appropriately reduced (such as ) and use early stopping strategy to prevent overfitting; the final model output by training has both data fitting ability and physical consistency.
[0114] Through the above-mentioned staged training process, the problem of training instability caused by the excessively large initial gradient of the physical residual term loss can be effectively reduced. At the same time, the neural network is gradually guided to learn the solution that satisfies the physical constraints of the power system, thereby improving the convergence and physical rationality of the overall model.
[0115] Furthermore, this application no longer inputs the physical parameters of the generator (such as the inertia constant and damping coefficient of the generator) into the network as known constants, but converts them into parameters to be trained:
[0116]
[0117] Where, are the weights and biases of the neural network;
[0118] During the training process, these parameters are optimized together with the network structure weights and biases, and the estimation target becomes:
[0119]
[0120] It should be noted that in the multi-stage training process, the network parameters trained in the first and second stages are the weights and biases of the neural network; the goal of the third stage is to jointly optimize all model parameters, including the weights and biases of the neural network and the physical parameters of the generator (such as M g 、D g )wait.
[0121] This application uses the physical parameters of the generator as trainable variables in the neural network, combined with real-time measurement data, to achieve online estimation and update of the parameters. This allows the model to respond to different operating conditions and dynamically identify changes in the physical characteristics of the system, such as the reduction in inertia caused by the grid connection of new energy sources. Key parameters such as the inertia constant and damping coefficient of core equipment such as generators no longer rely on offline static modeling or experimental identification. Instead, they are automatically updated during the training process in combination with real-time measurement data to achieve adaptive perception of changes in system parameters over time, topology, and load. This allows the model to reflect in real time the non-static behavior of equipment characteristics in the power grid as they change with operating status. This is particularly suitable for modeling system inertia fluctuations after a high proportion of new energy is connected.
[0122] In addition to using the generator's physical parameters as joint training items for the neural network, in another embodiment, traditional optimization methods independent of the neural network (such as Bayesian optimization or maximum likelihood estimation) can also be used to estimate these parameters in parallel and fuse them with the neural network output to achieve enhanced model reliability and multi-source reasoning capabilities. This process includes the following five steps:
[0123] S21. Constructing a generator dynamic response model based on the generator physical parameters;
[0124] Based on the known second-order rotor dynamics equations of the generator, the generator dynamic response model is constructed:
[0125]
[0126] in, It can be obtained by calculating the node voltage and current, or estimated by a neural network. The generator dynamic response model is used to characterize the system frequency response and the generator physical parameters (M g 、D g ) is the basis for subsequent parameter optimization.
[0127] S22, constructing a loss objective function corresponding to the physical parameters of the generator, and calculating the estimated loss of the physical parameters of the generator;
[0128] The error between the grid state variables (such as rotor angle and electromotive force) calculated by the generator dynamic response model and the grid observation data defines the generator physical parameter estimation loss:
[0129]
[0130] in, It represents the prediction function of the generator dynamic response model to the grid state variables under given parameters; y(t) is the system response data obtained by actual measurement.
[0131] S23. Based on the loss of generator physical parameter estimation, the traditional optimization method is used to invert the generator physical parameters to obtain the estimated value of the generator physical parameters. 、 ;
[0132] Optional optimization methods include but are not limited to:
[0133] A. Bayesian Optimization: Establish a proxy model of the parameter-loss function through Gaussian process regression and gradually search for the optimal parameters;
[0134] B. Maximum Likelihood Estimation (MLE): By solving the loss function Minimize the objective to perform parameter fitting;
[0135] C. Other optional methods such as particle swarm optimization (PSO) and genetic algorithm (GA) can also be used to improve search efficiency.
[0136] S24, result fusion and model integration;
[0137] The parameter estimation results obtained 、 It can be used to replace the corresponding generator physical parameters (i.e. frozen values) in the neural network, or to substitute the parameter estimation results into the generator dynamic response model in step S21 to obtain the electromagnetic output power estimation value , the electromagnetic output power estimate is used as the electromagnetic output power prediction value output by the grid state model The posterior correction term is used to obtain the final electromagnetic output power prediction value , forming a combined forecast:
[0138]
[0139] in, is the predicted value of the corrected electromagnetic output power of g at time t, To integrate the weights, they can be dynamically adjusted according to the model confidence.
[0140] Furthermore, after step S24, the method further includes: S25, integrating and deploying a multi-source modeling framework;
[0141] The neural network model and the traditional parameter estimation module (i.e., steps S21-S23) are used as two parallel modeling branches; the optimal path or fusion path is selected according to the operating scenario (such as data quality and equipment availability); and they can be deployed in the digital twin system to form a dual-model feedback mechanism to improve prediction stability, fault tolerance, and physical interpretability.
[0142] This application directly embeds the fundamental physical laws of the power grid into the training process of the neural network, significantly improving the physical rationality of the model output. Through the physical residual supervision mechanism, it effectively avoids the problem of "black box models" producing uncontrollable predictions under boundary data or abnormal disturbances, and improves the accuracy and stability of the prediction results.
[0143] In this application, key parameters such as the inertia constant and damping coefficient of core equipment such as generators no longer rely on offline static modeling or experimental identification. Instead, they are automatically updated during the training process in combination with real-time measurement data, enabling adaptive perception of system parameter changes over time, topology, and load, and realizing online dynamic parameter identification.
[0144] This application uses system boundary information such as scheduling plans, load forecasts, and topology as input. The model can automatically adjust as the system operating state switches. It can be deployed in simulation systems under various power grid topologies and control strategies, and has good portability and generalization capabilities.
[0145] The model training in this application relies only on structured observation data and general grid physics laws, eliminating the need for independent differential modeling for each device type or each topology. This allows for rapid deployment of high-precision simulation models in areas where data availability is high but traditional modeling is difficult.
[0146] This application supports real-time modeling updates, improving simulation prediction accuracy. The network structure, combined with the automatic differentiation mechanism, enables the model to rapidly iterate and continuously learn. It can adjust parameters and modify behavior in real time after a grid disturbance, improving the timeliness and accuracy of online power system simulations, situational awareness, and stability analysis.
[0147] Please refer to Figure 2 , the embodiment of the present application further provides a power grid dynamic modeling device based on a physical information neural network, comprising:
[0148] The state prediction unit 210 is used to obtain grid observation data, input the grid observation data into the neural network to predict the dynamic behavior of the grid, and obtain a grid state prediction value;
[0149] A loss calculation unit 220 is configured to calculate data item losses using the predicted grid state value and the actual measured grid state value, and to calculate physical residual item losses using the grid observation data; the physical residual item losses include current conservation constraint losses, voltage closed-loop constraint losses, and generator dynamic response losses;
[0150] The parameter updating unit 230 is used to update the network parameters of the neural network through the data term loss and the physical residual term loss until the neural network converges to obtain the power grid state model.
[0151] As a further improvement, the parameter updating unit 230 is specifically configured to calculate the total loss through the data item loss, the current conservation constraint loss, the voltage closed-loop constraint loss, and the generator dynamic response loss, and update the network parameters of the neural network through the total loss until the neural network converges to obtain the grid state model;
[0152] Alternatively, the network parameters of the neural network are updated through the data loss until the neural network converges to obtain the first stage neural network;
[0153] Based on the power grid observation data, the data item loss and current conservation constraint loss corresponding to the first-stage neural network are calculated. The network parameters of the first-stage neural network are updated by the weighted sum of the data item loss and the current conservation constraint loss until the first-stage neural network converges to obtain the second-stage neural network.
[0154] Based on the power grid observation data, the data item loss, current conservation constraint loss and voltage closed-loop constraint loss corresponding to the second-stage neural network are calculated. The network parameters of the second-stage neural network are updated by the weighted sum of the data item loss, current conservation constraint loss and voltage closed-loop constraint loss until the second-stage neural network converges to obtain the third-stage neural network.
[0155] Based on the grid observation data, the data item loss, current conservation constraint loss, voltage closed-loop constraint loss and generator dynamic response constraint corresponding to the third-stage neural network are calculated. The network parameters of the third-stage neural network are updated by the weighted sum of the data item loss, current conservation constraint loss, voltage closed-loop constraint loss and generator dynamic response constraint until the third-stage neural network converges to obtain the grid state model.
[0156] An embodiment of the present application further provides an electronic device, the device including a processor and a memory;
[0157] The memory is used to store program codes and transmit the program codes to the processor;
[0158] The processor is used to execute the power grid dynamic modeling method based on physical information neural network in the above method embodiment according to the instructions in the program code.
[0159] An embodiment of the present application also provides a computer-readable storage medium, which is used to store program code. When the program code is executed by a processor, it implements the power grid dynamic modeling method based on physical information neural network in the aforementioned method embodiment.
[0160] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0161] In the specification of this application and the above-mentioned drawings, the terms "first," "second," "third," "fourth," etc. (if any) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0162] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or plural.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0164] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0165] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the method described in each embodiment of the present application through a computer device (which can be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name: Read-Only Memory, English abbreviation: ROM), random access memory (full name: Random Access Memory, English abbreviation: RAM), disk or optical disk, and other media that can store program code.
[0167] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above 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 application.
Claims
1. A method for dynamic modeling of power grid based on physical information neural network, characterized in that: include: Obtaining grid observation data, inputting the grid observation data into a neural network to predict grid dynamic behavior and obtain grid state prediction values; The data item loss is calculated using the predicted value of the grid state and the actual measured value of the grid state, and the physical residual item loss is calculated using the grid observation data; the physical residual item loss includes the current conservation constraint loss, the voltage closed-loop constraint loss, and the generator dynamic response loss; The network parameters of the neural network are updated through data term loss and physical residual term loss until the neural network converges to obtain the power grid state model.
2. The method for dynamic modeling of power grid based on physical information neural network according to claim 1, characterized in that: The grid observation data includes node voltage, node frequency, branch current, time parameters and boundary conditions. The boundary conditions include grid load forecast results, grid dispatch plan and grid topology coding results.
3. The method for dynamic modeling of power grid based on physical information neural network according to claim 1, characterized in that: The calculation formula for the current conservation constraint loss is: Where, is the current observation value of branch (i, j) at time t; N(i) is the set of adjacent nodes connected to node i.
4. The method for dynamic modeling of power grid based on physical information neural network according to claim 1, characterized in that: The calculation formula for voltage closed-loop constraint loss is: Where C is the set of closed loops in the power grid; 、 are the voltage observation values of node i and node j at time t respectively; is the current observation value of branch (i, j) at time t; Z ij is the complex impedance of branch (i, j).
5. The method for dynamic modeling of power grid based on physical information neural network according to claim 1, characterized in that: The calculation formula of the generator dynamic response loss is: Where G is the generator set; M g is the inertia constant of the generator g; D g is the damping coefficient of the generator g; is the predicted value of the rotor angle of generator g at time t; 、 They are The first and second derivatives of ; is the mechanical input power of generator g at time t; is the predicted value of the electromagnetic output power of generator g at time t.
6. The method for dynamic modeling of power grid based on physical information neural network according to claim 1, characterized in that: The network parameters of the neural network are updated through the data loss and the physical residual loss until the neural network converges to obtain the power grid state model, including: The total loss is calculated by taking into account the data term loss, current conservation constraint loss, voltage closed-loop constraint loss, and generator dynamic response loss. The network parameters of the neural network are updated using the total loss until the neural network converges to obtain the grid state model. Alternatively, the network parameters of the neural network are updated through the data loss until the neural network converges to obtain the first stage neural network; Based on the power grid observation data, the data item loss and current conservation constraint loss corresponding to the first-stage neural network are calculated. The network parameters of the first-stage neural network are updated by the weighted sum of the data item loss and the current conservation constraint loss until the first-stage neural network converges to obtain the second-stage neural network. Based on the power grid observation data, the data item loss, current conservation constraint loss and voltage closed-loop constraint loss corresponding to the second-stage neural network are calculated. The network parameters of the second-stage neural network are updated by the weighted sum of the data item loss, current conservation constraint loss and voltage closed-loop constraint loss until the second-stage neural network converges to obtain the third-stage neural network. Based on the grid observation data, the data item loss, current conservation constraint loss, voltage closed-loop constraint loss and generator dynamic response constraint corresponding to the third-stage neural network are calculated. The network parameters of the third-stage neural network are updated by the weighted sum of the data item loss, current conservation constraint loss, voltage closed-loop constraint loss and generator dynamic response constraint until the third-stage neural network converges to obtain the grid state model.
7. The method for dynamic modeling of power grid based on physical information neural network according to claim 1, characterized in that: The network parameters of the neural network include the weight and bias of the neural network and the physical parameters of the generator. The physical parameters of the generator include the inertia parameters and damping coefficient of the generator.
8. A power grid dynamic modeling device based on physical information neural network, characterized in that: include: A state prediction unit is used to obtain grid observation data, input the grid observation data into a neural network to predict the dynamic behavior of the grid, and obtain a grid state prediction value; A loss calculation unit is used to calculate data item losses using the predicted value of the power grid state and the actual measured value of the power grid state, and to calculate physical residual item losses using the power grid observation data; the physical residual item losses include current conservation constraint losses, voltage closed-loop constraint losses, and generator dynamic response losses; The parameter updating unit is used to update the network parameters of the neural network through the data term loss and the physical residual term loss until the neural network converges to obtain the power grid state model.
9. An electronic device, characterized in that: The device includes a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the power grid dynamic modeling method based on physical information neural network according to any one of claims 1-7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the power grid dynamic modeling method based on physical information neural network according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Deep learning modeling and analysis method for hydropower station equipment operation trend early warning
CN121168248A
Power grid load intelligent prediction method and device based on multi-model cooperation, equipment and medium
CN121307865A
Voltage transformer error prediction model construction method, error evaluation method and device
CN121543466A
PINN-NIS-based ideal transformer interface stability enhancement method and system
CN121598817A
Ideal transformer interface stability enhancement method and system based on pinn-nis
CN121598817B