Power grid analysis method and system considering time-varying inertia of new energy and storage medium
By combining a physical constraint neural network and a Gaussian distribution model with a multi-rate collaborative mechanism, the problem of real-time assessment of inertia changes in the frequency stability analysis of new energy power grids was solved. This enabled high-precision assessment of the frequency dynamic behavior of new energy power grids and detailed characterization of the disturbance propagation process, providing a reliable basis for frequency stability analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-26
AI Technical Summary
Existing frequency stability analysis methods cannot accurately reflect the real-time dynamic changes in the inertia of new energy sources, resulting in insufficient assessment accuracy. They are unable to finely characterize the spatiotemporal evolution process and spatial distribution characteristics of disturbances in wide-area power grids, making it difficult to achieve online application.
A physical constraint neural network model is used to evaluate the time-varying inertia and damping of new energy sources online. A Gaussian distribution model is used to simulate the spatiotemporal propagation of frequency disturbances. Numerical solutions and visualizations are performed through a multi-rate collaborative mechanism to identify risk paths and key nodes.
It enables high-precision assessment of the frequency dynamic behavior of new energy power grids and detailed characterization of disturbance propagation processes, providing high-precision dynamic input parameters and a reliable basis for frequency stability analysis and proactive defense.
Smart Images

Figure CN122292403A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid analysis technology, and in particular to a power grid analysis method, system, and storage medium that takes into account the time-varying inertia of new energy sources. Background Technology
[0002] In recent years, the penetration rate of new energy sources in the power system has continued to rise. However, the dynamic response mechanism of new energy generating units connected to the grid via power electronic converters differs fundamentally from that of traditional synchronous generators. The inertia level of new energy generating units is affected by factors such as natural conditions and control strategies, exhibiting time-varying and uncertainties. This leads to a decrease in the total system inertia level and uneven distribution, seriously threatening the frequency security of the power grid. On the other hand, after a frequency disturbance occurs, its impact does not instantaneously affect the entire grid, but rather propagates in the grid in the form of electromechanical waves with finite speeds. This propagation process is affected by the spatial distribution of system inertia, damping, and network structure, and may form a cumulative amplification effect on certain paths, triggering cascading failures.
[0003] Most existing frequency stability analysis methods use fixed inertia values based on offline models or equivalent aggregation, which cannot reflect the real-time dynamic changes in the inertia of new energy sources, resulting in insufficient assessment accuracy. At the same time, existing methods often simplify the system into a lumped parameter model or focus only on a few key nodes, failing to accurately characterize the spatiotemporal evolution and spatial distribution characteristics of disturbances in a wide-area power grid. Furthermore, the parameters of partial differential equations depend on offline settings and fail to be deeply integrated with the real-time data stream of wide-area measurement systems, making online applications difficult.
[0004] Therefore, there is an urgent need for an analytical method that can integrate real-time data, dynamically evaluate parameters, and perform refined spatiotemporal propagation simulation based on physical mechanisms, so as to accurately grasp the frequency dynamic behavior of high-proportion renewable energy power grids and provide precise decision support for operation scheduling and proactive defense. Summary of the Invention
[0005] This invention provides a power grid analysis method, system, and storage medium that takes into account the time-varying inertia of new energy sources. It can evaluate the time-varying inertia of new energy sources online, accurately simulate the spatiotemporal propagation process of frequency disturbances, and identify risk paths and key nodes, effectively solving the problems in the background technology.
[0006] This invention provides a power grid analysis method that takes into account the time-varying inertia of new energy sources, comprising: Power data from the grid connection points of new energy power plants and frequency data from grid nodes are collected, and the power deviation sequence ΔP(t), frequency deviation sequence Δf(t), and frequency change rate sequence ROCOF(t) with respect to time t are calculated. Based on ΔP(t), Δf(t), and ROCOF(t), a sliding time window data matrix is constructed. A physical constraint neural network model is constructed, and the sliding time window data matrix is input into the physical constraint neural network model to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source through online evaluation. Based on the time-varying inertia parameter H(t) and damping parameter D(t) of new energy, the physical constraint neural network model is trained offline using a composite loss function; an electromechanical wave equation considering the time-varying characteristics of new energy is established. Next, based on the Gaussian distribution model, the inertia and damping of each power generation unit are described in a continuous spatial distribution. Numerical methods are used to discretize and solve the electromechanical wave equations; data synchronization between the solution processes is achieved through a multi-rate collaborative mechanism; based on the frequency spatiotemporal distribution data obtained from the numerical solution, a spatiotemporal cloud map of frequency disturbance propagation is generated, and risk propagation paths and key control nodes of frequency disturbances are identified based on this cloud map.
[0007] Furthermore, the power deviation sequence ΔP(t) = P(t) - P(t0), and the frequency deviation sequence Δf(t) = f grid (t)-f0, the frequency change rate sequence ROCOF(t)=df grid (t) / dt; In the formula, P(t) represents the grid connection power of the renewable energy power station; t0 is the reference time; f grid (t) represents the power grid frequency; f0 represents the rated power grid frequency.
[0008] Furthermore, the physical constraint neural network model includes a feature extraction layer, a physical parameter calculation layer, and a physical relation output layer; The feature extraction layer uses a one-dimensional convolutional neural network to process the sliding time window data matrix; The physical parameter calculation layer is used to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source; The physical relation output layer is used to calculate the predicted power deviation ΔP. pred : .
[0009] Furthermore, the composite loss function L total The expression is: L total =α·L data +β·L physics ; In the formula, α and β are weighting coefficients; L data L is the data fitting loss based on the predicted power deviation and the measured power deviation; physics To introduce physical consistency loss due to higher-order frequency derivative constraints; In the composite loss function L data and L physicsThey are respectively: ; ; In the formula, N is the number of data samples; This is the second derivative of the frequency predicted based on the network output parameters.
[0010] Furthermore, the expression for the electromechanical wave equation that takes into account the time-varying characteristics of new energy sources is: ; In the formula, f is the frequency; x is the spatial coordinate; β grid The inherent damping of the power grid; ; ; In the formula, ω0 is the rated angular frequency of the power grid; V is the node voltage amplitude; |Z| is the line impedance magnitude; H sync This represents the inertia of the synchronous generator.
[0011] Furthermore, the expression for the Gaussian model of inertial distribution is: For a space coordinate x j The j-th power generation unit has an equivalent inertia of m. j (t) The inertia contribution h formed at point x in space j (x, t) is: ; Where σ is the standard deviation of the distribution; The total equivalent inertia h at point x in space eq The sum of contributions from all power generation units.
[0012] Furthermore, the multi-rate coordination mechanism is specifically as follows: A data buffer is established. The online parameter evaluation process writes the evaluated H(t) and D(t) into the buffer at a relatively long period, while the electromechanical wave equation solving process reads the parameters from the buffer at a short period. When there are no parameters that correspond exactly at the simulation time, a linear interpolation algorithm is used to calculate the required parameters.
[0013] Furthermore, the process of identifying key control nodes includes: Extract the frequency timing curves Δf of each node p (t); Calculate the maximum rate of change of frequency (ROCOF) at each node. max,p and disturbance arrival time T arrival,p And calculate the node risk index R. p : ; In the formula, λ1 and λ2 are weighting coefficients; Nodes whose risk indicators exceed a given threshold are identified as critical control nodes.
[0014] This invention also provides a power grid analysis system that takes into account the time-varying inertia of new energy sources, comprising: The data acquisition and processing module is used to collect power data of the grid connection point of the new energy power plant and frequency data of the grid node, and calculate the power deviation sequence ΔP(t), frequency deviation sequence Δf(t) and frequency change rate sequence ROCOF(t) with respect to time t; based on ΔP(t), Δf(t), and ROCOF(t), a sliding time window data matrix is constructed. The online evaluation module is used to construct a physical constraint neural network model. The sliding time window data matrix is input into the physical constraint neural network model to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source through online evaluation. Based on the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source, the physical constraint neural network model is trained offline using a composite loss function. The model building module is used to establish electromechanical wave equations that take into account the time-varying characteristics of new energy sources; then, based on the Gaussian distribution model, the inertia and damping of each power generation unit are continuously distributed in space. The simulation analysis and visualization module is used to discretize and solve the electromechanical wave equations using numerical methods; synchronize data between the solution processes through a multi-rate collaborative mechanism; generate a frequency disturbance propagation spatiotemporal cloud map based on the frequency spatiotemporal distribution data obtained from the numerical solution; and identify the risk propagation path and key control nodes of the frequency disturbance based on the cloud map.
[0015] Furthermore, the power deviation sequence ΔP(t) = P(t) - P(t0), and the frequency deviation sequence Δf(t) = f grid (t)-f0, the frequency change rate sequence ROCOF(t)=df grid (t) / dt; In the formula, P(t) represents the grid connection power of the renewable energy power station; t0 is the reference time; f grid (t) represents the power grid frequency; f0 represents the rated power grid frequency.
[0016] Furthermore, the physical constraint neural network model includes a feature extraction layer, a physical parameter calculation layer, and a physical relation output layer; The feature extraction layer uses a one-dimensional convolutional neural network to process the sliding time window data matrix; The physical parameter calculation layer is used to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source; The physical relation output layer is used to calculate the predicted power deviation ΔP. pred : .
[0017] Furthermore, the composite loss function L total The expression is: L total =α·L data +β·L physics ; In the formula, α and β are weighting coefficients; L data L is the data fitting loss based on the predicted power deviation and the measured power deviation; physics To introduce physical consistency loss due to higher-order frequency derivative constraints; In the composite loss function L data and L physics They are respectively: ; ; In the formula, N is the number of data samples; This is the second derivative of the frequency predicted based on the network output parameters.
[0018] Furthermore, the expression for the electromechanical wave equation that takes into account the time-varying characteristics of new energy sources is: ; In the formula, f is the frequency; x is the spatial coordinate; β grid The inherent damping of the power grid; ; ; In the formula, ω0 is the rated angular frequency of the power grid; V is the node voltage amplitude; |Z| is the line impedance magnitude; H sync This represents the inertia of the synchronous generator.
[0019] Furthermore, the expression for the Gaussian model of inertial distribution is: For a space coordinate x j The j-th power generation unit has an equivalent inertia of m. j (t) The inertia contribution h formed at point x in space j (x, t) is: ; Where σ is the standard deviation of the distribution; The total equivalent inertia h at point x in space eq The sum of contributions from all power generation units.
[0020] Furthermore, the multi-rate coordination mechanism is specifically as follows: A data buffer is established. The online parameter evaluation process writes the evaluated H(t) and D(t) into the buffer at a relatively long period, while the electromechanical wave equation solving process reads the parameters from the buffer at a short period. When there are no parameters that correspond exactly at the simulation time, a linear interpolation algorithm is used to calculate the required parameters.
[0021] Furthermore, the process of identifying key control nodes includes: Extract the frequency timing curves Δf of each node p (t); Calculate the maximum rate of change of frequency (ROCOF) at each node. max,p and disturbance arrival time T arrival,p And calculate the node risk index R. p : ; In the formula, λ1 and λ2 are weighting coefficients; Nodes whose risk indicators exceed a given threshold are identified as critical control nodes.
[0022] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the steps of the power grid analysis method that takes into account the time-varying inertia of new energy sources as described above.
[0023] The technical solution of this invention can achieve the following technical effects: Compared with existing technologies, this invention identifies the time-varying inertia and damping of new energy sources in real time online through a physically constrained neural network, breaking through the limitations of fixed-parameter models. This allows the model to automatically adapt to complex operating conditions such as changes in natural conditions and switching of control modes, providing high-precision dynamic input parameters for subsequent disturbance propagation analysis. The constructed electromechanical wave equations have a rigorous physical basis, revealing the essence of disturbance propagation in the form of waves. Through numerical solutions and visualization, the entire process of disturbance from occurrence, propagation to attenuation is fully displayed, and its spatial distribution differences are finely characterized. Furthermore, the proposed method framework is modular, easily extendable to multi-type virtual inertia assessments, or integrated into more complex network topologies, showing broad application prospects. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A schematic diagram of the logic flow of a power grid analysis method that takes into account the time-varying inertia of new energy sources. Detailed Implementation
[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0028] This invention relates to a power grid analysis method considering the time-varying inertia of renewable energy sources. It comprises four core steps: data acquisition and multi-dimensional feature extraction, online inertia / damping assessment, electromechanical wave propagation model construction, and multi-rate collaborative numerical solution and visualization. These steps construct a complete analysis framework integrating real-time wide-area measurement data, physically constrained neural networks, and time-varying electromechanical wave equations. This framework enables online dynamic assessment of renewable energy inertia and damping, refined simulation of the spatiotemporal propagation of frequency disturbances, and intelligent identification of risk paths and key nodes. Therefore, it provides a reliable basis for frequency stability analysis and active control of power grids with a high proportion of renewable energy sources. The specific details of each step are as follows: Data acquisition and multidimensional feature extraction: The power data P(t) of the target renewable energy power plant grid connection point and the frequency data f of the grid node are synchronously collected using a wide-area measurement system at a frequency of no less than 100Hz. grid (t). Based on the collected power data P(t) and frequency data f grid The original data is preprocessed to calculate the power deviation sequence ΔP(t), frequency deviation sequence Δf(t), and frequency change rate sequence ROCOF(t) with respect to time t. Then, time-frequency analysis methods such as Hilbert-Huang transform are used to analyze P(t) and f(t). grid The sequence (t) is processed to extract nonlinear feature vectors such as instantaneous amplitude and instantaneous frequency. As input for model construction, the time-series data stream is sliced into sliding windows of preset length (200ms) and step size (10ms). Based on ΔP(t), Δf(t), and ROCOF(t), a sliding time window data matrix with three channels is constructed.
[0029] Online evaluation of inertia / damping of new energy sources based on physical constraint neural networks: A physical constraint neural network model integrating data-driven and physical laws is constructed. The sliding time window data matrix is input into the physical constraint neural network model, and the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy are obtained through online evaluation.
[0030] Based on the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source, a composite loss function L is adopted for the physical constraint neural network model. total Offline training is performed, with the loss function L total The optimal form is: L total =α·L data +β·L physics ; In the formula, α and β are weighting coefficients; the value of weighting coefficient α ranges from 0.5 to 0.9, and the value of weighting coefficient β ranges from 0.1 to 0.5. L data L is the data fitting loss based on the predicted power deviation and the measured power deviation; physics To introduce physical consistency loss due to higher-order frequency derivative constraints.
[0031] The loss function not only includes the error term between the predicted power deviation and the true value, but also introduces a physical consistency constraint term for the second derivative of the frequency to ensure that the network learning process strictly follows the underlying physical laws. After training, the model can receive real-time data streams online and output dynamically updated H(t) and D(t).
[0032] Construction of an electromechanical wave propagation model with time-varying parameters: Based on the electromechanical transient theory of power systems, an electromechanical wave equation considering the time-varying characteristics of new energy sources is established. The optimal expression of the electromechanical wave equation is: ; In the formula, f is the frequency; x is the spatial coordinate; β grid The inherent damping of the power grid can be calculated offline based on network parameters; In the formula, β(t) is the time-varying damping term of the electromechanical wave equation, which reflects the dynamic influence of new energy damping on the amplitude attenuation of electromechanical wave fluctuations. In the formula, c(t) is the time-varying wave speed, reflecting the inertia (including the synchronous machine inertia H). sync The dynamic influence of the time-varying inertia H(t) of new energy sources on the propagation speed of electromechanical waves.
[0033] The expressions for β(t) and c(t) are: ; ; In the formula, ω0 is the rated angular frequency of the power grid; V is the node voltage amplitude; |Z| is the line impedance magnitude; H syncThis represents the inertia of the synchronous generator.
[0034] To map discrete synchronous generators and new energy power stations into continuous wave equations, a Gaussian distribution model is then introduced to continuously smooth the spatial distribution of inertia and damping. This allows for a continuous spatial distribution description of the inertia and damping of each power generation unit, laying the foundation for numerical solutions.
[0035] Multi-rate cooperative numerical solution and visualization: The finite difference method is used to discretely solve the established time-varying coefficient partial differential equations. To ensure the stability and accuracy of the solution, implicit schemes such as Crank-Nicolson are selected. To address the speed mismatch between parameter evaluation (20Hz) and electromechanical wave simulation (100Hz), a multi-rate coordination mechanism is designed. Through a buffered data exchange area and interpolation algorithm, it is ensured that the simulation process can smoothly use the latest evaluated time-varying parameters.
[0036] Based on the spatiotemporal evolution data f(x, t) of the frequency of each node in the entire network obtained by numerical solution, a spatiotemporal cloud map of frequency disturbance propagation is generated. By analyzing the gradient, wavefront and other information in the cloud map, high-risk paths of disturbance propagation and key control nodes that can effectively suppress disturbance propagation are quantitatively identified. The risk level is then quantitatively assessed by combining node dynamic indicators (maximum frequency change rate, disturbance arrival time), and finally, an early warning report is generated.
[0037] The preferred sliding time window length is 150ms~250ms, and the sliding step size is 5ms~20ms.
[0038] The preferred power deviation sequence is ΔP(t) = P(t) - P(t0), and the preferred frequency deviation sequence is Δf(t) = f grid (t)-f0, the frequency change rate sequence ROCOF(t)=df grid (t) / dt; In the formula, P(t) represents the grid connection power of the renewable energy power station; t0 is the reference time; f grid (t) represents the power grid frequency; f0 represents the rated power grid frequency.
[0039] The preferred physical constraint neural network model includes a feature extraction layer, a physical parameter calculation layer, and a physical relationship output layer; Feature extraction layer: A one-dimensional convolutional neural network is used to process the sliding time window data matrix, and deep feature mining is performed on the sliding time window data matrix to automatically extract the spatiotemporal patterns related to the dynamic process; Physical parameter calculation layer: The extracted high-dimensional features are mapped to two core time-varying physical parameters through a fully connected network, namely the new energy time-varying inertia parameter H(t) and the damping parameter D(t); Physical relation output layer: Based on the virtual rotor motion equation, it is used to calculate the predicted power deviation ΔP. pred : ; In the composite loss function L data and L physics They are respectively: ; ; In the formula, N is the number of data samples; This is the second derivative of the frequency predicted based on the network output parameters.
[0040] The expression for the preferred inertial distribution Gaussian model is: For a space coordinate x j The j-th power generation unit has an equivalent inertia of m. j (t) The inertia contribution h formed at point x in space j (x, t) is: ; Where σ is the standard deviation of the distribution, and its value ranges from 5km to 15km; The total equivalent inertia h at point x in space eq The sum of contributions from all power generation units: .
[0041] The preferred multi-rate cooperative mechanism is as follows: A data buffer is established. The online parameter evaluation process writes the evaluated H(t) and D(t) into the buffer at a relatively long period, while the electromechanical wave equation solving process reads the parameters from the buffer at a short period. When there are no parameters that correspond exactly at the simulation time, a linear interpolation algorithm is used to calculate the required parameters.
[0042] The process of identifying key control nodes includes: Extract the frequency timing curves Δf of each node p (t); Calculate the maximum rate of change of frequency (ROCOF) at each node. max,p and disturbance arrival time T arrival,p And calculate the node risk index R. p : ; In the formula, λ1 and λ2 are weighting coefficients; Nodes whose risk indicators exceed a given threshold are identified as critical control nodes.
[0043] The following example illustrates the implementation process of this method by describing a large power outage that occurred in a regional power grid (including multiple renewable energy power plants and synchronous power plants).
[0044] Data acquisition and multidimensional feature extraction: (1) Using the deployed wide-area measurement system, the three-phase active power of all new energy power plants connected to the grid within the area, as well as the voltage phasor data of 30 major substation nodes, were simultaneously collected at a sampling frequency of 125Hz. The voltage phasor data was used to calculate the frequency, and the calculation formula is as follows: ; In the formula, f i (t) represents the frequency of the i-th measurement node at time t; This represents the phase angle of the voltage phasor at that node. The data is transmitted to the main analysis station in real time via a high-speed communication network.
[0045] (2) Set the disturbance occurrence time as t0, and extract the data window from 200ms before t0 to 3 seconds after the disturbance. For each renewable energy power station, calculate its power deviation sequence: ; In the formula, This represents the average active power of the station within the 100ms time window preceding time t0. For each frequency measurement node, calculate the frequency deviation sequence and the frequency change rate sequence: ; ; Where f0 = 50Hz is the system's rated frequency; Δt s =8ms is the data sampling interval.
[0046] (3) Nonlinear feature extraction: Select the P(t) data of the new energy power station and the f of its neighboring nodes. grid (t) data, Hilbert-Huang transform is performed. First, empirical mode decomposition is performed to obtain a series of eigenmode functions c. j (t) and a residual term r n (t): ; For each eigenmode function component c j (t) is subjected to Hilbert transform to obtain the analytic signal, and then the instantaneous amplitude A is calculated. j (t) and instantaneous frequency ω j (t): ; ; By analyzing the changes in the instantaneous frequencies of the main intrinsic mode function components after a disturbance, the dominant oscillation modes and non-stationary characteristics can be identified.
[0047] (4) Data windowing: For each renewable energy power station participating in the online evaluation, its corresponding three time series ΔP(t), Δf(t), and ROCOF(t) are processed using a synchronous sliding window. Let the window length be T. W =200ms, sliding step size is T s =10ms, each window can form a two-dimensional data matrix X k ∈R L×3 Where L=T W / △t s =25. The three columns of the matrix represent the ΔP(t), Δf(t), and ROCOF(t) values at 25 time points within the window. This matrix X k It will be used as the kth input sample of the neural network model.
[0048] Online evaluation of inertia / damping of new energy sources based on physical constraint neural networks: (1) Model Construction and Network Structure: The physical constraint neural network has been pre-trained offline based on historical simulation data (including various natural conditions and disturbance scenarios). Its structure is as follows: Feature extraction layer: A three-layer one-dimensional convolutional neural network is used, with the input being X. k First layer convolution operation: ; In the formula, * denotes a one-dimensional convolution operation. It is a convolution kernel of size 5. The bias is set to ReLU, and the activation function is ReLU. Max pooling is then performed.
[0049] The second and third layers are similar in structure to the first layer, with convolutional kernel sizes of 3 and 3, and the number of kernels being 128 and 256 respectively. Each layer is followed by a ReLU activation function and max pooling. Finally, the feature map output from the third layer is flattened into a 128-dimensional feature vector h. k .
[0050] Physical parameter calculation layer: a three-layer fully connected network. ; ; .
[0051] Output To ensure that the output physical parameters are positive, an exponential function is used for transformation: .
[0052] Physical relation output layer: Based on the equivalent rotor motion equation of a single machine, the predicted power deviation at the center moment of this window is calculated from the parameters output by the network. ; In the formula, ROCOF (k) and △f (k) Taken from input matrix X k The value at the center moment.
[0053] (2) Loss function and training strategy: A composite loss function is used for training, which consists of two parts: data fitting loss and physical constraint loss. L total =α·L data +β·L physics ; In the formula, α and β are hyperparameters, set to 0.7 and 0.3 respectively; L data The data fitting loss is used to measure the difference between the predicted power deviation and the true value, and the mean squared error is used. .
[0054] L physics The physical constraint loss is used to constrain the network output parameters to satisfy more general physical relationships. Besides the basic rotor motion equations, a requirement for the smoothness of the frequency trajectory is introduced. The acceleration of the frequency trajectory implicitly predicted by the network is calculated and compared with the acceleration of the actual data. First, the predicted frequency trajectory implicitly determined by the network parameters is defined. It is assumed that the frequency deviation within the window is determined by the network parameters and the initial state, and can be approximately expressed as a solution satisfying the motion equations. More directly, the second derivative of the constrained predicted frequency is consistent with the true second derivative obtained through numerical difference. ; In the formula, It can be obtained by taking the second-order differential of the relationship between the network output and input, which forces the network to learn H and D to conform to the second-order dynamic characteristics.
[0055] The model was trained using the Adam optimizer with a learning rate of 10. -4 The batch size is set to 32.
[0056] (3) Online evaluation process: During the online application phase, the model operates in near real-time. Every 50ms of new data received (i.e., accumulating 5 new sliding windows), a forward propagation of the model is triggered, outputting the latest estimated values of the new energy equivalent inertia H(t) and damping parameter D(t). The evaluation results of all monitored new energy power stations are summarized to form a time-varying parameter set {H i (t), Di (t)}, where i represents the i-th new energy power station, which is used for the next step of spatial distribution modeling.
[0057] Construction of an electromechanical wave propagation model with time-varying parameters: This step aims to establish a physical model of a continuous medium that describes the evolution of frequency disturbances in space and time. Its core is a damped wave equation that takes time-varying parameters into account.
[0058] (1) Derivation of electromechanical wave equations: Based on the fundamental principles of electromechanical transient analysis of power systems, starting from the rotor motion equations of synchronous generators, and through the assumption of continuity, the partial differential equations for frequency propagation are derived. First, consider the rotor motion equations of a single generator: ; For the j-th generator, H j Its inertial time constant, Δω j =2π△f j For angular frequency deviation, ΔP mj For the increase in mechanical power, ΔP ej For the increase in electromagnetic power, D j is the damping coefficient.
[0059] To study the propagation of disturbances in the power grid space, the continuous medium assumption is introduced. A one-dimensional continuous chain system is taken as the research object, with spatial coordinates denoted as x. Electrical quantities such as power angle and frequency are regarded as continuous functions of spatial position x and time t, i.e., δ(x,t) and f(x,t).
[0060] Electromagnetic power increment ΔP e This reflects the power exchange between the generator and other parts of the power grid. In the continuum model, this term is related to the gradient of the power angle. Using the Taylor expansion formula and considering the network impedance characteristics, the electromagnetic power increment under the small perturbation assumption can be approximately expressed as: ; In the formula, V is the node voltage amplitude; |Z| is the line impedance magnitude; and θ is the line impedance angle.
[0061] The reactance of a conventional transmission line is much greater than its resistance, therefore the line impedance angle θ is close to 90°. Substituting this relationship into the rotor motion equation and rearranging it, we can obtain the damped wave equation describing the propagation of frequency f(x,t), i.e., the electromechanical wave equation: .
[0062] (2) Calculation of time-varying parameters: The wave velocity c(x,t) and damping coefficient β(x,t) in the above equations are time-varying and spatially related, depending on the distribution of equivalent inertia and damping in the system.
[0063] The time-varying wave velocity c(x,t) reflects the propagation speed of frequency disturbances and mainly depends on the equivalent inertia at the current position. The calculation formula is as follows: ; Where ω0 = 2πf0 is the rated angular frequency of the power grid; H eq (x, t) is the equivalent inertia of spatial location x at time t.
[0064] The time-varying damping coefficient β(x,t) reflects the system's ability to attenuate frequency oscillations, and its calculation formula is as follows: ; In the formula, β'(x,t) is the time-varying damping component provided by the new energy source; β grid The inherent damping of the power grid can be obtained offline based on generator parameters and network topology.
[0065] The formula for calculating the time-varying damping component β'(x,t) of new energy sources is: ; In the formula, D(x, t) represents the equivalent damping of the new energy source at spatial location x at time t.
[0066] (3) Spatial continuous distribution model of inertia and damping: In order to obtain the continuous equivalent inertia H eq The inertia and damping of synchronous generators and new energy power stations, which are discretely distributed in the power grid, need to be distributed to continuous spatial lines. This invention uses a Gaussian distribution model to achieve this purpose.
[0067] Suppose there are N in a one-dimensional chain system g There are 16 power generation units (including synchronous generators and new energy power stations), and the j-th power generation unit is located at spatial coordinate x. j At this point, its equivalent inertia is m. j (t). For new energy power stations, their equivalent inertia m j (t)=H j (t), which is the time-varying value obtained from online evaluation; for synchronous generators, Let h be a fixed value. Then the inertia contribution h of this power generation unit to any point x in space is... j (x, t) is: ; Where σ is the standard deviation of the distribution, used to control the spatial distribution range of inertia, and can be selected based on the average distance between power grid nodes within the range of 5km to 15km. (Coefficient) This is used to scale the Gaussian function so that the spatial integral of the total inertia of the power generation unit is approximately equal to m. j (t).
[0068] Therefore, the equivalent inertia at any point x in space is the sum of the contributions from all power generation units: .
[0069] Similarly, the spatial distribution of the equivalent damping D(x,t) of new energy can also be constructed using the same method, simply by changing m in the above formula. j (t) is replaced with the time-varying damping coefficient D of the new energy power station obtained from the evaluation. j (t) can be used. Through this model, the discrete unit inertia and damping are transformed into continuous functions in space, which can then be directly applied to solve the aforementioned continuous electromechanical wave equations.
[0070] Multi-rate cooperative numerical solution and visualization: (1) Numerical solution of the time-varying coefficient wave equation: The finite difference method is used to solve the above partial differential equation. The spatial domain [0, L] is discretized into N x =400 equidistant grid points, spatial step size Δx = L / N = 1 km; discretize the time domain, with a time step size of Δt = 0.5 ms. Define the discrete grid points (x i , t n ), where x i =i△x,t n =n△t, let ? .
[0071] The above damped wave equation is discretized using the unconditionally stable Crank-Nicolson scheme, which is an implicit scheme that takes an average over time n and n+1. ; In the formula, ; .
[0072] The above discrete equations, after simplification, can be used to obtain information about the unknowns. The system of linear equations: ; In the formula, A n+1 / 2 It is a tridiagonal sparse matrix whose elements depend on time-varying coefficients. and b n,n-1 It is a vector composed of solutions from known time layers n and n-1.
[0073] Each step yields a new frequency distribution f by solving this sparse linear system of equations. n+1 .
[0074] (2) Multi-rate co-simulation mechanism: A circular data buffer with a size of M×N is set up.x Where M=10 (stores data at the 10 most recent parameter update times), N x =400.
[0075] A parameter evaluation process is executed every 50ms to obtain the new parameter pairs at the coordinate points of all new energy power stations at the current moment. Using these new parameters, combined with fixed synchronization machine parameters, and through a Gaussian distribution model, the new parameter distribution vector H at all grid points in the global space is calculated. new and D new And link this pair of vectors together at time t new The data is written to the data buffer. Within each 0.5ms simulation time step, the electromechanical wave equation solving process reads the latest parameters from the buffer for simulation calculations and uses a linear interpolation algorithm to handle the data requirements within the parameter update interval, ensuring the continuity of simulation parameters.
[0076] (3) Risk visualization and quantitative analysis: After the simulation, the three-dimensional data field △f(x) of the frequency deviation is obtained. i , t n Plot a 2D contour map with spatial location x as the horizontal axis, time t as the vertical axis, and color representing the magnitude of Δf. Calculate the gradient magnitude of the spatiotemporal contour map: ; By tracing the maximum value of the gradient magnitude, the propagation trajectory of the disturbance wavefront can be obtained. The frequency-time curve Δf of node p can then be extracted. p (t) and calculate the maximum rate of change of frequency ROCOF. max,p and disturbance arrival time T arrival,p : ; .
[0077] Combining these two indicators, the risk coefficient R is defined. p To quantify the risk level of node p: ; In the formula, λ1 and λ2 are weighting coefficients.
[0078] This coefficient takes into account both the severity of the disturbance and its arrival time, R p Several nodes with higher values were identified as critical control nodes. Finally, the analysis system generated an early warning report containing a list of critical nodes and their risk indices, and could deploy or adjust stability control measures at the critical nodes.
[0079] This invention also relates to a power grid analysis system that takes into account the time-varying inertia of new energy sources, comprising: The data acquisition and processing module is used to acquire power data of new energy power plant grid connection points and frequency data of grid nodes through a wide-area measurement system; calculate the power deviation sequence ΔP(t), frequency deviation sequence Δf(t), and frequency change rate sequence ROCOF(t) with respect to time t; and construct a sliding time window data matrix based on the ΔP(t), Δf(t), and ROCOF(t). The online evaluation module is used to construct a physical constraint neural network model. The sliding time window data matrix is input into the physical constraint neural network model, and the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy are obtained through online evaluation. The physical constraint neural network model is trained offline using a composite loss function. The model building module is used to establish electromechanical wave equations that take into account the time-varying characteristics of new energy sources; then, based on the Gaussian distribution model, the inertia and damping of each power generation unit are continuously distributed in space. The simulation analysis and visualization module is used to discretize and solve the electromechanical wave equations using numerical methods; synchronize data between the solution processes through a multi-rate collaborative mechanism; generate a frequency disturbance propagation spatiotemporal cloud map based on the frequency spatiotemporal distribution data obtained from the numerical solution; and identify the risk propagation path and key control nodes of the frequency disturbance based on the cloud map.
[0080] The preferred power deviation sequence is ΔP(t) = P(t) - P(t0), and the preferred frequency deviation sequence is Δf(t) = f grid (t)-f0, the frequency change rate sequence ROCOF(t)=df grid (t) / dt; In the formula, P(t) represents the grid connection power of the renewable energy power station; t0 is the reference time; f grid (t) represents the power grid frequency; f0 represents the rated power grid frequency.
[0081] The preferred physical constraint neural network model includes a feature extraction layer, a physical parameter calculation layer, and a physical relationship output layer; The feature extraction layer uses a one-dimensional convolutional neural network to process the sliding time window data matrix; The physical parameter calculation layer is used to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source; The physical relation output layer is used to calculate the predicted power deviation ΔP. pred : .
[0082] Preferred composite loss function L total The expression is: L total =α·L data +β·L physics ; In the formula, α and β are weighting coefficients; L data L is the data fitting loss based on the predicted power deviation and the measured power deviation; physics To introduce physical consistency loss due to higher-order frequency derivative constraints; In the composite loss function L data and L physics They are respectively: ; ; In the formula, N is the number of data samples; This is the second derivative of the frequency predicted based on the network output parameters.
[0083] The preferred expression for the electromechanical wave equation, taking into account the time-varying characteristics of new energy sources, is: ; In the formula, f is the frequency; x is the spatial coordinate; β grid The inherent damping of the power grid; ; ; In the formula, ω0 is the rated angular frequency of the power grid; V is the node voltage amplitude; |Z| is the line impedance magnitude; H sync This represents the inertia of the synchronous generator.
[0084] The expression for the preferred inertial distribution Gaussian model is: For a space coordinate x j The j-th power generation unit has an equivalent inertia of m. j (t) The inertia contribution h formed at point x in space j (x, t) is: ; Where σ is the standard deviation of the distribution; The total equivalent inertia h at point x in space eq The sum of contributions from all power generation units.
[0085] The preferred multi-rate cooperative mechanism is as follows: A data buffer is established. The online parameter evaluation process writes the evaluated H(t) and D(t) into the buffer at a relatively long period, while the electromechanical wave equation solving process reads the parameters from the buffer at a short period. When there are no parameters that correspond exactly at the simulation time, a linear interpolation algorithm is used to calculate the required parameters.
[0086] The process of identifying key control nodes includes: Extract the frequency timing curves Δf of each node p (t); Calculate the maximum rate of change of frequency (ROCOF) at each node. max,p and disturbance arrival time T arrival,p And calculate the node risk index R. p : ; In the formula, λ1 and λ2 are weighting coefficients; Nodes whose risk indicators exceed a given threshold are identified as critical control nodes.
[0087] The present invention also relates to a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of the above-described power grid analysis method taking into account the time-varying inertia of new energy sources.
[0088] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of the application as defined herein, and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Thus, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.
Claims
1. A power grid analysis method considering the time-varying inertia of new energy sources, characterized in that, include: Power data from the grid connection points of new energy power plants and frequency data from grid nodes are collected, and the power deviation sequence ΔP(t), frequency deviation sequence Δf(t), and frequency change rate sequence ROCOF(t) with respect to time t are calculated. Based on ΔP(t), Δf(t), and ROCOF(t), a sliding time window data matrix is constructed. A physical constraint neural network model is constructed, and the sliding time window data matrix is input into the physical constraint neural network model to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source through online evaluation. Based on the time-varying inertia parameter H(t) and damping parameter D(t) of new energy, the physical constraint neural network model is trained offline using a composite loss function; an electromechanical wave equation considering the time-varying characteristics of new energy is established. Next, based on the Gaussian distribution model, the inertia and damping of each power generation unit are described in a continuous spatial distribution. Numerical methods are used to discretize and solve the electromechanical wave equations; data synchronization between the solution processes is achieved through a multi-rate collaborative mechanism; based on the frequency spatiotemporal distribution data obtained from the numerical solution, a spatiotemporal cloud map of frequency disturbance propagation is generated, and risk propagation paths and key control nodes of frequency disturbances are identified based on this cloud map.
2. The power grid analysis method considering the time-varying inertia of new energy sources according to claim 1, characterized in that, Power deviation sequence ΔP(t) = P(t) - P(t0), frequency deviation sequence Δf(t) = f grid (t)-f0, the frequency change rate sequence ROCOF(t)=df grid (t) / dt; In the formula, P(t) represents the grid connection power of the renewable energy power station; t0 is the reference time; f grid (t) represents the power grid frequency; f0 represents the rated power grid frequency.
3. The power grid analysis method considering the time-varying inertia of new energy sources according to claim 1, characterized in that, The physical constraint neural network model includes a feature extraction layer, a physical parameter calculation layer, and a physical relation output layer; The feature extraction layer uses a one-dimensional convolutional neural network to process the sliding time window data matrix; The physical parameter calculation layer is used to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source; The physical relation output layer is used to calculate the predicted power deviation ΔP. pred : 。 4. The power grid analysis method considering the time-varying inertia of new energy sources according to claim 1, characterized in that, Composite loss function L total The expression is: L total =α·L data +β·L physics ; In the formula, α and β are weighting coefficients; L data L is the data fitting loss based on the predicted power deviation and the measured power deviation; physics To introduce physical consistency loss due to higher-order frequency derivative constraints; In the composite loss function L data and L physics They are respectively: ; ; In the formula, N is the number of data samples; This is the second derivative of the frequency predicted based on the network output parameters.
5. The power grid analysis method considering the time-varying inertia of new energy sources according to claim 1, characterized in that, The expression for the electromechanical wave equation that takes into account the time-varying characteristics of new energy sources is: ; In the formula, f is the frequency; x is the spatial coordinate; β grid The inherent damping of the power grid; ; ; In the formula, ω0 is the rated angular frequency of the power grid; V is the node voltage amplitude; |Z| is the line impedance magnitude; H sync This represents the inertia of the synchronous generator.
6. The power grid analysis method considering the time-varying inertia of new energy sources according to claim 1, characterized in that, The expression for the Gaussian model of inertial distribution is: For a space coordinate x j The j-th power generation unit has an equivalent inertia of m. j (t) The inertia contribution h formed at point x in space j (x, t) is: ; Where σ is the standard deviation of the distribution; The total equivalent inertia h at point x in space eq The sum of contributions from all power generation units.
7. The power grid analysis method considering the time-varying inertia of new energy sources according to claim 1, characterized in that, The multi-rate coordination mechanism is as follows: A data buffer is established. The online parameter evaluation process writes the evaluated H(t) and D(t) into the buffer at a relatively long period, while the electromechanical wave equation solving process reads the parameters from the buffer at a short period. When there are no parameters that correspond exactly at the simulation time, a linear interpolation algorithm is used to calculate the required parameters.
8. The power grid analysis method considering the time-varying inertia of new energy sources according to claim 1, characterized in that, The process of identifying key control nodes includes: Extract the frequency timing curves Δf of each node p (t); Calculate the maximum rate of change of frequency (ROCOF) at each node. max,p and disturbance arrival time T arrival,p And calculate the node risk index R. p : ; In the formula, λ1 and λ2 are weighting coefficients; Nodes whose risk indicators exceed a given threshold are identified as critical control nodes.
9. A power grid analysis system that takes into account the time-varying inertia of new energy sources, characterized in that, include: The data acquisition and processing module is used to collect power data of the grid connection point of the new energy power plant and frequency data of the grid node, and calculate the power deviation sequence ΔP(t), frequency deviation sequence Δf(t) and frequency change rate sequence ROCOF(t) with respect to time t; based on ΔP(t), Δf(t), and ROCOF(t), a sliding time window data matrix is constructed. The online evaluation module is used to construct a physical constraint neural network model. The sliding time window data matrix is input into the physical constraint neural network model to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source through online evaluation. Based on the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source, the physical constraint neural network model is trained offline using a composite loss function. The model building module is used to establish electromechanical wave equations that take into account the time-varying characteristics of new energy sources; then, based on the Gaussian distribution model, the inertia and damping of each power generation unit are continuously distributed in space. The simulation analysis and visualization module is used to discretize and solve the electromechanical wave equations using numerical methods; synchronize data between the solution processes through a multi-rate collaborative mechanism; generate a frequency disturbance propagation spatiotemporal cloud map based on the frequency spatiotemporal distribution data obtained from the numerical solution; and identify the risk propagation path and key control nodes of the frequency disturbance based on the cloud map.
10. The power grid analysis system considering the time-varying inertia of new energy sources according to claim 9, characterized in that, Power deviation sequence ΔP(t) = P(t) - P(t0), frequency deviation sequence Δf(t) = f grid (t)-f0, the frequency change rate sequence ROCOF(t)=df grid (t) / dt; In the formula, P(t) represents the grid connection power of the renewable energy power station; t0 is the reference time; f grid (t) represents the power grid frequency; f0 represents the rated power grid frequency.
11. The power grid analysis system considering the time-varying inertia of new energy sources according to claim 9, characterized in that, The physical constraint neural network model includes a feature extraction layer, a physical parameter calculation layer, and a physical relation output layer; The feature extraction layer uses a one-dimensional convolutional neural network to process the sliding time window data matrix; The physical parameter calculation layer is used to obtain the time-varying inertia parameter H(t) and damping parameter D(t) of the new energy source; The physical relation output layer is used to calculate the predicted power deviation ΔP. pred : 。 12. The power grid analysis system considering the time-varying inertia of new energy sources according to claim 9, characterized in that, Composite loss function L total The expression is: L total =α·L data +β·L physics ; In the formula, α and β are weighting coefficients; L data L is the data fitting loss based on the predicted power deviation and the measured power deviation; physics To introduce physical consistency loss due to higher-order frequency derivative constraints; In the composite loss function L data and L physics They are respectively: ; ; In the formula, N is the number of data samples; This is the second derivative of the frequency predicted based on the network output parameters.
13. The power grid analysis system considering the time-varying inertia of new energy sources according to claim 9, characterized in that, The expression for the electromechanical wave equation that takes into account the time-varying characteristics of new energy sources is: ; In the formula, f is the frequency; x is the spatial coordinate; β grid The inherent damping of the power grid; ; ; In the formula, ω0 is the rated angular frequency of the power grid; V is the node voltage amplitude; |Z| is the line impedance magnitude; H sync This represents the inertia of the synchronous generator.
14. The power grid analysis system considering the time-varying inertia of new energy sources according to claim 9, characterized in that, The expression for the Gaussian model of inertial distribution is: For a space coordinate x j The j-th power generation unit has an equivalent inertia of m. j (t) The inertia contribution h formed at point x in space j (x, t) is: ; Where σ is the standard deviation of the distribution; The total equivalent inertia h at point x in space eq The sum of contributions from all power generation units.
15. The power grid analysis system considering the time-varying inertia of new energy sources according to claim 9, characterized in that, The multi-rate coordination mechanism is as follows: A data buffer is established. The online parameter evaluation process writes the evaluated H(t) and D(t) into the buffer at a relatively long period, while the electromechanical wave equation solving process reads the parameters from the buffer at a short period. When there are no parameters that correspond exactly at the simulation time, a linear interpolation algorithm is used to calculate the required parameters.
16. The power grid analysis system considering the time-varying inertia of new energy sources according to claim 9, characterized in that, The process of identifying key control nodes includes: Extract the frequency timing curves Δf of each node p (t); Calculate the maximum rate of change of frequency (ROCOF) at each node. max,p and disturbance arrival time T arrival,p And calculate the node risk index R. p : ; In the formula, λ1 and λ2 are weighting coefficients; Nodes whose risk indicators exceed a given threshold are identified as critical control nodes.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the power grid analysis method that takes into account the time-varying inertia of new energy sources as described in any one of claims 1 to 8.