Distribution line fault positioning method based on loss power matching
By installing power sensors on distribution lines, collecting and analyzing voltage and current data in real time, and combining dynamic modeling and association rule mining algorithms to construct fault feature vectors, the problems of low efficiency and poor accuracy in fault location of traditional distribution lines are solved, achieving fast and accurate fault location and cost control.
Patent Information
- Application Number
- CN202510894695.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional distribution line fault location technology is inefficient, has poor accuracy, is costly, and fails to fully utilize historical data, resulting in long fault location times and low accuracy.
A method based on loss power matching is adopted. Power sensors are installed at key nodes to collect voltage and current data in real time. Fault features are extracted using a dynamic modeling algorithm. A sliding window and multi-dimensional feature extraction are combined to construct a fault feature vector. The association rule mining algorithm Apriori is used to establish a mapping relationship between the feature vector and the fault location, and precise positioning is performed in combination with the line topology.
It achieves efficient and accurate fault location, reduces misjudgments and blind inspections, shortens fault location time, reduces operation and maintenance costs, and improves the stability and economic benefits of the power system.
Smart Images

Figure CN120652215A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of power system fault detection and positioning, and in particular designs a distribution line fault positioning method based on loss power matching. Background Art
[0002] In the power system, distribution lines are the key link between power sources and users, and their safe and stable operation is crucial. With the continuous growth of power demand and the ever-expanding scale of distribution networks, fault location of distribution lines has become a key challenge in ensuring power supply. Traditional distribution line fault location technology has many drawbacks:
[0003] Fault location based on human experience initially relied primarily on manual inspections to discover and locate faults. This approach is extremely inefficient, requires significant manpower and resources, and is limited by factors such as geographical environment and weather conditions. For example, in mountainous areas or during inclement weather, manual inspections are difficult and risky, making it difficult to quickly reach the fault site, resulting in prolonged power outages and a serious impact on user experience. Furthermore, manual experience-based judgments lack accuracy and scientific validity, and different personnel use varying criteria, making misjudgments prone to occur. Some traditional methods use simple electrical quantity measurement to locate faults by measuring basic electrical quantities such as line voltage and current. However, these methods only provide limited fault information and fail to fully characterize the fault. In complex distribution networks, faults at different locations may cause similar electrical quantity changes, resulting in low location accuracy. For example, when multiple lines are coupled, the electrical quantity changes generated by the faults can interfere with each other, making it difficult to accurately determine the fault location. Some signal injection-based location technologies inject specific signals into the lines and locate the fault based on the signal's reflection or transmission characteristics. However, this method requires additional signal injection equipment and complex signal processing systems, resulting in high costs. Furthermore, signals are susceptible to noise interference during transmission, leading to increased positioning errors. Especially over long distribution lines or in environments with electromagnetic interference, signal attenuation and distortion can severely impact positioning effectiveness. Most existing fault location technologies lack the ability to fully utilize historical data. Historical data contains a wealth of fault characteristics and patterns. Without effective mining and utilization, it's impossible to more accurately predict and locate new faults. For example, it's impossible to quickly narrow down the scope of troubleshooting based on the characteristics of past similar faults, resulting in extended fault location times.
[0004] In view of the above-mentioned defects of the traditional technology, the present invention proposes a distribution line fault location method based on loss power matching. Summary of the Invention
[0005] In view of the above shortcomings in the existing technology, the purpose of the present invention is to propose a distribution line fault location method based on loss power matching, aiming to solve the problems of low efficiency, poor accuracy, high cost and inability to fully utilize historical data in traditional methods, and provide a more efficient and accurate solution for distribution line fault location.
[0006] In order to achieve the above objectives, the present invention adopts the following technical solutions:
[0007] The method for locating a distribution line fault based on loss power matching includes the following steps:
[0008] S1. Data acquisition: Power sensors are installed at key nodes on the distribution lines. These sensors collect line voltage, current, and phase information in real time. They calculate the line power data based on this information. This power data is then transmitted in real time to a data processing center via a high-speed communication link for subsequent processing.
[0009] S2. Fault feature extraction: Based on the collected power data, a dynamic modeling algorithm is used to extract pre- and post-fault data segments, train the model, predict power, and calculate power loss characteristics. A sliding window algorithm is then used in conjunction with a multi-dimensional feature extraction method to obtain transient and steady-state characteristics of the fault. Finally, all features are integrated to construct a fault feature vector, providing characteristic information for fault location.
[0010] S3. Construct a feature library driven by historical data. This involves collecting historical fault data and utilizing the fault feature vectors extracted in S2. The Apriori association rule mining algorithm is then used to mine the mapping relationship between the fault feature vectors and the fault locations. The mapping relationship between the feature vectors of all historical fault events and the fault locations is stored to form a power loss feature library.
[0011] S4. Real-time feature matching and intelligent positioning. Based on the real-time data collected by S1 and the feature library constructed by S3, a multi-dimensional similarity algorithm is used to compare the power loss feature vector extracted in real time with the feature vectors in the power loss feature library one by one. The similarity between the real-time feature vector and each feature vector in the library is calculated to find the feature point that best matches the real-time feature vector. The fault location is optimized based on the fault location information corresponding to the feature point in the feature library that best matches the real-time feature vector, combined with the line topology and power transmission direction.
[0012] Furthermore, the key nodes in S1 include substation exits, branch points, and user access points.
[0013] Furthermore, the power data includes active power and reactive power.
[0014] Furthermore, in S2, the method of extracting data segments before and after a fault, training a model, predicting power, and calculating power loss characteristics using a dynamic modeling algorithm includes:
[0015] S211. Initialize the model parameters and select the autoregressive moving average model ARNA(p,q) algorithm. The ARNA(p,q) model expression is:
[0016]
[0017] in, is the autoregressive (AR) part, which represents the power data X at the current moment t and the power data X at the past p moments t-i (i=1,2,…,p) has a linear relationship, is the autoregressive coefficient; It is the moving average (MA) part, which reflects the power data X at the current moment. t and the white noise sequence ε of the past q moments t-i (i=1,2,…,q) has a linear relationship, θ j is the sliding mean coefficient; ε t The white noise at the current moment is the random part of the model that cannot be fully explained by the past power data and past white noise;
[0018] S212. Divide the data segments before and after the fault, and divide the collected power data into two data segments before and after the fault according to the timestamp of the fault.
[0019] S213. Model training and prediction: Use pre-fault data to train a dynamic model. Estimate model coefficients using methods such as least squares to ensure the model fits the changing patterns of pre-fault power data. Use the trained model to predict post-fault data to obtain predicted power values.
[0020] S214. Calculate the power loss characteristics, calculate the difference between the actual power value and the predicted power value after the fault, and obtain the power loss value. Perform statistical analysis on the power loss value, calculate the mean, variance, etc., and use these statistics as the power loss characteristics before and after the fault;
[0021] Power loss value ΔX t The calculation formula is:
[0022] Mean power loss Calculation formula:
[0023] The power loss variance Var(ΔX) is calculated as follows:
[0024]
[0025] Where t0 is the time when the fault occurs; T1 represents the time length from the time when the fault occurs t0 to the past; T2 represents the time length from the time when the fault occurs t0 to the past. T1 and T2 are determined according to the actual situation to ensure that sufficient information before and after the fault is obtained; X t is the actual power value at time t after the fault; is the predicted power value at time t; n is the number of power loss values included in the mean calculation, that is, the number of samples in the time period from t0 to t0+T2.
[0026] Furthermore, in S2, the step of capturing transient and steady-state features using a sliding window algorithm and a multi-dimensional feature extraction method includes:
[0027] S221. Sliding window setting, determining the sliding window size and sliding step size. The window size is determined according to the time scale of the fault transient process and the data acquisition frequency.
[0028] S222. Transient feature extraction:
[0029] Based on first-order derivative feature extraction, starting from the data near the time of fault occurrence, the window is slid sequentially according to the set sliding step size. Within each window, the first-order derivative of the power data is calculated. The first-order derivative intuitively reflects the rate of change of the power data. At the moment of fault occurrence, the rapid change in power will cause significant fluctuations in the first-order derivative. The maximum and minimum values of the first-order derivative within each window are recorded. These extreme values can reflect the severity of the power change at the time of the fault. At the same time, the trend of the first-order derivative is analyzed, such as the upward or downward slope, to determine whether the power is rapidly increasing or decreasing, thus providing clues for preliminary judgment of the fault type.
[0030] Based on the feature extraction of the second-order derivative, the second-order derivative of the power data is obtained by calculating the difference of the first-order derivative. Specifically, the first-order derivative at time t is: The first-order derivative at time t+1 is: Then the difference of the first-order derivatives is: On this basis, divided by the time interval Δt, the second-order derivative is approximately obtained The second-order derivative can more keenly capture the acceleration information of power changes. When a fault occurs, the acceleration of power changes will suddenly change. The abnormal change of the second-order derivative is an important transient feature to further analyze the development process and severity of the fault. Where X represents the power data collected in S1, X t Indicates the power data at time t, X t+1 Indicates the power data at time t+1;
[0031] S223. Steady-state feature extraction:
[0032] Power mean calculation: Within each sliding window, power data is statistically analyzed and its mean is calculated. The mean reflects the steady-state power level after a fault. Different types of faults and fault locations on the distribution line can lead to differences in steady-state power after a fault. By comparing the power mean values in different windows, we can understand the steady state and changes of power after a fault, providing a reference for fault location.
[0033] Power data average The calculation formula is:
[0034]
[0035] W is the size of the sliding window, that is, the number of data points contained in the window; X t+i Represents the power data from time t+1 to time t+W in the sliding window;
[0036] Power standard deviation calculation: Calculate the standard deviation of power data within each window. The standard deviation measures the degree of fluctuation of power data in steady state. Even in the steady state after a fault, power data still fluctuates to a certain extent. A larger standard deviation indicates a higher degree of dispersion and more severe fluctuations in the power data. Analyzing changes in power standard deviation can help determine whether the fault has caused line instability and the degree of instability, further enriching fault feature information.
[0037] The standard deviation σ of power data is calculated as follows:
[0038]
[0039] S224. Construct a fault feature vector by integrating the power loss features obtained through dynamic modeling with the transient and steady-state features obtained through the sliding window and multi-dimensional feature extraction methods to construct the fault feature vector:
[0040]
[0041] is the fault feature vector, Describe the changing characteristics of power data when a fault occurs from multiple dimensions; The maximum value of the first-order derivative of the power data within the sliding window; The minimum value of the first-order derivative of the power data within the sliding window;
[0042] The fault feature vector comprehensively describes the changing characteristics of power data when a fault occurs from multiple dimensions, providing rich and representative feature information for subsequent fault location.
[0043] Furthermore, in S3, the method of mining the mapping relationship between the fault feature vector and the fault location using the association rule mining algorithm Apriori is as follows:
[0044] S311. Transaction set construction: According to the method of extracting fault feature vectors in S2, the power loss feature vector is extracted for each historical fault event, and the power loss feature vector of each fault event and the corresponding fault location information are combined into a transaction t i , all transactions of historical failure events are aggregated to form a transaction set T, which is used as the input data of the Apriori algorithm. The transaction is represented as:
[0045]
[0046] Where L is the fault location information; ti represents a transaction, and each transaction ti is composed of the power loss feature vector of the fault event and the fault location information;
[0047] S312.1 Itemset Generation: Scan the transaction set T and generate all 1-itemsets. If the transaction set contains transactions t1 and t2, where t1 is represented by:
[0048]
[0049] t2 is expressed as:
[0050]
[0051] Then one item set is:
[0052]
[0053] S313.2 Itemset Generation: Based on the generated 1-itemset, all possible 2-itemsets are formed by combining the elements in the 1-itemset in pairs. This process continues to generate higher-order candidate itemsets until the pre-set maximum itemset order is reached.
[0054] S314. Calculate the support. For each candidate item set, calculate the support of the candidate item set in the transaction set. The support Su(C) of the candidate item set in the transaction set is expressed as:
[0055]
[0056] C is the candidate item set, T is the transaction set;
[0057] Compare the support of each candidate item set C with the set support threshold. If the support Su(C) is greater than the support threshold, the candidate item set is identified as a frequent item set; if the support Su(C) is less than the support threshold, the candidate item set will be eliminated. In order to ensure the accuracy of the support calculation, multiple sampling statistics are used, that is, the transaction set T is randomly sampled and divided into multiple subsets. The support of the candidate item set C in each subset is calculated separately, and then the average value is taken as the final support estimate.
[0058] S315. Generate association rules and calculate confidence:
[0059] After support screening, frequent item sets are obtained. For each frequent item set, all possible association rules are generated from the frequent item set. The form of the association rules is:
[0060]
[0061] Where X and Y are non-empty subsets of the frequent item set F, and X∪Y=F, X∩Y=φ;
[0062] By traversing all frequent item sets, all possible combinations of such association rules are generated;
[0063] Calculate the confidence for each association rule generated Calculate its confidence:
[0064]
[0065] Among them, Su(X∪Y) is the support of the union of non-empty subsets of the frequent item set F in the transaction set, that is, the support of the union of X and Y in the transaction set; Su(X) is the support of the item set X in the transaction set; the confidence is compared with the set confidence threshold, and the association rules with confidence greater than or equal to the threshold are retained. These rules establish a mapping relationship between the fault feature vector and the fault location.
[0066] Furthermore, in said S3, the mapping relationship between the feature vectors of all historical fault events mined and the fault locations is stored to form a power loss feature library: a relational database or a non-relational database is used for storage. If a relational database is used, a corresponding table structure needs to be established, including data columns of each dimension of the feature vector, a fault location column, and support and confidence columns of the association rules, etc., and indexes are established for key columns to improve query efficiency; if a non-relational database is used, the mapping relationship is stored in the form of documents according to its data storage characteristics.
[0067] The S4 includes:
[0068] S41. Multi-dimensional similarity calculation and matching. Based on the power loss feature library built in S3, the cosine similarity algorithm is used to calculate the similarity between the real-time fault feature vector and the feature vectors in the power loss feature library. The real-time feature vector is compared one by one with all feature vectors in the library to find the feature point with the highest similarity and determine its corresponding historical fault feature vector. The cosine similarity calculation formula is:
[0069]
[0070] in, is the real-time power loss feature vector; is the feature vector in the feature library;
[0071] S42. Optimize the fault location. Based on the fault location information corresponding to the feature point that best matches the real-time feature vector in the feature library, the fault location is further optimized in combination with the line topology and power transmission direction. Utilize the Dijkstra algorithm in graph theory to convert the line topology into a graph structure, where nodes represent key locations on the line, edges represent line connection relationships, and edge weights are set to line length or other relevant parameters. Based on the power transmission direction, trace the power flow starting from the power source end to eliminate fault locations that do not conform to the power transmission logic.
[0072] In summary, due to the adoption of the above technical solution, the beneficial technical effects of the invention are:
[0073] In terms of improving the accuracy of fault location, this method constructs a comprehensive fault feature vector through multi-dimensional feature extraction, combines the Apriori algorithm to establish an accurate mapping relationship, and comprehensively considers multiple factors to optimize judgment during real-time positioning, greatly reducing misjudgment and making positioning more accurate. It can accurately determine the specific fault location, avoid blind troubleshooting, and make operation and maintenance work more targeted.
[0074] From an efficiency perspective, the combination of real-time data collection and efficient algorithm processing enables rapid data collection, feature extraction, and matching at the instant a fault occurs, significantly shortening fault location time compared to traditional methods. This allows faults to be discovered and addressed quickly, reducing outage duration, ensuring power supply continuity, and minimizing the inconvenience and economic losses caused by power outages to users and businesses.
[0075] In terms of cost control, accurate fault location reduces waste of manpower and material resources, eliminating the need for blind inspections across large areas by maintenance personnel, thus lowering maintenance costs. Furthermore, rapid power restoration avoids indirect economic losses such as industrial and commercial disruptions caused by power outages, thereby improving the overall economic benefits of the power system.
[0076] The distribution line fault location method based on loss power matching highlights its deep mining and utilization of historical data. By continuously updating the feature library, it can adapt to various changes in distribution lines, such as line aging and load adjustments. As historical data continues to accumulate, the accuracy and efficiency of fault location will continue to improve, enabling intelligent upgrades to the fault location system, making it more aligned with actual operational needs and providing long-term guarantees for the stable operation of the power system. Furthermore, this method can also operate effectively in complex distribution networks, accurately locating faults in both densely populated urban areas and long-distance rural lines, demonstrating strong adaptability and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 Flowchart of a distribution line fault location method based on loss power matching;
[0078] Figure 2 A flow chart of a method for extracting pre- and post-fault data segments, training the model, predicting power, and calculating power loss characteristics using a dynamic modeling algorithm;
[0079] Figure 3 Flowchart for capturing transient and steady-state features using sliding window algorithm and multi-dimensional feature extraction method;
[0080] Figure 4 Flowchart of the method for mining the mapping relationship between fault feature vectors and fault locations using the association rule mining algorithm Apriori;
[0081] Figure 5 This is a flow chart of the real-time feature matching and intelligent positioning method. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solutions and advantages of the invention more clear, the invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described here are only used to explain the invention and are not used to limit the invention.
[0083] like Figure 1 As shown, the distribution line fault location method based on loss power matching includes the following steps:
[0084] S1. Data acquisition: Power sensors are installed at key nodes of the distribution line (such as substation exits, branch points, and user access points). The power sensors collect line voltage, current, and phase information in real time. Based on the collected line voltage, current, and phase information, they calculate the line power data (active power and reactive power). The power data is then transmitted in real time to a data processing center via a high-speed communication link (such as fiber optic communication) for subsequent processing.
[0085] S2. Fault feature extraction: Based on the collected power data, a dynamic modeling algorithm is used to extract pre- and post-fault data segments, train the model, predict power, and calculate power loss characteristics. A sliding window algorithm is then used in conjunction with a multi-dimensional feature extraction method to obtain transient and steady-state characteristics of the fault. Finally, all features are integrated to construct a fault feature vector, providing characteristic information for fault location.
[0086] S3. Construct a feature library driven by historical data. This involves collecting historical fault data and utilizing the fault feature vectors extracted in S2. The Apriori association rule mining algorithm is then used to mine the mapping relationship between the fault feature vectors and the fault locations. The mapping relationship between the feature vectors of all historical fault events and the fault locations is stored to form a power loss feature library.
[0087] S4. Real-time feature matching and intelligent positioning. Based on the real-time data collected by S1 and the feature library constructed by S3, a multi-dimensional similarity algorithm is used to compare the power loss feature vector extracted in real time with the feature vectors in the power loss feature library one by one. The similarity between the real-time feature vector and each feature vector in the library is calculated to find the feature point that best matches the real-time feature vector. The fault location is optimized based on the fault location information corresponding to the feature point in the feature library that best matches the real-time feature vector, combined with the line topology and power transmission direction.
[0088] like Figure 2 As shown, in S2, the method of using a dynamic modeling algorithm to extract data segments before and after the fault, train a model, predict power, and calculate power loss characteristics includes:
[0089] S211. Initialize the model parameters and select the autoregressive moving average model ARNA(p,q) algorithm. The ARNA(p,q) model expression is:
[0090]
[0091] in, is the autoregressive (AR) part, which represents the power data X at the current moment t and the power data X at the past p moments t-i (i=1,2,…,p) has a linear relationship, is the autoregressive coefficient; It is the moving average (MA) part, which reflects the power data X at the current moment. t and the white noise sequence ε of the past q moments t-i (i=1,2,…,q) has a linear relationship, θ j is the sliding mean coefficient; ε t The white noise at the current moment is the random part of the model that cannot be fully explained by the past power data and past white noise;
[0092] S212. Divide the pre-fault and post-fault data segments. Based on the timestamp of the fault, the collected power data is divided into two data segments: pre-fault and post-fault. For example, with fault time t0 as the boundary, [t0-T1, t0] is the pre-fault data segment, and [t0, t0+T2] is the post-fault data segment. T1 represents the time length from fault time t0 onward, and T2 represents the time length from fault time t0 onward. T1 and T2 are determined based on actual conditions to ensure that sufficient pre-fault and post-fault information is obtained.
[0093] S213. Model training and prediction: Use pre-fault data to train a dynamic model. Estimate model coefficients using methods such as least squares to ensure the model fits the changing patterns of pre-fault power data. Use the trained model to predict post-fault data to obtain predicted power values.
[0094] S214. Calculate the power loss characteristics, calculate the difference between the actual power value and the predicted power value after the fault, and obtain the power loss value. Perform statistical analysis on the power loss value, calculate the mean, variance, etc., and use these statistics as the power loss characteristics before and after the fault;
[0095] Power loss value ΔX t The calculation formula is:
[0096] Mean power loss Calculation formula:
[0097] The power loss variance Var(ΔX) is calculated as follows:
[0098]
[0099] Among them, X t is the actual power value at time t after the fault; is the predicted power value at time t; n is the number of power loss values included in the mean calculation, that is, the number of samples in the time period from t0 to t0+T2;
[0100] like Figure 3 As shown, in S2, a sliding window algorithm and a multi-dimensional feature extraction method are used to capture transient and steady-state features;
[0101] S221. Sliding window setting: Determine the sliding window size and sliding step size. The window size is determined based on the time scale of the fault transient process and the data acquisition frequency. For example, if the fault transient process lasts for a short time and the data acquisition frequency is high, the sliding window size can be set to a smaller value (such as 10-50 data points). The sliding step size is generally smaller than the window size, usually S = 1 or S = 2, to ensure that the window can fully cover the data and capture feature changes.
[0102] S222. Transient feature extraction:
[0103] Based on first-order derivative feature extraction, starting from the data near the time of fault occurrence, the window is slid sequentially according to the set sliding step size. Within each window, the first-order derivative of the power data is calculated. The first-order derivative intuitively reflects the rate of change of the power data. At the moment of fault occurrence, the rapid change in power will cause significant fluctuations in the first-order derivative. The maximum and minimum values of the first-order derivative within each window are recorded. These extreme values can reflect the severity of the power change at the time of the fault. At the same time, the trend of the first-order derivative is analyzed, such as the upward or downward slope, to determine whether the power is rapidly increasing or decreasing, thus providing clues for preliminary judgment of the fault type.
[0104] Based on the feature extraction of the second-order derivative, the second-order derivative of the power data is obtained by calculating the difference of the first-order derivative. Specifically, the first-order derivatives of adjacent moments are first calculated. Assume that the first-order derivative at time t is: The first-order derivative at time t+1 is: Then the difference of the first-order derivatives is: On this basis, divided by the time interval Δt, the second-order derivative is approximately obtained The second-order derivative can more sensitively capture the acceleration information of power changes. When a fault occurs, the acceleration of power changes will suddenly change. The abnormal change of the second-order derivative (such as a sudden increase in the absolute value) can be used as an important transient feature to help further analyze the development process and severity of the fault. Where X represents the power data collected in S1, X t Indicates the power data at time t, X t+1 Indicates the power data at time t+1;
[0105] S223. Steady-state feature extraction:
[0106] Power mean calculation: Within each sliding window, power data is statistically analyzed and its mean is calculated. The mean reflects the steady-state power level after a fault. Different types of faults and fault locations on the distribution line can lead to differences in steady-state power after a fault. By comparing the power mean values in different windows, we can understand the steady state and changes of power after a fault, providing a reference for fault location.
[0107] Power data average The calculation formula is:
[0108]
[0109] W is the size of the sliding window, that is, the number of data points contained in the window; X t+i Represents the power data from time t+1 to time t+W in the sliding window;
[0110] Power standard deviation calculation: Calculate the standard deviation of power data within each window. The standard deviation measures the degree of fluctuation of power data in steady state. Even in the steady state after a fault, power data still fluctuates to a certain extent. A larger standard deviation indicates a higher degree of dispersion and more severe fluctuations in the power data. Analyzing changes in power standard deviation can help determine whether the fault has caused line instability and the degree of instability, further enriching fault feature information.
[0111] The standard deviation σ of power data is calculated as follows:
[0112]
[0113] S224. Construct a fault feature vector by integrating the power loss characteristics (such as mean and variance) obtained through dynamic modeling with the transient and steady-state characteristics (such as power change rate, acceleration, steady-state mean, standard deviation, etc.) obtained through the sliding window and multi-dimensional feature extraction methods to construct the fault feature vector:
[0114]
[0115] is the fault feature vector, Describe the changing characteristics of power data when a fault occurs from multiple dimensions; The maximum value of the first-order derivative of the power data within the sliding window; The minimum value of the first-order derivative of the power data within the sliding window;
[0116] The fault feature vector comprehensively describes the changing characteristics of power data when a fault occurs from multiple dimensions, providing rich and representative feature information for subsequent fault location.
[0117] like Figure 4 As shown, the method of using the association rule mining algorithm Apriori in S3 to mine the mapping relationship between the fault feature vector and the fault location is as follows:
[0118] S311. Transaction set construction: According to the method of extracting fault feature vectors in S2, the power loss feature vector is extracted for each historical fault event, and the power loss feature vector of each fault event and the corresponding fault location information are combined into a transaction t i , aggregate the transactions of all historical failure events to form a transaction set T , The transaction set T is used as the input data of the Apriori algorithm, where transactions are represented as follows:
[0119]
[0120] T = {t1, t2, ..., tn};
[0121] Where L is the fault location information; ti represents a transaction, and each transaction ti is composed of the power loss feature vector of the fault event and the fault location information;
[0122] S312.1 Itemset Generation: Scan the transaction set T and generate all 1-itemsets. If the transaction set contains transactions t1 and t2, where t1 is represented by:
[0123]
[0124] t2 is expressed as:
[0125]
[0126] Then one item set is:
[0127]
[0128] S313.2 Itemset Generation: Based on the generated 1-itemset, all possible 2-itemsets are formed by combining the elements in the 1-itemset in pairs. For example, the 2-itemset generated from the above 1-itemset may be: And so on, continuously generating higher-order candidate item sets until the pre-set maximum item set order is reached;
[0129] S314. Calculate the support. For each candidate item set, calculate the support of the candidate item set in the transaction set. The support Su(C) of the candidate item set in the transaction set is expressed as:
[0130]
[0131] C is the candidate item set, T is the transaction set;
[0132] Compare the support of each candidate item set C with the set support threshold. If the support Su(C) is greater than the support threshold, the candidate item set is identified as a frequent item set; if the support Su(C) is less than the support threshold, the candidate item set will be eliminated. In order to ensure the accuracy of the support calculation, multiple sampling statistics are used, that is, the transaction set T is randomly sampled and divided into multiple subsets. The support of the candidate item set C in each subset is calculated separately, and then the average value is taken as the final support estimate.
[0133] S315. Generate association rules and calculate confidence:
[0134] After support screening, frequent item sets are obtained. For each frequent item set, all possible association rules are generated from the frequent item set. The form of the association rules is:
[0135]
[0136] Where X and Y are non-empty subsets of the frequent item set F, and X∪Y=F, X∩Y=φ;
[0137] By traversing all frequent item sets, all possible combinations of such association rules are generated;
[0138] Calculate the confidence for each association rule generated Calculate its confidence:
[0139]
[0140] Among them, Su(X∪Y) is the support of the union of non-empty subsets of the frequent item set F in the transaction set, that is, the support of the union of X and Y in the transaction set; Su(X) is the support of the item set X in the transaction set; the confidence is compared with the set confidence threshold, and the association rules with confidence greater than or equal to the threshold are retained. These rules establish a mapping relationship between the fault feature vector and the fault location, such as "if the mean power loss is greater than a certain threshold and the maximum power change rate is greater than another threshold, then the fault location is in a certain area."
[0141] In S3, the mapping relationship between the feature vectors of all historical fault events mined and the fault locations is stored to form a power loss feature library: a relational database (such as MySQL) or a non-relational database (such as MongoDB) is used for storage. If a relational database is used, a corresponding table structure needs to be established, including data columns for each dimension of the feature vector, a fault location column, and support and confidence columns for association rules, etc., and indexes are established for key columns to improve query efficiency; if a non-relational database is used, the mapping relationship is stored in document form according to its data storage characteristics.
[0142] like Figure 5 As shown, the S4 includes:
[0143] S41. Multi-dimensional similarity calculation and matching. Based on the power loss feature library built in S3, the cosine similarity algorithm is used to calculate the similarity between the real-time fault feature vector and the feature vectors in the power loss feature library. The real-time feature vector is compared one by one with all feature vectors in the library to find the feature point with the highest similarity and determine its corresponding historical fault feature vector. The cosine similarity calculation formula is:
[0144]
[0145] in, is the real-time power loss feature vector; is the feature vector in the feature library;
[0146] S42. Optimize the fault location. Based on the fault location information corresponding to the feature point that best matches the real-time feature vector in the feature library, the fault location is further optimized in combination with the line topology and power transmission direction. Using the shortest path algorithm in graph theory (such as the Dijkstra algorithm), the line topology is converted into a graph structure, where nodes represent key locations on the line, edges represent line connections, and edge weights are set to line lengths or other relevant parameters. Based on the power transmission direction, the power flow is traced from the power source end to exclude fault locations that do not conform to the power transmission logic. For example, if the power transmission direction is from the substation to the user, and a possible fault location is located upstream of the power transmission direction, this location can be excluded. Combined with the segmentation of the line, the fault range is narrowed to a specific line segment or area, improving the accuracy of fault location.
[0147] The above description is a preferred embodiment of the invention and is not intended to limit the invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the invention should be included in the scope of protection of the invention.
Claims
1. A distribution line fault location method based on loss power matching, characterized in that: The following steps are involved: S1. Data acquisition: Power sensors are installed at key nodes on the distribution lines. These sensors collect line voltage, current, and phase information in real time. They calculate the line power data based on this information. This power data is then transmitted in real time to a data processing center via a high-speed communication link for subsequent processing. S2. Fault feature extraction: Based on the collected power data, a dynamic modeling algorithm is used to extract pre- and post-fault data segments, train the model, predict power, and calculate power loss characteristics. A sliding window algorithm is then used in conjunction with a multi-dimensional feature extraction method to obtain transient and steady-state characteristics of the fault. Finally, all features are integrated to construct a fault feature vector, providing characteristic information for fault location. S3. Construct a feature library driven by historical data. This involves collecting historical fault data and utilizing the fault feature vectors extracted in S2. The Apriori association rule mining algorithm is then used to mine the mapping relationship between the fault feature vectors and the fault locations. The mapping relationship between the feature vectors of all historical fault events and the fault locations is stored to form a power loss feature library. S4. Real-time feature matching and intelligent positioning. Based on the real-time data collected by S1 and the feature library constructed by S3, a multi-dimensional similarity algorithm is used to compare the power loss feature vector extracted in real time with the feature vectors in the power loss feature library one by one. The similarity between the real-time feature vector and each feature vector in the library is calculated to find the feature point that best matches the real-time feature vector. The fault location is optimized based on the fault location information corresponding to the feature point in the feature library that best matches the real-time feature vector, combined with the line topology and power transmission direction.
2. The distribution line fault location method based on loss power matching according to claim 1, characterized in that: The key nodes in S1 include substation exits, branch points and user access points.
3. The distribution line fault location method based on loss power matching according to claim 1, characterized in that: The power data includes active power and reactive power.
4. The distribution line fault location method based on loss power matching according to claim 1, characterized in that: In S2, the method of using a dynamic modeling algorithm to extract data segments before and after a fault, train a model, predict power, and calculate power loss characteristics includes: S211. Initialize the model parameters and select the autoregressive moving average model ARNA(p,q) algorithm. The ARNA(p,q) model expression is: in, It is the autoregressive AR part, which represents the power data X at the current moment. t and the power data X at the past p moments t-i (i=1,2,…,p) has a linear relationship, is the autoregressive coefficient; It is the sliding average MA part, which reflects the power data X at the current moment t and the white noise sequence ε of the past q moments t-i (i=1,2,…,q) has a linear relationship, θ j is the sliding mean coefficient; ε t The white noise at the current moment is the random part of the model that cannot be fully explained by the past power data and past white noise; S212. Divide the data segments before and after the fault, and divide the collected power data into two data segments before and after the fault according to the timestamp of the fault. S213. Model training and prediction: Use the pre-fault data segment to train a dynamic model. Estimate the model coefficients using the least squares method to ensure that the model can better fit the changing patterns of the pre-fault power data. Use the trained model to predict the post-fault data to obtain the predicted power value. S214. Calculate the power loss characteristics, calculate the difference between the actual power value and the predicted power value after the fault, and obtain the power loss value. Perform statistical analysis on the power loss value, calculate the mean and variance, and use these statistics as the power loss characteristics before and after the fault; Power loss value ΔX t The calculation formula is: Mean power loss Calculation formula: The power loss variance Var(ΔX) is calculated as follows: Where t0 is the time when the fault occurs; T1 represents the time length from the time when the fault occurs t0 to the past; T2 represents the time length from the time when the fault occurs t0 to the past. T1 and T2 are determined according to the actual situation to ensure that sufficient information before and after the fault is obtained; X t is the actual power value at time t after the fault; is the predicted power value at time t; n is the number of power loss values included in the mean calculation, that is, the number of samples in the time period from t0 to t0+T2.
5. The distribution line fault location method based on loss power matching according to claim 1, characterized in that: In S2, the step of capturing transient and steady-state features using a sliding window algorithm and a multi-dimensional feature extraction method includes: S221. Sliding window setting, determining the sliding window size and sliding step size. The window size is determined according to the time scale of the fault transient process and the data acquisition frequency. S222. Transient feature extraction: Based on first-order derivative feature extraction, starting from the data near the time of fault occurrence, the window is slid sequentially according to the set sliding step size. Within each window, the first-order derivative of the power data is calculated. The first-order derivative intuitively reflects the rate of change of the power data. At the moment of fault occurrence, the rapid change in power will cause significant fluctuations in the first-order derivative. The maximum and minimum values of the first-order derivative within each window are recorded. These extreme values can reflect the severity of the power change at the time of the fault. At the same time, the trend of the first-order derivative is analyzed, such as the upward or downward slope, to determine whether the power is rapidly increasing or decreasing, thus providing clues for preliminary judgment of the fault type. Based on the feature extraction of the second-order derivative, the second-order derivative of the power data is obtained by calculating the difference of the first-order derivative. Specifically, the first-order derivative at time t is: The first-order derivative at time t+1 is: Then the difference of the first-order derivatives is: On this basis, divided by the time interval Δt, the second-order derivative is approximately obtained The second-order derivative can more keenly capture the acceleration information of power changes. When a fault occurs, the acceleration of power changes will suddenly change. The abnormal change of the second-order derivative is an important transient feature to further analyze the development process and severity of the fault. Where X represents the power data collected in S1, X t Indicates the power data at time t, X t+1 Indicates the power data at time t+1; S223. Steady-state feature extraction: Power mean calculation: Within each sliding window, power data is statistically analyzed and its mean is calculated. The mean reflects the steady-state power level after a fault. Different types of faults and fault locations on the distribution line can lead to differences in steady-state power after a fault. By comparing the power mean values in different windows, we can understand the steady state and changes of power after a fault, providing a reference for fault location. Power standard deviation calculation: Calculate the standard deviation of power data within each window. The standard deviation measures the degree of fluctuation of power data in steady state. Even in the steady state after a fault, power data still fluctuates to a certain extent. The larger the standard deviation, the greater the dispersion of power data and the more severe the fluctuation. Analyzing changes in power standard deviation can help determine whether the fault has caused instability in line operation and the degree of instability. S224. Construct a fault feature vector by integrating the power loss characteristics obtained through dynamic modeling with the transient and steady-state characteristics obtained through sliding window and multi-dimensional feature extraction methods to construct a fault feature vector; the fault feature vector comprehensively describes the changing characteristics of power data when a fault occurs from multiple dimensions, providing rich and representative feature information for subsequent fault location.
6. The distribution line fault location method based on loss power matching according to claim 1, characterized in that: In S3, the method of mining the mapping relationship between the fault feature vector and the fault location using the association rule mining algorithm Apriori is as follows: S311. Transaction set construction: Following the method for extracting fault feature vectors in S2, extract the power loss feature vector for each historical fault event. Combine the power loss feature vector and the corresponding fault location information for each fault event into a transaction. Aggregate the transactions of all historical fault events to form a transaction set, which serves as the input data for the Apriori algorithm. S312.1 Itemset Generation: Scan the transaction set to generate all 1-itemsets; S313.2 Itemset Generation: Based on the generated 1-itemset, all possible 2-itemsets are formed by combining the elements in the 1-itemset in pairs. This process continues to generate higher-order candidate itemsets until the pre-set maximum itemset order is reached. S314. Calculate the support. For each candidate item set, calculate the support of the candidate item set in the transaction set. The support Su(C) of the candidate item set in the transaction set is expressed as: C is the candidate item set, T is the transaction set; Compare the support of each candidate item set C with the set support threshold. If the support Su(C) is greater than the support threshold, the candidate item set is identified as a frequent item set; if the support Su(C) is less than the support threshold, the candidate item set will be eliminated. In order to ensure the accuracy of the support calculation, multiple sampling statistics are used, that is, the transaction set T is randomly sampled and divided into multiple subsets. The support of the candidate item set C in each subset is calculated separately, and then the average value is taken as the final support estimate. S315. Generate association rules and calculate confidence. After support screening, frequent item sets are obtained. For each frequent item set, all possible association rules are generated from the frequent item set. The form of the association rules is: Among them, X and Y are non-empty subsets of the frequent item set F, and X∪Y=F, X∩Y=φ, By traversing all frequent item sets, all possible combinations of such association rules are generated; Calculate the confidence for each association rule generated Calculate its confidence: Among them, Su(X∪Y) is the support of the union of non-empty subsets of the frequent item set F in the transaction set, that is, the support of the union of X and Y in the transaction set; Su(X) is the support of the item set X in the transaction set; the confidence is compared with the set confidence threshold, and the association rules with confidence greater than or equal to the threshold are retained. These rules establish the mapping relationship between the fault feature vector and the fault location.
7. The distribution line fault location method based on loss power matching according to claim 1, characterized in that: In S3, the mapping relationship between the feature vectors of all historical fault events mined and the fault locations is stored to form a power loss feature library: a relational database or a non-relational database is used for storage. If a relational database is used, a corresponding table structure needs to be established, including data columns for each dimension of the feature vector, a fault location column, and support and confidence columns for the association rules, and indexes are established for key columns to improve query efficiency. If a non-relational database is used, the mapping relationship is stored in document form based on its data storage characteristics.
8. The distribution line fault location method based on loss power matching according to claim 1, characterized in that: The S4 includes: S41. Multi-dimensional similarity calculation and matching. Based on the power loss feature library built in S3, the cosine similarity algorithm is used to calculate the similarity between the real-time fault feature vector and the feature vectors in the power loss feature library. The real-time feature vector is compared one by one with all feature vectors in the library to find the feature point with the highest similarity and determine its corresponding historical fault feature vector. The cosine similarity calculation formula is: in, is the real-time power loss feature vector; is the feature vector in the feature library; S42. Optimize the fault location. Based on the fault location information corresponding to the feature point that best matches the real-time feature vector in the feature library, the fault location is further optimized in combination with the line topology and power transmission direction. Utilize the Dijkstra algorithm in graph theory to convert the line topology into a graph structure, where nodes represent key locations on the line, edges represent line connection relationships, and edge weights are set to line length or other relevant parameters. Based on the power transmission direction, trace the power flow starting from the power source end to eliminate fault locations that do not conform to the power transmission logic.