Line impedance calculation and abnormity study and judgment method based on data correction of power utilization terminal and electric energy meter

By correcting and optimizing the data from power terminals and electricity meters, and combining Gaussian mixture models and the Squirrel Optimization Algorithm, the problems of data quality and threshold dependence in impedance calculation and anomaly detection in low-voltage distribution substations have been solved, achieving more accurate impedance calculation and reliable anomaly identification.

CN121749124APending Publication Date: 2026-03-27YANTAI DONGFANG WISDOM ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, inaccurate topology identification of low-voltage distribution substations leads to distorted impedance calculations, and the reliance on fixed thresholds for anomaly detection results in a high false positive rate.

Method used

By detecting and correcting outliers in the data of electricity terminals and electricity meters, identifying the relationship between households and transformers by combining principal component analysis and Gaussian mixture model, constructing an impedance model and calculating impedance parameters using the tunic optimization algorithm, and using isolated forest and confidence interval for dual anomaly judgment.

Benefits of technology

It improves the accuracy of impedance calculation and the reliability of anomaly detection, reduces false alarm rate and false negative rate, and ensures data quality and topology accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_6
    Figure QLYQS_6
  • Figure QLYQS_7
    Figure QLYQS_7
  • Figure QLYQS_8
    Figure QLYQS_8
Patent Text Reader

Abstract

The invention discloses a line impedance calculation and anomaly study and judgment method based on data correction of an electric terminal and an electric energy meter, and relates to the technical field of analysis, operation and maintenance of an electric power system. The method comprises the following steps: carrying out abnormal value detection and polynomial fitting correction on voltage and power time sequence data collected by an electric energy meter; based on the corrected voltage data, preliminarily identifying a user-transformer relation through principal component analysis and Gaussian mixture model clustering, and correcting a real subordinate transformer area of a user in combination with a Pearson's correlation coefficient; constructing an impedance optimization model according to the corrected topology and the corrected data, and solving line impedance parameters by adopting a doliolaria optimization algorithm; and finally, based on historical impedance data, carrying out anomaly study and judgment through a dual mechanism of'isolated forest initial check + confidence interval recheck '. According to the method, the original data quality and the topology identification accuracy are improved, the robustness calculation of the impedance parameters is realized, and the abnormal misjudgment rate is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system analysis and maintenance technology, specifically to a method for calculating line impedance and identifying anomalies based on data correction from power terminals and electricity meters. Background Technology

[0002] As the final link in the power supply network, low-voltage distribution transformer substations directly face power users, and their operational status directly affects power supply quality and safety. Line impedance is a key parameter reflecting the electrical characteristics of a transformer substation. Accurate impedance calculation not only provides fundamental data for line condition monitoring, line loss analysis, and fault location, but also serves as crucial support for achieving lean and intelligent management of the distribution network. Therefore, accurate calculation of line impedance and subsequent anomaly assessment have significant engineering practical value.

[0003] Traditional impedance calculation and anomaly assessment methods typically follow a "topology first, modeling second, judgment third" technical approach. Specifically, firstly, based on voltage measurement data from user electricity meters and transformers, correlation analysis of voltage curves or clustering algorithms are used to group electricity meters with high similarity into the same branch or phase, thereby inferring the topological connection relationship of the transformer area, or directly obtaining the topology from archives. After obtaining the topology, a corresponding linear impedance model is established based on Kirchhoff's laws, and algorithms such as linear regression are used to estimate the line's resistance and reactance parameters. Finally, the calculated impedance value is compared with a preset empirical threshold to determine whether there is an anomaly in the line. The core premise of this method is that the topological relationship is accurate and the measurement data is reliable.

[0004] However, in actual transformer substation operation, user profiles are often outdated or inconsistent with the actual situation, leading to deviations in the topology obtained based on profiles or simple similarity analysis. Since the topology is the foundation for all subsequent calculations, its inaccuracy directly impacts the impedance model, distorting parameter identification results and affecting the effectiveness of anomaly assessment. Numerous studies have addressed this fundamental problem of inaccurate topology identification. For example, Liang Jingchao et al. improved clustering algorithms and combined voltage curve similarity calculations to achieve full-level topology identification from transformers to users (Liang Jingchao, Wei Bin, Meng Runquan et al., A Topology Identification Method for Low-Voltage Distribution Substations Based on DPK-means and Membership Factors, Power Grid and Clean Energy, 2025); Chen Jielong used Wasserstein distance to handle missing data, combined graph convolutional networks to improve identification accuracy, and further integrated topology identification with operational optimization, forming a more complete technical solution (Chen Jielong, Research on Low-Voltage Topology Identification and Optimization Adjustment Strategies for Distribution Substations, Guangdong University of Technology, 2025).

[0005] Despite progress in methodological innovation and process closure for topology identification, two pressing issues remain in supporting high-precision impedance calculation and reliable anomaly detection. First, most existing methods assume that the acquired voltage and current data are complete and accurate, lacking a systematic mechanism to address outliers in the raw measurement data. In actual operation, data gaps, noise interference, and outliers are unavoidable. If these data quality issues are not effectively detected and corrected, they will directly affect the accuracy of topology identification and subsequent impedance calculation. Second, in the anomaly detection stage, current methods still rely on manually set empirical thresholds. However, impedance estimates themselves fluctuate normally due to load variations and measurement errors. Simply relying on fixed thresholds makes it difficult to effectively distinguish these normal fluctuations from genuine fault characteristics such as line damage or poor contact, leading to high false alarm or false negative rates. Summary of the Invention

[0006] This invention proposes a method for calculating line impedance and identifying anomalies based on data correction from power terminals and electricity meters. The purpose is to solve the problems in the prior art where the calculation accuracy is affected by outliers in the original measurement data, and the high misjudgment rate of anomaly identification is caused by relying on fixed empirical thresholds.

[0007] The technical solution of this invention is as follows:

[0008] A method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters includes:

[0009] Step S1: Detect and correct the electricity consumption time sequence data of users in the distribution area obtained through the electricity meter and electricity consumption information collection system to obtain the corrected electricity consumption time sequence data;

[0010] Electricity consumption time-series data should include at least voltage time-series data and power time-series data;

[0011] Step S2: Based on the corrected voltage time series data, identify the relationship between low-voltage transformer substations and households by combining principal component analysis with Gaussian mixture model clustering;

[0012] Step S3: Based on the corrected electricity consumption time sequence data and the relationship between households and transformers, an impedance model is constructed based on circuit laws, and the impedance parameters of each branch line in the low-voltage distribution area are calculated using the Zunhaiqiao optimization algorithm.

[0013] Step S4: Based on historical line impedance data, a dual mechanism of "isolated forest initial inspection + confidence interval re-inspection" is adopted to make anomaly judgment on the currently calculated impedance value.

[0014] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, step S1 includes:

[0015] Step S1.1: Collect the power consumption time sequence data of the busbar and all users in the target low-voltage distribution area within the set time period;

[0016] Step S1.2: For each electricity consumption time-series data point, detect the original outliers based on the box plot principle; the specific process is as follows:

[0017] Calculate the lower quartile of this electricity consumption time-series data. and upper quartiles This leads to the interquartile range. Upper edge threshold and lower edge threshold :

[0018] ;

[0019] ;

[0020] ;

[0021] If the value at a certain moment in the electricity consumption time sequence data is greater than the corresponding value... or less If so, the value is determined to be an original outlier.

[0022] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, step S1 further includes:

[0023] Step S1.3: Mark all indices that are determined to be original outliers, and mark the indices of missing values;

[0024] Step S1.4: For electricity consumption time series data with original outliers or missing values, a polynomial model is fitted using the least squares method based on its unlabeled normal data values ​​to describe the normal trend of the electricity consumption time series data.

[0025] Step S1.5: Substitute the indices of the original outliers and missing values ​​into the polynomial model fitted in step S1.4, calculate the corresponding function values, and use them to replace the original outliers or fill in the missing values, thereby obtaining the corrected electricity consumption time series data.

[0026] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, step S2 includes:

[0027] Step S2.1: Perform maximum and minimum value normalization on the corrected voltage time series data of the target transformer area bus and all users to eliminate the impact of differences in dimensions and numerical ranges on subsequent analysis;

[0028] Step S2.2: Principal component analysis is used to reduce the dimensionality of the normalized voltage time series data of the target transformer area bus and all users to obtain a feature matrix. Each row of the feature matrix corresponds to the transformer area bus or a user, and the data in each row constitutes the feature vector of the transformer area bus or the user.

[0029] Step S2.3: Perform probability distribution clustering on the feature vectors obtained in step S2.2 using a Gaussian mixture model;

[0030] After clustering is completed, the cluster containing the feature vector of the target transformer area bus is found, and users who do not belong to the cluster are marked as "suspect users".

[0031] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, step S2 also includes:

[0032] Step S2.4: For each suspected user identified in step S2.3, retrieve its voltage time-series data and the bus voltage time-series data of other geographically adjacent transformer substations; calculate the Pearson correlation coefficient between the suspected user's voltage time-series data and the bus voltage time-series data of each adjacent transformer substation, sort all the calculated correlation coefficients from largest to smallest, and determine the adjacent transformer substation corresponding to the largest correlation coefficient as the actual substation to which the suspected user belongs, thereby completing the correction of the user-transformer relationship.

[0033] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, step S3 includes:

[0034] Step S3.1: Treat the three-phase user as three independent single-phase users for processing;

[0035] Step S3.2: Construct the impedance calculation model for the branch line; according to the phasor form of Ohm's law, at any given time, for a branch line, its upstream node voltage... Downstream user node voltage With line current Line impedance The following relationship must be satisfied:

[0036] ;

[0037] in, , This indicates the resistance value of that branch line. This indicates the reactance value of the branch line; This refers to the voltage phasor of the upstream node of the branch line, i.e., the bus. Voltage phasors collected by smart meters for downstream users. This is the current phasor of the branch line;

[0038] Step S3.3: Based on the phasor relationship in step S3.2, define the effective value of the upstream node voltage of the branch line. The calculation formula is as follows:

[0039] ;

[0040] in, In the formula, This represents the effective voltage value of each user downstream of the branch line after they are merged into a virtual node, calculated based on the effective voltage value of each user. This represents the total current amplitude of the branch line; and These are the active power and reactive power at the virtual node, respectively, calculated based on the active power and reactive power of each user. and The resistance and reactance values ​​of this branch line;

[0041] Step S3.4: Based on the household-transformer relationship, obtain the downstream users of this branch line from the corrected electricity consumption time sequence data. Measured data at different times, including: voltage, active power, and reactive power; calculate the values ​​at each time point. RMS voltage of virtual nodes Active power reactive power and the corresponding total current amplitude Substitute the data from each time point into the calculation formula in step S3.3 to construct a set containing... A system of equations with equations and unknowns. and ;

[0042] Step S3.5: Transform the impedance parameter solution into an optimization problem to determine the goodness of fit. As the objective function, it measures the degree of closeness between the estimated and measured values ​​of the effective value of the upstream node voltage;

[0043] Step S3.6: Use the tunic optimization algorithm to solve for... Maximize and .

[0044] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, the goodness of fit is... The calculation method is as follows:

[0045] ;

[0046] In the above formula, According to time RMS voltage Active power reactive power as well as and The current estimate is the estimated value of the upstream node voltage RMS value obtained through the calculation formula in step S3.3. For a moment Measured value of the effective value of the upstream node voltage. The effective value of the upstream node voltage at this The average value at each time point.

[0047] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, step S4 includes:

[0048] Step S4.1: Prepare historical impedance dataset;

[0049] For the target branch line, collect its historical impedance values ​​over a certain historical period to form a historical impedance dataset. Historical impedance dataset It includes impedance values ​​labeled "normal" and "abnormal";

[0050] Step S4.2: Construct an isolated forest model, in order to The isolated forest model was trained using the isolated forest model as a training set, and the isolated forest model was used for preliminary anomaly detection.

[0051] Input the current impedance value to be analyzed. In the isolated forest model, a preliminary judgment result is obtained; if the preliminary judgment is "abnormal", then proceed to step 4.3; otherwise, the impedance value to be judged is judged as "normal", and step S4 ends.

[0052] Step S4.3: Construct confidence intervals based on the normal impedance values ​​in the historical impedance dataset;

[0053] Step S4.4: If the current impedance value to be analyzed... If the value falls within the confidence interval, the impedance value to be analyzed is considered "normal"; otherwise, it is considered "abnormal".

[0054] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, step S4.3 includes:

[0055] First, from historical datasets In the process, all impedance values ​​marked as "normal" are extracted to form a subset of historical normal impedance values. ;

[0056] Secondly, for Perform the Shapiro-Wilk normality test;

[0057] If the test result is If it follows a normal distribution, then calculate its mean. and standard deviation Then based on the mean and standard deviation Construct confidence intervals;

[0058] like If the probability density curve does not follow a normal distribution, a kernel density estimation method is used to fit it, and the impedance values ​​corresponding to the first and second preset probability thresholds are taken as the lower bound of the normal fluctuation range. and the Upper Realm Construct confidence intervals: .

[0059] As a further improvement to the method for calculating line impedance and identifying anomalies based on data from electricity terminals and electricity meters, in step S4.3:

[0060] Based on mean and standard deviation The confidence interval is constructed as follows: ;

[0061] The first preset probability threshold is The second preset probability threshold is .

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

[0063] 1. This invention effectively eliminates the influence of outliers and missing values ​​caused by noise, interference or transmission problems during the data acquisition process by systematically detecting outliers and correcting them with polynomial fitting on the original power consumption time series data. This ensures the data quality foundation for all subsequent calculation and analysis stages and provides a prerequisite guarantee for solving the technical problem of inaccurate topology identification and impedance calculation caused by data quality issues.

[0064] 2. This invention first performs principal component analysis to reduce the dimensionality of bus and user voltage time-series data to extract core features, and then combines this with a Gaussian mixture model for probability distribution clustering. This allows for the preliminary and efficient identification of suspected users whose characteristics differ significantly from those of their respective transformer area bus data. To further correct identification errors caused by clustering bias or complex on-site conditions, this method also introduces a neighboring transformer area comparison step based on the Pearson correlation coefficient. By quantifying the linear correlation between the voltage curve of a suspected user and the bus voltage curves of multiple neighboring transformer areas, its true affiliation can be accurately determined. This dual verification mechanism significantly improves the accuracy of user-transformer relationship identification and lays a reliable topological foundation for subsequently establishing an accurate line impedance model.

[0065] 3. This invention constructs an impedance optimization model based on Kirchhoff's voltage law and transforms the parameter solution into an optimization problem aimed at maximizing the goodness of fit. To address this problem, traditional methods such as linear regression, which may get trapped in local optima or be sensitive to initial conditions, are abandoned. Instead, a tunicate optimization algorithm is introduced for solving the problem. This algorithm simulates the foraging behavior of tunicate colonies, exhibiting strong global search capabilities and fast convergence speed. It can effectively handle nonlinear relationships caused by load fluctuations, thereby more stably and accurately identifying the resistance and reactance parameters of the line, improving the robustness and accuracy of impedance calculation.

[0066] 4. To address the issue of high false alarm or false negative rates caused by over-reliance on fixed thresholds in anomaly assessment, this invention proposes a dual assessment mechanism of "isolated forest initial detection + confidence interval re-detection." First, the isolated forest algorithm is used for rapid preliminary detection of the current impedance value. This algorithm excels at identifying isolated points that significantly differ from most data patterns. Then, for results initially identified as anomaly, instead of being directly adopted, a dynamic confidence interval is constructed based on the statistical distribution characteristics of historical normal impedance data for secondary verification. This dual mechanism effectively distinguishes between reasonable impedance fluctuations caused by normal load fluctuations and minor measurement errors, and genuine line anomalies. It significantly reduces the risk of misjudgment caused by relying solely on algorithms or fixed thresholds, making anomaly assessment conclusions more reliable and credible. Detailed Implementation

[0067] The technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0068] A method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters is proposed. Through data preprocessing, accurate identification of household-transformer relationships, optimized line impedance calculation, and dual anomaly assessment, this method achieves accurate calculation and reliable assessment of line impedance in low-voltage distribution areas. The specific implementation steps are as follows:

[0069] Step S1: Detect and correct the electricity consumption time-series data of users in the transformer area obtained through the electricity meter and electricity consumption information collection system to obtain corrected electricity consumption time-series data. The electricity consumption time-series data includes voltage time-series data, current time-series data, power time-series data, and electricity consumption time-series data.

[0070] To eliminate the interference of raw outliers and missing values ​​caused by meter malfunctions, communication interference, or data entry errors on subsequent analysis, a box plot-based method was used to detect raw outliers, and polynomial fitting was used to correct raw outliers and missing values. Specifically, this included:

[0071] Step S1.1: Collect the power consumption time sequence data of the busbar and all users in the target low-voltage distribution area within the set time period, including voltage, current, power and power consumption.

[0072] Step S1.2: For each power consumption time series data (such as voltage series), detect the original outliers based on the box plot principle.

[0073] The specific process is as follows: Calculate the lower quartile of the electricity consumption time-series data. (25th percentile) and upper quartile (75th percentile), and then the interquartile range is obtained. Upper edge threshold and lower edge threshold .

[0074] ;

[0075] ;

[0076] ;

[0077] In the above formula, This represents the lower quartile of the electricity consumption time-series data. This represents the upper quartile of the electricity consumption time-series data. The interquartile range (IQR) measures the dispersion of data. and These are used as the upper and lower edge thresholds for determining the original outlier values, respectively.

[0078] If the value at a certain moment in the electricity consumption time sequence data is greater than the corresponding value... or less If so, the value is determined to be an original outlier.

[0079] Step S1.3: Mark all indices that are determined to be original outliers, and mark the indices of missing values.

[0080] Step S1.4: For electricity consumption time series data with original outliers or missing values, based on its unlabeled normal data values, use the least squares method to fit a polynomial model of appropriate degree to describe the normal trend of the electricity consumption time series data.

[0081] Step S1.5: Substitute the indices of the original outliers and missing values ​​into the polynomial model fitted in step S1.4, calculate the corresponding function values, and use them to replace the original outliers or fill in the missing values, thereby obtaining the corrected electricity consumption time series data.

[0082] Step S2: Based on the corrected voltage time series data, the relationship between low-voltage transformer substations and households is identified by principal component analysis combined with Gaussian mixture model clustering, and the Pearson correlation coefficient is used for correction.

[0083] This step aims to accurately establish the attribution relationship between user meters and their respective transformer substations, providing a reliable data correlation foundation for subsequent impedance calculations. Specifically, it includes:

[0084] Step S2.1: Perform maximum and minimum value normalization on the corrected voltage time series data of the target transformer area bus and all users to eliminate the impact of differences in dimensions and numerical ranges on subsequent analysis.

[0085] Suppose a certain voltage timing data contains Data at each moment: Its normalized data The calculation formula is:

[0086] ;

[0087] In the above formula, This is the first voltage time series data before normalization. Voltage data, This is the maximum value in the voltage timing data. This is the minimum value in the voltage timing data. The normalized voltage timing data is the first... The voltage data ranges from 1 to 10. between.

[0088] Step S2.2: Principal component analysis is used to reduce the dimensionality of the normalized voltage time series data of the target transformer area bus and all users to obtain a feature matrix. Each row of the feature matrix corresponds to the transformer area bus or a user, and the data in each row constitutes the feature vector of the transformer area bus or the user.

[0089] Specifically, let the total number of users and buses be... Busbar and all users Composed of voltage sequence data in dimensional The matrix is ​​used as input, and principal component analysis is used to map it to a low-dimensional space, preserving the first matrix. ( There are 1 principal component. Ultimately, both the bus and the user are represented as a single principal component. 1D eigenvectors, all eigenvectors constitute The feature matrix is ​​obtained. This step aims to extract the core features of user voltage patterns, reduce data dimensionality, avoid the interference of the "curse of dimensionality" on subsequent clustering analysis, and improve computational efficiency.

[0090] Step S2.3: Use a Gaussian mixture model to perform probability distribution clustering on the feature vectors obtained in step S2.2. After clustering, find the cluster containing the feature vectors of the target transformer area bus (after normalization and principal component analysis projection), and mark users who do not belong to this cluster as "suspect users", that is, users whose user-transformation relationships may be abnormal.

[0091] In this embodiment, the parameters of the Gaussian mixture model are estimated using the expectation-maximization algorithm to achieve probability-based clustering.

[0092] Step S2.4: For each suspected user identified in Step S2.3, retrieve their voltage time-series data and the bus voltage time-series data of other geographically adjacent transformer substations. Calculate the Pearson correlation coefficient between the suspected user's voltage time-series data and the bus voltage time-series data of each adjacent transformer substation to quantify the degree of linear correlation between the two. Sort all calculated correlation coefficients from largest to smallest, and determine the adjacent transformer substation corresponding to the largest correlation coefficient as the actual substation to which the suspected user belongs, thereby completing the accurate identification and correction of the user-transformer relationship.

[0093] Specifically, let the voltage timing data of the suspected user be... The timing data of the bus voltage of a certain nearby transformer area is as follows: The Pearson correlation coefficient between the two The calculation formula is:

[0094] ;

[0095] In the above formula, Represents a sequence and The covariance is used to measure the degree of linear correlation between the two. Represents a sequence variance Represents a sequence The variance.

[0096] Step S3: Based on the corrected electricity consumption time sequence data and the corrected household transformer relationship, construct an impedance model based on circuit laws, and use the Zunhaiqiao optimization algorithm to calculate the impedance parameters of each branch line in the low-voltage distribution area.

[0097] To address the computational complexity and inefficiency of traditional methods, this step transforms impedance calculation into an optimization problem and utilizes swarm intelligence algorithms for efficient solution. Specifically, this includes:

[0098] Step S3.1: To simplify the model, the three-phase user is treated as three independent single-phase users.

[0099] Step S3.2: Construct the impedance calculation model for the branch line. According to the phasor form of Ohm's law, at any given time, for a branch line, the voltage at its upstream node is... Downstream user node voltage With line current Line impedance The following relationship must be satisfied:

[0100] ;

[0101] in, , This indicates the resistance value of that branch line. This indicates the reactance value of the branch line; For the voltage phasor of the upstream node (busbar) of the branch line, Voltage phasors collected by smart meters for downstream users. This is the current phasor of the branch line.

[0102] Step S3.3: Based on the phasor relationship in step S3.2, define the effective value of the upstream node voltage of the branch line. The calculation formula is as follows:

[0103] ;

[0104] in, In the formula, This represents the effective voltage value of each user downstream of the branch line after they are merged into a virtual node. It is calculated based on the effective voltage value of each user (e.g., taking the average value). This represents the total current amplitude of the branch line; and These are the active power and reactive power at the virtual node, respectively, calculated based on the active power and reactive power of each user (by summing the corresponding power of each user). and These are the resistance and reactance values ​​of this branch line.

[0105] Step S3.4: Based on the corrected household-transformer relationship, obtain the downstream users of this branch line from the corrected electricity consumption time sequence data. Measured data at different times, including voltage, active power, and reactive power. Simultaneously, based on the relationships between households and transformers and the data from the transformer area master meter, calculations were performed for each time point. RMS voltage of virtual nodes Active power reactive power and the corresponding total current amplitude Substitute the data from each time point into the calculation formula in step S3.3 to construct a set containing... A system of equations with equations and unknowns. and .

[0106] Since the number of equations is greater than the number of unknowns, what we get is an overdetermined system of equations.

[0107] Step S3.5: Transform the impedance parameter solution into an optimization problem to determine the goodness of fit. As the objective function, it measures the degree of closeness between the estimated and measured values ​​of the upstream node voltage RMS.

[0108] ;

[0109] In the above formula, According to time RMS voltage Active power reactive power as well as and The current estimate is the estimated value of the upstream node voltage RMS value obtained through the calculation formula in step S3.3. For a moment Measured value of the effective value of the upstream node voltage. The effective value of the upstream node voltage at this The average value at each time point.

[0110] The closer the value is to 1, the better the estimated value fits the actual value.

[0111] Step S3.6: Use the tunic optimization algorithm to solve for... Maximize and .

[0112] This algorithm simulates the chain-like behavior and leader-following behavior of salps during foraging, and updates the position of individuals in the population iteratively (i.e., and The process involves finding the global optimum by considering possible solutions. The specific steps include initializing the population, calculating the fitness of each individual (i.e.,...). The process involves iterative steps such as updating the values ​​of leaders and followers, and updating their positions, until the convergence condition is met or the maximum number of iterations is reached. The final output is... optimal and This serves as the impedance parameter for that branch line.

[0113] Step S4: Based on historical line impedance data, a dual mechanism of "isolated forest initial inspection + confidence interval re-inspection" is adopted to make anomaly judgment on the currently calculated impedance value.

[0114] To address the potential for misjudgment in single anomaly detection methods and improve the reliability of assessments, the following measures are specifically taken:

[0115] Step S4.1: Prepare historical impedance dataset. For the target branch line, collect its historical impedance values ​​calculated daily over a historical period (e.g., one month) to form a historical impedance dataset. Historical impedance dataset It includes impedance values ​​labeled as "normal" and "abnormal". Early historical impedance datasets relied on manual annotation, but after the algorithm stabilized, automatic annotation could be performed directly based on previous assessment results.

[0116] Step S4.2: Construct an isolated forest model, in order to The isolated forest model was trained using the isolated forest model as a training set, and the isolated forest model was used for preliminary anomaly detection.

[0117] The Isolation Forest model constructs multiple "isolation trees" by randomly selecting features and split values, aiming to isolate outliers with shorter path lengths.

[0118] After training is complete, input the impedance value to be evaluated. In the isolated forest model, a preliminary judgment result is obtained. If the preliminary judgment is "abnormal", then proceed to step 4.3; otherwise, the impedance value to be judged is judged as "normal", and step S4 ends.

[0119] Step S4.3: Construct confidence intervals based on the normal impedance values ​​in the historical impedance dataset.

[0120] Isolation forests may lead to misjudgments due to random fluctuations in the data, so this step introduces statistical confidence intervals for verification.

[0121] First, from historical datasets In the process, all impedance values ​​marked as "normal" are extracted to form a subset of historical normal impedance values. .

[0122] Secondly, for Perform the Shapiro-Wilk normality test. If the test result shows... If it follows a normal distribution, then calculate its mean. and standard deviation And construct confidence intervals: .

[0123] like If the probability density curve does not follow a normal distribution, then the kernel density estimation method is used to fit its probability density curve, and the cumulative probability is taken as... and The corresponding impedance value serves as the lower bound of the normal fluctuation range. and the Upper Realm Construct confidence intervals: .

[0124] Step S4.4: If If the value falls within the confidence interval, the impedance value to be analyzed is considered "normal"; otherwise, it is considered "abnormal".

[0125] Through the above steps, this method realizes the entire process from data correction, accurate correction of the relationship between households and transformers, to efficient optimization calculation of impedance, and then to reliable judgment of anomalies, effectively improving the accuracy of low-voltage distribution area line impedance calculation and the reliability of anomaly identification.

[0126] It should be noted that, as will be apparent to those skilled in the art, the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics thereof. The scope of the present invention is defined by the claims rather than the foregoing description.

Claims

1. A method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters, characterized in that, include: Step S1: Detect and correct the electricity consumption time sequence data of users in the distribution area obtained through the electricity meter and electricity consumption information collection system to obtain the corrected electricity consumption time sequence data; Electricity consumption time-series data should include at least voltage time-series data and power time-series data; Step S2: Based on the corrected voltage time series data, identify the relationship between low-voltage transformer substations and households by combining principal component analysis with Gaussian mixture model clustering; Step S3: Based on the corrected electricity consumption time sequence data and the relationship between households and transformers, an impedance model is constructed based on circuit laws, and the impedance parameters of each branch line in the low-voltage distribution area are calculated using the Zunhaiqiao optimization algorithm. Step S4: Based on historical line impedance data, a dual mechanism of "isolated forest initial inspection + confidence interval re-inspection" is adopted to make anomaly judgment on the currently calculated impedance value.

2. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 1, characterized in that, Step S1 includes: Step S1.1: Collect the power consumption time sequence data of the busbar and all users in the target low-voltage distribution area within the set time period; Step S1.2: For each electricity consumption time-series data point, detect the original outliers based on the box plot principle; the specific process is as follows: Calculate the lower quartile of this electricity consumption time-series data. and upper quartiles This leads to the interquartile range. Upper edge threshold and lower edge threshold : ; ; ; If the value at a certain moment in the electricity consumption time sequence data is greater than the corresponding value... or less If so, the value is determined to be an original outlier.

3. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 2, characterized in that, Step S1 also includes: Step S1.3: Mark all indices that are determined to be original outliers, and mark the indices of missing values; Step S1.4: For electricity consumption time series data with original outliers or missing values, a polynomial model is fitted using the least squares method based on its unlabeled normal data values ​​to describe the normal trend of the electricity consumption time series data. Step S1.5: Substitute the indices of the original outliers and missing values ​​into the polynomial model fitted in step S1.4, calculate the corresponding function values, and use them to replace the original outliers or fill in the missing values, thereby obtaining the corrected electricity consumption time series data.

4. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 1, characterized in that, Step S2 includes: Step S2.1: Perform maximum and minimum value normalization on the corrected voltage time series data of the target transformer area bus and all users to eliminate the impact of differences in dimensions and numerical ranges on subsequent analysis; Step S2.2: Principal component analysis is used to reduce the dimensionality of the normalized voltage time series data of the target transformer area bus and all users to obtain a feature matrix. Each row of the feature matrix corresponds to the transformer area bus or a user, and the data in each row constitutes the feature vector of the transformer area bus or the user. Step S2.3: Perform probability distribution clustering on the feature vectors obtained in step S2.2 using a Gaussian mixture model; After clustering is completed, the cluster containing the feature vector of the target transformer area bus is found, and users who do not belong to the cluster are marked as "suspect users".

5. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 4, characterized in that, Step S2 also includes: Step S2.4: For each suspected user identified in step S2.3, retrieve its voltage time-series data and the bus voltage time-series data of other geographically adjacent transformer substations; calculate the Pearson correlation coefficient between the suspected user's voltage time-series data and the bus voltage time-series data of each adjacent transformer substation, sort all the calculated correlation coefficients from largest to smallest, and determine the adjacent transformer substation corresponding to the largest correlation coefficient as the actual substation to which the suspected user belongs, thereby completing the correction of the user-transformer relationship.

6. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 1, characterized in that, Step S3 includes: Step S3.1: Treat the three-phase user as three independent single-phase users for processing; Step S3.2: Construct the impedance calculation model for the branch line; according to the phasor form of Ohm's law, at any given time, for a branch line, its upstream node voltage... Downstream user node voltage With line current Line impedance The following relationship must be satisfied: ; in, , This indicates the resistance value of the branch line. This indicates the reactance value of the branch line; This refers to the voltage phasor of the upstream node of the branch line, i.e., the bus. Voltage phasors collected by smart meters for downstream users. This is the current phasor of the branch line; Step S3.3: Based on the phasor relationship in step S3.2, define the effective value of the upstream node voltage of the branch line. The calculation formula is as follows: ; in, In the formula, This represents the effective voltage value of each user downstream of the branch line after they are merged into a virtual node, calculated based on the effective voltage value of each user. This represents the total current amplitude of the branch line; and These are the active power and reactive power at the virtual node, respectively, calculated based on the active power and reactive power of each user. and The values ​​are the resistance and reactance of this branch line; Step S3.4: Based on the household-transformer relationship, obtain the downstream users of this branch line from the corrected electricity consumption time sequence data. Measured data at different times, including: voltage, active power, and reactive power; calculate the values ​​at each time point. RMS voltage of virtual nodes Active power reactive power and the corresponding total current amplitude Substitute the data from each time point into the calculation formula in step S3.3 to construct a set containing... A system of equations with equations and unknowns. and ; Step S3.5: Transform the impedance parameter solution into an optimization problem to determine the goodness of fit. As the objective function, it measures the degree of closeness between the estimated and measured values ​​of the effective value of the upstream node voltage; Step S3.6: Use the tunic optimization algorithm to solve for... Maximize and .

7. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 6, characterized in that, Goodness of fit The calculation method is as follows: ; In the above formula, According to time RMS voltage Active power reactive power as well as and The current estimate is the estimated value of the upstream node voltage RMS value obtained through the calculation formula in step S3.

3. For a moment Measured value of the effective value of the upstream node voltage. The effective value of the upstream node voltage at this The average value at each time point.

8. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 1, characterized in that, Step S4 includes: Step S4.1: Prepare historical impedance dataset; For the target branch line, collect its historical impedance values ​​over a past historical period to form a historical impedance dataset. Historical impedance dataset It includes impedance values ​​labeled "normal" and "abnormal"; Step S4.2: Construct an isolated forest model, in order to The isolated forest model was trained using the isolated forest model as a training set, and the isolated forest model was used for preliminary anomaly detection. Input the current impedance value to be analyzed. In the isolated forest model, a preliminary judgment result is obtained; if the preliminary judgment is "abnormal", then proceed to step 4.3; otherwise, the impedance value to be judged is judged as "normal", and step S4 ends. Step S4.3: Construct confidence intervals based on the normal impedance values ​​in the historical impedance dataset; Step S4.4: If the current impedance value to be analyzed... If the value falls within the confidence interval, the impedance value to be analyzed is considered "normal"; otherwise, it is considered "abnormal".

9. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 8, characterized in that, Step S4.3 includes: First, from historical datasets In the process, all impedance values ​​marked as "normal" are extracted to form a subset of historical normal impedance values. ; Secondly, for Perform the Shapiro-Wilk normality test; If the test result is If it follows a normal distribution, then calculate its mean. and standard deviation Then based on the mean and standard deviation Construct confidence intervals; like If the probability density curve does not follow a normal distribution, a kernel density estimation method is used to fit it, and the impedance values ​​corresponding to the first and second preset probability thresholds are taken as the lower bound of the normal fluctuation range. and the Upper Realm Construct confidence intervals: .

10. The method for calculating line impedance and identifying anomalies based on data correction from electricity terminals and electricity meters as described in claim 9, characterized in that, In step S4.3: Based on mean and standard deviation The confidence interval is constructed as follows: ; The first preset probability threshold is The second preset probability threshold is .