Power distribution system topology and line parameter joint online identification method of graph neural network based on pseudo-label semi-supervised training
By adopting pseudo-label semi-supervised training and multi-objective fusion loss function in graph neural networks, the problems of insufficient labels and noise interference in topology and parameter identification in new distribution systems are solved, achieving higher identification accuracy and robustness.
Patent Information
- Application Number
- CN202510508452.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-09-16
AI Technical Summary
The complexity of the new power distribution system and the harsh operating environment have led to the problems of insufficient labels, data noise interference and insufficient physical interpretability in the online identification of topology and equipment parameters of existing deep learning methods.
A graph neural network method based on pseudo-label semi-supervised training is adopted. By constructing a multi-objective fusion loss function and utilizing historical data information of the distribution system, pseudo labels of topology and line parameters are generated to enhance the physical interpretability and noise resistance of the model.
It improves the accuracy and robustness of distribution system topology and line parameter identification, enhances the model's adaptability to physical laws, and solves the problems of insufficient labels and noise interference in existing methods.
Smart Images

Figure CN120654733A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of situational awareness of power distribution systems, and specifically to a method for joint online identification of power distribution system topology and line parameters based on a graph neural network with pseudo-label semi-supervised training. Background Art
[0002] New power distribution systems are developing rapidly, their scale continues to increase, and network topologies are becoming increasingly complex. Simultaneously, the large-scale integration of distributed power sources, energy storage devices, and electric vehicles has significantly increased operational complexity. The increasing complexity of distribution systems, coupled with demanding operating environments and frequent operational adjustments, poses significant challenges to the online identification of topologies and device parameters, placing higher demands on situational awareness and operational control of distribution systems. Deep learning is a key method for online identification of new distribution system topologies and parameters, but its successful application in real-world scenarios is hampered by insufficient labels, data noise, and insufficient physical interpretability. Summary of the Invention
[0003] In order to make up for the above shortcomings, the present invention discloses a joint online identification method of distribution system topology and line parameters based on pseudo-label semi-supervised training of graph neural networks. This method makes full use of historical data information in the distribution system, constructs a multi-objective fusion loss function, and enhances the physical interpretability and noise resistance of the model.
[0004] The joint online identification method of distribution system topology and line parameters based on pseudo-label semi-supervised training of graph neural networks includes two stages: offline training and online application. The specific steps of each stage are as follows:
[0005] (1) Offline training phase:
[0006] Step 1: Randomly initialize the graph neural network model parameters, set the optimizer AdamW, set its learning rate to 0.001, and the weight decay coefficient to 0.0001;
[0007] Step 2: Construct a training dataset, including node feature dataset, topology and related prior knowledge. The node feature dataset includes node voltage amplitude Vi, node injected active power Pi and node reactive power Qi. Related prior knowledge includes factory values of line parameters. and distribution system topology collections, using Kirchhoff's Voltage Law (KVL) and Current Law (KCL) to calculate the physical characteristics of edges, including voltage differences Active power and reactive power
[0008] Step 3: Perform the following operations on each training sample to determine whether the training sample has a label. For unlabeled training samples, generate edge topology pseudo-labels based on the node power residual and a set threshold. Simultaneously, generate line impedance pseudo-labels based on a line parameter impedance variation model that takes temperature changes into account.
[0009] Step 4: Combine node features Vi, Pi, Qi and edge features Input into the multi-head attention block for feature extraction and message passing;
[0010] Step 5: Output the Ω that represents the electrical connection relationship and the Ω that represents the line parameters through the model.
[0011] Step 6: Establish multi-objective fusion loss function Calculate mission losses;
[0012] Step 7: Repeat steps 3 to 6 until the training termination condition is met: the loss converges and the optimal model after training is obtained;
[0013] (2) Online application stage:
[0014] The real-time node measurement data of the distribution network is used as input and passed to the optimal model that has been trained in the offline training phase; the optimal model outputs the real-time identification results of the distribution network topology and line parameters at the current time section through its message passing mechanism.
[0015] The specific steps to construct the training dataset are:
[0016] 1) Historical data collection
[0017] The training data needs to collect the topology structure set, the initial value of the impedance parameter and the historical data of the node measurement data, among which:
[0018] A. The number of operating topologies of medium voltage distribution systems is limited, usually limited to a few typical topologies, which constitute the topology set;
[0019] B. The initial value of the impedance parameter is usually determined according to the line model and length, and can be obtained through the ledger information;
[0020] C. Node measurement data comes from historical data of multiple time sections in the SCADA system. Taking node i as an example, Pi, Qi, and Vi represent the active power injection, reactive power injection, and line voltage amplitude of node i, respectively;
[0021] 2) Pseudo-label generation method
[0022] A training dataset is constructed based on the collected data, which is divided into labeled and unlabeled historical measurement data. The labeled historical measurement data includes node measurement data and its corresponding topology and parameters; the unlabeled data only contains node measurement data.
[0023] For unlabeled data of system topology and line parameters, the pseudo-label generation method is as follows:
[0024] A. For the system topology, consider the correlation between the power transmission of different branches of the node. Use the method of calculating the node power deviation to obtain the existence of each edge. Then, based on the existence of the edge and the topological set, determine its topological pseudo-label. The specific method is as follows:
[0025] a. Variable edge set screening
[0026] According to the topological set in the prior information, the possible changing edge set Echa is selected, m∈N(i) represents the node connected to the i node; it is assumed that there is power transmission between each node in the set, and then the active power on the branch is calculated. The specific calculation formula is as follows:
[0027]
[0028] Where, Indicates the initial size of the branch between node i and node m, and the upper right corner indicates the nodes at both ends of the branch;
[0029] b. Node power deviation calculation
[0030] Select any vertex of an edge from Echa, take the power injection node as negative and the power outflow node as positive, and calculate the power sum Δ of the node P , Δ Q , which is used as the comparison quantity for subsequent judgment Δ=Δ P +Δ Q , and its calculation formula is:
[0031]
[0032] c. Edge existence judgment
[0033] The existence of the edge is determined by the threshold ε, as follows:
[0034] ε=β[P ab +Q ab ], ab represents a variable edge, β∈[0,1] (3)
[0035] Where β represents the correction parameter, and its value range is 0 to 1;
[0036] If the comparison value Δ is less than the threshold, it means the edge exists; otherwise, it means the edge does not exist. Based on this method, the existence of each variable edge is obtained, and then the topology that best matches the topology set is selected as the topology pseudo-label.
[0037] B. For line parameters, considering the impact of temperature change on line impedance, a line impedance parameter model based on temperature change is applied to obtain its pseudo label. The specific method is as follows:
[0038] Based on the line parameter impedance change model taking temperature changes into account, pseudo labels of line resistance and reactance parameters can be calculated according to the following formula:
[0039]
[0040] Where T0 = 20°C; R(T) and X(T) are the resistance and reactance at temperature T, respectively; R0 and X0 are the resistance and reactance at reference temperature T0, respectively, which can be calculated based on the line model and length.
[0041] The specific steps to build a graph neural network are:
[0042] 1) Graph structure construction and feature extraction
[0043] In the PLTGNN constructed in this paper, the node input features Pi, Qi, and Vi are the edge input features are the active power, reactive power and voltage amplitude difference between the two ends of the branch between node i and node m respectively; The calculation formula is shown in formula (1). The specific calculation formula is as follows:
[0044]
[0045] The edge output features in PLTGNN include Ω, which represents the electrical connection relationship, and The value range of Ω is 0 / 1, where 0 indicates no connection, i.e. at least one electrical switch in the circuit is in the open state, and 1 indicates a connection, i.e. all electrical switches in the circuit are in the closed state.
[0046] 2) Construct a message passing mechanism based on multi-head attention
[0047] Graph neural networks use a message passing mechanism based on multi-head attention to update node features through feature interactions between adjacent nodes at each layer.
[0048] 3) Constructing multi-objective fusion loss function
[0049] The multi-objective fusion loss function includes supervised learning loss, pseudo-label learning loss, consistency regularization constraint loss, and physical constraint loss; the loss function expression is:
[0050]
[0051] Where, is the supervised learning loss, is the pseudo-label learning loss, is the consistency regularization loss, is the physical constraint loss; λ1, λ2, and λ3 are the weight coefficients of the corresponding loss terms respectively;
[0052] λ1, λ2, and λ3 are used to flexibly adjust the relative importance of each part in the loss function, and their optimal values are determined through hyperparameter optimization.
[0053] The specific message passing mechanism is as follows:
[0054] A. Head attention weight calculation
[0055] In the constructed multi-head attention mechanism, each edge Him has K heads, k∈{1,…,K}, and the attention weight calculation formula of each head is as follows:
[0056]
[0057] Where h i Represented as the feature vector of node i, h m Represented as the feature vector of node m, h im It is represented as the edge feature vector between node i and node m; softmax and Leakyrelu represent the normalization function and activation function respectively; Represented as an updateable parameter vector matrix related to the attention mechanism;
[0058] When calculating the attention coefficient, not only the corresponding node features are spliced in, but also the input edge features are spliced into the calculation process to enhance the expressiveness of the node features. The addition of additional edge features ensures that the feature propagation always contains the physical information of the distribution system.
[0059] B. Calculation of average multi-head results based on attention weights
[0060] Each head aggregates the message generation results of adjacent nodes and edges through attention weights The specific calculation formula is as follows:
[0061]
[0062] Where, The weight matrix generated after merging edge and node information, Represented as an updateable parameter vector matrix related to the calculation results;
[0063] After obtaining the results of each head, calculate the average value to get the average long-term result. The specific calculation formula is as follows:
[0064]
[0065] C. Edge feature output
[0066] The average multi-head result is a high-dimensional vector obtained by concatenating the weighted edge features and node features. A multi-layer perceptron is used to reduce the dimension of the average multi-head result to the target output edge feature dimension.
[0067] The supervised learning loss, pseudo-label learning loss, consistency regularization loss, and physical constraint loss are specifically:
[0068] A. Supervised Learning Loss
[0069] Supervised learning loss trains the model based on labeled data and measures the error between the model prediction result f(x) and the true label y. The specific calculation formula is as follows:
[0070]
[0071] Where Loss represents the loss function,
[0072] Depending on the task, cross entropy loss is used for topological classification tasks, and mean square error loss is used for parameter identification tasks;
[0073] B. Pseudo-label learning loss
[0074] Design pseudo-label learning loss in the loss function to dynamically balance the contribution of labeled data and pseudo-labels in model optimization, improve training stability and final model performance. The specific calculation method is as follows:
[0075] 1) Calculate the confidence bab of each variable edge:
[0076]
[0077] Where, Δ ab,PQ represents the power deviation of the node at one end of the variable edge ab, Pab and Qab are the active and reactive powers on ab;
[0078] 2) Select the minimum confidence of the variable edge as the confidence wn of the pseudo-label topology:
[0079] w n =J·b ab,min (12)
[0080] Where J is the weight decay factor, which gradually increases with the training rounds and gradually increases the weight of the pseudo label;
[0081] 3) Calculate pseudo-label learning loss:
[0082]
[0083] In the formula, Nu represents the number of unlabeled samples, Denotes the pseudo label of sample n, Represented as the predicted label of sample n;
[0084] C. Consistency Regularization Loss
[0085] The role of consistency regularization loss is to constrain the model's prediction results for unlabeled data to remain consistent before and after the input is noisy, thereby enhancing the model's robustness to noise. Specifically, by measuring the Euclidean distance between the prediction results before and after the noise perturbation, the stability of the model's output is constrained when the input changes. The specific formula is as follows:
[0086]
[0087] Where f(x) represents the model prediction result, f(T(x)) represents the model prediction result after disturbance; T(x) represents disturbance, which mainly represents the node feature disturbance.
[0088] For node features Vi, Pi and Qi, the calculation formula of T(x) is as follows:
[0089] T(x)=x+δ,δ~G(0,σ 2 ) (15)
[0090] Where x represents the node feature Vi, Pi or Qi, and δ represents the error that conforms to the standard Gaussian distribution;
[0091] D. Loss of physical constraints
[0092] The design of physical constraint loss aims to ensure that the model prediction results conform to the physical laws of the distribution network and to improve the model's adaptability to physical consistency by constraining the power error. Its calculation formula is:
[0093]
[0094] Where Pi and Qi represent the injected active power and reactive power measured at node i. and It is expressed as the power value calculated based on the line parameters predicted by the model;
[0095] Assuming that the voltage phase angles of adjacent nodes are approximately equal, the specific calculation formula is as follows:
[0096]
[0097] Where, Expressed as the impedance value for predicting line parameters.
[0098] Beneficial effects
[0099] This paper provides a method for joint online identification of distribution system topology and line parameters using a graph neural network using pseudo-label semi-supervised training. This method fully utilizes historical data in the distribution system and generates pseudo-labels through confidence weighting. Furthermore, this method constructs a multi-objective fusion loss function, including a supervised learning loss based on the difference between the prediction results and labels of a labeled training set, a pseudo-label learning loss based on variable edge confidence, a consistency regularization constraint loss based on the Euclidean distance between the prediction results before and after the perturbation, and a physical constraint loss based on the power deviation calculated from the power flow. Compared with existing topology and parameter identification methods, this method has better robustness and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0101] Figure 1 It is the algorithm flow chart of the present invention;
[0102] Figure 2 is a schematic diagram of the graph construction process adopted by the present invention;
[0103] Figure 3 This is a schematic diagram of the graph attention mechanism module. DETAILED DESCRIPTION
[0104] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
[0105] See also Figure 1-Figure 3 The present invention discloses a method for joint online identification of distribution system topology and line parameters based on pseudo-label semi-supervised training of graph neural networks, which includes two stages: offline training and online application. The specific steps of each stage are as follows:
[0106] (1) Offline training phase:
[0107] Step 1: Randomly initialize the graph neural network model parameters, set the optimizer AdamW, set its learning rate to 0.001, and the weight decay coefficient to 0.0001;
[0108] Step 2: Construct a training dataset, which mainly includes node feature datasets, topology, and related prior knowledge. The node feature dataset includes node voltage amplitude Vi, node injected active power Pi, and node reactive power Qi. Related prior knowledge includes the factory values of line parameters. and distribution system topology, and then uses Kirchhoff's voltage law (KVL) and current law (KCL) to calculate the physical characteristics of the edges, including voltage differences Active power and reactive power
[0109] Step 3: Perform the following operations on each training sample to determine whether the training sample has a label. For unlabeled training samples, generate edge topology pseudo-labels based on the node power residual and a set threshold. Simultaneously, generate line impedance pseudo-labels based on a line parameter impedance variation model that takes temperature changes into account.
[0110] Step 4: Combine node features Vi, Pi, Qi and edge features Input into the multi-head attention block for feature extraction and message passing;
[0111] Step 5: Output the Ω that represents the electrical connection relationship and the Ω that represents the line parameters through the model.
[0112] Step 6: Establish multi-objective fusion loss function Calculate mission losses;
[0113] Step 7: Repeat steps 3 to 6 until the training termination condition is met (the training termination condition of the present invention is loss convergence), and obtain the optimal model after training;
[0114] (2) Online application stage:
[0115] Real-time node measurement data from the distribution network is fed into an optimal model trained during the offline training phase. The optimal model, through its message passing mechanism, outputs real-time identification results of the distribution network topology and line parameters for the current time section.
[0116] The specific steps for constructing the training dataset and the graph neural network model are as follows:
[0117] (1) Construction of training dataset
[0118] 1) Historical data collection
[0119] Training data requires the collection of a large amount of historical data, including topological structure sets, initial impedance parameter values, and node measurement data.
[0120] A. The number of operating topologies of medium voltage distribution systems is limited, usually confined to a few typical topologies, which constitute the topology set.
[0121] B. The initial value of the impedance parameter is usually determined based on the line model and length, and can be obtained through the ledger information.
[0122] C. Node measurement data is derived from historical data at multiple time intervals in the SCADA system. Taking node i as an example, Pi, Qi, and Vi represent the active power injection, reactive power injection, and line voltage amplitude of node i, respectively.
[0123] 2) Pseudo-label generation method
[0124] Pseudo-labeling is an effective approach to addressing the shortage of sample labels. However, existing methods often rely on heuristic rules, have imperfect confidence assessment mechanisms, and are prone to noise. Therefore, this paper proposes a pseudo-label generation method that incorporates fundamental electrical principles. A training dataset is constructed based on collected data and is divided into labeled and unlabeled historical measurement data. Labeled historical measurement data includes node measurement data and its corresponding topology and parameters. Unlabeled data consists solely of node measurement data.
[0125] For unlabeled data of system topology and line parameters, the basic principle of pseudo-label generation is as follows:
[0126] A. For the system topology, consider the correlation between the power transmission of different branches of the node. Use the method of calculating the node power deviation to obtain the existence of each edge. Then, based on the existence of the edge and the topological set, determine its topological pseudo-label. The specific method is as follows:
[0127] a. Variable edge set screening
[0128] According to the topological set in the prior information, the possible edge set Echa is selected, where m∈N(i) represents the nodes connected to node i. Assuming that there is power transmission between each node in the set, the active power on the branch is calculated. The specific calculation formula is as follows:
[0129]
[0130] Where, It represents the initial size of the branch between node i and node m, and the upper right subscripts represent the nodes at both ends of the branch.
[0131] The calculation process of the above formula ignores the voltage phase angle difference between nodes.
[0132] b. Node power deviation calculation
[0133] Select any vertex of an edge from Echa (in this paper, we choose the starting node of the edge), take the power injection node as negative and the outflow node as positive, and calculate the power and Δ P , Δ Q , which is used as the comparison quantity for subsequent judgment Δ=Δ P +Δ Q The calculation formula is:
[0134]
[0135] c. Edge existence judgment
[0136] The existence of the edge is determined by the threshold ε, as follows:
[0137] ε=β[P ab +Q ab ], ab represents a variable edge, β∈[0,1] (3)
[0138] Where β represents the correction parameter, and its value range is 0 to 1.
[0139] If the comparison value Δ is less than the threshold, it indicates that the edge exists, otherwise it indicates that the edge does not exist. Based on this method, the existence of each variable edge is obtained, and then the topology that best matches the topology set is selected as the topology pseudo-label.
[0140] B. For line parameters, considering the impact of temperature change on line impedance, a line impedance parameter model based on temperature change is applied to obtain its pseudo label. The specific method is as follows:
[0141] Based on the line parameter impedance change model taking temperature changes into account, pseudo labels of line resistance and reactance parameters can be calculated according to the following formula:
[0142]
[0143] Where T0 = 20°C; R(T) and X(T) are the resistance and reactance at temperature T, respectively; R0 and X0 are the resistance and reactance at reference temperature T0, respectively, which can usually be calculated based on the line model and length.
[0144] (2) Graph Neural Network Construction
[0145] Graph structure construction and feature extraction
[0146] In the PLTGNN constructed in this paper, the node input features Pi, Qi, and Vi are respectively. are the active power, reactive power and voltage amplitude difference between the two ends of the branch between node i and node m respectively. The calculation formula is shown in (1). The specific calculation formula is as follows:
[0147]
[0148] The edge output features in PLTGNN include Ω, which represents the electrical connection relationship, and The value range of Ω is 0 / 1, where 0 indicates no connection, i.e., at least one electrical switch in the circuit is in the open state, and 1 indicates a connection, i.e., all electrical switches in the circuit are in the closed state.
[0149] Message passing mechanism based on multi-head attention
[0150] The graph neural network constructed by the present invention adopts a message passing mechanism based on multi-head attention, and updates node features through feature interaction between adjacent nodes at each layer.
[0151] The message passing principle is as follows.
[0152] A. Head attention weight calculation
[0153] In the multi-head attention mechanism constructed in this paper, each edge Him has K heads, k∈{1,…,K}, and the attention weight calculation formula of each head is as follows:
[0154]
[0155] Where h i Represented as the feature vector of node i, h m Represented as the feature vector of node m, h im It is represented as the edge feature vector between node i and node m; softmax and Leakyrelu represent the normalization function and activation function respectively; Represented as an updateable parameter vector matrix related to the attention mechanism.
[0156] When calculating the attention coefficient, not only the corresponding node features are spliced in, but also the input edge features are spliced into the calculation process to enhance the expressiveness of the node features. The addition of additional edge features ensures that its feature propagation always contains physical information in the distribution system.
[0157] B. Calculation of average multi-head results based on attention weights
[0158] Each head aggregates the message generation results of adjacent nodes and edges through attention weights The specific calculation formula is as follows:
[0159]
[0160] Where, The weight matrix generated after merging edge and node information, Represented as an updateable parameter vector matrix related to the calculation results.
[0161] After obtaining the results of each head, calculate the average value to get the average long-term result. The specific calculation formula is as follows:
[0162]
[0163] C. Edge feature output
[0164] The average multi-head result is a high-dimensional vector obtained by concatenating the weighted edge features and node features. This paper uses a multi-layer perceptron (MLP) to reduce the dimension of the average multi-head result to the target output edge feature dimension.
[0165] 3) Multi-objective fusion loss function
[0166] This paper constructs a multi-objective fusion loss function, including supervised learning loss, pseudo-label learning loss, consistency regularization constraint loss, and physical constraint loss. The loss function expression is:
[0167]
[0168] Where, is the supervised learning loss, is the pseudo label loss, is the consistency regularization loss, is the physical constraint loss; λ1, λ2, and λ3 are the weight coefficients of the corresponding loss terms.
[0169] λ1, λ2, and λ3 are used to flexibly adjust the relative importance of each part in the loss function, and their optimal values are determined through hyperparameter optimization.
[0170] A. Supervised Learning Loss
[0171] Supervised learning loss trains the model based on labeled data and measures the error between the model prediction result f(x) and the true label y. The specific calculation formula is as follows:
[0172]
[0173] Where Loss represents the loss function.
[0174] Depending on the task, cross entropy loss is used for topological classification tasks, and mean square error loss is used for parameter identification tasks. The terms "Loss" below have the same meaning and will not be repeated here.
[0175] B. Pseudo-label learning loss
[0176] Considering that low-quality pseudo labels may have a negative impact on model training, this paper designs a pseudo-label learning loss in the loss function to dynamically balance the contribution of labeled data and pseudo labels in model optimization, thereby improving training stability and final model performance. The specific calculation method is as follows:
[0177] 1) Calculate the confidence bab of each variable edge:
[0178]
[0179] Where, Δ ab,PQ It represents the power deviation of the node at one end of the variable edge ab, and Pab and Qab are the active and reactive powers on ab.
[0180] 2) Select the minimum confidence of the variable edge as the confidence wn of the pseudo-label topology:
[0181] w n =J·b ab,min (12)
[0182] Where J is the weight decay factor, which gradually increases with the training rounds and gradually increases the weight of the pseudo label;
[0183] 3) Calculate pseudo-label learning loss:
[0184]
[0185] In the formula, Nu represents the number of unlabeled samples, Denotes the pseudo label of sample n, Denotes the predicted label of sample n.
[0186] C. Consistency Regularization Loss
[0187] The role of consistency regularization loss is to constrain the model's prediction results for unlabeled data to remain consistent before and after the input is noisy, thereby enhancing the model's robustness to noise. Specifically, by measuring the Euclidean distance between the prediction results before and after the noise perturbation, the model's output stability is constrained when the input changes. The specific formula is as follows:
[0188]
[0189] Where f(x) represents the model prediction result, and f(T(x)) represents the model prediction result after perturbation. T(x) represents the perturbation, which mainly represents the node feature perturbation.
[0190] For node features Vi, Pi and Qi, the calculation formula of T(x) is as follows:
[0191] T(x)=x+δ,δ~G(0,σ 2) (15)
[0192] Where x represents the node feature Vi, Pi or Qi, and δ represents the error that conforms to the standard Gaussian distribution.
[0193] D. Loss of physical constraints
[0194] The design of physical constraint loss aims to ensure that the model prediction results conform to the physical laws of the distribution network and to improve the model's adaptability to physical consistency by constraining the power error. Its calculation formula is:
[0195]
[0196] Where Pi and Qi represent the injected active power and reactive power measured at node i. and Expressed as the power value calculated based on the line parameters predicted by the model
[0197] Assuming that the voltage phase angles of adjacent nodes are approximately equal, the specific calculation formula is as follows:
[0198]
[0199] Where, Expressed as the impedance value for predicting line parameters.
[0200] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention may be subject to various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.
Claims
1. A method for joint online identification of distribution system topology and line parameters based on graph neural network with pseudo-label semi-supervised training, characterized by: It includes two stages: offline training and online application. The specific steps of each stage are as follows: (1) Offline training phase: Step 1: Randomly initialize the graph neural network model parameters, set the optimizer AdamW, set its learning rate to 0.001, and the weight decay coefficient to 0.0001; Step 2: Construct a training dataset, including node feature dataset, topology and related prior knowledge. The node feature dataset includes node voltage amplitude Vi, node injected active power Pi and node reactive power Qi. Related prior knowledge includes factory values of line parameters. and distribution system topology collections, using Kirchhoff's Voltage Law (KVL) and Current Law (KCL) to calculate the physical characteristics of edges, including voltage differences Active power and reactive power Step 3: Perform the following operations on each training sample to determine whether the training sample has a label. For unlabeled training samples, generate edge topology pseudo-labels based on the node power residual and a set threshold. Simultaneously, generate line impedance pseudo-labels based on a line parameter impedance variation model that takes temperature changes into account. Step 4: Combine node features Vi, Pi, Qi and edge features Input into the multi-head attention block for feature extraction and message passing; Step 5: Output the Ω that represents the electrical connection relationship and the Ω that represents the line parameters through the model. Step 6: Establish a multi-objective fusion loss function l and calculate the task loss; Step 7: Repeat steps 3 to 6 until the training termination condition is met: the loss converges and the optimal model after training is obtained; (2) Online application stage: The real-time node measurement data of the distribution network is used as input and passed to the optimal model that has been trained in the offline training phase; the optimal model outputs the real-time identification results of the distribution network topology and line parameters at the current time section through its message passing mechanism.
2. The method for joint online identification of distribution system topology and line parameters based on graph neural network with pseudo-label semi-supervised training according to claim 1 is characterized in that: The specific steps to construct the training dataset are: 1) Historical data collection The training data needs to collect the topology structure set, the initial value of the impedance parameter and the historical data of the node measurement data, among which: A. The number of operating topologies of medium voltage distribution systems is limited, usually limited to a few typical topologies, which constitute the topology set; B. The initial value of the impedance parameter is usually determined according to the line model and length, and can be obtained through the ledger information; C. Node measurement data comes from historical data of multiple time sections in the SCADA system. Taking node i as an example, Pi, Qi, and Vi represent the active power injection, reactive power injection, and line voltage amplitude of node i, respectively; 2) Pseudo-label generation method A training dataset is constructed based on the collected data, which is divided into labeled and unlabeled historical measurement data. The labeled historical measurement data includes node measurement data and its corresponding topology and parameters; the unlabeled data only contains node measurement data.
3. The method for joint online identification of distribution system topology and line parameters based on graph neural network with pseudo-label semi-supervised training according to claim 2 is characterized in that: For unlabeled data of system topology and line parameters, the pseudo-label generation method is as follows: A. For the system topology, consider the correlation between the power transmission of different branches of the node. Use the method of calculating the node power deviation to obtain the existence of each edge. Then, based on the existence of the edge and the topological set, determine its topological pseudo-label. The specific method is as follows: a. Variable edge set screening According to the topological set in the prior information, the possible changing edge set Echa is selected, m∈N(i) represents the node connected to the i node; it is assumed that there is power transmission between each node in the set, and then the active power on the branch is calculated. The specific calculation formula is as follows: Where, Indicates the initial size of the branch between node i and node m, and the upper right corner indicates the nodes at both ends of the branch; b. Node power deviation calculation Select any vertex of an edge from Echa, take the power injection node as negative and the power outflow node as positive, and calculate the power sum Δ of the node P , Δ Q , which is used as the comparison quantity for subsequent judgment Δ=Δ P +Δ Q , and its calculation formula is: c. Edge existence judgment The existence of the edge is determined by the threshold ε, as follows: ε=β[P ab +Q ab ], ab represents a variable edge, β∈[0,1](3) Where β represents the correction parameter, and its value range is 0 to 1; If the comparison value Δ is less than the threshold, it means the edge exists; otherwise, it means the edge does not exist. Based on this method, the existence of each variable edge is obtained, and then the topology that best matches the topology set is selected as the topology pseudo-label. B. For line parameters, considering the impact of temperature change on line impedance, a line impedance parameter model based on temperature change is applied to obtain its pseudo label. The specific method is as follows: Based on the line parameter impedance change model taking temperature changes into account, pseudo labels of line resistance and reactance parameters can be calculated according to the following formula: Where T0 = 20°C; R(T) and X(T) are the resistance and reactance at temperature T, respectively; R0 and X0 are the resistance and reactance at reference temperature T0, respectively, which can be calculated based on the line model and length.
4. The method for joint online identification of distribution system topology and line parameters based on graph neural network with pseudo-label semi-supervised training according to claim 1 is characterized in that: The specific steps to build a graph neural network are: 1) Graph structure construction and feature extraction In the PLTGNN constructed in this paper, the node input features Pi, Qi, and Vi are the edge input features are the active power, reactive power and voltage amplitude difference between the two ends of the branch between node i and node m respectively; The calculation formula is shown in formula (1). The specific calculation formula is as follows: The edge output features in PLTGNN include Ω, which represents the electrical connection relationship, and The value range of Ω is 0 / 1, where 0 indicates no connection, i.e. at least one electrical switch in the circuit is in the open state, and 1 indicates a connection, i.e. all electrical switches in the circuit are in the closed state. 2) Construct a message passing mechanism based on multi-head attention Graph neural networks use a message passing mechanism based on multi-head attention to update node features through feature interactions between adjacent nodes at each layer. 3) Constructing multi-objective fusion loss function The multi-objective fusion loss function includes supervised learning loss, pseudo-label learning loss, consistency regularization constraint loss, and physical constraint loss; the loss function expression is: l=l sup +λ1l pseudo +λ2l cons +λ3l phy (9) Where, l sup is the supervised learning loss, l pseudo is the pseudo-label learning loss, l cons is the consistency regularization loss, l phy is the physical constraint loss; λ1, λ2, and λ3 are the weight coefficients of the corresponding loss terms respectively; λ1, λ2, and λ3 are used to flexibly adjust the relative importance of each part in the loss function, and their optimal values are determined through hyperparameter optimization.
5. The method for joint online identification of distribution system topology and line parameters based on pseudo-label semi-supervised training of graph neural networks according to claim 4 is characterized in that: The specific message passing mechanism is as follows: A. Head attention weight calculation In the constructed multi-head attention mechanism, each edge Him has K heads, k∈{1,…,K}, and the attention weight calculation formula of each head is as follows: Where h i Represented as the feature vector of node i, h m Represented as the feature vector of node m, h im It is represented as the edge feature vector between node i and node m; softmax and Leakyrelu represent the normalization function and activation function respectively; Represented as an updateable parameter vector matrix related to the attention mechanism; When calculating the attention coefficient, not only the corresponding node features are spliced in, but also the input edge features are spliced into the calculation process to enhance the expressiveness of the node features. The addition of additional edge features ensures that the feature propagation always contains the physical information of the distribution system. B. Calculation of average multi-head results based on attention weights Each head aggregates the message generation results of adjacent nodes and edges through attention weights The specific calculation formula is as follows: Where, The weight matrix generated after merging edge and node information, Represented as an updateable parameter vector matrix related to the calculation results; After obtaining the results of each head, calculate the average value to get the average long-term result. The specific calculation formula is as follows: C. Edge feature output The average multi-head result is a high-dimensional vector obtained by concatenating the weighted edge features and node features. A multi-layer perceptron is used to reduce the dimension of the average multi-head result to the target output edge feature dimension.
6. The method for joint online identification of distribution system topology and line parameters based on graph neural network with pseudo-label semi-supervised training according to claim 4 is characterized in that: The supervised learning loss, pseudo-label learning loss, consistency regularization loss, and physical constraint loss are specifically: A. Supervised Learning Loss Supervised learning loss trains the model based on labeled data and measures the error between the model prediction result f(x) and the true label y. The specific calculation formula is as follows: l sup =Loss(f(x),y) (10) Where Loss represents the loss function, Depending on the task, cross entropy loss is used for topological classification tasks, and mean square error loss is used for parameter identification tasks; B. Pseudo-label learning loss Design pseudo-label learning loss in the loss function to dynamically balance the contribution of labeled data and pseudo-labels in model optimization, improve training stability and final model performance. The specific calculation method is as follows: 1) Calculate the confidence bab of each variable edge: Where, Δ ab,PQ represents the power deviation of the node at one end of the variable edge ab, Pab and Qab are the active and reactive powers on ab; 2) Select the minimum confidence of the variable edge as the confidence wn of the pseudo-label topology: w n =J·b ab,min (12) Where J is the weight decay factor, which gradually increases with the training rounds and gradually increases the weight of the pseudo label; 3) Calculate pseudo-label learning loss: In the formula, Nu represents the number of unlabeled samples, Denotes the pseudo label of sample n, Represented as the predicted label of sample n; C. Consistency Regularization Loss The role of consistency regularization loss is to constrain the model's prediction results for unlabeled data to remain consistent before and after the input is noisy, thereby enhancing the model's robustness to noise. Specifically, by measuring the Euclidean distance between the prediction results before and after the noise perturbation, the stability of the model's output is constrained when the input changes. The specific formula is as follows: l cons =||f(x)-f(T(x))||2 (14) Where f(x) represents the model prediction result, f(T(x)) represents the model prediction result after disturbance; T(x) represents disturbance, which mainly represents the node feature disturbance. For node features Vi, Pi and Qi, the calculation formula of T(x) is as follows: T(x)=x+δ,δ~G(0,σ 2 ) (15) Where x represents the node feature Vi, Pi or Qi, and δ represents the error that conforms to the standard Gaussian distribution; D. Loss of physical constraints The design of physical constraint loss aims to ensure that the model prediction results conform to the physical laws of the distribution network and to improve the model's adaptability to physical consistency by constraining the power error. Its calculation formula is: Where Pi and Qi represent the injected active power and reactive power measured at node i. and It is expressed as the power value calculated based on the line parameters predicted by the model; Assuming that the voltage phase angles of adjacent nodes are approximately equal, the specific calculation formula is as follows: Where, Expressed as the impedance value for predicting line parameters.
Citation Information
Patent Citations
Semi-supervised learning method and system for non-intrusive load monitoring
CN117473368A
Medium voltage distribution network line parameter identification method based on physical information neural network
CN118133656A
Active power distribution network abnormal state sensing method and system based on data enhancement
CN118395363A
Active power distribution network topology identification method based on multi-task graph learning and related device
CN118889428A
Power distribution network communication network vulnerability assessment method based on graph neural network
CN119652729A