Method and device for evaluating small-interference stability of power system
Through the edge node attention graph neural network combined with the node-level and edge-level attention mechanism, the problem of large computing burden and low accuracy of small signal stability evaluation in the existing technology is solved, and the efficiency and accuracy of small interference stability evaluation of power system is achieved. and timeliness.
Patent Information
- Application Number
- CN202411241677.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art has a high computational burden and low accuracy in small signal stability evaluation, making it difficult to effectively evaluate the low-frequency oscillation and stability of power systems.
Small interference simulation data are generated through power system simulation software, feature selection and pattern matching are performed, edge node attention graph neural network is built, and the model is trained to improve evaluation accuracy and efficiency.
It reduces the calculation burden of the model, improves the accuracy and efficiency of small interference stability evaluation, enhances the timeliness and practicality of the stability evaluation of the power system, and ensures that the power system remains efficient and stable under various conditions.
Smart Images

Figure CN119209485A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a method and device for evaluating small disturbance stability of a power system. Background Art
[0002] With the continuous advancement of the construction of new power systems, the continuous expansion of the scale of power grids, the grid connection of high-penetration renewable energy and the interconnection of ultra-long-distance AC and DC systems, low-damping oscillations caused by weak damping have become a major problem, which helps to identify potential stability problems and ensure the reliable operation of power systems. Small signal stability refers to the ability of a power system to maintain stable operation under small disturbances; these disturbances may include fluctuations in load demand, generator output, and changes in system parameters; small signal stability analysis includes studying the response of the system to these small disturbances and determining whether it will remain stable or exhibit unstable oscillations; small signal stability assessment plays a very important role in the analysis and control of power systems; therefore, accurate assessment of small disturbance stability characteristic parameters is of great significance for early warning of low-frequency oscillations under stable system operation and timely response measures.
[0003] In the prior art, small signal stability assessment is mostly solved by mathematical model analysis based on physical principles, which can be divided into two categories. One is feature analysis based on linearized models. However, as a large number of power electronic equipment and their control are added to the power system, this method has the problem of very large dimensions of dynamic mathematical models, long calculation time and heavy calculation burden. The other is to extract oscillation mode information such as oscillation frequency and damping ratio based on the time domain simulation results of nonlinear models. Although this method has strong adaptability to the model, it is difficult to obtain comprehensive oscillation mode information, so its stability assessment accuracy is low. Summary of the invention
[0004] The present invention provides a method and device for evaluating the small disturbance stability of an electric power system, so as to achieve the technical effect of reducing the model calculation burden, improving the model calculation rate and the evaluation accuracy.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for evaluating small disturbance stability of a power system, comprising the following steps:
[0006] Generate and obtain small disturbance simulation data through power system simulation software, perform feature selection and pattern matching on the small disturbance simulation data, and obtain a graph structure sample set;
[0007] An edge node attention graph neural network is constructed and trained based on the graph structure sample set, and the acquired real-time flow data is input into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results.
[0008] The small disturbance stability evaluation method provided by the present invention first generates the small disturbance simulation data of the target power system to be evaluated through the power system simulation software, and uses the generated small disturbance simulation data as the training sample data of the subsequent edge node attention graph neural network model, which not only improves the evaluation accuracy of the trained model for the target power system, but also improves the sensitivity of the trained model to the data in the target power system. After obtaining the small disturbance simulation data, the system will also perform feature selection and pattern matching on it to obtain a graph structure sample set, process the data format of the small disturbance simulation data into a data format that is more in line with the edge node attention graph neural network, and use the processed data as sample data to facilitate subsequent input into the model for model training.
[0009] After obtaining the training sample data, the system will construct and train the edge node attention graph neural network based on the graph structure sample set to facilitate the subsequent evaluation of the real-time power flow data of the power system. At the same time, since the constructed neural network not only refers to the node-level attention mechanism, but also refers to the edge-level attention mechanism, that is, the importance of attention is sorted from two perspectives, namely, the nodes of the power system and the information flowing between nodes, namely the edges, so as to improve the accuracy, reliability and practicality of the evaluation results output by the model.
[0010] At the same time, by collecting and evaluating the real-time data of the power system through the trained model, the efficiency and timeliness of evaluating the stability of the power system are improved, and the speed at which the power system maintenance personnel respond to the instability of the power system is further improved. The reference to the edge information, that is, the model of the flow of information between nodes, further enhances the importance of edge information and realizes a deeper integration of the model with respect to the physical topology of the power system.
[0011] As a preferred example, the small disturbance simulation data is generated and obtained by the power system simulation software, specifically:
[0012] Constructing a power system flow model through the power system simulation software, and adjusting the parameters of the power system flow model according to preset adjustment parameters to obtain the small disturbance simulation data;
[0013] Feature selection and pattern matching are performed on the small interference simulation data to obtain a graph structure sample set.
[0014] In order to improve the similarity between the obtained small disturbance simulation data and the real data of the power system, the stability assessment method provided by the present invention first constructs a simulation flow model of the power system through the power system simulation software, and then adjusts the corresponding parameters of the constructed simulation flow model of the power system according to the parameters of the power system, so that the similarity between the adjusted model and the real power system is further improved, and indirectly improves the authenticity and practicality of the obtained small disturbance simulation data.
[0015] As a preferred example, the adjustment parameters include: unit load level, unit power generation, load fluctuation, generator output and node voltage.
[0016] As a preferred example, the feature selection and pattern matching are performed on the small interference simulation data to obtain a graph structure sample set, specifically:
[0017] Based on the preset label data, the small interference simulation data is subjected to pattern screening to obtain a pattern to be matched; wherein the label data is identification data of a key pattern; and the key pattern is an oscillation pattern with a risk of instability;
[0018] Extracting feature values from the tag data to obtain tag feature values, and calculating feature vectors from the pattern to be matched to obtain pattern feature vectors;
[0019] Feature pattern matching is performed on the label data and the pattern to be matched according to the label feature value and the pattern feature vector, and the matching result is output as the graph structure sample set.
[0020] In order to convert small interference simulation data into input data that conforms to the edge node attention graph neural network model, after obtaining the small interference simulation data, the system will first perform pattern screening on the simulation data according to the label data corresponding to the key pattern, and extract the relevant data in the simulation data that conforms to the label data as the pattern to be matched, and then extract the feature value from the label data, calculate the feature vector of the matching pattern, that is, the extracted simulation data, and perform pattern matching on the extracted label feature value and the calculated pattern feature vector, that is, determine what kind of key pattern the extracted simulation data are, that is, match the determined part of the data with the corresponding label data, that is, the key pattern.
[0021] Since the key mode is an oscillation mode with the risk of instability, each matched simulation data is simulation data with the risk of instability, that is, the graph structure sample set obtained after matching is the simulation sample data of the power system with the risk of instability, and each sample data corresponds to different instability risks, which provides a data basis for the subsequent construction of the edge node attention graph neural network model.
[0022] As a preferred example, constructing and training an edge node attention graph neural network based on the graph structure sample set specifically includes:
[0023] Obtaining nodes and node features according to the graph structure sample set, and learning and embedding the node features based on node-level attention to obtain node embedding;
[0024] Extracting the connection relationship of each node in the graph structure sample set as an edge feature, and performing edge embedding on the edge feature based on the node embedding to obtain an aggregate feature;
[0025] The aggregated features are learned and trained through a multi-task learning model based on a multi-layer perceptron, and the model is optimized through a loss function to output the edge node attention graph neural network.
[0026] After obtaining the graph structure sample set, the system can build and train the edge node attention graph neural network based on the graph structure sample set. When building the model, the system will add node features and edge features to build the edge node attention graph neural network. Since the node features can only reflect the node itself, that is, they can only reflect the node content from one perspective, and since each node contains multiple types of connection information, if the training model is built only based on the node features, the accuracy of the evaluation results of the constructed model for the power system is limited.
[0027] Therefore, when constructing and training the model, the stability assessment method provided by the present invention not only adds node features, but also adds edge features corresponding to each node, that is, the connection information between each node, so as to enrich the training data type of the model, and realizes the fusion of node features and edge features by embedding edge features into node features, so as to obtain aggregate features, and train and optimize the model by aggregate features, so as to improve the sensitivity of the model to power system flow data.
[0028] As a preferred example, the node features are learned and embedded based on node-level attention to obtain node embedding, specifically:
[0029] Performing node-level attention on the node features through a deep neural network to obtain node-level attention;
[0030] Normalizing the node-level attention through an activation function to obtain a node weight coefficient;
[0031] The node features are learned and embedded based on the node-level attention and the node weight coefficient to obtain the node embedding.
[0032] The above method can be used to perform weight calculation and attention calculation on the node features obtained in the graph structure sample set to determine the importance of each node feature, that is, to determine the weight coefficient of each node feature, and then learn to embed the node features according to the determined weight coefficient to obtain node embedding, which provides a data basis for subsequent edge feature aggregation embedding.
[0033] As a preferred example, the connection relationship of each node in the graph structure sample set is extracted as an edge feature, and the edge feature is edge-embedded based on the node embedding to obtain an aggregate feature, specifically:
[0034] Inputting the edge features and the node embedding into a deep neural network based on edge attention to obtain edge learning weights;
[0035] Normalizing the edge learning weights by using an activation function to obtain edge weight coefficients;
[0036] The edge weight coefficient is used as the coefficient of the node embedding to perform embedding fusion on the node embedding to obtain the aggregate feature.
[0037] The obtained node embeddings and the extracted edge features are input into the edge attention-based deep neural network to obtain the edge learning weights, that is, the weight of each edge feature. The edge weight coefficient is obtained by normalizing the node embeddings through the activation function, that is, the weight of each edge feature is averaged to obtain the edge weight coefficient. The node embeddings are then embedded and fused through the edge weight coefficient to achieve feature fusion embedding of node features and edge features, and the aggregated features can be obtained. The model is trained through the aggregated features to obtain the edge node attention graph neural network.
[0038] As a preferred example, the real-time flow data obtained is input into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results, including:
[0039] Inputting the acquired real-time power flow data into the edge node attention graph neural network for evaluation, so that the model performs pattern matching on the real-time power flow data, and determines the corresponding stable damping ratio according to the matched pattern;
[0040] The real-time power flow data is compared with the stable damping ratio, and the comparison result is output as the evaluation result.
[0041] The stability of the current power system is evaluated by inputting real-time power flow data into the model, which improves the efficiency, timeliness and accuracy of stability evaluation of the power system.
[0042] As a preferred example, after outputting the comparison result as the evaluation result, the method further includes:
[0043] When the evaluation result shows that the power system corresponding to the real-time power flow data is unstable, adjusting the parameters of the power system according to the stable damping ratio, and determining the stability boundary of the power system according to the matched mode;
[0044] When the evaluation result is that the power system corresponding to the real-time power flow data is stable, the stability boundary of the power system is determined according to the matched pattern.
[0045] According to the stability assessment results of the power system, the parameters of the power system are adjusted to optimize the operating status of the power system and ensure that it can maintain high efficiency and stability under various working conditions. The stability boundary of the power system is determined according to the matched mode to provide guidance for the stable operation of the power system, clarify the stable working area of the system, avoid potential unstable factors, and provide a basis for parameter adjustment. Through small disturbance stability analysis, it is also possible to identify and determine the conditions that may cause system instability under various specific power outputs, so as to avoid the occurrence of these conditions in actual operation and ensure the long-term stable operation of the power grid.
[0046] Accordingly, an embodiment of the present invention further provides a small disturbance stability assessment device for a power system, the small disturbance stability assessment device comprising a sample data acquisition module and an edge node network assessment module;
[0047] The sample data acquisition module is used to generate and acquire small disturbance simulation data through power system simulation software, perform feature selection and pattern matching on the small disturbance simulation data, and obtain a graph structure sample set;
[0048] The edge node network evaluation module is used to construct and train an edge node attention graph neural network based on the graph structure sample set, and input the acquired real-time power flow data into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 : A flow chart of an embodiment of a method for evaluating small disturbance stability of a power system provided by the present invention;
[0050] Figure 2 : A structural schematic diagram of an embodiment of a small disturbance stability assessment device for a power system provided by the present invention;
[0051] Figure 3 : A flow chart of an embodiment of a small disturbance assessment method for a heterogeneous edge node graph neural network provided by the present invention;
[0052] Figure 4 : A structural diagram of an embodiment of the multi-task learning model provided by the present invention. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Embodiment 1
[0055] Please refer to Figure 1 , which is a flow chart of an embodiment of a method for evaluating the small disturbance stability of a power system provided by the present invention, including steps 101 to 102, each of which is specifically as follows:
[0056] Step 101: Generate and obtain small disturbance simulation data through power system simulation software, perform feature selection and pattern matching on the small disturbance simulation data, and obtain a graph structure sample set.
[0057] The small disturbance stability assessment method provided by the embodiment of the present invention first generates small disturbance simulation data of the target power system to be assessed through the power system simulation software, and uses the generated small disturbance simulation data as the training sample data of the subsequent edge node attention graph neural network model, which not only improves the assessment accuracy of the trained model for the target power system, but also improves the sensitivity of the trained model to the data in the target power system. After obtaining the small disturbance simulation data, the system will also perform feature selection and pattern matching on it to obtain a graph structure sample set, process the data format of the small disturbance simulation data into a data format that is more in line with the edge node attention graph neural network, and use the processed data as sample data to facilitate subsequent input into the model for model training.
[0058] Specifically, the small interference simulation data is generated and obtained by the power system simulation software in this embodiment, specifically:
[0059] Constructing a power system flow model through the power system simulation software, and adjusting the parameters of the power system flow model according to preset adjustment parameters to obtain the small disturbance simulation data;
[0060] Feature selection and pattern matching are performed on the small interference simulation data to obtain a graph structure sample set.
[0061] In order to improve the similarity between the obtained small disturbance simulation data and the real data of the power system, the stability assessment method provided in the embodiment of the present invention first constructs a simulation flow model of the power system through the power system simulation software, and then adjusts the corresponding parameters of the constructed simulation flow model of the power system according to the parameters of the power system, so that the similarity between the adjusted model and the real power system is further improved, and indirectly improves the authenticity and practicality of the obtained small disturbance simulation data.
[0062] The adjustment parameters in this embodiment include: unit load level, unit power generation, load fluctuation, generator output and node voltage.
[0063] In this embodiment, the system will first construct the target power system through power system simulation software, that is, the power system flow model of the power system to be evaluated for stability, that is, simulate and construct the power flow model of the target power system, and adjust the parameters of the model, including the unit load level, unit power generation power, load fluctuation, generator output, node voltage and other grid parameters of the model.
[0064] The adjustment of the parameters of the model specifically includes: adjusting the unit load level between 70% and 130% with a step size of 3%, and changing the power generation power of each unit synchronously in proportion to ensure the power flow balance of the system; at the same time, setting a 5% unit random load disturbance, and adding a random fluctuation of no more than 5% to the generator output, and adding a random fluctuation of no more than 1% to the voltage of the PV node of the power system. By adjusting the parameters of the constructed power system power flow model in the above-mentioned startup method, a large amount of power flow calculation data can be obtained, and a discrete distribution data sample set is constructed based on this, that is, the small disturbance simulation data described in this embodiment.
[0065] Furthermore, in this embodiment, feature selection and pattern matching are performed on the small interference simulation data to obtain a graph structure sample set, specifically:
[0066] Based on the preset label data, the small interference simulation data is subjected to pattern screening to obtain a pattern to be matched; wherein the label data is identification data of a key pattern; and the key pattern is an oscillation pattern with a risk of instability;
[0067] Extracting feature values from the tag data to obtain tag feature values, and calculating feature vectors from the pattern to be matched to obtain pattern feature vectors;
[0068] Feature pattern matching is performed on the label data and the pattern to be matched according to the label feature value and the pattern feature vector, and the matching result is output as the graph structure sample set.
[0069] In order to convert small interference simulation data into input data that conforms to the edge node attention graph neural network model, after obtaining the small interference simulation data, the system will first perform pattern screening on the simulation data according to the label data corresponding to the key pattern, and extract the relevant data in the simulation data that conforms to the label data as the pattern to be matched, and then extract the eigenvalues from the label data, calculate the eigenvector of the matching pattern, that is, the extracted simulation data, and perform pattern matching on the extracted label eigenvalues and the calculated pattern eigenvectors, that is, determine what kind of key patterns the extracted simulation data are, and then match the determined part of the data with the corresponding label data, that is, the key pattern.
[0070] Since the key mode is an oscillation mode with the risk of instability, each matched simulation data is simulation data with the risk of instability, that is, the graph structure sample set obtained after matching is the simulation sample data of the power system with the risk of instability, and each sample data corresponds to different instability risks, which provides a data basis for the subsequent construction of the edge node attention graph neural network model.
[0071] In this embodiment, if Figure 3 As shown, Figure 3 A schematic flow chart of an embodiment of a small disturbance evaluation method for a heterogeneous edge node graph neural network provided by the present invention. Figure 3 As shown, before performing feature selection and pattern matching on the small interference simulation data, the system will also select the node input features, side information input features and output features of the simulation data, and perform data normalization on the admittance matrix according to the selected features to improve the distribution of the simulation data.
[0072] The node input characteristics selected in this embodiment include: bus voltage amplitude U, bus voltage phase angle θ, generator active output GP, generator reactive output GQ, load active power LP connected to the bus, and load reactive power LQ connected to the bus.
[0073] The side information input features include: the modulus Y of the line admittance.
[0074] Output characteristics include: damping ratio ζ and oscillation frequency f.
[0075] After determining the above characteristics, the system can use the above characteristics to screen the sample set, i.e., the small disturbance simulation data described in this embodiment, to obtain the key oscillation mode, i.e., the key mode described in this embodiment, wherein the screening formula is as follows:
[0076]
[0077] Where ψ is the electromechanical loop correlation ratio of the mode; f is the oscillation frequency of the mode.
[0078] After the screening is completed, the present embodiment will perform pattern matching on the simulation data obtained by the screening by the Rayleigh-Ritz method, that is, by tracking the eigenvalue. Specifically, since the Rayleigh-Ritz method is based on the principle of minimizing the Rayleigh quotient, and the Rayleigh quotient is defined as the ratio of the dot product of a vector to the dot product of a matrix and the vector and the dot product of the vector and itself, in the Rayleigh-Ritz method, eigenvalue tracking is specifically implemented by test function approximation. For the selection of the test function, the present embodiment preferably uses a test function that is easy to calculate the matrix-vector product. After selecting a suitable test function, the system can use the test function to form the Rayleigh quotient, and minimize it to obtain an approximate eigenvalue, and then calculate the corresponding eigenvector through the test function, and thereby achieve pattern matching between the simulation data and the key oscillation mode.
[0079] like Figure 3 As shown, after matching the key oscillation patterns of the simulation data, the system will further screen and produce a critical sample set to ensure sample balance, that is, the key patterns with instability risks are screened out as described in this embodiment, and the GNN model is trained using the produced sample set to provide an evaluation model for the subsequent small disturbance stability evaluation of the system.
[0080] After pattern matching, this embodiment will also normalize the label sample set, that is, the graph structure sample set described in this embodiment, to avoid the problem of large numbers eating small numbers, thereby improving the distribution of sample damping ratios, specifically using the following formula:
[0081]
[0082] Wherein, ζ is the original damping ratio; ζ′ is the transformed data; c is a constant. Through parameter optimization, C in this embodiment is preferably 4.
[0083] If you need to test the performance of the constructed model, you need to denormalize it back to the original distribution for testing to increase the test accuracy and interpretability. The specific formula is as follows:
[0084]
[0085] Among them, ζ″ is the damping ratio after denormalization. At this time, ζ″ and the original label ζ are at the same order of magnitude and performance evaluation can be performed.
[0086] Step 102: construct and train an edge node attention graph neural network based on the graph structure sample set, and input the acquired real-time power flow data into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results.
[0087] After obtaining the training sample data, the system will construct and train the edge node attention graph neural network based on the graph structure sample set to facilitate the subsequent evaluation of the real-time power flow data of the power system. At the same time, since the constructed neural network not only refers to the node-level attention mechanism, but also refers to the edge-level attention mechanism, that is, the importance of attention is sorted from two perspectives, namely, the nodes of the power system and the information flowing between nodes, namely the edges, so as to improve the accuracy, reliability and practicality of the evaluation results output by the model.
[0088] At the same time, by collecting and evaluating the real-time data of the power system through the trained model, the efficiency and timeliness of evaluating the stability of the power system are improved, and the speed at which the power system maintenance personnel respond to the instability of the power system is further improved. The reference to the edge information, that is, the model of the flow of information between nodes, further enhances the importance of edge information and realizes a deeper integration of the model with respect to the physical topology of the power system.
[0089] In this embodiment, the system constructs an edge node attention graph neural network model based on a graph structure sample set, and further constructs a multi-task learning model to study the accurate mapping relationship between input features and output features, namely, damping ratio and oscillation frequency, and optimize the accuracy and rate of the model. It will also further analyze the small disturbance stability requirements of the power system and determine the small disturbance stability under the key oscillation mode of the power system.
[0090] Specifically, the method of constructing and training an edge node attention graph neural network based on the graph structure sample set in this embodiment specifically includes:
[0091] Obtaining nodes and node features according to the graph structure sample set, and learning and embedding the node features based on node-level attention to obtain node embedding;
[0092] Extracting the connection relationship of each node in the graph structure sample set as an edge feature, and performing edge embedding on the edge feature based on the node embedding to obtain an aggregate feature;
[0093] The aggregated features are learned and trained through a multi-task learning model based on a multi-layer perceptron, and the model is optimized through a loss function to output the edge node attention graph neural network.
[0094] After obtaining the graph structure sample set, the system can build and train the edge node attention graph neural network based on the graph structure sample set. When building the model, the system will add node features and edge features to build the edge node attention graph neural network. Since the node features can only reflect the node itself, that is, they can only reflect the node content from one perspective, and since each node contains multiple types of connection information, if the training model is built only based on the node features, the accuracy of the evaluation results of the constructed model for the power system is limited.
[0095] Therefore, when constructing and training the model, the stability assessment method provided by the present invention not only adds node features, but also adds edge features corresponding to each node, that is, the connection information between each node, so as to enrich the training data type of the model, and realizes the fusion of node features and edge features by embedding edge features into node features, so as to obtain aggregate features, and train and optimize the model by aggregate features, so as to improve the sensitivity of the model to power system flow data.
[0096] Furthermore, in this embodiment, the node features are learned and embedded based on node-level attention to obtain node embedding, specifically:
[0097] Performing node-level attention on the node features through a deep neural network to obtain node-level attention;
[0098] Normalizing the node-level attention through an activation function to obtain a node weight coefficient;
[0099] The node features are learned and embedded based on the node-level attention and the node weight coefficient to obtain the node embedding.
[0100] The above method can be used to perform weight calculation and attention calculation on the node features obtained in the graph structure sample set to determine the importance of each node feature, that is, to determine the weight coefficient of each node feature, and then learn to embed the node features according to the determined weight coefficient to obtain node embedding, which provides a data basis for subsequent edge feature aggregation embedding.
[0101] In this embodiment, due to the heterogeneity of nodes, different types of nodes have different feature spaces. Therefore, the system of this embodiment designs a type-specific transformation matrix M to project the features of different types of nodes into the same feature space, so as to obtain the node features in the sample set. The formula is as follows:
[0102] h' i =M φi ×h i
[0103] Among them, h i and h' iRepresent the original features and the mapped features respectively. The above formula can be used to learn the weights between various nodes through the self-attention mechanism.
[0104] In this embodiment, for a given node pair (i, j) connected by an edge Φ, the node-level attention The importance of node-level attention can be understood It means the importance of node j to node i. The importance of the edge-based node pair (i, j) is expressed as follows:
[0105]
[0106] Among them, att node Represents a deep neural network that performs node-level attention, i.e., node-level attention as described in this embodiment.
[0107] Because there are some similar connection patterns under an edge connection, the above expression shows that for a given edge Φ, the weights of all edge-based node pairs (i, j) depend on their characteristics, and for a given edge Φ, all edge-based node pairs share parameters. Since the importance between nodes is asymmetric, that is, the importance of node i to node j and the importance of node j to node i may be very different, node-level attention can maintain asymmetry, which is also an important property of heterogeneous graphs.
[0108] After determining the node-level attention, the system will insert the structural information into the model by masking the attention, which means that the system in this embodiment only calculates the attention of node j∈ in Represents the edge-based neighbors of the node (including itself). Therefore, after obtaining the importance between edge-based node pairs, i.e., the node-level attention described in this embodiment, the system will normalize them through the softmax function to obtain the weight coefficient, i.e., the node weight coefficient described in this embodiment. The specific formula is as follows:
[0109]
[0110] Among them, σ is the activation function, || is the connection operation, and aΦ is the node-level attention vector of edge Φ.
[0111] From the above formula, we can see that the weight coefficient of (i, j) depends on their characteristics, and since the weight coefficient is asymmetric, it means that the two nodes in the node pair contribute differently to each other. The reason is not only because the connection order of the numerator is different, but also because each node has different neighbors, so the normalization term (that is, the denominator) will also be very different.
[0112] After determining the node weight coefficient, the system will learn to embed the node features based on the node-level attention and node weight coefficient, and aggregate them through the projection features of the neighbors. The corresponding calculation expression is as follows:
[0113]
[0114] in, is the learned embedding of the nodes of edge Φ.
[0115] Since the graph structure sample set obtained in this embodiment, i.e., the heterogeneous graph, is scale-free, the variance between the graph data is large. In order to alleviate the problem of training instability caused by large variance, the system provided in this embodiment extends the node-level attention to multi-head attention, thereby making the training process more stable and improving the stability of the model training process. Specifically, the node-level attention is repeated, and the learned embedding is connected to the embedding of specific semantics. The specific formula is as follows:
[0116]
[0117] Among them, for a given edge connection set {Φ1, ..., ΦN}, after providing node features to node-level attention, N groups of node embeddings with specific semantics can be obtained, that is,
[0118] Furthermore, in this embodiment, the connection relationship of each node in the graph structure sample set is extracted as an edge feature, and the edge feature is edge-embedded based on the node embedding to obtain an aggregate feature, specifically:
[0119] Inputting the edge features and the node embedding into a deep neural network based on edge attention to obtain edge learning weights;
[0120] Normalizing the edge learning weights by using an activation function to obtain edge weight coefficients;
[0121] The edge weight coefficient is used as the coefficient of the node embedding to perform embedding fusion on the node embedding to obtain the aggregate feature.
[0122] The obtained node embeddings and the extracted edge features are input into the edge attention-based deep neural network to obtain the edge learning weights, that is, the weight of each edge feature. The edge weight coefficient is obtained by normalizing the node embeddings through the activation function, that is, the weight of each edge feature is averaged to obtain the edge weight coefficient. The node embeddings are then embedded and fused through the edge weight coefficient to achieve feature fusion embedding of node features and edge features, and the aggregated features can be obtained. The model is trained through the aggregated features to obtain the edge node attention graph neural network.
[0123] In this embodiment, for the step of extracting the connection relationship of each node in the graph structure sample set as an edge feature, and embedding the edge feature based on the node embedding to obtain the aggregate feature, this embodiment also provides another implementation method, and its specific implementation method is as follows:
[0124] Since each node in the heterogeneous graph data in the graph structure sample set provided in this embodiment contains multiple types of connection information, and the node embedding of a specific adjacency matrix can only reflect the node from one aspect, in order to input the connection information between each node into the model to train the model and improve the accuracy of the model output results, in this example, in order to learn more comprehensive node embedding, the system also integrates multiple types of edges, and the above-mentioned connection information can be displayed through the type edge.
[0125] Therefore, in order to solve the problem of edge selection and connection information fusion in heterogeneous graphs, this example provides a new connection information level attention to automatically learn the importance of different meta-edges and fuse them into specific tasks. First, the group-specific node embedding learned from node-level attention is used as input, and the learning weight of each edge can be expressed as:
[0126] (β φ1 , ...β φp )=att E (Z' φ1 , ... Z φP )
[0127] Among them, att E Represents a deep neural network that performs edge attention. From the above formula, we can see that edge attention can capture the connection information of various types of nodes behind the heterogeneous graph.
[0128] To further understand the importance of each edge, the system first converts the edge features into semantically specific embeddings through nonlinear transformations (e.g., single-layer MLP), and then compares the similarity of the specific node embeddings with the edge attention vector q to measure the importance of the edge. In addition, the system also averages the importance of all specific node embeddings to determine the importance of each edge. Thus, the importance of each edge w φp The expression is as follows:
[0129]
[0130] Among them, W is the weight matrix, b is the bias vector, and q is the edge attention vector.
[0131] In order to make the comparison between the similarity of a specific node embedding and the edge attention vector q valid, all edges and the embeddings of a specific connection will share all the above parameters. After obtaining the importance of each edge, the system will normalize them through the softmax function, where the weight of the edge Φ is normalized by the softmax function on the importance of all the above edges, and the obtained weight is β φ1 The specific expression is as follows:
[0132]
[0133] The β obtained by the above formula φ1 can be interpreted as the contribution of edge Φ to a specific task. From the above formula, we can see that β φ1 The higher the value, the more important the edge Φ is, and for different tasks, the edge Φ may have different weights. Therefore, using the learned weights as coefficients, the system fuses the embeddings of specific semantics to obtain the final embedding Z, which is expressed as follows:
[0134]
[0135] The final embedding is the embedding obtained by aggregating the embeddings of all connection information. After obtaining the final embedding, the system also applies the final embedding to a specific task and designs different loss functions for it. For semi-supervised node classification, the system minimizes the cross entropy on all labeled nodes between the true value and the predicted value, as follows:
[0136]
[0137] Among them, C is the classifier parameter, y L is the index set of nodes with labels, Y l , Z l are the labels and embeddings of labeled nodes. Under the guidance of labeled data, the system can also optimize the model through back-propagation to learn the embedding of nodes.
[0138] After determining the aggregated features, the system will also introduce a multi-task learning (MTL) model, using multiple related prediction tasks to share the same feature aggregation output, and apply multi-task error back propagation information when training feature aggregation network parameters, thereby reducing training costs. Figure 4 , Figure 4 This is a schematic diagram of the structure of an embodiment of the multi-task learning model provided by the present invention. Figure 4As shown in the figure, after the edge graph convolutional network realizes feature extraction, for the downstream network, the system connects the features to m predictors in parallel, and predicts the oscillation frequency f and damping ratio ζ of m key oscillation modes respectively; among which, each predictor adopts a multi-layer perceptron model composed of fully connected layers.
[0139] Because of the sharing of multi-task information, the interrelated multi-task learning framework often has better generalization effect than single-task learning ability. Under different operation modes, the operation characteristics will affect the physical mechanism of each oscillation mode, so there is a certain similarity and correlation between each operation characteristic and the oscillation mode. Therefore, the shared feature aggregation model and parameters based on nodes and edges are conducive to avoiding overfitting of the model, and enable different downstream networks to make full use of the information between modes and improve the generalization ability of the model.
[0140] Furthermore, in this embodiment, the acquired real-time flow data is input into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results, including:
[0141] Inputting the acquired real-time power flow data into the edge node attention graph neural network for evaluation, so that the model performs pattern matching on the real-time power flow data, and determines the corresponding stable damping ratio according to the matched pattern;
[0142] The real-time power flow data is compared with the stable damping ratio, and the comparison result is output as the evaluation result.
[0143] The stability of the current power system is evaluated by inputting real-time power flow data into the model, which improves the efficiency, timeliness and accuracy of stability evaluation of the power system.
[0144] Furthermore, after outputting the comparison result as the evaluation result, this embodiment further includes:
[0145] When the evaluation result shows that the power system corresponding to the real-time power flow data is unstable, adjusting the parameters of the power system according to the stable damping ratio, and determining the stability boundary of the power system according to the matched mode;
[0146] When the evaluation result is that the power system corresponding to the real-time power flow data is stable, the stability boundary of the power system is determined according to the matched pattern.
[0147] According to the stability assessment results of the power system, the parameters of the power system are adjusted to optimize the operating status of the power system and ensure that it can maintain high efficiency and stability under various working conditions. The stability boundary of the power system is determined according to the matched mode to provide guidance for the stable operation of the power system, clarify the stable working area of the system, avoid potential unstable factors, and provide a basis for parameter adjustment. Through small disturbance stability analysis, it is also possible to identify and determine the conditions that may cause system instability under various specific power outputs, so as to avoid the occurrence of these conditions in actual operation and ensure the long-term stable operation of the power grid.
[0148] In this embodiment, if Figure 3 As shown, the trained model evaluates the input simulation data and compares the output evaluation results with the damping of several modes to determine whether the evaluation results are underdamped, that is, whether the damping of the system is insufficient to prevent oscillations, so as to determine the small disturbance stability of the system, that is, whether the system is stable, and then reversely characterize the stability boundary of the system based on the analysis of the evaluation results.
[0149] Further analysis of the small disturbance stability assessment results can also help technicians modulate the parameters of the power system. By finely modulating parameters such as the output power of the generator and the load of the line, the operating status of the power grid can be optimized to ensure that the power system can remain efficient and stable under various working conditions.
[0150] At the same time, since the damping control strategy usually requires real-time monitoring of the system status and dynamic adjustment of the damping parameters to adapt to the changing grid conditions, the model provided by this embodiment can also achieve rapid and timely adjustment of the system's damping coefficient through damping control, suppress oscillations caused by external disturbances or internal dynamic changes, reduce the system's response time, limit the amplitude of oscillations, and prevent the system from entering an unstable state.
[0151] Reverse characterization of the stability boundary based on the matching pattern provides guidance for grid operation. By analyzing the system behavior under different parameter settings, the stable working area of the system is clarified, potential unstable factors are avoided, and a basis for parameter adjustment is provided. Through small disturbance stability analysis, conditions that may cause system instability at a specific power output can also be identified, thereby avoiding the occurrence of these conditions in actual operation and ensuring the long-term stable operation of the grid.
[0152] In order to better illustrate the working principle and step flow of a method and device for evaluating small disturbance stability of an electric power system of the present invention, reference may be made to, but is not limited to, the relevant records above.
[0153] Accordingly, see Figure 2 , Figure 2This is a schematic diagram of the structure of an embodiment of the small disturbance stability assessment device for a power system provided by the present invention. Figure 2 As shown, the small disturbance stability evaluation device includes a sample data acquisition module 201 and an edge node network evaluation module 202 .
[0154] The sample data acquisition module 201 is used to generate and acquire small disturbance simulation data through power system simulation software, perform feature selection and pattern matching on the small disturbance simulation data, and obtain a graph structure sample set.
[0155] Furthermore, the sample data acquisition module 201 generates and acquires small disturbance simulation data through power system simulation software, specifically:
[0156] A power system flow model is constructed by the power system simulation software, and the parameters of the power system flow model are adjusted according to preset adjustment parameters to obtain the small disturbance simulation data; feature selection and pattern matching are performed on the small disturbance simulation data to obtain a graph structure sample set.
[0157] Furthermore, the adjustment parameters of the sample data acquisition module 201 include: unit load level, unit power generation, load fluctuation, generator output and node voltage.
[0158] Furthermore, the sample data acquisition module 201 performs feature selection and pattern matching on the small disturbance simulation data to obtain a graph structure sample set, specifically:
[0159] Based on the preset label data, the small interference simulation data is subjected to pattern screening to obtain a pattern to be matched; wherein the label data is identification data of a key pattern; and the key pattern is an oscillation pattern with a risk of instability;
[0160] Feature value extraction is performed on the label data to obtain label feature values, and feature vector calculation is performed on the pattern to be matched to obtain a pattern feature vector; feature pattern matching is performed on the label data and the pattern to be matched according to the label feature values and the pattern feature vector, and the matching result is output as the graph structure sample set.
[0161] The edge node network evaluation module 202 is used to construct and train an edge node attention graph neural network based on the graph structure sample set, and input the acquired real-time power flow data into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results.
[0162] Furthermore, the edge node network evaluation module 202 constructs and trains an edge node attention graph neural network based on the graph structure sample set, specifically including:
[0163] Nodes and node features are obtained according to the graph structure sample set, and the node features are learned and embedded based on node-level attention to obtain node embedding; the connection relationship between each node in the graph structure sample set is extracted as edge features, and the edge features are edge-embedded based on the node embedding to obtain aggregate features; the aggregate features are learned and trained through a multi-task learning model based on a multi-layer perceptron, and the model is optimized through a loss function to output the edge node attention graph neural network.
[0164] Furthermore, the edge node network evaluation module 202 learns and embeds the node features based on the node-level attention to obtain the node embedding, specifically:
[0165] The node features are paid attention to at the node level through a deep neural network to obtain node-level attention; the node-level attention is normalized through an activation function to obtain a node weight coefficient; the node features are learned and embedded based on the node-level attention and the node weight coefficient to obtain the node embedding.
[0166] Furthermore, the edge node network evaluation module 202 extracts the connection relationship of each node in the graph structure sample set as an edge feature, and embeds the edge feature based on the node embedding to obtain an aggregate feature, specifically:
[0167] The edge features and the node embeddings are input into a deep neural network based on edge attention to obtain edge learning weights; the edge learning weights are normalized by an activation function to obtain edge weight coefficients; the node embeddings are embedded and fused using the edge weight coefficients as coefficients of the node embeddings to obtain the aggregate features.
[0168] Furthermore, the edge node network evaluation module 202 inputs the acquired real-time power flow data into the trained edge node attention graph neural network for evaluation, and obtains corresponding evaluation results, including:
[0169] The acquired real-time power flow data is input into the edge node attention graph neural network for evaluation, so that the model performs pattern matching on the real-time power flow data and determines the corresponding stable damping ratio according to the matched pattern; the real-time power flow data is compared with the stable damping ratio, and the comparison result is output as the evaluation result.
[0170] Furthermore, after outputting the comparison result as the evaluation result, the edge node network evaluation module 202 further includes:
[0171] When the evaluation result is that the power system corresponding to the real-time power flow data is unstable, the parameters of the power system are adjusted according to the stable damping ratio, and the stability boundary of the power system is determined according to the matched pattern; when the evaluation result is that the power system corresponding to the real-time power flow data is stable, the stability boundary of the power system is determined according to the matched pattern.
[0172] In summary, the embodiment of the present invention provides a method and device for evaluating the stability of a power system with small disturbances, by performing feature selection and pattern matching on the small disturbance simulation data generated by the power system simulation software, obtaining a graph structure sample set, constructing a training edge node attention graph neural network based on the sample set, and evaluating the real-time power flow data through the trained model to obtain an evaluation result. The small disturbance simulation data training model generated by the power system simulation software not only improves the evaluation accuracy of the trained model for the target power system, but also improves the sensitivity of the trained model to the data in the target power system; the real-time data of the power system is evaluated through the trained model, which improves the efficiency and timeliness of the evaluation of the stability of the power system; the attention importance is sorted from two perspectives, such as the node characteristics and edge characteristics of the power system, which improves the accuracy, reliability and practicality of the evaluation results output by the model.
[0173] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for evaluating small disturbance stability of a power system, characterized in that: The following steps are involved: Generate and obtain small disturbance simulation data through power system simulation software, perform feature selection and pattern matching on the small disturbance simulation data, and obtain a graph structure sample set; An edge node attention graph neural network is constructed and trained based on the graph structure sample set, and the acquired real-time flow data is input into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results.
2. A method for evaluating small disturbance stability of a power system according to claim 1, characterized in that: The small disturbance simulation data is generated and obtained by the power system simulation software, specifically: Constructing a power system flow model through the power system simulation software, and adjusting the parameters of the power system flow model according to preset adjustment parameters to obtain the small disturbance simulation data; Feature selection and pattern matching are performed on the small interference simulation data to obtain a graph structure sample set.
3. A method for evaluating small disturbance stability of a power system as claimed in claim 2, characterized in that: The adjustment parameters include: unit load level, unit power generation, load fluctuation, generator output and node voltage.
4. A method for evaluating small disturbance stability of a power system as claimed in claim 2, characterized in that: The feature selection and pattern matching are performed on the small interference simulation data to obtain a graph structure sample set, specifically: Based on the preset label data, the small interference simulation data is subjected to pattern screening to obtain a pattern to be matched; wherein the label data is identification data of a key pattern; and the key pattern is an oscillation pattern with a risk of instability; Extracting feature values from the tag data to obtain tag feature values, and calculating feature vectors from the pattern to be matched to obtain pattern feature vectors; Feature pattern matching is performed on the label data and the pattern to be matched according to the label feature value and the pattern feature vector, and the matching result is output as the graph structure sample set.
5. A method for evaluating small disturbance stability of a power system as claimed in claim 1, characterized in that: The step of constructing and training an edge node attention graph neural network based on the graph structure sample set specifically includes: Obtaining nodes and node features according to the graph structure sample set, and learning and embedding the node features based on node-level attention to obtain node embedding; Extracting the connection relationship of each node in the graph structure sample set as an edge feature, and performing edge embedding on the edge feature based on the node embedding to obtain an aggregate feature; The aggregated features are learned and trained through a multi-task learning model based on a multi-layer perceptron, and the model is optimized through a loss function to output the edge node attention graph neural network.
6. A method for evaluating small disturbance stability of a power system as claimed in claim 5, characterized in that: The node features are learned and embedded based on the node-level attention to obtain the node embedding, specifically: Performing node-level attention on the node features through a deep neural network to obtain node-level attention; Normalizing the node-level attention through an activation function to obtain a node weight coefficient; The node features are learned and embedded based on the node-level attention and the node weight coefficient to obtain the node embedding.
7. A method for evaluating small disturbance stability of a power system as claimed in claim 5, characterized in that: The extracting the connection relationship of each node in the graph structure sample set as an edge feature, and embedding the edge feature based on the node embedding to obtain the aggregate feature, specifically: Inputting the edge features and the node embedding into a deep neural network based on edge attention to obtain edge learning weights; Normalizing the edge learning weights by using an activation function to obtain edge weight coefficients; The edge weight coefficient is used as the coefficient of the node embedding to perform embedding fusion on the node embedding to obtain the aggregate feature.
8. A method for evaluating small disturbance stability of a power system as claimed in claim 1, characterized in that: The real-time flow data obtained is input into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results, including: Inputting the acquired real-time power flow data into the edge node attention graph neural network for evaluation, so that the model performs pattern matching on the real-time power flow data, and determines the corresponding stable damping ratio according to the matched pattern; The real-time power flow data is compared with the stable damping ratio, and the comparison result is output as the evaluation result.
9. A method for evaluating small disturbance stability of a power system as claimed in claim 8, characterized in that: After outputting the comparison result as the evaluation result, the method further includes: When the evaluation result shows that the power system corresponding to the real-time power flow data is unstable, adjusting the parameters of the power system according to the stable damping ratio, and determining the stability boundary of the power system according to the matched mode; When the evaluation result is that the power system corresponding to the real-time power flow data is stable, the stability boundary of the power system is determined according to the matched pattern.
10. A small disturbance stability assessment device for a power system, characterized in that: The small disturbance stability evaluation device comprises a sample data acquisition module and an edge node network evaluation module; The sample data acquisition module is used to generate and acquire small disturbance simulation data through power system simulation software, perform feature selection and pattern matching on the small disturbance simulation data, and obtain a graph structure sample set; The edge node network evaluation module is used to construct and train an edge node attention graph neural network based on the graph structure sample set, and input the acquired real-time power flow data into the trained edge node attention graph neural network for evaluation to obtain corresponding evaluation results.
Citation Information
Cited By
Electric screw press fault diagnosis method and system based on multi-feature fusion
CN120087213A
