Power distribution network line loss anomaly diagnosis method and system

CN122885677APending Publication Date: 2026-10-09ECONOMIC TECH RES INST STATE GRID HUNAN ELECTRIC POWER +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611173555.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

但是,基于规则的阈值判断方案,极为依赖专家经验进行固定阈值的设定,难以适应复杂多变的运行工况;而基于统计分析的方案,受数据分布假设限制,对非线性特征的提取能力不足

Benefits of technology

[0039]本发明提供的这种配电网线损异常诊断方法及系统,通过对目标配电网的数据信息进行获取和处理以构建特征数据集,并基于孤立森林模型和XGBoost模型对构建的特征数据集进行初次和二次异常诊断,因此本发明不仅能够实现配电网线损的异常诊断,而且可靠性更高,精确性更好。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122885677A_ABST
    Figure CN122885677A_ABST
Patent Text Reader

Abstract

The application discloses a power distribution network line loss anomaly diagnosis method, comprising the following steps: acquiring data information of a target power distribution network; performing data processing on the acquired data information to construct a feature data set; performing preliminary anomaly detection on the obtained feature data set by using a pre-trained isolated forest model to obtain suspected line loss anomaly data; performing anomaly type diagnosis on the obtained suspected line loss anomaly data by using a pre-trained XGBoost model; and completing line loss anomaly diagnosis of the target power distribution network according to the obtained diagnosis result. The application further discloses a system for implementing the power distribution network line loss anomaly diagnosis method. The application can not only realize the line loss anomaly diagnosis of the power distribution network, but also has higher reliability and better accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electrical automation, and specifically relates to a method and system for diagnosing abnormal line losses in power distribution networks. Background Technology

[0002] With economic and technological development and the improvement of people's living standards, electricity has become an indispensable secondary energy source in people's production and daily life, bringing endless convenience. Therefore, ensuring a stable and reliable supply of electricity has become one of the most important tasks of the power system.

[0003] Distribution network line loss refers to the energy loss generated during the transmission and distribution of electricity in the distribution network, and it is an important indicator for measuring the operational efficiency of the distribution network. Under normal circumstances, distribution network line loss will be maintained within a reasonable range. Once the line loss rate abnormally increases or deviates regularly, it often indicates abnormalities such as electricity theft, equipment failure, metering errors, or topology errors in the distribution network. Therefore, the diagnosis of abnormal distribution network line loss is of great significance to the power system.

[0004] Currently, commonly used diagnostic schemes for distribution network line loss anomalies in power systems often employ rule-based threshold judgment schemes and statistical analysis-based schemes. However, rule-based threshold judgment schemes heavily rely on expert experience to set fixed thresholds, making them difficult to adapt to complex and ever-changing operating conditions; while statistical analysis-based schemes are limited by data distribution assumptions and lack the ability to extract nonlinear features. Therefore, existing distribution network line loss anomaly diagnostic schemes all suffer from poor reliability and accuracy. Summary of the Invention

[0005] One of the objectives of this invention is to provide a highly reliable and accurate method for diagnosing abnormal line losses in power distribution networks.

[0006] A second objective of this invention is to provide a system for implementing the aforementioned method for diagnosing abnormal line losses in a power distribution network.

[0007] The method for diagnosing abnormal line losses in a power distribution network provided by this invention includes the following steps:

[0008] S1. Obtain data information from the target power distribution network;

[0009] S2. Process the data obtained in step S1 to construct a feature dataset;

[0010] S3. For the feature dataset obtained in step S2, a pre-trained isolated forest model is used to perform preliminary anomaly detection to obtain suspected line loss anomaly data;

[0011] S4. For the suspected abnormal line loss data obtained in step S3, use a pre-trained XGBoost model to diagnose the abnormality type.

[0012] S5. Based on the diagnostic results obtained in step S4, complete the abnormal diagnosis of network line loss in the target power distribution.

[0013] Step S1, which involves obtaining data information from the target distribution network, specifically includes the following steps:

[0014] Obtain data information from the target power distribution network;

[0015] The data information includes power factor, power supply, electricity sales, power loss, peak load, valley load, voltage value, and current value.

[0016] Step S2 involves processing the data obtained in step S1 to construct a feature dataset, specifically including the following steps:

[0017] Based on the data obtained in step S1, the following parameters are calculated for the target distribution network: line loss rate, load rate, voltage deviation rate, peak-valley load ratio, load standard deviation, average voltage, voltage standard deviation, average current, average power factor, ratio of line loss rate to load rate, power supply-to-sales ratio, average daily power loss, and standard deviation of daily power loss.

[0018] Based on the data obtained in step S1, the duration of abnormal line loss rate is calculated.

[0019] Construct initial sample data: Each sample includes: line loss rate, load factor, voltage deviation rate, power factor, power supply, power sales, power loss, peak load, valley load, peak-valley load ratio, load standard deviation, mean voltage, voltage standard deviation, mean current, average power factor, ratio of line loss rate to load factor, power supply-to-sales ratio, average daily power loss, standard deviation of daily power loss, and duration of abnormal line loss rate.

[0020] The initial sample data is standardized using the following formula:

[0021] In the formula This represents the j-th data value of the i-th sample after standardization. This represents the j-th data value of the i-th sample before standardization. Let j be the mean of all j-th data points; Let the standard deviation be the sum of all j-th data points;

[0022] Finally, construct the feature dataset. for .

[0023] Step S3 involves using a pre-trained isolated forest model to perform preliminary anomaly detection on the feature dataset obtained in step S2, resulting in suspected line loss anomaly data. This specifically includes the following steps:

[0024] The feature dataset obtained in step S2 is input into the pre-trained Isolation Forest model, and the anomaly score of each sample is calculated:

[0025] In the formula This represents the outlier score of sample x under a sample size of n. Let x be the average path length of sample x in each isolated tree of the pre-trained isolated forest model; Normalization factor;

[0026] Sort the outlier scores of each sample; then select the samples with outlier scores closest to 1. The samples were identified as suspected abnormal line loss samples, and the remaining samples were identified as normal samples.

[0027] Step S3 further includes the following steps:

[0028] In the pre-trained isolated forest model, the number of isolated trees is set to 100;

[0029] The value of T is set to 25.

[0030] Step S4 involves using a pre-trained XGBoost model to diagnose the suspected line loss anomaly data obtained in step S3. This process includes the following steps:

[0031] The defined anomaly types include normal, electricity theft anomaly, equipment malfunction anomaly, metering error anomaly, and topology error anomaly;

[0032] For the suspected line loss anomaly data obtained in step S3, a pre-trained XGBoost model is used for anomaly type diagnosis, represented as follows:

[0033] In the formula The anomaly type diagnosis result for the i-th suspected abnormal line loss sample data; The number of decision trees in the XGBoost model; This represents the processing result of the k-th decision tree on the i-th suspected abnormal line loss sample data.

[0034] Step S4 further includes the following steps:

[0035] The parameters of the pre-trained XGBoost model include: number of decision trees, maximum depth of a single tree, learning rate, objective function, number of anomaly categories, evaluation metric, training sample subsampling ratio, and single tree feature subsampling ratio.

[0036] The XGBoost model uses the following formula as its loss function during pre-training:

[0037] In the formula is the loss function value; n is the total number of training samples; This represents the predicted anomaly type value for the m-th training sample. Let be the true label value of the anomaly type for the m-th training sample; express and The loss function values ​​between; Let be the regularization constraint value of the k-th decision tree in the XGBoost model; This represents the total number of anomaly categories. Let m be an indicator variable indicating that the m-th training sample belongs to the c-th type of anomaly. If the m-th training sample does not belong to the c-th type of anomaly, then... ; Let be the predicted probability that the m-th training sample belongs to the c-th type of anomaly; This is the prediction result for the m-th training sample; This is the predicted score of the c-th type of anomaly for the m-th training sample output by the XGBoost model.

[0038] This invention also provides a system for implementing the aforementioned method for diagnosing abnormal line losses in a distribution network, comprising a data acquisition module, a data processing module, a preliminary detection module, a secondary detection module, and an anomaly diagnosis module; the data acquisition module, data processing module, preliminary detection module, secondary detection module, and anomaly diagnosis module are connected in series; the data acquisition module acquires data information of the target distribution network and uploads the data information to the data processing module; the data processing module processes the acquired data information based on the received data information to construct a feature dataset and uploads the data information to the preliminary detection module; the preliminary detection module performs preliminary anomaly detection using a pre-trained isolated forest model on the obtained feature dataset based on the received data information to obtain suspected abnormal line loss data and uploads the data information to the secondary detection module; the secondary detection module performs anomaly type diagnosis using a pre-trained XGBoost model on the obtained suspected abnormal line loss data based on the received data information and the obtained diagnosis results, and uploads the data information to the anomaly diagnosis module; the anomaly diagnosis module completes the abnormal line loss diagnosis of the target distribution network based on the received data information and the obtained diagnosis results.

[0039] The method and system for abnormal line loss diagnosis of distribution networks provided by this invention acquires and processes data information of the target distribution network to construct a feature dataset, and performs primary and secondary abnormal diagnosis on the constructed feature dataset based on the isolated forest model and the XGBoost model. Therefore, this invention can not only realize abnormal diagnosis of distribution network line loss, but also has higher reliability and better accuracy. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0041] Figure 2 This is a schematic diagram illustrating the detection effect of an embodiment of the method of the present invention.

[0042] Figure 3 This is a schematic diagram of the functional modules of the system of the present invention. Detailed Implementation

[0043] like Figure 1 The diagram shown is a flowchart of the method of the present invention: The method for diagnosing abnormal line losses in a distribution network disclosed in this invention includes the following steps:

[0044] S1. Obtain data information from the target distribution network; specifically including the following steps:

[0045] Obtain data information from the target power distribution network;

[0046] The data information includes power factor, power supply, electricity sales, power loss, peak load, valley load, voltage value, and current value;

[0047] S2. Process the data obtained in step S1 to construct a feature dataset; specifically, this includes the following steps:

[0048] Based on the data obtained in step S1, the following parameters are calculated for the target distribution network: line loss rate, load rate, voltage deviation rate, peak-valley load ratio, load standard deviation, average voltage, voltage standard deviation, average current, average power factor, ratio of line loss rate to load rate, power supply-to-sales ratio, average daily power loss, and standard deviation of daily power loss.

[0049] Based on the data obtained in step S1, the duration of abnormal line loss rate is calculated.

[0050] Construct initial sample data: Each sample includes: line loss rate, load factor, voltage deviation rate, power factor, power supply, power sales, power loss, peak load, valley load, peak-valley load ratio, load standard deviation, mean voltage, voltage standard deviation, mean current, average power factor, ratio of line loss rate to load factor, power supply-to-sales ratio, average daily power loss, standard deviation of daily power loss, and duration of abnormal line loss rate.

[0051] Because the above data differ in units, orders of magnitude, and fluctuation ranges—for example, the ranges for power supply, power factor, and duration of anomalies are not consistent—directly inputting them into the model could easily cause large numerical features to have an excessive influence on the random segmentation process. Therefore, the initial sample data is standardized using the following formula:

[0052] In the formula This represents the j-th data value of the i-th sample after standardization. This represents the j-th data value of the i-th sample before standardization. Let j be the mean of all j-th data points; Let the standard deviation be the sum of all j-th data points;

[0053] Standardization makes features of different dimensions comparable, thereby improving the stability of subsequent anomaly detection models in identifying potential anomaly patterns; finally, a feature dataset is constructed. for The value of j ranges from 1 to 20.

[0054] S3. For the feature dataset obtained in step S2, a pre-trained isolated forest model is used for preliminary anomaly detection to obtain suspected line loss anomaly data; specifically, the following steps are included:

[0055] The core idea of ​​the Isolation Forest algorithm is that: abnormal samples are usually few in number and have obvious differences from normal samples in the feature space, so they are easier to separate in the isolated tree formed by random partitioning with a shorter path;

[0056] Based on the above analysis, the feature dataset obtained in step S2 is input into the pre-trained Isolation Forest model, and the anomaly score of each sample is calculated:

[0057] In the formula This represents the outlier score of sample x under a sample size of n. Let x be the average path length of sample x in each isolated tree of the pre-trained isolated forest model; Normalization factor; The closer the value is to 1, the more easily the sample is isolated and the more significant its anomalous tendency is.

[0058] Sort the outlier scores of each sample; then select the samples with outlier scores closest to 1. The samples were identified as suspected abnormal line loss samples, and the remaining samples were identified as normal samples;

[0059] In practice, the number of isolated trees in the pre-trained isolated forest model is set to 100; the value of T is set to 25.

[0060] This step enables the rapid screening of suspected abnormal line loss samples from massive amounts of transformer area operation data without requiring a large number of manually labeled samples, providing high-quality input for subsequent anomaly type classification;

[0061] S4. For the suspected line loss anomaly data obtained in step S3, a pre-trained XGBoost model is used to diagnose the anomaly type; specifically, the following steps are included:

[0062] The defined anomaly types include normal, electricity theft anomaly, equipment failure anomaly, metering error anomaly, and topology error anomaly. Among them, electricity theft anomaly is characterized by a significant increase in line loss rate but with load factor, voltage deviation, and other indicators remaining basically normal; equipment failure anomaly is characterized by an increase in line loss rate accompanied by an increase in voltage deviation rate and a decrease in power factor; metering error anomaly is characterized by a relatively stable systematic deviation in line loss rate; and topology error anomaly is characterized by an abnormal ratio between line loss rate and load factor.

[0063] For the suspected line loss anomaly data obtained in step S3, a pre-trained XGBoost model is used for anomaly type diagnosis, represented as follows:

[0064] In the formula The anomaly type diagnosis result for the i-th suspected abnormal line loss sample data; The number of decision trees in the XGBoost model; The result of the k-th decision tree processing the i-th suspected abnormal line loss sample data;

[0065] In practice, the parameters of the pre-trained XGBoost model include: number of decision trees, maximum depth of a single tree (preferred value is 6), learning rate (preferred value is 0.1), objective function (preferred value is multi-class Softmax objective function), number of outlier categories (preferred value is 4), evaluation metric, training sample subsampling ratio (preferred value is 0.8), and single tree feature subsampling ratio (preferred value is 0.8).

[0066] The XGBoost model uses the following formula as its loss function during pre-training:

[0067] In the formula is the loss function value; n is the total number of training samples; This represents the predicted anomaly type value for the m-th training sample. Let be the true label value of the anomaly type for the m-th training sample; express and The loss function values ​​between; Let be the regularization constraint value of the k-th decision tree in the XGBoost model; This represents the total number of anomaly categories. Let m be an indicator variable indicating that the m-th training sample belongs to the c-th type of anomaly. If the m-th training sample does not belong to the c-th type of anomaly, then... ; Let be the predicted probability that the m-th training sample belongs to the c-th type of anomaly; This is the prediction result for the m-th training sample; The predicted score of the c-th type of anomaly for the m-th training sample output by the XGBoost model;

[0068] S5. Based on the diagnostic results obtained in step S4, complete the abnormal diagnosis of network line loss in the target power distribution.

[0069] The effects of the present invention will be further illustrated below with reference to an embodiment:

[0070] An abnormal sample test set was artificially constructed, and the method of this invention was used for anomaly diagnosis. The diagnosis results are as follows: Figure 2 As shown.

[0071] pass Figure 2 As can be seen, all 60 samples of electricity theft anomalies were correctly identified, all 60 samples of equipment malfunction anomalies were correctly identified, all 24 samples of metering error anomalies were correctly identified, and 58 out of 60 samples of topology error anomalies were correctly identified, with only 2 samples identified as equipment malfunction anomalies. According to the confusion matrix, the overall classification accuracy is approximately 99.02%, and the macro-average F1 score is approximately 0.992, indicating that the method proposed in this invention has high reliability and accuracy in multi-class line loss anomaly identification scenarios.

[0072] like Figure 3 The diagram shows the functional modules of the system of this invention: The system for implementing the distribution network line loss anomaly diagnosis method disclosed in this invention includes a data acquisition module, a data processing module, a preliminary detection module, a secondary detection module, and an anomaly diagnosis module; the data acquisition module, data processing module, preliminary detection module, secondary detection module, and anomaly diagnosis module are connected in series; the data acquisition module is used to acquire data information of the target distribution network and upload the data information to the data processing module; the data processing module is used to process the acquired data information according to the received data information to construct a feature dataset and upload the data information to the preliminary detection module; the preliminary detection module is used to perform preliminary anomaly detection using a pre-trained isolated forest model on the obtained feature dataset based on the received data information, obtain suspected line loss anomaly data, and upload the data information to the secondary detection module; the secondary detection module is used to perform anomaly type diagnosis using a pre-trained XGBoost model on the obtained suspected line loss anomaly data based on the received data information, and upload the data information to the anomaly diagnosis module; the anomaly diagnosis module is used to complete the network line loss anomaly diagnosis of the target distribution network based on the received data information and the obtained diagnosis results.

Claims

1. A method for diagnosing abnormal line losses in a distribution network, comprising the following steps: S1. Obtain data information from the target power distribution network; S2. Process the data obtained in step S1 to construct a feature dataset; S3. For the feature dataset obtained in step S2, a pre-trained isolated forest model is used to perform preliminary anomaly detection to obtain suspected line loss anomaly data; S4. For the suspected abnormal line loss data obtained in step S3, use a pre-trained XGBoost model to diagnose the abnormality type. S5. Based on the diagnostic results obtained in step S4, complete the abnormal diagnosis of network line loss in the target power distribution.

2. The method for diagnosing abnormal line losses in a distribution network according to claim 1, characterized in that... Step S1, which involves obtaining data information from the target distribution network, specifically includes the following steps: Obtain data information from the target power distribution network; The data information includes power factor, power supply, electricity sales, power loss, peak load, valley load, voltage value, and current value.

3. The method for diagnosing abnormal line losses in a distribution network according to claim 2, characterized in that... Step S2 involves processing the data obtained in step S1 to construct a feature dataset, specifically including the following steps: Based on the data obtained in step S1, the following parameters are calculated for the target distribution network: line loss rate, load rate, voltage deviation rate, peak-valley load ratio, load standard deviation, average voltage, voltage standard deviation, average current, average power factor, ratio of line loss rate to load rate, power supply-to-sales ratio, average daily power loss, and standard deviation of daily power loss. Based on the data obtained in step S1, the duration of abnormal line loss rate is calculated. Construct initial sample data: Each sample includes: line loss rate, load factor, voltage deviation rate, power factor, power supply, power sales, power loss, peak load, valley load, peak-valley load ratio, load standard deviation, mean voltage, voltage standard deviation, mean current, average power factor, ratio of line loss rate to load factor, power supply-to-sales ratio, average daily power loss, standard deviation of daily power loss, and duration of abnormal line loss rate. The initial sample data is standardized using the following formula: In the formula This represents the j-th data value of the i-th sample after standardization. This represents the j-th data value of the i-th sample before standardization. Let j be the mean of all j-th data points; Let the standard deviation be the sum of all j-th data points; Finally, construct the feature dataset. for .

4. The method for diagnosing abnormal line losses in a distribution network according to claim 3, characterized in that... Step S3 involves using a pre-trained isolated forest model to perform preliminary anomaly detection on the feature dataset obtained in step S2, resulting in suspected line loss anomaly data. This specifically includes the following steps: The feature dataset obtained in step S2 is input into the pre-trained Isolation Forest model, and the anomaly score of each sample is calculated: In the formula This represents the outlier score of sample x under a sample size of n. Let x be the average path length of sample x in each isolated tree of the pre-trained isolated forest model; Normalization factor; Sort the anomaly scores of each sample; The top score with the anomaly score closest to 1 The samples were identified as suspected abnormal line loss samples, and the remaining samples were identified as normal samples.

5. The method for diagnosing abnormal line losses in a distribution network according to claim 4, characterized in that... Step S3 further includes the following steps: In the pre-trained isolated forest model, the number of isolated trees is set to 100; The value of T is set to 25.

6. The method for diagnosing abnormal line losses in a distribution network according to claim 5, characterized in that... Step S4 involves using a pre-trained XGBoost model to diagnose the suspected line loss anomaly data obtained in step S3. This process includes the following steps: The defined anomaly types include normal, electricity theft anomaly, equipment malfunction anomaly, metering error anomaly, and topology error anomaly; For the suspected line loss anomaly data obtained in step S3, a pre-trained XGBoost model is used for anomaly type diagnosis, represented as follows: In the formula The anomaly type diagnosis result for the i-th suspected abnormal line loss sample data; The number of decision trees in the XGBoost model; This represents the processing result of the k-th decision tree on the i-th suspected abnormal line loss sample data.

7. The method for diagnosing abnormal line losses in a distribution network according to claim 6, characterized in that... Step S4 further includes the following steps: The parameters of the pre-trained XGBoost model include: number of decision trees, maximum depth of a single tree, learning rate, objective function, number of anomaly categories, evaluation metric, training sample subsampling ratio, and single tree feature subsampling ratio. The XGBoost model uses the following formula as its loss function during pre-training: In the formula is the loss function value; n is the total number of training samples; This represents the predicted anomaly type value for the m-th training sample. Let be the true label value of the anomaly type for the m-th training sample; express and The loss function values ​​between; Let be the regularization constraint value of the k-th decision tree in the XGBoost model; This represents the total number of anomaly categories. Let m be an indicator variable indicating that the m-th training sample belongs to the c-th type of anomaly. If the m-th training sample does not belong to the c-th type of anomaly, then... ; Let be the predicted probability that the m-th training sample belongs to the c-th type of anomaly; This is the prediction result for the m-th training sample; This is the predicted score of the c-th type of anomaly for the m-th training sample output by the XGBoost model.

8. A system for implementing the distribution network line loss anomaly diagnosis method according to any one of claims 1 to 7, characterized in that... It includes a data acquisition module, a data processing module, a preliminary detection module, a secondary detection module, and an anomaly diagnosis module; the data acquisition module, data processing module, preliminary detection module, secondary detection module, and anomaly diagnosis module are connected in series; the data acquisition module is used to acquire data information of the target distribution network and upload the data information to the data processing module; The data processing module processes the received data to construct a feature dataset and uploads it to the preliminary detection module. The preliminary detection module uses a pre-trained isolated forest model to perform preliminary anomaly detection on the feature dataset, identifying suspected line loss anomalies and uploading this data to the secondary detection module. The secondary detection module uses a pre-trained XGBoost model to diagnose the suspected line loss anomalies and uploads this data to the anomaly diagnosis module. The anomaly diagnosis module uses the received data and the diagnostic results to complete the anomaly diagnosis of the target power distribution network.