Graph neural network power grid cascade fault prediction method based on physical information guidance

Through the graph neural network method based on physical information guidance, the problem of insufficient utilization of line information and insufficient perception of complex network topology in power grid cascade fault prediction is solved, and more efficient and accurate power grid cascade fault prediction is achieved.

CN119579349AActive Publication Date: 2025-03-07CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

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

AI Technical Summary

Technical Problem

The existing power grid cascade fault prediction methods have problems such as insufficient utilization of line information, insufficient perception of complex network topology, and insufficient description of complex energy interaction relationships.

Method used

The graph neural network method based on physical information guidance is adopted. By obtaining the operating data of the power grid cascade faults, calculating the admittance model length and PTDF matrix, the grid node topology structure diagram and line diagram are constructed, and the input of the co-embedded graph neural network is used for data enhancement and feature representation, improving the model's ability to capture the grid topology and energy interaction relationship.

Benefits of technology

It improves the accuracy and speed of grid cascade fault prediction, and enhances the ability to describe the complex network topology and energy interaction relationship of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579349A_ABST
    Figure CN119579349A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of power system cascade fault prediction, and relates to a graph neural network power grid cascade fault prediction method based on physical information guidance, and the method comprises the steps: obtaining the operation data of a cascade fault, inputting the operation data of the cascade fault into a trained power grid cascade fault prediction model, and obtaining a prediction result; the power grid cascade fault prediction model comprises a common embedded graph neural network and a structure coding module; according to the invention, data enhancement is carried out by using a multi-step random walk matrix considering power grid line attributes and structure coding represented by node degrees, so that the capability of capturing topological information is improved; according to the invention, the interaction between the power grid nodes and the power grid lines is promoted by using the co-embedded graph neural network, and the accuracy of power grid cascade fault prediction is improved; according to the method, the node-edge interaction aggregation function of the co-embedded graph neural network is changed through the power transmission distribution factor of the power grid, the description capability of the actual complex interaction relation of the power grid is improved, and the accuracy of power grid cascade fault prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power system cascading failure prediction, and relates to a graph neural network power grid cascading failure prediction method based on physical information guidance. Background Art

[0002] Due to the frequent occurrence of extreme weather events and the substantial increase in the penetration rate of renewable energy, the uncertainty of modern power grids has increased dramatically, and the risk of cascading failures has increased significantly. Once a cascading failure occurs, it will cause a large-scale power outage, causing huge economic losses and social harm. Therefore, quickly and accurately predicting the scale of cascading failures plays an important role in preventing power outages.

[0003] Existing methods can be mainly divided into model-driven methods and data-driven methods. Model-driven methods are mainly based on simulation models, which have the advantages of clear physical meaning and strong interpretability. However, this method needs to face a large number of repeated iterative solutions of nonlinear equations, which has a heavy computational burden and cannot meet the speed requirements of online real-time evaluation. Data-driven methods use artificial intelligence technology to mine the mapping relationship between different operating conditions and cascading failures, which can significantly improve the speed of online recognition. Existing data-driven methods mainly use graph neural networks, graph attention networks, and graph sampling and aggregation algorithms.

[0004] In fact, large-scale transfer of line power is a key factor in the development of cascading failures. 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 interactions in the power grid. Summary of the invention

[0005] In order to solve the above-mentioned prior art problems, the present invention adopts a graph neural network power grid cascading failure prediction method based on physical information guidance, including: obtaining the operation data of the cascading failure, inputting the operation data of the cascading failure into a trained power grid cascading failure prediction model to obtain a prediction result; the power grid cascading failure prediction model includes: a co-embedded graph neural network and a structural encoding module; the training process of the power grid cascading failure prediction model includes:

[0006] S1. Acquire operation data of cascading failures, wherein the operation data of cascading failures include: grid node data and grid line data; calculate the admittance modulus and matrix PTDF of the grid line according to the operation data of cascading failures; pre-process the operation data of cascading failures to obtain grid node characteristics and grid line characteristics; wherein PTDF is a power transmission distribution factor matrix;

[0007] S2, constructing a grid node topology diagram and its corresponding line diagram, inputting the admittance modulus length of the grid line, grid node characteristics, grid line characteristics, grid node topology diagram and its corresponding line diagram into the structure coding module for data enhancement, and obtaining enhanced grid node characteristics and grid line characteristics;

[0008] S3, inputting the matrix PTDF, the enhanced grid node features and grid line features, the grid node topology diagram and its corresponding line diagram into the co-embedding graph neural network to obtain the final grid node representation and grid line representation;

[0009] S4. Obtain prediction results according to the final grid node representation and grid line representation;

[0010] S5. Calculate the loss function value according to the prediction result, and update the model parameters according to the loss function value. When the loss function value is the smallest, the model training is completed to obtain a trained power grid cascading fault prediction model.

[0011] Preprocessing the operation data of the cascading fault includes: normalizing the power grid node data and the power grid line data respectively to obtain the power grid node characteristics and the power grid line characteristics.

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

[0013] The first structure coding module processes the grid node features, including: calculating the admittance modulus length matrix Y according to the admittance modulus length of the grid line; performing global structure coding on the grid node features according to the admittance modulus length matrix Y to obtain global coding features; performing local structure coding on the grid node features according to the grid node topology diagram to obtain local coding features; splicing the global coding features and the local coding features to obtain the first structure coding features; splicing the first structure coding features and the grid node features to obtain enhanced grid node features; wherein the elements contained in the admittance modulus length matrix Y are the admittance modulus lengths of the grid lines between the corresponding grid nodes;

[0014] The second structural coding module processes the power grid line characteristics, including: calculating the quasi-admittance modulus length matrix Y′ according to the admittance modulus length of the power grid line; performing global structural coding on the power grid line characteristics according to the quasi-admittance modulus length matrix Y′ to obtain global coding characteristics; performing local structural coding on the power grid line characteristics according to the line diagram corresponding to the power grid node topology diagram to obtain local coding characteristics; splicing the global coding characteristics and the local coding characteristics to obtain the second structural coding characteristics; splicing the second structural coding characteristics and the power grid line characteristics to obtain enhanced power grid line characteristics; wherein the elements contained in the quasi-admittance modulus length matrix Y′ are the sum of the admittance modulus lengths of the corresponding power grid lines.

[0015] The global structural encoding of grid node characteristics includes:

[0016]

[0017] L=YM -1

[0018] in, is the global structural encoding feature of power grid node i, L is the random walk transfer matrix, is the value of the random walk transfer matrix L at the dth power in the i-th row and i-th column, M is the diagonal admittance modulus length value matrix, and the elements M on the diagonal of M ii =∑ l Y il , the rest of the elements are 0, Y il is the admittance modulus length of the grid line between grid node i and grid node l, and d is the dimension of the global structure encoding.

[0019] The local structure encoding of the grid node characteristics includes:

[0020]

[0021] Among them, D ii is the value of the matrix D in the i-th row and i-th column. D is the diagonal matrix of the power grid node, which is obtained from the topological structure diagram of the power grid node. The value on the diagonal of D is the degree of the power grid node i. Represents the local structural encoding characteristics of power grid node i The qth element of , r is the dimension of the local structure encoding.

[0022] The co-embedded graph neural network includes: a multi-layer graph convolution layer; wherein the types of graph convolution layers include: a node graph convolution layer and an edge graph convolution layer; the co-embedded graph neural network processes the enhanced power grid node features and power grid line features including:

[0023] S31. Input the enhanced grid node features and grid line features into the node graph convolution layer The node graph convolution layer The output of the input edge graph convolutional layer

[0024] S32, the edge graph convolution layer The output and input nodes of the convolutional layer The node graph convolution layer The output of the input edge graph convolutional layer

[0025] S33, repeat step S32 until the last edge graph convolution layer is obtained Output grid node representation and grid line representation.

[0026] The process of the node graph convolution layer processing the output of the edge graph convolution layer includes:

[0027]

[0028] in, denote the feature representation of the power grid node i output by the k-th and k-1-th graph convolutional layers, respectively. They represent the feature representation of the power grid line j output by the k-th and k-1-th graph convolutional layers, respectively. as well as is the weight of the k-th graph convolutional layer, || is the concatenation operation, N(i) represents the set of neighboring grid nodes of grid node i, C(i) represents the set of grid lines connected to grid node i, is the feature representation of the grid node i that incorporates the grid line information output by the k-th graph convolutional layer, is the feature representation of all neighboring grid nodes of grid node i output by the k-1th graph convolutional layer, AGG k is the aggregation function of the kth graph convolutional layer, and σ is the activation function.

[0029] The process of edge graph convolution layer processing the output of node graph convolution layer includes:

[0030]

[0031] in, denote the feature representation of the power grid node i output by the k-th and k-1-th graph convolutional layers, respectively. They represent the feature representation of the power grid line j output by the k-th and k-1-th graph convolutional layers, respectively. as well as is the weight of the k-th graph convolutional layer, || is the concatenation operation, N(j) represents the set of neighboring power lines of power line j, C(j) represents the set of power nodes connected to power line j, is the grid line feature representation integrated with grid node information output by the k-th graph convolutional layer, AGG is the feature representation of all neighboring power lines of power line j output by the k-1th graph convolutional layer, k is the aggregation function of the kth graph convolutional layer, and σ is the activation function.

[0032] Aggregation function AGG of the kth edge graph convolutional layer k for:

[0033]

[0034]

[0035] in, represents the feature representation of the grid node i output by the k-th edge graph convolutional layer, C(j) represents the set of grid nodes connected to grid line j, and α ij is the weight coefficient between grid node i and grid line j, W1′ and W2′ are weight matrices, LeakyReLU is the activation function, N(i) is the set of neighboring grid lines of grid node i, W is the weight vector, P is the intermediate variable matrix obtained by transforming the PTDF matrix, and P j is the row vector corresponding to the neighboring grid line j of grid node i in P, P n is the row vector corresponding to the neighboring grid line n of grid node i in P.

[0036] The prediction results include: Power grid node prediction results Grid line prediction results The loss function Loss is: Among them, L v WCE , L e WCE The prediction results of power grid nodes are And the grid line prediction results The weighted cross entropy loss function, y v ,y e are the true fault labels of grid nodes and grid lines respectively.

[0037] Beneficial effects:

[0038] 1. The present invention introduces the random walk transfer matrix that takes into account the attributes of the power grid line in multiple steps by introducing the admittance modulus length calculation, and performs original data enhancement based on the random walk transfer matrix and the power grid topology structure encoding represented by the node degree, thereby improving the model's ability to capture topology information; 2. The present invention utilizes a co-embedded graph neural network to promote the interaction between power grid nodes and power grid lines, improves the utilization of power grid line information, and thus improves the accuracy of power grid cascading fault prediction; 3. The present invention guides the change of the original node-edge interaction aggregation function through the power transmission distribution factor that describes the power transmission relationship between power grid nodes and power grid lines in the power grid, thereby 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 cascading fault prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flowchart of a method for predicting cascading faults in a power grid using a graph neural network guided by physical information provided by an embodiment of the present invention;

[0040] Figure 2 A structural diagram of a graph neural network power grid cascading failure prediction model based on physical information guidance provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] like Figure 1 , Figure 2 As shown, the present invention adopts a graph neural network power grid cascading failure prediction method based on physical information guidance, including: obtaining the operation data of the cascading failure, inputting the operation data of the cascading failure into a trained power grid cascading failure prediction model, and obtaining a prediction result; the power grid cascading failure prediction model includes: a co-embedded graph neural network and a structural encoding module; the training process of the power grid cascading failure prediction model includes:

[0043] S1. Acquire operation data of cascading failures, wherein the operation data of cascading failures include: grid node data and grid line data; calculate the admittance modulus and power transfer distribution factor matrix (PTDF) of the grid line according to the operation data of cascading failures; pre-process the operation data of cascading failures to obtain grid node characteristics and grid line characteristics;

[0044] S2, constructing a grid node topology diagram and its corresponding line diagram, inputting the admittance modulus length of the grid line, grid node characteristics, grid line characteristics, grid node topology diagram and its corresponding line diagram into the structure coding module for data enhancement, and obtaining enhanced grid node characteristics and grid line characteristics;

[0045] S3, inputting the matrix PTDF, the enhanced grid node features and grid line features, the grid node topology diagram and its corresponding line diagram into the co-embedding graph neural network to obtain the final grid node representation and grid line representation;

[0046] S4. Obtain prediction results according to the final grid node representation and grid line representation;

[0047] S5. Calculate the loss function value according to the prediction result, and update the model parameters according to the loss function value. When the loss function value is the smallest, the model training is completed to obtain a trained power grid cascading fault prediction model.

[0048] In one embodiment, an IEEE 118 standard node system is used for testing, which consists of 54 generators, 118 substations / busbars, and 186 transmission lines. 5000 sample data are collected using the AC-CFM cascading fault simulation model based on AC power flow, each sample including load active and reactive demand, node voltage amplitude, node voltage phase angle, line reactance, line resistance, thermal rating, line status, active power and reactive power of the line before the fault, and other data.

[0049] The admittance modulus of the power grid line is a fixed property of the line, which can be calculated from the resistance and reactance of the power grid line. The matrix PTDF is composed of the line-node admittance matrix B line and the inverse multiplication of the node admittance matrix B; the node admittance matrix describes the relationship between the node current and voltage, and its elements are the admittances between the nodes; the line-node admittance matrix describes the relationship between the line current and the node voltage difference, each row corresponds to a line, each column corresponds to a node, and its elements represent 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 row corresponding to the line are -B il and B il , B il is the value of the i-th row and l-th column of the node admittance matrix B, and the rest of the positions are 0.

[0050] Furthermore, the operation data of the cascading failure is preprocessed, including: to unify the data dimension, all the grid node data X and grid line data Z of the cascading failure need to be preprocessed first, and the data preprocessing formula is as follows (1):

[0051]

[0052] Among them, x' and z' are the preprocessed grid node features and grid line features, respectively, and x and z are the original input grid node data and grid line data. After the grid node data is preprocessed, each feature is between [0,1].

[0053] X′ and Z′ are the grid node characteristics and line characteristics of a sample after preprocessing, respectively; X′∈R N×M , N is the number of grid nodes, M is the characteristic number of grid nodes, Z′∈R U×V , U is the number of power grid lines, and V is the characteristic number of power grid lines.

[0054] Furthermore, the structure coding module includes: a first structure coding module and a second structure coding module; the first structure coding module processes the grid node characteristics including:

[0055] The admittance modulus length matrix Y is calculated according to the admittance modulus length of the power grid line; the power grid node characteristics are globally structured encoded according to the admittance modulus length matrix Y to obtain global coding characteristics; the power grid node characteristics are locally structured encoded according to the power grid node topology diagram to obtain local coding characteristics; the structural encoding takes into account the line attributes of the actual power grid, and the local structural encoding takes into account the node degree that can reflect local information;

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

[0057]

[0058] in, is the global structural encoding feature of power grid node i, L = YM -1 is the random walk transfer matrix considering line attributes, is the value of the random walk transfer matrix in the ith row and ith column of the dth power, M is the diagonal admittance modulus length matrix, and the elements M on the diagonal of M ii =∑ l Y il , the rest of the elements are 0, Y il is the admittance modulus length of the grid line between grid node i and grid node l, and d is the dimension of the global structure encoding. Due to the diffusion characteristics of the graph, the relationship between nodes spreads from the neighborhood to the entire graph, and the global structure encoding represents the globally unique role of each node in the actual grid.

[0059] In order to capture local structural information, the one-hot encoding of the grid node degree is used as the local structural encoding:

[0060]

[0061] Among them, D ii is the value of the matrix D in the i-th row and i-th column. D is the diagonal matrix of the power grid node, which is obtained from the topological structure diagram of the power grid node. The value on the diagonal of D is the degree of the power grid node i, and the other values ​​are 0. Represents the local structure encoding feature of power grid node i based on degree The qth element of , the degree can reflect the local importance of the node, and r is the dimension of the local structure encoding.

[0062] The global coding feature and the local coding feature are concatenated to obtain the first structural coding feature The first structure coding feature and the power grid node feature are concatenated to obtain the enhanced power grid node feature x i ″=[x i ′||s i ].

[0063] The second structure encoding module processes the characteristics of the power grid line including:

[0064] Calculating the quasi-admittance modulus length matrix Y′ according to the admittance modulus length of the power grid line, and performing global structural encoding on the power grid line characteristics according to the quasi-admittance modulus length matrix Y′ include:

[0065]

[0066] L′=Y′M′ -1 (5)

[0067] in, is the global structural encoding feature of power grid line j, L′ is the random walk transfer matrix, is the value of the random walk transfer matrix L at the jth row and jth column of the dth power, Y′ is the quasi-admittance modulus length matrix under the line diagram, and its elements are the sum of the admittance modulus lengths of the corresponding lines, that is, Y lj ′ is the sum of the admittance modulus lengths of line l and line j, M′ is the diagonal admittance modulus length value matrix, and the elements M on the diagonal of M′ are j ' j =∑ l Y lj ′, the rest of the elements are 0, and d is the dimension of the global structure encoding.

[0068] The local structure encoding of the power grid line characteristics includes:

[0069]

[0070] Among them, D j ' j is the value of the matrix D′ in the jth row and jth column. D′ is the diagonal matrix of the power line in the line diagram, which is obtained from the line diagram corresponding to the power grid node topology diagram. The value on the diagonal of D′ is the degree of the power grid line j, and the other values ​​are 0. Represents the local structural encoding characteristics of power grid line j The qth element of , r is the dimension of the local structure encoding.

[0071] The global coding feature and the local coding feature are concatenated to obtain the second structural coding feature. The second structure coding feature and the power grid line feature are concatenated to obtain the enhanced power grid line feature z j ″=[z j ′||s j ].

[0072] 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, and the node graph convolutional layers and the edge graph convolutional layers are alternately spliced; the co-embedded graph neural network processes the enhanced power grid node features and power grid line features including:

[0073] S31, input the enhanced grid node features and grid line features into the node graph convolution layer respectively The node graph convolution layer The output of the input edge graph convolutional layer

[0074] S32, the edge graph convolution layer The output and input nodes of the convolutional layer The node graph convolution layer The output of the input edge graph convolutional layer

[0075] S33, repeat step S32 until the last edge graph convolution layer is obtained Output grid node representation and grid line representation.

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

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

[0078]

[0079] The grid node topology diagram is C=<X,Z>, where X is the node set of the graph C, each node represents a grid node, and Z is the edge set of the graph C, each edge represents a grid line. denote the feature representation of the power grid node i output by the k-th and k-1-th graph convolutional layers, respectively. They represent the feature representation of the power grid line j output by the k-th and k-1-th graph convolutional layers, respectively. as well as is the weight of the k-th graph convolutional layer, || is the concatenation operation, N(i) represents the set of neighboring grid nodes of grid node i, C(i) represents the set of grid lines connected to grid node i, is the feature representation of the grid node i that incorporates the grid line information output by the k-th graph convolutional layer, is the feature representation of all neighboring grid nodes of grid node i output by the k-1th graph convolutional layer, AGG kis the aggregation function of the kth graph convolution layer, and σ is the activation function. This process can be summarized as aggregating the feature information of neighboring power grid nodes while splicing the information of related power grid lines, and finally inputting the final output into the edge graph convolution layer.

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

[0081]

[0082] In the edge graph convolution layer, the line graph corresponding to the grid node topology graph is C'=<Z,E>, where Z is the node set of graph C', each node represents a grid line, E is the edge set of graph C', each edge represents the connection relationship between grid lines, N(j) represents the set of neighboring grid lines of grid line j, and C(j) represents the set of grid nodes connected to grid line j. is the grid line feature representation integrated with grid node information output by the k-th graph convolutional layer, It is the feature representation of all neighboring power lines of power line j output by the k-1th graph convolution layer. Similar to the node convolution layer, the edge graph convolution layer aggregates the feature information of neighboring edge power lines while splicing the information of related power grid nodes, and finally inputs the final output into the next graph convolution layer or the final downstream task.

[0083] σ is the Relu(*) activation function, and the calculation formula of Relu(*) is:

[0084] Relu(x)=max(0,x) (13)

[0085] Among them, x is the input of the activation function.

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

[0087]

[0088] Among them, Add k is the sum function, Mean k To find the average function, Attention k is a function that sums the attention coefficients.

[0089] The attention algorithm first transforms the features of the nodes in the graph, and then calculates the attention coefficients between the nodes. Take node i and its neighbor node l as an example:

[0090]

[0091] In the formula, αi j is the attention coefficient between node i and node l, x i is the feature vector of node i, W is the weight vector used to convert the dimension of xi, N(i) is the set of neighbor nodes of node i, || represents splicing, It is a single-layer neural network, and LeakyReLU is the activation function. Compared with ReLU, it can alleviate some gradient vanishing problems.

[0092] The aggregation method of attention coefficient has good performance because it is trainable, but it is not enough to characterize the complex energy interaction relationship of the actual power grid. Therefore, referring to the calculation method of attention coefficient, the present invention introduces physical information, namely, power transfer distribution factor (PTDF) to improve the calculation formula of attention coefficient, such as (18)-(20):

[0093]

[0094] P=LeakyReLU(PTDF·W1′)W2′ (19)

[0095]

[0096] In formula (19), the point product W1′ is used to make the changes of each column of the power transfer distribution factor PTDF matrix consistent, that is, the value of each column of W1′ is the same, W2′ is the weight matrix applied after the activation function LeakyReLU, and the size of the PTDF matrix is ​​N×U, which is used to describe the relationship between the power flow changes of each line in the power grid and the power of the grid node, which can be calculated based on the operation data of the power grid cascade fault; In formula (20), α ij is the weight 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 of grid node i, N(i) is the set of neighboring grid lines of grid node i, P is the intermediate variable matrix obtained by transforming the PTDF matrix through the trainable weight matrix, each column of which represents the change of each line when the grid node changes unit power, P j is the row vector corresponding to the neighboring grid line j of grid node i in P, P n is the row vector corresponding to the neighboring grid line n of grid node i in P.

[0097] The method for calculating the weight coefficient of the line is similar:

[0098]

[0099] P=LeakyReLU(PTDF·W1″)W2″ (22)

[0100]

[0101] Among them, α ji is the weight coefficient between grid line j and grid node i, W″, W″ are weight matrices, and W′ is used to compress P by row or column. i and P n′ The weight vector of the grid line j, N(j) is the set of neighboring grid nodes of the grid line j, P is the intermediate variable matrix obtained by transforming the PTDF matrix through the trainable weight matrix, each column of which represents the change of each line when the grid node changes unit power, P i is the column vector corresponding to the neighboring grid node i of grid line j in P, P n′ is the column vector corresponding to the neighboring grid node n′ of the grid line j in P.

[0102] By introducing actual physical knowledge, these weight coefficients not only retain the flexibility of the attention mechanism, but also make the learning process of the model more in line with physical laws, thereby improving the representation ability of the model.

[0103] Finally, the power grid node representation and power grid line representation are processed by two fully connected layers to obtain the power grid node prediction results and power grid line prediction results. The loss function of the output layer is defined as follows:

[0104]

[0105] Among them, L v WCE , L e WCE The prediction results of power grid nodes are And the grid line prediction results The weighted cross entropy loss function, y v ,y e are the true fault labels of grid nodes and grid lines respectively.

[0106] In order to verify the superiority of the method proposed in the present invention, the model of the present 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 method of the present invention and the comparative method (M1-M6) is as follows, where M6 is the method proposed in the present invention. All models finally have a prediction layer containing 16 hidden neurons, the input dimension is the corresponding number of hidden layer neurons, and the output is the prediction result after the Softmax function.

[0107] M1: Cascading failure prediction model based on graph convolutional neural network. The basic model uses graph convolutional neural network, with 2 layers, 186 neurons in the first layer, and 16 neurons in the second layer. The initial learning rate is 0.0001, and the optimizer uses Adam gradient descent algorithm.

[0108] M2: Cascading failure prediction model based on graph attention neural network. The basic model uses graph attention neural network, with 2 layers, 186 neurons in the first layer, and 16 neurons in the second layer. The initial learning rate is 0.0001, and the optimizer uses Adam gradient descent algorithm.

[0109] M3: Cascading fault prediction model based on graph attention neural network. The basic model uses graph attention neural network, with 2 layers, 186 neurons in the first layer, and 16 neurons in the second layer. Unlike M2, M3 uses line features to directly calculate the attention coefficient, while M2 calculates the attention coefficient by concatenating node features as line features. The initial learning rate is selected as 0.0001, and the optimizer uses the Adam gradient descent algorithm.

[0110] M4: Cascading failure prediction model based on graph sampling and aggregation algorithm. The basic model uses graph sampling and aggregation neural network, with 2 layers, 186 neurons in the first layer, and 16 neurons in the second layer. The initial learning rate is 0.0001, and the optimizer uses Adam gradient descent algorithm.

[0111] M5: Cascading failure prediction model based on graph neural network with node and edge attributes. The basic model is a graph neural network with node and edge attributes, with 2 layers and 16 neurons in the hidden layer. The initial learning rate is 0.0001, and the optimizer uses the Adam gradient descent algorithm.

[0112] M6: The co-embedded graph neural network cascading fault prediction model based on physical information guidance adopted by the present invention. The number of layers of the co-embedded graph neural network is 4, the first and third layers are node convolution layers, the second and fourth layers are edge convolution layers, and the number of neurons in the hidden layer is 16. The initial learning rate is selected as 0.0001, and the optimizer uses the Adam gradient descent algorithm.

[0113] In terms of evaluation indicators, the classification accuracy A, balance accuracy B, and area under the receiver operating characteristic curve AUC-ROC are used to measure the accuracy of the model in predicting cascading failures. Among them, the 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:

[0114]

[0115] In the formula, A is the classification accuracy, TP is the number of real fault nodes or lines correctly classified; TN is the number of normal nodes or lines correctly classified, FN is the number of real fault nodes or lines misclassified as normal nodes or lines, and FP is the number of normal nodes or lines misclassified as fault nodes or lines.

[0116] Balanced accuracy is suitable for datasets with imbalanced categories and can better reflect the performance of the model on different categories. Calculating balanced classification accuracy includes:

[0117]

[0118] Among them, TPR is the recall rate of the positive class, TNR is the recall rate of the negative class, and BA is the balanced accuracy.

[0119] The area under the receiver operating characteristic curve (AUC-ROC) is an evaluation index of model classification performance. This index does not depend on a specific threshold and can comprehensively evaluate the performance of the model. The AUC-ROC value ranges from 0 to 1. The larger the value, the better the model performance. Its calculation formula is shown in (29):

[0120]

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

[0122] M1, M2, M3, M4, M5 and M6 use the collected IEEE118 standard node system cascading failure data as the data set. The established data set is divided into training set, validation set and test set in the ratio of 60%, 20% and 20%. The training set is used to optimize the parameters in the model; the validation set is used to test the convergence of the model. When the model performance does not improve after 200 training cycles, the training is stopped. Stop training; the test set is used to evaluate the final prediction ability of the model with the best performance in the validation set.

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

[0124] Table 1 Comparison of indicators based on different data-driven methods

[0125]

[0126] The trained prediction model of the present invention can be integrated into a real-time safety assessment system to regularly assess the current power grid status and provide a reference for relevant staff before taking protective measures.

[0127] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes 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 in the protection scope of the present invention.

Claims

1. A graph neural network power grid cascading failure prediction method based on physical information guidance, characterized in that: Acquire the operation data of the cascading failure, input the operation data of the cascading failure into the trained power grid cascading failure prediction model, and obtain the prediction result; The power grid cascading failure prediction model includes: a co-embedded graph neural network and a structural encoding module; the training process of the power grid cascading failure prediction model includes: S1. Acquire operation data of cascading failures, wherein the operation data of cascading failures include: grid node data and grid line data; calculate the admittance modulus and matrix PTDF of the grid line according to the operation data of cascading failures; pre-process the operation data of cascading failures to obtain grid node characteristics and grid line characteristics; wherein PTDF is a power transmission distribution factor matrix; S2, constructing a grid node topology diagram and its corresponding line diagram, inputting the admittance modulus length of the grid line, grid node characteristics, grid line characteristics, grid node topology diagram and its corresponding line diagram into the structure coding module for data enhancement, and obtaining enhanced grid node characteristics and grid line characteristics; S3, inputting the matrix PTDF, the enhanced grid node features and grid line features, the grid node topology diagram and its corresponding line diagram into the co-embedding graph neural network to obtain the final grid node representation and grid line representation; S4. Obtain prediction results according to the final grid node representation and grid line representation; S5. Calculate the loss function value according to the prediction result, and update the model parameters according to the loss function value. When the loss function value is the smallest, the model training is completed to obtain a trained power grid cascading fault prediction model.

2. The method for predicting cascading failures of power grids based on graph neural network guided by physical information according to claim 1 is characterized in that: Preprocessing the operation data of the cascading fault includes: normalizing the power grid node data and the power grid line data respectively to obtain the power grid node characteristics and the power grid line characteristics.

3. The method for predicting cascading failures of power grids based on graph neural network guided by physical information according to claim 1 is characterized in that: The structural coding module includes: a first structural coding module and a second structural coding module; The first structure coding module processes the grid node features, including: calculating the admittance modulus length matrix Y according to the admittance modulus length of the grid line; performing global structure coding on the grid node features according to the admittance modulus length matrix Y to obtain global coding features; performing local structure coding on the grid node features according to the grid node topology diagram to obtain local coding features; splicing the global coding features and the local coding features to obtain the first structure coding features; splicing the first structure coding features and the grid node features to obtain enhanced grid node features; wherein the elements contained in the admittance modulus length matrix Y are the admittance modulus lengths of the grid lines between the corresponding grid nodes; The second structural coding module processes the power grid line characteristics, including: calculating the quasi-admittance modulus length matrix Y′ according to the admittance modulus length of the power grid line; performing global structural coding on the power grid line characteristics according to the quasi-admittance modulus length matrix Y′ to obtain global coding characteristics; performing local structural coding on the power grid line characteristics according to the line diagram corresponding to the power grid node topology diagram to obtain local coding characteristics; splicing the global coding characteristics and the local coding characteristics to obtain the second structural coding characteristics; splicing the second structural coding characteristics and the power grid line characteristics to obtain enhanced power grid line characteristics; wherein the elements contained in the quasi-admittance modulus length matrix Y′ are the sum of the admittance modulus lengths of the corresponding power grid lines.

4. The method for predicting cascading failures of power grids using graph neural networks guided by physical information according to claim 3 is characterized in that: The global structural encoding of grid node characteristics includes: L=YM -1 in, is the global structural encoding feature of power grid node i, L is the random walk transfer matrix, is the value of the random walk transfer matrix L at the dth power in the i-th row and i-th column, M is the diagonal admittance modulus length value matrix, and the elements M on the diagonal of M ii =∑ l Y il , the rest of the elements are 0, Y il is the admittance modulus length of the grid line between grid node i and grid node l, and d is the dimension of the global structure encoding.

5. The method for predicting cascading failures of power grids based on graph neural network guided by physical information according to claim 3 is characterized in that: The local structure encoding of the grid node characteristics includes: Among them, D ii is the value of the matrix D in the i-th row and i-th column. D is the diagonal matrix of the power grid node, which is obtained from the topological structure diagram of the power grid node. The value on the diagonal of D is the degree of the power grid node i. Represents the local structural encoding features of power grid node i The qth element of , r is the dimension of the local structure encoding.

6. The method for predicting cascading failures of power grids based on graph neural network guided by physical information according to claim 1 is characterized in that: The co-embedded graph neural network includes: a multi-layer graph convolution layer; wherein the types of graph convolution layers include: a node graph convolution layer and an edge graph convolution layer; the co-embedded graph neural network processes the enhanced power grid node features and power grid line features including: S31. Input the enhanced grid node features and grid line features into the node graph convolution layer The node graph convolution layer The output of the input edge graph convolutional layer S32, the edge graph convolution layer The output and input nodes of the convolutional layer The node graph convolution layer The output of the input edge graph convolutional layer S33, repeat step S32 until the last edge graph convolution layer is obtained The final output is the grid node representation and grid line representation.

7. The method for predicting cascading failures of power grids based on graph neural network guided by physical information according to claim 6 is characterized in that: The process of the node graph convolution layer processing the output of the edge graph convolution layer includes: in, denote the feature representation of the power grid node i output by the k-th and k-1-th graph convolutional layers, respectively. W1 represents the feature representation of the power grid line j output by the k-th and k-1-th graph convolutional layers, respectively. k , as well as is the weight of the k-th graph convolutional layer, || is the concatenation operation, N(i) represents the set of neighboring grid nodes of grid node i, C(i) represents the set of grid lines connected to grid node i, is the feature representation of the grid node i that incorporates the grid line information output by the k-th graph convolutional layer, is the feature representation of all neighboring grid nodes of grid node i output by the k-1th graph convolutional layer, AGG k is the aggregation function of the kth graph convolutional layer, and σ is the activation function.

8. The method for predicting cascading failures of power grids based on graph neural network guided by physical information according to claim 6 is characterized in that: The process of edge graph convolution layer processing the output of node graph convolution layer includes: in, denote the feature representation of the power grid node i output by the k-th and k-1-th graph convolutional layers, respectively. W1 represents the feature representation of the power grid line j output by the k-th and k-1-th graph convolutional layers, respectively. k , as well as is the weight of the k-th graph convolutional layer, || is the concatenation operation, N(j) represents the set of neighboring power lines of power line j, C(j) represents the set of power nodes connected to power line j, is the grid line feature representation integrated with grid node information output by the k-th graph convolutional layer, AGG is the feature representation of all neighboring power lines of power line j output by the k-1th graph convolutional layer, k is the aggregation function of the kth graph convolutional layer, and σ is the activation function.

9. The method for predicting cascading failures of power grids using graph neural networks guided by physical information according to claim 8 is characterized in that: Aggregation function AGG of the kth edge graph convolutional layer k for: P=LeakyReLU(PTDF·W′1)W′2 in, represents the feature representation of the grid node i output by the k-th edge graph convolutional layer, C(j) represents the set of grid nodes connected to grid line j, and α ij is the weight coefficient between grid node i and grid line j, W′1 and W′2 are weight matrices, LeakyReLU is the activation function, N(i) is the set of neighboring grid lines of grid node i, W is the weight vector, P is the intermediate variable matrix obtained by transforming the PTDF matrix, and P j is the row vector corresponding to the neighboring grid line j of grid node i in P, P n is the row vector corresponding to the neighboring grid line n of grid node i in P.

10. The method for predicting cascading failures of power grids based on graph neural network guided by physical information according to claim 1, characterized in that: The prediction results include: Power grid node prediction results Grid line prediction results The loss function Loss is: Among them, L v WCE , L e WCE The prediction results of power grid nodes are And the grid line prediction results The weighted cross entropy loss function, y v ,y e are the true fault labels of grid nodes and 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

  • Centralized Multi Special Protection System and Method for Transient Stability in a Power System

    KR1020160036829A

Cited By

  • DC microgrid fault diagnosis method based on cascaded physical information neural network

    CN121705880A

  • Direct current microgrid fault diagnosis method based on cascaded physical information neural network

    CN121705880B

  • Electrochemical energy storage device performance prediction method based on machine learning

    CN121809303A