Active power distribution network topology identification method and related device

By applying the topological identification method of self-supervised graph attention network and multi-layer perceptron in the distribution network, the topological identification problem caused by the lack of measurement data in the prior art is solved, and the accurate prediction of the real-time topological structure of the distribution network is achieved, and the accuracy and adaptability of the identification are improved.

CN120184946APending Publication Date: 2025-06-20CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510470222.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The existing topological identification methods are insufficient in the face of sparse, heterogeneous and noise measurement data, making it difficult to achieve real-time topological identification in the distribution network.

Method used

The topological identification method of active distribution network based on self-supervised graph attention network and multi-layer perceptron is adopted. The self-supervised graph attention learning is used to predict internode connectivity, and the attention weight is optimized using edge existence probability prediction tasks to enhance the extraction of internode structure information.

Benefits of technology

In the absence of measurement, the real-time topology of the distribution network can be accurately predicted, which improves the accuracy and robustness of topology identification and adapts to dynamically changing distribution network topology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120184946A_ABST
    Figure CN120184946A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power distribution network topology identification, and discloses an active power distribution network topology identification method and a related device. The active power distribution network topology identification method comprises the following steps: obtaining measurement data of an active power distribution network to be subjected to topology identification; performing maximum and minimum normalization processing on the obtained measurement data, and constructing graph data; and based on the constructed graph data, performing identification by using a pre-trained topology identification model to obtain a topology structure of the active power distribution network to be subjected to topology identification. The technical scheme disclosed by the invention specifically relates to an active power distribution network topology identification scheme based on a self-supervised graph attention network and a multi-layer perceptron, which can overcome the limitation of the existing topology identification method, and can accurately predict a corresponding real-time topology structure by using incomplete measurement data under the condition of measurement deficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distribution network topology identification, and particularly relates to an active distribution network topology identification method and related devices. Background Art

[0002] Distribution network topology analysis is the basis for performing state estimation, power flow calculation, grid reconstruction, etc. With the continuous increase in the penetration rate of distributed energy in the power system, the feeder switches of the distribution network operate more frequently, and the network structure of the distribution network also changes continuously. The reliable operation and stable control of the distribution network increasingly depend on monitoring parameters, especially topology information; however, limited by economic, technical, and equipment failure factors, the measurement data in the distribution network is often insufficient to meet the requirements of real-time topology identification. Therefore, it is an urgent problem to realize real-time topology identification of the distribution network in the scenario of missing measurements.

[0003] Currently, the existing topology identification methods are mainly divided into traditional identification methods and deep learning-based identification methods. The traditional identification methods mainly rely on power flow calculation, mainly perform state estimation on different topologies, and select the topology with the most matching state as the reliable topology. It is limited in dealing with the two-way power flow caused by the access of distributed power sources, and it is difficult to meet the requirements of accurate topology identification of the distribution network when dealing with the loop network structure of the distribution network; in addition, the traditional identification methods are limited by the computational complexity and still face challenges in large-scale systems and scenarios that require real-time topology identification. To improve the identification efficiency, the deep learning-based identification methods identify the topology by mining information from the measurement data without establishing a specific mathematical model. However, the existing such methods usually change the collected measurement data into one-dimensional data and predict the corresponding topology category by capturing the overall distribution in the data. Due to the lack of mining of the potential structural features in the input data, overfitting problems are likely to occur, and there is a problem of insufficient generalization ability when facing unknown topologies outside the training set.

[0004] In summary, the existing topology identification methods all need to rely on complete measurement data to ensure the reliability of the topology identification results. When facing sparse, heterogeneous, and noisy measurement data, their effectiveness needs to be further improved. Summary of the Invention

[0005] The purpose of the present invention is to provide an active distribution network topology identification method and related devices to solve one or more of the above technical problems. The technical solution disclosed by the present invention is specifically an active distribution network topology identification solution based on a self-supervised graph attention network and a multi-layer perceptron, which overcomes the limitations of the existing topology identification methods; in the face of the situation of missing measurements, the technical solution of the present invention can accurately predict the corresponding real-time topology structure by using incomplete measurement data.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] In the first aspect of the present invention, a method for identifying the topology of an active distribution network is provided, including the following steps:

[0008] Obtain the measurement data of the active distribution network to be topologically identified; wherein, the measurement data includes the node voltage amplitude, the node injected active power, and the node injected reactive power;

[0009] Perform maximum-minimum normalization processing on the obtained measurement data and construct graph data;

[0010] Based on the constructed graph data, use a pre-trained topology recognition model to perform identification and obtain the topology structure of the active distribution network to be topologically identified;

[0011] Among them, the topology recognition model includes:

[0012] A self-supervised graph attention network unit, which is used to calculate the correlation between nodes through an attention mechanism according to the graph data, aggregate neighbor information to update node features, and obtain a node feature matrix after graph representation learning update; wherein, the attention mechanism includes a self-supervised graph attention mechanism based on spatial dependence and a hybrid attention mechanism combining structural prior and dot-product attention, and optimizes the attention weight by using an edge existence probability prediction task;

[0013] A multi-layer perceptron unit, which is used to obtain an edge feature matrix according to the node feature matrix after graph representation learning update, and perform binary classification of the edge state to obtain the topology structure as the topology recognition result.

[0014] The further improvement of the technical solution of the present invention lies in that

[0015] The self-supervised graph attention mechanism based on spatial dependence is expressed as:

[0016]

[0017] In the formula, represents the scaled attention score; is the dot-product attention score between node i and node j; F represents the feature dimension; is the attention weight, representing the normalized importance of node i to node j; σ(·) is the activation function, which is used to normalize the attention score into a probability distribution;

[0018] The hybrid attention mechanism is expressed as:

[0019]

[0020] In the formula, represents the hybrid attention score; denotes the attention score calculated based on the prior graph structure; denotes the normalization result of the dot-product attention score; denotes the attention weight.

[0021] A further improvement of the technical solution of the present invention lies in that in the step of optimizing the attention weight by using the edge existence probability prediction task, is introduced as the input of the Sigmoid activation function σ to infer the probability of the existence of an edge between node i and node j The expression is:

[0022]

[0023] In the formula, denotes the probability of the existence of an edge from node j to i; σ(·) is the Sigmoid activation function, which is used to map the output of to [0, 1]; denotes the mapping function, which inputs the feature vectors of two nodes and outputs a scalar value representing the unnormalized edge existence probability; W is a learnable weight matrix for linearly transforming node features; h i and h j are the input feature vectors of node i and node j respectively.

[0024] A further improvement of the technical solution of the present invention lies in that in the step of aggregating neighbor information to update node features, the expression for updating node features is:

[0025]

[0026] In the formula, denotes the output feature of node i at the l + 1 layer; ρ(·) is a non-linear activation function; N i is the set of neighbor nodes of node i; is the normalized attention coefficient; denotes the input feature of j at the l layer; W l+1 denotes the learnable weight matrix at the l + 1 layer.

[0027] A further improvement of the technical solution of the present invention lies in that the training step of the topology recognition model includes:

[0028] Obtain measurement data samples, perform maximum-minimum normalization processing and construct graph data samples;

[0029] Based on the constructed graph data samples, establish a self-supervised graph attention network applicable to topology identification to learn the mapping relationship between measurement features and topology; calculate the loss function of the model, perform backpropagation and update the parameters, and obtain a trained topology recognition model after reaching the preset convergence condition;

[0030] Among them, the expression of the loss function L is as follows:

[0031]

[0032] In the formula, λ is a balanced hyperparameter; is the self-supervised learning loss of graph representation learning; L edge is the loss of the downstream classification task.

[0033] In the second aspect of the present invention, an active distribution network topology identification system is provided, including:

[0034] A data acquisition module for acquiring measurement data of the active distribution network to be topologically identified; among them, the measurement data includes node voltage amplitude, node injected active power, and node injected reactive power;

[0035] A data processing module for performing maximum-minimum normalization processing on the acquired measurement data and constructing graph data;

[0036] An identification and recognition module for performing identification and recognition on the basis of the constructed graph data by using a pre-trained topology recognition model to obtain the topology structure of the active distribution network to be topologically identified;

[0037] Among them, the topology recognition model includes:

[0038] A self-supervised graph attention network unit for calculating the correlation between nodes through an attention mechanism according to the graph data, aggregating neighbor information to update node features, and obtaining a node feature matrix after graph representation learning update; among them, the attention mechanism includes a self-supervised graph attention mechanism based on spatial dependence and a hybrid attention mechanism combining structural prior and dot-product attention, and optimizing the attention weight by using an edge existence probability prediction task;

[0039] A multi-layer perceptron unit for obtaining an edge feature matrix according to the node feature matrix after graph representation learning update and performing binary classification of the edge state to obtain a topology structure as the topology recognition result.

[0040] A further improvement of the technical solution of the present invention lies in,

[0041] The self-supervised graph attention mechanism based on spatial dependence is expressed as:

[0042]

[0043] In the formula, represents the scaled attention score; is the dot-product attention score between node i and node j; F represents the feature dimension; $\alpha_{ij}$ is the attention weight, representing the normalized importance of node $i$ to node $j$; $\sigma(\cdot)$ is the activation function, used to normalize the attention score into a probability distribution;

[0044] The hybrid attention mechanism is expressed as:

[0045]

[0046] In the formula, $\widetilde{\alpha}_{ij}$ represents the hybrid attention score; $\alpha_{ij}^p$ represents the attention score calculated based on the prior graph structure; $\alpha_{ij}^d$ represents the normalization result of the dot - product attention score; $\alpha_{ij}$ represents the attention weight.

[0047] In a further improvement of the technical solution of the present invention, in the step of optimizing the attention weight by using the edge existence probability prediction task, $\frac{W^T[h_j||h_i]}{\sqrt{d}}$ is introduced as the input of the Sigmoid activation function $\sigma$ to infer the probability of the existence of an edge between node $i$ and node $j$ The expression is:

[0048]

[0049] In the formula, $P_{ji}$ represents the probability of the existence of an edge from node $j$ to $i$; $\sigma(\cdot)$ is the Sigmoid activation function, used to map the output of $\frac{W^T[h_j||h_i]}{\sqrt{d}}$ to $[0, 1]$; $f(·)$ represents the mapping function, which takes the feature vectors of two nodes as input and outputs a scalar value representing the unnormalized edge existence probability; $W$ is a learnable weight matrix for linearly transforming node features; $h$ i and $h$ j $h_i$ and $h_j$ are the input feature vectors of node $i$ and node $j$ respectively.

[0050] In a further improvement of the technical solution of the present invention, in the step of aggregating neighbor information to update node features, the expression for updating node features is:

[0051]

[0052] In the formula, $h_i^{l + 1}$ represents the output feature of node $i$ at the $l + 1$ - th layer; $\rho(·)$ is a non - linear activation function; $N$ i $N_i$ is the set of neighbor nodes of node $i$; $\widetilde{\alpha}_{ij}^l$ is the normalized attention coefficient; $h_j^l$ represents the input feature of $j$ at the $l$ - th layer; $W$ l+1 $W^{l+1}$ represents the learnable weight matrix at the $l + 1$ - th layer.

[0053] A further improvement of the technical solution of the present invention lies in that the training steps of the topology recognition model include:

[0054] Obtain measurement data samples, perform maximum-minimum normalization processing and construct graph data samples;

[0055] Based on the constructed graph data samples, establish a self-supervised graph attention network suitable for topology identification to learn the mapping relationship between measurement features and topology; calculate the loss function of the model, perform backpropagation and update the parameters. After reaching the preset convergence condition, obtain the trained topology recognition model;

[0056] Among them, the expression of the loss function L is:

[0057]

[0058] In the formula, λ is a balance hyperparameter; is the self-supervised learning loss of graph representation learning; L edge is the loss of the downstream classification task.

[0059] In the third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the active distribution network topology identification method according to any one of the first aspects of the present invention.

[0060] In the fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the active distribution network topology identification method according to any one of the first aspects of the present invention.

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

[0062] In view of the existing difficulties and the deficiencies of existing identification methods, in order to address the challenge of topology identification caused by missing measurement data in the distribution system, the present invention discloses an active distribution network topology identification method based on a self-supervised graph attention network and a multi-layer perceptron (SuperGAT-MLP), which overcomes the limitations of existing traditional methods. It predicts the connectivity between nodes through self-supervised graph attention learning to achieve topology identification. In an environment where the topology category of the distribution network is unknown and dynamically changing, by using the existing state information to predict the existence of edges between any two nodes as self-supervised information to guide attention, the extraction of the internal structure information between nodes is strengthened, making it more adaptable to the calculation and learning of noisy graphs with missing measurements. When facing missing measurements, incomplete measurement data is input, and the corresponding real-time topology structure can be accurately predicted. Summarily, the present invention focuses on multiple types of measurement data, uses a self-supervised graph attention network (SuperGAT) to integrate and learn multiple types of measurement data, and combines an MLP network to construct a topology recognition model based on the network switch state. The present invention uses the existing state information to predict the existence of edges between any two nodes, and uses this prediction result as self-supervised information to guide the update and calculation of features, enhancing the topology identification performance of the model for dynamic distribution networks with missing measurements and variable topologies, and making up for the problem of the accuracy decline of traditional artificial intelligence methods when facing sparse distribution network measurement data. Description of the Drawings

[0063] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art; obviously, the drawings in the following description are some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0064] Figure 1 It is a schematic flowchart of an active distribution network topology identification method in an embodiment of the present invention;

[0065] Figure 2 It is a schematic diagram of the attention mechanism in an embodiment of the present invention;

[0066] Figure 3 It is a schematic diagram of the effect comparison in an embodiment of the present invention;

[0067] Figure 4 It is a schematic diagram of an active distribution network topology identification system in an embodiment of the present invention. Detailed Embodiments

[0068] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the accompanying drawings in the embodiments of the present invention; obviously, the described embodiments of the technical solutions are part of the embodiments of the present invention, rather than all of the embodiments.

[0069] Based on the technical solutions disclosed in the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0070] Please refer to Figure 1 , a method for identifying the topology of an active distribution network provided by an embodiment of the present invention includes the following steps:

[0071] Step 1: Obtain the measurement data of the active distribution network to be topologically identified; wherein, the measurement data includes the node voltage amplitude, the node injected active power, and the node injected reactive power.

[0072] Step 2: Perform maximum-minimum normalization processing on the obtained measurement data and construct graph data.

[0073] Step 3: Based on the constructed graph data, use a pre-trained topology recognition model for identification to obtain the topology structure of the active distribution network to be topologically identified.

[0074] Among them, the topology recognition model includes:

[0075] A self-supervised graph attention network unit, which is used to calculate the correlation between nodes through an attention mechanism according to the graph data, aggregate neighbor information to update node features, and obtain the node feature matrix after graph representation learning update; wherein, the attention mechanism includes a self-supervised graph attention mechanism based on spatial dependence and a hybrid attention mechanism combining structural priors and dot-product attention, and optimizes the attention weights using an edge existence probability prediction task.

[0076] A multi-layer perceptron unit, which is used to obtain the edge feature matrix according to the node feature matrix after graph representation learning update, and perform binary classification of the edge states to obtain the topology structure as the topology recognition result.

[0077] The lack of measurement data may cause traditional topology identification methods to fail to accurately obtain the system structure information, thus affecting the operation efficiency and reliability of the power grid. In the technical solution of the embodiment of the present invention, the measurement data of the active distribution network to be topologically identified is obtained, including the node voltage amplitude, the node injected active power, and the node injected reactive power. These data are the basis for subsequent topology identification and provide the original input information for the model; the obtained measurement data is subjected to maximum-minimum normalization processing, which can unify data with different dimensions and ranges into the same interval, helping to improve the training efficiency and stability of the model and avoiding the decline of model performance caused by data scale differences; in the distribution system, nodes can represent different devices or nodes, and edges represent the connection relationships between nodes. By constructing graph data, the topological structure information of the system can be better represented, providing a suitable data format for subsequent graph neural network processing. Most importantly, the present invention adopts a self-supervised graph attention mechanism based on spatial dependence and a hybrid attention mechanism combining structural prior and dot product attention. The self-supervised graph attention mechanism based on spatial dependence can automatically learn the spatial correlation between nodes, while the hybrid attention mechanism combining structural prior and dot product attention can make full use of the structural prior knowledge of the system to improve the accuracy of attention calculation; in the self-supervised graph attention network, the attention weights are optimized through the edge existence probability prediction task. The edge existence probability prediction task can be regarded as an auxiliary task, which can guide the model to learn more effective attention weights, thereby improving the accuracy of topology identification.

[0078] In summary, the hybrid attention mechanism adopted by the self-supervised graph attention network unit can calculate the correlation between nodes more accurately, aggregate neighbor information, and thus update a more accurate node feature matrix. This enables the model to better capture the topological structure information of the distribution system and improve the accuracy of topology identification. Using the edge existence probability prediction task to optimize the attention weights provides more effective guidance for the attention mechanism. This optimization can further improve the model's ability to identify the topological structure and reduce the errors caused by the lack of measurement data. The self-supervised graph attention network unit is trained through self-supervised learning tasks and does not require a large amount of labeled data. This enables the model to still use unlabeled data for learning in the case of missing measurement data, improving the robustness and generalization ability of the model. In conclusion, the technical solution of the embodiment of the present invention solves the challenge of the lack of measurement data for topology identification in the distribution system through core means such as data acquisition and preprocessing, and topology identification model design, improves the accuracy of topology identification, enhances the robustness of the model, and can provide strong support for the safe and stable operation of the distribution system.

[0079] Please refer to Figure 1 and Figure 2, embodiments of the present invention provide a method for identifying the topology of an active distribution network based on a self-supervised graph attention network and a multi-layer perceptron to overcome the limitations of existing traditional methods. The technical solutions provided by the embodiments of the present invention predict the connectivity between nodes through self-supervised graph attention learning, thereby realizing topology identification. In the face of missing measurements, incomplete measurement data can be input to accurately predict the corresponding real-time topology structure.

[0080] The method for identifying the topology of the active distribution network in the embodiments of the present invention specifically includes the following steps:

[0081] Step (1), measurement data acquisition, including: in an actual distribution network, usually due to the relatively large structure and the high price of synchronized phasor measurement devices, the relevant measurement devices are limited; the present invention selects the node voltage amplitude that is relatively easy to obtain and has a high contribution to the identification of the distribution network topology structure as the feature category. In the model construction stage, the present invention uses pandapower to perform power flow calculations for different load levels and topology structures, so as to obtain the node voltage amplitude, node injection power under different conditions and noise conditions, and the corresponding distribution network topology edge connection status to form the node feature vector F and the label.

[0082] Step (2), measurement data processing, including: in a distribution network, the edge connection status determines the power flow direction and the distribution of node voltage amplitudes in the distribution network; however, for similar topology structures, the difference in the distribution of node voltage amplitudes is not obvious and the voltage amplitudes of each node are close to the rated voltage. If the original node voltage amplitude measurement data is directly used for model training, it is easy to affect the topology identification effect. Exemplarily, the embodiments of the present invention perform maximum-minimum normalization processing on the node voltage amplitude measurement data of each node in the distribution network to increase the feature difference, and the calculation method is as follows:

[0083]

[0084] In the formula, is the normalized voltage amplitude feature of node i, i ∈ [1, n]; n is the number of nodes in the distribution network; v i is the voltage amplitude feature of node i before normalization; F is the node voltage amplitude feature vector of each node in a single time section of the active distribution network, F = {v0, v1,..., v n}; min(F) is the minimum value in F; max(F) is the maximum value in F.

[0085] Step (3), graph data construction, including: based on the measured data of the distribution network and the corresponding topological structure collected in step (1), constructing a graph data G=(V, E, A) suitable for topological identification of the distribution network, where V represents the number of nodes in the distribution network, E represents the electrical connection status between nodes, and A represents the adjacency matrix of the graph; further, representing the simulated measured data as the embedding features X∈R n×m , where n is the number of nodes in the distribution network and m is the number of attributes, expressed as the initial feature matrix X=[x1, x2,..., x i ,..., x n , where x i is the initial attribute information vector of node i, x i =[x 1i , x 2i ,..., x ji ,..., x ,i , and this vector is composed of m initial attributes; in a specific exemplary preferred technical solution, the dimension m of the node feature vector is 3, including the node voltage amplitude, the active power injected at the node, and the reactive power injected at the node; the target data (i.e., topology) is represented as a one-dimensional binary label vector Y=[c1, c2,..., c z , where c i =1 indicates that the line is closed, otherwise it is open, and z is the total number of potential lines.

[0086] Step (4), construction of the SuperGAT graph attention network, including: based on the constructed graph data, establishing a self-supervised graph attention network suitable for topological identification to learn the mapping relationship between measurement features and topology, that is In a specific exemplary technical solution, the steps of establishing the mapping relationship include: the attention mechanism is enhanced by introducing factors such as GO (global optimization), DP (dynamic programming), MX (hybrid attention), and SD (spatial dependence). These improvements aim to improve the calculation and application of attention, make the model more efficient, and be able to handle more complex graph structures. Specifically exemplarily, as Figure 2 shown, Figure 2 shows the attention mechanism of SuperGATs: GO, DP, MX, and SD; the blue circles (e ij ) represent the unnormalized attention before softmax, while the red diamonds represent the probability of the edge between node i and node j. The attention mechanism of the original GAT ( etc., 2018) is located within the dashed rectangle.

[0087] For the graph G=(V, E), the graph attention layer receives a set of features H l ={h1 l ,…, h Nl}, where h i l ∈R Fl is used as the input, F l is the number of features in the l-th layer, and generates the output feature H l+1 ={h1 l+1 ,…,h N l+1}. To calculate h i l+1 , the model multiplies the weight matrix W l+1 ∈R Fl+1×Fl with H l , uses the attention coefficient α ij l+1 to linearly combine the features of the first-order neighbors (including itself) j ∈ Ni ∪ {i} of node i, and finally applies the non-linear activation function ρ.

[0088]

[0089] Among them, the attention coefficient α ij l+1 can be obtained by applying softmax regularization to e ij l+1 , and the formula is:

[0090] α ij l+1 = softmax j (LReLU(e ij l+1 ));

[0091] Among them, e ij l+1 = a e (W l+1 h i l , W l+1 h j l ), a e is a mapping function in the form of R Fl+1 ×R Fl+1 →R, and uses the Leaky ReLU activation function.

[0092] In two widely used attention mechanisms, the original GAT (GO) calculates the coefficient through a single-layer feed-forward network parameterized by a l+1 ∈R 2Fl+1 ; the other is the dot product (DP) attention, inspired by previous work on node representation learning, which uses the same mathematical expression for link prediction (Tang et al., 2015; Kipf & Welling, 2016):

[0093]

[0094] Here, the GATs using GO and DP are respectively called GATGO and GATDP.

[0095] The technical solution of the embodiment of the present invention proposes SuperGAT-MLP. Its idea is to guide attention through the presence or absence of edges between node pairs, and use the link prediction task to self-supervise attention through edge labels (if there is an edge between node pairs, the label is 1, otherwise it is 0). In the preferred solution of the embodiment of the present invention, is introduced as the input of the Sigmoid activation function σ for inferring the probability of the existence of an edge between node i and node j

[0096]

[0097] In the formula, represents a mapping function that takes the feature vectors of two nodes (with dimension FF) as input and outputs a scalar value representing the unnormalized edge existence probability; the vector space of node features, with dimension F; W is a learnable weight matrix for linearly transforming node features; h i and h j are respectively the input feature vectors of node i and node j; σ(·) is the Sigmoid activation function that maps the output of to [0, 1], representing the probability of edge existence; represents the probability of the existence of an edge from node j to i.

[0098] The present invention proposes four types (GO, DP, SD, MX) of SuperGAT based on GO and DP attention. For its form is the same as a e in GATGO and GATDP, so the present invention names them SuperGATGO and SuperGATDP respectively. For more advanced versions, the present invention describes SuperGATSD (Scaled Dot-product) and SuperGATMX (Mixed GO and DP) through the unnormalized attention e ij and the probability of edge existence .

[0099] SuperGAT-SD is:

[0100]

[0101] In the formula, is the original attention score between node i and node j (Dot-Product attention), calculated by the dot product of the query vector and the key vector; F represents the dimension of the feature, which is used to stabilize the gradient, similar to the scaling operation in Transformer; represents the scaled attention score, obtained by dividing the original score by ; σ(·) is the activation function, which is used to normalize the attention score into a probability distribution; is the final attention weight, representing the normalized importance of node i to node j; SuperGAT-SD divides the dot product of the nodes by the square root of the dimension, like Transformer (Vaswani et al., 2017), which prevents some larger values from dominating the entire attention after softmax.

[0102] SuperGAT-MX is:

[0103]

[0104] In the formula, is the attention score calculated based on the prior graph structure. In the distribution network, the prior graph structure is a fully connected hypothesis graph with all switches assumed to be closed by default; is the dot product attention score of nodes i and j (the same as SuperGAT-SD); represents the normalization result of the dot product score, which is used for weighted adjustment represents the mixed attention score, which combines the structural prior and the dot product attention represents the final attention weight, directly using the normalized dot product score Since the DP attention with Sigmoid represents the probability of the edge, it can softly remove those neighbors that are not likely to be connected, while implicitly giving importance to the remaining nodes.

[0105] In the embodiments of the present invention, during training, the training samples are composed of a set of edges E and its complement E c =(V×V)\E. However, if the number of nodes is large, using all possible negative samples in E c is not efficient; therefore, the technical solution of the present invention uses the negative sampling method. Negative sampling randomly selects a total of p c ·|E| negative samples E n from E - , where the negative sampling ratio is a hyperparameter. SuperGAT can model sparse graphs, and usually this will not be a problem when the number of negative samples is large enough (i.e., |V×V|)|E|), because most real-world graphs are sparse.

[0106] In terms of the optimization objective, we define the optimization objective of the l-th layer as the binary cross-entropy loss Its formula is:

[0107]

[0108] where 1(j,i)=1 indicates that there is an edge between node j and node i, while 1(j,i)=0 indicates that there is no edge between them; the objective of the loss function is to minimize the logarithmic loss of the probability of the actually existing edge and maximize the logarithmic loss in the case of no edge so as to optimize the model's prediction of the existence of edges.

[0109] Step (5), classifier construction, includes: through the graph representation learning in step (4), the model fully learns the actual topological structure in the measurement data, combines the initial graph adjacency matrix A, and uses the updated node features after graph representation learning to calculate the features of the edges in the graph and form the edge feature matrix where t = 9 represents the feature dimension of each edge, which is formed by concatenating the features of the head and tail nodes connected by the edge and the difference between the head and tail node features. To obtain the open / closed state of each line in the topology, a classifier based on a multi-layer perceptron (MLP) network is constructed to realize binary classification of the switch state, which is shown as follows:

[0110]

[0111] where σ represents the activation function, and here the Sigmoid function is used as the activation function to generate a probability value between (0,1); represents the probability value of the predicted state of each line. By setting a decision threshold, when the probability value of a certain line is greater than the threshold, it is determined as 1, representing that the line is in the closed state, so as to realize the global recognition of the topology.

[0112] Step (6) loss function design, includes: the topology identification task essentially belongs to the binary classification problem of edge states, so the cross-entropy loss is used to calculate the loss between the predicted value and the target data Y, which is expressed as:

[0113]

[0114] It should be noted that in the graph representation learning process of the topology identification process, since a self-supervised method is adopted to guide the attention to generate a more accurate measurement representation, the self-supervised loss in step (5) needs to be added to jointly train the model during model training, and the total loss is expressed as:

[0115]

[0116] where α is a trainable weighted parameter of the loss, which is dynamically adjusted during model training to optimize the overall model.

[0117] Step (7) Model training and online application, including: Based on the established graph data and the constructed topology identification model, using the loss function designed in step (6), setting the number of training epochs to 100, where the Adam optimizer is used to perform backpropagation optimization on the parameters of the proposed model until the training epochs reach 100, then stop training and save the current model weight parameters. In addition, in the model testing stage, load the optimal model parameters, input the current distribution network measurement data, and the real-time topology structure can be output to achieve topology identification.

[0118] In the specific exemplary technical solution of the embodiment of the present invention, the training steps of the topology recognition model include:

[0119] (1) Obtain measurement data samples and construct graph data;

[0120] (2) Based on the constructed graph data, establish a self-supervised graph attention network suitable for topology identification to learn the mapping relationship between measurement features and topology; taking SuperGAT-MX as an example, first perform node feature projection for each layer of graph representation learning Then calculate the attention score And normalize to get Adopt a hybrid attention mode, then combine the structural prior Obtain Then aggregate neighbor information and update node features And use the proposed independent module to calculate the existence probability of edges

[0121] (3) Calculate the loss function of the model; Binary cross-entropy loss measures the edge prediction accuracy:

[0122]

[0123] where 1(j,i)=1 means there is an edge between node j and node i, while 1(j,i)=0 means there is no edge between them; the objective of the loss function is to minimize the logarithmic loss of the probability of the actually existing edge and maximize the case where there is no edge The logarithmic loss is used to optimize the model's prediction of the existence of edges;

[0124] The downstream task is the edge classification task, and the loss function is calculated as Finally, the total loss is obtained by combining the self-supervised learning loss of graph representation learning and the downstream task loss where λ is the balancing hyperparameter.

[0125] (4) Backpropagation and parameter update; The Adam optimizer is used to calculate the gradients of the loss with respect to the weight W l , the parameters a of the attention function e , the edge probability , etc., to obtain θ is the trainable parameter and η is the learning rate.

[0126] (5) Iterative training and validation of the model; The performance of the model is evaluated using the loss of the validation set. After meeting the accuracy requirements, the training is stopped and the model is saved.

[0127] (6) Loading and online application of the model; The saved model parameters are loaded, and the measured node data collected is input into the model to obtain the topological structure.

[0128] Please refer to Figure 3 , to verify the superiority of the technical solution of the present invention, it is compared with the traditional deep learning-based CNN algorithm. The identification effect is as Figure 3 shown. It can be clearly seen that when the measurement missing ratio is relatively low, both have good identification effects. However, when the missing ratio exceeds 30%, the identification accuracy of the CNN model begins to decrease significantly. While for the SuperGAT model proposed in the present invention, when the missing ratio increases, it can still maintain a high identification accuracy. This is because the graph deep learning algorithm can fully utilize the transmission and update mechanism of local information between nodes, thereby enhancing the ability to extract local features and global structures of the graph. In addition, using self-supervised information to guide attention enhances the interaction between nodes and edges. In the case of missing measurements, the information of each node is retained according to the weight assignment value, which can automatically reduce the influence of non-adjacent nodes and nodes with incomplete information on feature update, enabling it to adaptively adjust the adjacency matrix to adapt to the dynamic changes of the distribution network topology, thus improving the topology identification effect. Compared with the traditional CNN algorithm that directly fits the overall distribution of measurements and the mapping relationship between the output topologies, it is more accurate in identifying known and unknown topologies.

[0129] The following is the device embodiment of the present invention, which can be used to execute the method embodiment of the present invention. For details not disclosed in the device embodiment, please refer to the method embodiment of the present invention.

[0130] Please refer toFigure 4 , in the embodiments of the present invention, an active distribution network topology identification system is provided, including:

[0131] A data acquisition module, configured to acquire measurement data of the active distribution network to be topologically identified; wherein, the measurement data includes node voltage amplitude, node injected active power, and node injected reactive power;

[0132] A data processing module, configured to perform maximum-minimum normalization processing on the acquired measurement data and construct graph data;

[0133] An identification module, configured to perform identification based on the constructed graph data by using a pre-trained topology identification model, and obtain the topology structure of the active distribution network to be topologically identified;

[0134] wherein, the topology identification model includes:

[0135] A self-supervised graph attention network unit, configured to calculate the correlation between nodes through an attention mechanism according to the graph data, aggregate neighbor information to update node features, and obtain a node feature matrix after graph representation learning update; wherein, the attention mechanism includes a self-supervised graph attention mechanism based on spatial dependence and a hybrid attention mechanism combining structural prior and dot-product attention, and optimizes the attention weights by using an edge existence probability prediction task;

[0136] A multi-layer perceptron unit, configured to obtain an edge feature matrix according to the node feature matrix after graph representation learning update, and perform binary classification of the edge state to obtain the topology structure as the topology identification result.

[0137] In an embodiment of the present invention, a computer device is provided. The computer device includes a processor and a memory. The memory is used to store a computer program, and the computer program includes program instructions. The processor is used to execute the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function. The processor described in the embodiment of the present invention can be used to execute the operations of the active distribution network topology identification method.

[0138] In an embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space that stores the operating system of the terminal. And in this storage space, one or more instructions suitable for being loaded and executed by the processor are also stored. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed Random Access Memory (RAM) or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the active distribution network topology identification method in the above embodiments.

[0139] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) that contain computer-usable program code.

[0140] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0141] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: still can modify the specific implementation manners of the present invention or make equivalent replacements, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A method for identifying active distribution network topology, characterized in that: The following steps are involved: Acquire measurement data of the active distribution network to be topologically identified; wherein the measurement data includes node voltage amplitude, node injected active power and node injected reactive power; Perform maximum and minimum normalization processing on the acquired measurement data and construct graph data; Based on the constructed graph data, the pre-trained topology recognition model is used to perform recognition and identification, and the topological structure of the active distribution network to be topologically identified is obtained; Wherein, the topology recognition model includes: A self-supervised graph attention network unit is used to calculate the correlation between nodes through the attention mechanism according to the graph data, aggregate the neighbor information to update the node features, and obtain the node feature matrix after the graph representation learning update; wherein, the attention mechanism includes a self-supervised graph attention mechanism based on spatial dependency and a hybrid attention mechanism combining structural prior and dot product attention, and optimizes the attention weight by using the edge existence probability prediction task; The multi-layer perceptron unit is used to obtain the edge feature matrix based on the updated node feature matrix learned by the graph representation, and to perform binary classification of the edge state to obtain the topological structure as the topological recognition result.

2. The method for identifying the topology of an active distribution network according to claim 1, characterized in that: The self-supervised graph attention mechanism based on spatial dependency is expressed as: In the formula, represents the scaled attention score; is the dot product attention score between node i and node j; F represents the feature dimension; is the attention weight, which represents the normalized importance of node i to node j; σ(·) is the activation function, which is used to normalize the attention score into a probability distribution; The hybrid attention mechanism is expressed as: In the formula, represents the mixed attention score; represents the attention score calculated based on the prior graph structure; Represents the normalized result of the dot product attention score; represents the attention weight.

3. The method for identifying the topology of an active power distribution network according to claim 1, characterized in that: In the step of optimizing the attention weight using the edge existence probability prediction task, we introduce As the input of the Sigmoid activation function σ, it is used to infer the probability that there is an edge between node i and node j. The expression is: In the formula, represents the probability that there is an edge from node j to i; σ(·) is the Sigmoid activation function, which is used to convert The output of is mapped to [0,1]; represents a mapping function, which inputs the feature vectors of two nodes and outputs a scalar value representing the unnormalized edge existence probability; W is a learnable weight matrix used to linearly transform node features; h i and h j are the input feature vectors of node i and node j respectively.

4. The method for identifying the topology of an active distribution network according to claim 1, characterized in that: In the step of aggregating neighbor information to update node features, the expression for updating node features is: In the formula, Represents the output feature of node i at layer l+1; ρ(·) is a nonlinear activation function; N i is the set of neighbor nodes of node i; is the normalized attention coefficient; represents the input feature of j at layer l; W l+1 represents the learnable weight matrix of the l+1th layer.

5. The method for identifying the topology of an active distribution network according to claim 1, characterized in that: The training steps of the topology recognition model include: Obtain measurement data samples, perform maximum and minimum normalization processing, and construct graph data samples; Based on the constructed graph data samples, a self-supervised graph attention network suitable for topology recognition is established to learn the mapping relationship between measurement features and topology; the loss function of the model is calculated, back-propagated and the parameters are updated, and after reaching the preset convergence conditions, a trained topology recognition model is obtained; Among them, the expression of the loss function L is: Where λ is the balance hyperparameter; is the self-supervised learning loss for graph representation learning; L edge is the loss for the downstream classification task.

6. An active distribution network topology identification system, characterized in that: include: A data acquisition module is used to acquire measurement data of the active distribution network to be topologically identified; wherein the measurement data includes node voltage amplitude, node injected active power and node injected reactive power; The data processing module is used to perform maximum and minimum normalization processing on the acquired measurement data and construct graph data; An identification module is used to perform identification based on the constructed graph data using a pre-trained topology identification model to obtain the topological structure of the active distribution network to be topologically identified; Wherein, the topology recognition model includes: A self-supervised graph attention network unit is used to calculate the correlation between nodes through the attention mechanism according to the graph data, aggregate the neighbor information to update the node features, and obtain the node feature matrix after the graph representation learning update; wherein, the attention mechanism includes a self-supervised graph attention mechanism based on spatial dependency and a hybrid attention mechanism combining structural prior and dot product attention, and optimizes the attention weight by using the edge existence probability prediction task; The multi-layer perceptron unit is used to obtain the edge feature matrix based on the updated node feature matrix learned by the graph representation, and to perform binary classification of the edge state to obtain the topological structure as the topological recognition result.

7. The active distribution network topology identification system according to claim 6, characterized in that: The self-supervised graph attention mechanism based on spatial dependency is expressed as: In the formula, represents the scaled attention score; is the dot product attention score between node i and node j; F represents the feature dimension; is the attention weight, which represents the normalized importance of node i to node j; σ(·) is the activation function, which is used to normalize the attention score into a probability distribution; The hybrid attention mechanism is expressed as: In the formula, represents the mixed attention score; represents the attention score calculated based on the prior graph structure; Represents the normalized result of the dot product attention score; represents the attention weight.

8. The active distribution network topology identification system according to claim 6, characterized in that: In the step of optimizing the attention weight using the edge existence probability prediction task, we introduce As the input of the Sigmoid activation function σ, it is used to infer the probability that there is an edge between node i and node j. The expression is: In the formula, represents the probability that there is an edge from node j to i; σ(·) is the Sigmoid activation function, which is used to convert The output of is mapped to [0,1]; represents a mapping function, which inputs the feature vectors of two nodes and outputs a scalar value representing the unnormalized edge existence probability; W is a learnable weight matrix used to linearly transform node features; h i and h j are the input feature vectors of node i and node j respectively.

9. The active power distribution network topology identification system according to claim 6, characterized in that: In the step of aggregating neighbor information to update node features, the expression for updating node features is: In the formula, Represents the output feature of node i at layer l+1; ρ(·) is a nonlinear activation function; N i is the set of neighbor nodes of node i; is the normalized attention coefficient; represents the input features of j at layer l; W l+1 represents the learnable weight matrix of the l+1th layer.

10. The active power distribution network topology identification system according to claim 6, characterized in that: The training steps of the topology recognition model include: Obtain measurement data samples, perform maximum and minimum normalization processing, and construct graph data samples; Based on the constructed graph data samples, a self-supervised graph attention network suitable for topology recognition is established to learn the mapping relationship between measurement features and topology; the loss function of the model is calculated, back-propagated and the parameters are updated, and after reaching the preset convergence conditions, a trained topology recognition model is obtained; Among them, the expression of the loss function L is: Where λ is the balance hyperparameter; is the self-supervised learning loss for graph representation learning; L edge is the loss for the downstream classification task.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the active power distribution network topology identification method according to any one of claims 1 to 5 is implemented.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the active power distribution network topology identification method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • GNN-based G3-PLC communication topology reduction power distribution network physical topology method

    CN120724635A