Electric power system voltage stability boundary prediction method and system based on graph neural network
By applying a graph neural network-based method in the power system, using continuous graph convolution and multi-head attention mechanism, the problem of static voltage stability margin prediction of power system is solved, efficient and accurate prediction support is achieved, and the stability of the power system is improved.
Patent Information
- Application Number
- CN202510042878.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to effectively predict the static voltage stability margin of the power system after new energy is connected, and the traditional method has high calculation cost and is not suitable for real-time applications.
Using a graph neural network-based method, by constructing an undirected graph model, a continuous graph convolutional structure and a multi-head attention mechanism are introduced to capture the topological features of the power system and the correlation between nodes, and a rapid search of voltage stable boundaries is achieved.
It improves the accuracy and efficiency of static voltage stability margin prediction of power system, enhances the generalization ability and adaptability of the model, and supports the stable operation of the power system.
Smart Images

Figure CN120016441A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of static voltage stability analysis of power systems, and in particular to a method and system for predicting voltage stability boundaries of power systems based on graph neural networks. Background Art
[0002] In order to achieve the "dual carbon" goal, my country's energy system is continuously transforming towards low-carbonization, especially the widespread access to new energy sources such as wind power and photovoltaics, which has brought profound changes to the structure of the power grid. This transformation not only promotes the low-carbon development of the power grid, but also introduces new stability challenges. The output of new energy power generation is affected by natural conditions and has strong randomness and uncertainty, making the operation mode of the power system more diversified, thereby increasing the risk of static voltage instability and voltage collapse.
[0003] Historical statistics show that random fluctuations in renewable energy generation or load direction have a relatively high probability. However, existing studies are mostly limited to gradually increasing the load in a fixed direction, gradually approaching the critical point of voltage collapse. The limitation of this method is that it cannot meet the actual needs of new power systems for static voltage stability margin (VSM) prediction.
[0004] Traditional VSM evaluation methods, such as the Continuation Power Flow (CPF) method, usually start from a certain reference point and gradually increase the system load until the voltage collapse point is confirmed. This method often requires multiple iterative calculations, which is time-consuming and not suitable for online real-time applications.
[0005] At present, many studies use decision tree models to predict power system VSM, among which Gradient Boosting Decision Tree (GBDT) is a common algorithm. However, GBDT models often have overfitting problems during sample generation and training. When the training set is very different from the actual scenario, the performance of the model will drop significantly. In addition, the asymmetric tree structure generated by GBDT also leads to its insufficient generalization ability. Each prediction requires traversing the entire tree, which is inefficient.
[0006] To solve the above problems, the graph neural network-based method provides a new idea, which can capture the dynamic relationship between each node in the system, improve the adaptability to the operating status of complex power systems, and thus more accurately predict VSM. By building a highly adaptable and efficient model, the defects of the existing VSM prediction method can be significantly improved, providing more reliable support for the stable operation of the power system. Summary of the invention
[0007] In view of the problems existing in the prior art, the present invention is proposed.
[0008] Therefore, the problem to be solved by the present invention is how to effectively capture the topological structure characteristics and inter-node associations of the power system by introducing a continuous graph convolution structure and a multi-head attention mechanism, so as to improve the prediction accuracy and model generalization ability.
[0009] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0010] In a first aspect, an embodiment of the present invention provides a method for predicting voltage stability boundaries of a power system based on a graph neural network, which includes, for a given power system, considering the uncertainty of new energy and load, generating samples of system operation mode and power growth direction;
[0011] For each operation mode and power growth direction, continuous power flow calculation is performed to obtain the system static voltage stability margin;
[0012] Construct an undirected graph model and design a fast voltage stability boundary search model based on graph neural network;
[0013] The obtained model is trained to obtain an optimized graph neural network-based voltage stability boundary fast search model;
[0014] The real-time operation data of the power system is input into the trained model to realize the rapid search for the voltage stability boundary.
[0015] As a preferred solution of the method for predicting the voltage stability boundary of a power system based on a graph neural network according to the present invention, the samples of the generated system operation mode and power growth direction include:
[0016] Random sampling constructs the system's operating mode and power growth direction;
[0017] Use continuous power flow calculation to obtain the VSM in each operation mode and power growth direction;
[0018] The node active power, node reactive power and power growth direction corresponding to each operating mode are extracted as sample features, and the corresponding static voltage stability margin is used as a label to construct a sample data set.
[0019] As a preferred solution of the method for predicting the voltage stability boundary of a power system based on a graph neural network according to the present invention, the mathematical model of the new energy system for continuous power flow calculation is expressed as follows:
[0020]
[0021] Among them, P Gi , Q Giare the active and reactive outputs of the generator at node i respectively; P Li , Q Li are the load power of node i respectively; are the unit increase power corresponding to parameter λ; V i is the voltage amplitude of node i; θ ij is the phase angle difference between nodes i and j; G ij , B ij are the real and imaginary parts of the (i, j)th element of the node admittance matrix.
[0022] As a preferred solution of the method for predicting voltage stability boundary of power system based on graph neural network described in the present invention, wherein: the construction of undirected graph model includes:
[0023] For a new energy power system with N nodes and L branches, a corresponding undirected graph model is constructed; the vertex set of the graph is V = {v 1 ,v 2 ,...,v N} corresponds to N nodes in the power system; the edge set E of the graph = {e ij ∣i∈[1,N],j∈[1,N],i≠j} is the connectivity relationship between the i-th node and the j-th node in the corresponding power system;
[0024] The adjacency matrix A of the undirected graph model G of the new energy power system is obtained by using the formula, which is defined as A = {a ij}, where a ij :
[0025]
[0026] In the first graph neural network, the input features of the node are the net injected active power and reactive power of the node, expressed as:
[0027] [P i ,Q i ]
[0028] Among them, P i is the active power, Q i is the reactive power;
[0029] In the second graph neural network, the input feature of the node is the load power growth factor G of the node L and generator power growth factor G G , expressed as:
[0030] [G L ,G G ]
[0031] Among them, G Lis the load power growth factor, G G is the generator power growth factor.
[0032] As a preferred solution of the method for predicting voltage stability boundary of power system based on graph neural network of the present invention, the voltage stability boundary fast search model includes:
[0033] Feature preprocessing module: receiving system PQ feature matrix X pq and the growth factor feature matrix X growth , and preprocessing the feature matrix, specifically including: linear transformation, layer normalization, nonlinear activation, and random dropout regularization;
[0034] Continuous kernel graph convolution module, including: multi-head attention feature projection, projecting node features into three feature spaces: query, key, and value; position encoding processing, calculating the relative position relationship between nodes; continuous kernel attention calculation, message passing, and feature aggregation;
[0035] Graph attention pooling module, including feature and position encoding fusion, attention weight calculation, and weighted feature aggregation;
[0036] The dual-branch feature fusion prediction module includes feature concatenation, multi-layer feature fusion, and final prediction output.
[0037] As a preferred solution of the method for predicting voltage stability boundary of power system based on graph neural network described in the present invention, the training step of the fast search model includes:
[0038] Data division: construct training samples and test samples based on the collected power system operation data;
[0039] Data preprocessing: Different data preprocessing methods are used for two different sets of input features. The voltage margin label value is logarithmically normalized, and the node net injected power is robustly normalized.
[0040] Loss function design: An improved loss function combining mean square error, relative error and large error penalty is used for model training;
[0041] Model optimization: The Adam optimizer is used to optimize the model parameters, and a dynamic learning rate adjustment mechanism is introduced to improve the training effect. The upper limit of the number of training rounds is set, and an early stopping strategy is implemented to monitor the training process. Based on the performance evaluation of the validation set, the best model parameters are selected for saving.
[0042] As a preferred solution of the method for predicting the voltage stability boundary of a power system based on a graph neural network according to the present invention, the loss function consists of four parts:
[0043] Loss = w 1 L 1 +w 2 L 2 +w 3 L 3 +w 4 L 4
[0044] Where: L 1 is the mean square error loss, which is used to measure the overall fit between the predicted value and the true value; L 2 is the average relative error loss, which is used to evaluate the average deviation level of the predicted value relative to the true value; L 3 is the maximum relative error loss, which is used to control the maximum deviation of the prediction results; L 4 It is a large error penalty term, which is used to pay special attention to and penalize large prediction errors;
[0045] w 1 、w 2 、w 3 、w 4 are the corresponding weight coefficients, which are used to balance the importance of each loss item, where w 1 =0.2,w 2 =0.2,w 3 =0.4,w 4 =0.2.
[0046] In a second aspect, an embodiment of the present invention provides a power system voltage stability boundary prediction system based on a graph neural network, which includes a sample generation module, a power flow calculation module, a model construction module, a model training module and a prediction analysis module;
[0047] The sample generation module is used to generate samples of system operation mode and power growth direction for a given power system, taking into account the uncertainty of new energy and load;
[0048] The power flow calculation module is used to perform continuous power flow calculation for each operation mode and power growth direction to obtain the system static voltage stability margin;
[0049] The model building module is used to build an undirected graph model and design a voltage stability boundary fast search model based on a graph neural network;
[0050] The model training module is used to train the obtained model to obtain an optimized graph neural network-based voltage stability boundary fast search model;
[0051] The prediction and analysis module is used to input the real-time operation data of the power system into the trained model to achieve a rapid search for the voltage stability boundary.
[0052] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the method for predicting the voltage stability boundary of a power system based on a graph neural network as described in the first aspect of the present invention are implemented.
[0053] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, the steps of the method for predicting the voltage stability boundary of a power system based on a graph neural network as described in the first aspect of the present invention are implemented.
[0054] The beneficial effects of the present invention are as follows: the method for predicting the voltage stability boundary of a power system based on a graph neural network provided by the present invention generates samples of the system operation mode and the power growth direction by considering the uncertainty of new energy and load, thereby improving the characterization capability of the dynamic characteristics of the power system and enhancing the adaptability and accuracy of the prediction model; by performing continuous power flow calculation to obtain the static voltage stability margin of the system, a complete sample data set is established, and reliable basic data support is provided for subsequent model training; by constructing an undirected graph model and designing a fast search model for the voltage stability boundary based on a graph neural network, the topological structure characteristics and the association between nodes of the power system are effectively captured, and the generalization ability of the model is improved; by optimizing the model for training, adopting a multi-head attention mechanism and a continuous kernel graph convolution structure, the efficiency of feature extraction and fusion is improved, and the prediction accuracy of the model is enhanced; by inputting real-time operation data into the trained model, a fast search of the voltage stability boundary is realized, which greatly improves the prediction efficiency and provides strong support for the stable operation of the power system. The present invention has achieved remarkable results in terms of prediction accuracy, calculation efficiency and practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 This is a flow chart of a method for predicting voltage stability boundary of power system based on graph neural network;
[0057] Figure 2 The single-line diagram of the IEEE-39 node system including wind power for the power system voltage stability boundary prediction method based on graph neural network;
[0058] Figure 3A schematic diagram of the architecture of a graph neural network for predicting voltage stability boundaries of power systems based on graph neural networks;
[0059] Figure 4 This is the relative error convergence curve of the model of the power system voltage stability boundary prediction method based on graph neural network on the validation set. DETAILED DESCRIPTION
[0060] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0062] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0063] Example 1
[0064] Reference Figure 1 to Figure 4 , which is the first embodiment of the present invention, and provides a method for predicting voltage stability boundary of a power system based on graph neural network, comprising:
[0065] S1, for a given power system, considering the uncertainty of new energy and load, generates samples of system operation mode and power growth direction;
[0066] In the embodiment of the present application, the samples of the generation system operation mode and power growth direction include:
[0067] Random sampling constructs the system's operating mode and power growth direction;
[0068] Use continuous power flow calculation to obtain the VSM in each operation mode and power growth direction;
[0069] The node active power, node reactive power and power growth direction corresponding to each operating mode are extracted as sample features, and the corresponding static voltage stability margin is used as a label to construct a sample data set.
[0070] It should be noted that the power flow calculation is performed on a given power system according to CPF, and the VSM at a random initial point and in any direction is calculated, which is called the power flow calculation value. In this embodiment, the given example system is an IEEE-39 node system including wind power.
[0071] S2, for each operation mode and power growth direction, continuous power flow calculation is performed to obtain the system static voltage stability margin;
[0072] In the embodiment of the present application, the mathematical model of the new energy system for continuous power flow calculation is expressed as:
[0073]
[0074]
[0075] Among them, P Gi , Q Gi are the active and reactive outputs of the generator at node i respectively; P Li , Q Li are the load power of node i respectively; are the unit increase power corresponding to parameter λ; V i is the voltage amplitude of node i; θ ij is the phase angle difference between nodes i and j; G ij , B ij are the real and imaginary parts of the (i, j)th element of the node admittance matrix.
[0076] S3, construct an undirected graph model and design a fast voltage stability boundary search model based on graph neural network;
[0077] In an embodiment of the present application, constructing an undirected graph model includes:
[0078] For a new energy power system with N nodes and L branches, a corresponding undirected graph model is constructed; the vertex set of the graph is V = {v 1 ,v 2 ,...,v N} corresponds to N nodes in the power system; the edge set E of the graph = {e ij ∣i∈[1,N],j∈[1,N],i≠j} is the connectivity relationship between the i-th node and the j-th node in the corresponding power system;
[0079] It should be noted that, in this embodiment, N=39;
[0080] The adjacency matrix A of the undirected graph model G of the new energy power system is obtained by using the formula, which is defined as A = {a ij}, where a ij :
[0081]
[0082] In the first graph neural network, the input features of the node are the net injected active power and reactive power of the node, expressed as:
[0083] [P i ,Q i ]
[0084] Among them, P i is the active power, Q i is the reactive power;
[0085] In the second graph neural network, the input feature of the node is the load power growth factor G of the node L and generator power growth factor G G , expressed as:
[0086] [G L ,G G ]
[0087] Among them, G L is the load power growth factor, G G is the generator power growth factor.
[0088] It should be noted that the fast search model for static voltage stability boundary of new energy power system based on graph neural network is designed, and two continuous graph convolutional neural networks with the same structure are used to process the above node input features respectively. Then, the output features of the two networks are merged and input into the fully connected layer to predict the static voltage stability margin value (VSM). The details are as follows:
[0089] In this embodiment, the specific implementation of the feature preprocessing module is as follows:
[0090] For the input PQ feature X pq , processed by the following formula:
[0091] X pq =Dropout(GELU.LayerNorm(W pq X pq +b pq ) / )
[0092] Where: W pq is the learnable weight matrix; b pq is a bias term; LayerNorm is a layer normalization operation; GELU is a Gaussian error linear unit activation function; Dropout is a random dropout operation with a dropout rate of 0.1. In this embodiment, the specific implementation of the continuous kernel graph convolution module includes:
[0093] ① Multi-head attention feature projection:
[0094] Q = reshape(W q X,[B,N,H,d_h])
[0095] K = reshape(W k X,[B,N,H,d_h])
[0096] V = reshape(W v X,[B,N,H,d_h])
[0097] Where B is the batch size, N is the number of nodes, H is the number of attention heads, which is set to 8, d_h is the feature dimension of each attention head, which is the hidden layer dimension divided by the number of attention heads, and W q , W k , W v is a learnable projection matrix, Q, K, and V represent the query matrix, key matrix, and value matrix, respectively.
[0098] ②Position coding processing:
[0099] PE proj = reshape(W pe PE,[N,H,d_h])
[0100] PE diff_ij =PE proj [dst]-PE proj [src]
[0101] Among them, PE is the node position encoding matrix; PE proj is the location feature of a single node; PE diff_ij is the relative position relationship between nodes; W pe is the position encoding projection matrix; dst and src are the target node and source node indexes of the edge.
[0102] ③Continuous kernel attention calculation:
[0103] e ij =∑Q i K j PE diff_ij
[0104] α ij =softmax(e ij )
[0105] α ij ′=Dropout(α ij )
[0106] Among them, e ij is the attention score; Q iIndicates the characteristics of the current node; K j Indicates the characteristics of adjacent nodes; PE diff_ij is the relative position relationship between nodes; α ij is the normalized attention weight, softmax converts the score into a probability distribution (0-1); the Dropout inactivation rate is set to 0.1; α ij ′ is the final normalized weight value.
[0107] ④Feature aggregation:
[0108]
[0109] Among them, h i represents the updated features of node i; α ij ′ represents the attention weight of node i to node j; V j represents the weighted features of node j.
[0110] X out =GELU(BatchNorm(h))+X
[0111] Among them, h i is the aggregated feature of node i, BatchNorm is the batch normalization operation, h represents the node feature after aggregation, and X is the original feature because the residual connection is added.
[0112] In this embodiment, the specific implementation of the graph attention pooling module includes:
[0113] ① Feature and position encoding fusion:
[0114] X pe =[X∥PE]
[0115] Among them, ∥ represents the feature concatenation operation, X pe The dimension is [B,N,(hidden_dim+pe_dim).
[0116] ②Attention weight calculation:
[0117] h 1 =Tanh(W 1 X pe )
[0118] w=W 2 h 1
[0119] α=softmax(w)
[0120] Among them, W 1 , W 2is a learnable weight matrix, Tanh is the hyperbolic tangent activation function, α is the node-level attention weight, and the dimension is [B, N, 1].
[0121] ③Weighted feature aggregation:
[0122]
[0123] Among them, X pool is the graph-level feature after pooling, with a dimension of [B, hidden_dim], X i is the original feature of node i.
[0124] In this embodiment, the specific implementation of the dual-branch feature fusion prediction module includes:
[0125] ①Feature splicing:
[0126] X combined =[X pq_pool ∥X growth_pool ]
[0127] Among them, X combined The dimension is [B, 2×hidden_dim].
[0128] ②Multi-layer feature fusion:
[0129] h 1 =Dropout.GELU(LayerNorm(W 1 X combined +b 1 )) /
[0130] h 2 =Dropout.GELU(LayerNorm(W 2 h 1 +b 2 )) /
[0131] out=W 3 h 2 +b 3
[0132] Among them, W 1 Reduce the feature dimension from 2×hidden_dim to hidden_dim; W 2 Reduce the feature dimension from hidden_dim to hidden_dim / 2; W 3 Output the final prediction value with dimension [B, 1]; the inactivation rate of all Dropout layers is set to 2; LayerNorm is used for feature normalization.
[0133] S4, training the obtained model to obtain an optimized graph neural network-based voltage stability boundary fast search model;
[0134] It should be noted that the training samples and test samples are constructed based on the power system operation data collected by S1. The data containing node features (3 dimensions) are randomly divided in a ratio of 8:2, of which 80% are used as training samples and the remaining 20% are used as verification samples. Each sample contains its corresponding static voltage stability margin label value.
[0135] It should also be noted that different data preprocessing methods are used for two different sets of input features:
[0136] Logarithmically normalize the voltage margin label value:
[0137] X v ′=log(1+X v )
[0138] Where: X v ′ is the normalized voltage margin label value, log is the natural logarithmic function, X v is the voltage margin label value before transformation.
[0139] The robust normalization of the node net injected power characteristics is performed:
[0140] X pq ′=(X pq -M) / Q
[0141] Where: X pq ' is the final normalized result, M is the median of Y, and Q is the interquartile range of Y.
[0142] Furthermore, the loss function consists of four parts:
[0143] Loss = w 1 L 1 +w 2 L 2 +w 3 L 3 +w 4 L 4
[0144] Where: L 1 is the mean square error loss, which is used to measure the overall fit between the predicted value and the true value; L 2 is the average relative error loss, which is used to evaluate the average deviation level of the predicted value relative to the true value; L 3 is the maximum relative error loss, which is used to control the maximum deviation of the prediction results; L 4 It is a large error penalty term, which is used to pay special attention to and penalize large prediction errors;
[0145] w 1 、w 2 、w 3 、w 4 are the corresponding weight coefficients, which are used to balance the importance of each loss item, where w 1 =0.2,w 2 =0.2,w 3 =0.4,w 4 =0.2.
[0146] It should be noted that the calculation methods of each part of the loss are:
[0147] 1) Mean square error loss:
[0148] Where n is the number of samples in the batch; P i is the normalized predicted value of the i-th sample; T i is the normalized true value of the i-th sample;
[0149] 2) Relative error loss:
[0150]
[0151] L 2 =mean(E i )
[0152] L 3 =max(E i )
[0153] Among them, P i ′ is the denormalized prediction value of the i-th sample, that is, the prediction result restored to the original value range; T i ′ is the denormalized true value of the i-th sample, that is, the target value of the original numerical range; E i is the relative error of the i-th sample, indicating the ratio of the prediction error to the true value; mean(E i ) represents the arithmetic mean of the relative errors of all samples; max(E i ) represents the maximum relative error among all samples.
[0154] 3) Large error penalty term:
[0155] L 4 =mean(E i 2 ), when E i >0
[0156] Wherein, θ is a preset relative error threshold, which is 0.3, i.e., 30% in the present invention; E i>θ means that only samples whose relative error exceeds the threshold are considered; E i 2 Indicates that the relative error of large error samples is squared to further amplify the penalty; mean(E i 2 ) represents the arithmetic mean of the squared relative errors of all large error samples.
[0157] Model training method:
[0158] The training method of the present invention includes the following key technologies:
[0159] 1) Learning rate dynamic adjustment strategy:
[0160] Using the cosine annealing scheduling method, the learning rate η is calculated according to the following formula:
[0161] η=η min +0.5(η max -η min )(1+cos(πt / T))
[0162] Among them, η min is the minimum learning rate; η max is the maximum learning rate; t is the current training step number; T is the adjustment period.
[0163] 2) Parameter update strategy
[0164] The model parameters are updated using the adaptive moment estimation method with weight decay:
[0165] θ t =θ t-1 -η t (g t +λθ t-1 )
[0166] Among them, θ t is the parameter value at time t; η t is the learning rate at time t; g t is the gradient at time t; λ is the weight attenuation coefficient.
[0167] 3) Performance evaluation indicators
[0168] The following evaluation metrics are defined:
[0169] ε max =max(|P i ′-T i ′| / T i ′)
[0170] ε mean =mean(|P i ′-Ti ′| / T i ′)
[0171] Among them, ε max is the maximum relative error, ε mean is the average relative error.
[0172] 4) Early stopping criteria:
[0173] Early stopping is triggered when the following conditions are met:
[0174]
[0175] Where: max is the best historical maximum relative error; L is the best historical loss value; is the best historical average relative error; α and β are the criterion coefficients.
[0176] The model parameters that obtain the minimum prediction error on the test set are selected as the final model to complete the training process.
[0177] S5, inputs the real-time operation data of the power system into the trained model to achieve a rapid search for the voltage stability boundary.
[0178] Furthermore, this embodiment also provides a power system voltage stability boundary prediction system based on graph neural network, including a sample generation module, a power flow calculation module, a model construction module, a model training module and a prediction analysis module;
[0179] The sample generation module is used to generate samples of system operation mode and power growth direction for a given power system, taking into account the uncertainty of new energy and load;
[0180] The power flow calculation module is used to perform continuous power flow calculation for each operation mode and power growth direction to obtain the system static voltage stability margin;
[0181] The model building module is used to build an undirected graph model and design a voltage stability boundary fast search model based on a graph neural network;
[0182] The model training module is used to train the obtained model to obtain an optimized graph neural network-based voltage stability boundary fast search model;
[0183] The prediction and analysis module is used to input the real-time operation data of the power system into the trained model to achieve a rapid search for the voltage stability boundary.
[0184] This embodiment also provides a computer device, which is suitable for the case of a method for predicting the voltage stability boundary of a power system based on a graph neural network, and includes a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the method for predicting the voltage stability boundary of a power system based on a graph neural network as proposed in the above embodiment.
[0185] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0186] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting the voltage stability boundary of a power system based on a graph neural network as proposed in the above embodiment.
[0187] In summary, the method for predicting the voltage stability boundary of a power system based on a graph neural network provided by the present invention generates samples of the system operation mode and power growth direction by considering the uncertainty of new energy and load, thereby improving the characterization ability of the dynamic characteristics of the power system and enhancing the adaptability and accuracy of the prediction model; by performing continuous power flow calculation to obtain the static voltage stability margin of the system, a complete sample data set is established, providing reliable basic data support for subsequent model training; by constructing an undirected graph model and designing a fast search model for the voltage stability boundary based on a graph neural network, the topological structure characteristics and node associations of the power system are effectively captured, and the generalization ability of the model is improved; by optimizing the model for training, adopting a multi-head attention mechanism and a continuous kernel graph convolution structure, the efficiency of feature extraction and fusion is improved, and the prediction accuracy of the model is enhanced; by inputting real-time operation data into the trained model, a fast search of the voltage stability boundary is realized, which greatly improves the prediction efficiency and provides strong support for the stable operation of the power system. The present invention has achieved remarkable results in terms of prediction accuracy, computational efficiency and practicality.
[0188] Example 2
[0189] Reference Figure 1-Figure 4 , which is the second embodiment of the present invention, provides a method for predicting the voltage stability boundary of a power system based on a graph neural network. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0190] The present invention is mainly tested on the IEEE 39-node system containing wind power to verify the effectiveness of the dual-branch convolutional model (Dual-Branch CKGCN) based on graph neural network for VSM prediction. The IEEE 39-node system consists of 39 nodes, 4 wind turbines (partial nodes) and 46 transmission lines. The system topology is as follows Figure 3 As shown. The sample set is generated by the method in S1. 9300 samples are generated using the power system simulation program written by Matpower, where the disturbance range Si is set to [-0.2, 0.2] pu, the load increase value is 1.5 pu, and after removing the samples with non-convergent flow, 8925 valid samples are obtained. This paper divides the training set, validation set, and test set into a ratio of 85%:7.5%:7.5%. The experiments are all trained on a computer equipped with NVIDIA GPU and 32GB memory.
[0191] The main parameters of the Dual-Branch CKGCN model used in this paper are shown in Table 1:
[0192] Table 1. Parameter settings of neural network model
[0193]
[0194] Figure 4 The relative error convergence curve of the Dual-Branch CKGCN model on the validation set. It can be seen from the figure that the relative error of the model is large (about 50%) in the early stage of training. As the number of training rounds increases, the error decreases rapidly and tends to stabilize. The blue curve represents the relative error of the original validation set, and the red curve is the trend line after smoothing. In the later stage of training (about 1500 rounds), the relative error stabilizes at about 1%, indicating that the model has good convergence performance and generalization ability.
[0195] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for predicting voltage stability boundary of power system based on graph neural network, characterized by: This includes, for a given power system, taking into account the uncertainty of new energy and load, generating samples of system operation mode and power growth direction; For each operation mode and power growth direction, continuous power flow calculation is performed to obtain the system static voltage stability margin; Construct an undirected graph model and design a fast voltage stability boundary search model based on graph neural network; The obtained model is trained to obtain an optimized graph neural network-based voltage stability boundary fast search model; The real-time operation data of the power system is input into the trained model to realize the rapid search for the voltage stability boundary.
2. The method for predicting voltage stability boundary of a power system based on graph neural network according to claim 1, characterized in that: Examples of the generation system operation modes and power growth directions include: Random sampling constructs the system's operating mode and power growth direction; Use continuous power flow calculation to obtain the VSM in each operation mode and power growth direction; The node active power, node reactive power and power growth direction corresponding to each operating mode are extracted as sample features, and the corresponding static voltage stability margin is used as a label to construct a sample data set.
3. The method for predicting voltage stability boundary of a power system based on graph neural network according to claim 2, characterized in that: The mathematical model of the new energy system for continuous power flow calculation is expressed as: Among them, P Gi , Q Gi are the active and reactive outputs of the generator at node i respectively; P Li , Q Li are the load power of node i respectively; are the unit increase power corresponding to parameter λ; V i is the voltage amplitude of node i; θ ij is the phase angle difference between nodes i and j; G ij , B ij are the real and imaginary parts of the (i, j)th element of the node admittance matrix.
4. The method for predicting voltage stability boundary of a power system based on graph neural network according to claim 3, characterized in that: The constructing of the undirected graph model comprises: For a new energy power system with N nodes and L branches, a corresponding undirected graph model is constructed; the vertex set of the graph is V = {v1,v2,...,v N } corresponds to N nodes in the power system; the edge set E of the graph = {e ij ∣i∈[1,N],j∈[1,N],i≠j} is the connectivity relationship between the i-th node and the j-th node in the corresponding power system; The adjacency matrix A of the undirected graph model G of the new energy power system is obtained by using the formula, which is defined as A = {a ij }, where a ij : In the first graph neural network, the input features of the node are the net injected active power and reactive power of the node, expressed as: [P i ,Q i ] Among them, P i is the active power, Q i is the reactive power; In the second graph neural network, the input feature of the node is the load power growth factor G of the node L and generator power growth factor G G , expressed as: [G L ,G G ] Among them, G L is the load power growth factor, G G is the generator power growth factor.
5. The method for predicting voltage stability boundary of a power system based on graph neural network according to claim 4, characterized in that: The voltage stability boundary fast search model includes: Feature preprocessing module: receiving system PQ feature matrix X pq and the growth factor feature matrix X growth , and preprocessing the feature matrix, specifically including: linear transformation, layer normalization, nonlinear activation, and random dropout regularization; Continuous kernel graph convolution module, including: multi-head attention feature projection, projecting node features into three feature spaces: query, key, and value; position encoding processing, calculating the relative position relationship between nodes; continuous kernel attention calculation, message passing, and feature aggregation; Graph attention pooling module, including feature and position encoding fusion, attention weight calculation, and weighted feature aggregation; The dual-branch feature fusion prediction module includes feature concatenation, multi-layer feature fusion, and final prediction output.
6. The method for predicting voltage stability boundary of a power system based on graph neural network according to claim 5, characterized in that: The training steps of the fast search model include: Data division: construct training samples and test samples based on the collected power system operation data; Data preprocessing: Different data preprocessing methods are used for two different sets of input features. The voltage margin label value is logarithmically normalized, and the node net injected power is robustly normalized. Loss function design: An improved loss function combining mean square error, relative error and large error penalty is used for model training; Model optimization: The Adam optimizer is used to optimize the model parameters, and a dynamic learning rate adjustment mechanism is introduced to improve the training effect. The upper limit of the number of training rounds is set, and an early stopping strategy is implemented to monitor the training process. Based on the performance evaluation of the validation set, the best model parameters are selected for saving.
7. The method for predicting voltage stability boundary of a power system based on graph neural network according to claim 6, characterized in that: The loss function consists of four parts composition: Loss=w1L1+w2L2+w3L3+w4L4 Among them: L1 is the mean square error loss, which is used to measure the overall fit between the predicted value and the true value; L2 is the average relative error loss, which is used to evaluate the average deviation level of the predicted value relative to the true value; L3 is the maximum relative error loss, which is used to control the maximum deviation of the prediction result; L4 is the large error penalty term, which is used to pay special attention to and punish large prediction errors; w1, w2, w3, and w4 are corresponding weight coefficients used to balance the importance of each loss item, where w1=0.2, w2=0.2, w3=0.4, and w4=0.
2.
8. A graph neural network-based power system voltage stability boundary prediction system, based on the graph neural network-based power system voltage stability boundary prediction method according to any one of claims 1 to 7, characterized in that: It also includes a sample generation module, a power flow calculation module, a model building module, a model training module and a prediction analysis module; The sample generation module is used to generate samples of system operation mode and power growth direction for a given power system, taking into account the uncertainty of new energy and load; The power flow calculation module is used to perform continuous power flow calculation for each operation mode and power growth direction to obtain the system static voltage stability margin; The model building module is used to build an undirected graph model and design a voltage stability boundary fast search model based on a graph neural network; The model training module is used to train the obtained model to obtain an optimized graph neural network-based voltage stability boundary fast search model; The prediction and analysis module is used to input the real-time operation data of the power system into the trained model to achieve a rapid search for the voltage stability boundary.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for predicting the voltage stability boundary of a power system based on a graph neural network as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting the voltage stability boundary of a power system based on a graph neural network as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Graph neural network-based power grid load flow calculation method and related device
CN121071624A
Power grid power flow calculation method based on graph neural network and related device
CN121071624B
Energy storage system real-time diagnosis and networking control method and system based on digital twinning and deep learning
CN121367240A