CN116502380A - Power grid transient state instability positioning method and system based on interpretable graph neural network - Google Patents

Power grid transient state instability positioning method and system based on interpretable graph neural network Download PDF

Info

Publication number
CN116502380A
CN116502380A CN202310499262.6A CN202310499262A CN116502380A CN 116502380 A CN116502380 A CN 116502380A CN 202310499262 A CN202310499262 A CN 202310499262A CN 116502380 A CN116502380 A CN 116502380A
Authority
CN
China
Prior art keywords
power grid
graph
sampling
matrix
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310499262.6A
Other languages
Chinese (zh)
Inventor
宋明黎
李文达
陈凯旋
刘顺宇
汪雨雯
苏运
田英杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
State Grid Shanghai Electric Power Co Ltd
Original Assignee
Zhejiang University ZJU
State Grid Shanghai Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU, State Grid Shanghai Electric Power Co Ltd filed Critical Zhejiang University ZJU
Priority to CN202310499262.6A priority Critical patent/CN116502380A/en
Publication of CN116502380A publication Critical patent/CN116502380A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/02Reliability analysis or reliability optimisation; Failure analysis, e.g. worst case scenario performance, failure mode and effects analysis [FMEA]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Algebra (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Feedback Control In General (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

An interpretable graph neural network method and system for locating transient destabilizing substructures, comprising: firstly, processing power grid data into graph structure data, and introducing a first graph convolution neural network as a coding layer to learn power grid intermediate node embedding; then obtaining an edge sampling weight by calculating node characteristic similarity and local topological structure similarity of the power grid data of the graph structure; acquiring a sampling mask matrix according to the edge sampling weight sampling interpretation subgraph, controlling the operation and classification tasks of the second graph neural network through the matrix, and customizing a sampling gradient calculation method in the back propagation process; and finally, positioning a transient instability substructure of the power grid according to the sampling mask matrix, and obtaining the steady-state condition of the power grid data according to the classifier. The invention also comprises a system of the power grid transient instability positioning method based on the interpretable graph neural network. On the basis of judging the transient stability of the power grid by using the graph neural network, the invention uses a subgraph interpretable technology to position the transient destabilization substructure of the power grid.

Description

Power grid transient state instability positioning method and system based on interpretable graph neural network
Technical Field
The invention belongs to the field of transient instability positioning of a power grid and interpretable graph neural network subgraphs, and relates to a method for positioning the transient instability of the power grid. And establishing graph data according to the attribute of each device in the power grid and the topological relation among the devices, and positioning a transient instability substructure of the power grid by a graph neural network interpretation method on the basis of distinguishing the transient stability condition of the power system. The invention processes the power grid data into graph structure data, fully considers graph structure information and graph attribute information on the basis of the existing graph neural network interpretable method, constructs a pre-interpretable graph classification neural network, and provides a sub-graph-level pre-interpretable graph neural network method and system for positioning a transient destabilizing substructure of a power grid.
Background
Transient stability of an electrical power system generally refers to the ability of each synchronous generator to remain in synchronous operation and transition to a new or return to an original steady state operating condition after the electrical power system is subjected to a large disturbance. Transient stability is a problem of stability when the power system is subjected to a large disturbance under a certain operating state. Transient instability of the power system can lead to catastrophic events such as large scale power outages and cascading failures. Therefore, after the power system suffers from transient stability fault, fast and accurately performing transient stability assessment and accurately positioning the area causing transient instability are important guarantees for ensuring safe and stable operation of the power system.
The transient stability evaluation can be used for predicting the stability of the power system under continuous disturbance, and the evaluation result is utilized to trigger emergency control actions such as tripping and load shedding of the generator, so that the method has important significance for preventing unstable propagation. A set of high-dimensional nonlinear differential algebraic equations is solved by adopting a time domain simulation method, and the method is one of the most commonly used stability evaluation methods at present. However, the simulation method has large calculation amount, and is difficult to meet the requirement of on-line calculation, so that the transient stability simulation is limited in the practical application link. In addition, the simulation method cannot help people locate the power grid subareas which cause transient instability of the power grid. Therefore, after the transient instability phenomenon of the power grid occurs, the locating of the power grid subareas which cause the transient instability of the power grid is beneficial to the positioning and the restoration of the unstable power grid, and has very important significance for the rapid restoration of the unstable power grid. Therefore, a method capable of rapidly judging the transient stability of the power grid and locating the transient instability substructure is very worthy of research.
By fully observing the characteristics of the power grid data, the power grid data and the graph structure data can be found to have a plurality of common points, and can be converted into the graph structure data by using a certain method. In addition, the neural network has recently been paid attention to because of good performance in various mapping tasks, and has been widely used in many fields, such as molecular attribute judgment, urban data mining, and the like. All of them are to convert the data in different fields into graph structure data first and model the problem to be solved as different tasks on the graph neural network. Likewise, the problem of judging the transient stability of the power grid can be converted into tasks on the graph neural network. The problem of judging the transient stability of the power grid is to judge whether the power grid is stable under the current topological structure. Similarly, graph classification tasks refer to classifying graph structure data with known topology and corresponding node attributes. Whereas the grid data can just be converted into graph structure data. The problem of judging the transient stability of the power grid is indirectly solved by carrying out graph classification tasks on the power grid data converted into graph structure data.
Furthermore, the task for locating the grid transient destabilization sub-area is actually to find the grid substructure that leads to the grid transient destabilization. In the research which can be explained by the graph neural network at present, one important branch is to find a subgraph which can determine the prediction result of the graph classification. This is not compatible with the task of locating the transient destabilizing substructure of the grid. Therefore, the problem of locating transient destabilizing substructures of the power grid can be indirectly solved by studying the interpretable problem of the graph neural network at the subgraph level for the power grid graph data. At present, the sub-graph level graph neural network can be interpreted mostly after the fact that is to say, an interpretation sub-graph is searched through some interpretation methods, and the found interpretation sub-graph is input into the graph neural network model to enable the prediction of the interpretation sub-graph to be close to the original graph prediction result. However, many studies indicate that the post-hoc method often fails to truly reveal the model prediction process, and that there is a difference between the post-hoc interpretation method and the model true interpretation. Therefore, a subgraph which can reveal the model prediction process to a certain extent is found in the model prediction process, and the true interpretation of the model prediction is found.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a method and a system for positioning transient instability of a power grid based on an interpretable graph neural network.
The invention establishes graph data according to the attribute of each device in a power grid and the topological relation among the devices, processes the power grid data into graph structure data, models the power grid data on the graph structure according to the structural characteristics of general graph structure data, converts the power grid data into the graph structure data, judges the transient stability of the power grid by using a graph neural network, fully considers graph structure information and graph attribute information on the basis of the traditional graph neural network interpretable method, builds a graph classification neural network which can be interpreted in advance, and provides a sub-graph level pre-interpretable graph neural network method and a system which can be used for positioning a transient destabilization substructure of the power grid.
The technical scheme of the invention is as follows:
a method for positioning transient instability of a power grid based on an interpretable graph neural network comprises the following steps:
step 1, acquiring a temporary stability tag of each power grid data through time domain simulation, and converting the power grid data in different temporary stability states into graph structure data to obtain a power grid temporary stability sample data set of a graph structure;
step 2, calculating the embedding of each node in the grid data in the grid transient stability sample data set by adopting a first graph convolution neural network, and generating an intermediate node embedding matrix;
step 3, aiming at each side in the grid data in the grid temporary stability sample data set of the graph structure, obtaining the side sampling weight of each side according to the embedding of the middle nodes of the nodes at the two sides of the side and the structural information of the grid data in the grid temporary stability sample data set;
step 4, sampling interpretation subgraphs are carried out according to the edge sampling weights, the sampled interpretation subgraphs are expressed as sampling mask matrixes, and the sampling interpretation subgraphs are used as substructures which lead to transient instability of the power grid for transient instability data in the transient stability sample data set of the power grid;
step 5, constraining the topological structure of the power grid data in the power grid transient stability sample data set through a sampling mask matrix to obtain a new topological structure adjacent matrix, putting the new topological structure adjacent matrix and the intermediate node embedded matrix in the step 2 into a second graph convolution neural network to obtain a final node embedded, and putting the final node embedded into a classifier to obtain a power grid steady state category result;
and 6, calculating the loss between the power grid transient state discrimination result and the power grid transient stability sample data label in the power grid transient stability sample data set, back-spreading the loss, adjusting the parameters of the first graph convolution neural network in the step 2 and the parameters of the second graph convolution neural network and the classifier in the step 5, and repeating the steps 2-6 until the loss tends to be stable.
Further, step 1 includes: constructing a power grid data set by using power system simulation software PSASP; firstly, acquiring a topological structure of a power system, then modifying parameters such as a power grid load level, a voltage value, a line fault type, a line fault position and a circuit element fault, and then performing time domain simulation and acquiring a converged power grid data sample according to a simulation result; the power grid temporary stability data with the temporary stability state label can be obtained after multiple iterations; and finally, modeling the power grid data into graph structure data to form a power grid transient stability sample data set, wherein the data set contains the identification of a power grid transient stability substructure besides transient stability labels 0 and 1 of whether the power grid data is stable.
Further, step 2 includes: the grid data is composed of various devices, such as generators, loads, etc., which can be considered nodes in the graph structure, and the attributes of the various devices are considered node attributes in the graph structure. The topology between the graph data and the grid data is the same.
Thus, the grid dataset of one graph structure may be defined as s= (a, X), where a is an adjacency matrix containing n nodes and X is a feature matrix of n nodes. Then, the embedding of each node in the grid transient stability sample data is learned by adopting a first graph roll-up neural network, and aiming at input data s= (A, X), the calculation process of the first graph roll-up neural network is as follows:
wherein the method comprises the steps ofI n Is an identity matrix>Is a diagonal degree matrix, matrix->Is the ith diagonal element of (2) Representation matrix->The ith row and jth column element, W l+1 Is a trainable weight matrix, σ is a ReLU function, H l The node is embedded into the matrix after the calculation in step I; embedding matrix H using node characteristic matrix X as initializing input node 0 After l iterative computations, the first graph convolution neural network can generate an intermediate node embedding matrix z=h l
Further, step 3 includes: the edge sampling weight between two connected nodes in the topological structure mainly consists of two parts, namely node characteristic similarity and node local topological structure similarity. The nodes at two sides of the given edge e are respectively e a And e b
And 3.1, calculating node characteristic similarity. Through the preprocessing of the first graph convolution neural network, a multidimensional intermediate node embedding can be obtained for each node. The feature similarity between nodes is calculated by using the Frobenius inner product, and the calculation method is as follows:
s node =Frobenius(X a ,X b ), (2)
wherein X is a And X b Respectively represent two nodes e a And e b Is the Frobenius inner product calculation function.
And 3.2, calculating the local topological structure similarity. For two nodes e a And e b The k-hop subgraphs centered on each node are found separately and represented in the form of an adjacency matrix. The similarity between the two node k-hop subgraphs is represented by calculating the similarity between the adjacent matrixes, so that the similarity of the local topological structures of the two nodes is obtained, and the calculation method is as follows:
wherein A is a And A b Represented as an adjacency matrix representation of two node k-hop subgraphs,is a norm operation, sum () is a summation operation.
And 3.3, combining the similarity of the two parts to obtain a final edge weight expression, wherein the final edge weight expression is calculated as follows:
w=s k-hop (e a ,e b )+λs node (e a ,e b ), (4)
where λ controls the specific gravity of two similarities, a learnable parameter.
And obtaining all the edge weights W as edge sampling weights according to the weight of each edge.
Further, step 4 includes: and 3, after the edge sampling weight of each edge is obtained in the step, sampling interpretation subgraph is carried out according to the edge sampling weight, the sampled interpretation subgraph is expressed as a sampling mask matrix, and the sampling interpretation subgraph is taken as a substructure which leads to transient instability of the power grid for transient instability data. The edge sampling weights are preprocessed using a guard-max prior to sampling. The sampling mode is selected from one of the following two modes: a greedy sampling method based on sub-graph communication and a top-k sampling method based on weight sorting.
The greedy sampling method based on sub-graph communication comprises the following steps: and for the preprocessed edge sampling weight W, sampling subgraph according to the following method:
1) Initializing edge setsNode set->And selecting the edge with the highest weight in W, adding the edge index value into the set E, and adding nodes on two sides of the edge into the set S.
2) And finding all edges connected with the nodes in the S from the unselected edges, selecting the edge with the largest weight from the edges to add into the set E, and adding the nodes on the two sides of the edge into the set S.
3) If the number of all edges in the set E is less than the threshold k, repeating the step 2).
4) Converting edge set E into sampling mask matrix M subgraph Wherein, if M subgraph If the column value of i row j is 1, the index value of the edge with i and j at the two side nodes is in the edge set E, and if 0 is not.
The top-k sampling method based on the weight sorting comprises the following steps: and directly selecting k sides with the highest weight value for the preprocessed weight W to add into the side set E. Also convert edge set E into a sample mask matrix M subgraph
Further, step 5 includes: after obtaining the sampling mask matrix M subgraph Then, taking the sampling matrix as constraint of a grid transient stability sample data topological structure of the graph structure to obtain a new graph topological structure adjacent matrix A m The calculation is as follows:
wherein,,representing a masking operation.
Adjacency matrix A of new graph topology m The intermediate node embedding matrix is put into a second graph convolution neural network for aggregation learning, so that final node embedding is obtained, the final node embedding is put into a classifier, a power grid transient stability class result is output, 0 represents power grid transient instability, and 1 represents power grid transient stability; the input data of the second graph convolution neural network is s= (a) m Z), the second graph convolution neural network has a trainable weight matrix W l+1
Further, step 6 includes: calculating the loss between the transient state discrimination result of the power grid and the transient stability sample data label of the power grid, and obtaining the gradient d returned by the upper layer when the loss is reversely propagated to the sampling interpretation sub-graph process y Will d y The sampling process in the step 4 is carried out as gradient sampling weight to obtain a gradient mask matrix M gradient . Will M subgraph -M gradient Interpreting subgraphs as discrete samplesThe gradient of (2) is reversely propagated to the next layer, the model parameters are adjusted, and then the intermediate node embedding calculation is adjusted in the next round of model training and the sampling interpretation subgraph is guided.
The invention also comprises a system of the power grid transient state instability positioning method based on the interpretable graph neural network, which comprises the following steps: the system comprises a power grid transient stability sample data set construction module, a power grid intermediate node embedding module, an edge sampling weight obtaining module, a sampling interpretation subgraph obtaining sampling mask matrix module, a power grid steady state discrimination task module and a self-defined back propagation sampling gradient calculation method module.
The invention also comprises a computer readable storage medium, wherein the program is stored on the computer readable storage medium, and when the program is executed by a processor, the power grid transient instability positioning method based on the pre-interpretable graph neural network is realized.
The invention has the advantages that: the node attribute of the power grid data and the characteristics of the topological structure of the power grid data are comprehensively considered, the power grid data are converted into graph structure data, and a subgraph interpretable technology is used for positioning a power grid transient instability fault area on the basis of judging the transient stability of the power grid by using a graph neural network. In order to realize more real interpretation, a model prediction process is truly disclosed, and the sub-graph pre-interpretation method is introduced. Different from the existing post-interpretation methods, the method obtains the edge sampling weight by calculating the node characteristic similarity and the local topological structure similarity of the power grid diagram structural data. And obtaining a sampling mask matrix according to the edge sampling weight sampling interpretation subgraph, controlling the operation and classification tasks of a subsequent model according to the matrix, and designing a specific sampling gradient calculation method during back propagation. And finally, for the data of the transient instability of the power grid, positioning a transient instability substructure of the power grid according to a sampling interpretation subgraph mask matrix, and obtaining the steady state condition of the power grid data according to a classifier.
Drawings
Fig. 1 is a graph of grid transient sample data generation in the method of the present invention.
Fig. 2 is a schematic flow diagram in the present invention, where fig. 2 (a) shows computing intermediate node embedding and generating edge sampling weights, and fig. 2 (b) shows sub-sampling based on the edge sampling weights.
Detailed Description
The technical scheme of the invention is clearly and completely explained and described below with reference to the accompanying drawings.
Example 1
Referring to fig. 1-2 b, a method for positioning transient instability of a power grid based on an interpretable graph neural network comprises the following steps:
1. constructing a temporary stable sample data set of the power grid;
and constructing a power grid data set by using power system simulation software PSASP. Firstly, the topological structure of the power system is obtained, then parameters such as the load level, the voltage value, the line fault type, the line fault position and the circuit element fault of the power system are modified, then time domain simulation is carried out, and a converged power grid data sample is obtained according to a simulation result. The power grid transient stability data with the transient stability state label can be obtained after a plurality of iterations. And finally, modeling the power grid data into graph structure data to form a power grid transient stability sample data set, wherein the data set contains the identification of a power grid transient stability substructure besides transient stability labels 0 and 1 of whether the power grid data is stable, namely marking out which power grid paths can cause the transient stability of the power grid. As in fig. 1.
2. Calculating the embedding of a power grid intermediate node;
the grid data is composed of various devices, such as generators, loads, etc., which can be considered nodes in the graph structure, and the attributes of the various devices are considered node attributes in the graph structure. The topology between the graph data and the grid data is the same.
Thus, the grid dataset of one graph structure may be defined as s= (a, X), where a is an adjacency matrix containing n nodes and X is a feature matrix of n nodes. Then, the embedding of each node in the grid transient stability sample data is learned by adopting a first graph roll-up neural network, and aiming at input data s= (A, X), the calculation process of the first graph roll-up neural network is as follows:
wherein the method comprises the steps ofI n Is an identity matrix>Is a diagonal degree matrix, matrix->Is the ith diagonal element of (2) Representation matrix->The ith row and jth column element, W l+1 Is a trainable weight matrix, σ is a ReLU function, H l The node is embedded into the matrix after the calculation in step I; embedding matrix H using node characteristic matrix X as initializing input node 0 After l iterative computations, the first graph convolution neural network can generate an intermediate node embedding matrix z=h l The method comprises the steps of carrying out a first treatment on the surface of the As in fig. 2 (a).
3. Obtaining an edge sampling weight;
the edge sampling weight between two connected nodes in the topological structure mainly consists of two parts, namely node characteristic similarity and node local topological structure similarity. The nodes at two sides of the given edge e are respectively e a And e b . As in fig. 2 (a).
And 3.1, calculating node characteristic similarity. Through the preprocessing of the first graph convolution neural network, a multidimensional intermediate node embedding can be obtained for each node. The feature similarity between nodes is calculated by using the Frobenius inner product, and the calculation method is as follows:
s node =Frobenius(X a ,X b ), (2)
wherein X is a And X b Respectively represent two nodes e a And e b Is the Frobenius inner product calculation function.
And 3.2, calculating the local topological structure similarity. In particular, for two nodes e a And e b The k-hop subgraphs centered on each node are found separately and represented in the form of an adjacency matrix. Therefore, the similarity between the two node k-hop subgraphs is represented by calculating the similarity between the adjacent matrixes, so that the similarity of the two node partial topological structures is obtained, and the calculation method is as follows:
wherein A is a And A b Represented as an adjacency matrix representation of two node k-hop subgraphs,is a norm operation, sum (·) is a summation operation.
And 3.3, combining the similarity of the two parts to obtain a final edge weight expression, wherein the final edge weight expression is calculated as follows:
w=s k-hop (e a ,e b )+λs node (e a ,e b ), (4)
where λ controls the specific gravity of two similarities, a learnable parameter.
And obtaining all the edge weights W as edge sampling weights according to the weight of each edge.
4. The sampling interpretation subgraph acquires a sampling mask matrix;
and 3, after the edge sampling weight of each edge is obtained in the step 3, sampling interpretation subgraph is carried out according to the edge sampling weight, the sampled interpretation subgraph is expressed as a sampling mask matrix, and the sampling interpretation subgraph is taken as a substructure which leads to transient instability of the power grid for transient instability data. The edge sampling weights are preprocessed using a guard-max prior to sampling. The sampling mode is selected from one of the following two modes: a greedy sampling method based on sub-graph communication and a top-k sampling method based on weight sorting. As in fig. 2 (b).
4.1 greedy sampling method based on sub-graph communication. And for the preprocessed edge sampling weight W, sampling subgraph according to the following method:
1) Initializing edge setsNode set->And selecting the edge with the highest weight in W, adding the edge index value into the set E, and adding nodes on two sides of the edge into the set S.
2) And finding all edges connected with the nodes in the S from the unselected edges, selecting the edge with the largest weight from the edges to add into the set E, and adding the nodes on the two sides of the edge into the set S.
3) If the number of all edges in the set E is less than the threshold k, repeating the step 2).
4) Converting edge set E into sampling mask matrix M subgraph Wherein, if M subgraph If the column value of i row j is 1, the index value of the edge with i and j at the two side nodes is in the edge set E, and if 0 is not.
4.2 Top-k sampling method based on weight ordering. And directly selecting k sides with the highest weight value for the preprocessed weight W to add into the side set E. Also convert edge set E into a sample mask matrix M subgraph
5. Performing a power grid steady state discrimination task;
after obtaining the sampling mask matrix M subgraph Then, taking the sampling matrix as constraint of a grid transient stability sample data topological structure of the graph structure to obtain a new graph topological structure adjacent matrix A m The calculation is as follows:
wherein,,representing a masking operation.
Adjacency matrix A of new graph topology m The intermediate node embedding matrix is put into a second graph convolution neural network for aggregation learning, so that final node embedding is obtained, the final node embedding is put into a classifier, a power grid transient stability class result is output, 0 represents power grid transient instability, and 1 represents power grid transient stability; the input data of the second graph convolution neural network is s= (a) m Z), the second graph convolution neural network has a trainable weight matrix W l+1 . As in fig. 2.
6. The self-defining back propagation sampling gradient calculation method;
obtaining loss through comparing the transient state discrimination and classification result of the power grid with the transient stability sample data label of the power grid, and obtaining the gradient d returned by the upper layer after reversely spreading the loss to the upper layer of the sampling interpretation subgraph y Will d y The sampling process in the step 4 is carried out as gradient sampling weight to obtain a gradient mask matrix M gradient . Will M subgraph -M gradient And the gradient serving as the discrete sampling interpretation subgraph is reversely propagated to the next layer, the model parameters are adjusted, and then the intermediate node embedding calculation is adjusted in the next round of model training and the sampling interpretation subgraph is guided.
Embodiment 2 a system for implementing the method for positioning transient instability of a power grid based on an interpretable graph neural network according to embodiment 1, comprising:
the system comprises a power grid temporary steady sample data set construction module, a temporary steady sample data set generation module and a temporary steady sample data set generation module, wherein the power grid temporary steady sample data set construction module is used for modifying parameters such as line fault types, line fault positions and the like in power grid data to obtain power grid data in different states, obtaining temporary steady labels of each power grid data through time domain simulation, and converting the power grid data in different states into graph structure data to obtain a power grid temporary steady sample data set of a graph structure;
the computing power grid intermediate node embedding module is used for learning and computing the embedding of each node in the power grid transient stability sample data by adopting a first graph convolution neural network to generate an intermediate node embedding matrix;
the side sampling weight module is used for calculating node characteristic similarity of nodes at two sides of the side according to the middle node embedding matrix for each side in the grid data of the graph structure, and then calculating node local topological structure similarity according to the respective substructures of the nodes at two sides of the side; obtaining an edge sampling weight of each edge by combining the two similarities;
the sampling interpretation sub-graph is used for carrying out sampling interpretation sub-graphs according to the edge sampling weights, and the sampling interpretation sub-graphs are expressed as a sampling mask matrix; preprocessing the edge sampling weight by using a gum-max before sampling;
the power grid steady state discrimination task module is used for taking the sampling mask matrix as constraint of a power grid temporary stability sample data topological structure of a graph structure to obtain a new graph topological structure adjacent matrix, putting the new graph topological structure adjacent matrix and the intermediate node embedding matrix into a second graph convolution neural network for aggregation learning to obtain a final node embedding, putting the final node embedding into a classifier, and outputting a power grid temporary stability class result;
and the self-defining back propagation sampling gradient calculation method module is used for enabling the back propagation to be continuous and not interrupted by the discrete sampling process, and self-defining a gradient calculation scheme for the discrete sampling process during the back propagation.
Example 3
The present embodiment relates to a computer-readable storage medium having a program stored thereon, which when executed by a processor, implements the method for positioning transient instability of a power grid based on a pre-interpretable graph neural network described in embodiment 1.
The embodiments described in the present specification are merely examples of implementation forms of the inventive concept, and the scope of protection of the present invention should not be construed as being limited to the specific forms set forth in the embodiments, but the scope of protection of the present invention and equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims (11)

1. A method for positioning transient instability of a power grid based on an interpretable graph neural network comprises the following steps:
step 1, acquiring a temporary stability tag of each power grid data through time domain simulation, and converting the power grid data in different temporary stability states into graph structure data to obtain a power grid temporary stability sample data set of a graph structure;
step 2, calculating the embedding of each node in the grid data in the grid transient stability sample data set by adopting a first graph convolution neural network, and generating an intermediate node embedding matrix;
step 3, aiming at each side in the grid data in the grid temporary stability sample data set of the graph structure, obtaining the side sampling weight of each side according to the embedding of the middle nodes of the nodes at the two sides of the side and the structural information of the grid data in the grid temporary stability sample data set;
step 4, sampling interpretation subgraphs are carried out according to the edge sampling weights, the sampled interpretation subgraphs are expressed as sampling mask matrixes, and the sampling interpretation subgraphs are used as substructures which lead to transient instability of the power grid for transient instability data in the transient stability sample data set of the power grid;
step 5, constraining the topological structure of the power grid data in the power grid transient stability sample data set through a sampling mask matrix to obtain a new topological structure adjacent matrix, putting the new topological structure adjacent matrix and the intermediate node embedded matrix in the step 2 into a second graph convolution neural network to obtain a final node embedded, and putting the final node embedded into a classifier to obtain a power grid steady state category result;
and 6, calculating the loss between the power grid transient class result and the power grid transient sample data label in the power grid transient sample data set, back-spreading the loss, adjusting the parameters of the first graph convolution neural network in the step 2 and the parameters of the second graph convolution neural network and the classifier in the step 5, and repeating the steps 2-6 until the loss tends to be stable.
2. The method for positioning transient instability of power grid based on interpretable graph neural network of claim 1, wherein the method comprises the following steps: the step 1 comprises the following steps: firstly, acquiring a topological structure of a power system, then, carrying out time domain simulation by modifying parameters of a power grid load level, a voltage value, a line fault type, a line fault position and a circuit element fault, and obtaining a converged power grid data sample according to a simulation result; obtaining power grid temporary stability data with temporary stability state labels after multiple iterations; modeling the power grid data into graph structure data to form a power grid transient stability sample data set, wherein the data set comprises identifications of transient stability sub-structures of the power grid in addition to transient stability labels 0 and 1 of whether the power grid data is stable.
3. The method for positioning transient instability of power grid based on interpretable graph neural network of claim 1, wherein the method comprises the following steps: the step 2 specifically comprises the following steps:
grid transient sample data of one graph structure is defined as s= (a, X), where a is an adjacency matrix containing n nodes and X is a feature matrix of n nodes; then, the first graph convolutional neural network is adopted to learn the embedding of each node in the power grid graph data, and for the input data s= (A, X), the calculation process of the first graph convolutional neural network is as follows:
wherein the method comprises the steps ofI n Is an identity matrix>Is a diagonal degree matrix, matrix->Is +.>Representation matrix->The ith row and jth column element, W l+1 Is a trainable weight matrix, sigmaIs a ReLU function, H l The node is embedded into the matrix after the calculation in step I; embedding matrix H using node characteristic matrix X as initializing input node 0 After l iterative computations, the first graph convolution neural network can generate an intermediate node embedding matrix z=h l
4. The method for positioning transient instability of power grid based on interpretable graph neural network of claim 1, wherein the method comprises the following steps: the obtaining the edge sampling weight in the step 3 includes:
the edge sampling weight between two connected nodes in the topological structure mainly consists of two parts, namely node characteristic similarity and node local topological structure similarity, and the given edge e is provided with two side nodes which are respectively e a And e b
3.1, calculating node characteristic similarity; the preprocessing of the first graph convolution neural network in the step 2 can obtain a multidimensional intermediate node embedding for each node; the feature similarity between nodes is calculated using the Frobenius inner product, the calculation method is as follows:
s node =Frobenius(X a ,X b ), (2)
wherein X is a And X b Respectively represent two nodes e a And e b Is embedded in the intermediate node of the Frobenius () as a Frobenius inner product calculation function;
3.2, calculating the similarity of the local topological structure; for two nodes e a And e b Respectively searching a k-hop subgraph centering on each node, and representing the k-hop subgraph in a form of an adjacency matrix; the similarity between the two node k-hop subgraphs is represented by calculating the similarity between the adjacent matrixes, so that the similarity of the local topological structures of the two nodes is obtained, and the calculation method is as follows:
wherein A is a And A b Adjacency matrix respectively represented as two-node k-hop subgraphsThe representation is made of a combination of a first and a second color,is a norm operation, sum () is a summation operation;
and 3.3, combining the similarity of the two parts to obtain a final edge sampling weight, wherein the final edge sampling weight is calculated as follows:
w=s k-hop (e a ,e b )+λs node (e a ,e b ), (4)
wherein λ controls the specific gravity of the two similarities, a learnable parameter;
and obtaining all the edge weights W as edge sampling weights according to the weight of each edge.
5. The method for positioning transient instability of power grid based on interpretable graph neural network of claim 1, wherein the method comprises the following steps: the step 4 specifically comprises the following steps: preprocessing the edge sampling weight by using a gum-max before sampling; the sampling mode is selected from one of the following two modes: a greedy sampling method based on sub-graph communication and a top-k sampling method based on weight sorting.
6. The method for positioning transient instability of power grid based on interpretable graph neural network of claim 5, wherein the method comprises the steps of:
the greedy sampling method based on sub-graph communication comprises the following steps: and for the preprocessed edge sampling weight W, sampling subgraph according to the following method:
1) Initializing edge setsNode set->Selecting an edge with highest weight in W, adding an edge index value into a set E, and adding nodes at two sides of the edge into a set S;
2) Finding all edges connected with the nodes in the S from the unselected edges, selecting the edge with the largest weight from the edges to be added into the set E, and adding the nodes at the two sides of the edge into the set S;
3) If the number of all edges in the set E is smaller than the threshold k, repeating the step 2);
4) Converting edge set E into sampling mask matrix M subgraph Wherein, if M subgraph If the column value of the row i in the row i is 1, indicating that the index values of the sides with the nodes i and j at the two sides are in the side set E, and if the index values of the sides with the nodes i and j at the two sides are 0, indicating that the index values are not in the side set E;
4.2 a top-k sampling method based on weight sorting; for the preprocessed weight W, directly selecting k sides with the highest weight value and adding the k sides into the side set E; also convert edge set E into a sample mask matrix M subgraph
7. The method for positioning transient instability of power grid based on pre-interpretable graph neural network of claim 5, wherein the method comprises the following steps: the top-k sampling method based on weight sorting comprises the following steps: for the preprocessed weight W, directly selecting k sides with the highest weight value and adding the k sides into the side set E; also convert edge set E into a sample mask matrix M subgraph
8. The method for positioning transient instability of power grid based on interpretable graph neural network of claim 1, wherein the method comprises the following steps: the power grid steady state discrimination task in the step 5 comprises the following steps:
after obtaining the sampling mask matrix M subgraph After that, a new graph topology adjacency matrix A is obtained m The calculation is as follows:
wherein,,representing masking operations, adjacency matrix a with new graph topology m And the intermediate node embedding matrix is put into a second graph convolution neural network for aggregation learning to obtain a final node embedding, the final node embedding is put into a classifier,outputting a temporary stability class result of the power grid; the input data of the second graph convolution neural network is s= (a) m Z), the second graph convolution neural network has a trainable weight matrix W l+1
9. The method for positioning the transient instability of the power grid based on the interpretable graph neural network is realized, which is characterized in that: the back propagation in step 6 specifically includes: calculating the loss between the transient state discrimination result of the power grid and the transient stability sample data label of the power grid, and obtaining the gradient d returned by the upper layer when the loss is reversely propagated to the sampling interpretation sub-graph process y Will d y The sampling process in the step 4 is carried out as gradient sampling weight to obtain a gradient mask matrix M gradient The method comprises the steps of carrying out a first treatment on the surface of the Will M subgraph -M gradient The gradient of the interpretation subgraph is counter-propagated to the next layer as discrete samples.
10. A system for implementing the method for positioning transient instability of power grid based on neural network of interpretable graph according to any one of claims 1 to 9, comprising:
the system comprises a power grid temporary steady sample data set construction module, a temporary steady sample data set generation module and a temporary steady sample data set generation module, wherein the power grid temporary steady sample data set construction module is used for modifying parameters such as line fault types, line fault positions and the like in power grid data to obtain power grid data in different states, obtaining temporary steady labels of each power grid data through time domain simulation, and converting the power grid data in different states into graph structure data to obtain a power grid temporary steady sample data set of a graph structure;
the computing power grid intermediate node embedding module is used for learning and computing the embedding of each node in the power grid transient stability sample data by adopting a first graph convolution neural network to generate an intermediate node embedding matrix;
the side sampling weight module is used for calculating node characteristic similarity of nodes at two sides of the side according to the middle node embedding matrix for each side in the grid data of the graph structure, and then calculating node local topological structure similarity according to the respective substructures of the nodes at two sides of the side; obtaining an edge sampling weight of each edge by combining the two similarities;
the sampling interpretation sub-graph is used for carrying out sampling interpretation sub-graphs according to the edge sampling weights, and the sampling interpretation sub-graphs are expressed as a sampling mask matrix; preprocessing the edge sampling weight by using a gum-max before sampling;
the power grid steady state discrimination task module is used for taking the sampling mask matrix as constraint of a power grid temporary stability sample data topological structure of a graph structure to obtain a new graph topological structure adjacent matrix, putting the new graph topological structure adjacent matrix and the intermediate node embedding matrix into a second graph convolution neural network for aggregation learning to obtain a final node embedding, putting the final node embedding into a classifier, and outputting a power grid temporary stability class result;
and the gradient calculation method module in the self-defined sampling process is used for enabling the back propagation to be continuous and not interrupted by the discrete sampling process, and the gradient calculation scheme is self-defined for the discrete sampling process during the back propagation.
11. A computer readable storage medium, having stored thereon a program which, when executed by a processor, implements the method for transient destabilization localization of a power grid based on a pre-interpretable graph neural network according to any one of claims 1 to 9.
CN202310499262.6A 2023-05-06 2023-05-06 Power grid transient state instability positioning method and system based on interpretable graph neural network Pending CN116502380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310499262.6A CN116502380A (en) 2023-05-06 2023-05-06 Power grid transient state instability positioning method and system based on interpretable graph neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310499262.6A CN116502380A (en) 2023-05-06 2023-05-06 Power grid transient state instability positioning method and system based on interpretable graph neural network

Publications (1)

Publication Number Publication Date
CN116502380A true CN116502380A (en) 2023-07-28

Family

ID=87324607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310499262.6A Pending CN116502380A (en) 2023-05-06 2023-05-06 Power grid transient state instability positioning method and system based on interpretable graph neural network

Country Status (1)

Country Link
CN (1) CN116502380A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117872038A (en) * 2024-03-11 2024-04-12 浙江大学 DC micro-grid instability fault source positioning method and device based on graph theory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117872038A (en) * 2024-03-11 2024-04-12 浙江大学 DC micro-grid instability fault source positioning method and device based on graph theory
CN117872038B (en) * 2024-03-11 2024-05-17 浙江大学 DC micro-grid instability fault source positioning method and device based on graph theory

Similar Documents

Publication Publication Date Title
Du et al. Achieving 100x acceleration for N-1 contingency screening with uncertain scenarios using deep convolutional neural network
Chen et al. Parameters identification of photovoltaic models using hybrid adaptive Nelder-Mead simplex algorithm based on eagle strategy
Deka et al. Estimating distribution grid topologies: A graphical learning based approach
Mohammadi et al. PMU based voltage security assessment of power systems exploiting principal component analysis and decision trees
Li et al. A two-stage approach for multi-objective decision making with applications to system reliability optimization
Wang et al. Power system network topology identification based on knowledge graph and graph neural network
CN116245033B (en) Artificial intelligent driven power system analysis method and intelligent software platform
CN114004155A (en) Transient stability assessment method and device considering topological structure characteristics of power system
CN108879732A (en) Transient stability evaluation in power system method and device
Yang et al. Monitoring data factorization of high renewable energy penetrated grids for probabilistic static voltage stability assessment
CN116502380A (en) Power grid transient state instability positioning method and system based on interpretable graph neural network
CN114021433A (en) Construction method and application of dominant instability mode recognition model of power system
Li et al. Fault identification in power network based on deep reinforcement learning
Yu et al. Sub-population improved grey wolf optimizer with Gaussian mutation and Lévy flight for parameters identification of photovoltaic models
Kizielewicz et al. Handling economic perspective in multicriteria model-renewable energy resources case study
Jia et al. Voltage stability constrained operation optimization: An ensemble sparse oblique regression tree method
Guo et al. Distribution network topology identification based on gradient boosting decision tree and attribute weighted naive Bayes
Smith et al. Physics-informed implicit representations of equilibrium network flows
Ren et al. Pre-fault dynamic security assessment of power systems for multiple different faults via multi-label learning
CN109861220B (en) Method for constructing tensor input of deep convolutional neural network for power system analysis
CN116302088A (en) Code clone detection method, storage medium and equipment
CN116956017A (en) Power grid transient state destabilizing substructure positioning method and system based on graph lottery hypothesis theory
CN113342982B (en) Enterprise industry classification method integrating Roberta and external knowledge base
CN115734274A (en) Cellular network fault diagnosis method based on deep learning and knowledge graph
Han et al. Interpretation of stability assessment machine learning models based on shapley value

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination