A frequency prediction method for grid-connected new energy system based on Kupfmann energy correction

CN122931816APending Publication Date: 2026-10-16HOHAI UNIV +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611036103.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0006]针对现有频率预测方法难以有效量化各节点频率支撑强度差异和提升关键节点预测精度的技术问题,本发明提供了一种基于库普曼能量修正的新能源并网系统频率预测方法,本发明能够准确辨识各节点局部分量的不同振荡特征,量化各节点频率支撑强度,并通过Koopman能量修正注意力机制,提升了关键节点的频率预测精度,为后续计及节点空间分布差异特征的频率稳定分析提供了技术支撑

Benefits of technology

[0128] 1. This invention extracts and identifies node frequency difference features based on improved Pearson similarity and MVMD, which can effectively identify the different oscillation features of local components of each node during transient processes. This provides a feature basis for subsequent frequency prediction that takes into account the differences in node spatial distribution. It solves the problems of existing methods that are difficult to effectively decouple the global and local relative oscillation components in transient frequency response and cannot accurately identify the different oscillation features of local components of each node.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122931816A_ABST
    Figure CN122931816A_ABST
Patent Text Reader

Abstract

The application discloses a new energy grid-connected system frequency prediction method based on Koopman energy correction. The technical scheme comprises the following steps: S1, constructing a global component screening model based on improved Pearson similarity; S2, constructing a Koopman energy matrix reflecting the spatial distribution characteristics of the system; S3, taking the Koopman energy corresponding to the dominant IMF characteristic component of each node as a characteristic index for quantifying the frequency support ability of different nodes; S4, constructing a GAT node spatial feature extraction module fused with a Koopman energy correction attention mechanism; S5, constructing a time series frequency prediction module based on LSTM; S6, verifying the effectiveness and superiority of the GAT-LSTM frequency prediction method based on the Koopman energy correction attention mechanism under different new energy penetration rates. The application provides technical support for subsequent frequency stability analysis considering the node spatial distribution difference characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of transient frequency stability analysis technology for power systems, and in particular to a frequency prediction method for new energy grid-connected systems based on Koopman energy correction. Background Technology

[0002] With the increasing penetration of new energy sources, the spatial distribution characteristics of power system frequency response are becoming increasingly prominent. How to accurately predict the frequency after disturbances while taking into account spatial distribution differences has become crucial for ensuring the safe operation of low-inertia power systems.

[0003] Traditional online frequency security analysis methods mainly fall into two categories: time-domain simulation and equivalent model methods. The former establishes a full-state model of the power system and uses numerical integration to solve for the frequency response. This method offers high accuracy, but its computation time increases significantly with system scale, making it difficult to meet the real-time requirements of online analysis. The latter approximates the detailed system model, treating multi-machine systems as equivalent to single-machine models, such as average system frequency models and system frequency response models. This method offers fast computation but struggles to accurately describe the spatial distribution characteristics of the frequency response. With the large-scale integration of renewable energy sources, system inertia decreases, making it difficult to balance computational speed and accuracy in scenarios with a high proportion of renewable energy. Furthermore, renewable energy units connected to the grid via converters exhibit fundamentally different dynamic characteristics compared to synchronous generators, making it difficult to accurately characterize their dynamic response process. Therefore, there is an urgent need to develop new frequency prediction methods suitable for new power systems.

[0004] In recent years, with the widespread adoption of synchronous phasor measurement devices and wide-area measurement systems, real-time acquisition of power system transient process operation data has been achieved, laying a data foundation for data-driven transient stability analysis methods. Against this backdrop, frequency prediction methods based on deep learning have gradually become a research hotspot. Existing deep learning frequency prediction models, such as the standard graph attention network where attention weights are adaptively determined by node features, while considering the influence of spatial distribution structure, struggle to extract frequency support strength information from response data. This makes it difficult to effectively distinguish the degree of difference between nodes and accurately identify weak nodes. Therefore, under the background of high-proportion renewable energy integration, further research on deep learning frequency prediction models is needed, taking into account the spatial distribution differences in frequency response, to improve the early warning capability for the risk of frequency exceeding limits at weak nodes.

[0005] How to solve the above-mentioned technical problems is the challenge facing this invention. Summary of the Invention

[0006] To address the technical problem that existing frequency prediction methods struggle to effectively quantify the differences in frequency support strength among nodes and improve the prediction accuracy of key nodes, this invention provides a frequency prediction method for new energy grid-connected systems based on Koopman energy correction. This invention can accurately identify the different oscillation characteristics of local components of each node, quantify the frequency support strength of each node, and improve the frequency prediction accuracy of key nodes through the Koopman energy correction attention mechanism, providing technical support for subsequent frequency stability analysis that takes into account the differences in the spatial distribution of nodes.

[0007] The inventive concept of this invention is as follows: This invention provides a frequency prediction method for new energy grid-connected systems based on Koopman energy correction. This method integrates frequency difference feature decomposition and deep learning for dynamic frequency prediction of high-proportion new energy power systems. It addresses the technical problem that existing frequency prediction methods are unable to effectively quantify the differences in frequency support strength of each node and improve the prediction accuracy of key nodes. First, a global component screening model based on improved Pearson similarity and a local oscillation component identification model based on multivariate variational mode decomposition (MVMD) are constructed to achieve accurate decomposition of the frequency difference features of each node. Second, based on the intrinsic mode function (IMF) components obtained from the local component decomposition of each node, a subspace dynamic mode decomposition algorithm is used to extract low-dimensional Koopman linear operators representing the evolution process before and after, and a Koopman energy matrix is ​​constructed. Third, the dominant IMF feature components of each node are screened, and their Koopman energy is used as a feature index to quantify the strength of the node's frequency support capability. Fourth, a node spatial feature extraction module of a graph attention network (GAT) integrating a Koopman energy-corrected attention mechanism is constructed. Fifth, a time-series frequency prediction module based on a long short-term memory (LSTM) network is constructed, which together form the GAT-LSTM frequency prediction framework. Finally, the effectiveness and superiority of the proposed method in power system frequency prediction are verified. This invention can accurately identify the different oscillation characteristics of local components of each node, quantify the frequency support strength of each node, and improve the frequency prediction accuracy of key nodes through the Koopman energy correction attention mechanism, providing technical support for subsequent frequency stability analysis that takes into account the differences in the spatial distribution of nodes.

[0008] To achieve the above-mentioned objectives, the present invention employs the following technical solution: a frequency prediction method for a new energy grid-connected system based on Koopman energy correction, comprising the following steps:

[0009] S1. Construct a global component screening model based on improved Pearson similarity. By calculating the improved Pearson similarity index between the frequency curves of each node, select the node with the highest overall similarity with other nodes as the reference node and use its frequency response as the global reference component. On this basis, construct a local relative oscillation component identification model based on MVMD. Introduce a unified oscillation center constraint and use the Alternating Direction Method of Multipliers (ADMM) to iteratively solve the variational optimization problem, decomposing the local relative oscillation component of each node into several IMF components with different oscillation centers.

[0010] S2. Based on the local IMF components of each node, the low-dimensional approximate Koopman linear operator in the process before and after the evolution of the local IMF components of each node is extracted using the Subspace Dynamic Mode Decomposition (Sub-DMD) algorithm. A Koopman energy matrix that can reflect the spatial distribution characteristics of the system is constructed to quantify the degree of energy dissipation of each node after the disturbance.

[0011] S3. Rearrange the elements in the Koopman energy matrix according to nodes and IMF components, compare the Koopman energy of multiple IMF components of each node, select the IMF component with the largest Koopman energy of each node as the dominant IMF feature component, and use the Koopman energy corresponding to the dominant IMF feature component of each node as the feature index for quantifying the strength of frequency support capability of different nodes.

[0012] S4. Construct a GAT node spatial feature extraction module that integrates the Koopman energy correction attention mechanism. Introduce the Koopman energy of each node’s dominant IMF component as a priori weight into the attention coefficient calculation, correct the attention weight of the standard GAT, and enhance the model’s attention to nodes with weak frequency support.

[0013] S5. Construct a time-series frequency prediction module based on Long Short-Term Memory Network (LSTM). Use the spatial feature matrix sequence extracted by GAT and fused with Koopman energy correction as the input of LSTM to capture the time-series evolution characteristics of the frequency response of each node, construct the GAT-LSTM frequency prediction framework, and realize the prediction of the dynamic trajectory of the frequency of multiple nodes after perturbation.

[0014] S6. Verify the effectiveness and superiority of the GAT-LSTM frequency prediction method based on the Koopman energy correction attention mechanism under different new energy penetration rates.

[0015] Further, in step S1, a spatial similarity matrix R based on the Pearson correlation coefficient is constructed, and the Pearson similarity coefficient between node i and node j is:

[0016]

[0017] In the formula, Let σ be the covariance of the frequency signals at node i and node j, and σ be the corresponding standard deviation. express and The Pearson correlation coefficient between them, and Same meaning; This represents the covariance between the signals of node i and node j; This represents the standard deviation of the frequency signal at node i; This represents the standard deviation of the frequency signal at node j; The range of values ​​is ,like If >0, the frequency signals of nodes i and j are positively correlated and show the same trend; if If the frequency signals of nodes i and j tend to 1, then the frequency signals of nodes i and j are strongly positively correlated and have a very high degree of similarity; if <0, the frequency signals of nodes i and j are negatively correlated and have opposite trends; if If = 0, then the frequency signals of nodes i and j have no linear correlation. Let N represent the Pearson correlation coefficient between the frequency curves of node i and node j, and N be the number of nodes in the system. Further, Euclidean distance is introduced to measure the amplitude consistency of the frequency curves between nodes. The Euclidean distance between node i and node j is:

[0018]

[0019] In the formula, Let represent the norm of the difference in frequency curves between node i and node j. This represents the Euclidean distance between node i and node j. ; The summation symbol indicates that t is summed from 1 to T.

[0020] Construct an improved Pearson similarity index that comprehensively considers both shape similarity and amplitude consistency:

[0021]

[0022] In the formula, the first term is the average Pearson correlation coefficient of node i with all other nodes, which characterizes the similarity of waveform trends; the larger the value, the more consistent the shapes. The second term is the average Euclidean distance of node i, which measures the magnitude of amplitude deviation; the smaller the value, the closer the amplitudes. These are weighting coefficients used to balance the contributions of the two terms. It reflects the degree of correlation among all nodes. The larger the value, the stronger the similarity of the frequency response of that node among the nodes, and the more consistent it is with other nodes in terms of shape and amplitude.

[0023] To select the most globally consistent reference nodes and global reference components, this invention selects an improved Pearson similarity index. The largest node m is used as the reference node, and the frequency response of that node is... As a global reference component, the local relative oscillation components of each node are obtained by subtracting the frequency signal of the reference node m from the frequency signal of each node:

[0024]

[0025] In the formula, It is the frequency signal of node i. This refers to the local relative oscillation component of node i. In summary, this section proposes a global component selection method based on an improved Pearson similarity, and further introduces an index to quantify the spatial similarity of the frequency response of each node. This enables the filtering of reference nodes and the extraction of global components.

[0026] Furthermore, in step S1, MVMD (Multivariate Variational Mode Decomposition) jointly decomposes the local relative oscillation components of N nodes into K IMF components, and establishes the following variational constraint optimization problem by introducing a unified oscillation center constraint:

[0027]

[0028] In the formula, This represents the k-th IMF component derived from the n-th node. This represents the time-domain signal of the k-th IMF component decomposed from the n-th node. This indicates that the result is obtained through the Hilbert transform. The analyzed signal contains amplitude and phase information. The analytical signals of each IMF component at each node The corresponding multi-node spectral matrix is ​​along its common oscillation center. The oscillation center is moved to zero frequency. This represents the local relative oscillation component of the nth node. n is the node index, n = 1, 2, ..., N. k is the index of the IMF component, k = 1, 2, ..., K, where K represents the number of IMF components obtained from the multivariate variational mode decomposition. This represents the summation over k. N is the total number of nodes in the power system. This represents the summation over n, where n = 1, 2, ..., N. `st` represents the constraint condition. This represents the oscillation center frequency corresponding to the nth node. represents the square of the L2 norm, used to measure the bandwidth of a signal. , denotes the partial derivative, where j is the imaginary unit.

[0029] To facilitate solving this constrained optimization problem, the augmented Lagrangian method is used:

[0030]

[0031] In the formula, This represents the augmented Lagrange function. Represents the set of all IMF components. This represents the set of all oscillation center frequencies. Denotes the Lagrange multiplier of the nth node. It is a punishment factor. This represents the inner product form of Lagrange multipliers, used to handle constraints. Let represent the Lagrange multiplier function of the nth node.

[0032] The frequency domain update formula for each node's IMF component is as follows:

[0033]

[0034] In the formula, This represents the frequency domain representation of the k-th IMF component of the n-th node after the (m+1)-th iteration. The superscript m+1 indicates the iteration number, and ^ represents the frequency domain signal after the Fourier transform. Represents angular frequency. Represents the local relative oscillation component of the nth node. The frequency domain representation of . Let i represent the sum of the frequency domain values ​​of all IMF components except for the k-th IMF component at the n-th node, where i is the IMF index, i = 1, 2, ..., K, and i ≠ k. Let represent the Lagrange multiplier corresponding to the nth node, excluding the kth IMF component. This represents half of the Lagrange multiplier corresponding to the kth IMF component of node n; This represents the oscillation center frequency of the k-th IMF component at the m-th iteration. The superscript m indicates the iteration number, which is shared by all nodes. .

[0035] The update formula for the oscillation center in the frequency domain is:

[0036]

[0037] In the formula, It represents the updated oscillation center frequency of the k-th IMF component at the (m+1)-th iteration. This indicates the search for the element that minimizes the objective function. value. This represents the integral over the frequency from 0 to infinity. This represents the corresponding energy spectral density.

[0038] The Lagrange multiplier update formula is:

[0039]

[0040] In the formula, Let represent the frequency domain representation of the Lagrange multiplier corresponding to the nth node in the (m+1)th iteration. Let represent the frequency domain representation of the Lagrange multiplier corresponding to the nth node in the mth iteration. This represents the update step size of the Lagrange multiplier. This represents the frequency domain representation of the target signal at the nth node. This represents the frequency domain representation of the nth node and the kth IMF component after the (m+1)th iteration. It is the frequency domain representation of the reconstruction error.

[0041] Until the convergence condition is met:

[0042]

[0043] In the formula, This represents the frequency domain representation of the nth node and the kth IMF component at the (m+1)th iteration. This represents the frequency domain representation of the nth node and the kth IMF component at the mth iteration. This represents the convergence error.

[0044] Furthermore, in step S2, the k local IMF components of the N nodes of the power system are stacked sequentially to form the observation vector at time t:

[0045]

[0046] In the formula, Let represent the observation vector at time t, with dimension . , each component This observation vector is used to characterize the differences in local dynamic response of different nodes under different oscillation characteristics.

[0047] Using Sub-DMD, an initial augmented observation matrix is ​​constructed within a time window of length m. and time-shifted augmented observation matrix :

[0048]

[0049]

[0050]

[0051] In the formula, , Characterizes the local dynamic features of each node's local IMF components in the previous stage of evolution. It characterizes the local dynamic features of the later stage of its evolution.

[0052] To ensure that the evolution of the IMF components at each node in the Koopman space remains approximately linear, a linear mapping relationship needs to be established between the observation matrices of the local IMF components at each node after time stacking. This linear mapping relationship essentially reflects the evolution of the local frequency dynamics of each IMF component at each node from one stage to the next under a specific perturbation scenario. The optimal Koopman low-dimensional approximation operator is solved using the least squares method.

[0053]

[0054] This formula aims to find an optimal linear operator. , making The result obtained by linear mapping As close as possible , The optimal linear approximation evolution law of each node and each IMF component from the previous stage to the next stage under a specific perturbation scenario is described. By taking the derivative and setting its partial derivative to zero, we can obtain the optimal solution:

[0055]

[0056] In the formula, Described arrive The optimal linear transformation, when Acting on At that time, linear fitting :

[0057]

[0058] In the formula, In a geometric sense, it can be regarded as exist The orthogonal projection on the spanned space is introduced by the orthogonal projection operator. The operator In a geometric sense, this represents projecting any matrix onto a matrix formed by... The subspace spanned by the row vectors Above, only retain The middle can be The explained component represents the local dynamic response of each node's IMF component in the next stage of evolution, which can be explained by the local dynamic characteristics of each node's IMF component in the previous stage of evolution. In other words, it represents the component in the next stage of evolution of each node's IMF component that can be linearly explained by the previous stage. linear fitting It can be represented as The projection result is defined as an orthogonal projection matrix. :

[0059]

[0060] In the formula, yes exist The orthogonal projection results on the surface represent the main components that can be explained by the local dynamic features of the previous stage in the process of evolution of each IMF component at each node before and after.

[0061] To further extract the orthogonal projection matrix The main dynamic characteristics in the model reduce the computational complexity of subsequent Koopman linear operator solutions, thereby reducing the computational load. This requires adjusting the orthogonal projection matrix. Perform Singular Value Decomposition (SVD):

[0062]

[0063] In the formula, for The left singular vector; for The right singular vector; for The singular value matrix represents the magnitude and intensity of energy.

[0064] definition and They are respectively The former Row submatrix and post Row submatrix, therefore, the observation matrix block that perturbs the initial IMF components. It can be approximated by a finite-dimensional matrix Observation matrix block with perturbation time-shifted IMF components Establishing a linear mapping relationship, the finite-dimensional linear operators in the process before and after the evolution of local IMF components... It can be represented as:

[0065]

[0066] In the formula, It is the original infinite-dimensional random Koopman operator A finite-dimensional approximation. For Perform a second singular value decomposition to obtain Substitute it into the formula And use the least squares method to apply the formula By solving this problem, a low-dimensional approximate matrix can be obtained. :

[0067]

[0068] In the formula, This represents the low-dimensional approximate linear operator in the process of perturbation evolution of each node and each IMF component.

[0069] For low-dimensional approximation matrices Perform eigenvalue decomposition:

[0070]

[0071] In the formula, Each column All for eigenvectors, for The matrix formed by the eigenvectors of , It is the eigenvalue corresponding to the eigenvector The resulting diagonal matrix contains eigenvalues, each corresponding to a Koopman mode. This primarily characterizes the evolution of the i-th Koopman mode, composed of the IMF components of each node, over time. The magnitude of the eigenvalues... Reflecting the decay / growth trend of this Koopman mode, This indicates that the mode gradually decays after the disturbance. This indicates that the mode continues to oscillate. This indicates that the modes exhibit a divergent trend. Eigenvectors This represents the degree of spatial participation of the k-th IMF component of the i-th Koopman mode node n in the process before and after evolution. That is, the intensity of excitation of the Koopman mode by different IMF components of different nodes. The larger the value, the stronger the excitation of the Koopman mode by the IMF component. If it is close to zero, it means that the node hardly participates in the oscillation of the Koopman mode.

[0072] To quantify the total energy dissipation of each node and each IMF component across all Koopman system modes, a system mode matrix is ​​further defined based on the eigenvalue decomposition results. and mode energy matrix ,Depend on and The combination yields the system Koopman energy matrix, which characterizes the energy dissipation of each IMF component at each node. :

[0073]

[0074]

[0075]

[0076] In the formula, The spatial distribution characteristics of energy are determined by its elements. It characterizes the participation degree of each IMF component of different nodes under the i-th Koopman mode; This determines the magnitude of the energy of each IMF component at different nodes. Each element in the equation represents the degree of Koopman energy contribution of each local IMF component of the node under the i-th Koopman mode. Each element can be understood as the degree of Koopman energy dissipation of different IMF components of each node. The weaker the support capability of a node, the more sensitive it is to frequency disturbances. The higher the degree of energy dissipation after the disturbance, the larger the corresponding Koopman energy value.

[0077] Furthermore, in step S3, in order to identify which local IMF component plays a dominant role in each node, it is necessary to process the obtained energy matrix. The inner elements are rearranged in the energy matrix. In the middle, the first The column represents the local components of node n. The magnitude of the Koopman energy component. The Koopman energy matrix of each node and each IMF component after rearrangement can be obtained. abbreviated as :

[0078] (26)

[0079] In the formula, rows represent the energy of the same IMF component at each node, and columns represent the energy of k IMF components at the same node. The first row... The second line represents the IMF1 components from the 1st node to the Nth node. This represents the IMF2 components from the 1st node to the Nth node. This represents the IMFk components from the 1st node to the Nth node.

[0080] To identify the dominant IMF component among the local components of each node after perturbation, it is necessary to compare the energy of the k IMF components of each node. A higher Koopman energy indicates a more significant contribution of that IMF component to the node's energy evolution after perturbation. The component with the highest energy at each node is the dominant IMF component. Let the Koopman energy of the dominant IMF component of node N be... For example, the Koopman energy corresponding to the dominant IMF component of node N is The corresponding index of the dominant IMF component is .

[0081] Further, in step S4, in the graph attention network, the power system adjacency matrix A represents the topological relationship between nodes, and the original attention coefficients of the c-th head at the l-th layer between node i and node j are:

[0082]

[0083]

[0084] For node i's neighbor node j, let its dominant IMF component's Koopman energy be... The Koopman energy of the dominant IMF component of node j As the weights of the attention coefficients of the neighboring nodes of the corrected node i, the corrected attention coefficients As shown in the following formula:

[0085]

[0086] In the formula, These are the learnable parameters of the c-th attention head in the l-th layer. The loss function is calculated by outputting the prediction frequency, and the backpropagation process will automatically optimize and update them according to the prediction error gradient.

[0087] The new output feature of node i, which incorporates the spatial features of its neighboring nodes, can then be represented as:

[0088]

[0089] In the formula, It is an activation function; Let i represent the set of neighboring nodes of node i.

[0090] The first layer of GAT concatenates the feature vectors obtained through c-head attention, resulting in:

[0091]

[0092] In the formula: Let be the attention coefficient of node j to node i under the c-th attention mechanism; Let be the learnable weight matrix of the input features under the c-th attention mechanism.

[0093] The second layer of GAT achieves feature aggregation by averaging the outputs of each head, fusing multi-scale attention information while maintaining the feature dimensionality unchanged. The feature averaging is as follows:

[0094]

[0095] The final output is a node feature matrix H that integrates spatial distribution features.

[0096] Furthermore, in step S5, the output feature matrix of the GAT layer at time t is... , characteristic matrix sequence As input to the LSTM, further feature extraction is performed in the time dimension. The LSTM network consists of multiple LSTM units, each containing three gate structures and a cell state. These gates are forget gates. Input gate and output gate It is used to control whether to update, forget, and output frequency response characteristics.

[0097] Input gate Its function is to determine whether the frequency change characteristics of a node after a perturbation at the current moment are useful, that is, to decide whether to accept new input features. :

[0098]

[0099] In the formula, Let W represent the input features at time step t, the input of the LSTM unit; the weight matrix W describes the weight relationship between the input and output units. The input data at the current moment To the input gate The weight matrix; It is the hidden state from the previous moment. To the input gate The weight matrix; It represents the hidden state of the previous time step, reflecting the memory information of historical perturbation responses; h represents the number of hidden units; the bias term b is a constant term. It is the bias vector of the input gate.

[0100] Forgotten Gate Deciding whether to retain the response features from the previous perturbation moment, that is, determining which historical features from the past are still important for the current prediction, retains the important ones and forgets the unimportant ones, as follows:

[0101]

[0102] In the formula, Input data at the current moment To the Gate of Oblivion The weight matrix; It is the hidden state from the previous moment. To the Gate of Oblivion The weight matrix; It is the bias vector of the forget gate.

[0103] Output gate Controlling cell state Which information is used for output frequency prediction at the current moment, i.e., deciding whether to use the current cell state for the output of the LSTM unit. :

[0104]

[0105] In the formula, , is the input at the current moment To the output gate The weight matrix; It is the hidden state at the previous time step t-1. To the output gate The weight matrix; is the bias vector of the output gate; is the activation function.

[0106] Cell state Responsible for preserving and transmitting the network's long-term memory when processing frequency-time series data, corresponding to the long-term retention of historical perturbation trends and propagation paths, based on the cell state at the previous time step. and the current state of candidate cells Decide:

[0107]

[0108] In the formula, It is the bias vector; and These are the hidden states from the previous moment. and the input data at the current time The weight matrix.

[0109] Input gate This determines how to update the candidate cell state at the current moment. Forgotten Gate This determines which information is discarded from the cell state. Cell state Updated to:

[0110]

[0111] In the formula, This represents the Hadamard product, which is the product of corresponding elements.

[0112] The output gate controls which information from the cell state will be output. It will output the cell state. The value is passed to the tanh function and then multiplied by the output gate value to obtain the output of the LSTM unit. :

[0113]

[0114] In the formula, At the current t-th time step, combined with the current input With historical status The generated hidden state output incorporates the current perturbation response characteristics and the evolution trend of the perturbation sequence.

[0115] The input feature set is The matrix dimension is The output feature quantity is The output of LSTM Linear mapping to the predicted time step via a fully connected layer Above, the output matrix dimension is .

[0116] The output features of the GAT-LSTM model are:

[0117]

[0118] In the formula, This indicates the first time step of the prediction. This indicates the second time step in the prediction. This indicates the last time step in the prediction.

[0119] Furthermore, in step S6, based on the improved IEEE 39-node system including wind turbines and photovoltaic units, computational examples are performed in two scenarios with new energy penetration rates of 14.36% and 38.97%, respectively; the mean absolute error (MAE), mean percentage error (MAPE), and root mean square error (RMSE) are used as evaluation indicators.

[0120] MAE is used to measure the mean absolute error between predicted and actual values. It calculates the average of the absolute values ​​of the prediction error.

[0121]

[0122] In the formula, n is the number of samples. This is the actual value. This is a predicted value.

[0123] MAPE is the percentage form of MAE, used to express the proportion of prediction error to the actual value. It measures the magnitude of the error relative to the actual value, making the errors more comparable.

[0124]

[0125] RMSE is more sensitive to both large and small errors because it is the square root of the squared error. Larger errors will have a greater impact on RMSE and can well reflect the precision of the assessment.

[0126] .

[0127] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0128] 1. This invention extracts and identifies node frequency difference features based on improved Pearson similarity and MVMD, which can effectively identify the different oscillation features of local components of each node during transient processes. This provides a feature basis for subsequent frequency prediction that takes into account the differences in node spatial distribution. It solves the problems of existing methods that are difficult to effectively decouple the global and local relative oscillation components in transient frequency response and cannot accurately identify the different oscillation features of local components of each node.

[0129] 2. This invention relates to GAT-LSTM frequency dynamic prediction based on Koopman energy-corrected attention mechanism. By utilizing the Koopman energy of each node's dominant IMF component to correct the attention mechanism in GAT, the model's weight allocation to nodes with weak frequency support is enhanced. Furthermore, by combining the LSTM network to capture the temporal evolution characteristics of the frequency response, a GAT-LSTM prediction model with Koopman energy correction is constructed, thereby improving the accuracy of frequency prediction for key nodes and effectively identifying weak nodes. This solves the problem that existing data-driven frequency prediction methods based on deep learning, while considering the influence of spatial distribution structure, are unable to extract the frequency support strength information of each node from the frequency response data, thus failing to effectively distinguish the degree of difference between nodes and accurately identify weak nodes. Attached Figure Description

[0130] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0131] Figure 1 This is a schematic diagram of the network topology of the IEEE 39 system containing new energy generators in this invention.

[0132] Figure 2 This is a schematic diagram of the frequency curves of each node in this invention.

[0133] Figure 3 This is the Pearson similarity matrix heatmap in this invention.

[0134] Figure 4 This is the Euclidean distance matrix heatmap in this invention.

[0135] Figure 5 This is a graph showing the local relative oscillation components of each node in this invention.

[0136] Figure 6 These are the time-domain and frequency-domain diagrams of the traditional VMD decomposition IMF components in this invention.

[0137] Figure 7These are the time-domain and frequency-domain plots of the MVMD decomposition IMF components in this invention.

[0138] Figure 8 This is a Koopman energy heatmap of the IMF components at each node in the scenario of a new energy penetration rate of 14.36% in Embodiment 1 of the present invention.

[0139] Figure 9 This is a line graph comparing the Koopman energy of each node's dominant IMF component with the total energy distribution in Embodiment 1 of the present invention.

[0140] Figure 10 This is a scatter plot showing the correlation between the Koopman energy of each node's dominant IMF component and the total energy in Embodiment 1 of the present invention.

[0141] Figure 11 This is the normalized heatmap of the dominant Koopman energy of each node at the initial moment in Embodiment 1 of the present invention.

[0142] Figure 12 This is the normalized thermogram of the dominant Koopman energy of each node after a period of time in Embodiment 1 of the present invention.

[0143] Figure 13 This is a Koopman energy heatmap of the IMF components at each node in the scenario of a new energy penetration rate of 38.97% in Embodiment 2 of the present invention.

[0144] Figure 14 This is a line graph comparing the Koopman energy of each node's dominant IMF component with the total energy distribution in Embodiment 2 of the present invention.

[0145] Figure 15 This is a scatter plot showing the correlation between the Koopman energy of each node's dominant IMF component and the total energy in Embodiment 2 of the present invention.

[0146] Figure 16 This is the normalized thermogram of the dominant Koopman energy of each node in Embodiment 2 of the present invention.

[0147] Figure 17 This is the normalized thermogram of the dominant Koopman energy of each node after a period of time in Embodiment 2 of the present invention.

[0148] Figure 18 This is a comparison of the node frequency prediction values ​​in Embodiment 1 of the present invention. Detailed Implementation

[0149] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Of course, the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0150] Example 1: This example uses a scenario with a low new energy penetration rate (14.36%). See [link / reference]. Figures 1 to 11 The technical solution provided in this embodiment is: a method for dynamic prediction of node frequency in a power system based on the Koopman energy correction attention mechanism, comprising the following steps:

[0151] 1) Frequency response difference characteristic decomposition yields the global reference node, global reference component, and local relative oscillation component. MVMD decomposition is then performed on the local relative oscillation component to obtain each local IMF component.

[0152] 2) Construct the Koopman energy matrix

[0153] After removing the noise component IMF5, the remaining four IMF components (IMF1-IMF4) are used as the observation input to the Koopman module. A fixed time window is selected after the disturbance occurs to construct the observation matrix. The Sub-DMD algorithm is used to extract the low-dimensional approximate Koopman operator. Through eigenvalue decomposition, the system mode matrix and mode energy matrix are constructed, and finally the Koopman energy matrix is ​​obtained.

[0154] 3) Quantifying the ability to lead IMF screening and frequency support

[0155] After rearranging the Koopman energy matrix, the IMF component with the largest Koopman energy at each node is selected as the dominant IMF component. Figure 9 The comparison line charts shown are Figure 10 The scatter plots shown all indicate that there is a high positive correlation between the Koopman energy of each node that dominates the IMF and the total Koopman energy of each node, with a determination coefficient R²=1. This verifies that the Koopman energy of each node that dominates the IMF can effectively characterize the total Koopman energy of each node.

[0156] Figure 11 The normalized heatmap of the dominant Koopman energy of each node visually demonstrates the spatial distribution differences in the frequency support capabilities of each node. The disturbance source (node ​​39) and the new energy unit region (nodes 34 and 37) are the lightest in color, indicating the highest degree of Koopman energy dissipation. As shown in Table 3, the normalized Koopman energy of node 39 is 1, with a maximum frequency change rate of 0.742 Hz / s and a maximum frequency deviation of 0.166 Hz. There is a significant positive correlation between the two, verifying that the dominant Koopman energy of the IMF can effectively characterize the strength of each node's support capability against disturbances.

[0157] 4) GAT spatial feature extraction with Koopman energy correction

[0158] Based on the Koopman energy of the dominant IMF components of each node, a GAT spatial feature extraction module with Koopman energy correction is constructed. The GAT adopts a two-layer structure: the first layer extracts multi-scale spatial features through multi-head attention concatenation, and the second layer aggregates features by averaging the multi-head attention. The Koopman energy-corrected attention mechanism guides the model to focus on nodes that exhibit more dramatic changes in frequency response.

[0159] 5) GAT-LSTM frequency prediction framework

[0160] The spatial feature matrix sequence output by GAT is used as the input to LSTM to extract the temporal evolution characteristics of the frequency response of each node. During the offline training phase, considering the different proportions of new energy output (0-40%), the perturbation load shedding amount is set to 0%-100% of the base load power. The perturbation is applied at 5s, and the first 40 data points from 5s to 5.4s are used as input to predict the last 260 data points from 5.4s to 8s. The total simulation time is set to 8s.

[0161] 6) Validation of the superiority of the Koopman energy-corrected attention mechanism frequency prediction method

[0162] Table 5 shows the comparison of the frequency prediction accuracy of key nodes. The KGAT-LSTM model proposed in this invention has a higher accuracy improvement at weak nodes / disturbance source nodes than at other nodes. The RMSE accuracy of node 39 is improved by 0.2078% and the MAE is improved by 0.3039% compared with the benchmark method, indicating that the model can adaptively increase the attention weight of the core weak nodes in transient evolution.

[0163] Figure 1 The diagram shows the topology of the IEEE 39-node system used in this invention. In the original IEEE 39 standard system, this invention replaces synchronous generators G06 and G08 with doubly fed wind turbines of equal capacity, and replaces synchronous generators G05 and G09 with photovoltaic units of equal capacity. This constructs a high-proportion renewable energy power system containing 6 synchronous units and 4 renewable energy units, with a renewable energy output penetration rate of 38.97%. This effectively simulates the operating characteristics of a new type of power system with low inertia and weak damping.

[0164] Experimental verification was conducted based on the method proposed in this invention. This invention utilizes the PSASP simulation platform to build an improved IEEE 39-node system containing wind turbines and photovoltaic units for simulation experiments. In the original IEEE 39 standard system, multiple 1.5MW doubly-fed induction generator (DFIG) wind turbines replaced synchronous generators G06 and G08 with equivalent capacity, and 1.5MW photovoltaic units replaced synchronous generators G05 and G09 with equivalent capacity. All DFIG wind turbines were equipped with virtual inertia and droop control. Through these replacements, a high-proportion renewable energy power system was constructed, comprising 6 synchronous generator units and 4 renewable energy units, achieving a renewable energy output penetration rate of 38.97%, effectively simulating the operating characteristics of a novel power system with low inertia and weak damping.

[0165] To visually demonstrate the frequency response of each node after the disturbance, Figure 2 Frequency response curves for 39 nodes of the system after perturbation are presented. To quantify the spatial similarity characteristics of the frequency signals of each node, the original frequency signals of each node were first collected. For any two nodes, the linear correlation between them was calculated based on the Pearson correlation coefficient. Finally, the correlation coefficients of all node pairs were arranged in a 39×39 matrix and visualized using a heatmap, where red represents a correlation coefficient close to 1 and blue represents a correlation coefficient close to -1. Figure 3 The heatmap shown is a Pearson correlation coefficient matrix. From... Figure 3 As can be seen, the core area of ​​the heatmap is predominantly red, indicating a strong consistency between the local frequencies of most nodes within the system and the oscillation signals. This aligns with the fundamental physical law that power systems exhibit significant global synchronization characteristics. Simultaneously, it can be observed that the Pearson correlation coefficient in the area where new energy units are connected is lower than in the area dominated by traditional synchronous generators, mostly appearing yellow. This is because the equivalent inertia of the system decreases after new energy replaces synchronous generators, resulting in a greater rate of frequency change during disturbances. Therefore, the frequency response of new energy grid-connected nodes and their surrounding areas differs from that of traditional generator areas, manifested as a decrease in the Pearson correlation coefficient, reflecting the spatial distribution characteristics of the system's frequency response after new energy integration. However, a distinct blue-green patch appears in the area centered around nodes 39, 1, and 9, indicating that the correlation coefficients between these nodes and the remaining nodes are significantly lower. Node 39 is a load shedding node. Due to the power deficit and its proximity to node 37 of the new energy unit, it has the lowest Pearson similarity to the frequency response of the system reference node. Nodes 1, 9 and 39 are directly adjacent in the power grid topology. Due to the coupling effect of their power disturbances, their frequency synchronization decreases. The color difference in this local area also verifies the spatial coupling characteristic of the frequency responses of adjacent nodes in the topology.

[0166] While the Pearson correlation coefficient effectively characterizes the similarity of frequency waveforms at each node, it fails to reflect the closeness of frequency amplitudes at each node. This invention introduces a Euclidean distance matrix to measure the amplitude consistency at each node, the results of which are as follows: Figure 4 As shown in the diagram. Unlike the Pearson correlation coefficient, which indicates a higher similarity, Euclidean distance is a dissimilarity indicator. In the Euclidean distance matrix, the smaller the value, the higher the similarity between two nodes. It can be seen that nodes 39, 1, and 9 (disturbance sources / weak inertia / new energy nodes) have larger Euclidean distances than other nodes, appearing in blue. This indicates that not only do the frequency curves of these nodes differ significantly from the reference node, but their amplitudes also deviate significantly from the reference node. The Euclidean distance heatmap shows a significant low-value distribution in the central region. In the Euclidean distance metric, smaller and redder values ​​represent smaller amplitude differences between nodes and higher Euclidean distance similarity. The extremely low Euclidean distance between node pairs within the region indicates a high degree of consistency in their initial frequency change rate, maximum frequency deviation extreme, and quasi-steady-state frequency after disturbance. Furthermore, this high consistency reflects strong electrical coupling between nodes. This indicates that they are closely related in the system topology and have similar inertia support levels, resulting in a consistent global evolution trend in the frequencies of each node.

[0167] To reasonably balance waveform shape and amplitude consistency, this invention constructs an improved Pearson similarity index and performs sensitivity analysis on the weighting coefficients, the results of which are shown in Table 2. It can be observed that the weight of Euclidean distance gradually increases with the increase of the weighting coefficients. To ensure high correlation in waveform shape while maximizing amplitude consistency, this invention selects node 4 as the optimal reference node, which satisfies both high correlation and small amplitude deviation.

[0168] As shown in Table 2, if only the traditional Pearson correlation coefficient is used as the evaluation criterion, then node 18, which has the highest waveform shape correlation, will tend to be selected as the reference node. With the introduction of weighting coefficients, the evaluation system begins to consider the Euclidean distance between nodes, i.e., amplitude consistency. When the weighting coefficients are in the range [0.01, 0.40], the selected optimal reference node is consistently node 4. Therefore, although node 4 and node 18 show consistent waveform correlation (both reaching 0.9931), the average Euclidean distance of node 4 (0.1350) is smaller than that of node 18 (0.1384), indicating that node 4 is more representative in terms of amplitude similarity. Therefore, the improved Pearson similarity index can effectively correct the shortcomings of the traditional Pearson index in amplitude deviation, selecting a reference node with more accurate physical meaning. Considering all these factors, this invention selects node 4 as the global reference node.

[0169] Using node 4 as the global reference node, the local relative oscillation components of each node are obtained by subtracting the global reference component from the frequency signal of each node, such as... Figure 5 As shown, the local components exhibit different degrees of deviation between different nodes. These differences arise from the electrical distance between nodes, the location of the new energy unit connection, and the distance from the disturbance point, reflecting the spatial distribution differences in the frequency response of each node relative to the reference node 4 under disturbance. Nodes 39, 1, and 9 are near the disturbance source and deviate significantly from the frequency response of the reference node 4. Overall, the local components are mainly used to characterize the degree of deviation of the node frequency response from the system reference node.

[0170] 2) To verify the effectiveness of the node frequency difference feature identification method based on multivariate variational mode decomposition proposed in this invention, a numerical example was performed based on the improved IEEE 39-node system model.

[0171] To further verify the superiority of MVMD in handling multi-node frequency eigenvalue decomposition, this section compares the performance differences between the MVMD method and the traditional VMD method. First, the traditional VMD method is used for decomposition, yielding the time-domain and frequency-domain plots of each IMF component, as shown below. Figure 6 As shown, traditional VMD has significant limitations in multi-node frequency eigenvalue decomposition. The fluctuation periods of the IMF components in different oscillation modes differ significantly, such as in... Figure 6 In the time-domain plot of the IMF1 component, it is evident that there are components with significantly different oscillation periods within the same IMF component. The oscillation frequency of the IMF1 component at some nodes is significantly lower or higher than that at other nodes, meaning that components with different oscillation speeds are forcibly grouped into the same IMF component. This is due to the problem that traditional VMD decomposes each node independently, leading to the forced classification of IMF components with different oscillation characteristics within each node into the same oscillation mode, thus making it impossible to compare the differences between nodes under the same oscillation mode.

[0172] To address the limitations of traditional VMD in multi-node decomposition, which fails to clearly separate components with varying oscillation rates at each node, this invention introduces MVMD decomposition, incorporating a unified oscillation center constraint. This enables joint decomposition of frequency signals across multiple nodes, as shown in the following figure. Figure 7 As shown. Comparison Figure 6 and Figure 7 The results show that MVMD decomposition has significant advantages. Figure 7The oscillation periods of IMF1 to IMF5 decrease sequentially, while the oscillation center frequencies of each IMF component increase sequentially. IMF5 is a noise component, with its oscillation center mainly concentrated between 10-50 Hz and a peak frequency around 25 Hz. As can be seen from the figure, a clear spectral stratification is observed from the low-frequency oscillations of IMF1 to the high-frequency oscillations of IMF5. In summary, the MVMD method can effectively identify the different oscillation characteristics of local components at each node during transient processes. Figure 7 The decomposition results provide a characteristic basis for subsequent quantification and analysis of the spatial distribution differences of multi-node signals in power systems.

[0173] Table 1 shows the parameters for each synchronous generator unit.

[0174]

[0175] Table 2 shows the results of sensitivity analysis with different weighting coefficients.

[0176]

[0177] Figure 8 A heatmap showing the spatial distribution of Koopman energy at each node of the system across the local IMF1–IMF4 components is presented. The horizontal axis represents the IMF component number, and the vertical axis represents the system node number. The color intensity reflects the degree of Koopman energy dissipation at each node under the corresponding IMF component; the lighter the color, the greater the Koopman energy dissipation and the weaker the support capacity. The heatmap reveals that different nodes within the system exhibit significantly different energy distribution characteristics under each local IMF component, indicating that the impact of system frequency perturbations on the nodes has significant spatial differences.

[0178] from Figure 8 It can be seen that after the disturbance, the Koopman energy dissipation levels of different nodes vary significantly under each local IMF component. For example, nodes 34 and 37, as new energy units, have weaker support capabilities, which is reflected in their relatively lighter color in the figure, but still darker than traditional units. Since the differences in frequency support capabilities of different nodes are manifested in the varying degrees of change in the local IMF components at different stages of evolution, nodes with weaker support capabilities typically exhibit more significant energy state transitions and frequency changes. Nodes with weaker frequency support capabilities show more drastic changes after the disturbance, more significant local frequency dynamic responses, and larger energy state transitions; therefore, nodes with weaker frequency support capabilities have higher Koopman energy dissipation levels. Traditional units, on the other hand, have stronger support capabilities, resulting in lower Koopman energy dissipation levels before and after the disturbance.

[0179] from Figure 9 and Figure 10It can be seen that there is a positive correlation between the Koopman energy of each node dominating the IMF and the total Koopman energy of each node, and the changing trend of the Koopman energy of each node dominating the IMF can effectively reflect the changing trend of the total Koopman energy of each node. This indicates that the Koopman energy of each node dominating the IMF can effectively characterize the total Koopman energy of each node.

[0180] Figure 10 The correlation between normalized dominant IMF energy and total energy was further quantified using scatter plots. The calculation results show that the coefficient of determination for both is... The correlation coefficient reached 0.99, showing a very strong positive correlation, which further verifies that the Koopman energy of each node dominating the IMF can effectively characterize the total Koopman energy.

[0181] from Figure 11 It can be seen that the heat maps of the G05 and G08 renewable energy units are light yellow, indicating that the Koopman energy dissipation is higher than that of traditional units. Traditional units are mostly light blue and dark blue, while the heat maps of the renewable energy unit area are mostly light green and light yellow. Therefore, it can be seen that the integration of renewable energy reduces the frequency support capability of the area, the degree of which is affected by electrical distance and the spatial distribution differences between units. The above results show that the spatial distribution characteristics of each node obtained based on the Koopman feature matrix can effectively characterize the differences in the frequency response of the system nodes. The weaker the support capability of a node, the greater its Koopman energy dissipation, thus enabling effective identification of key weak response nodes / areas.

[0182] Depend on Figure 11 and Figure 12 The comparison shows that in scenarios with low renewable energy penetration, as the disturbance propagates further within the system after a period of time, the spatial distribution of the dominant Koopman energy of each node changes, and the normalized Koopman energy of renewable energy unit nodes shows a certain degree of increase. Specifically, the color of the area where node 37 is located changes from light yellowish-green in the initial stage to yellow, and the color of the area near node 34 also changes from slightly yellowish-green to light yellow, indicating that the energy levels of both nodes increased during disturbance propagation. Further analysis using Table 3 shows that the dominant IMF normalized Koopman energy of node 37 increased from 0.17 at the initial moment of the disturbance to 0.29 after a period of time; the dominant IMF normalized Koopman energy of node 34 increased from 0.18 to 0.23. This indicates that because nodes 34 and 37 are renewable energy nodes, their inertia support capability is weaker than that of traditional synchronous generators. Therefore, their corresponding Koopman energy levels are relatively higher during disturbance propagation and frequency recovery, reflecting the characteristic of weak frequency support.

[0183] Example 2:

[0184] Building upon Example 1, the effectiveness and applicability of the proposed method in scenarios with high renewable energy penetration rates are further verified. In the IEEE 39-node standard example system, based on Example 1 (14.36%), the capacity of G06 at node 35 is replaced with a doubly-fed wind turbine with virtual inertia and droop control, and the capacity of G09 at node 38 is replaced with a photovoltaic unit without additional control, increasing the renewable energy penetration rate to 38.97%. A case study is then conducted to verify this approach.

[0185] Figure 13 A Koopman energy spatial distribution heatmap of each node in the system at the local IMF1–IMF4 components is presented in a scenario where the new energy penetration rate is 38.97%. (Comparison) Figure 8 and Figure 13 It can be seen that because nodes 35 and 38 were replaced with new energy units, the overall new energy penetration rate increased, and the change in system frequency was more drastic than in the low-penetration scenario. The Koopman energy dissipation level was also higher in the low-penetration scenario, which is represented by a lighter color. Since nodes 34, 35, 37, and 38 are new energy units with weaker support capabilities, their Koopman energy dissipation level is even higher.

[0186] It can be seen that in the power system with a new energy penetration rate of 38.97%, the dissipation of Koopman energy at nodes 35 and 38 is greater than that in the power system with a new energy penetration rate of 14.36% because they have changed from synchronous units to new energy units. The color of Koopman energy corresponding to each IMF also changes from dark to light, that is, the dissipation of total Koopman energy and the dissipation of Koopman energy of the dominant IMF also increase.

[0187] To verify the effectiveness of the proposed method in characterizing the dynamic features of the system using the Koopman energy of the dominant IMF component at each node, Figure 14 A line graph comparing the Koopman energy of each node in the IMF with the total Koopman energy of that node. From Figure 14 It can be observed that the energy curve of the dominant IMF component and the distribution trend of the Koopman total energy curve are highly consistent across all 39 nodes in the network, meaning that the Koopman energy of the dominant IMF component can accurately capture the main fluctuation characteristics of the Koopman total energy.

[0188] from Figure 14 and Figure 15It can be seen that there is a positive correlation between the Koopman energy of each node dominating the IMF and the total Koopman energy of each node, and the changing trend of the Koopman energy of each node dominating the IMF can basically reflect the changing trend of the total Koopman energy of each node. This indicates that the Koopman energy of each node dominating the IMF can effectively characterize the total Koopman energy of each node. Figure 15 The relationship between the normalized dominant IMF energy and the total energy was further quantified using scatter plots. The calculation results show that the coefficients of determination for both are... The value reached 1, showing a very strong positive correlation, proving that the Koopman energy of each node dominating the IMF can effectively characterize the total Koopman energy.

[0189] Compare Figure 11 and Figure 16 It can be seen that in power systems with low renewable energy penetration, the Koopman energy dissipation is less than that in power systems with high renewable energy penetration. Figure 16 In the diagram, it is evident that after replacing G06 at node 35 and G09 at node 38 with new energy units from synchronous generators, the node colors in the heat map change from light green to yellow. Table 4 shows a comparison of frequency response indicators and energy characteristics of different nodes under a high new energy penetration scenario. Comparing Tables 3 and 4, it can be seen that after replacing node 35 with a new energy node, the normalized Koopman energy of node 35 increases from 0.12 to 0.19, the maximum frequency change rate also increases from 0.004 Hz / s to 0.038 Hz / s, and the maximum frequency deviation increases from 0.0951 Hz to 0.1039 Hz. After replacing node 38 with a new energy node, the normalized Koopman energy of node 38 increases from 0.127 to 0.46, the maximum frequency change rate also increases from 0.010 Hz / s to 0.092 Hz / s, and the maximum frequency deviation increases from 0.0805 Hz to 0.0988 Hz. As the penetration rate of new energy sources increases, the frequency change rate and maximum frequency deviation of each node increase to varying degrees, and the Koopman energy dissipation of all nodes also increases to varying degrees. This demonstrates that the proposed Koopman energy, which represents the dominant IMF component of each node, can effectively characterize the power system's support strength against disturbances under different new energy penetration rates. Nodes with weaker support capabilities exhibit greater Koopman energy dissipation, and these weaker nodes require more attention because they are more likely to exceed frequency limits.

[0190] Depend on Figure 16 and Figure 17The comparison shows that in scenarios with high renewable energy penetration, as the disturbance propagates further within the system after a period of time, the energy distribution of each node changes significantly, and the normalized Koopman energy of the renewable energy unit nodes generally increases. Specifically, the color of node 38 changes from yellow in the initial stage to light red, indicating an increase in its energy during disturbance propagation; the colors of nodes 35 and 37 also change from light yellow to yellow, demonstrating an increase in energy levels during disturbance propagation; the energy distribution of node 34 also shows a certain degree of increase. Further analysis in Table 4 shows that the dominant IMF normalized Koopman energy of node 35 increases from 0.19 at the initial moment of the disturbance to 0.28 after a period of time. The dominant IMF normalized Koopman energy of node 38 increases from 0.46 to 0.74. These changes indicate that after the disturbance occurs, the renewable energy unit region gradually becomes the region with the most significant dynamic frequency response of the system. Since nodes 34, 35, 37 and 38 are new energy nodes, they lack the rotational inertia support of traditional synchronous generators and exhibit stronger local dynamic response during disturbance propagation, thus resulting in higher corresponding Koopman energy levels.

[0191] Further comparison of the low and high penetration scenarios reveals that the Koopman energy of new energy unit nodes increases significantly with the increase in new energy penetration. Especially in the high new energy penetration scenario, nodes 34, 35, 37, and 38, all new energy nodes, exhibit higher normalized Koopman energies overall than in the low penetration scenario. Specifically, the Koopman energies of nodes 35 and 38 increase significantly after replacing traditional synchronous generators with new energy generators, indicating a further weakening of the system's local frequency support capability under high new energy penetration. This result suggests that as the proportion of new energy substitution increases, new energy regions are more likely to exhibit strong dynamic responses during disturbance propagation, making the weak frequency support characteristic more prominent. The above analysis shows that the normalized Koopman energy dominating the IMF has a significant positive correlation with traditional key frequency stability indicators such as the maximum rate of frequency change and the extreme value of frequency deviation. Nodes 34, 35, 37, and 38, being new energy unit nodes, lack the rotational inertia support of traditional synchronous generators, resulting in greater energy dissipation under disturbance impacts. As shown in Table 4, its Koopman energy remains at the level of 0.35-0.46, which is significantly higher than that of traditional units.

[0192] Table 3 Comparison of Frequency Response Indicators and Energy Characteristics of Different Nodes

[0193]

[0194] Table 4 Comparison of Frequency Response Indicators and Energy Characteristics of Different Nodes

[0195]

[0196] Table 5 compares the improvement in the accuracy of key node prediction indicators.

[0197]

[0198] As shown in Table 5, the method of this invention achieves varying degrees of error reduction compared to the benchmark method in terms of key node prediction metrics. The RMSE and MAE reductions for nodes 39, 1, and 9 are particularly significant, indicating that the Koopman energy effectively reflects the key nodes that have a significant impact on prediction accuracy during the system's perturbation evolution. While the traditional GAT-LSTM achieves adaptive node weight allocation through a self-attention mechanism, the KGAT-LSTM model proposed in this invention achieves higher prediction accuracy for key nodes. The KGAT-LSTM model proposed in this invention shows a greater improvement in prediction accuracy at nodes with higher Koopman energy than at nodes with slightly lower Koopman energy, indicating that the proposed model can adaptively increase the attention allocation weight for weak nodes in the transient evolution after the perturbation. Compared to other prediction methods, the frequency prediction method proposed in this invention, which considers the spatial differences in frequency response, improves the prediction accuracy for key response nodes by adjusting the attention mechanism based on Koopman energy, making the attention weight allocation more focused on weak nodes.

[0199] To visually demonstrate the frequency prediction performance of the proposed KGAT-LSTM model at critical response nodes, this invention selects a specific operating condition in the test set: with a renewable energy penetration rate of 14.97%, node 39 sheds 89% of its load. Frequency prediction curves at different nodes are compared, as follows: Figure 18 As shown in the diagram. The black solid line represents the true frequency response curve, the blue curve represents the prediction result of the traditional GAT-LSTM model, and the orange curve represents the prediction result of the KGAT-LSTM model proposed in this invention. Figure 18 As can be seen, the overall trends of the three curves are basically consistent, indicating that both the traditional GAT-LSTM model and the KGAT-LSTM model proposed in this invention can capture the main dynamic processes of the frequency response of each node after perturbation. Further comparison shows that the predicted curves of the KGAT-LSTM model proposed in this invention are closer to the actual curves at several key nodes, especially near frequency extremes and in the oscillation recovery phase after perturbation, where its prediction results better follow the changes in the actual frequency response. In summary, the KGAT-LSTM model proposed in this invention can better predict the oscillation changes of node frequencies after perturbation, and its predicted curves are closer to the actual response than traditional GAT-LSTM and other methods, further verifying the effectiveness of the proposed KGAT-LSTM model in predicting frequencies at key nodes.

[0200] It should be noted that the processing flow of Embodiment 2 corresponds to the specific steps of the method provided in Embodiment 1 of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the method provided in Embodiment 1 of the present invention.

[0201] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A frequency prediction method for renewable energy grid-connected systems based on Koopman energy correction, characterized in that, Includes the following steps: Step S1: Construct a global component screening model based on improved Pearson similarity. By calculating the improved Pearson similarity index between the frequency curves of each node, select the node with the highest overall similarity to other nodes as the reference node and use its frequency response as the global reference component. A model for identifying local relative oscillation components based on multivariate variational mode decomposition (MVMD) is constructed. A unified oscillation center constraint is introduced, and the variational optimization problem is solved iteratively using the alternating direction multiplier method (ADMM). The local relative oscillation components of each node are decomposed into several IMF components with different oscillation centers. Step S2: Based on the local IMF components of each node, the Sub-DMD algorithm is used to extract the low-dimensional approximate Koopman linear operator in the process before and after the evolution of the local IMF components of each node, and to construct the Koopman energy matrix that reflects the spatial distribution characteristics of the system, thereby quantifying the degree of energy dissipation of each node after the disturbance. Step S3: Rearrange the elements in the Koopman energy matrix according to nodes and IMF components, compare the Koopman energy of multiple IMF components of each node, select the IMF component with the largest Koopman energy of each node as the dominant IMF feature component, and use the Koopman energy corresponding to the dominant IMF feature component of each node as the feature index for quantifying the strength of frequency support capability of different nodes. Step S4: Construct a GAT node spatial feature extraction module that integrates the Koopman energy correction attention mechanism. The Koopman energy of each node’s dominant IMF component is used as a priori weight to be introduced into the attention coefficient calculation, correcting the attention weight of the standard GAT and enhancing the model’s attention to nodes with weak frequency support. Step S5: Construct a time-series frequency prediction module based on LSTM. Use the spatial feature matrix sequence extracted by GAT and fused with Koopman energy correction as the input of LSTM to capture the time-series evolution characteristics of the frequency response of each node, construct the GAT-LSTM frequency prediction framework, and realize the prediction of the dynamic trajectory of the frequency of multiple nodes after perturbation. Step S6: Verify the effectiveness and superiority of the GAT-LSTM frequency prediction method based on the Koopman energy correction attention mechanism under different new energy penetration rates.

2. The frequency prediction method for a new energy grid-connected system based on Koopman energy correction according to claim 1, characterized in that, In step S1, it is assumed that the frequency signals of node i and node j are respectively and Construct a spatial similarity matrix R based on the Pearson correlation coefficient, where the Pearson similarity coefficient between node i and node j is: ; In the formula, t represents discrete sampling points. Let σ be the covariance of the frequency signals at node i and node j, and σ be the corresponding standard deviation. express and The Pearson correlation coefficient between them The Pearson similarity coefficient between node i and node j; This represents the covariance between the signals of node i and node j; This represents the standard deviation of the frequency signal at node i; This represents the standard deviation of the frequency signal at node j; The range of values ​​is ,like If >0, the frequency signals of node i and node j are positively correlated and show the same trend; if If the frequency of node i approaches 1, then the frequency signals of node i and node j are positively correlated; if <0, the frequency signals of node i and node j are negatively correlated, and their trends are opposite; if If the frequency signal of node i is 0, then the frequency signals of node i and node j have no linear correlation. Let N represent the Pearson correlation coefficient between the frequency curves of node i and node j, and N be the number of nodes in the system. Euclidean distance is introduced to measure the amplitude consistency of the frequency curves between nodes; the Euclidean distance between node i and node j is: ; In the formula, Let represent the norm of the difference in frequency curves between node i and node j. This represents the Euclidean distance between node i and node j. ; The summation symbol indicates that t is summed from 1 to T. Construct an improved Pearson similarity index that comprehensively considers both shape similarity and amplitude consistency: ; In the formula, the first term Let be the average Pearson correlation coefficient between node i and all other nodes, representing the degree of similarity in waveform trends; Second item The average Euclidean distance to node i is used to measure the magnitude of the amplitude deviation; the smaller the value, the closer the amplitudes are. These are weighting coefficients used to balance the contributions of the two terms; This reflects the degree of correlation between all nodes; To select the reference nodes and global reference components with the highest global consistency, an improved Pearson similarity index is chosen. The largest node m is used as the reference node, and the frequency response of the node is... As a global reference component, the local relative oscillation components of each node are obtained by subtracting the frequency signal of the reference node m from the frequency signal of each node: ; In the formula, It is the frequency signal of node i. It is the local relative oscillation component of node i.

3. The frequency prediction method for a new energy grid-connected system based on Koopman energy correction according to claim 1, characterized in that, In step S1, the multivariate variational mode decomposition (MVMD) jointly decomposes the local relative oscillation components of N nodes into K IMF components. By introducing a unified oscillation center constraint, the following variational constraint optimization problem is established, whereby the constraint condition is that the local relative oscillation component of each node is equal to the sum of the IMF components: ; In the formula, This represents the k-th IMF component derived from the n-th node. This represents the time-domain signal of the k-th IMF component decomposed from the n-th node. This indicates that the result is obtained through the Hilbert transform. The analyzed signal contains amplitude and phase information. The analytical signals of each IMF component at each node The corresponding multi-node spectral matrix is ​​along its common oscillation center. The oscillation center was moved to zero frequency. Let represent the local relative oscillation component of the nth node, where n is the node index (n=1,2,…,N); and k is the index of the IMF component (k=1,2,…,K), where K represents the number of IMF components obtained from the multivariate variational mode decomposition. This represents the summation over k, where N is the total number of nodes in the power system. This represents summation over n, where n = 1, 2, ..., N; st represents the constraint condition. This represents the oscillation center frequency corresponding to the nth node. represents the square of the L2 norm, used to measure the bandwidth of a signal; represents the partial derivative; j is the imaginary unit. The constrained optimization problem is solved using the augmented Lagrangian method: ; In the formula, This represents the augmented Lagrange function. Represents the set of all IMF components. This represents the set of all oscillation center frequencies. Denotes the Lagrange multiplier of the nth node. It is a punishment factor. This represents the inner product form of Lagrange multipliers, used to handle constraints. Represents the Lagrange multiplier function of the nth node; The frequency domain update formula for each node's IMF component is as follows: ; In the formula, This represents the frequency domain representation of the k-th IMF component at the n-th node after the (m+1)-th iteration, where the superscript m+1 indicates the iteration number, and ^ denotes the frequency domain signal after the Fourier transform. Represents angular frequency. Represents the local relative oscillation component of the nth node. The frequency domain representation, Let i represent the sum of the frequency domain values ​​of all IMF components except for the k-th IMF component at the n-th node, where i is the IMF index, i = 1, 2, ..., K, and i ≠ k; This represents the Lagrange multiplier corresponding to the nth node, excluding the kth IMF component. This represents half of the Lagrange multiplier corresponding to the kth IMF component of node n; This represents the oscillation center frequency of the k-th IMF component during the m-th iteration, with the superscript m indicating the iteration number. All nodes share the same frequency. ; The update formula for the oscillation center in the frequency domain is: ; In the formula, This represents the updated oscillation center frequency of the k-th IMF component at the (m+1)-th iteration. This indicates the search for the element that minimizes the objective function. value, This represents the integral over the frequency from 0 to infinity. This represents the corresponding energy spectral density; The Lagrange multiplier update formula is: ; In the formula, This represents the frequency domain representation of the Lagrange multiplier corresponding to the nth node in the (m+1)th iteration. This represents the frequency domain representation of the Lagrange multipliers corresponding to the nth node in the m-th iteration. This represents the update step size of the Lagrange multipliers. The frequency domain representation of the target signal at the nth node. This represents the frequency domain representation of the nth node and the kth IMF component after the (m+1)th iteration. It is the frequency domain representation of the reconstruction error; Until the convergence condition is met: ; In the formula, Let represent the frequency domain representation of the nth node and the kth IMF component at the (m+1)th iteration. This represents the frequency domain representation of the nth node and the kth IMF component at the mth iteration. This represents the convergence error.

4. The frequency prediction method for a new energy grid-connected system based on Koopman energy correction according to claim 1, characterized in that, In step S2, the k local IMF components of the N nodes of the power system are stacked sequentially to form the observation vector at time t: ; In the formula, Let represent the observation vector at time t, with dimension . The k-th IMF component at time t The observation vector is used to characterize the differences in the local dynamic response of different nodes under different oscillation characteristics. This represents the IMF1 component of the first node at time t. This represents the IMF1 component of the Nth node at time t; The initial observation matrix is ​​constructed within a time window of length m using the Sub-DMD method. and time-shifted observation matrix : ; ; ; In the formula, ,yes To establish the evolution relationship between observation matrices in adjacent time windows, let the m-row, m-column observation matrix block be defined. Then we can get , , Characterizes the local dynamic features of each node's local IMF components in the previous stage of evolution. Characterizes the local dynamic features of its later evolutionary stage; To ensure that the evolution of the IMF components of each node in the Koopman space remains approximately linear before and after the evolution, a linear mapping relationship is established between the observation matrices of the local IMF components of each node after time stacking. The linear mapping relationship essentially reflects the evolution process of the local frequency dynamic characteristics of each IMF component of each node from the previous stage to the next stage under a specific perturbation scenario. The optimal Koopman low-dimensional approximation operator is solved by the least squares method. ; In the formula, It is the optimal linear operator; Eigenvalue decomposition is performed on the Koopman low-dimensional approximation operator, and the system mode matrix is ​​constructed based on this decomposition. From the pattern energy matrix E, we obtain the Koopman energy matrix: ; In the formula, It determines the spatial distribution characteristics of energy; This determines the magnitude of the energy of each IMF component at each node; Each element represents the Koopman energy dissipation level of different IMF components at each node.

5. The frequency prediction method for a new energy grid-connected system based on Koopman energy correction according to claim 1, characterized in that, In step S3, the obtained energy matrix The inner elements are rearranged in the energy matrix. In the middle, the first The column represents the local components of node n. The magnitude of the Koopman energy component. The Koopman energy matrix of each node and each IMF component after rearrangement is obtained. , recorded as : (17); In the formula, rows represent the energy of the same IMF component at each node, and columns represent the energy of k IMF components at the same node. The first row... The second line represents the IMF1 components from the 1st node to the Nth node. This represents the IMF2 components from the 1st node to the Nth node. This represents the IMFk components from the 1st node to the Nth node.

6. The frequency prediction method for a new energy grid-connected system based on Koopman energy correction according to claim 1, characterized in that, In step S4, in the graph attention network, the power system adjacency matrix A represents the topological relationship between nodes. For a neighboring node j of node i, let its dominant IMF component's Koopman energy be... The Koopman energy of the dominant IMF component of node j As the weights of the attention coefficients of the neighboring nodes of the corrected node i, the corrected attention coefficients As shown in the following formula: ; In the formula, These are the learnable parameters of the c-th attention head in the l-th layer. The loss function is calculated by outputting the prediction frequency, and the backpropagation process automatically optimizes and updates them based on the prediction error gradient. The Koopman energy of the dominant IMF component of node j; The Koopman energy represents the dominant IMF component of node k; This represents the attention coefficient between node i and node j at the l-th layer and the c-th head. This represents the attention coefficient at the l-th and c-th head of the node i and node k; the LeakyReLU function is used to perform a non-linear transformation on the correlation score between the central node i and its neighboring node j. It is the learnable weight matrix of the c-th head in GAT. It is a single-layer feedforward neural network, and its function is to process the concatenated high-dimensional features. Mapped to a scalar attention coefficient , This reflects the importance of node j to node i. yes Transpose of; Let exp(⋅) represent the set of neighboring nodes, and let exp(⋅) represent the exponential function with the natural constant e as the base, which is used to map any real number to a positive number and is used as part of the Softmax normalization so that the sum of the attention coefficients of all neighboring nodes is 1. The first layer of GAT concatenates the feature vectors obtained through c-head attention. The second layer of GAT aggregates features by averaging the outputs of each head, and finally outputs a node feature matrix H that fuses spatial distribution features.

7. The frequency prediction method for a new energy grid-connected system based on Koopman energy correction according to claim 1, characterized in that, In step S5, the output feature matrix of the GAT layer at time t is... , characteristic matrix sequence As input to the LSTM, features are extracted in the time dimension. The LSTM network consists of multiple LSTM units, each containing three gate structures and a cell state. These gates are forget gates. Input gate and output gate This is used to control whether to update, forget, and output frequency response characteristics; The set of input features is The output feature quantity is The output of LSTM Linear mapping to the predicted time step via a fully connected layer The output features of the GAT-LSTM model are as follows: ; In the formula, This indicates the first time step of the prediction. This indicates the second time step in the prediction. This indicates the last time step in the prediction.

8. The frequency prediction method for a new energy grid-connected system based on Koopman energy correction according to claim 1, characterized in that, In step S6, based on the improved IEEE 39-node system containing wind turbines and photovoltaic units, calculation examples are performed in two scenarios with new energy penetration rates of 14.36% and 38.97%, respectively; the mean absolute error (MAE), mean percentage error (MAPE), and root mean square error (RMSE) are used as evaluation indicators.