New energy power system frequency instability risk assessment method based on heterogeneous graph attention network

By constructing a frequency instability risk assessment method based on heterogeneous graph attention networks, the high-dimensional uncertainty and complex nonlinearity problems of frequency instability risk assessment in new energy power systems are solved, achieving a balance between accuracy and speed, and improving the assessment effect of dynamic response of wind power and photovoltaic power.

CN121581640APending Publication Date: 2026-02-27NORTH CHINA ELECTRIC POWER UNIV +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511740620.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In power systems with high penetration of new energy sources, frequency instability risk assessment faces high-dimensional uncertainty and complex nonlinear problems. Traditional methods cannot balance speed and accuracy, and are difficult to reflect the dynamic response mechanism of wind power and photovoltaic power under frequency disturbances.

Method used

A frequency instability risk assessment method based on heterogeneous graph attention network is constructed. By dividing the node type and active learning training, and combining the power grid topology and node characteristics, a wind power-solar power heterogeneous graph model is constructed, and the frequency stability index is evaluated using heterogeneous graph attention network.

Benefits of technology

It improves the accuracy and speed of frequency instability risk assessment, effectively captures the dynamic response characteristics of wind and solar power, shortens online assessment time, and solves the problem of insufficient real-time performance under high-dimensional variables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121581640A_ABST
    Figure CN121581640A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of new energy power system instability risk assessment, in particular to a new energy power system frequency instability risk assessment method based on a heterogeneous graph attention network. The method comprises the following steps: constructing a wind power-photovoltaic heterogeneous graph model according to a power grid topology; performing combined sampling on different operation modes and anticipated disturbances, and determining corresponding input feature vectors; calculating a frequency stability index value label of the sample set; expanding the training set through an active learning iteration process, and carrying out model training; and inputting the collected operation data into the trained heterogeneous graph attention model, outputting a frequency stability index value, and evaluating the system frequency instability risk in combination with the risk matrix. By adopting the frequency instability risk assessment method for the new energy power system based on the heterogeneous graph attention network, the problem of low efficiency of risk assessment in a high-dimensional uncertain scene is solved, and the heterogeneous graph attention network can reflect the influence of different types of devices at different positions and disturbance types on the dynamic frequency of the system; and the accuracy of frequency instability risk assessment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of new energy power system instability risk assessment, and particularly relates to a new energy power system frequency instability risk assessment method based on a heterogeneous graph attention network. BACKGROUND

[0002] In recent years, blackouts caused by frequency collapse of new energy high-penetration power systems have occurred frequently. After large-scale access of new energy, due to the decoupling characteristics of power electronics, the inertia level of the system gradually decreases and the frequency modulation capability weakens; in addition, affected by the complex and changeable weather conditions, the random fluctuations of wind and light output will exacerbate the power imbalance of the power grid. Therefore, in the new energy high-penetration power system, the multi-dimensional variable complex coupling has high-dimensional uncertainty and complex nonlinearity, and the traditional probability analysis method cannot meet the rapidity and accuracy of the frequency instability risk assessment of the current power system. SUMMARY

[0003] The purpose of the present application is to provide a new energy power system frequency instability risk assessment method based on a heterogeneous graph attention network, which aims to solve the problem of power system frequency instability risk assessment under high-dimensional uncertainty and complex nonlinear scenarios, and accurately reflect the dynamic response mechanism characteristics of wind power and photovoltaic under frequency disturbance, and realize the frequency instability risk assessment with rapidity and accuracy.

[0004] To achieve the above purpose, the present application provides a new energy power system frequency instability risk assessment method based on a heterogeneous graph attention network, comprising the following steps: S1: according to the node type division of the power grid topology, taking the node as the vertex, modeling the vertex with the node feature matrix, and modeling the transmission line as the edge, constructing a wind-photovoltaic heterogeneous graph model; S2: determine the node input feature vector of the sample set, combine sampling of different operating modes and expected disturbances of the wind-photovoltaic heterogeneous graph, collect voltage data and power data of each node under each working condition, and determine the corresponding input feature vector combined with the node type; S3: calculate the frequency stability index value label of the sample set; S4: train the heterogeneous graph attention network model of the new energy power system frequency instability risk assessment through active learning; S5: The regulation center collects the operation data of each node of the power grid at the current time, combines the current thermal power unit output scheduling value, and generates a disturbance set that may occur in the current power grid; for each disturbance element in the disturbance set, the node input feature vector is constructed according to S2, and the trained heterogeneous graph attention network model of the new energy power system frequency instability risk assessment is input, to obtain the frequency stability index value corresponding to the disturbance, according to the probability distribution of all frequency stability indexes, combined with the risk matrix, the current frequency instability risk of the new energy power system is evaluated.

[0005] Preferably, in the step S1, the wind power-photovoltaic heterogeneous graph is constructed based on the adjacency matrix and the input feature matrix The specific steps are as follows: S11, according to the node type division of power grid topology, the node type includes power supply node, load node and transmission node The power supply node includes wind turbine node , photovoltaic node and synchronous generator node The above nodes are used as the vertices of the graph, and the power transmission lines in the power grid are used as the edges of the graph, to obtain the vertex set and edge set ; Wherein, the transmission node is a node without active power production and consumption, only bearing the function of power transfer and topology connection; S12, construct the adjacency matrix, for two nodes of bus i and bus j , if the two nodes are directly connected through a line, then =1, otherwise =0, at the same time =1、 =1.

[0006] Preferably, in step S2, the operating mode includes load level, wind speed and light intensity, and the expected disturbance includes load step disturbance and generator tripping disturbance of different positions and sizes. The sample set is set as follows: The sample set includes a training set and a test set; the training set includes an initial training set and a supplementary training set, the initial training set is composed of typical scene sampling samples and part of random scene sampling samples, and the supplementary training set is formed by high-value samples selected from the unannotated sample pool combined with output labels; S21, for the initial training set: in typical scene sampling, the daily working conditions of new energy penetration rate, load level and complex disturbance are covered; In terms of operation mode, according to the historical data of wind speed, light intensity and load output provided by the dispatching center, the typical values of each output are obtained by k-medoids clustering, and multiple different fan wind speeds, photovoltaic set light intensities and load levels are set; In terms of expected disturbance, two types of load power mutation and generator tripping are set, the load mutation occurs at the key node, and the disturbance amount is set to multiple basic load power; the tripping disturbance is set at the set node, and different tripping amounts are set; According to the seven-dimensional hypercube sampling of wind speed x light intensity x load level x load disturbance, tripping disturbance size and position, a certain number of samples are taken in each dimension, from the above combinations, the combinations with historical data year occurrence frequency greater than or equal to a certain number and power flow convergence are preferentially retained, and finally a certain number of typical scenes are selected; In the random scene sampling, a certain number of samples are randomly generated by the Monte Carlo method, in which wind speed, light intensity, load and disturbance are taken within a certain range, and the random samples need to meet the probability density function consistent with the distribution of the measured data of the dispatching center; S22, for the supplementary training set, first construct an unlabeled sample pool: a certain number of samples are randomly generated by the Monte Carlo method, the random samples need to meet the probability density function consistent with the distribution of the measured data of the dispatching center, in which wind speed, light intensity, load and disturbance are taken within a certain range, only the input features are retained to form the unlabeled sample pool U; Then, high-value samples are selected from the unlabeled sample pool during the training process of the heterogeneous graph attention network model, and the output label is combined to form a supplementary training set; S23, for the test set sample, 20% of the samples are randomly selected from the unlabeled sample pool, and are labeled as the test set after the frequency index label is labeled, the test set and the unlabeled sample pool data have consistent distribution and no repetition, and are used for monitoring the training process overfitting and iteration termination judgment; S24, each sample set is combined and sampled for the above different operation modes and expected disturbances, and the voltage data and power data of each node under each condition are collected, and the node input feature vector of the sample set is determined combined with the node type. The input feature vectors corresponding to different types of nodes are as follows: For the fan node , the node voltage amplitude, phase angle, generator injected active power, reactive power, node wind speed instantaneous value and expected disturbance information are selected as the initial input features; For the photovoltaic node , the node voltage amplitude, phase angle, generator injected active power, reactive power, node light intensity and expected disturbance information are selected as the initial input features; For the synchronous generator node , the node voltage amplitude, phase angle, active power and reactive power injected by the generator, and the expected disturbance information are selected as initial input features; For the load node , the node voltage amplitude, phase angle, active power and reactive power absorbed by the load, and the expected disturbance information are selected as initial input features; For the transmission node , the node voltage amplitude and phase angle are selected as initial input features.

[0007] Preferably, in step S3, the step of calculating the frequency stability index value label of the sample set is as follows: For each type of sample set set in step S2, time domain simulation is performed, the frequency response curve of the system inertia center under each working condition is extracted, and the frequency stability index value label corresponding to the sample is calculated accordingly; The frequency stability index value label includes the maximum frequency deviation and its occurrence time, the initial frequency change rate, the quasi-steady state frequency deviation, and the frequency recovery time.

[0008] Preferably, the active learning training process of the heterogeneous graph attention model for frequency instability risk assessment in step S4 comprises: S41: Model initialization: input the input feature vector and label corresponding to the initial training set into the heterogeneous graph attention network; each node updates its feature representation by fusing neighbor nodes and its own information through type-aware attention layer; the model parameters are optimized by mean square error loss function, and the initial heterogeneous graph attention model is trained ; calculate the initial mean absolute error prediction value MAE0 by the test set; S42: for the nth iteration model M n , select high-value samples S n from the unlabeled sample pool U through confidence and error; S43: sample labeling and training set expansion, for high-value sample point S n , the frequency response curve of the system inertia center is obtained by time domain simulation, and the index label is calculated to form a labeled sample L n , and the high-value sample point together constitute a supplementary training set {S n, L n}, and are incorporated into the current training set to obtain an updated training set ; S44: model iterative training, output the final updated training set and the trained heterogeneous graph attention model.

[0009] Preferably, the heterogeneous graph attention model for frequency instability risk assessment in step S4 comprises a node type-aware attention layer, a global pooling layer and a fully connected layer connected in sequence; the type-aware attention layer is used for extracting and fusing the input features of the target node under different operating modes and expected disturbances, the neighbor nodes of the target node are determined by the power grid topology, and the feature fusion of the target node is completed by two steps of conversion operation and neighborhood aggregation; the global pooling layer is used for receiving the local feature vectors of each node output by the multi-layer type-aware attention layer, and is used for fusing the features of each node in the graph to form a global vector feature; the fully connected layer is used for receiving the global vector feature output by the global pooling layer, and is used for mapping the global vector feature to a frequency stability index.

[0010] Preferably, the specific step S5 is as follows: S51, the regulation center collects the current node voltage data, power data and wind speed, illumination intensity and other operating data of the wind and light nodes of the power grid at the current time through the SCADA or WAMS system, and generates a disturbance set that may occur in the current power grid in combination with the current thermal power unit output scheduling value; S52, for each disturbance element in the disturbance set, the corresponding input feature vector is selected from the SCADA collected data according to the node type ; the z-score standardization method is used to normalize all parameters in the input feature vector to form an input feature matrix; S53, traverse all possible expected disturbances, input the input feature matrix and the adjacency matrix into the trained heterogeneous graph attention network model for new energy power system frequency instability risk assessment, and obtain the frequency stability index value corresponding to the disturbance; according to the probability distribution of all frequency stability indexes, in combination with the risk matrix, the current frequency instability risk of the new energy power system is evaluated.

[0011] Therefore, the new energy power system frequency instability risk assessment method based on the heterogeneous graph attention network has the beneficial effects that: (1) When constructing the wind power-photovoltaic heterogeneous graph, node type division is performed, and the input feature vector is selected according to the node type, the heterogeneous graph attention network model describes the frequency response characteristics of different types of device nodes, effectively capturing the essential differences between wind power and photovoltaic in meteorological dependence and dynamic response mechanism; at the same time, the heterogeneous graph attention network can reflect the influence of different wind and light positions and disturbance types on the system dynamic frequency, and improve the accuracy of frequency instability risk assessment.

[0012] (2) The active learning iterative training mode is adopted to replace the fixed training set training. Through the closed-loop process of "unlabeled sample pool screening - high-value sample labeling - dynamic expansion of training set", the sample with low model accuracy is prioritized, avoiding redundant labeling of invalid scenarios by the fixed training set. At the same time, it ensures that the sample set accurately covers key coupled scenarios such as wind and solar load fluctuations, multiple disturbances, and communication delays, thereby improving the accuracy and speed of frequency instability risk assessment.

[0013] (3) The heterogeneous graph attention network model fuses the features of each node in the graph through a global pooling layer and splices the attention results of several types of perceptual attention layers. By adjusting the attention weights, it focuses more on important features and ignores unimportant features, shortens the online evaluation time, and solves the problem of insufficient real-time performance caused by the "explosion of combination number" under high-dimensional variables.

[0014] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating the frequency instability risk assessment method for new energy power systems based on heterogeneous graph attention networks according to the present invention. Figure 2 This is a schematic diagram of the power system diagram structure mapping of the present invention; Figure 3 This is the system frequency response curve of the multi-region interconnected power system of the present invention when affected by wind speed changes; Figure 4 This is the system frequency response curve of the multi-region interconnected power system of the present invention when affected by changes in light intensity; Figure 5 This refers to the active learning and training process of the heterogeneous graph attention network model. Figure 6 This is the structure of the frequency instability risk assessment model under the anticipated disturbance of this invention; Figure 7 This is a schematic diagram illustrating the operation of a single attention head in this invention; Figure 8 This is the specific evaluation process of the frequency instability risk assessment method for new energy power systems based on heterogeneous graph attention networks according to the present invention. Figure 9 This is a schematic diagram of the modified IEEE-39 node system of the present invention, which is based on the heterogeneous graph attention network for assessing the frequency instability risk of new energy power systems. Detailed Implementation

[0016] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0017] The embodiment provides a new energy power system frequency instability risk assessment method based on a heterogeneous graph attention network, as shown in the figure. Figure 1 The method comprises the following steps: S1, constructing an adjacency matrix according to a power grid topology and performing node type division, taking power source nodes, load nodes, transmission nodes and other heterogeneous nodes in the power grid as vertices of a graph, taking power transmission lines in the power grid as edges of the graph, modeling the vertices by using a node feature matrix, modeling the edges by using an adjacency matrix, forming a wind power-photovoltaic heterogeneous graph model; the graph structure data used to train the new energy power system frequency instability risk assessment model comprises a node feature matrix (wherein F is the node feature dimension), a frequency stability index label matrix and an adjacency matrix . The specific steps of constructing the wind power-photovoltaic heterogeneous graph in combination with the adjacency matrix and the input feature matrix are as follows: S11, performing node type division according to the power grid topology, the node types comprising wind turbine nodes , photovoltaic nodes , synchronous generator nodes , load nodes and transmission nodes ; wherein the transmission node is a node without active power production / consumption, and only bears the functions of power transfer and topology connection.

[0018] S12, constructing an adjacency matrix, to cope with the problem of frequent changes of the distribution network topology, the distribution network topology connection relationship is modeled by using a self-loop adjacency matrix . For two nodes of a bus i and a bus j , if the two nodes are directly connected through a line, then =1, otherwise =0, at the same time =1, =1, that is: .

[0019] Constructing a wind power-photovoltaic heterogeneous graph in combination with input features. The power system is a network in which buses, power transmission lines and the like connect power sources and multiple loads, and has typical graph structure characteristics. Therefore, the above-mentioned heterogeneous nodes of the system can be mapped as vertices of a graph, the power transmission lines in the power grid can be mapped as edges, and the power system can be mapped as a graph structure, and the specific mapping process is as shown in the figure. Figure 2

[0020] The wind power-photovoltaic heterogeneous graph is defined as , wherein is a node set, ​​is the edge set; consider a set of node types , for each node in the wind-PV heterogeneous graph , define , where is a mapping function from node to node type ; consider a set of edge types , an edge from node i to node j is represented by a triple , and the edge set connected to node j is defined as .

[0021] S2, determine the node input feature vector of the sample set: combine sampling of different operating modes and expected disturbances of the wind-PV heterogeneous graph, the operating modes include load level, wind speed, and light intensity, and the expected disturbances include load step disturbance and generator outage disturbance of different positions and sizes; collect voltage data and power data of each node under each working condition, and determine the corresponding input feature vector combined with the node type. The input feature vectors corresponding to different types of nodes are as follows: For wind turbine nodes , select node voltage amplitude , phase angle , active power injected by the generator , reactive power , node wind speed instantaneous value , and expected disturbance information as initial input features. For PV nodes , select node voltage amplitude , phase angle , active power injected by the generator , reactive power , node light intensity , and expected disturbance information as initial input features. For synchronous generator nodes , select node voltage amplitude , phase angle , active power injected by the generator , reactive power , and expected disturbance information as initial input features. For load nodes , select node voltage amplitude , phase angle , active power absorbed by the load , reactive power , and expected disturbance information as initial input features. For transmission nodes , select node voltage amplitude , phase angle as initial input features.

[0022] In step S2, the steps of constructing the input feature vector sample set are as follows: the sample set includes a training set and a test set; the training set includes an initial training set and a supplementary training set, the initial training set is composed of typical scene sampling samples and part of random scene sampling samples, and the supplementary training set is formed by high-value samples screened from the unlabeled sample pool combined with output labels.

[0023] S21, a wind power-photovoltaic heterogeneous graph is established for the modified IEEE39 node system, the operation mode considers different load levels and wind and light output power, three different load levels are set, k-medoids clustering is used to obtain typical values of wind power output and photovoltaic output, and the wind speed of each wind turbine and the light intensity of the photovoltaic unit are set. For the expected disturbance information, the disturbance position is directly coded based on the power grid topology, the disturbance position is set as the node in the heterogeneous graph, the disturbance amount is taken as the input feature of the node, and the input feature of the node without disturbance is 0; two types of expected power disturbances, load power mutation and generator tripping (including new energy unit off-grid), are set: load power mutation and generator tripping occur at key nodes. The above different operation modes and expected disturbances are combined and sampled to collect voltage data and power data of each node under each working condition, and the node input feature vector of the sample set is determined in combination with the node type.

[0024] S22, for the initial training set: in typical scene sampling, in terms of operation mode, according to the historical data of wind speed, light intensity and load output provided by the dispatching center, k-medoids clustering is used to obtain the typical values of the respective outputs, the wind speed of the wind turbine is set to 5, 9 and 13 m / s, the light intensity of the photovoltaic unit is set to 385, 729 and 1066 W / m 2 , and three load levels of 80%, 100% and 120% are set; in terms of expected disturbance, two types of load power mutation and generator tripping are set, load mutation occurs at key nodes (nodes 7, 12, 15, 18, 23, 25, 26 and 31), and the disturbance amount is set to -10%, -5%, 5% and 10% of the basic load power, a total of four; the generator tripping is set at nodes 30, 31, 32, 33, 34, 35 and 37, and the tripping amount is 10%, 20% and 30%; from the above combinations, combinations with historical data annual occurrence frequency ≥5 times and power flow convergence are preferentially retained, and finally 800 typical scenes are selected.

[0025] In random scene sampling, 200 samples are randomly generated by the Monte Carlo method, in which the wind speed is in the range of [5, 13] m / s, the light intensity is in the range of [300, 1200] W / m 2 , the load is in the range of [40%, 120%], and the disturbance is in the range of ±20%; the random sample needs to meet the probability density function consistent with the distribution of the measured data of the dispatching center.

[0026] S23, for the supplementary training set, first build an unlabeled sample pool: 1000 samples are randomly generated by Monte Carlo method, the random samples need to meet the probability density function consistent with the distribution of the measured data of the dispatch center, the parameter range is expanded to wind speed in [2, 14] m / s, light intensity in [100, 1400] W / m 2 Value, load in [30%, 130%] value, disturbance in ± 30% value, only keep the input features (without output label), form an unlabeled sample pool U; then, in the process of S4 model training, high value samples are selected from the unlabeled sample pool, and the output label is combined to form a supplementary training set.

[0027] S24, for the test set sample, randomly extract 20% samples from the unlabeled sample pool, and label them as test set after frequency index label, the test set and the unlabeled sample pool data are consistent in distribution and have no repetition, which is used to monitor the overfitting of training process and iteration termination judgment.

[0028] S3, for each type of sample set set in S2, PSS / E is used for time domain simulation to form the output label sample set: the time scale of each simulation is set to 40s, the frequency response curve of the system inertia center under each working condition is extracted, and the frequency stability index value label corresponding to the sample is calculated accordingly; The frequency stability index value label includes the maximum frequency deviation , its occurrence time, initial frequency change rate , quasi-steady frequency deviation and frequency recovery time.

[0029] Taking the improved New England 10-machine 39-node system as an example, the influence of 0.5p.u. up and down fluctuation of wind speed and light on frequency response in the disturbance process is analyzed, and the system frequency response curve under different fluctuations is obtained as Figures 3-4 .

[0030] S4, build a heterogeneous graph attention network model (HetSANN model) suitable for frequency instability risk assessment of power system containing wind and light uncertainty, and train the optimized heterogeneous graph attention network model through input feature vector sample set and output label sample set, the active learning training process is as shown in Figure 5 .

[0031] S41, model initialization: input the input feature vector and label corresponding to the initial training set into the heterogeneous graph attention network, each node updates its feature representation by fusing neighbor nodes and its own information through type perception attention layer; the model parameters are optimized by mean square error loss function, and the initial heterogeneous graph attention model is trained; the initial mean absolute error prediction value MAE0 is calculated by the test set; S42, for the nth iteration model Mn High-value samples were selected from the unlabeled sample pool U: (1) Low confidence screening: For any sample in the unlabeled sample pool U x Input it into the current model M n The output shows the fluctuation range of the predicted value of the frequency index, and the confidence level is calculated. conf(x) The closer the value is to 1, the smaller the fluctuation of the predicted value and the more certain the model is; ; in Δy For the model to sample x The deviation between the predicted value and the predicted mean under this type of working condition. y max This represents the maximum possible value for this indicator; Samples with a confidence level < 0.6 were selected from among them; (2) Error-sensitive node screening: Extracting M n For nodes in the test set whose prediction errors rank in the top 10%, samples containing such nodes are preferentially retained from the low-confidence samples as high-value sample points S. n ; S43. Sample Labeling and Training Set Expansion: For high-value sample points S n The frequency response curve of the system's center of inertia was obtained using time-domain simulation, and the index labels were calculated to form labeled sample L. n Together with high-value sample points, they form a supplementary training set {S}. n, L n The data is then merged into the current training set to obtain the updated training set. ; S44, Model Iterative Training: Using Retrain the model to obtain M n+1 The mean absolute error prediction (MAE) is calculated using the test set. n+1 ;If MAE n+1 Compared to MAE n If the decrease is greater than 0.001 and the number of iterations is less than 10 (maximum number of iterations), then M is used. n+1 For the current model, return to S42 to continue filtering samples; If the error decreases by ≤0.001 for three consecutive iterations or the number of iterations reaches 10, stop the iteration and output the final updated training set and the trained heterogeneous graph attention model. Figure 6 As shown, the heterogeneous graph attention network model consists of a type-aware attention layer, a global pooling layer, and a fully connected layer connected sequentially. The type-aware attention layer (TAL) is... A layered structure is used to extract and fuse the input features of target nodes under different operating modes and anticipated disturbances based on the power grid topology; in the heterogeneous graph attention network model, a type-aware attention layer is used to replace the convolutional layer in the graph convolutional neural network (GNN), the first... The first attention point in the The output of the type-aware attention layer is ,like Figure 7 As shown, This is accomplished in two steps: transformation and neighborhood aggregation. The global pooling layer, structurally, receives the local feature vectors of each node from the multi-layered type-aware attention layer; functionally, it fuses the features of each node in the graph to form a global vector feature. The fully connected layer, structurally, receives the global vector feature output from the global pooling layer; functionally, it maps the global vector feature to a frequency stability index.

[0032] The specific implementation process of the heterogeneous graph attention network model architecture is as follows: (1) Transformation operation: Heterogeneous nodes are mapped to the same target space through feature transformation. i Each neighbor node j The formula for calculating linear transformations is as follows: ; Among them, nodes The mapping relationship between it and its corresponding node type is represented as follows: ; For from the first l layer Type space to () l+ 1) Layer Mapping of type space; For the ( l+ 1) Layer, No. Node types in each attention head For node types The linear transformation matrix, After the transformation operation, the () l+ 1) Layer feature vector dimensionality Before the conversion operation l Initial feature vector of layer dimensionality It is the set of real numbers; (2) Neighborhood aggregation: The attention mechanism is used to aggregate various relationship information between neighboring nodes after projection, and the corresponding attention scoring function is used for different types of relationships: The attention coefficients between neighboring nodes are as follows: ; in, For the ( l+ 1) Layer Graph Attention Layer Nodes in each attention head j For nodes i The importance of each node is considered. In power system frequency instability risk assessment, for neighboring nodes transformed into the target node space, a scaled dot product attention scoring function is used to give the initial attention. To incorporate power grid physical information, the admittance of each transmission line in the power grid is used to weight the initial attention coefficients, defining... W ij For nodes i, j mutual admittance and node i The ratio of self-induced admittance is: ; ; ; in, , These are the query vector and key vector obtained after linear transformation, respectively; , They are respectively the ( l+ 1) Layer Graph Attention Layer Node types in each attention head Query feature transformation matrix and node type The key feature transformation matrix; To scale the dot product function and characterize the vector q and k The correlation, Let be the scaling factor for the dot product, and take . The dimension. The softmax function is used to... Normalization is performed to obtain the attention coefficient. , measure the ( l+ 1) Layer Graph Attention Layer Nodes in each attention head j For nodes i The degree of importance.

[0033] (3) Combining the above two steps, perform node operations. i Neighborhood aggregation: using Head attention, concatenating the results of each head attention as the output, then the ()th head attention... l+ 1) The output of the layer type-aware attention layer is as follows: ; in, For the first l Layer nodes The input feature vector; For feature concatenation operators; (4) For the last layer of the type-aware attention layer, its output is Feature matrix The global pooling layer uses the max global pooling vector to fuse global information.

[0034] (5) A nonlinear mapping between node input features and frequency stability index is achieved through a fully connected layer, and the activation function is eLU.

[0035] The steps for applying the optimized heterogeneous graph attention model are as follows: (1) The control center collects the voltage data, power data and wind speed and light intensity of each node of the power grid at the current moment through the SCADA or WAMS system, and generates the set of possible disturbances of the power grid in combination with the current output scheduling value of the thermal power unit.

[0036] (2) For each disturbance element in the disturbance set, select the corresponding input feature vector from the SCADA data according to the node type. The z-score normalization method is used to normalize all parameters in the input feature vector to form the input feature matrix.

[0037] (3) Traverse all possible anticipated disturbances, input the input feature matrix and adjacency matrix into the trained heterogeneous graph attention network model for frequency instability risk assessment of new energy power system, and obtain the frequency stability index value corresponding to the disturbance; based on the probability distribution of all frequency stability indices and combined with the risk matrix, assess the current frequency instability risk of new energy power system.

[0038] To verify the effectiveness of this embodiment, relevant simulations were performed on the improved IEEE-39 node system. The sample simulations were completed using PSS / E software. The heterogeneous graph attention network model was implemented using Python 3.8, PyTorch 1.12.0, and PyTorchGeometric 2.3.0. The frequency instability risk assessment process is as follows: Figure 8 As shown. A schematic diagram of the modified IEEE-39 node system, as follows. Figure 9 As shown, the synchronous generator units connected to buses 32 and 35 are replaced with equivalent wind farms, and the units connected to buses 33 and 37 are replaced with photovoltaic units, while the capacity remains unchanged. Initial feature vectors are selected based on node type, as shown in Table 1.

[0039] Table 1 Initial Input Feature Description

[0040] First, a sample set needs to be constructed, which requires generating the operating mode and the expected perturbation respectively.

[0041] For the initial training set: in the typical scene sampling, in terms of operation mode, according to the historical data of wind speed, light intensity and load output provided by the dispatching center, the k-medoids clustering is used to obtain the respective typical values of the output, the fan wind speed is set to 5, 9 and 13 m / s, the light intensity of the photovoltaic unit is set to 385, 729 and 1066 W / m 2 ; 80%, 100% and 120% are set as three load levels, and the generator output is adjusted according to the load level; in terms of expected disturbance, two types of load power mutation and generator tripping are set, the load mutation occurs at the key nodes (nodes 7, 12, 15, 18, 23, 25, 26 and 31), and the disturbance amount is set to -10%, -5%, 5% and 10% of the basic load power, a total of four; the tripping disturbance is set at nodes 30, 31, 32, 33, 34, 35 and 37, and the tripping amount is 10%, 20% and 30%; the above sample generation scheme is listed in Table 2: Table 2 Generation of initial training set samples

[0042] From the above combinations, the combinations with a historical data occurrence frequency of ≥5 times in the dispatching center and a power flow convergence are preferentially retained, and finally 800 typical scenes are selected; In the random scene sampling, 200 samples are randomly generated by the Monte Carlo method, in which the wind speed is in the range of [5, 13] m / s, the light intensity is in the range of [300, 1200] W / m 2 , the load is in the range of [40%, 120%], and the disturbance is in the range of ±20%; the random samples need to meet the probability density function consistent with the distribution of the measured data of the dispatching center.

[0043] For the supplementary training set, first, an unlabeled sample pool is constructed: 1000 samples are randomly generated by the Monte Carlo method, the random samples need to meet the probability density function consistent with the distribution of the measured data of the dispatching center, the parameter range is expanded to wind speed in the range of [2, 14] m / s, light intensity in the range of [100, 1400] W / m 2 , load in the range of [30%, 130%], and disturbance in the range of ±30%, only the input features (without output labels) are retained to form the unlabeled sample pool U; then, in the S4 model training process, high-value samples are selected from the unlabeled sample pool, and the output labels are combined to form the supplementary training set.

[0044] For the test set samples, 20% of the samples are randomly selected from the unlabeled sample pool, and after being labeled by the frequency index label, they are used as the test set. The test set and the unlabeled sample pool data have consistent distribution and no repetition, and are used to monitor the overfitting of the training process and the iteration termination judgment.

[0045] Each sample set is combined with the above different operating modes and expected disturbances to simulate the original measurement data after the power flow converges under different operating conditions, extract the voltage amplitude, phase angle, active and reactive power data of each node in each group of original measurement data, and the wind speed and light intensity of wind and light nodes, and determine the node input feature vector of the sample set according to the node type.

[0046] PSS / E is used for time domain simulation, the time scale of each simulation is set to 40s, the disturbance is applied at 1s, and the frequency stability index is calculated according to the frequency response curve of the inertia center of the system after the disturbance, as the sample label.

[0047] Then the model is trained and tested. The prediction accuracy of the model is measured by the maximum absolute error MAE, the root mean square error RMSE and the average relative error MRE, and the calculation formulas are as follows: ; ; ; Wherein, is the number of test samples.

[0048] In order to test the actual performance of the model proposed in this paper, the following machine learning models are used as control experiments under the premise of the same data samples: support vector machine (SVM), light gradient boosting machine (LightGBM), convolutional neural network CNN, graph convolution network (GCN), and graph attention network GAT, etc. Among them, GCN, GAT and the graph features of HetSANN used in this paper are the same; the experimental results of all control group models and HetSANN on the test set are shown in Table 3.

[0049] Table 3 Test results of different models in improving IEEE39 node system

[0050] It can be seen that the MAE, RMSE and MRE of HetSANN are 0.006, 0.009 and 0.43% respectively, and the error index is the lowest in the test model. SVM performs the worst because the artificial feature extraction used by it lacks effective use of the topological features of the data. Although CNN can extract local features, the grid topology is a non-Euclidean structure, and its convolution kernel cannot adapt to the long-distance dependence of the topology, and its performance is slightly worse than that of the graph method (GCN, GAT, HetSANN). In the graph method, GAT can better represent the features of the node neighborhood in the graph by introducing a self-attention mechanism, and its performance is better than that of GCN. HetSANN can dynamically allocate the attention weight of the cross-type edge and accurately capture the frequency interaction of the heterogeneous node. Therefore, the HetSANN method can realize accurate prediction and evaluation of the frequency stability index based on the operating mode information and the expected disturbance.

[0051] Taking the above sample set as an example, the time for off-line calculation and on-line evaluation by time domain simulation, SVM, GCN and the frequency instability risk evaluation method based on HetSANN model proposed in the present application under the same conditions was tested, and the test results are shown in Table 4.

[0052] Table 4 Comparison of time consumption of real-time frequency instability risk evaluation in improved IEEE39 node system

[0053] The HetSANN model considers the heterogeneity of different types of nodes, and needs to design a dedicated feature transformation matrix for different types of nodes, so the parameter size is large, and the model training time is long. By adjusting the attention weight to pay more attention to important features and ignore non-important features, the test time is the shortest.

[0054] In summary, the new energy power system frequency instability risk evaluation method based on the heterogeneous graph attention network adopted in the present application effectively captures the essential differences between wind power and photovoltaic in meteorological dependence and dynamic response mechanism, shortens the on-line evaluation time, and balances the evaluation accuracy and calculation efficiency.

Claims

1. A method for assessing the frequency instability risk of a new energy power system based on heterogeneous graph attention networks, characterized in that, Includes the following steps: S1: Based on the power grid topology, the node types are divided, with nodes as vertices and vertices modeled using node feature matrices, and transmission lines as edges and edges modeled using adjacency matrices, to construct a wind power-photovoltaic heterogeneous graph model; S2: Determine the node input feature vector of the sample set, perform combined sampling for different operating modes and anticipated disturbances of the wind power-photovoltaic heterogeneous diagram, collect voltage and power data of each node under each operating condition, and determine the corresponding input feature vector in combination with the node type; S3: Calculate the frequency stability index label of the sample set; S4: A heterogeneous graph attention network model for assessing the frequency instability risk of new energy power systems through active learning training; S5: The control center collects the current operating data of each node in the power grid and, combined with the current output dispatch value of thermal power units, generates a set of possible disturbances in the current power grid. For each disturbance element in the disturbance set, the node input feature vector is constructed according to S2, and input into the trained heterogeneous graph attention network model for frequency instability risk assessment of the new energy power system to obtain the frequency stability index value corresponding to the disturbance. Based on the probability distribution of all frequency stability indices and combined with the risk matrix, the current frequency instability risk of the new energy power system is assessed.

2. The method for assessing the frequency instability risk of a new energy power system based on a heterogeneous graph attention network according to claim 1, characterized in that, In step S1, a wind power-photovoltaic heterogeneous graph is constructed based on the adjacency matrix and the input feature matrix. The specific steps are as follows: S11. Classify node types according to the power grid topology. Node types include power generation nodes and load nodes. and transmission nodes Power nodes include wind turbine nodes. Photovoltaic nodes and synchronous generator nodes Using the aforementioned nodes as vertices of the graph and the transmission lines in the power grid as edges, we obtain the vertex set. Sum of edges ; Among them, transmission nodes are nodes that do not actively produce or consume electrical energy, but only undertake the functions of power transfer and topology connection; S12. Construct the adjacency matrix for the buses in the system. i With busbar j If two nodes are directly connected by a line, then =1, otherwise =0, at the same time =1、 =1.

3. The method for assessing the frequency instability risk of a new energy power system based on heterogeneous graph attention networks according to claim 1, characterized in that: In step S2, the operating mode includes load level, wind speed, and light intensity, and the anticipated disturbances include load step disturbances and tripping disturbances of different locations and sizes; The sample set is set as follows: The sample set includes a training set and a test set; the training set includes an initial training set and a supplementary training set. The initial training set consists of sampled samples from typical scenarios and sampled samples from some random scenarios. The supplementary training set is formed by combining high-value samples selected from the unlabeled sample pool with the output labels. S21. For the initial training set: In the sampling of typical scenarios, the penetration rate of new energy, load level and daily operating conditions with complex disturbances are covered. In terms of operation mode, based on the historical data of wind speed, light intensity and load output provided by the dispatch center, k-medoids clustering is used to obtain the typical output values ​​of each, and multiple different wind turbine wind speeds, photovoltaic unit light intensity and load levels are set. Regarding anticipated disturbances, two types are set: load power surges and generator disconnection. Load surges occur at critical nodes, and the disturbance amounts are set to various base load powers. Generator disconnection disturbances are set at designated nodes, with different disconnection amounts. Seven-dimensional hypercube sampling is performed based on wind speed × light intensity × load level × load disturbance, shedding disturbance magnitude and location. A set number of samples are taken for each dimension. From the above combinations, the combinations that occur more than or equal to the set number of times in the annual historical data of the dispatch center and whose power flow converges are prioritized. Finally, a set number of typical scenarios are selected. In random scenario sampling, a set number of samples are randomly generated using the Monte Carlo method, where wind speed, light intensity, load, and disturbance are all within a set range. The random samples must satisfy the probability density function being consistent with the distribution of the measured data from the dispatch center. S22. For the supplementary training set, firstly, an unlabeled sample pool is constructed: a set number of samples are randomly generated using the Monte Carlo method. The random samples must satisfy the probability density function being consistent with the distribution of the actual measured data from the dispatch center. Wind speed, light intensity, load, and disturbance are all within a set range. Only the input features are retained to form an unlabeled sample pool U. Then, during the training of the heterogeneous graph attention network model, high-value samples are selected from the unlabeled sample pool and combined with the output labels to form a supplementary training set. S23. For the test set samples, 20% of the samples are randomly selected from the unlabeled sample pool and labeled with frequency index labels to serve as the test set. The test set has the same working condition distribution as the unlabeled sample pool data and has no overlap. It is used to monitor overfitting and iteration termination judgment during the training process. S24. For each sample set, the above-mentioned different operating modes and expected disturbances are combined and sampled. The voltage data and power data of each node under each operating condition are collected, and the node input feature vector of the sample set is determined by combining the node type. The specific input feature vectors corresponding to different types of nodes are as follows: For wind turbine nodes The node voltage amplitude and phase angle, the active power and reactive power injected by the generator, the instantaneous value of the node wind speed, and the expected disturbance information are selected as the initial input features. For photovoltaic nodes The node voltage amplitude, phase angle, active power and reactive power injected by the generator, node illumination intensity and anticipated disturbance information are selected as initial input features. For synchronous generator nodes The node voltage amplitude, phase angle, active power and reactive power injected by the generator, and the expected disturbance information are selected as the initial input features. For load nodes The node voltage amplitude, phase angle, active power and reactive power absorbed by the load, and anticipated disturbance information are selected as initial input features. For transmission nodes The node voltage amplitude and phase angle are selected as the initial input features.

4. The method for assessing the frequency instability risk of a new energy power system based on heterogeneous graph attention networks according to claim 1, characterized in that: In step S3, the steps for calculating the sample set frequency stability index value label are as follows: For the various sample sets set in step S2, perform time-domain simulation, extract the frequency response curve of the system inertial center under each working condition, and calculate the frequency stability index value label corresponding to the sample. The frequency stability index labels include the maximum frequency deviation and its occurrence time, the initial frequency change rate, the quasi-steady-state frequency deviation, and the frequency recovery time.

5. The method for assessing the frequency instability risk of a new energy power system based on heterogeneous graph attention networks according to claim 1, characterized in that: Step S4 describes the active learning and training process of the heterogeneous graph attention model for frequency instability risk assessment, which includes: S41: Model Initialization: Input the input feature vectors and labels corresponding to the initial training set into the heterogeneous graph attention network. Each node updates its feature representation by fusing information from neighboring nodes and itself through a type-aware attention layer. The model parameters are optimized using the mean squared error loss function to train the initial heterogeneous graph attention model. ; Calculate the initial mean absolute error prediction value MAE0 using the test set; S42: selecting high-value samples S from the pool of unlabeled samples U n , filtering high-value samples S by confidence and error n , filtering high-value samples S by confidence and error S43: Sample labeling and training set augmentation, for high-value sample points S n The frequency response curve of the system's center of inertia was obtained using time-domain simulation, and the index labels were calculated to form labeled sample L. n Together with high-value sample points, they form a supplementary training set {S}. n, L n The data is then merged into the current training set to obtain the updated training set. ; S44: Iterative training of the model, outputting the final updated training set and the trained heterogeneous graph attention model.

6. The method for assessing the frequency instability risk of a new energy power system based on a heterogeneous graph attention network according to claim 5, characterized in that: The heterogeneous graph attention model for frequency instability risk assessment described in step S4 includes a node type-aware attention layer, a global pooling layer, and a fully connected layer connected in sequence. The type-aware attention layer is used to extract and fuse the input features of the target node under different operating modes and anticipated disturbances. The neighboring nodes of the target node are determined by the power grid topology, and the feature fusion of the target node is completed in two steps: transformation operation and neighborhood aggregation. The global pooling layer is structurally used to receive the local feature vectors of each node output by the multi-layer type-aware attention layer, and functionally used to fuse the features of each node in the graph to form a global vector feature. The fully connected layer is structurally used to receive global vector features output by the global pooling layer, and functionally used to map the global vector features into frequency stability indices.

7. The method for assessing the frequency instability risk of a new energy power system based on a heterogeneous graph attention network according to claim 1, characterized in that, The specific steps in S5 are as follows: S51. The control center collects the voltage data and power data of each node of the power grid at the current moment, as well as the wind speed and solar intensity of wind and solar nodes, through the SCADA or WAMS system. Combined with the current output dispatch value of thermal power units, it generates a set of possible disturbances to the power grid at the current moment. S52. For each disturbance element in the disturbance set, select the corresponding input feature vector from the SCADA data according to the node type. The z-score normalization method is used to normalize all parameters in the input feature vector to form the input feature matrix. S53. Traverse all possible anticipated disturbances, input the input feature matrix and adjacency matrix into the trained heterogeneous graph attention network model for assessing the frequency instability risk of the new energy power system, and obtain the frequency stability index value corresponding to the disturbance; based on the probability distribution of all frequency stability indices and combined with the risk matrix, assess the current frequency instability risk of the new energy power system.

Citation Information

Cited By

  • Power distribution network distributed resource optimal scheduling method and system based on active learning feasibility classification

    CN122292566A

  • Power distribution network distributed resource optimal scheduling method and system based on active learning feasibility classification

    CN122292566B