Method and system for locating power grid transient instability substructure based on graph lottery hypothesis theory

By modeling power grid data as a graph structure and using the graph lottery hypothesis theory and the adversarial complementary erasure framework to identify the key substructures of power grid transient instability, the problem of difficult positioning in existing technologies is solved, and the precise positioning and stability judgment of power grid transient instability are achieved.

CN116956017BActive Publication Date: 2025-09-19ZHEJIANG UNIV +1
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202310499258.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2025-09-19
Estimated Expiration
2043-05-06

Smart Images

  • Figure CN116956017B_ABST
    Figure CN116956017B_ABST
Patent Text Reader

Abstract

A method and system for locating substructures of transient instability in power grids based on the graph lottery hypothesis theory includes the following steps: first, the present invention processes transient power grid data into graph structure data with transient stability labels, and introduces a graph convolutional neural network to extract the representation features of the graph. Then, a joint sparsification method based on amplitude is used to discard redundant information in the power grid graph, and considering that the importance of elements changes with the dynamic changes of the model structure and the graph structure during the sparsification process, before each further sparsification, the importance of the discarded elements is reconsidered, and an anti-complementary erasure framework is designed to correct the identified key substructures. The present invention can clearly identify the causes of transient instability in power grids and provide an accurate and efficient solution for the regulation of transient instability in power grids.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of substructure positioning and graph structure learning of power grid transient instability. By combining the power grid topology and the attributes of each component, the power grid data is modeled as graph structure data. A method for learning the substructures that cause transient instability in the power grid transient graph structure based on the graph lottery hypothesis theory is proposed. An antagonistic complementary erasure framework is designed to improve the accuracy of substructure positioning of power grid transient instability, clarify the causes of power grid transient instability, and provide a more accurate and efficient solution for the regulation of power grid transient instability. Background Art

[0002] The transient stability of a power grid generally refers to the ability of a normally operating power system to achieve a new stable operating state or recover to its original state after being subjected to external disturbances during operation. However, when a severe local fault occurs in a power system, the transient stability of the power system is disrupted, triggering a series of chain reactions. If targeted safety and control measures are not implemented in a timely manner, the transient fault will propagate and spread, endangering the safe operation of the entire system and causing significant economic and social losses. Therefore, efficient system stability assessment and accurate identification of the faulty substructure are crucial to ensuring the safe and stable operation of the power system.

[0003] Time-domain simulation is an important research method for assessing power grid transient stability. It models the power grid based on its topology, establishes corresponding algebraic and differential equations to describe the system's transient operation, and solves these equations to determine and analyze the system's transient stability. While time-domain simulation methods are relatively simple and offer high computational accuracy, they significantly increase the computational effort in large-scale power systems, impacting computational efficiency. With the advancement of computer technology, some new research is attempting to integrate advances in artificial intelligence with power grid transient stability assessment. Graph neural networks are a recently emerging artificial intelligence method. Compared to traditional deep learning methods, graph neural networks can process non-Euclidean data, such as grid topology information, and therefore have been widely used in power system research. Similarly, by converting power grid data into graph-structured data, the problem of determining power grid transient stability can be transformed into a binary classification task within graph neural networks.

[0004] While both traditional time-domain simulation methods and graph neural network-based artificial intelligence methods can assess the transient stability of power grids, they lack methods for locating the substructures that cause transient instability. Locating the substructures that cause transient instability can clarify the cause of the transient fault and guide the development of subsequent grid control and maintenance plans. Therefore, how to quickly and accurately locate the substructures that cause large-scale transient instability in power grids is an urgent issue to ensure the safe and stable operation of power grids.

[0005] Graph Structure Learning refers to the fact that in practical applications, due to noise or data collection methods, the graph structure is not correct or optimal. Therefore, while learning the parameters of the graph neural network, it is also necessary to learn the optimized graph structure to obtain the most concise information related to the downstream task, while ensuring the prediction accuracy of the downstream task and avoiding redundant information or noise information irrelevant to the downstream task. The graph lottery hypothesis theory is an important branch of this theory. Its main content is to jointly identify the combination of sparse submodels and key substructures from the original graph neural network model and the dense graph by iteratively applying the amplitude-based pruning algorithm during the model training process. The problem that needs to be solved in the substructure location of transient instability of the power grid is actually to discard the structure that is irrelevant to the transient instability of the power grid and find the simplest substructure that causes the transient instability of the power grid. Therefore, the problem of locating the substructure of transient instability of the power grid is essentially a graph structure learning problem. Summary of the Invention

[0006] In order to solve the above problems existing in the prior art, the present invention provides a method and system for locating a transient instability substructure of a power grid based on the graph lottery hypothesis theory.

[0007] This invention combines the grid topology and the properties of various components to model grid transient data as graph-structured data. Building on existing graph neural networks, this invention proposes a method for locating grid transient instability substructures based on the graph lottery hypothesis theory. The technical solution of this invention is:

[0008] A method for locating substructures of transient instability in power grids based on the graph lottery hypothesis theory includes the following steps:

[0009] Step 1. Construct the grid diagram structure data according to the grid topology and modify the values ​​of various parameters. Use the results of time domain simulation as labels and iterate to obtain the grid temporary stability data set.

[0010] Step 2. Use a graph convolutional neural network to calculate the node embedding matrix of the power grid graph structure data in the power grid transient stability dataset, and then splice the node embedding matrix through the readout layer to obtain the graph representation feature;

[0011] Step 3. Construct an adjacency matrix mask and a model weight matrix mask to represent the importance of the elements in the adjacency matrix of the power grid graph structure data in the power grid temporary stability dataset and the model weight matrix of the graph convolutional neural network, respectively. Sparse the adjacency matrix and the model weight matrix according to the amplitude of the trained mask;

[0012] Step 4. Remove the interfering elements in the retained substructure by adversarial complementary erasure framework, and add the sampled important elements to the retained substructure;

[0013] Step 5. Repeat steps 3 and 4 and reset the model weight matrix to the initial weight before the next iteration until the desired sparsity is achieved.

[0014] Step 6. Obtain the key subgraph structure based on the optimized mask and learn the graph representation features. Use the graph representation features to perform the power grid transient stability judgment task. For the power grid transient instability sample, the key subgraph structure is the substructure that causes the power grid transient instability.

[0015] Furthermore, step 1 includes: first constructing graph structure data according to the power grid topology structure, then modifying parameters such as the power grid load level, voltage value, fault line, etc. to obtain different samples, performing time domain simulation respectively, obtaining the power grid transient stability assessment results according to the simulation results, marking the transient stable samples with '0', marking the transient unstable samples with '1', and marking which power grid paths will cause transient instability of the power grid. After multiple iterations, a power grid transient stability dataset with transient stability labels can be obtained.

[0016] Furthermore, the method for extracting the graph representation features described in step 2 is: 2.1 Calculate the node embedding matrix. The power grid data is composed of various devices, which can be regarded as nodes in the graph structure data, and the attributes of each device can be regarded as the node features in the graph structure data. The connection relationship between each device in the power grid is the same as the adjacency matrix in the graph structure data. Therefore, the power grid graph structure data in the power grid transient stability dataset can be defined as s = (A, X), where A represents the adjacency matrix of n nodes in the power grid graph structure data, and X represents the feature matrix of n nodes. Then, a graph convolutional neural network is used to pass messages between the nodes of the power grid graph structure data:

[0017]

[0018] in, I n is the identity matrix, is a logarithmic matrix, The i-th diagonal element of is Representation matrix The i-th row and j-th column element, W (l-1) Represents the trainable model weight matrix, σ represents the activation function. In the setting of the present invention, the ReLU function is used, H (0) =X is the initial value of the node feature matrix, H (l) It is the node embedding matrix after l steps of calculation. If a total of L calculations are performed, the final node embedding matrix Z = H (L) , in the setting of the present invention, L=2.

[0019] 2.2 Obtain graph representation features. Use the readout layer to calculate the node embedding matrix Z generated in step 2.1:

[0020] g=Readout(A,Z), (2)

[0021] Among them, g is the graph representation feature, and Readout is the readout function, such as summation, averaging, and splicing. In the present invention, splicing is used as the readout function, and the obtained graph representation feature will be used as the input of the classifier for the task of judging the transient stability of the power grid.

[0022] Furthermore, step 3 specifically includes: first establishing an adjacency matrix mask and a model weight matrix mask, which respectively represent the importance of elements in the adjacency matrix of the power grid graph structure data in the power grid temporary stability dataset and the model weight matrix of the graph convolutional neural network, and then performing end-to-end joint optimization training on the model weight matrix, the adjacency matrix mask and the model weight matrix mask; the amplitudes of the elements in the trained adjacency matrix mask and the model weight matrix mask represent the importance of the elements in the adjacency matrix and the model weight matrix, and according to a predefined single sparsity ratio, the elements with lower amplitudes in the adjacency matrix mask and the model weight matrix mask are set to 0 to obtain the retained adjacency matrix mask and the model weight matrix mask, and then multiply the two masks with the adjacency matrix and the model weight matrix to obtain the retained adjacency matrix and the model weight matrix, thereby achieving sparsity for both.

[0023] In the present invention, an amplitude-based sparsification method is used, so a mask with the same shape as the target matrix needs to be set to multiply the target matrix to determine which elements to discard. The amplitude-based graph sparsification includes:

[0024] 3.1 Establishing the adjacency matrix mask and the model weight matrix mask. Since the present invention performs the joint sparseness of the adjacency matrix and the model weight matrix, two differentiable mask matrices m are defined. A and m W They represent the importance of the elements in the adjacency matrix of the power grid graph structure data in the power grid temporary stability dataset and the model weight matrix of the graph convolutional neural network, and initialize them:

[0025]

[0026]

[0027] Among them, W0 represents the initialization matrix of the model weights.

[0028] 3.2 Training adjacency matrix mask and model weight matrix mask. This invention proposes a loss function L r Implement model weight W, adjacency matrix mask m AAnd the model weight matrix mask m W End-to-end joint optimization:

[0029] L r =L ce (f({A⊙m A ,X},W⊙m W ),y)+λ1‖m A ‖1+λ2‖m W ‖1 (5)

[0030] Among them, L ce It is the traditional cross entropy classification loss function, f(·) represents the prediction result of the classifier, y represents the true label, ⊙ represents the element-wise multiplication operation, and λ1 and λ2 control the proportions of the two l1 regularization terms respectively.

[0031] 3.3 Sparseness based on the amplitude of the mask. The amplitude of the mask after training represents the importance of the elements in the adjacency matrix and the model weight matrix. Therefore, the present invention uses the predefined sparse ratio p A and p W , m A and n W The elements with lower magnitudes in are set to 0, and the retained adjacency matrix mask and model weight matrix mask are obtained, and then the retained mask m is A and m W Multiply with A and W to obtain the retained adjacency matrix and model weight matrix for further sparsification.

[0032] Furthermore, step 4 specifically includes: first, obtaining the adjacency matrix mask and model weight mask representing the ones discarded in the previous sparsification process, and then performing end-to-end joint optimization training on the model weight matrix, the discarded adjacency matrix mask, and the discarded model weight matrix mask; after the training is completed, using gumbel-softmax to sample important elements from the discarded adjacency matrix mask and the discarded model weight matrix mask, and performing the same sampling operation on the retained adjacency matrix mask and the model weight matrix mask, so as to locate the interfering elements therein, remove the interfering elements from the retained part, and add the important elements sampled from the discarded part to the retained part, thereby optimizing it.

[0033] Because traditional amplitude-based iterative sparsification schemes ignore the fact that the importance of elements changes with the dynamic changes in the graph and model structures, some implicitly important information is lost. This paper proposes to use an adversarial complementary erasure framework to reconsider the elements discarded in previous sparsification processes before each further sparsification process and re-evaluate the importance of all elements in their current state, thereby correcting the sparsified substructure.

[0034] The adversarial complementary erasure framework described in step 4 includes: 4.1 Re-evaluating the importance of elements in the current state. In order to evaluate the importance of the discarded parts in the current state, the present invention first needs to obtain the adjacency matrix mask and model weight mask representing the discarded substructure after several sparse processes:

[0035]

[0036]

[0037] in represents an element-wise XOR operation, and ~ represents an element-wise logical NOT operation.

[0038] Then, the present invention jointly trains the adjacency matrix mask representing the discarded substructure and the model weight matrix mask, and similarly uses the loss function L p Implement model weights W, adjacency matrix masks representing discarded substructures and the model weight matrix mask End-to-end joint optimization.

[0039]

[0040] Among them, L ce It is the traditional cross entropy classification loss function, f(·) represents the prediction result of the classifier, y represents the true label, ⊙ represents element-wise multiplication, and λ1 and λ2 control the proportions of the two l1 regularization terms respectively.

[0041] 4.2 Use the important elements in the discarded substructure to correct the adjacency matrix mask and the model weight matrix mask representing the retained substructure. Since the correction process of the adjacency matrix mask and the model weight matrix mask is very similar, the correction process of the adjacency matrix mask is used as an example. The magnitude of the elements in the matrix represents the importance of the elements in the adjacency matrix that were discarded in the previous sparse processes in the current state. Sampling important elements:

[0042]

[0043] where i p is a one-hot vector with the same dimension as The elements in the same size, ∈ k is a small amount of noise randomly drawn from the Gumbel distribution to avoid the argmax operation always selecting the largest element. In order to fully mine the important elements as much as possible, K samples are drawn from the dataset to obtain the K most discriminative elements, where K is the upper limit of the number of samples. If an element is sampled more than once, only one instance is retained and the element is removed from the dataset. All elements sampled in are labeled as α p Similarly, for m A Perform the same sampling operation to locate m A Disruptive elements in:

[0044]

[0045] The sampled element is labeled α r Then set α r From m A Remove it and change α p Add to m A , optimize it:

[0046]

[0047] in, Represents element-wise XOR operation.

[0048] Furthermore, step 5 specifically includes: first using the amplitude-based sparse method to obtain the retained adjacency matrix mask and model weight matrix mask, then using the adversarial complementary erasing framework to correct the mask, and then resetting the model weight matrix to the initialization weight, and repeatedly iterating the above steps until the required graph sparsity and model sparsity are achieved.

[0049] The traditional lottery hypothesis uses an iterative amplitude-based pruning algorithm to identify lottery tickets. In this invention, a set of simplified subgraphs and submodels that do not affect the accuracy of grid transient stability judgment after sparseness is defined as a graph lottery. First, the graph sparsity and model sparsity s to be achieved are predefined. A and s W , analogous to the traditional lottery hypothesis method, the amplitude-based sparsity method is used to obtain the adjacency matrix mask and model weight matrix mask of the sparse substructure, and then the mask is modified using the adversarial complementary erasure framework. The model weight matrix is ​​then reset to the initialization weight W0, and the above three steps are iterated repeatedly until the required graph sparsity and model sparsity are achieved.

[0050] Furthermore, step 6 specifically includes: multiplying the optimized adjacency matrix mask with the adjacency matrix of the original power grid graph structure data to obtain the key subgraph structure; using the key subgraph structure to relearn the node embedding matrix and graph representation features, and inputting the final graph representation features into the classifier to obtain the classification result; for the power grid transient instability sample, the key subgraph structure is the substructure that causes the power grid transient instability.

[0051] After obtaining the optimized adjacency matrix mask m A Then, the mask is multiplied with the adjacency matrix of the power grid graph structure data in the power grid temporary stability data set to obtain the key subgraph structure A core , calculated as follows:

[0052] A core =A⊙m A , (12)

[0053] Among them, ⊙ represents element-wise multiplication operation.

[0054] Use the new adjacency matrix A core The node embedding matrix and graph representation features are learned, and the final graph representation features are input into the classifier to obtain the grid transient stability judgment result. '0' represents grid transient stability, and '1' represents grid transient instability. For grid transient instability samples, A core It represents the substructure that causes transient instability of the power grid.

[0055] The present invention also relates to a power grid transient instability substructure positioning system based on the graph lottery hypothesis theory, comprising: a power grid transient instability data set construction module, a graph representation feature calculation module, an amplitude-based sparsification module, an adversarial complementary erasure module, and a progressive sparsification framework module.

[0056] The present invention also relates to a computer-readable storage medium, characterized in that a program is stored thereon, and when the program is executed by a processor, the method for locating a transient instability substructure of a power grid based on the graph lottery hypothesis theory of the present invention is implemented.

[0057] The advantages of the present invention are: taking into account the structural characteristics of power grid data, modeling the power grid data as graph structure data, and on the basis of the existing method of using graph neural networks to judge the transient stability of the power grid, by adopting a graph structure learning method based on the graph lottery hypothesis theory, the adjacency matrix and model weight matrix of the power grid graph structure data are jointly sparsified, redundant information in the power grid graph structure data is removed, and the identified key substructures are corrected through the adversarial complementary erasure framework. On the premise of ensuring the accuracy of the power grid transient stability judgment, the key substructures that cause transient instability of the power grid are more accurately located. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is a diagram for generating a grid temporary stability sample data set in the method of the present invention.

[0059] Figure 2 It is a schematic diagram of the process of the present invention, wherein Figure 2 (a) represents the calculation of intermediate node embedding and the generation of graph representation features, Figure 2(b) represents the joint sparsification of the adjacency matrix and model weight matrix in the power grid structure data based on amplitude. Figure 2 (c) shows the mask is modified using the adversarial complementary erasure framework. Figure 2 (d) represents the progressive sparsification framework. DETAILED DESCRIPTION

[0060] The technical solution of the present invention is explained and described clearly and completely below in conjunction with the accompanying drawings.

[0061] Example 1

[0062] Reference Figure 1-Figure 2 (d) A method for locating a transient instability substructure of a power grid based on the graph lottery hypothesis theory of the present invention comprises the following steps:

[0063] 1. Construct a grid temporary stability dataset;

[0064] The power system simulation software PSASP is used to construct a grid transient stability dataset. First, a graph structure data is constructed based on the grid topology. Then, parameters such as the grid load level, voltage value, and fault line are modified to obtain different samples. Time domain simulations are performed on each sample. Based on the simulation results, the transient stability assessment results of the grid are obtained. Transient stable samples are marked with '0', transient unstable samples are marked with '1', and which grid paths will cause transient instability are marked. By iterating this many times, a grid transient stability dataset with transient stability labels can be obtained, such as Figure 1 .

[0065] 2. Extract graph representation features;

[0066] 2.1 Calculate the node embedding matrix. The power grid data consists of various devices, which can be regarded as nodes in the graph structure data, and the attributes of each device can be regarded as the node features in the graph structure data. The connection relationship between each device in the power grid is the same as the adjacency matrix in the graph structure data. Therefore, the power grid graph structure data in the power grid transient stability dataset can be defined as s = (A, X), where A represents the adjacency matrix of n nodes in the power grid graph structure data, and X represents the feature matrix of n nodes. Then, a graph convolutional neural network is used to transmit messages between the nodes of the power grid graph structure data:

[0067]

[0068] in, I n is the identity matrix, is a logarithmic matrix, The i-th diagonal element of is Representation matrix The i-th row and j-th column element, W (l-1)represents the trainable model weight matrix, σ represents the activation function. In the setting of the present invention, the ReLU function is used, and H (0) =X is the initial value of the node feature matrix, H (l) It is the node embedding matrix after l steps of calculation. If a total of L calculations are performed, the final node embedding matrix Z = H (L) , in the setting of the present invention, L=2.

[0069] 2.2 Obtain graph representation features. Use the readout layer to calculate the node embedding matrix Z generated in step 2.1, as Figure 2 (a):

[0070] g=Readout(A,Z), (2)

[0071] Among them, g is the graph representation feature, and Readout is the readout function, such as summation, averaging, and splicing. In the present invention, splicing is used as the readout function, and the obtained graph representation feature will be used as the input of the classifier for the task of judging the transient stability of the power grid.

[0072] 3. Perform amplitude-based graph sparsification;

[0073] In the present invention, an amplitude-based sparsification method is adopted, so it is necessary to set a mask with the same shape as the target matrix to be multiplied with the target matrix, so as to determine which elements are to be discarded.

[0074] 3.1 Establishing the adjacency matrix mask and the model weight matrix mask. Since the present invention performs the joint sparseness of the adjacency matrix and the model weight matrix, two differentiable mask matrices m are defined. A and m W They represent the importance of the elements in the adjacency matrix of the power grid graph structure data in the power grid temporary stability dataset and the model weight matrix of the graph convolutional neural network, and initialize them:

[0075]

[0076]

[0077] Among them, W0 represents the initialization matrix of the model weights.

[0078] 3.2 Training adjacency matrix mask and model weight matrix mask. This invention proposes a loss function L r Implement model weight W, adjacency matrix mask m A And the model weight matrix mask m W End-to-end joint optimization:

[0079]

[0080] Among them, L ce It is the traditional cross entropy classification loss function, f(·) represents the prediction result of the classifier, y represents the true label, ⊙ represents the element-wise multiplication operation, and λ1 and λ2 control the proportions of the two l1 regularization terms respectively.

[0081] 3.3 Sparseness based on the amplitude of the mask. The amplitude of the mask after training represents the importance of the elements in the adjacency matrix and the model weight matrix. Therefore, the present invention uses the predefined sparse ratio p A and p W , m A and m W The elements with lower magnitudes in are set to 0, and the retained adjacency matrix mask and model weight matrix mask are obtained, and then the retained mask m is A and m W Multiply with A and W to obtain the retained adjacency matrix and model weight matrix for further sparseness, such as Figure 2 (b).

[0082] 4. Improving positioning accuracy using adversarial complementary erasure framework;

[0083] Because traditional amplitude-based iterative sparsification schemes ignore the fact that the importance of elements changes with the dynamic changes in the graph and model structures, some implicitly important information is lost. This paper proposes to use an adversarial complementary erasure framework to reconsider the elements discarded in the previous sparsification process before each further sparsification process and re-evaluate the importance of all elements in their current state, thereby correcting the sparsified substructure.

[0084] 4.1 Re-evaluate the importance of elements in the current state. In order to evaluate the importance of the discarded part in the current state, the present invention first needs to obtain the adjacency matrix mask and model weight mask representing the discarded substructure after several sparse steps:

[0085]

[0086]

[0087] in represents an element-wise XOR operation, and ~ represents an element-wise logical NOT operation.

[0088] Then, the present invention jointly trains the adjacency matrix mask representing the discarded substructure and the model weight matrix mask, and similarly uses the loss function L p Implement model weights W, adjacency matrix masks representing discarded substructures and the model weight matrix mask End-to-end joint optimization.

[0089]

[0090] Among them, L ce It is the traditional cross entropy classification loss function, f(·) represents the prediction result of the classifier, y represents the true label, ⊙ represents element-wise multiplication, and λ1 and λ2 control the proportions of the two l1 regularization terms respectively.

[0091] 4.2 Use the important elements in the discarded substructure to correct the adjacency matrix mask and the model weight matrix mask representing the retained substructure. Since the correction process of the adjacency matrix mask and the model weight matrix mask is very similar, the correction process of the adjacency matrix mask is used as an example. The magnitude of the elements in the matrix represents the importance of the elements in the adjacency matrix that were discarded during the previous iterations. Sampling important elements:

[0092]

[0093] where i p is a one-hot vector with the same dimension as The elements in the same size, ∈ k is a small amount of noise randomly drawn from the Gumbel distribution to avoid the argmax operation always selecting the largest element. In order to fully mine the important elements as much as possible, K samples are drawn from the dataset to obtain the K most discriminative elements, where K is the upper limit of the number of samples. If an element is sampled more than once, only one instance is retained and the element is removed from the dataset. All elements sampled in are labeled as α p Similarly, for m A Perform the same sampling operation to locate m A Disruptive elements in:

[0094]

[0095] The sampled element is labeled α r Then set α r From m A Remove it and change α p Add to m A , optimize it, such as Figure 2 (c)

[0096]

[0097] in, Represents element-wise XOR operation.

[0098] 5. Build a progressively sparse framework;

[0099] The traditional lottery hypothesis uses an iterative amplitude-based pruning algorithm to identify lottery tickets. In this invention, a set of simplified subgraphs and submodels that do not affect the accuracy of grid transient stability judgment after sparseness is defined as a graph lottery. First, the graph sparsity and model sparsity s to be achieved are predefined. A and s W ,Analogous to the traditional lottery hypothesis method, the amplitude-based sparse method is used to obtain the adjacency matrix mask and model weight matrix mask of the sparse substructure, and then the mask is modified using the adversarial complementary erasure framework. The model weight matrix is ​​then reset to the initial weight W0, and the above three steps are iterated repeatedly until the required graph sparsity and model sparsity are achieved, as shown in Figure 2 (d).

[0100] 6. Perform grid transient stability identification and positioning tasks;

[0101] After obtaining the optimized adjacency matrix mask m A Then, the mask is multiplied with the adjacency matrix in the power grid graph structure data in the power grid temporary stability data set to obtain the key subgraph structure A core , calculated as follows:

[0102] A core =A⊙m A , (12)

[0103] Among them, ⊙ represents element-wise multiplication operation.

[0104] Use the new adjacency matrix A core The node embedding matrix and graph representation features are learned, and the final graph representation features are input into the classifier to obtain the grid transient stability judgment result. '0' represents grid transient stability, and '1' represents grid transient instability. For grid transient instability samples, A core It represents the substructure that causes transient instability of the power grid.

[0105] The present invention also relates to a power grid transient instability substructure positioning system based on the graph lottery hypothesis theory, comprising: a power grid transient instability data set construction module, a graph representation feature calculation module, an amplitude-based sparsification module, an adversarial complementary erasure module, and a progressive sparsification framework module.

[0106] Example 2

[0107] This embodiment relates to a system for implementing the method of embodiment 1, a method for locating a power grid transient instability substructure based on the graph lottery hypothesis theory, and is characterized by comprising:

[0108] The grid temporary stability dataset construction module constructs the grid diagram structure data according to the grid topology and modifies the values ​​of various parameters. It uses the results of time domain simulation as labels and iteratively obtains the grid temporary stability dataset.

[0109] The graph representation feature calculation module uses a graph convolutional neural network to calculate the node embedding matrix of the power grid graph structure data in the power grid transient stability dataset, and then splices the node embedding matrix through the readout layer to obtain the graph representation feature;

[0110] Based on the amplitude sparsification module, an adjacency matrix mask and a model weight matrix mask are constructed to represent the importance of the elements in the adjacency matrix of the power grid graph structure data in the power grid transient stability dataset and the model weight matrix of the graph convolutional neural network, respectively. The adjacency matrix and the model weight matrix are sparsified according to the amplitude of the trained mask.

[0111] The adversarial complementary erasure module uses the adversarial complementary erasure framework to remove interfering elements in the retained substructure and add the sampled important elements to the retained substructure;

[0112] The progressive sparsification framework module repeatedly iteratively executes the amplitude-based sparsification module and the adversarial complementary erasing module, and resets the model weight matrix to the initialization weight before the next iteration until the desired sparsity is achieved;

[0113] The grid instability state discrimination module is used to obtain the key subgraph structure based on the optimized mask and learn the graph representation features. The graph representation features are used to perform the grid transient stability discrimination task. For grid transient instability samples, the key subgraph structure is the substructure that causes grid transient instability.

[0114] Example 3

[0115] A computer-readable storage medium, characterized in that a program is stored thereon, and when the program is executed by a processor, the method for locating a transient instability substructure of a power grid based on the graph lottery hypothesis theory described in Example 1 is implemented.

[0116] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The scope of protection of the present invention should not be regarded as limited to the specific forms described in the embodiments. The scope of protection of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A method for locating substructures of transient instability in power grids based on the graph lottery hypothesis theory includes the following steps: Step 1. Construct the grid diagram data based on the grid topology and modify the values ​​of various parameters. Use the results of the time-domain simulation as labels and iterate to obtain the grid transient stability dataset. Step 2. Use a graph convolutional neural network to calculate the node embedding matrix of the power grid graph structure data in the power grid transient stability dataset. Then, concatenate the node embedding matrix through the readout layer to obtain the graph representation feature. Step 3. Construct an adjacency matrix mask and a model weight matrix mask to represent the importance of the elements in the adjacency matrix of the power grid graph structure data in the power grid transient stability dataset and the model weight matrix of the graph convolutional neural network, respectively. Sparse the adjacency matrix and the model weight matrix based on the amplitude of the trained mask. Step 4. Remove the interfering elements in the retained substructure by adversarial complementary erasure framework, and add the sampled important elements to the retained substructure; Step 5. Repeat steps 3 and 4 and reset the model weight matrix to the initial weights before the next iteration until the desired sparsity is achieved. Step 6. Obtain the key subgraph structure based on the optimized mask and learn the graph representation features. Use the graph representation features to perform the power grid transient stability judgment task. For power grid transient instability samples, the key subgraph structure is the substructure that causes the power grid transient instability.

2. The method for locating power grid transient instability substructures based on the graph lottery hypothesis theory according to claim 1, characterized in that: Step 1 specifically includes: first, constructing graph structure data based on the power grid topology, then modifying the power grid load level, voltage value, and fault line parameters to obtain different samples, performing time domain simulation on each sample, and obtaining the power grid transient stability assessment results based on the simulation results. The transient stable samples are marked with '0', and the transient unstable samples are marked with '1'. The grid paths that will cause transient instability are also marked. After multiple iterations, a grid transient stability dataset with transient stability labels can be obtained.

3. The method for locating power grid transient instability substructures based on the graph lottery hypothesis theory according to claim 1, characterized in that: The method for extracting the graph representation features described in step 2 is: Compute node embedding matrix; The grid diagram structure data in the grid transient stability dataset can be defined as ,in Indicates the power grid structure data The adjacency matrix of nodes, express The feature matrix of each node is then used to pass messages between the nodes of the power grid graph data: in, , is the identity matrix, is a logarithmic matrix, No. The diagonal elements are ; Representation matrix No. Rank Column elements, represents the trainable model weight matrix, express function, is the initial value of the node feature matrix, It is through The node embedding matrix after the step calculation, if a total of The final node embedding matrix is ; Use the readout layer to embed the node matrix generated in 2.1 Perform calculations to obtain the graph representation features as the input of the classifier for the task of judging the transient stability of the power grid: in, It is a graph representation feature, Represents a readout function implemented in a splicing manner.

4. The method for locating substructures of transient instability in power grids based on the graph lottery hypothesis theory according to claim 1, characterized in that: Step 3 specifically includes: first establishing an adjacency matrix mask and a model weight matrix mask to represent the importance of edges and model weights respectively, and then performing end-to-end joint optimization training on the model weight matrix, the adjacency matrix mask and the model weight matrix mask; the amplitude of the elements in the trained adjacency matrix mask and the model weight matrix mask represent the importance of the elements in the adjacency matrix and the model weight matrix, and according to the predefined single sparsity ratio, the elements with lower amplitudes in the adjacency matrix mask and the model weight matrix mask are set to 0 to obtain the retained adjacency matrix mask and the model weight matrix mask, and then the two masks are multiplied with the adjacency matrix and the model weight matrix to obtain the retained adjacency matrix and the model weight matrix, thereby achieving sparsity for both.

5. The method for locating substructures of transient instability in power grids based on the graph lottery hypothesis theory according to claim 4, characterized in that: The step 3 described in which the adjacency matrix and the model weight matrix are sparsely populated according to the magnitude of the trained mask includes: Train the adjacency matrix mask and the model weight matrix mask; define two differentiable masks and They represent the importance of the elements in the adjacency matrix of the power grid graph structure data in the power grid temporary stability dataset and the model weight matrix of the graph convolutional neural network, and are initialized: in, Represents the initialization matrix of the model weights; Then train the adjacency matrix mask and model weight matrix mask; use the loss function Implementing model weights , adjacency matrix mask and the model weight matrix mask End-to-end joint optimization: in, is the traditional cross entropy classification loss function, represents the prediction result of the classifier, represents the true label, Represents element-wise multiplication, and Control two The proportion of regularization term; Sparse based on the magnitude of the mask; the magnitude of the trained mask represents the importance of the elements in the adjacency matrix and the model weight matrix, according to the predefined sparsity ratio and ,Will and The elements with lower magnitude in are set to 0, and the retained adjacency matrix mask and model weight matrix mask are obtained, and then the retained mask is and and and Multiply them together to obtain the retained adjacency matrix and model weight matrix for further sparsification.

6. The method for locating substructures of transient instability in power grids based on the graph lottery hypothesis theory according to claim 1, characterized in that: Step 4 specifically includes: first, obtaining the adjacency matrix mask and model weight mask discarded in the previous sparse process, and then performing end-to-end joint optimization training on the model weight matrix, the discarded adjacency matrix mask, and the discarded model weight matrix mask; after training, using gumbel-softmax to sample important elements from the discarded adjacency matrix mask and the discarded model weight matrix mask, and performing the same sampling operation on the retained adjacency matrix mask and model weight matrix mask, so as to locate the interfering elements therein, remove the interfering elements from the retained part, and add the important elements sampled from the discarded part to the retained part, thereby optimizing it.

7. The method for locating power grid transient instability substructures based on the graph lottery hypothesis theory according to claim 6, characterized in that: The complementary erasure-resistant framework described in step 4 includes: Re-evaluate the importance of elements in the current state; first, you need to obtain the adjacency matrix mask and the model weight matrix mask representing the discarded substructure after several sparse steps: in represents element-wise XOR operation, Represents element-wise logical NOT operation; Then, the adjacency matrix mask representing the discarded substructure and the model weight matrix mask are jointly trained, and similarly, the loss function is used. Implementing model weights , adjacency matrix mask representing the discarded substructure and the model weight matrix mask End-to-end joint optimization; in, is the traditional cross entropy classification loss function, represents the prediction result of the classifier, represents the true label, Represents element-wise multiplication, and Control two The proportion of regularization term; The important elements in the discarded substructure are used to modify the adjacency matrix mask representing the retained substructure and the model weight matrix mask; since the modification process of the adjacency matrix mask and the model weight matrix mask is very similar, the modification process of the adjacency matrix mask is taken as an example to illustrate; after training, The magnitude of the elements in the sparse matrix indicates the importance of the elements in the adjacency matrix that were discarded in the previous sparse processes in the current state; using gumbel-softmax from Sampling important elements: in is a one-hot vector with the same dimension as The elements in the same size, is a small amount of noise randomly sampled from a Gumbel distribution to avoid The operation always selects the largest element; In progress times to obtain The most discriminative elements, is the upper limit of the number of samples; if an element is sampled more than once, only one instance is retained, from All elements sampled in are marked as Similarly, Perform sampling operations to locate Disruptive elements in: The sampled elements are marked as ; then from Remove it and Add to , to achieve Optimization: in, Represents element-wise XOR operation.

8. The method for locating substructures of transient instability in power grids based on the graph lottery hypothesis theory according to claim 1, characterized in that: Step 5 specifically includes: first, applying the amplitude-based sparsity method to obtain the retained adjacency matrix mask and model weight matrix mask, then modifying the mask using the adversarial complementary erasing framework, and then resetting the model weight matrix to the initialization weight, and repeatedly iterating the above steps until the required graph sparsity and model sparsity are achieved.

9. The method for locating power grid transient instability substructures based on the graph lottery hypothesis theory according to claim 1, characterized in that: Step 6 specifically includes: multiplying the optimized adjacency matrix mask with the adjacency matrix of the original power grid graph structure data to obtain the key subgraph structure; using the key subgraph structure to relearn the node embedding matrix and graph representation features, and inputting the final graph representation features into the classifier to obtain the classification result; for the power grid transient instability sample, the key subgraph structure is the substructure that causes the power grid transient instability.

10. A system for implementing the method for locating power grid transient instability substructures based on the graph lottery hypothesis theory as claimed in any one of claims 1 to 9, characterized in that: include: The grid temporary stability dataset construction module constructs the grid diagram structure data according to the grid topology and modifies the values ​​of various parameters. It uses the results of time domain simulation as labels and iteratively obtains the grid temporary stability dataset. The graph representation feature calculation module uses a graph convolutional neural network to calculate the node embedding matrix of the power grid graph structure data in the power grid transient stability dataset, and then splices the node embedding matrix through the readout layer to obtain the graph representation feature; Based on the amplitude sparsification module, an adjacency matrix mask and a model weight matrix mask are constructed to represent the importance of the elements in the adjacency matrix of the power grid graph structure data in the power grid transient stability dataset and the model weight matrix of the graph convolutional neural network, respectively. The adjacency matrix and the model weight matrix are sparsified according to the amplitude of the trained mask. The adversarial complementary erasure module uses the adversarial complementary erasure framework to remove interfering elements in the retained substructure and add the sampled important elements to the retained substructure; The progressive sparsification framework module repeatedly iteratively executes the amplitude-based sparsification module and the adversarial complementary erasing module, and resets the model weight matrix to the initialization weight before the next iteration until the desired sparsity is achieved; The grid instability state discrimination module is used to obtain the key subgraph structure based on the optimized mask and learn the graph representation features. The graph representation features are used to perform the grid transient stability discrimination task. For grid transient instability samples, the key subgraph structure is the substructure that causes grid transient instability.

11. A computer-readable storage medium, characterized in that A program is stored thereon, and when the program is executed by the processor, the method for locating the transient instability substructure of the power grid based on the graph lottery hypothesis theory as described in any one of claims 1 to 9 is implemented.