Power distribution network topological structure identification method based on Bayesian double aggregation graph neural network

Through the Bayesian dual-aggregated graph neural network, combined with global and local feature extraction and Bayesian neural network parameter quantization, the problem of insufficient robustness in the distribution network topology recognition is solved, and efficient and accurate real-time identification of the distribution network topology structure is achieved, which improves the intelligence level and operation efficiency of the distribution network.

CN120336757APending Publication Date: 2025-07-18CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510447172.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Traditional distribution network topology identification methods are difficult to deal with dynamic changes in line switching states, equipment failures and load changes in real time and accurately, resulting in insufficient robustness and inability to effectively deal with unknown topology changes, affecting the intelligence level and operating efficiency of the distribution network.

Method used

Bayesian dual-aggregated graph neural network (BDGNN) is used to extract global features through graph convolution networks, and local features are extracted through dynamic graph edge convolutions, and parameter quantization is performed in combination with Bayesian neural networks. Cross entropy loss and BNN regular terms are used to achieve real-time identification of distribution network topology structure.

Benefits of technology

Real-time and accurate topological structure identification is realized by relying solely on node voltage data of a single time section, reducing the complexity of data acquisition, improving the robustness and generalization ability under data scarcity and measurement noise interference conditions, and ensuring high-precision topological identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336757A_ABST
    Figure CN120336757A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution network topological structure identification method based on a Bayesian double aggregation graph neural network. The method comprises the following steps: abstracting equipment in a power distribution network as nodes, establishing a node set, collecting node voltage data, and forming an input feature vector; constructing a Bayesian double aggregation graph neural network; jointly training a Bayesian double-aggregation graph neural network by adopting cross entropy loss and a BNN regular term; and collecting real-time data to realize real-time identification of the topological structure of the power distribution network. According to the method, the Bayesian double aggregation graph neural network is adopted to accurately identify the topological structure of the power distribution network in real time, and only node voltage data of a single time section is depended on, so that the complexity of data acquisition is greatly reduced; meanwhile, global and local complex feature information among nodes in the power distribution network is effectively captured through a dual aggregation strategy of a global graph convolution network and local dynamic graph edge convolution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distribution networks, and particularly to a method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network. Background Art

[0002] With the large-scale access of distributed power sources and new energy, the topological structure of the distribution network has become increasingly complex and its dynamics have increased significantly. Accurately and quickly grasping the real-time topological structure is an important basis for realizing the safe and stable operation, fault location, and efficient management of the distribution network. However, due to the frequent changes in the topological structure of the distribution network, such as the dynamic opening and closing of line switches, equipment failures, and load changes, traditional topology identification methods based on manual experience or fixed models are difficult to perform topology identification in real time and accurately, restricting the intelligent level and operation efficiency of the distribution network.

[0003] Currently, common topology identification methods mainly include methods based on state estimation, graph theory, and deep learning. Traditional methods usually rely on real-time state sensing information of lines, and have problems such as a large demand for measurement data, insufficient robustness, sensitivity to measurement noise, and inability to effectively handle unknown topological changes; especially in a non-phasor measurement unit (PMU) environment, it is difficult to balance the accuracy and timeliness of topology identification. In addition, with the expansion of the scale and the complexity of the structure of the distribution network, traditional models have obvious deficiencies in capturing global and local topological features, and have weak capabilities in dealing with noise interference and uncertain factors in data.

[0004] In recent years, graph neural networks (GNNs) have received extensive attention in the field of distribution network topology identification because they can effectively mine the relationship between network topological structure information and node features. However, traditional GNN models usually perform node feature aggregation based on a fixed topological structure, ignoring the differences in node features when the topological structure changes dynamically; at the same time, they also lack the ability to quantify the uncertainty of model parameters, making it difficult to effectively cope with measurement errors, noise interference, and unknown topological changes in actual operation, reducing the generalization and robustness of the model. Summary of the Invention

[0005] In order to solve the above technical problems, the present invention provides a method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network with simple algorithm and high identification accuracy.

[0006] The technical solution of the present invention to solve the above technical problems is: A method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network, comprising the following steps:

[0007] Step 1: Construct a distribution network graph model, abstract the devices in the distribution network as nodes, establish a node set, collect node voltage data, and form an input feature vector;

[0008] Step 2: Construct a Bayesian Double Aggregation Graph Neural Network (BDGNN).

[0009] Step 3: Jointly train the Bayesian Double Aggregation Graph Neural Network using cross - entropy loss and the BNN regularization term.

[0010] Step 4: The trained Bayesian Double Aggregation Graph Neural Network collects real - time data to achieve real - time identification of the distribution network topology.

[0011] For the above - mentioned method for identifying the distribution network topology based on the Bayesian Double Aggregation Graph Neural Network, the specific process of Step 1 is as follows:

[0012] Step S11: Construct a distribution network graph model, abstract substations, distribution transformers, and ring main units in the distribution network as nodes in the distribution network graph to form a node set N = {m1, m2, …, m i , …, m n}, where m i represents the i - th node, and n is the total number of nodes.

[0013] Step S12: First, construct a potential adjacency matrix A pot with a size of n×n according to historical topology information and the physical connection possibility between devices. For the i - th node m i and the j - th node m j , if there is a physically connectable line between them, set the element A pot in the i - th row and j - th column of the potential adjacency matrix A pot (i, j) to 1; if there is no physically connectable line between m i and m j , set A pot (i, j) to 0.

[0014] Step S13: Select the node voltage amplitude at a time section as the feature input.

[0015] For the above - mentioned method for identifying the distribution network topology based on the Bayesian Double Aggregation Graph Neural Network, in Step S13, assume that the voltages of n nodes in the whole network are collected at discrete times t = 1, 2, …, T, and the voltage measurement at any time t is represented as a feature vector v(t), where represents the voltage amplitude of the i - th node at time t; when sampling multiple times, store all measurement data in matrix D:

[0016]

[0017] where T is the total number of sampling times, and D ∈ R T×nDenote as a \(T\times n\) - dimensional matrix over the real number field \(\mathbb{R}\), and the \(t\) - th row of matrix \(D\) corresponds to the voltage measurement values of all \(n\) nodes at time \(t\); during model training or topology identification, any row can be selected from \(D\) as the input feature.

[0018] For the above - mentioned method for identifying the topological structure of a distribution network based on a Bayesian double - aggregation graph neural network, the specific steps of step two are as follows:

[0019] S21: Use a graph convolutional network to extract node features globally, and at the same time use dynamic graph edge convolution (EdgeConv) to extract local features to achieve double aggregation;

[0020] S22: Construct a global attention mechanism and a line - state prediction module, and introduce a Bayesian neural network to quantify the model parameters.

[0021] For the above - mentioned method for identifying the topological structure of a distribution network based on a Bayesian double - aggregation graph neural network, the specific process of step S21 is as follows:

[0022] First, for the \(i\) - th input node feature \(\mathbf{x}^{i}\) i , \(\mathbf{x}^{j}\) i \(\in\mathbb{R}^{d}\), where \(\mathbb{R}\) represents the real number field and \(d\) represents the dimension of the node feature; construct a feature matrix \(\mathbf{X}\), \(\mathbf{X}\in\mathbb{R}^{n\times d}\); add \(\mathbf{A}\) d to the identity matrix \(\mathbf{I}\) n×d to get a matrix with self - loops. The diagonal elements of the corresponding degree matrix pot \(\mathbf{D}\) are defined as n denotes the element in the \(i\) - th row and \(j\) - th column of \(\mathbf{D}\); subsequently, adopt the propagation rule of the graph convolutional network (GCN) and use the following formula to globally aggregate the features: \(\mathbf{H}^{l + 1}=\sigma(\mathbf{D}^{-\frac{1}{2}}\mathbf{A}\mathbf{D}^{-\frac{1}{2}}\mathbf{H}^{l}\mathbf{W}^{l})\) where \(\mathbf{H}^{l}\) represents the node - feature representation generated after the output of the \(l\) - th layer,

[0023]

[0024] where \(\mathbf{H}^{l}\) (l+1) represents the node - feature representation generated after the output of the \(l\) - th layer, \(\mathbf{D}^{-\frac{1}{2}}\) represents the negative - half - power of the degree matrix \(\mathbf{D}\), \(L\) represents the total number of layers of the GCN, \(\mathbf{H}^{0}=\mathbf{X}\) is the input - feature matrix, \(\mathbf{W}^{l}\) (0) is the learnable weight matrix of the \(l\) - th layer, and \(\sigma(\cdot)\) represents the activation function; after stacking \(L\) layers, the final feature of node \(m\) (l) is obtained, that is, the global feature \(\mathbf{h}^{m}\) i : gcn,i \(\mathbf{h}^{m}=\sigma(\mathbf{D}^{-\frac{1}{2}}\mathbf{A}\mathbf{D}^{-\frac{1}{2}}\cdots\mathbf{D}^{-\frac{1}{2}}\mathbf{A}\mathbf{D}^{-\frac{1}{2}}\mathbf{X}\mathbf{W})\)

[0025]

[0026] where \(\mathbf{W}\) is the learnable weight matrix, \(\mathbf{W}=\mathbf{W}^{L}\)(0) W (1) …W (L-1) and the symbol [·] i represents taking the i-th row of the matrix as the eigenvector of node m i ;

[0027] Then, taking h gcn,i as x i , the k-nearest neighbor algorithm is used to determine the adaptive neighborhood of node m i ; The edge features between nodes are modeled by a multi-layer perceptron h Θ , where Θ is a set of learnable parameters, and e ij is obtained as follows:

[0028]

[0029] where e ij represents the edge feature between node i and node j, is the perceptron function based on Θ, and the specific implementation form is written as:

[0030] e ijp = σ ReLU (θ p (x i - x j ) + φ p x i )

[0031] where e ijp represents the edge feature obtained between node i and node j by the p-th filter, σ ReLU (·) is the ReLU activation function, θ p and φ p are the learnable parameters of the p-th filter respectively, p = 1, 2,..., P, and P represents the total number of filters;

[0032] Next, to aggregate the edge feature information into the central node feature, an average pooling operation is adopted:

[0033]

[0034] where avg(·) represents taking the mean operation on all edge features in the neighborhood, so as to obtain the local feature h i of node m ec,i .

[0035] In the above method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network, in step S22, the specific process of constructing the global attention mechanism and the line state prediction module is as follows:

[0036] First, the global feature hgcn,i and local feature h ec,i Concatenate them on the feature dimension to form a new node feature representation h con,i :

[0037] h con,i = [h gcn,i || h ec,i

[0038] where the symbol "||" represents vector concatenation;

[0039] Then, adopt the global attention mechanism to construct the global semantic vector g for capturing the macroscopic information of the entire distribution network graph. The calculation formula of g is:

[0040]

[0041] where α i represents the attention coefficient. The calculation formula of α i is

[0042]

[0043] where W att is a learnable weight matrix, d con is the dimension of the new node feature, d att is the attention vector dimension, u is a learnable vector, σ LeakyReLU (·) is an activation function with a negative slope, and u T represents the transpose operation of vector u;

[0044] Next, to construct the edge-level feature, for any two adjacent nodes m i and m j construct the edge feature vector h edge,ij :

[0045] h edge,ij = [h con,i || h con,j || g]

[0046] Fuse the local features of nodes m i and m j and the global semantic vector g together to provide sufficient information for subsequent line state prediction;

[0047] Finally, send h edge,ij into the fully connected layer. After activation by the σ LeakyReLU activation function, then map it through the σ Sigmoid activation function to obtain the prediction confidence of the line closed state ​

[0048]

[0049] where W FC and b FC are the weight matrix and bias of the fully connected layer respectively, d mid is the dimension of the fully connected hidden layer, d edge is the dimension of the edge feature vector, W out and b out are the output layer parameters, σ Sigmoid (·) is the Sigmoid activation function, which is between 0 and 1 and is used to represent the prediction confidence of the predicted line closed state.

[0050] In the above method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network, in step S22, the specific process of introducing a Bayesian neural network to quantify the model parameters is as follows: A prior distribution p(w) is given to the model parameter w, and posterior distribution inference is performed using the matrix D to obtain:

[0051]

[0052] where p(D∣w) is the likelihood function, p(D) is the marginal likelihood, and p(D) = ∫p(D∣w)p(w)dw.

[0053] In the above method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network, in step three, in order to avoid the high-dimensional integration problem, a variational distribution q(w) is introduced to approximate the posterior distribution, and the KL divergence is defined:

[0054]

[0055] The relationship between logp(D) and the KL divergence is expressed using the evidence lower bound ELBO:

[0056] logp(D) = ELBO + KL(q(w)||p(w|D))

[0057] where ELBO is defined as:

[0058]

[0059] where represents the expectation of the random variable w under the distribution q(w);

[0060] In actual calculations, Monte Carlo sampling is used to approximate the expectation:

[0061]

[0062] where w iDenote the i-th instance of the model parameter sampled according to the distribution q(w);

[0063] Finally, use the negative value of the ELBO as the regularization loss L of the BNN BNN :

[0064]

[0065] Thus, the quantification of the uncertainty of the model parameters is completed.

[0066] In the above method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network, in step 3, in the online training stage, first use the cross-entropy loss function to measure the error between the predicted line closing state and the true state. The loss function L CE The expression is

[0067]

[0068] where y ij represents the true state of the line, and y ij ∈ {0, 1};

[0069] Combine L BNN and L CE through the balance coefficient λ to form the overall loss function L:

[0070] L = L CE + λL BNN (17)

[0071] During the offline training process, update the model parameters through backpropagation and gradient descent until the overall loss function reaches the minimum value.

[0072] In the above method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network, in step 4, after training is completed, deploy the trained Bayesian double-aggregation graph neural network BDGNN model in an online real-time system, and use the voltage data of each node in the distribution network collected in real time as input. Calculate the prediction confidence of the closing state of each line through the dual-aggregation feature extraction and line state prediction module, and then according to the preset threshold Perform binarization processing to realize the real-time identification of the topological structure of the distribution network.

[0073] The beneficial effects of the present invention are as follows: The present invention uses the Bayesian double-aggregation graph neural network (BDGNN) to identify the topology of the distribution network in real time and accurately, relying only on the node voltage data of a single time section, thus greatly reducing the complexity of data acquisition. At the same time, through the dual-aggregation strategy of the global graph convolution network and the local dynamic graph edge convolution, the complex feature information between nodes in the distribution network is effectively captured. In addition, the Bayesian neural network is introduced to quantify the uncertainty of model parameters, effectively improving the robustness and generalization ability under the conditions of scarce data and measurement noise interference. Finally, through the joint training of the cross-entropy loss and the BNN regularization term, a high-precision topology identification result is ensured, providing a solid technical support for the safe operation and intelligent regulation of the distribution network. Brief Description of the Drawings

[0074] Figure 1 It is the overall flowchart of the present invention.

[0075] Figure 2 It is the distribution diagram of the initial topology and tie switches.

[0076] Figure 3 It is the identification result diagram of the present invention and other models under different measurement error scenarios.

[0077] Figure 4 It is the comparison diagram of the identification performance of the present invention and other models under unknown topologies. Detailed Embodiment

[0078] The present invention will be further described below with reference to the drawings and embodiments.

[0079] As Figure 1 shown, a method for identifying the topology of a distribution network based on the Bayesian double-aggregation graph neural network includes the following steps:

[0080] Step 1: Construct a distribution network graph model, abstract the equipment in the distribution network as nodes, establish a node set, and collect node voltage data to form an input feature vector.

[0081] The specific process of Step 1 is as follows:

[0082] Step S11: Figure 2 For the distribution diagram of the initial topology and tie switches, construct a distribution network graph model according to the initial topology, abstract the substations, distribution transformers, and ring main units in the distribution network as nodes in the distribution network graph, and form a node set N = {m1, m2,..., m i ,..., m n}, where m i represents the i-th node, and n is the total number of nodes;

[0083] Step S12: First, construct a potential adjacency matrix A according to the historical topology information and the physical connection possibilities between devices. pot , with a size of n×n. For the i-th node m i and the j-th node m j , if there is a physically connectable line between them (i.e., there is a reserved or installed available line in the actual distribution network, and it can be switched on at any time even if it is currently in a disconnected state), then set the element A pot at the i-th row and j-th column in the potential adjacency matrix A pot (i,j) to 1. If there is no physically connectable line between m i and m j (it is impossible to achieve connectivity through this point no matter how it is operated), then set A pot (i,j) to 0, where i≠j, that is, the diagonal elements in A pot are 0; in other words, the value of A pot (i,j) completely depends on whether the node pair (m i ,m j ) has potential physical connectivity. Therefore, the complete A pot is composed of all elements A pot (i,j), used to record all possible lines that can be configured or used, regardless of whether the line is actually closed or disconnected at present. The potential adjacency matrix A pot provides a potential network structure range for subsequent topology identification or line state estimation;

[0084] Step S13: Select the node voltage amplitudes at a time section as the feature input.

[0085] In the step S13, it is assumed that the voltages of n nodes in the whole network are collected at discrete times t = 1, 2, …, T. The voltage measurement at any time t is expressed as the feature vector v(t), where represents the voltage amplitude of the i-th node at time t; when sampling at multiple times, all measurement data are stored in the matrix D:

[0086]

[0087] where T is the total number of sampling times, D∈R T×n represents a T×n-dimensional matrix over the real number field R. The t-th row of the matrix D corresponds to the voltage measurement values of all n nodes at time t; when training the model or identifying the topology, any row can be selected from D as the input feature.

[0088] Step Two: Construct a Bayesian double-aggregation graph neural network BDGNN.

[0089] The specific steps of the second step are as follows:

[0090] S21: Use the graph convolutional network to extract node features globally, and at the same time use the dynamic graph edge convolution EdgeConv to extract local features to achieve double aggregation.

[0091] The specific process of the step S21 is as follows:

[0092] First, for the i-th node feature x of the input i , x i ∈R d , where R represents the real number field and d represents the dimension of the node feature; construct the feature matrix X, X ∈ R n×d ; Add A pot to the identity matrix I n to obtain the matrix with self-loops The corresponding degree matrix The diagonal element of is defined as represents The element in the i-th row and j-th column of ; Subsequently, adopt the propagation rule of the graph convolutional network GCN to globally aggregate the features using the following formula:

[0093]

[0094] where H (l+1) represents the node feature representation generated after the output of the l-th layer, represents the degree matrix to the negative one-half power, L represents the total number of layers of the GCN, H (0) = X is the input feature matrix, W (l) is the learnable weight matrix of the l-th layer, σ(·) represents the activation function; after stacking L layers, the final feature of node m i is obtained, that is, the global feature h gcn,i :

[0095]

[0096] where W is the learnable weight matrix, W = W (0) W (1) …W (L-1) , and the symbol [·] i represents taking the i-th row of the matrix as the feature vector of node m i ;

[0097] The above formula makes full use of the potential topological structure of the distribution network reflected by the potential adjacency matrix A pot to effectively extract the global features, thus providing an accurate node feature representation for subsequent topological identification.

[0098] Then, with hgcn,i As x i , the adaptive neighborhood of node m is determined using the k-nearest neighbor algorithm i . The edge features between nodes are modeled by a multi-layer perceptron h Θ , where Θ is a set of learnable parameters, and e ij is obtained as follows:

[0099]

[0100] where e ij represents the edge feature between node i and node j, is the perceptron function based on Θ, and the specific implementation form is written as:

[0101] e ijp = σ ReLU (θ p (x i - x j ) + φ p x i )

[0102] where e ijp represents the edge feature obtained by the p-th filter between node i and node j, σ ReLU (·) is the ReLU activation function, θ p and φ p are the learnable parameters of the p-th filter respectively, p = 1, 2,..., P, and P represents the total number of filters;

[0103] Next, to aggregate the edge feature information into the central node feature, an average pooling operation is adopted:

[0104]

[0105] where avg(·) represents taking the mean of all edge features in the neighborhood, thereby obtaining the local feature h i of node m ec,i .

[0106] By combining h gcn,i with h ec,i , a richer and more detailed feature basis is provided for subsequent line connection state prediction and topology identification.

[0107] S22: Construct a global attention mechanism and a line state prediction module, and introduce a Bayesian neural network to quantify the model parameters.

[0108] In the step S22, the specific process of constructing the global attention mechanism and the line state prediction module is as follows:

[0109] First, concatenate the global feature h gcn,i and the local feature h ec,i on the feature dimension to form a new node feature representation h con,i :

[0110] h con,i = [h gcn,i || h ec,i

[0111] where the symbol "||" represents vector concatenation;

[0112] Then, use the global attention mechanism to construct a global semantic vector g for capturing the macroscopic information of the entire distribution network graph. The calculation formula of g is:

[0113]

[0114] where α i represents the attention coefficient, and the calculation formula of α i is

[0115]

[0116] where W att is a learnable weight matrix, d con is the dimension of the new node feature, d att is the attention vector dimension, u is a learnable vector, σ LeakyReLU (·) is an activation function with a negative slope, and u T represents the transpose operation of vector u;

[0117] Next, to construct the edge-level feature, for any two adjacent nodes m i and m j construct an edge feature vector h edge,ij :

[0118] h edge,ij = [h con,i || h con,j || g]

[0119] Fuse the local features of nodes m i and m j and the global semantic vector g together to provide sufficient information for the subsequent line state prediction;

[0120] Finally, send h edge,ij into the fully connected layer. After activation by the σ LeakyReLU activation function, and then mapped through the σ Sigmoid activation function to obtain the prediction confidence of the line closed state ​

[0121]

[0122] Where W FC and b FC are the weight matrix and bias of the fully connected layer respectively, d mid is the dimension of the fully connected hidden layer, d edge is the dimension of the edge feature vector, W out and b out are the output layer parameters, and σ Sigmoid (·) is the Sigmoid activation function, which ranges between 0 and 1 and is used to represent the prediction confidence of the predicted line closed state.

[0123] In addition, to improve the robustness of the model under the conditions of insufficient data, measurement errors, and unknown topologies, a Bayesian neural network is further introduced in the line state prediction module to probabilistically model the model parameters. The specific process is as follows:

[0124] Assign a prior distribution p(w) to the model parameter w and use the matrix D for posterior distribution inference to obtain:

[0125]

[0126] where p(D∣w) is the likelihood function, p(D) is the marginal likelihood, and p(D) = ∫p(D∣w)p(w)dw.

[0127] To avoid the high-dimensional integration problem, a variational distribution q(w) is introduced to approximate the posterior distribution, and the KL divergence is defined:

[0128]

[0129] Use the evidence lower bound ELBO to express the relationship between logp(D) and the KL divergence:

[0130] logp(D) = ELBO + KL(q(w)||p(w|D))

[0131] where ELBO is defined as:

[0132]

[0133] where represents the expectation of the random variable w under the distribution q(w);

[0134] In actual calculations, Monte Carlo sampling is used to approximate the expectation:

[0135]

[0136] where w i represents the i-th instance of the model parameter sampled according to the distribution q(w);

[0137] Finally, the negative value of the ELBO is used as the regularization loss L of the BNN BNN :

[0138]

[0139] Thus, the quantification of the uncertainty of the model parameters is completed.

[0140] Step 3: Jointly train the Bayesian double-aggregation graph neural network using the cross-entropy loss and the BNN regularization term.

[0141] In the online training phase, first use the cross-entropy loss function to measure the error between the predicted line closing state and the true state. The loss function L CE is expressed as

[0142]

[0143] where y ij represents the true state of the line, and y ij ∈ {0, 1};

[0144] Combine L BNN and L CE through the balance coefficient λ to form the overall loss function L:

[0145] L = L CE + λL BNN (17)

[0146] During the offline training process, update the model parameters through backpropagation and gradient descent until the overall loss function reaches the minimum value.

[0147] Step 4: The trained Bayesian double-aggregation graph neural network collects real-time data to achieve real-time identification of the distribution network topology.

[0148] After training, deploy the trained Bayesian double-aggregation graph neural network BDGNN model in the online real-time system, and use the voltage data of each node in the distribution network collected in real time as the input. Calculate the prediction confidence of the closing state of each line through the double-aggregation feature extraction and line state prediction module, and then perform binary processing on according to the preset threshold, so as to achieve real-time identification of the distribution network topology.

[0149] In the actual operation of the distribution network, it is often difficult to cover all the topological states that the system may experience by only relying on the historical data of the known topological structure to train and verify the model. When facing a topological structure that has never appeared before, the generalization ability and adaptability of the model become the key indicators to measure its practical value.

[0150] Figure 2 It is a distribution map of the IEEE 123-node topology and tie switches. The improved IEEE 123-node system is a 4.16 kV network, including 118 lines and 13 tie switches.

[0151] Figure 3 It shows the comparison results of the topological identification accuracy of each model in the IEEE 123-node system under different measurement error (0.5% - 2.5%) scenarios. It can be seen that as the error magnitude increases, the identification performance of all models decreases slightly, but the BDGNN proposed in the present invention is better than other models in each error range, and the performance is least affected by interference. Specifically, in the IEEE 123-node system, when the measurement error is 0.5%, the accuracy of BDGNN reaches 99.13%. Even when the error increases to 2.5%, it can still remain at 95.99%. It is worth noting that according to the ANSI C12.20 standard, the measurement error of smart meters should usually be lower than ±0.5%. Within this error range, BDGNN is hardly affected, showing extremely high practical value and robustness.

[0152] Figure 4 It shows the performance comparison between the present invention and other models in the topological identification of the distribution network under unknown topological scenarios (that is, when the historical data cannot cover all possible topological structures). The comparative experiment shows that BDGNN can still maintain excellent recognition ability under completely unknown topological states. For example, its sample-level accuracy is as high as 0.9837, significantly leading DNN (0.7090), CNN (0.8287) and GCN (0.8527). The reason is that through dual feature aggregation (global features and edge-level features) and Bayesian parameter modeling, BDGNN can not only effectively use the existing data to learn the graph structure features, but also has strong robustness and adaptability when facing network structure changes, thus ensuring the identification accuracy and stability under the new topology.

Claims

1. A method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network, characterized in that, It includes the following steps: Step 1: Construct a distribution network graph model, abstract the devices in the distribution network as nodes, establish a node set, collect node voltage data, and form an input feature vector; Step 2: Construct a Bayesian double-aggregation graph neural network BDGNN; Step 3: Jointly train the Bayesian double-aggregation graph neural network using cross-entropy loss and BNN regularization terms; Step 4: The trained Bayesian double-aggregation graph neural network collects real-time data to realize real-time identification of the distribution network topology structure.

2. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 1, wherein The specific process of the said Step 1 is as follows: Step S11: Construct a distribution network graph model, abstract substations, distribution transformers, and ring main units in the distribution network as nodes in the distribution network graph, and form a node set N = {m1, m2, …, m i , …, m i}, where m i represents the i-th node, and n is the total number of nodes; Step S12: First, construct a potential adjacency matrix A based on historical topology information and the physical connection possibilities between devices. pot , with a size of n×n. For the i-th node m i and the j-th node m j , if there is a physically connectable line between them, set the element A pot in the i-th row and j-th column of the potential adjacency matrix A pot (i, j) to 1. If there is no physically connectable line between m i and m j , set A pot (i, j) to 0. Step S13: Select the node voltage amplitude of the time section as the feature input.

3. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 2, wherein: In the step S13, it is assumed that voltage collection is performed on n nodes in the whole network at discrete times t = 1, 2, …, T, and the voltage measurement obtained at any time t is expressed as a feature vector where represents the voltage amplitude of the i-th node at time t; when sampling is performed at multiple times, all measurement data are stored in the matrix D: where T is the total number of sampling instants, and D ∈ R T×n represents a T×n-dimensional matrix over the real number field R. The t-th row of the matrix D corresponds to the voltage measurement values of all n nodes at time instant t; when training the model or identifying the topology, any row can be selected from D as the input feature.

4. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 3, characterized in that The specific steps of the said Step 2 are as follows: S21: Use the graph convolutional network to extract node features globally, and at the same time use the dynamic graph edge convolution EdgeConv to extract local features to achieve double aggregation; S22: Construct a global attention mechanism and a line state prediction module, and introduce a Bayesian neural network to quantify the model parameters.

5. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 4, characterized in that The specific process of the said Step S21 is as follows: First, for the i-th node feature x of the input i , x i ∈ R d , where R represents the real number field and d represents the dimension of the node feature; Construct the feature matrix X, where X ∈ R n×d ; Add A pot to the identity matrix I n to obtain the matrix with self-loops The diagonal elements of the corresponding degree matrix are defined as denotes the element in the i-th row and j-th column of ; Subsequently, using the propagation rule of the graph convolutional network GCN, the features are globally aggregated using the following formula: Among which H (l+1) represents the node feature representation generated after the output of the l-th layer, represents the degree matrix to the negative one-half power, L represents the total number of layers of the GCN, H (0) = X is the input feature matrix, W (l) is the learnable weight matrix of the l-th layer, σ(·) represents the activation function; after L layers of stacking, the final feature of node m i is obtained, that is, the global feature h gcn,i : where W is a learnable weight matrix, W = W (0) W (1) …W (L-1) , and the symbol [·] i denotes taking the i-th row of the matrix as the eigenvector of node m i ; Then, using h gcn,i as x i , the adaptive neighborhood of node m i is determined by the k-nearest neighbor algorithm The edge features between nodes are modeled by a multi-layer perceptron h Θ , where Θ is a set of learnable parameters, to obtain e ij : where e ij represents the edge feature between node i and node j, is the perceptron function based on Θ, and the specific implementation form is written as: e ijp = σ ReLU (θ p (x i - x j ) + φ p x i ) where e ijp represents the edge feature obtained by the p-th filter between nodes u and node j, and σ ReLU (·) is the ReLU activation function, and θ p and φ p are the learnable parameters of the p-th filter respectively, where p = 1, 2, …, P, and P represents the total number of filters; Next, in order to aggregate the edge feature information into the central node feature, an average pooling operation is adopted: where avg(·) represents the mean operation on all edge features within the neighborhood to obtain the local feature h of node m i ec,i ​​ 6. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 5, wherein In the said Step S22, the specific process of constructing the global attention mechanism and the line state prediction module is as follows: First, the global feature h gcn,i and the local feature h ec,i are concatenated in the feature dimension to form a new node feature representation h con,i : h con,i = [h gcn,i ||h ec,i ​ where the symbol "||” represents vector splicing; Then, a global attention mechanism is adopted to construct a global semantic vector g for capturing the macroscopic information of the entire distribution network graph, and the calculation formula of g is: where α i represents the attention coefficient, and α i is calculated as follows where W att is a learnable weight matrix, d con is the dimension of the new node features, d att is the attention vector dimension, u is a learnable vector, σ LeakyReLU (·) is an activation function with negative slope, u T represents the transpose operation of vector u; Next, to construct edge-level features, for any two adjacent nodes m i and m j construct an edge feature vector h edge,ij : h edge,ij = [h con,i || h con,j || g] Fuse the local features of node m i and m j with the global semantic vector g to provide sufficient information for subsequent line state prediction; Finally, send h edge,ij to the fully connected layer. After activation by the σ LeakyReLU activation function, then map through the σ Sigmoid activation function to obtain the predicted confidence of the line closed state Among which W FC and b FC are the weight matrix and bias of the fully connected layer respectively, d mid is the dimension of the fully connected hidden layer, d edge is the dimension of the edge feature vector, W out and b out are the output layer parameters, σ Sigmoid (·) is the Sigmoid activation function, which ranges between 0 and 1 and is used to represent the prediction confidence of the predicted line closed state.

7. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 6, wherein In the said Step S22, the specific process of introducing a Bayesian neural network to quantify the model parameters is as follows: Assign a prior distribution p(w) to the model parameter w and use the matrix D for posterior distribution inference to obtain: where p(D∣w) is the likelihood function, p(D) is the marginal likelihood, and p(D) = ∫p(D∣w)p(w)dw.

8. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 7, wherein In the said Step 3, in order to avoid the high-dimensional integration problem, a variational distribution q(w) is introduced to approximate the posterior distribution, and the KL divergence is defined: Use the evidence lower bound ELBO to express the relationship between log p(D) and the KL divergence: logp(D) = ELBO + KL(q(w)||p(w|D)) where ELBO is defined as: where denotes the expectation of the random variable w under the distribution q(w); In actual calculation, Monte Carlo sampling is used to approximate the expectation: where w i denotes the i-th instance of the model parameter sampled according to the distribution q(w); Finally, the negative value of ELBO is used as the regularization loss L of the BNN BNN : Thus, the uncertainty quantification of the model parameters is completed.

9. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 8, wherein In the third step, during the online training phase, first, the cross-entropy loss function is used to measure the error between the predicted line closed state and the true state, and the loss function L CE The expression is where y ij represents the true state of the line, y ij ∈ 0, 1; Combine L BNN with L CE to jointly form the overall loss function L through the balance coefficient λ: L = L CE + λL BNN During the offline training process, the model parameters are updated through backpropagation and gradient descent until the overall loss function reaches the minimum value.

10. The method for identifying the topological structure of a distribution network based on a Bayesian double-aggregation graph neural network according to claim 9, wherein In the fourth step, after training is completed, the trained Bayesian double-aggregation graph neural network BDGNN model is deployed in an online real-time system, and the voltage data of each node in the distribution network is collected in real time as input. The predicted confidence of the closed state of each line is calculated through the double-aggregation feature extraction and line state prediction module, and then is binarized to realize the real-time identification of the distribution network topology structure.

Citation Information

Cited By

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

    CN120724635A

  • Parameter and data processing correction method and system for power grid energy management

    CN121502624A

  • Parameter and data processing correction method and system for power grid energy management

    CN121502624B