A Graph Neural Network-Based Power Grid Cascade Fault Prediction Method Guided by Physical Information

By using a graph neural network guided by physical information, combined with admittance modulus and power transmission distribution factor matrix, the characteristics of power grid nodes and lines are enhanced, solving the problems of heavy computational burden and insufficient information utilization in existing technologies, and realizing more efficient prediction of power grid cascade faults.

CN119579349BActive Publication Date: 2025-12-02CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411632981.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-12-02
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

Existing methods for predicting cascaded faults in power grids are computationally burdensome, cannot meet the speed requirements for online real-time assessment, and lack sufficient utilization of line information, complex network topology perception capabilities, and energy interaction relationship description capabilities.

Method used

A graph neural network guided by physical information is adopted. By calculating the admittance modulus and the power transfer distribution factor matrix, combined with a co-embedded graph neural network and a structure coding module, the characteristics of power grid nodes and lines are enhanced, and the ability to capture topological information and describe energy interaction relationships is improved.

Benefits of technology

It improves the accuracy and speed of predicting cascading faults in power grids, enhances the ability to describe complex power grids, and improves the accuracy of prediction models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579349B_ABST
    Figure CN119579349B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of power system cascade fault prediction, and relates to a power grid cascade fault prediction method based on a graph neural network guided by physical information. The method includes: acquiring operational data of cascade faults; inputting the operational data of cascade faults into a trained power grid cascade fault prediction model to obtain prediction results; the power grid cascade fault prediction model includes: a co-embedded graph neural network and a structure encoding module; this invention utilizes structure encoding based on a multi-step random walk matrix considering power grid line attributes and node degree representation for data augmentation, improving the ability to capture topological information; this invention utilizes the co-embedded graph neural network to promote the interaction between power grid nodes and power grid lines, improving the accuracy of power grid cascade fault prediction; this invention changes the node-edge interaction aggregation function of the co-embedded graph neural network by the power transmission distribution factor of the power grid, improving the ability to describe the complex interaction relationships of the actual power grid and improving the accuracy of power grid cascade fault prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system cascade fault prediction, and relates to a graph neural network-based power grid cascade fault prediction method guided by physical information. Background Technology

[0002] Due to the frequent occurrence of extreme weather events and the significant increase in renewable energy penetration, the uncertainty of modern power grids has surged, and the risk of cascading failures has increased significantly. Once a cascading failure occurs, it can trigger large-scale power outages, causing enormous economic losses and social harm. Therefore, rapid and accurate prediction of the scale of cascading failures is crucial for preventing power outages.

[0003] Existing methods can be mainly divided into model-driven methods and data-driven methods. Model-driven methods are primarily based on simulation models and have the advantages of clear physical meaning and strong interpretability. However, this method faces the challenge of solving a large number of repetitive nonlinear equations iteratively, resulting in a heavy computational burden and failing to meet the speed requirements of online real-time evaluation. Data-driven methods utilize artificial intelligence technology to explore the mapping relationship between different operating conditions and cascading faults, which can significantly improve the online identification speed. Existing data-driven methods mainly employ graph neural networks, graph attention networks, and graph sampling and aggregation algorithms.

[0004] In fact, large-scale shifts in line power flow are a key factor in the development of cascading faults. However, the above methods have problems such as insufficient utilization of line information, insufficient perception of complex network topology, and insufficient ability to describe complex energy interaction relationships in the power grid. Summary of the Invention

[0005] To address the aforementioned problems in the prior art, this invention employs a graph neural network-based power grid cascade fault prediction method guided by physical information, comprising: acquiring operational data of cascade faults; inputting the operational data of cascade faults into a trained power grid cascade fault prediction model to obtain prediction results; the power grid cascade fault prediction model includes: a co-embedded graph neural network and a structure encoding module; the training process of the power grid cascade fault prediction model includes:

[0006] S1. Obtain the operational data of the cascading fault, which includes: grid node data and grid line data; calculate the admittance modulus and matrix of the grid line based on the operational data of the cascading fault. Preprocessing of operational data from cascading faults yields characteristics of power grid nodes and power grid lines; among which, The power transfer distribution factor matrix;

[0007] S2. Construct the topology diagram of the power grid nodes and its corresponding line diagram. Input the admittance modulus of the power grid lines, the characteristics of the power grid nodes, the characteristics of the power grid lines, the topology diagram of the power grid nodes and its corresponding line diagram into the structure coding module for data augmentation to obtain the augmented characteristics of the power grid nodes and the characteristics of the power grid lines.

[0008] S3, Matrix The enhanced features of power grid nodes and power grid lines, the topology diagram of power grid nodes and their corresponding line graphs are co-embedded into a graph neural network to obtain the final representations of power grid nodes and power grid lines.

[0009] S4. Obtain the prediction results based on the final power grid node representation and power grid line representation;

[0010] S5. Calculate the loss function value based on the prediction results, update the model parameters based on the loss function value, and complete the model training when the loss function value is minimized, thus obtaining the trained power grid cascade fault prediction model.

[0011] Preprocessing of operational data for cascading faults includes normalizing the power grid node data and power grid line data respectively to obtain the power grid node characteristics and power grid line characteristics.

[0012] The structure coding module includes: a first structure coding module and a second structure coding module;

[0013] The first structural encoding module processes the characteristics of power grid nodes, including calculating the admittance magnitude matrix based on the admittance magnitude of the power grid lines. According to the admittance magnitude matrix Global structural encoding is performed on the power grid node features to obtain the first global encoded features; local structural encoding is performed on the power grid node features based on the power grid node topology diagram to obtain the first local encoded features; the first global encoded features and the first local encoded features are concatenated to obtain the first structural encoded features; the first structural encoded features and the power grid node features are concatenated to obtain the enhanced power grid node features; wherein, the admittance modulus matrix is... The included elements are the admittance modulus of the power lines between the corresponding power grid nodes;

[0014] The second structure encoding module processes the characteristics of the power grid line, including: calculating the admittance modulus matrix based on the admittance modulus of the power grid line. According to the class admittance modulus matrix Global structural encoding is performed on the power grid line features to obtain the second global encoded features; local structural encoding is performed on the power grid line features based on the line diagram corresponding to the power grid node topology to obtain the second local encoded features; the second global encoded features and the second local encoded features are concatenated to obtain the second structural encoded features; the second structural encoded features and the power grid line features are then concatenated to obtain the enhanced power grid line features; among which, the admittance modulus matrix... The elements included are the sum of the admittance moduli of the corresponding power grid lines.

[0015] Global structural encoding of power grid node features includes:

[0016]

[0017]

[0018] in, The global structural encoding features of power grid node i. Let be the random walk transition matrix. The random walk transition matrix The value of d raised to the power of i in the i-th row and i-th column. The diagonal admittance modulus length matrix, elements on the diagonal All other elements are 0. Let d be the admittance modulus of the power line between power grid node i and power grid node l, and d be the dimension of the global structure encoding.

[0019] Local structure encoding of power grid node features includes:

[0020]

[0021] in, Let be the value in the i-th row and i-th column of matrix D. D is the diagonal matrix of the power grid nodes, obtained from the power grid node topology diagram. The values ​​on the diagonal of D are the degrees of power grid node i. Represents the local structural coding features of power grid node i The q-th element, where r is the dimension of the local structure encoding.

[0022] The co-embedded graph neural network includes: multiple graph convolutional layers; wherein, the types of graph convolutional layers include: node graph convolutional layers and edge graph convolutional layers; the co-embedded graph neural network processes the enhanced power grid node features and power grid line features in the following ways:

[0023] S31. Input the enhanced power grid node features and power grid line features into the node graph convolutional layer. Convolutional layers of node graphs Output-input side graph convolutional layer ;

[0024] S32, Convolutional layer of edge graph Input / output node graph convolutional layer Convolutional layers of node graphs Output-input side graph convolutional layer ;

[0025] S33. Repeat step S32 until the last edge graph convolutional layer is obtained. The output includes representations of power grid nodes and power grid lines.

[0026] The process by which the node graph convolutional layer processes the output of the edge graph convolutional layer includes:

[0027]

[0028]

[0029]

[0030] in, , They represent the first Layer and first The feature representation of power grid node i output by the layered graph convolutional layer. , They represent the first Layer and first The feature representation of the power grid line j output by the layered graph convolutional layer. , as well as Here, || represents the weights of the k-th graph convolutional layer, and || represents the concatenation operation. Denotes the set of neighboring power grid nodes of power grid node i. Let represent the set of power grid lines connected to power grid node i. This represents the feature representation of power grid node i, which incorporates power grid line information, output by the k-th graph convolutional layer. For the first The feature representation of all neighboring power grid nodes of power grid node i output by the layer graph convolutional layer. For the aggregation function of the k-th graph convolutional layer, This is the activation function.

[0031] The process by which the edge graph convolutional layer processes the output of the node graph convolutional layer includes:

[0032]

[0033]

[0034]

[0035] in, , They represent the first Layer and first The feature representation of power grid node i output by the layered graph convolutional layer. , They represent the first Layer and first The feature representation of the power grid line j output by the layered graph convolutional layer. , as well as Here, || represents the weights of the k-th graph convolutional layer, and || represents the concatenation operation. Denotes the set of neighboring power grid lines of power grid line j. Let j represent the set of power grid nodes connected to power grid line j. This represents the power grid line features output by the k-th graph convolutional layer, incorporating information about power grid nodes. For the first The output of the layered graph convolutional layer is a feature representation of all neighboring power grid lines of power grid line j. For the aggregation function of the k-th graph convolutional layer, This is the activation function.

[0036] Aggregation function of the k-th layer edge graph convolutional layer for:

[0037]

[0038]

[0039]

[0040] in, Indicates the first The feature representation of power grid node i output by the layer-edge graph convolutional layer Let α represent the set of power grid nodes connected to power grid line j. ij The weighting coefficient between power grid node i and power grid line j is... , This is the weight matrix. For activation function, Let W be the set of neighboring power grid lines of power grid node i, and let W be the weight vector. This is the intermediate variable matrix obtained by transforming the PTDF matrix. For the neighboring grid line j of grid node i in The corresponding row vector in the middle, For the neighboring grid line n of grid node i in The corresponding row vector in the middle.

[0041] The prediction results include: power grid node prediction results. With power grid line prediction results loss function for: ,in, , For example, the prediction results of power grid nodes. And power grid line prediction results The weighted cross-entropy loss function, , These are the actual fault labels for power grid nodes and power grid lines, respectively.

[0042] Beneficial effects:

[0043] 1. This invention improves the model's ability to capture topological information by introducing admittance modulus calculation to consider the random walk transition matrix of power grid line attributes in multiple steps, and by performing original data augmentation based on the random walk transition matrix and the power grid topology encoding represented by node degree; 2. This invention utilizes co-embedded graph neural networks to promote the interaction between power grid nodes and power grid lines, improving the utilization of power grid line information, thereby improving the accuracy of power grid cascade fault prediction; 3. This invention guides the change of the original node-edge interaction aggregation function by using the power transmission distribution factor that describes the power transmission relationship between power grid nodes and power grid lines, further enhancing the model's ability to describe the complex energy interaction relationship of the actual power grid, and improving the accuracy of power grid cascade fault prediction. Attached Figure Description

[0044] Figure 1 A flowchart of a graph neural network-based power grid cascade fault prediction method provided in an embodiment of the present invention;

[0045] Figure 2 The diagram shows the structure of a graph neural network-based power grid cascade fault prediction model guided by physical information, as provided in an embodiment of the present invention. Detailed Implementation

[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] like Figure 1 , Figure 2As shown, this invention employs a graph neural network-based power grid cascade fault prediction method guided by physical information, comprising: acquiring operational data of cascade faults; inputting the operational data of cascade faults into a trained power grid cascade fault prediction model to obtain prediction results; the power grid cascade fault prediction model includes: a co-embedded graph neural network and a structure encoding module; the training process of the power grid cascade fault prediction model includes:

[0048] S1. Obtain the operational data of cascading faults, which includes: grid node data and grid line data; calculate the admittance modulus and power transfer distribution factor (PTDF) matrix of the grid lines based on the operational data of cascading faults; preprocess the operational data of cascading faults to obtain grid node characteristics and grid line characteristics;

[0049] S2. Construct the topology diagram of the power grid nodes and its corresponding line diagram. Input the admittance modulus of the power grid lines, the characteristics of the power grid nodes, the characteristics of the power grid lines, the topology diagram of the power grid nodes and its corresponding line diagram into the structure coding module for data augmentation to obtain the augmented characteristics of the power grid nodes and the characteristics of the power grid lines.

[0050] S3, Matrix The enhanced features of power grid nodes and power grid lines, the topology diagram of power grid nodes and their corresponding line graphs are co-embedded into a graph neural network to obtain the final representations of power grid nodes and power grid lines.

[0051] S4. Obtain the prediction results based on the final power grid node representation and power grid line representation;

[0052] S5. Calculate the loss function value based on the prediction results, update the model parameters based on the loss function value, and complete the model training when the loss function value is minimized to obtain the trained power grid cascade fault prediction model.

[0053] In one embodiment, the test was conducted using an IEEE 118 standard node system, consisting of 54 generators, 118 substations / buses, and 186 transmission lines. 5000 sample data points were collected using the AC-CFM cascading fault simulation model based on AC power flow. Each sample included data such as load active and reactive power demand, node voltage amplitude, node voltage phase angle, line reactance, line resistance, thermal rating, line status, and active and reactive power of the line before the fault.

[0054] The admittance modulus of a power grid line is a fixed property of the line and can be calculated from the resistance and reactance of the power grid line using a matrix. Line-node admittance matrix and node admittance matrix The inverse multiplication is obtained; the node admittance matrix describes the relationship between node current and voltage, and its elements are the admittances between nodes; the line-node admittance matrix describes the relationship between line current and node voltage difference, with each row corresponding to a line and each column corresponding to a node, and its elements representing the admittance relationship between the line and the node; if a line connects node i and node l, then the i and l columns of the corresponding row of that line are... and , Nodal admittance matrix The value in the i-th row and l-th column is 0, and the rest of the positions are 0.

[0055] Furthermore, the preprocessing of the operational data for cascading faults includes: to unify the data units, all grid node data X and grid line data Z of the cascading faults need to be preprocessed first, and the data preprocessing formula is as follows (1):

[0056] , (1)

[0057] in, , These are the preprocessed characteristics of power grid nodes and power grid lines, respectively. z represents the original input power grid node data and power grid line data. After preprocessing, each feature of the power grid node data is between [0,1].

[0058] X′ and Z′ represent the power grid node features and line features of a sample after preprocessing, respectively; X′∈ N is the number of power grid nodes, M is the number of power grid node characteristics, and Z′∈ U represents the number of power grid lines, and V represents the characteristic number of the power grid lines.

[0059] Furthermore, the structure coding module includes: a first structure coding module and a second structure coding module; the first structure coding module processes the characteristics of power grid nodes by:

[0060] Calculate the admittance magnitude matrix based on the admittance magnitude of the power grid line. According to the admittance magnitude matrix Global structural encoding is performed on the characteristics of power grid nodes to obtain the first global encoded features; local structural encoding is performed on the characteristics of power grid nodes based on the topology diagram of power grid nodes to obtain the first local encoded features; structural encoding takes into account the line attributes of the actual power grid, and local structural encoding takes into account the node degree that can reflect local information;

[0061] Specifically, global structural encoding of power grid node characteristics includes:

[0062] (2)

[0063] in, The global structural encoding features of power grid node i. To consider the random walk transition matrix that takes into account the route attributes, Let d be the value of the random walk transition matrix raised to the power of d in the i-th row and i-th column. The diagonal admittance modulus length matrix, elements on the diagonal All other elements are 0. Let d be the admittance magnitude of the power line between power grid node i and power grid node l, and d be the dimension of the global structure encoding. Due to the diffusion characteristics of the graph, the relationships between nodes spread from the neighborhood to the entire graph, and the global structure encoding represents the globally unique role of each node in the actual power grid.

[0064] To capture local structure information, the one-hot encoding of the grid node degree is used as the local structure encoding:

[0065] (3)

[0066] in, Let be the value in the i-th row and i-th column of matrix D. D is the diagonal matrix of the power grid nodes, obtained from the power grid node topology diagram. The values ​​on the diagonal of D are the degrees of power grid node i, and the remaining values ​​are 0. Represents the degree-based local structure coding features of power grid node i. The q-th element, the degree, reflects the local importance of the node, and r is the dimension of the local structure encoding.

[0067] The first global coding feature and the first local coding feature are concatenated to obtain the first structural coding feature. The first structural coding features and the power grid node features are concatenated to obtain the enhanced power grid node features. .

[0068] The second structure encoding module processes the characteristics of the power grid lines, including:

[0069] Calculate the admittance magnitude matrix based on the admittance magnitude of the power grid line. According to the class admittance modulus matrix Global structural encoding of power grid line characteristics includes:

[0070] (4)

[0071] (5)

[0072] in, The global structural coding features of power grid line j, Let be the random walk transition matrix. The random walk transition matrix The value of d raised to the power of in the j-th row and j-th column. This is the admittance magnitude matrix under the line graph, where each element is the sum of the admittance magnitudes of the corresponding line. Let be the sum of the admittance magnitudes of lines l and j. The diagonal class admittance magnitude matrix, elements on the diagonal All other elements are 0, and d is the dimension of the global structure encoding.

[0073] Local structure encoding of power grid line characteristics includes:

[0074] (6)

[0075] in, For matrix The value in the j-th row and j-th column, The angle matrix of the power grid lines in the line diagram is obtained from the line diagram corresponding to the power grid node topology diagram. The values ​​on the diagonal are the degrees of power grid line j, and the rest are 0. Represents the local structural coding features of power grid line j The q-th element, where r is the dimension of the local structure encoding.

[0076] The second global coding feature and the second local coding feature are concatenated to obtain the second structural coding feature. The second structural coding features and the power grid line features are concatenated to obtain the enhanced power grid line features. .

[0077] The co-embedded graph neural network includes: multiple layers of graph convolutional layers; wherein, the types of graph convolutional layers include: node graph convolutional layers and edge graph convolutional layers, which are alternately concatenated; the co-embedded graph neural network processes the enhanced power grid node features and power grid line features in the following ways:

[0078] S31. Input the enhanced power grid node features and power grid line features into the node graph convolutional layer respectively. Convolutional layers of node graphs Output-input side graph convolutional layer ;

[0079] S32, Convolutional layer of edge graph Input / output node graph convolutional layer Convolutional layers of node graphs Output-input side graph convolutional layer ;

[0080] S33. Repeat step S32 until the last edge graph convolutional layer is obtained. The output includes representations of power grid nodes and power grid lines.

[0081] The node graph convolutional layer uses the power grid node topology graph for graph convolution operations, while the edge graph convolutional layer uses the power grid node topology graph and its corresponding line graph for graph convolution operations.

[0082] The propagation rules of the node graph convolutional layer are shown in (7)-(9):

[0083] (7)

[0084] (8)

[0085] (9)

[0086] The power grid node topology diagram is as follows: X is a graph Z is a set of nodes, where each node represents a power grid node, and Z is a graph. The set of edges, where each edge represents a power grid line. , They represent the first Layer and first The feature representation of power grid node i output by the layered graph convolutional layer. , They represent the first Layer and first The feature representation of the power grid line j output by the layered graph convolutional layer. , as well as Here, || represents the weights of the k-th graph convolutional layer, and || represents the concatenation operation. Denotes the set of neighboring power grid nodes of power grid node i. Let represent the set of power grid lines connected to power grid node i. This represents the feature representation of power grid node i, which incorporates power grid line information, output by the k-th graph convolutional layer. For the first The feature representation of all neighboring power grid nodes of power grid node i output by the layer graph convolutional layer. For the aggregation function of the k-th graph convolutional layer, This is the activation function. The process can be summarized as follows: while aggregating the feature information of neighboring power grid nodes, it concatenates the information of relevant power grid lines, and finally inputs the final output into the side graph convolutional layer.

[0087] The propagation rules of the edge graph convolutional layer are shown in (10)-(12):

[0088] (10)

[0089] (11)

[0090] (12)

[0091] In the edge graph convolutional layer, the line graph corresponding to the power grid node topology graph is: Z is the graph A set of nodes, where each node represents a power grid line, and E is the graph. The set of edges, where each edge represents the connection between power grid lines. Denotes the set of neighboring power grid lines of power grid line j. Let j represent the set of power grid nodes connected to power grid line j. This represents the power grid line features output by the k-th graph convolutional layer, incorporating information about power grid nodes. For the first The layer graph convolutional layer outputs feature representations of all neighboring power grid lines of power grid line j. Similar to the node convolutional layer, the edge graph convolutional layer aggregates feature information of neighboring edge power grid lines while concatenating information of relevant power grid nodes. Finally, the final output is input to the next graph convolutional layer or the final downstream task.

[0092] Let ReLU(*) be the activation function. The formula for calculating ReLU(*) is:

[0093] (13)

[0094] in, This is the input to the activation function.

[0095] Inspired by the actual power flow transfer relationship in the power grid, the traditional approach for the aggregation function AGG in the interaction between the node graph convolutional layer and the edge graph convolutional layer is to use summation, averaging, or to calculate the attention coefficient, as shown in (14)-(17):

[0096] (14)

[0097] (15)

[0098] (16)

[0099] in, For the summation function, To find the average function, This is a function that sums based on the attention coefficient.

[0100] Attention algorithms first perform feature transformations on the nodes in the graph, and then calculate the attention coefficients between the nodes. Taking node i and its neighbor node l as an example:

[0101] (17)

[0102] In the formula, α ij Let be the attention coefficient between node i and node l. Let i be the feature vector of node i. A weight vector used for transformation The dimension is N(i), where N(i) is the set of neighboring nodes of node i, and || denotes concatenation. It is a single-layer neural network. As an activation function, compared to It can alleviate the gradient vanishing problem to some extent.

[0103] While the aggregation method of attention coefficients performs well due to its trainability, it is insufficient to characterize the complex energy interaction relationships of actual power grids. Therefore, referring to the calculation method of attention coefficients, this invention introduces physical information, namely the power transfer distribution factor (PTDF), to improve the calculation formula of attention coefficients, as shown in (18)-(20):

[0104] (18)

[0105] (19)

[0106] (20)

[0107] In equation (19), the dot product is used. To ensure that the changes in each column of the power transfer distribution factor (PTDF) matrix are consistent, i.e. The values ​​in each column are the same. In the activation function The weight matrix applied later, the PTDF matrix, has the following size: α is used to describe the relationship between the power flow changes of each line in the power grid and the power of the power grid nodes. It can be calculated based on the operating data of the power grid cascade fault; in equation (20), α ij W is the weighting coefficient between grid node i and grid line j, and W is used to compress P by row or column. j and P n The weight vector, Let i be the set of neighboring power grid lines. This is an intermediate variable matrix obtained by transforming the PTDF matrix through a trainable weight matrix. Each column represents the change in power of each line when the power of a grid node changes by a unit. For the neighboring grid line j of grid node i in The corresponding row vector in the middle, For the neighboring grid line n of grid node i in The corresponding row vector in the middle.

[0108] The method for calculating the weighting coefficient of the line is similar:

[0109] (twenty one)

[0110] (twenty two)

[0111] (twenty three)

[0112] in, The weighting coefficient between power grid line j and power grid node i is... , This is the weight matrix. It is used for compression by row or column. and The weight vector, Let j be the set of neighboring power grid nodes of power grid line j. This is an intermediate variable matrix obtained by transforming the PTDF matrix through a trainable weight matrix. Each column represents the change in power of each line when the power of a grid node changes by a unit. For the neighboring grid node i of grid line j in The corresponding column vector in For the neighboring grid nodes of grid line j exist The corresponding column vector in the middle.

[0113] By incorporating practical physics knowledge, these weighting coefficients not only retain the flexibility of the attention mechanism but also make the model's learning process more in line with physical laws, thereby improving the model's representational ability.

[0114] Finally, the power grid node representation and power grid line representation are processed through two fully connected layers to obtain the power grid node prediction result and the power grid line prediction result, respectively. The loss function of the output layer... The definition is as follows:

[0115] (twenty four)

[0116] in, , For example, the prediction results of power grid nodes. And power grid line prediction results The weighted cross-entropy loss function, , These are the actual fault labels for power grid nodes and power grid lines, respectively.

[0117] To verify the superiority of the proposed method, the model of this invention is compared and analyzed with graph convolutional neural networks, graph attention neural networks, graph sampling, and graph neural networks that aggregate node and edge attributes. The model composition of the proposed method and the comparison methods (M1-M6) is shown below, where M6 is the proposed method. All models ultimately have a prediction layer with 16 hidden neurons. The input dimension is the number of neurons in the corresponding hidden layer, and the output is the prediction result after passing through the Softmax function.

[0118] M1: A cascaded fault prediction model based on a graph convolutional neural network. The base model is a graph convolutional neural network with two layers: 186 neurons in the first layer and 16 neurons in the second layer. The initial learning rate is set to 0.0001, and the Adam gradient descent algorithm is used as the optimizer.

[0119] M2: A cascaded fault prediction model based on a graph attention neural network. The base model is a graph attention neural network with two layers: 186 neurons in the first layer and 16 neurons in the second layer. The initial learning rate is set to 0.0001, and the Adam gradient descent algorithm is used as the optimizer.

[0120] M3: A cascaded fault prediction model based on a graph attention neural network. The base model is a graph attention neural network with two layers: 186 neurons in the first layer and 16 neurons in the second layer. Unlike M2, M3 directly calculates the attention coefficient using line features, while M2 calculates the attention coefficient by concatenating node features as line features. The initial learning rate is set to 0.0001, and the Adam gradient descent algorithm is used as the optimizer.

[0121] M4: A cascaded fault prediction model based on graph sampling and aggregation algorithms. The base model uses a graph sampling and aggregation neural network with two layers: 186 neurons in the first layer and 16 neurons in the second layer. The initial learning rate is set to 0.0001, and the Adam gradient descent algorithm is used as the optimizer.

[0122] M5: A cascaded fault prediction model based on graph neural networks with node and edge attributes. The base model is a graph neural network with node and edge attributes, consisting of two layers and 16 hidden neurons. The initial learning rate is set to 0.0001, and the Adam gradient descent algorithm is used as the optimizer.

[0123] M6: This invention employs a cascaded fault prediction model based on a physically-informed co-embedded graph neural network. The co-embedded graph neural network has four layers: the first and third layers are node convolutional layers, and the second and fourth layers are edge convolutional layers. The hidden layer contains 16 neurons. The initial learning rate is set to 0.0001, and the Adam gradient descent algorithm is used as the optimizer.

[0124] In terms of evaluation metrics, classification accuracy (A), balanced accuracy (B), and the area under the receiver operating characteristic (AUC-ROC) curve are used to measure the model's accuracy in predicting cascading faults. Classification accuracy refers to the ratio of correctly predicted faulty nodes or lines to the total number of nodes or lines, and its calculation formula is as follows:

[0125] (25)

[0126] In the formula, A is the classification accuracy, TP is the number of true faulty nodes or lines correctly classified, TN is the number of normal nodes or lines correctly classified, FN is the number of true faulty nodes or lines incorrectly classified as normal nodes or lines, and FP is the number of normal nodes or lines incorrectly classified as faulty nodes or lines.

[0127] Balanced accuracy is suitable for imbalanced datasets and can better reflect the model's performance on different classes. Calculating balanced classification accuracy includes:

[0128] (26)

[0129] (27)

[0130] (28)

[0131] Where TPR is the recall rate for the positive class, TNR is the recall rate for the negative class, and BA is the balanced precision rate.

[0132] The area under the receiver operating characteristic (AUC-ROC) curve is an evaluation metric for model classification performance. This metric is independent of specific thresholds and can comprehensively evaluate model performance. The AUC-ROC value ranges from 0 to 1, with a larger value indicating better model performance. Its calculation formula is shown in (29):

[0133] (29)

[0134] The ROC curve is obtained by calculating the TPR and FPR (false positive rate) values ​​obtained at different thresholds, plotting FPR on the horizontal axis and TPR on the vertical axis, where F is the number of thresholds and f is the index of the threshold.

[0135] Models M1, M2, M3, M4, M5, and M6 use collected cascade fault data from the IEEE 118 standard node system as their datasets. The datasets are divided into training, validation, and test sets at a ratio of 60%, 20%, and 20%, respectively. The training set is used to optimize the model parameters; the validation set is used to check the model's convergence (training stops when the model's performance does not improve after 200 training epochs); and the test set is used to evaluate the final predictive ability of the model that performs best in the validation set.

[0136] As shown in Table 1, compared with other models, M6 improved the accuracy, balanced accuracy, and area under the receiver operating characteristic curve by 0.9%, 2%, and 1.7% in line prediction, and by 0.9%, 3.9%, and 4.2% in node prediction, respectively. Therefore, the model of this invention achieves the highest prediction accuracy in all aspects, especially compared with the M1-M4 models that only utilize node information, the overall evaluation indicators are improved.

[0137] Table 1 Comparison of metrics based on different data-driven methods

[0138]

[0139] The prediction model trained by this invention can be integrated into a real-time safety assessment system to periodically assess the current power grid status and provide a reference for relevant personnel before taking protective measures.

[0140] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A graph neural network-based power grid cascade fault prediction method guided by physical information, characterized in that, Obtain operational data of cascading faults, input the operational data of cascading faults into the trained power grid cascading fault prediction model, and obtain the prediction results; The power grid cascade fault prediction model includes: a co-embedded graph neural network and a structured coding module; the training process of the power grid cascade fault prediction model includes: S1. Obtain the operational data of the cascading fault, which includes: grid node data and grid line data; calculate the admittance modulus and matrix of the grid line based on the operational data of the cascading fault. Preprocessing of operational data from cascading faults yields characteristics of power grid nodes and power grid lines; among which, The power transfer distribution factor matrix; S2. Construct the topology diagram of the power grid nodes and its corresponding line diagram. Input the admittance modulus of the power grid lines, the characteristics of the power grid nodes, the characteristics of the power grid lines, the topology diagram of the power grid nodes and its corresponding line diagram into the structure coding module for data augmentation to obtain the augmented characteristics of the power grid nodes and the characteristics of the power grid lines. S3, Matrix The enhanced features of power grid nodes and power grid lines, the topology diagram of power grid nodes and their corresponding line graphs are co-embedded into a graph neural network to obtain the final representations of power grid nodes and power grid lines. The co-embedded graph neural network includes: multiple graph convolutional layers; wherein, the types of graph convolutional layers include: node graph convolutional layers and edge graph convolutional layers; the co-embedded graph neural network processes the enhanced power grid node features and power grid line features in the following ways: S31. Input the enhanced power grid node features and power grid line features into the node graph convolutional layer. Convolutional layers of node graphs Output-input side graph convolutional layer ; S32, Convolutional layer of edge graph Input / output node graph convolutional layer Convolutional layers of node graphs Output-input side graph convolutional layer Where k is the index of the graph convolutional layer; S33. Repeat step S32 until the last edge graph convolutional layer is obtained. The final output includes representations of the power grid nodes and power grid lines. S4. Obtain the prediction results based on the final power grid node representation and power grid line representation; S5. Calculate the loss function value based on the prediction results, update the model parameters based on the loss function value, and complete the model training when the loss function value is minimized, thus obtaining the trained power grid cascade fault prediction model.

2. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information as described in claim 1, characterized in that, Preprocessing of operational data for cascading faults includes normalizing the power grid node data and power grid line data respectively to obtain the power grid node characteristics and power grid line characteristics.

3. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information as described in claim 1, characterized in that, The structure coding module includes: a first structure coding module and a second structure coding module; The first structural encoding module processes the characteristics of power grid nodes, including calculating the admittance magnitude matrix based on the admittance magnitude of the power grid lines. According to the admittance magnitude matrix Global structural encoding is performed on the power grid node features to obtain the first global encoded features; local structural encoding is performed on the power grid node features based on the power grid node topology diagram to obtain the first local encoded features; the first global encoded features and the first local encoded features are concatenated to obtain the first structural encoded features; the first structural encoded features and the power grid node features are concatenated to obtain the enhanced power grid node features; wherein, the admittance modulus matrix is... The included elements are the admittance modulus of the power lines between the corresponding power grid nodes; The second structure encoding module processes the characteristics of the power grid line, including: calculating the admittance modulus matrix based on the admittance modulus of the power grid line. According to the class admittance modulus matrix Global structural encoding is performed on the power grid line features to obtain the second global encoded features; local structural encoding is performed on the power grid line features based on the line diagram corresponding to the power grid node topology to obtain the second local encoded features; the second global encoded features and the second local encoded features are concatenated to obtain the second structural encoded features; the second structural encoded features and the power grid line features are then concatenated to obtain the enhanced power grid line features; among which, the admittance modulus matrix... The elements included are the sum of the admittance moduli of the corresponding power grid lines.

4. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information according to claim 3, characterized in that, Global structural encoding of power grid node features includes: in, The global structural encoding features of power grid node i. Let be the random walk transition matrix. The random walk transition matrix The value of d raised to the power of i in the i-th row and i-th column. The diagonal admittance modulus length matrix, elements on the diagonal All other elements are 0. Let d be the admittance modulus of the power line between power grid node i and power grid node l, and d be the dimension of the global structure encoding.

5. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information according to claim 3, characterized in that, Local structure encoding of power grid node features includes: in, Let be the value in the i-th row and i-th column of matrix D. D is the diagonal matrix of the power grid nodes, obtained from the power grid node topology diagram. The values ​​on the diagonal of D are the degrees of power grid node i. Represents the local structural coding features of power grid node i The q-th element, where r is the dimension of the local structure encoding.

6. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information as described in claim 1, characterized in that, The process by which the node graph convolutional layer processes the output of the edge graph convolutional layer includes: in, , They represent the first Layer and first The feature representation of power grid node i output by the layered graph convolutional layer. , They represent the first Layer and first The feature representation of the power grid line j output by the layered graph convolutional layer. , as well as Here, || represents the weights of the k-th graph convolutional layer, and || represents the concatenation operation. Denotes the set of neighboring power grid nodes of power grid node i. Let represent the set of power grid lines connected to power grid node i. This represents the feature representation of power grid node i, which incorporates power grid line information, output by the k-th graph convolutional layer. For the first The feature representation of all neighboring power grid nodes of power grid node i output by the layer graph convolutional layer. For the aggregation function of the k-th graph convolutional layer, This is the activation function.

7. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information as described in claim 6, characterized in that, The process by which the edge graph convolutional layer processes the output of the node graph convolutional layer includes: in, , They represent the first Layer and first The feature representation of power grid node i output by the layered graph convolutional layer. , They represent the first Layer and first The feature representation of the power grid line j output by the layered graph convolutional layer. , as well as Here, || represents the weights of the k-th graph convolutional layer, and || represents the concatenation operation. Denotes the set of neighboring power grid lines of power grid line j. Let j represent the set of power grid nodes connected to power grid line j. This represents the power grid line features output by the k-th graph convolutional layer, incorporating information about power grid nodes. For the first The output of the layered graph convolutional layer is a feature representation of all neighboring power grid lines of power grid line j. For the aggregation function of the k-th graph convolutional layer, This is the activation function.

8. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information according to claim 7, characterized in that, Aggregation function of the k-th layer edge graph convolutional layer for: in, Indicates the first The feature representation of power grid node i output by the layer-edge graph convolutional layer Let α represent the set of power grid nodes connected to power grid line j. ij The weighting coefficient between power grid node i and power grid line j is... , This is the weight matrix. For activation function, Let W be the set of neighboring power grid lines of power grid node i, and let W be the weight vector. This is the intermediate variable matrix obtained by transforming the PTDF matrix. For the neighboring grid line j of grid node i in The corresponding row vector in the middle, For the neighboring grid line n of grid node i in The corresponding row vector in the middle.

9. The method for predicting cascaded faults in a power grid based on a graph neural network guided by physical information according to claim 1, characterized in that, The prediction results include: power grid node prediction results. With power grid line prediction results loss function for: ,in, , For example, the prediction results of power grid nodes. And power grid line prediction results The weighted cross-entropy loss function, , These are the actual fault labels for power grid nodes and power grid lines, respectively.

Citation Information

Patent Citations

  • Dominant instability mode recognition model construction and application method based on graph neural network

    CN112200694A

  • Method, system and equipment for graph neural network training and wireless cell fault prediction

    CN115426671A