Power flow calculation method and system based on unsupervised physical information graph neural network
By transforming power flow data of a power system into an undirected graph structure through an unsupervised physical information graph neural network, the problems of low computational efficiency and insufficient utilization of topology structure in traditional methods are solved, and efficient and accurate power flow calculation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID INFORMATION & TELECOMM GRP CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-05-29
AI Technical Summary
Existing power flow calculation methods for power systems are computationally inefficient and cannot meet the needs of online real-time applications. Furthermore, traditional machine learning methods fail to fully utilize the power grid topology and physical mechanisms, resulting in insufficient model accuracy.
An unsupervised physical information graph neural network is used to convert the power flow operation data of the power system into an undirected graph structure. The graph data is obtained and preprocessed to construct a computational model for calculating the power flow value of the power system. The model parameters are adjusted through pre-training and gradient descent to directly obtain the power flow value.
It significantly improves model performance, enabling full utilization of power grid topology and physical mechanisms without relying on large amounts of labeled data, thereby improving computational efficiency and accuracy.
Smart Images

Figure CN122118762A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power flow calculation technology, and specifically to a power flow calculation method and system based on unsupervised physical information graph neural networks. Background Technology
[0002] Power flow calculation technology is a core branch of power system analysis, and its development is deeply intertwined with the expansion of power system scale, the increase in operational complexity, and the innovation of computing technologies. Existing mainstream methods (such as the Newton-Raphson method and the fast decomposition method) require iterative solutions, resulting in high computational costs and slow operation. As node size increases, they struggle to meet the demands of online real-time applications. Furthermore, with the increasing uncertainties of renewable energy volatility and load randomness in power systems, efficient large-scale repetitive power flow calculations are becoming increasingly important for real-time security analysis, a scenario where traditional methods are insufficient. While existing methods (such as those based on multilayer perceptrons and convolutional neural networks) offer advantages in inference speed, they cannot effectively represent and process the topology of the power grid, leading to insufficient prediction accuracy in the models.
[0003] Currently, power flow calculation methods based on graph neural networks are in the exploratory stage, and the models are not well designed to take into account the characteristics of power flow calculation. Existing methods usually only use the features of nodes, often ignoring the features of branches. However, the properties of branches (such as resistance and reactance) will participate in the solution process of power flow calculation and directly affect the calculation results.
[0004] Data-driven methods also have some common problems. First, they rely on a large amount of labeled historical power flow data (which must include complete information such as node power, voltage, and branch parameters). However, in actual power grids, data is often missing or subject to noise interference, and the trained model is difficult to generalize to scenarios with changes in power grid topology. Second, these methods do not make full use of the physical mechanisms existing in the power system, which can lead to insufficient model accuracy. Summary of the Invention
[0005] The purpose of this invention is to provide a power flow calculation method and system based on unsupervised physical information graph neural networks. This method and system solves the problems of low computational efficiency in traditional numerical calculation methods and the inability of traditional machine learning methods to fully utilize the power grid topology. It can fully utilize the topological information, branch attributes, and physical mechanisms in power grid graph data. Compared with traditional machine learning methods, model performance is significantly improved, and a large amount of labeled data is not required.
[0006] To achieve the above objectives, embodiments of the present invention provide a power flow calculation method based on an unsupervised physical information graph neural network, comprising: Acquire power flow operation data of the power system; The power flow data is converted into an undirected graph structure to obtain graph data; Preprocess the graph data to obtain standardized graph data; A computational model for calculating power flow values in a power system is constructed, and the computational model is pre-trained. The standardized graph data is input into the pre-trained computational model to obtain the power flow values of the power system.
[0007] Optionally, the power flow data is converted into an undirected graph structure to obtain graph data, including: The busbars and branches in the power system are treated as nodes and edges in an undirected graph structure. Obtain the node feature vector , in, For nodes The node feature vectors, For nodes active power, For nodes reactive power, For nodes voltage amplitude, For nodes voltage phase angle, , , For nodes One-Hot vectors of type, when node for Node time =1, when node for Node time =1, when node When it is a balanced node =1, For nodes Degree information; Obtain the edge feature vector , in, For nodes and nodes The edge feature vectors between them For nodes and nodes Branch types between, For nodes and nodes The branch resistance between, For nodes and nodes The branch reactance between, For nodes and nodes The branch circuit between them has a ground susceptance. For nodes and nodes The transformer turns ratio of the branch circuits between them; Construct an adjacency matrix based on the connection relationships between nodes. .
[0008] Optionally, the graph data can be preprocessed to obtain standardized graph data, including: The node feature vectors are preprocessed according to formula (1). (1) in, As a system power reference, For nodes Voltage level.
[0009] Optionally, a computational model for calculating power flow values in a power system is constructed, and the computational model is pre-trained, including: The graph data in the training set is fed into the computational model to perform a linear transformation on the node feature vectors and edge feature vectors of the graph data; Position encoding is performed on the node feature vectors after linear transformation; Feature extraction is performed on the node feature vectors and edge feature vectors after position encoding based on the gated graph convolutional layer; The extracted features are input into the decoding layer for decoding, and the voltage amplitude and voltage phase angle of each node are obtained. The loss value is obtained based on the voltage amplitude and voltage phase angle; The model parameters are adjusted using gradient descent based on the preset learning rate and training epochs. Minimize the loss value to obtain the trained model.
[0010] Optionally, the graph data in the training set is fed into the computational model to perform a linear transformation on the node feature vectors and edge feature vectors of the graph data, including: The node feature vectors and edge feature vectors of the graph data are linearly transformed according to formulas (2) and (3). (2) (3) in, These are the node feature vectors after linear transformation. , , , For learnable parameters, The nodes after linear transformation and nodes The edge feature vectors between them The feature dimension is the transformed dimension.
[0011] Optionally, position encoding is performed on the node feature vector after linear transformation, including: The node feature vectors after linear transformation are positionally encoded according to formulas (4) and (5). (4) (5) in, For the node feature vector after adding position encoding, For a learnable parameter matrix, For position encoding vectors This is a random walk operation. Let be the degree matrix of the nodes. For nodes go through The probability of a random walk returning to itself.
[0012] Optionally, feature extraction is performed on the position-encoded node feature vectors and edge feature vectors based on the gated graph convolutional layer, including: Each gated graph convolutional layer is updated according to formulas (6) to (8). (6) (7) (8) in, For the first Layer nodes eigenvectors, For the first Layer nodes eigenvectors, For activation function, For batch normalization operations, , , , For a trainable parameter matrix, To set coefficients, For nodes neighboring nodes Features For the first Layer nodes and nodes Branch characteristics between For the first Layer nodes and nodes Branch characteristics between For the Sigmoid function, It is a very small fixed constant to prevent the denominator from being zero. For element-wise multiplication, The first in graph convolution layer, Represents a node The set of neighbors.
[0013] Optionally, the extracted features are input to the decoding layer for decoding, and the voltage amplitude and voltage phase angle of each node are obtained, including: The voltage amplitude and voltage phase angle of each node are obtained according to formula (9). (9) in, The voltage amplitude predicted by the model. The voltage phase angle predicted by the model. For the node features after graph convolution, a common feature is defined. Layered graph convolution, This indicates the decoder.
[0014] Optionally, the loss value can be obtained based on the voltage amplitude and voltage phase angle, including: The loss value is obtained according to formulas (10) to (12). (10) (11) (12) in, The loss value. This represents the total number of nodes in a training batch. , These are the weighting coefficients for the loss term. For nodes The imbalance of active power. For nodes The imbalance of reactive power. For known nodes in the system Active power For known nodes in the system Reactive power, it is important to note that when the node of and If the quantity is not known, do not proceed. and The calculation, For nodes and nodes The branch conductance between For nodes and nodes Branch susceptance between For nodes and nodes The phase angle difference between them This represents the number of nodes in a given graph.
[0015] On the other hand, the present invention also provides a power flow calculation system based on an unsupervised physical information graph neural network, the calculation system including a processor for executing the calculation method as described in any of the above.
[0016] Through the above technical solution, this invention provides a power flow calculation method and system based on unsupervised physical information graph neural networks. This method and system acquire power flow operation data of the power system, convert the data into an undirected graph structure, obtain graph data, preprocess the graph data to obtain standardized graph data, construct a computational model for calculating the power flow value of the power system, and pre-train the computational model. The standardized graph data is then input into the pre-trained computational model to obtain the power flow value of the power grid system. This invention solves the problems of low computational efficiency in traditional numerical calculation methods and the inability of traditional machine learning methods to fully utilize the power grid topology by constructing a computational model. It can fully utilize the topological information, branch attributes, and physical mechanisms in the power grid graph data. Compared with traditional machine learning methods, the model performance is significantly improved, and it does not require a large amount of labeled data.
[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a power flow calculation method based on an unsupervised physical information graph neural network according to one embodiment of the present invention; Figure 2 This is a flowchart illustrating the acquisition of graph data according to one embodiment of the present invention; Figure 3 This is a flowchart of a pre-training process for a computational model according to one embodiment of the present invention. Detailed Implementation
[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0020] In the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the applicant has used or necessarily used the solution.
[0021] like Figure 1 The diagram shown is a flowchart of a power flow calculation method based on an unsupervised physical information graph neural network according to one embodiment of the present invention. Figure 1 In this context, the calculation method may include: In step S1, power flow operation data of the power system is acquired; In step S2, the power flow data is converted into an undirected graph structure to obtain graph data; In step S3, the graph data is preprocessed to obtain standardized graph data; In step S4, a computational model for calculating the power flow values of the power system is constructed, and the computational model is pre-trained. In step S5, the standardized graph data is input into the pre-trained computational model to obtain the power flow values of the power system.
[0022] In Figure 1 In the method shown, step S1 can be used to acquire power flow operation data of the power system. In one example of the present invention, the power flow operation data may include data such as the power grid topology, active power, reactive power, voltage amplitude and voltage phase angle of nodes, and physical attributes of branches (e.g., branch type, resistance, reactance, ground susceptance, transformer turns ratio). Step S2 can be used to convert the power flow operation data into an undirected graph structure to acquire graph data. The specific method for acquiring the graph data can be of various kinds known to those skilled in the art. In one example of the present invention, the method for acquiring graph data may include, for example... Figure 2 The steps are shown. Specifically: In step S11, the busbars and branches in the power system are treated as nodes and edges in an undirected graph structure; In step S12, the node feature vector of the node is obtained. , in, For nodes The node feature vectors, For nodes active power, For nodes reactive power, For nodes voltage amplitude, For nodes voltage phase angle, , , For nodes One-Hot vectors of type, when node for Node time =1, when node for Node time =1, when node When it is a balanced node =1, For nodes Degree information; In step S13, the edge feature vector is obtained. , in, For nodes and nodes The edge feature vectors between them For nodes and nodes Branch types between, For nodes and nodes The branch resistance between, For nodes and nodes The branch reactance between, For nodes and nodes The branch circuit between them has a ground susceptance. for Nodes and nodes The transformer turns ratio of the branch circuits between them; In step S14, an adjacency matrix is constructed based on the connection relationships between nodes. .
[0023] In Figure 2 In this process, the graph structure is modeled based on the physical topology of the power grid, with buses and branches in the power grid being modeled as nodes and edges in the graph, thus constructing the graph structure: ,in, The graph represents the constructed graph. Let be the set of nodes in the graph. Let be the set of edges in the graph. The connectivity of the graph is determined by the adjacency matrix. This means that if the node and nodes If there is an edge connecting them, then ,otherwise It's important to note that branches in a power grid are directional, but graph convolution operations on a directed graph only consider the outgoing or incoming edges of nodes. This is inconsistent with the aggregation logic of the node power equations because we are converting the directed graph into an undirected graph. The node feature vector can be represented by a four-dimensional vector, i.e. .according to node( , (To be requested) node( , (To be determined) and equilibrium node ( , Based on the characteristics of (to be determined), the unknowns in the attributes are set to 0. To help the computational model better distinguish different node types, step S12 uses a three-dimensional one-hot encoding to label the node type. Furthermore, to better integrate the structural information of the nodes, step S12 also adds the degree information of the nodes. As a new feature, the complete node feature is represented as follows: The edge feature vector of a branch can be represented by a five-dimensional vector, i.e. Collect the attribute values of all nodes and branches under the operating conditions of the power system and convert them into the previously defined graph structure.
[0024] Because the dimensions of different features vary significantly, data normalization is required for the node feature vectors. Unlike common normalization operations, step S3 focuses on the nodes... active power ,node reactive power ,node voltage amplitude Standardization is performed, which is more in line with the data processing logic in power flow calculation. Therefore, in one example of this invention, the node feature vectors can be preprocessed according to formula (1). (1) in, As a system power reference, For nodes Voltage level.
[0025] To fully utilize the topology and physical mechanisms of power systems, this invention constructs a computational model for calculating power flow values in step S4, and pre-trains the model. Step S4 may include, for example: Figure 3 The method shown. In this Figure 3 In this context, step S4 may further include the following steps: In step S21, the graph data in the training set is fed into the computational model to perform a linear transformation on the node feature vectors and edge feature vectors of the graph data. In step S22, the node feature vector after linear transformation is positionally encoded; In step S23, feature extraction is performed on the node feature vector and edge feature vector after position encoding based on the gated graph convolutional layer; In step S24, the extracted features are input to the decoding layer for decoding, and the voltage amplitude and voltage phase angle of each node are obtained; In step S25, the loss value is obtained based on the voltage amplitude and voltage phase angle; In step S26, the model parameters are adjusted using gradient descent based on the preset learning rate and training rounds. In step S27, the loss value is minimized to obtain the trained model.
[0026] In Figure 3 In the method shown, step S21 can be used to feed the graph data in the training set into the computational model to perform a linear transformation on the node feature vectors and edge feature vectors of the graph data. For the input graph data, step S21 first performs a linear transformation on the node feature vectors and edge feature vectors to generate... The hidden layer features of the dimension enhance the expressive power of the features. Specifically, the node feature vectors and edge feature vectors of the graph data can be linearly transformed according to formulas (2) and (3). (2) (3) in, The nodes after linear transformation eigenvectors, , , , For learnable parameters, The nodes after linear transformation and nodes The edge feature vectors between them The feature dimension is the transformed dimension.
[0027] To further enhance the input node feature vector, position encoding is performed on the linearly transformed node feature vector in step S22. In one example of the present invention, position encoding can be performed on the linearly transformed node feature vector according to formulas (4) and (5). (4) (5) in, For the node feature vector after adding position encoding, For a learnable parameter matrix, For position encoding vectors This is a random walk operation. Let be the degree matrix of the nodes. For nodes go through The probability of a random walk returning to itself.
[0028] Step S23 can be used to extract features from the node feature vectors and edge feature vectors after position encoding based on the gated graph convolutional layers. A gated graph convolutional neural network (GatedGCN) is used to extract features from the power grid graph data. By introducing a gating mechanism to automatically learn the importance weights between nodes, the message aggregation process of the traditional graph convolutional network GCN is improved, enhancing the model's expressive power. Furthermore, this model can directly process edge feature vectors, making it very suitable for power flow calculation problems. In one example of this invention, step S23 can further update each gated graph convolutional layer according to formulas (6) to (8). (6) (7) (8) in, For the first Layer nodes eigenvectors, For the first Layer nodes eigenvectors, For activation function, For batch normalization operations, , , , For a trainable parameter matrix, To set coefficients, For nodes neighboring nodes Features For the first Layer nodes and nodes Branch characteristics between, For the first Layer nodes and nodes Branch characteristics between, For the Sigmoid function, It is a very small fixed constant to prevent the denominator from being zero. For element-wise multiplication, The first in graph convolution layer, Represents a node The set of neighbors.
[0029] Step S24 can be used to input the extracted features into the decoding layer for decoding, and obtain the voltage amplitude and voltage phase angle of each node. After... The features extracted by the layer graph convolutional layer are fed into the decoding layer for decoding, obtaining the voltage amplitude and voltage phase angle of each node. The decoder consists of multiple fully connected layers, with the input being... The dimensions of the intermediate hidden layers are halved sequentially, until the final output layer has a dimension of 2. The activation function of the intermediate layers is... The function can obtain the voltage amplitude and voltage phase angle of each node according to formula (9). The extracted features are input into the decoding layer through formula (9) for decoding to obtain the voltage amplitude and voltage phase angle of each node. (9) in, The voltage amplitude predicted by the model. The voltage phase angle predicted by the model. For the node features after graph convolution, a common feature is defined. Layered graph convolution, This indicates the decoder.
[0030] In this implementation, inspired by the traditional numerical method of Newton-Raphson, the output voltage amplitude and voltage phase angle are used to calculate the imbalance between active and reactive power. Therefore, the loss value can be obtained according to formulas (10) to (12). (10) (11) (12) in, The loss value. This represents the total number of nodes in a training batch. , These are the weighting coefficients for the loss term. For nodes The imbalance of active power. For nodes The unbalance of reactive power, For known nodes in the system Active power For known nodes in the system Reactive power, it is important to note that when the node When P and Q are not known quantities, no action is taken. and The calculation, For nodes and nodes The branch conductance between For nodes and nodes Branch susceptance between For nodes and nodes The phase angle difference between them This represents the number of nodes in a given graph.
[0031] By designing the loss function It can effectively integrate the physical mechanisms in power flow calculation, directly reflecting the actual deviations in power flow calculation, and is consistent with the optimization objectives of traditional methods. By minimizing the power imbalance, an accurate solution can be obtained, and This extends the training process to an unsupervised learning paradigm. By using the imbalance in the node power equation as a loss term, the model can be trained without additional labeled data, effectively alleviating the data labeling challenge. Step S26 can be used to adjust the model parameters using gradient descent based on the preset learning rate and training epochs. Step S27 can be used to minimize the loss value to obtain the trained model.
[0032] In this embodiment, step S5 can be used to input the standardized graph data into the pre-trained computational model to obtain the power flow values of the power system. This computational model directly obtains the predicted values through a single forward propagation of the graph neural network, avoiding the iterative solution process of traditional methods. Furthermore, it uses the imbalance values from the power equation as loss values, and calculates the active and reactive power by substituting the model-predicted voltage amplitude and voltage phase angle into the nodal power equations, and then comparing them with known values. and By constructing an error term through comparison, the model is driven to perform backpropagation updates without the need for label data. Furthermore, it fully utilizes the topological information, branch attributes, and physical mechanisms within the power grid diagram data, resulting in a significant performance improvement compared to traditional machine learning methods.
[0033] In one example of the present invention, the IEEE-118 node system is used as an example to illustrate the important parameters and variables involved in the present invention. The system includes 118 nodes and 186 branches.
[0034] First, power flow data of the system is collected, including grid topology, active and reactive power of nodes, voltage amplitude and phase angle, and physical properties of branches (such as branch type, resistance, reactance, ground susceptance, and transformer turns ratio). Then, each power flow data point is converted into an undirected graph structure. The busbars in the cross-section are modeled as nodes in the diagram, and each node includes eight attributes, namely... The branches in the cross-section are modeled as edges in the diagram, and each edge includes five attributes, namely... Construct an adjacency matrix based on whether there are branches between nodes. The dimensions are (118, 118). The transformed graph data is preprocessed, and then a graph neural network operation model is constructed, which includes a graph encoding layer, five gated graph convolutional layers, and a decoding layer. First, the preprocessed graph data is encoded, and then linear transformations are performed on the node and edge features to generate... The hidden layer features are set to 128 dimensions in this case. Then, the positional encoding algorithm based on random walk (RWSE) is used to generate corresponding features for each node. The positional encoding is set to 8 dimensions in this study. After linear transformation, the positional encoding is fused with the node feature vector to further enhance the input node feature vector. This process updates each gated graph convolutional layer. The features extracted by the five graph convolutional layers are then fed into the decoding layer for decoding, yielding the voltage amplitude and voltage phase angle of each node. The decoder consists of three fully connected layers, with the input being... The dimension is 128, the dimensions of the intermediate hidden layers are halved successively to 64 and 32, and the final output layer has a dimension of 2. The activation function of the intermediate layers is... The function calculates the active and reactive power of each node by substituting the predicted values generated by the computational model into the nodal power equation. Based on the known active and reactive power of the system, it calculates the power imbalance, which is used as the loss value. The AdamW optimizer is then used for backpropagation to update the gradients of the model parameters. This setup involves 2000 training epochs, a batch size of 128, and a learning rate of 0.001. =1, The value is 1. After training, the final computational model is obtained. By using the power flow calculation method proposed in this invention, loading the trained model parameters, and inputting the collected operational data, the power flow values of the power grid system can be obtained.
[0035] On the other hand, the present invention also provides a power flow calculation system based on an unsupervised physical information graph neural network, the calculation system including a processor for executing the calculation method as described in any of the above.
[0036] Through the above technical solution, this invention provides a power flow calculation method and system based on unsupervised physical information graph neural networks. This method and system acquire power flow operation data of the power system, convert the data into an undirected graph structure, obtain graph data, preprocess the graph data to obtain standardized graph data, construct a computational model for calculating the power flow value of the power system, and pre-train the computational model. The standardized graph data is then input into the pre-trained computational model to obtain the power flow value of the power grid system. This invention solves the problems of low computational efficiency in traditional numerical calculation methods and the inability of traditional machine learning methods to fully utilize the power grid topology by constructing a computational model. It can fully utilize the topological information, branch attributes, and physical mechanisms in the power grid graph data. Compared with traditional machine learning methods, the model performance is significantly improved, and it does not require a large amount of labeled data.
[0037] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0038] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0039] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0040] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0041] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0042] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0043] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0044] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0045] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A power flow calculation method based on unsupervised physical information graph neural networks, characterized in that, The calculation method includes: Acquire power flow operation data of the power system; The power flow data is converted into an undirected graph structure to obtain graph data; Preprocess the graph data to obtain standardized graph data; A computational model for calculating power flow values in a power system is constructed, and the computational model is pre-trained. The standardized graph data is input into the pre-trained computational model to obtain the power flow values of the power system.
2. The calculation method according to claim 1, characterized in that, The power flow data is converted into an undirected graph structure to obtain graph data, including: The busbars and branches in the power system are treated as nodes and edges in an undirected graph structure. Obtain the node feature vector , in, For nodes The node feature vectors, For nodes active power, For nodes reactive power, For nodes voltage amplitude, For nodes voltage phase angle, , , For nodes One-Hot vectors of type, when node for Node time =1, when node for Node time =1, when node When it is a balanced node =1, For nodes Degree information; Obtain the edge feature vector , in, For nodes and nodes The edge feature vectors between them For nodes and nodes Branch types between, For nodes and nodes The branch resistance between, For nodes and nodes The branch reactance between, For nodes and nodes The branch circuit between them has a ground susceptance. For nodes and nodes The transformer turns ratio of the branch circuits between them; Construct an adjacency matrix based on the connection relationships between nodes. .
3. The calculation method according to claim 2, characterized in that, Preprocessing the graph data to obtain standardized graph data includes: The node feature vectors are preprocessed according to formula (1). ,(1) in, As the system power reference, For nodes Voltage level.
4. The calculation method according to claim 2, characterized in that, Constructing a computational model for calculating power flow values in a power system, and pre-training the computational model, including: The graph data in the training set is fed into the computational model to perform a linear transformation on the node feature vectors and edge feature vectors of the graph data; Position encoding is performed on the node feature vectors after linear transformation; Feature extraction is performed on the node feature vectors and edge feature vectors after position encoding based on the gated graph convolutional layer; The extracted features are input into the decoding layer for decoding, and the voltage amplitude and voltage phase angle of each node are obtained. The loss value is obtained based on the voltage amplitude and voltage phase angle; The model parameters are adjusted using gradient descent based on the preset learning rate and training epochs. Minimize the loss value to obtain the trained model.
5. The calculation method according to claim 4, characterized in that, The graph data in the training set is fed into the computational model to perform a linear transformation on the node feature vectors and edge feature vectors of the graph data, including: The node feature vectors and edge feature vectors of the graph data are linearly transformed according to formulas (2) and (3). ,(2) ,(3) in, These are the node feature vectors after linear transformation. , , , For learnable parameters, The nodes after linear transformation and nodes The edge feature vectors between them The feature dimension is the transformed dimension.
6. The calculation method according to claim 5, characterized in that, Position encoding is performed on the node feature vector after linear transformation, including: The node feature vectors after linear transformation are positionally encoded according to formulas (4) and (5). ,(4) ,(5) in, For the node feature vector after adding position encoding, For a learnable parameter matrix, For position encoding vectors, This is a random walk operation. Let be the degree matrix of the nodes. For nodes go through The probability of a random walk returning to itself.
7. The calculation method according to claim 5, characterized in that, Feature extraction is performed on the node feature vectors and edge feature vectors after position encoding based on the gated graph convolutional layer, including: Each gated graph convolutional layer is updated according to formulas (6) to (8). ,(6) ,(7) ,(8) in, For the first Layer nodes eigenvectors, For the first Layer nodes eigenvectors, For activation function, For batch normalization operations, , , , For a trainable parameter matrix, To set coefficients, For nodes neighboring nodes Features For the first Layer nodes and nodes Branch characteristics between For the first Layer nodes and nodes Branch characteristics between For the Sigmoid function, It is a very small fixed constant to prevent the denominator from being zero. For element-wise multiplication, The first in graph convolution layer, Represents a node The set of neighbors.
8. The calculation method according to claim 7, characterized in that, The extracted features are input into the decoding layer for decoding, and the voltage amplitude and voltage phase angle of each node are obtained, including: The voltage amplitude and voltage phase angle of each node are obtained according to formula (9). ,(9) in, The voltage amplitude predicted by the model. The voltage phase angle predicted by the model. For the node features after graph convolution, a common feature is defined. Layered graph convolution, This indicates the decoder.
9. The calculation method according to claim 5, characterized in that, The loss value is obtained based on the voltage amplitude and voltage phase angle, including: The loss value is obtained according to formulas (10) to (12). ,(10) ,(11) ,(12) in, The loss value. This represents the total number of nodes in a training batch. , The weighting coefficients for the loss term. For nodes The imbalance of active power. For nodes The unbalance of reactive power, For known nodes in the system Active power For known nodes in the system Reactive power, it is important to note that when the node When P and Q are not known quantities, no action is taken. and The calculation, For nodes and nodes The branch conductance between For nodes and nodes Branch susceptance between For nodes and nodes The phase angle difference between them This represents the number of nodes in a given graph.
10. A power flow calculation system based on an unsupervised physical information graph neural network, characterized in that, The computing system includes a processor for executing the computing method as described in any one of claims 1 to 9.