A distribution network state representation method based on graph mask reconstruction

By using graph mask reconstruction method in distribution network state estimation, heterogeneous graphs and designing self-supervised learning model, the problem of insufficient label dependence and robustness in the existing technology is solved, and the topological relationship of distribution network is realized and efficient modeling and accurate prediction of state variables.

CN118037143BActive Publication Date: 2025-01-03INFORMATION & COMMNUNICATION BRANCH STATE GRID JIANGXI ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311812522.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-01-03
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

The existing graph-based distribution network state estimation method has problems such as label dependence, poor generalization and weak robustness, and it is difficult to effectively utilize the complex topology and operation data of the distribution network.

Method used

Using a graph mask reconstruction method, by constructing heterogeneous graphs, designing path mask predictors and node attribute mask predictors, reconstructing paths and node attributes using self-supervised learning, and optimizing the model to improve representation ability and prediction accuracy.

Benefits of technology

Accurate modeling of distribution network topological relationships and state variables is achieved, prediction accuracy and robustness are improved, dependence on manual labeled data is reduced, and the accuracy of state estimation is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118037143B_ABST
    Figure CN118037143B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of power systems, and in particular to a distribution network state characterization method based on graph mask reconstruction, comprising the following steps: S1: modeling the topological structure of the distribution network as a heterogeneous graph; S2: reconstructing the path through a path mask predictor; S3: reconstructing the node attributes through a node attribute mask predictor; S4: optimizing the model. The distribution network state calculation method based on heterogeneous graph mask modeling proposed in the present invention can accurately model the topological relationship and state variables of the distribution network. The model can capture complex graph structures containing semantics, more efficiently predict the node attributes and edges of the graph, and through a pre-trained graph neural network model, the state of the distribution network can be quickly and accurately calculated, and the power distribution topology data of the power grid is abstracted into a heterogeneous graph structure, which efficiently, intuitively and flexibly represents the data, and has higher accuracy in state estimation tasks than back propagation networks and convolutional neural networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to a distribution network state characterization method based on graph mask reconstruction. Background Art

[0002] Distribution network state estimation refers to the use of measurement data to estimate the state variables of the power grid, such as voltage, current, and power. Due to the complex relationship between nodes and edges in the distribution network, traditional statistical methods are difficult to handle this complex nonlinear relationship. Graph neural networks can make full use of the topological structure and operation data of the distribution network to accurately estimate the state of the power grid. Therefore, the application of graph neural networks in distribution network state estimation has gradually attracted attention. Graph neural networks are a deep learning method that learns on graph structure data and can use the information of nodes and edges to perform complex classification and prediction tasks. In the prior art, most of the graph-based distribution network state estimation methods currently focus on supervised learning, resulting in the problems of label dependence, poor generalization, and weak robustness of such models. As a branch of graph neural networks, graph self-supervised learning can make full use of the unlabeled information in the graph data due to the complex structure and rich information of the graph data, thereby improving the representation ability and prediction accuracy of the graph neural network. In view of the above problems, the present invention proposes a distribution network state characterization method based on graph mask reconstruction to solve the above problems. Summary of the invention

[0003] The main purpose of the present invention is to provide a distribution network state characterization method based on graph mask reconstruction to solve the problems raised in the related art.

[0004] In order to achieve the above object, according to one aspect of the present invention, a distribution network state characterization method based on graph mask reconstruction is provided, comprising the following steps:

[0005] S1: Model the topology of the distribution network as a heterogeneous graph;

[0006] S2: Reconstruct the path through the path mask predictor;

[0007] S3: Reconstruct node attributes through node attribute mask predictor;

[0008] S4: Optimize the model.

[0009] Furthermore, the heterogeneous graph expression in S1 is:

[0010]

[0011] Among them, V is a node of various types; A is the adjacency matrix; T v Represents a node type set; T εrepresents the set of edge types in A; X is the attribute; Represents a meta-path; a meta-path is a path connecting different types of nodes with different edge types.

[0012] Furthermore, the heterogeneous graph includes nodes and edges, the nodes represent different devices, and the edges represent connection relationships between devices.

[0013] Furthermore, the path mask predictor in S2 explores high-order relations and encodes structural information of complex graphs by specifying object connection sequences and capturing relational semantics.

[0014] Furthermore, the process of the path mask predictor is as follows:

[0015] S21: Mask the adjacency matrix A according to probability p, and get Among them, p is an adjustable training parameter, which refers to the probability of masking edges in the adjacency matrix. It is the new matrix formed after the adjacency matrix A is masked with probability p;

[0016] S22: And node feature X is fed into the encoder training to obtain H1:

[0017]

[0018] S23: And H1 are fed into the decoder for training, and H2 is obtained:

[0019]

[0020] S24: According to H1 and H2, we get A`:

[0021] A`=σ((H2) T H2)

[0022] Where σ is the sigmoid activation function.

[0023] Furthermore, the node attribute mask predictor in S3 is a method of first masking the attributes of the target type of nodes and then allowing the model to reconstruct the masked attributes.

[0024] Furthermore, the process of the node attribute mask predictor is as follows:

[0025] S31: Mask node X according to probability q, and get Among them, q represents the probability of masking node attributes, It is a new node formed after node X is masked with probability q;

[0026] S32: And the adjacency matrix A are fed into the encoder for training to obtain H3:

[0027]

[0028] S33: Mask the feature vector according to probability q to obtain

[0029] S34: A and Send it to the decoder for training and get the node attribute Z:

[0030]

[0031] Furthermore, the model optimization in S4 adopts cosine distance to optimize the model of the path mask predictor and the model of the node mask encoder respectively, obtain respective loss functions, and finally obtain the total training loss function.

[0032] Furthermore, the model of the path coding predictor and the model of the node attribute encoder are optimized respectively to obtain their respective loss functions, and the calculation formula is as follows:

[0033] The loss function of the path mask predictor is:

[0034]

[0035] The loss function of the node attribute mask predictor is:

[0036]

[0037] Among them, γ1 and γ2 are scaling factors.

[0038] Furthermore, the calculation formula of the total training loss function is as follows:

[0039] L=λLoss1+μLoss2

[0040] Among them, λ and μ are hyperparameters.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] The distribution network state calculation method based on heterogeneous graph mask modeling proposed in the present invention can accurately model the topological relationship and state variables of the distribution network. The model can capture complex graph structures containing semantics and more efficiently predict the node attributes and edges of the graph. Through the pre-trained graph neural network model, the state of the distribution network can be quickly and accurately calculated, and the power grid distribution topology data can be abstracted into a heterogeneous graph structure, which can efficiently, intuitively and flexibly represent the data and has higher accuracy in state estimation tasks than back propagation networks and convolutional neural networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0044] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation mode, structure, characteristics and effects of the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.

[0045] Reference Figure 1 , a distribution network state characterization method based on graph mask reconstruction is provided, comprising the following steps:

[0046] S1: Model the topology of the distribution network as a heterogeneous graph;

[0047] S2: Reconstruct the path through the path mask predictor;

[0048] S3: Reconstruct node attributes through node attribute mask predictor;

[0049] S4: Optimize the model.

[0050] The heterogeneous graph expression in S1 is:

[0051]

[0052] Among them, V is a node of various types; A is the adjacency matrix; T v Represents a node type set; T ε represents the set of edge types in A; X is the attribute; Represents a meta-path; a meta-path is a path connecting different types of nodes with different edge types.

[0053] The heterogeneous graph includes nodes and edges, the nodes represent different devices, and the edges represent connection relationships between devices.

[0054] The path mask predictor in S2 explores high-order relations and encodes structural information of complex graphs by specifying object connection sequences and capturing relational semantics.

[0055] The process of the path mask predictor is as follows:

[0056] S21: Mask the adjacency matrix A according to probability p, and get Among them, p is an adjustable training parameter, which refers to the probability of masking edges in the adjacency matrix. It is the new matrix formed after the adjacency matrix A is masked with probability p;

[0057] S22: And node feature X is fed into the encoder training to obtain H1:

[0058]

[0059] S23: And H1 are fed into the decoder for training, and H2 is obtained:

[0060]

[0061] S24: According to H1 and H2, we get A`:

[0062] A`=σ((H2) T H2)

[0063] Where σ is the sigmoid activation function.

[0064] The node attribute mask predictor in S3 is a method of first masking the attributes of nodes of the target type and then allowing the model to reconstruct the masked attributes.

[0065] The process of the node attribute mask predictor is as follows:

[0066] S31: Mask node X according to probability q, and get Among them, q represents the probability of masking node attributes, It is a new node formed after node X is masked with probability q;

[0067] S32: And the adjacency matrix A are fed into the encoder for training to obtain H3:

[0068]

[0069] S33: Mask the feature vector according to probability q to obtain

[0070] S34: A and Send it to the decoder for training and get the node attribute Z:

[0071]

[0072] The model optimization in S4 adopts cosine distance to optimize the model of the path mask predictor and the model of the node mask encoder respectively, obtain their respective loss functions, and finally obtain the total training loss function.

[0073] The model of the path coding predictor and the model of the node attribute encoder are optimized respectively to obtain their respective loss functions, and the calculation formula is as follows:

[0074] The loss function of the path mask predictor is:

[0075]

[0076] The loss function of the node attribute mask predictor is:

[0077]

[0078] Among them, γ1 and γ2 are scaling factors.

[0079] The calculation formula of the total training loss function is as follows:

[0080] L=λLoss1+μLoss2

[0081] Among them, λ and μ are hyperparameters.

[0082] In this embodiment, a distribution network state characterization method based on graph mask reconstruction is proposed. By constructing a heterogeneous graph of the distribution network topology, a path mask prediction task and a node attribute mask prediction task are designed to extract graph information. The graph mask strategy is used to reconstruct node attributes and edges in a self-supervised manner to accurately model the topological relationship and state variables of the distribution network without relying on manually labeled data. Finally, node characterization and edge characterization can be obtained for application to downstream analysis tasks. The specific method of establishing the method model is as follows:

[0083] First, the topological structure of the power grid is modeled as a heterogeneous graph. A heterogeneous graph is a special graph structure in which the types and attributes of nodes and edges are different, and there are no common attributes between nodes and edges. Therefore, a heterogeneous graph is defined as a graph G with multiple types of nodes V and an adjacency matrix A, expressed as: Among them, V is a node of multiple types; A is an adjacency matrix; Tv represents a set of node types; Tε represents a set of edge types in A; X is an attribute; represents a meta-path; a meta-path is a path connecting different types of nodes with different edge types, such as The topological structure of the distribution network determines the operation mode of the power system and the transmission path of the power flow, and has an important impact on the reliability, safety and economy of the power system. The nodes in the topological structure represent different devices, and the edges represent the connection relationship between the devices. The definition of nodes includes four types: generators, transformers, measurement nodes and loads. Among them, the generator is the power source of the power system, which generates electric energy and injects it into the distribution network. The transformer can increase or decrease the voltage to meet the needs of different power equipment and systems. The measurement node is used to monitor electrical parameters such as voltage, current, and power in the distribution network. The load of the power system refers to the consumption of electric energy and the extraction of electric energy from the distribution network. The definition of edges includes three types: transformer connection, measurement device connection and load connection. Among them, the transformer connection is to connect the generator node and the transformer node, indicating the connection relationship between the generator and the transformer. The measurement device connection is to connect the measurement node with the load or transformer node, indicating the connection relationship between the measurement device and the monitored node. The load connection is to connect the load node and the transformer node, representing the connection relationship between the load and the distribution network.

[0084] Furthermore, in order to represent the semantics involved in complex graph structures, a path mask predictor is designed to capture relational semantics by specifying object connection sequences, exploring high-order relations, and encoding the structural information of complex graphs. The specific steps are as follows:

[0085] S21: Mask the adjacency matrix A according to probability p, and get Among them, p is an adjustable training parameter, which refers to the probability of masking edges in the adjacency matrix. It is the new matrix formed after the adjacency matrix A is masked with probability p;

[0086] S22: And node feature X is fed into the encoder training to obtain H1:

[0087]

[0088] S23: And H1 are fed into the decoder for training, and H2 is obtained:

[0089]

[0090] S24: According to H1 and H2, we get A`:

[0091] A`=σ((H2) T H2)

[0092] Where σ is the sigmoid activation function.

[0093] Among them, the cosine similarity formula is used to measure the training effect of the adjacency matrix A of each node V and the reconstructed adjacency matrix A'. Considering that the larger the cosine similarity, the better, and the loss loss needs to be trained in a smaller and smaller direction, the cosine distance is used. γ1 is the scaling factor. Choosing a suitable scaling factor helps the training convergence. The loss function of the path mask predictor is:

[0094]

[0095] Furthermore, in order to make the model pay attention to the target node type, a node attribute mask predictor is designed to first mask the attributes of the target type of nodes, and then let the model reconstruct the masked attributes. The process of the node attribute mask predictor is as follows:

[0096] S31: Mask node X according to probability q, and get Specifically: Given the attribute information X of a node and the adjacency matrix A, as well as a probability q, which represents the probability of masking the node attribute, the encoder is used to encode the node attribute information X and convert it into a low-dimensional vector representation. Based on the low-dimensional vector output by the encoder, the predictor is used to predict the attribute value of the node. Based on the probability q, the attribute information of the node is masked, that is, part of the attribute information is ignored, and a new node attribute vector is obtained. Then the predicted node attribute value

[0097] S32: and adjacency matrix A are sent to the encoder for training, and the encoder parameters, including weights and biases, can be obtained. During the training process, the encoder will input data and A are transformed into a hidden layer representation H3, where the dimension of H3 is usually the same as the dimension of the input data.

[0098]

[0099] S33: To make the features extracted by the encoder more representative, the feature vector is masked according to probability q to obtain Masking techniques can be used to select important feature dimensions. Specifically, we can divide the feature vector into multiple subsets and apply different masks to each subset. In this way, we can discard unimportant feature dimensions while retaining important feature dimensions.

[0100]

[0101] in, is the masked feature vector, is the subset of the feature vector selected in the i-th feature dimension, and N is the dimension of the feature vector.

[0102] S34: A and Send it to the decoder for training to obtain the node attribute Z, which can represent some characteristics of the node:

[0103]

[0104] Like the loss function of the path mask predictor, the loss function of the node attribute mask predictor is:

[0105]

[0106] Where γ2 is the scaling factor.

[0107] Then, the calculation formula of the total training loss function is as follows:

[0108] L=λLoss1+μLoss2

[0109] Among them, λ and μ are hyperparameters. According to the training needs, the size of λ and μ can be freely adjusted to find the optimal hyperparameter combination, which can improve the training effect and performance of the model. The total training loss function can measure the accuracy of the model's prediction of path masks and node attribute masks.

[0110] In order to verify the effectiveness of the method proposed in this invention, a test was conducted on the IEEE 33 bus system. 8760 sets of simulation data were obtained from each topology through the simulation model. Each set of data includes node injection power, branch power, and the corresponding system voltage amplitude and phase angle. Then 12% of the data set was used as a training set and 88% was used as a test set. Specifically, for each topology, 8760×12%=1051 sets of data were used to train the state estimation model, and the remaining 7709 sets of data were used to verify the effectiveness and generalization performance of the model.

[0111] In order to verify the effectiveness of the method proposed in the present invention, we conducted comparative experiments using back propagation networks (BPNs) and convolutional neural networks (CNNs). The BPN model uses a 4-layer fully connected neural network layer with a tanh activation function. The CNN model uses 3 1D CNN layers and 2 FCN layers, and the activation function is LeakyReLU. Taking the state estimation results of the original topology as an example, according to the estimation accuracy of different state estimation methods, the voltage amplitude error and voltage phase angle error of the method of the present invention are better than other methods, especially the estimation results of the voltage phase angle are significantly improved compared with other algorithms. The voltage phase angle estimation accuracy of the method of the present invention is improved by 37.3% and 62.1% compared with BPN and CNN, respectively. Due to the lack of measurement information, the phase angle estimation error of the WLS method is large. Compared with the WLS method, under normal test conditions, the voltage phase angle estimation accuracy of the method in this paper is improved by 266%.

[0112] The state estimation model proposed in this paper tests multiple topologies. The state estimation model proposed in this paper can perform state estimation tasks for 15 topologies at the same time, and has good estimation accuracy for each topology. In practical applications, the distribution network only needs one model to complete the state estimation tasks under different operating topologies online.

[0113] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A distribution network state characterization method based on graph mask reconstruction, characterized in that: The steps include: S1: Model the topology of the distribution network as a heterogeneous graph; S2: Reconstruct the path through the path mask predictor; S3: Reconstruct node attributes through node attribute mask predictor; S4: Optimize the model; Among them, the heterogeneous graph expression in S1 is: Among them, V is a node of various types; A is the adjacency matrix; T v Represents a node type set; T ε represents the set of edge types in A; X is the attribute; represents a meta-path; a meta-path is a path connecting different types of nodes with different edge types; the heterogeneous graph includes nodes and edges, the nodes represent different devices, and the edges represent the connection relationship between the devices; The path mask predictor in S2 captures the relationship semantics by specifying the object connection sequence, exploring high-order relationships, and encoding the structural information of complex graphs; the process of the path mask predictor is as follows: S21: Mask the adjacency matrix A according to probability p, and get Among them, p is an adjustable training parameter, which refers to the probability of masking edges in the adjacency matrix. It is the new matrix formed after the adjacency matrix A is masked with probability p; S22: And node feature X is fed into the encoder training to obtain H1: S23: And H1 are fed into the decoder for training, and H2 is obtained: S24: According to H1 and H2, we get A`: A`=σ((H2) T ·H2) Where σ is the sigmoid activation function; The node attribute mask predictor in S3 is a method for first masking the attributes of the target type of nodes and then allowing the model to reconstruct the masked attributes; the process of the node attribute mask predictor is as follows: S31: Mask node X according to probability q, and get Among them, q represents the probability of masking node attributes, It is a new node formed after node X is masked with probability q; S32: And the adjacency matrix A are fed into the encoder for training to obtain H3: S33: Mask the feature vector according to probability q to obtain S34: A and Send it to the decoder for training and get the node attribute Z: The model optimization in S4 adopts cosine distance to optimize the model of the path mask predictor and the model of the node mask encoder respectively to obtain their respective loss functions, and finally obtain the total training loss function; the model of the path coding predictor and the model of the node attribute encoder are optimized respectively to obtain their respective loss functions, and the calculation formula is as follows: The loss function of the path mask predictor is: The loss function of the node attribute mask predictor is: Among them, γ1 and γ2 are scaling factors; The calculation formula of the total training loss function is as follows: L = λLoss1 + μLoss2, where λ and μ are hyperparameters.