A power distribution network topology change detection method based on machine learning
Patent Information
- Application Number
- CN202611036146.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-09
AI Technical Summary
[0020]为了解决新型电力系统中配电网规划评价同质化、新要素接入可靠性不足、拓扑变更难以及时精准识别的问题,本发明提出一种基于机器学习的配电网拓扑变更检测方法
[0096]1、核心技术设计优点:摆脱先验信息依赖,仅基于PMU相量测量样本实现端到端检测
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distribution network operation topology technology, specifically relating to a machine learning-based method for detecting distribution network topology changes. Background Technology
[0002] The rapid popularization of distributed energy (photovoltaics, energy storage, wind power, etc.), electric vehicles, and microgrids is driving the evolution of traditional radial distribution networks into new types of multi-source, interconnected, and flexible distribution networks. The distribution network topology changes frequently due to line switching, distributed energy access / disconnection, and fault handling. At the same time, frequent line faults caused by climate-related disasters require the distribution network to have the ability to perceive topology changes in near real-time in order to ensure the accuracy of dispatch control and the reliability of power supply.
[0003] Traditional topology change detection relies on circuit breaker status signals and smart meter (AMI) measurement data. However, this type of data suffers from low sampling rates, which cannot meet the requirements of real-time situational awareness. Furthermore, the wireless protection capabilities of the communication links of smart meters and circuit breakers are insufficient, and data transmission is easily interfered with, making it difficult to support real-time monitoring of the distribution network.
[0004] Distribution networks have evolved into typical cyber-physical systems (CPS). Terminals such as circuit breakers and smart meters are vulnerable to cyberattacks. Attackers can forge circuit breaker status, tamper with measurement data, and conceal line faults or topology changes, leading to mis-dispatch of the distribution network or even large-scale power outages. Existing topology detection technologies that rely entirely on traditional measurements have serious security vulnerabilities. Therefore, traditional topology detection technologies that depend entirely on circuit breaker status and smart meter measurements have irreparable security vulnerabilities in a CPS environment and cannot guarantee the safety and reliability of distribution network operation.
[0005] To address the shortcomings of traditional measurements in terms of security and real-time performance, the Synchronous Phasor Measurement Unit (PMU), with its unique technical characteristics, has become a core technological carrier for solving these problems. The PMU boasts advantages such as high sampling rate, GPS synchronization, and built-in advanced network protection mechanisms. It can provide high-precision bus voltage amplitude and phase angle phasor data, making it a core technological carrier for replacing traditional measurements and achieving high-security, real-time topology monitoring. It also provides a data foundation for data-driven topology change estimation methods. However, PMU measurements are susceptible to non-sinusoidal waveforms, harmonics, and transient distortions, leading to excessive total vector error. They are also prone to failure due to signal interference, obstruction, or attacks. Furthermore, high refresh rates generate massive amounts of data, placing pressure on transmission, storage, and computation. Additionally, PMUs suffer from high hardware costs, uneconomical deployment for full distribution network coverage, and poor compatibility with traditional systems.
[0006] Although PMU provides reliable data support for topology monitoring, current mainstream topology change estimation techniques are difficult to fully meet the above requirements in practical applications. They generally have shortcomings such as reliance on prior information, limited functionality, limited scenarios, weak resistance to attacks, and computational complexity. Specifically, they can be summarized into the following typical technologies and their defects.
[0007] The current mainstream software algorithms and methodologies for estimating / detecting distribution network topology changes are respectively: optimization techniques based on measurement residuals, fault location techniques based on graphical models / subgraphs, topology change estimation based on admittance matrices and PMUs, data-driven methods integrating smart meters and PMUs, and traditional measurement methods relying on circuit breakers / AMIs. Each of these methods has the following drawbacks:
[0008] 1. Optimization techniques based on measurement residuals: rely on prior network information and have poor adaptability to different scenarios.
[0009] Most traditional methods are based on the original network structure of the distribution network. If there are unknown line switching, distributed energy access, or prior information is tampered with due to network attacks, the algorithm will completely fail. At the same time, some methods require prior knowledge of the topology change time and cannot achieve autonomous estimation of the change time, making it difficult to adapt to the random topology change scenarios of actual distribution networks.
[0010] 2. Fault location technology based on graph models / subgraphs: limited functionality, unable to achieve integrated detection and location.
[0011] Existing technologies mostly focus on detecting only topology changes or locating only the location of changes, without combining the three core requirements of "change detection, change timing estimation, and change location location". Some data-driven algorithms can only achieve event detection and cannot further locate faults / new lines, making it difficult to support the actual handling decisions of distribution network dispatchers.
[0012] 3. Topology change estimation based on admittance matrix and PMU: Limited adaptability and does not support multiple types / multiple topology changes.
[0013] Some methods can only detect line outages and cannot identify new line additions, making them unsuitable for topology addition scenarios such as grid expansion and tie-line switching. Most methods are limited to single topology change detection and cannot handle multiple line outages / additions at the same time, or multiple topology changes involving a combination of outages and additions, while actual distribution network faults are often accompanied by multiple line anomalies.
[0014] 4. Data-driven methods integrating smart meters and PMUs: These methods have high data dependency, are vulnerable to network attacks, and have high training costs.
[0015] Some methods combine PMU and smart meter data for analysis. However, because smart meter data is easily tampered with, the algorithms are weak against network attacks and have security vulnerabilities.
[0016] Existing data-driven algorithms require a large amount of real distribution network measurement data / attack data for training, but it is difficult to obtain sufficient measured data on topology changes in actual distribution networks, making model training and deployment difficult.
[0017] 5. Traditional measurement methods relying on circuit breakers / AMIs: measurement data has defects, and robustness and real-time performance are insufficient;
[0018] Traditional measurement methods relying on smart meters, circuit breakers, etc. cannot achieve near real-time detection of topology changes due to low data sampling rate and large transmission delay, which easily leads to lag in distribution network situation awareness.
[0019] Some methods fail to consider practical issues such as measurement noise, data loss, and sparse PMU deployment, resulting in a significant decrease in detection and positioning accuracy and poor robustness. Summary of the Invention
[0020] To address the issues of homogenized distribution network planning and evaluation, insufficient reliability of new element access, and difficulty in timely and accurate identification of topology changes in new power systems, this invention proposes a distribution network topology change detection method based on machine learning.
[0021] The technical solution of this invention is:
[0022] First, voltage amplitude and phase angle data of each node in the distribution network are collected using synchronous phasor measurement units (PMUs), and a basic dataset is constructed by combining this data with equipment ledgers and historical load data. Second, a Gaussian mixture model is constructed using the expectation-maximization (EM) algorithm to perform cluster analysis on the collected phasor measurement samples. By iteratively calculating the posterior probability of each phasor measurement sample belonging to different topologies, potential topology changes are preliminarily identified. Next, the average silhouette coefficient is introduced to evaluate the clustering effect, determine the total number of optimal topologies, and combine this with kernel density estimation (KDE) analysis of the timestamp distribution of phasor measurement samples to accurately pinpoint the time of topology changes. Finally, the topology type is clearly defined. This method has been validated in an IEEE 33-bus distribution network. By collecting voltage amplitude and phase angle data of each bus using PMUs and comparing the topology differences before and after changes, the location and type of changes, such as lines and new additions, are clearly identified, enabling dynamic monitoring of the distribution network topology and providing accurate data support for distribution network planning, construction, and modification.
[0023] Step 1: Construct a distribution network model based on an undirected graph, collect node voltage phasor and timestamp data, establish power injection probability distribution, clarify topology parameters and detection targets, and complete the collection of distribution network phasor measurement sample data and the construction of a standardized dataset.
[0024] A graph consisting of an undirected graph The distribution network is represented, where yes A set of nodes, where E represents the distribution network topology; nodes The linearized AC power flow equations for the power injection at the point are written as:
[0025] ;
[0026] ;
[0027] ;
[0028] ;
[0029] In the formula, , , and These are active power injection, reactive power injection, node voltage magnitude, and node phase angle, respectively. Let be the complex impedance of the branch between node i and node j. express The complex conjugate of the ; the node power injection of the balancing node is the negative of the sum of the power injections of all other nodes; , , , These are the active power injection vector, reactive power injection vector, voltage magnitude vector, and phase angle vector for all unbalanced nodes in the distribution network, respectively; i is the node whose power injection is currently being calculated, and j is the adjacent node directly connected to node i through a line. The imaginary unit;
[0030] Under normal operating conditions of the distribution network, the power injection is assumed to follow a Gaussian distribution, i.e. In the formula Let be the mean vector and covariance matrix of the power injection, respectively; for all hour, Unrelated;
[0031] make Indicates data collected from the distribution network. A set of independent and identically distributed phasor measurement samples, wherein each phasor measurement sample:
[0032] ;
[0033] In the formula, For the nth phasor measurement sample, and The first The node voltage magnitude and phase angle data in the phasor measurement sample. For the first Individual phasor measurement samples Time, ; This is the time set of voltage and phase angle phasor measurement samples; the collected data will be... The time required to acquire a phasor measurement sample is called the phasor measurement sample acquisition window.
[0034] Within a phasor measurement sample acquisition window, topological co-occurrence The topology changes were performed at the following times: ;make Represent the total number of topologies; let Indicates the first Topology Corresponding distribution network topology; total number of topology changes Change time Total number of topologies and distribution network topology All are target results.
[0035] Step 2: For each given total number of topologies K, construct a Gaussian mixture model using the Expectation-Maximization (EM) algorithm, and iteratively solve for model parameters such as the mixture coefficients, Gaussian component mean, and covariance matrix; during the iteration process, calculate the posterior probability of each phasor measurement sample belonging to different topologies; based on the maximum a posteriori probability criterion, classify all phasor measurement samples into different topology categories corresponding to the current K; complete the quantitative calculation of topology change probability and the preliminary identification of potential changes;
[0036] random variable Let X represent the topology; calculate the probability density function of X, and use the parameters of the calculated probability density function to detect topology changes and the timing of the changes; for A random vector of indicator variables, satisfying the condition for all ,and ; The range of values is ,in yes ( The standard basis vectors of the 3D real space, the 6th basis vectors, Except for one element which is 1, all other elements are 0;
[0037] event The distribution network topology is represented as , , For topology The corresponding prior probability; when the distribution network topology is When X is a random variable, the conditional distribution of X is a Gaussian distribution.
[0038] In the distribution network topology is The conditional distribution of the random variable X follows a Gaussian distribution, and its probability density function is:
[0039] ;
[0040] ;
[0041] ;
[0042] ;
[0043] ;
[0044] In the formula, Let's represent the prior probability of the k-th topology. This is the complete set of parameters for the distribution network topology. Let the Gaussian distribution parameters be for the k-th distribution network topology. , The first Mean and covariance of Gaussian components of a distribution network topology The total number of topologies, and ; Conditional probability density It is the probability density function;
[0045] The core of the expectation step is to estimate the first step. The phasor measurement sample belongs to the first... The probability of each topology, for each estimate In the expectation step of the Gaussian Mixture Model (GMM), at the 1st... In this iteration, the posterior probability is based on the parameter set obtained in the previous iteration. Perform the calculation:
[0046] ;
[0047] ;
[0048] ;
[0049] ;
[0050] In the formula, In the first In the nth iteration, the nth phasor measurement sample The posterior probability of belonging to the k-th topology. , and In the first In the next iteration, the corresponding values are the prior probability, the mean of the Gaussian component, and the covariance of the Gaussian component, respectively.
[0051] The calculated posterior probability is the core weighting coefficient for the M-step objective function optimization. Iterative updates of the prior probability, the mean of the Gaussian components, and the covariance of the Gaussian components are calculated. The updated parameters constitute the probability density function PDF, used for subsequent topology change determination, change timing estimation, and topology learning, achieving a complete connection from phasor measurement sample probability calculation to optimization and then to topology detection. The objective function is:
[0052] ;
[0053] In the formula, This represents the number of phasor measurement samples collected. To measure the sample of the nth phasor conditions, Let Z be the conditional probability density function, and Z be a K-dimensional random vector of indicator variables;
[0054] When Z is unknown, a weighted log-likelihood auxiliary function is constructed by taking the expectation of Z according to its posterior probability:
[0055]
[0056] Change Location: Based on the topology classification results output by the Gaussian mixture model in step two and the distribution network topology model built in step one, a judgment is made; for each topology change time, the corresponding topology categories before and after the time are distinguished, the differences of various topology structures are compared, and finally the specific location of the topology change is determined; distribution network topology For each change time ,from Identify the topology corresponding to the time before and after a given moment in different topologies, and then locate the specific location of the topology change.
[0057] Step 3: Calculate the average silhouette coefficient using the sample classification results corresponding to the total number of topologies obtained in Step 2, evaluate the clustering effect using the average silhouette coefficient, adaptively determine the optimal total number of topologies, and combine kernel density estimation to analyze the temporal distribution of phasor measurement samples to accurately locate the time of topology change.
[0058] Will be classified as the first The sample set of each topology is:
[0059] ;
[0060] In the formula, X is the set of all phasor measurement samples, x is a single phasor measurement sample, and K is the total number of topologies;
[0061] A phasor measurement sample Estimated as being caused by the first Seed topology generation; phasor measurement samples The average profile coefficient is denoted as The average intra-class distance is:
[0062] ;
[0063] In the formula, when ,but , For phasor measurement samples It is classified as the same topology as all others. The phasor measures the average intra-class distance between samples. for and The distance between them;
[0064] The minimum average distance is:
[0065] ;
[0066] In the formula, for All others classified as topology The minimum average distance between phasor measurement samples. Let be the set of all phasor measurement samples classified into the j-th topology. Belongs to set phasor measurement samples;
[0067] The average profile coefficient is defined as:
[0068] ;
[0069] In the formula, For the nth phasor measurement sample The average profile coefficient, For phasor measurement samples The average intra-class distance;
[0070] For each Calculate the average profile coefficient:
[0071] ;
[0072] In the formula, The maximum number of topologies;
[0073] The optimal total number of topologies is chosen to maximize the average profile coefficient:
[0074] ;
[0075] In the formula, For optimal Value, when the average profile coefficient ,and If no topology change occurs, then no topology change has occurred. By traversal The candidate range and the number of topologies that maximize the average profile coefficient are initially determined. In order to eliminate false clustering caused by random fluctuations in phasor measurement samples, the statistical discrimination of multiple topology partitions needs to be verified by threshold. If the clustering results do not meet the effective separation criteria, it means that all phasor measurement samples essentially belong to the same stable operating topology.
[0076] Based on kernel density estimation (KDE) to determine the location change time, the set of phasor measurement sample timestamps corresponding to each topology under the optimal total number of topologies is used. Construct the density function:
[0077] ;
[0078] In the formula, For bandwidth, Let be the kernel function (preferably a Gaussian kernel). The intersection of different topological density functions represents the time of topological change. The number of timestamps that are classified into topology k;
[0079] The total number of optimal topologies is obtained by solving the average profile coefficient. Next, complete the topology change detection task:
[0080] Topology change detection: The total number of optimal topologies is calculated based on step three. ;when When a topology change occurs, it is determined that a topology change has occurred; after confirming the existence of a topology change, the change timing detection process based on kernel density estimation (KDE) is initiated.
[0081] Change timing detection: Based on the kernel density estimation (KDE) content in step three, determine the change timing; analyze the sample time distribution by constructing a kernel density function, determine the topology change timing by the intersection of different topology density functions, and statistically obtain the total number of topology changes and the set of change timings.
[0082] Step 4: Verify the distribution network performance using the IEEE 33-bus PMU by collecting voltage amplitude and phase angle data from each bus. Compare the timing data of voltage amplitude and phase angle at each node collected by the synchronous phasor measurement unit (PMU) before and after the topology change, and the distribution network topology. Optimal The topology difference obtained at the time of topology change is calculated using the KDE kernel density estimation value. The accuracy is verified by combining the PMU performance classification with actual operating conditions such as measurement noise and voltage imbalance, and finally, the topology type is clearly defined and standardized.
[0083] 1) P-Class: Optimized for fast response and anti-interference capability under sudden transient conditions, but with relatively low steady-state accuracy;
[0084] 2) M-Class: Optimized for steady-state accuracy and noise immunity, but slower for tracking transient processes;
[0085] The accuracy of the synchronous phasor measurement unit (PMU) is quantified by several metrics:
[0086] 1) Total Vector Error (TVE), which combines voltage amplitude error and phase angle error;
[0087] 2) Frequency error (FE), which reflects the deviation from the true frequency of the system;
[0088] 3) Rate of change of frequency error (RFE), which reflects the deviation in dynamic frequency estimation;
[0089] Generally, the higher the noise level, the greater the total vector error (TVE); under the same conditions, the deviation of P-class is greater than that of M-class.
[0090] Features of the present invention
[0091] 1: End-to-end integrated topology change analysis solution without prior information
[0092] For the first time, this method achieves a complete analysis of the entire process—topology change detection, accurate estimation of change time, and location and type of change—based solely on PMU phasor measurement samples, without requiring any prior information such as distribution network structure, topology change timing, or historical training data. This overcomes the technical limitations of existing methods that either rely on prior information or can only achieve a single function, significantly improving the method's versatility and engineering applicability.
[0093] 2: An efficient topology change modeling and solution method integrating machine learning
[0094] This paper proposes a hierarchical machine learning architecture combining a Gaussian Mixture Model (GMM), average profile coefficient, and KDE. It innovatively models phasor measurement sample data from different distribution network topologies as a Gaussian mixture distribution. A closed-form algorithm efficiently estimates model parameters, the average profile coefficient adaptively determines the optimal number of topologies, and kernel density estimation accurately extracts change times from phasor timestamps. Compared to the complex numerical solutions of existing optimization and integer programming methods, this approach meets the near-real-time monitoring requirements of distribution networks while enabling adaptive selection of model parameters, reducing the cost of manual parameter tuning.
[0095] Advantages of this invention compared to existing technologies:
[0096] 1. Core technology design advantages: Eliminates reliance on prior information, achieving end-to-end detection solely based on PMU phasor measurement samples.
[0097] All analyses are performed using only bus voltage amplitude and phase angle phasor data collected by the PMU, without relying on easily tampered measurement data such as circuit breaker status or smart meter readings; no prior information on distribution network structure or topology change timing is required; based on Gaussian Mixture Model (GMM) topology learning, topological features are directly mined from phasor measurement sample data, achieving data-driven end-to-end analysis. This lowers the data source threshold and model training cost for engineering implementation, eliminates the need for collecting large amounts of historical data on-site, and allows for rapid deployment in distribution networks with different structures.
[0098] 2. Advantages of the algorithm design: It integrates multiple machine learning techniques, balancing accuracy and real-time performance, without complex numerical solutions.
[0099] The Expectation-Maximization (EM) algorithm is used to set the parameters of the Gaussian mixture model, and both the E-step and M-step are solved through closed equations, eliminating the need for complex numerical iterations and significantly reducing computational costs. The average silhouette coefficient is used to adaptively determine the optimal total number of topologies, while penalizing overfitting and underfitting to ensure model accuracy.
[0100] Kernel density estimation (KDE) is used to extract change times from phasor measurement sample data timestamps, resulting in high estimation accuracy. Adaptive model parameter selection reduces the cost of manual parameter tuning and improves the engineering practicality of the algorithm. The hierarchical fusion of multiple machine learning techniques ensures that the accuracy of detection, localization, and time estimation are mutually guaranteed, avoiding the limitations of a single algorithm. Attached Figure Description
[0101] Figure 1 This is a flowchart of the present invention;
[0102] Figure 2 This is the actual topology timing diagram of the present invention;
[0103] Figure 3 This is the average profile coefficient curve of the present invention. Detailed Implementation
[0104] like Figure 1 As shown, the first step is to construct a distribution network model based on an undirected graph, collect node voltage phasor and timestamp data, establish a power injection probability distribution, clarify topology parameters and detection targets, and complete the collection of distribution network phasor measurement data and the construction of a standardized dataset.
[0105] A graph consisting of an undirected graph The distribution network is represented, where yes A set of nodes, where E represents the distribution network topology. Nodes The linearized AC power flow equations for the power injection at the point can be written as:
[0106]
[0107]
[0108]
[0109]
[0110] In the formula, , , and These are active power injection, reactive power injection, node voltage magnitude, and node phase angle, respectively. Let be the complex impedance of the branch between node i and node j. express The complex conjugate of the ; the node power injection of the balancing node is the negative of the sum of the power injections of all other nodes; , , , These represent the active power injection vector, reactive power injection vector, voltage magnitude vector, and phase angle vector for all unbalanced nodes in the distribution network, respectively. `i` represents the node currently having its power injection calculated, and `j` represents the adjacent node directly connected to node `i` via a line. `E` represents the distribution network topology. It is the imaginary unit.
[0111] Under normal operating conditions of the distribution network, the power injection is assumed to follow a Gaussian distribution, i.e. In the formula Let be the mean vector and covariance matrix of the power injection, respectively. For all hour, They are unrelated.
[0112] make Indicates data collected from the distribution network. A set of independent and identically distributed phasor measurement samples, wherein each phasor measurement sample:
[0113]
[0114] In the formula, For the nth phasor measurement sample, and The first The node voltage magnitude and phase angle data in the phasor measurement sample. For the first Individual phasor measurement samples Time, . This is the time set of voltage and phase angle phasor measurement samples. The data will be collected... The time required to acquire a phasor measurement sample is called the phasor measurement sample acquisition window.
[0115] During a phasor measurement sample acquisition window, the topology may change multiple times. Within a single phasor measurement sample acquisition window, the topology may change a total of [number missing]. The topology changes were performed at the following times: .make Represents the total number of topologies, where This indicates no topology change. and They are not necessarily equal, because within the phasor measurement sample acquisition window, the topology may switch between different states multiple times, resulting in a total number of topology changes. Greater than the total number of topologies .
[0116] The second step involves using Gaussian mixture distribution modeling to calculate the probability density function of phasor measurement samples, iteratively estimating the posterior probability, and completing the quantitative calculation of topological change probability and preliminary identification of potential changes.
[0117] random variable Let X represent the topology. The probability density function of X is calculated, and in determining the total number of optimal topologies, locating the time of change, and clarifying the topology type, the parameters of the probability density function are used to classify samples, determine the total number of optimal topologies, locate the time of change, and invert the topology structure to pinpoint the change location. The calculated parameters of the probability density function (PDF) are used to detect topology changes and their timing. for A random vector of indicator variables, satisfying the condition for all ,and . The range of values is ,in yes ( The standard basis vectors of the 3D real space, the 6th basis vectors, Except for one element which is 1, all other elements are 0.
[0118] event The distribution network topology is represented as , , For topology The corresponding prior probabilities. When the distribution network topology is When X is a random variable, its conditional distribution is a Gaussian distribution.
[0119] In the distribution network topology is The conditional distribution of the random variable X follows a Gaussian distribution, and its probability density function is:
[0120]
[0121]
[0122]
[0123]
[0124]
[0125] In the formula, Let's represent the prior probability of the k-th topology. This is the complete set of parameters for the distribution network topology. Let the Gaussian distribution parameters be for the k-th distribution network topology. , The first Mean and covariance of Gaussian components of a distribution network topology The total number of topologies, and . Conditional probability density Let be the probability density function.
[0126] The core of the expectation step is to estimate the first step. The phasor measurement sample belongs to the first... The probability of each topology, for each estimate In the expectation step of the Gaussian Mixture Model (GMM), at the th... In this iteration, the posterior probability is based on the complete set of parameters obtained in the previous iteration. Perform the calculation:
[0127]
[0128]
[0129] In the formula, In the first In the nth iteration, the nth phasor measurement sample The posterior probability of belonging to the k-th topology. , and In the first In the next iteration, the corresponding values are the prior probability, the mean of the Gaussian component, and the covariance of the Gaussian component, respectively.
[0130] The calculated posterior probability is the core weighting coefficient for the M-step objective function optimization. Iterative updates of the prior probability, the mean of the Gaussian components, and the covariance of the Gaussian components are calculated. The updated parameters constitute the probability density function PDF, used for topology count determination and change time estimation, achieving a complete connection from phasor measurement sample probability calculation to optimization and then to topology detection. The objective function is:
[0131]
[0132] In the formula, This represents the number of phasor measurement samples collected. To measure the sample of the nth phasor conditions, Let Z be the conditional probability density function, and Z be a K-dimensional indicator variable random vector.
[0133] This formula is the core objective function of the algorithm. Its function is to construct a weighted log-likelihood auxiliary function by calculating the expectation of Z based on its posterior probability when Z is unknown.
[0134]
[0135] In the detection of topology changes in distribution networks, the calculated posterior probability of sample affiliation is the core weighting coefficient of the objective function. It quantifies the confidence that each phasor measurement sample belongs to a different topology, transforming the original problem, which cannot be directly solved due to the unknown topology of the sample, into an optimizable weighted log-likelihood auxiliary function. This function determines the contribution of each sample to the updating of model parameters such as prior probability, mean, and covariance, forming an iterative closed loop of "calculating weights - optimizing parameters". Ultimately, it provides a model basis for subsequent determination of the total number of topologies and estimation of the time of change.
[0136] Step 3: Calculate the average profile coefficient using the sample classification results corresponding to the total number of topologies obtained in Step 2. Use the average profile coefficient to evaluate the clustering effect, adaptively determine the optimal total number of topologies, and combine kernel density estimation to analyze the temporal distribution of phasor measurement samples to accurately locate the time of topology change.
[0137] Will be classified as the first The sample set of each topology is:
[0138]
[0139] In the formula, X is the set of all phasor measurement samples, x is a single phasor measurement sample, and K is the total number of topologies.
[0140] A phasor measurement sample Estimated as being caused by the first Topology generation. Phasor measurement samples. The average profile coefficient is denoted as The average intra-class distance is:
[0141]
[0142] In the formula, when ,but . For phasor measurement samples It is classified as the same topology as all others. The phasor measures the average intra-class distance between samples. for and The distance between them.
[0143] The minimum average distance is:
[0144]
[0145] In the formula, for All others classified as topology The minimum average distance between phasor measurement samples. Let be the set of all phasor measurement samples classified into the j-th topology. Belongs to set Phasor measurement samples.
[0146] The average profile coefficient is defined as:
[0147]
[0148] In the formula, For the nth phasor measurement sample The average profile coefficient, For phasor measurement samples The average intra-class distance.
[0149] In the case of overfitting, the average intra-class distance and The minimum mean distance is low. However, in the case of underfitting, both the mean intra-class distance and the minimum mean distance are high. Therefore, for both underfitting and overfitting cases, Both are low. Under a good fit, ,therefore The closer the value is to 1, the better.
[0150] For each Calculate the average profile coefficient:
[0151]
[0152] In the formula, The maximum number of topologies. ;
[0153] optimal The value is chosen to maximize the average profile coefficient:
[0154]
[0155] In the formula, For optimal Value, when the average profile coefficient Threshold = 0.45, and Then there is no topology change; By traversal The candidate range and the number of topologies that maximize the average profile coefficient are initially determined. In order to eliminate false clustering caused by random fluctuations in phasor measurement samples, the statistical discrimination of multiple topology partitions needs to be verified by threshold. If the clustering results do not meet the effective separation criteria, it means that all phasor measurement samples essentially belong to the same stable operating topology.
[0156] Based on kernel density estimation (KDE) to determine the location change time, the set of phasor measurement sample timestamps corresponding to each topology under the optimal total number of topologies is used. Construct the density function:
[0157]
[0158] In the formula, For bandwidth, Let be the kernel function (preferably a Gaussian kernel). The intersection of different topological density functions represents the time of topological change. The number of timestamps that are classified as topology k.
[0159] Step 4: Employing the PMU performance grading verification method, distinguishing between Class P and Class M measurement characteristics, and combining the effects of voltage imbalance and measurement noise, complete the topology type verification and accuracy index analysis. Step 1 provides the timing data of voltage amplitude and phase angle at each node, and the distribution network topology. Step 2 provides the mean and covariance of the Gaussian components corresponding to each topology. Step 3 uses the total number of optimal topologies and the topology change time obtained from KDE kernel density estimation to complete the topology type verification and accuracy index analysis, ultimately clarifying the topology change type.
[0160] The constructed 33-node distribution network exhibits a voltage imbalance of approximately 2%, caused by three-phase load imbalance. This invention considers PMU measurement noise and its impact on phasor estimation under noisy and dynamic distribution network conditions.
[0161] By comparing the voltage amplitude and phase angle time-series data of each node collected by the PMU before and after the topology change, and the distribution network topology... Total number of optimal topologies The topology differences obtained at the time of topology change through KDE kernel density estimation are combined with the PMU performance classification and actual operating conditions such as measurement noise and voltage imbalance to complete the accuracy verification, and finally achieve the clear and standardized output of topology type.
[0162] There are two performance levels: Class P and Class M. The core difference between the two lies in the different trade-offs between response speed and measurement accuracy.
[0163] 1) P-Class: Optimized for fast response and anti-interference capability under sudden transient conditions, but with relatively low steady-state accuracy.
[0164] 2) M-Class: Optimized for steady-state accuracy and noise immunity, but slower for tracking transient processes.
[0165] The accuracy of the synchronous phasor measurement unit (PMU) is quantified by several metrics:
[0166] 1) Total Vector Error (TVE), which combines amplitude error and phase error;
[0167] 2) Frequency error (FE), which reflects the deviation from the true frequency of the system;
[0168] 3) Frequency change rate error (RFE) reflects the deviation in frequency dynamic estimation.
[0169] Generally, the higher the noise level, the greater the total vector error (TVE); under the same conditions, the deviation of a Class P MU is greater than that of a Class M MU.
[0170] Appendix Figure 2 Real topology timing diagram
[0171] This figure shows the time-series curve of the distribution network topology state changing over time. The horizontal axis represents the sampling timestamp, and the vertical axis represents the distribution network topology state identifier. The curve clearly shows a significant state jump at timestamp 3160, intuitively reflecting the topology change that occurred at that moment. The changes before and after the change correspond to two stable topology operating states, providing a direct and accurate reference for locating the topology change time, which perfectly matches the change time obtained from kernel density estimation.
[0172] It is used to intuitively present the trend of the topology status of the distribution network over time within the sampling window, clearly mark the preset time nodes of topology changes, and provide a real reference for the time of change.
[0173] Appendix Figure 3 Average profile coefficient curve
[0174] This figure shows the trend curve of the average profile coefficient as a function of the total number of topologies. The horizontal axis represents the total number of topologies set by the Gaussian mixture model, and the vertical axis represents the average profile coefficient value. The curve shows a trend of first rising and then falling, reaching a peak of 0.72 when the total number of topologies is 2. This peak value is the optimal clustering decision point. Based on this, the optimal total number of topologies for the distribution network within the sampling window is determined to be 2, effectively avoiding the problems of model overfitting and underfitting, and providing an accurate basis for the total number of topologies for subsequent topology change detection and location.
[0175] Using the total number of topologies as the x-axis and the average profile coefficient as the y-axis, the clustering effect is reflected under different total numbers of topologies. The peak of the curve corresponds to the optimal total number of topologies, providing a quantitative basis for adaptively determining the topology category.
[0176] Implementation Case:
[0177] In the IEEE 33-node distribution network simulation, following the patented technical solution, node voltage amplitude and phase angle data are collected through a PMU. A Gaussian mixture model is constructed using a 200-iteration expectation-maximization algorithm to complete phasor data clustering. Combined with... Figure 3 The average profile coefficient curve shows that it reaches a peak of 0.72 when the total number of topologies is 2, based on which the optimal total number of topologies is determined; combined with... Figure 2 The actual topology time sequence diagram, through kernel density estimation, accurately locates the time of topology changes, perfectly matching the preset timestamp 3160. By comparing the topology structure, the location and type of change are clearly identified. Even in non-ideal scenarios such as data packet loss and sparse PMU deployment, the accuracy of change detection and location remains 100%, with the false location rate controlled below 12%. This verifies the effectiveness of the method in achieving integrated topology change detection, time estimation, and location without prior network information, demonstrating good engineering applicability.
Claims
1. A method for detecting topology changes in a distribution network based on machine learning, characterized in that: First, voltage amplitude and phase angle data of each node in the distribution network are collected by synchronous phasor measurement units (PMUs), and a basic dataset is constructed by combining equipment ledgers and historical load data. Second, a Gaussian mixture model is constructed using the expectation-maximization (EM) algorithm to perform cluster analysis on the collected phasor measurement sample data. By iteratively calculating the posterior probability of phasor measurement samples belonging to different topologies, potential topology changes are preliminarily identified. Next, the average profile coefficient is introduced to evaluate the clustering effect, determine the total number of optimal topologies, and combine kernel density estimation (KDE) to analyze the timestamp distribution of phasor measurement samples to accurately locate the time of topology change. Finally, the topology type is clarified, and the topology type is verified by collecting voltage amplitude and phase angle data of each bus by synchronous phasor measurement units (PMUs), comparing the topology differences before and after the change, clarifying the location and type of changes such as lines and new additions, and realizing the verification of the distribution network topology type.
2. The distribution network topology change detection method based on machine learning according to claim 1, characterized in that: Step 1: Construct a distribution network model based on an undirected graph, collect node voltage phasor and timestamp data, establish power injection probability distribution, clarify topology parameters and detection targets, and complete the collection of distribution network phasor measurement sample data and the construction of a standardized dataset. A graph consisting of an undirected graph The distribution network is represented, where yes A set of nodes, where E represents the distribution network topology; nodes The linearized AC power flow equations for the power injection at the point are written as: ; ; ; ; In the formula, , , and These are active power injection, reactive power injection, node voltage magnitude, and node phase angle, respectively. Let be the complex impedance of the branch between node i and node j. express The complex conjugate of the ; the node power injection of the balancing node is the negative of the sum of the power injections of all other nodes; , , , These are the active power injection vector, reactive power injection vector, voltage magnitude vector, and phase angle vector for all unbalanced nodes in the distribution network, respectively; i is the node whose power injection is currently being calculated, and j is the adjacent node directly connected to node i through a line. The imaginary unit; Under normal operating conditions of the distribution network, the power injection is assumed to follow a Gaussian distribution, i.e. In the formula Let be the mean vector and covariance matrix of the power injection, respectively; for all hour, Unrelated; make Indicates data collected from the distribution network. A set of independent and identically distributed phasor measurement samples, wherein each phasor measurement sample: ; In the formula, For the nth phasor measurement sample, and The first The node voltage magnitude and phase angle data in the phasor measurement sample. For the first Individual phasor measurement samples Time, ; This is the time set of voltage and phase angle phasor measurement samples; the collected data will be... The time required to acquire a phasor measurement sample is called the phasor measurement sample acquisition window. Within a phasor measurement sample acquisition window, topological co-occurrence The topology changes were performed at the following times: ; make Represent the total number of topologies; let Indicates the first Topology Corresponding distribution network topology; total number of topology changes Change time Total number of topologies and distribution network topology All are target results.
3. The distribution network topology change detection method based on machine learning according to claim 1, characterized in that: Step 2: For each given total number of topologies K, construct a Gaussian mixture model using the expectation-maximization (EM) algorithm, and iteratively solve for model parameters such as mixture coefficients, mean of Gaussian components, and covariance matrix; during the iteration process, calculate the posterior probability of each phasor measurement sample belonging to different topologies; based on the maximum a posteriori probability criterion, classify all phasor measurement samples into the different topology categories corresponding to the current K. Complete the quantitative calculation of the probability of topology changes and the preliminary identification of potential changes; random variable Let X represent the topology; calculate the probability density function of X, and use the parameters of the calculated probability density function to detect topology changes and the timing of the changes; for A random vector of indicator variables, satisfying the condition for all ,and ; The range of values is ,in yes ( The standard basis vectors of the 3D real space, the 6th basis vectors, Except for one element which is 1, all other elements are 0; event The distribution network topology is represented as , , For topology The corresponding prior probability; when the distribution network topology is When X is a random variable, the conditional distribution of X is a Gaussian distribution. In the distribution network topology is The conditional distribution of the random variable X follows a Gaussian distribution, and its probability density function is: ; ; ; ; ; In the formula, Let's represent the prior probability of the k-th topology. This is the complete set of parameters for the distribution network topology. Let the Gaussian distribution parameters be for the k-th distribution network topology. , The first Mean and covariance of Gaussian components of a distribution network topology The total number of topologies, and ; Conditional probability density It is the probability density function; The core of the expectation step is to estimate the first step. The phasor measurement sample belongs to the first... The probability of each topology, for each estimate In the expectation step of the Gaussian Mixture Model (GMM), at the 1st... In this iteration, the posterior probability is based on the parameter set obtained in the previous iteration. Perform the calculation: ; ; ; ; In the formula, In the first In the nth iteration, the nth phasor measurement sample The posterior probability of belonging to the k-th topology. , and In the first In the next iteration, the corresponding values are the prior probability, the mean of the Gaussian component, and the covariance of the Gaussian component, respectively. The calculated posterior probability is the core weighting coefficient for the M-step objective function optimization. Iterative updates of the prior probability, the mean of the Gaussian component, and the covariance of the Gaussian component are calculated. The updated parameters are the components of the probability density function PDF, which are used for subsequent topology change determination, change time estimation, and topology learning, realizing a complete connection from phasor measurement sample probability calculation to optimization and then to topology detection. The objective function is: ; In the formula, This represents the number of phasor measurement samples collected. To measure the sample of the nth phasor conditions, Let Z be the conditional probability density function, and Z be a K-dimensional random vector of indicator variables; When Z is unknown, a weighted log-likelihood auxiliary function is constructed by taking the expectation of Z according to its posterior probability: ; Change Location: Based on the topology classification results output by the Gaussian mixture model in step two and the distribution network topology model built in step one, a judgment is made; for each topology change time, the corresponding topology categories before and after the time are distinguished, the differences of various topology structures are compared, and finally the specific location of the topology change is determined; distribution network topology For each change time ,from Identify the topology corresponding to the time before and after a given moment in different topologies, and then locate the specific location of the topology change.
4. The distribution network topology change detection method based on machine learning according to claim 1, characterized in that: Step 3: Calculate the average silhouette coefficient using the sample classification results corresponding to the total number of topologies obtained in Step 2, evaluate the clustering effect using the average silhouette coefficient, adaptively determine the optimal total number of topologies, and combine kernel density estimation to analyze the temporal distribution of phasor measurement samples to accurately locate the time of topology change. Will be classified as the first The sample set of each topology is: ; In the formula, X is the set of all phasor measurement samples, x is a single phasor measurement sample, and K is the total number of topologies; A phasor measurement sample Estimated as being caused by the first Seed topology generation; phasor measurement samples The average profile coefficient is denoted as The average intra-class distance is: ; In the formula, when ,but , For phasor measurement samples It is classified as the same topology as all others. The phasor measures the average intra-class distance between samples. for and The distance between them; The minimum average distance is: ; In the formula, for All others classified as topology The minimum average distance between phasor measurement samples. Let be the set of all phasor measurement samples classified into the j-th topology. Belongs to set phasor measurement samples; The average profile coefficient is defined as: ; In the formula, For the nth phasor measurement sample The average profile coefficient, For phasor measurement samples The average intra-class distance; For each Calculate the average profile coefficient: ; In the formula, The maximum number of topologies; The optimal total number of topologies is chosen to maximize the average profile coefficient: ; In the formula, For optimal Value, when the average profile coefficient ,and If no topology change occurs, then no topology change has occurred. By traversal The candidate range and the number of topologies that maximize the average profile coefficient are initially determined. In order to eliminate false clustering caused by random fluctuations in phasor measurement samples, the statistical discrimination of multiple topology partitions needs to be verified by threshold. If the clustering results do not meet the effective separation criteria, it means that all phasor measurement samples essentially belong to the same stable operating topology. Based on kernel density estimation (KDE) to determine the location change time, the set of phasor measurement sample timestamps corresponding to each topology under the optimal total number of topologies is used. Construct the density function: ; In the formula, For bandwidth, Let be the kernel function (preferably a Gaussian kernel). The intersection of different topological density functions represents the time of topological change. The number of timestamps that are classified into topology k; The total number of optimal topologies is obtained by solving the average profile coefficient. Next, complete the topology change detection task: Topology change detection: The total number of optimal topologies is calculated based on step three. ;when When a topology change occurs, it is determined that a topology change has occurred; after confirming the existence of a topology change, the change timing detection process based on kernel density estimation (KDE) is initiated. Change timing detection: Based on the kernel density estimation (KDE) content in step three, determine the change timing; analyze the sample time distribution by constructing a kernel density function, determine the topology change timing by the intersection of different topology density functions, and statistically obtain the total number of topology changes and the set of change timings.
5. The distribution network topology change detection method based on machine learning according to claim 1, characterized in that: Step 4: Verify the distribution network performance using the IEEE 33-bus PMU by collecting voltage amplitude and phase angle data from each bus. Compare the timing data of voltage amplitude and phase angle at each node collected by the synchronous phasor measurement unit (PMU) before and after the topology change, and the distribution network topology. Optimal The topology difference obtained at the time of topology change is calculated using the KDE kernel density estimation value. The accuracy is verified by combining the PMU performance classification with actual operating conditions such as measurement noise and voltage imbalance, and finally, the topology type is clearly defined and standardized. 1) P-Class: Optimized for fast response and anti-interference capability under sudden transient conditions, but with relatively low steady-state accuracy; 2) M-Class: Optimized for steady-state accuracy and noise immunity, but slower for tracking transient processes; The accuracy of the synchronous phasor measurement unit (PMU) is quantified by several metrics: 1) Total Vector Error (TVE), which combines voltage amplitude error and phase angle error; 2) Frequency error (FE), which reflects the deviation from the true frequency of the system; 3) Rate of change of frequency error (RFE), which reflects the deviation in dynamic frequency estimation; Generally, the higher the noise level, the greater the total vector error (TVE); under the same conditions, the deviation of P-class is greater than that of M-class.