A line loss analysis method and system based on carbon flow tracking
By using a carbon flow tracing-based line loss analysis method, carbon emission flow models and XGBoost models are used to screen out nodes with abnormal carbon levels and identify abnormal electricity consumption by users. This solves the problem of low monitoring efficiency in line loss analysis and improves the operation and maintenance efficiency of the power system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID NINGXIA ELECTRIC POWER CO LTD MARKETING SERVICE CENT STATE GRID NINGXIA ELECTRIC POWER CO LTD METERING CENT
- Filing Date
- 2024-12-11
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies for line loss analysis, especially when the power variation at line nodes is large and the load characteristics are diverse, result in a large amount of data and computation, leading to low efficiency in monitoring and identifying line loss anomalies.
A carbon flow tracing-based line loss analysis method is adopted. By establishing a carbon emission flow model and a gradient decision tree XGBoost model, abnormal carbon nodes are screened out, and the electricity consumption of their corresponding users is analyzed to identify abnormal situations.
It improves the efficiency of monitoring and identifying abnormal line losses, and enhances the operation and maintenance efficiency of the power system.
Smart Images

Figure CN119939447B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power data anomaly analysis technology, and in particular to a line loss analysis method and system based on carbon flow tracing. Background Technology
[0002] As a crucial component of the power system, the distribution network's operational efficiency and maintenance level directly impact power quality and supply stability. Line loss management is a key indicator for measuring the economic efficiency and operational status of the power grid, representing the energy loss from generation to consumption, including both technical and managerial losses. Abnormal line losses typically refer to losses exceeding normal limits, which may be caused by equipment failure, line aging, or unauthorized connections. Effective monitoring and locating abnormal line losses are essential for preventing electricity theft, identifying grid topology anomalies, and improving the overall operational efficiency of the power grid.
[0003] The power of line nodes varies greatly and the load characteristics are diverse. In line loss analysis, it is usually necessary to comprehensively detect and analyze the power consumption data of all nodes and all users. This method involves a huge amount of data and a large amount of calculation, and consequently, the monitoring and identification efficiency of line loss anomalies is not high. Summary of the Invention
[0004] In view of this, the present invention provides a line loss analysis method and system based on carbon flow tracing. By predicting abnormal carbon content at nodes, abnormal carbon content nodes are screened out, and then abnormal electricity consumption is identified for the users corresponding to the abnormal carbon content nodes. This can effectively improve the monitoring and identification efficiency of abnormal line loss and improve the operation and maintenance efficiency of the power system.
[0005] The technical solution adopted by the embodiments of the present invention to solve its technical problem is as follows:
[0006] A line loss analysis method based on carbon flow tracing, comprising:
[0007] Step S1: Establish a carbon emission flow model based on tidal flow analysis:
[0008]
[0009] In the formula, CE represents the total carbon loss at node i; in The total amount of carbon input to node i; CE o Let p be the total output carbon of node i; m∈[1,M], where M is the total number of input branches of node i, and p m e is the input power of the input branch m. m Let p be the nodal carbon flux density of input branch m; n∈[1,N], where N is the total number of output branches of node i, p n For the output power of branch n, e n The nodal carbon flux density of output branch n;
[0010] Step S2: Construct an XGBoost model for carbon anomaly screening based on the gradient decision tree XGBoost. The XGBoost model is defined as follows:
[0011]
[0012] In the formula: F represents the classification and regression tree space, f k As the base learner, f k (x i ) represents the k-th tree pair of sample x i The predicted score; the input to the XGBoost model is the total carbon loss CE at node i. This indicates the prediction result obtained by the XGBoost model based on the total carbon loss of node i, and the conclusion of whether node i is an abnormal carbon node.
[0013] The objective function of the XGBoost model is defined as:
[0014]
[0015] In the formula, g i and h i loss function First and second partial derivatives, y i For sample x i The corresponding true value, where T represents the number of decision trees, γ and λ are hyperparameters, and j is the decision tree count, j∈[1,T]; I j It is sample x i The set of leaf nodes j that have been assigned to;
[0016] Step S3: Analyze each node in the network topology based on the XGBoost model, and predict nodes with abnormal carbon emissions based on the power and carbon emission density of each node.
[0017] Step S4: Perform power analysis on each user corresponding to the abnormal carbon content node. The power analysis includes abnormal power analysis of high voltage users and abnormal power analysis of low voltage users to determine the type of abnormal situation of the user.
[0018] Preferably, the derivation process of the objective function of the XGBoost model in step S2 includes:
[0019] The initial definition of the objective function for the XGBoost model is:
[0020]
[0021] In the formula: y i For sample x iThe corresponding true value, Let Ω(f) represent the prediction bias of the i-th sample, I be the total number of samples, Ω(f) represent the model complexity, T be the number of decision trees, ω be the weights, and γ and λ be hyperparameters.
[0022] set up To predict the result of the i-th sample in the t-th iteration, the objective function of the t trees is:
[0023]
[0024] The objective function of t trees is further expressed by performing a second-order Taylor expansion:
[0025]
[0026] Where: g i and h i loss function The first and second partial derivatives, and I is a constant term; j is the decision tree count value, j∈[1,T]; j It is sample x i The set of leaf nodes j to which ω is assigned, j The weights of the leaf nodes;
[0027] Taking the derivative of the second-order Taylor expansion, the leaf node weight ω is obtained when the derivative is 0. j * :
[0028]
[0029] ω j * Substituting the original objective function Obj(θ) yields the new objective function Obj. t :
[0030]
[0031] Preferably, step S4, high-voltage user abnormal power analysis, includes:
[0032] Judgment of abnormal pressure loss for three-phase high-voltage users:
[0033] For three-phase four-wire high-voltage users, the undervoltage threshold is defined as U. H1 Analyze the absolute values of the current at historical points of voltage loss in each phase. When three conditions are met simultaneously, it is determined that the high-voltage user has experienced voltage loss and abnormal current.
[0034] Condition C11: There is a daily abnormal moment in a day, the daily abnormal moment is the time of voltage loss, and at least one phase sequence satisfies that the absolute value of the current value is not lower than the high voltage current threshold.
[0035] Condition C12: The number of daily anomalies in at least one phase sequence is not less than N1, where the number of daily anomalies is the number of daily anomaly times;
[0036] Condition C13: The number of consecutive days with daily abnormalities is not less than N2, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that satisfy condition C12;
[0037] Judgment of current imbalance anomaly in three-phase four-wire high-voltage users:
[0038] For three-phase four-wire high-voltage users, the daily average absolute values of currents I1, I2, and I3 are not 0A, and the daily average absolute value of one phase sequence current is less than the daily average absolute value of the other two phase sequence currents. The phase sequence current imbalance is defined as the value corresponding to the minimum average value. The correlation coefficient P of the other two phase sequence currents at specific times is calculated using the Pearson correlation coefficient formula. H When P∈[0.8,1], it is confirmed to meet the strong positive correlation. Analyze the daily sampled values of the two-phase currents that are strongly positively correlated. Sort the absolute values of the two-phase currents from high to low. The time points corresponding to the first three values of each phase are taken as the three maximum time points of each phase. When all four conditions are met, it is determined that the low-voltage user has an abnormal current imbalance:
[0039] Condition C21: The first three values of each phase are all greater than the high voltage current threshold;
[0040] Condition C22: The three maximum time points of each phase occur on three identical tangent planes;
[0041] Condition C23: The absolute value of active power at any time point of maximum value of any phase is greater than the absolute value of reactive power;
[0042] Condition C24: At any point in time when the current reaches its maximum value in any phase, the ratio of the current at the maximum value to the phase sequence current corresponding to the minimum average value is higher than a preset ratio P. H ;
[0043] Judgment of current imbalance anomaly in three-phase three-wire high-voltage users:
[0044] For three-phase three-wire high-voltage users, if the daily average absolute values of currents I1 and I3 are not 0A, the phase sequence with the smaller daily average absolute value is defined as having an unbalanced current sequence. The absolute values of currents with larger daily average absolute values are sorted from highest to lowest, and the three times corresponding to the first three values are taken as the three maximum times for their respective phase sequences. When all three conditions are met simultaneously, the three-phase three-wire high-voltage user is determined to have an abnormal current imbalance.
[0045] Condition C31: The first three values are all greater than the high voltage current threshold;
[0046] Condition C32: The current ratio of each cross section at any given time is always greater than the preset ratio P. L In the current ratio, the phase sequence current containing the current with the larger daily average absolute value is used as the denominator.
[0047] Condition C33: The absolute value of active power at any point in time when the maximum value is reached is greater than the absolute value of reactive power.
[0048] Preferably, step S4, the abnormal power consumption analysis of high-voltage users, also includes the determination of abnormal public-private transformer users:
[0049] Preferably, step S4, the abnormal power consumption analysis of high-voltage users, further includes the determination of abnormal public-private transformer users: Abnormal determination of private transformer users: The correlation r1 between the private transformer user power consumption data and the line loss data is calculated using the Pearson correlation coefficient formula; the DTW distance D1 between the private transformer user power consumption data and the line loss data is calculated; wherein, when r1∈[0.8,1] and D1∈[0,D...], the abnormality is determined by... t1 ), confirming abnormal metering for dedicated transformer users;
[0050] Anomaly detection for public transformer users: The correlation r2 between the public transformer area line loss data and the line loss data is calculated using the Pearson correlation coefficient formula; the DTW distance D2 between the public transformer area line loss data and the line loss data is calculated; where, when both r2∈[-1,-0.8] and D2∈(D t2 (+∞), confirm that the metering of the public transformer user is abnormal.
[0051] Preferably, the formula for calculating the correlation r using the Pearson correlation coefficient formula is:
[0052]
[0053] Among them, X i Y represents the electricity consumption data for dedicated transformer users or the line loss data for public transformer areas. i This represents the line loss data. For X i The mean, For Y i The mean of r ∈ [0.8,1] indicates that the two are strongly positively correlated; r ∈ [-1,-0.8] indicates that the two are strongly negatively correlated.
[0054] Preferably, the DTW dynamic time bending distance calculation process is as follows:
[0055] Given two time series X = {x1, x2, ..., x...} m} and Y = {y1, y2, ..., y nConstruct the cumulative distance D(i,j), where X represents the time series set of dedicated transformer user electricity data or public transformer area line loss data, and Y represents the time series set of line loss data:
[0056] D(i,j)=d(x i ,y j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}
[0057] In the formula: d(x) i ,y j )=(x i -y j ) 2 , 1≤i≤m, 1≤j≤n, initial condition is D(1,1)=d(x i ,y j );
[0058] The range reached by the curved path W in the distance matrix is called the curvature window, and the final distance metric is defined as:
[0059]
[0060] In the formula, K is the length of the curved path W; a threshold D is set. t1 D t2 D t1 <D t2 , D∈[0,D t1 ) indicates that the two are strongly positively correlated; D∈(D t2 (+∞) indicates that the two are strongly negatively correlated.
[0061] Preferably, step S4, low-voltage user abnormal power analysis, includes:
[0062] Determination of voltage loss and abnormal current for three-phase four-wire low-voltage users:
[0063] For three-phase four-wire low-voltage users, the voltage threshold below the lower limit is defined as U. L1 Analyze the current values at historical points of voltage loss. When three conditions are met simultaneously, it is determined that the low-voltage user has experienced voltage loss and abnormal current.
[0064] Condition C41: There is a daily abnormal moment in a day, the daily abnormal moment is the time of voltage loss, and at least one phase sequence satisfies that the absolute value of the current value is not lower than the low voltage current threshold.
[0065] Condition C42: The percentage of daily outlier points in at least one phase sequence to the total number of daily sampling points is not less than a preset percentage P1, where the number of daily outlier points is the number of daily outlier moments.
[0066] Condition C43: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C42;
[0067] Determination of single-phase voltage exceeding the lower limit for low-voltage users:
[0068] For single-phase low-voltage users, the voltage threshold below the lower limit is defined as U. L2 When two conditions are met simultaneously, it is determined that the low-voltage user has a single-phase voltage below the lower limit anomaly:
[0069] Condition C51: The percentage of daily outlier points to the total number of daily sampling points is not less than the preset percentage P1;
[0070] Condition C52: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that satisfy condition C51;
[0071] Determination of single-phase voltage exceeding the upper limit for low-voltage users:
[0072] For single-phase low-voltage users, the voltage threshold above the upper limit is defined as U. L3 Analyze the current values at historical points of voltage loss. If two conditions are met simultaneously, it is determined that the low-voltage user has a single-phase voltage exceeding the upper limit anomaly.
[0073] Condition C61: The percentage of daily abnormal points to the total number of daily sampling points is not less than the preset percentage P1;
[0074] Condition C62: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C61;
[0075] Current imbalance anomaly determination for three-phase four-wire low-voltage users:
[0076] For three-phase four-wire low-voltage users, if the daily average absolute value of the three-phase four-wire current is not 0A, and the daily average absolute value of one phase sequence current is less than the daily average absolute value of the other two phase sequence currents, the phase sequence current imbalance corresponding to the minimum average value is defined. The correlation coefficient P of the time point data of the other two phase sequence currents is calculated according to the Pearson correlation coefficient formula. When P∈[0.8,1], it is confirmed to be a strong positive correlation. The daily sampled values of the two mutually strongly correlated phase currents are analyzed. The absolute values of the two phase currents are sorted from high to low, and the time points corresponding to the first three values of each phase are taken as the three maximum time points of each phase. When all four conditions are met simultaneously, it is determined that the low-voltage user has an abnormal current imbalance:
[0077] Condition C71: The first three values of each phase are all greater than the low-voltage current threshold.
[0078] Condition C72: Among the three maximum time points of the two phases, there exists a maximum time point that occurs on the same tangent.
[0079] Condition C73: The absolute value of active power at any point in time when the maximum value of any phase is greater than the absolute value of reactive power;
[0080] Condition C74: At any point in time when the current reaches its maximum value in any phase, the ratio of the current at the maximum value to the phase sequence current corresponding to the minimum average value is higher than a preset ratio P. L .
[0081] A line loss analysis system based on carbon flow tracing is used to perform the aforementioned method.
[0082] As can be seen from the above technical solution, the carbon flow tracing-based line loss analysis method and system provided in this invention first establishes a carbon emission flow model based on power flow analysis; then, it constructs an XGBoost model for carbon anomaly screening and the model's objective function based on the gradient decision tree XGBoost; it analyzes each node in the network topology based on the XGBoost model, and predicts carbon anomaly nodes based on the power and carbon emission density of each node; finally, it performs power consumption analysis on each user corresponding to the carbon anomaly nodes, including abnormal power consumption analysis for high-voltage users and abnormal power consumption analysis for low-voltage users, to determine the type of anomaly present in the user. This invention first screens out carbon anomaly nodes through node carbon anomaly prediction, and then identifies user power consumption anomalies based on line loss for these carbon anomaly nodes, which can effectively improve the monitoring and identification efficiency of line loss anomalies in the transformer area. Attached Figure Description
[0083] Figure 1 This is a flowchart of the line loss analysis method based on carbon flow tracing of the present invention.
[0084] Figure 2 This is a schematic diagram of the carbon emission input and output at the node. Detailed Implementation
[0085] The technical solution and effects of the present invention will be further described in detail below with reference to the accompanying drawings.
[0086] refer to Figure 1 As shown, this invention provides a line loss analysis method based on carbon flow tracing, the specific implementation of which includes:
[0087] Step S1: Establish a carbon emission flow model based on tidal flow analysis:
[0088]
[0089] In the formula, CE represents the total carbon loss at node i; in The total amount of carbon input to node i; CE o Let p be the total output carbon of node i; m∈[1,M], where M is the total number of input branches of node i, and p me is the input power of the input branch m. m Let p be the nodal carbon flux density of input branch m; n∈[1,N], where N is the total number of output branches of node i, p n For the output power of branch n, e n The nodal carbon flux density of output branch n;
[0090] Step S2: Construct an XGBoost model for carbon anomaly screening based on the gradient decision tree XGBoost. The XGBoost model is defined as follows:
[0091]
[0092] In the formula: F represents the classification and regression tree (CART) space, f k As the base learner, f k (x i ) represents the k-th tree pair of sample x i The predicted score; the input to the XGBoost model is the total carbon loss CE at node i. This indicates the prediction result obtained by the XGBoost model based on the total carbon loss of node i, and the conclusion of whether node i is an abnormal carbon node.
[0093] The initial definition of the objective function for the XGBoost model is:
[0094]
[0095] In the formula: y i For sample x i The corresponding true value, Let Ω(f) represent the prediction bias of the i-th sample, I be the total number of samples, Ω(f) represent the model complexity, T be the number of decision trees, ω be the weights, and γ and λ be hyperparameters.
[0096] set up To predict the result of the i-th sample in the t-th iteration, the objective function of the t trees is:
[0097]
[0098] The objective function of t trees is further expressed by performing a second-order Taylor expansion:
[0099]
[0100] Where: g i and h i loss function The first and second partial derivatives, and I is a constant term; j is the decision tree count value, j∈[1,T]; j It is sample x i The set of leaf nodes j to which ω is assigned, j f(x) represents the weight of the leaf node. i () represents the assignment function of a node in a decision tree model, used to indicate the input instance x. i It is assigned to which leaf node j. Therefore, the set Ij contains all instances that are assigned to leaf node j.
[0101] Taking the derivative of the second-order Taylor expansion, the leaf node weight ω is obtained when the derivative is 0. j * :
[0102]
[0103] ω j * Substituting the original objective function Obj(θ) yields the new objective function Obj. t As the objective function of the XGBoost model:
[0104]
[0105] It is possible to build a database with real labels using historical data. i Data x i The database is further divided into training set, validation set, and test set. The model is trained using the training set, and hyperparameters γ and λ are tuned using methods such as particle optimization to minimize the prediction loss (the iteration cutoff condition can be the maximum number of iterations or loss convergence). After model training, model validation, and testing, a model with good prediction performance is obtained.
[0106] Step S3: Analyze each node in the network topology based on the XGBoost model, and predict the nodes with abnormal carbon emissions based on the power and carbon emission density of each node.
[0107] Step S4: Perform power analysis on each user corresponding to the abnormal carbon content node. The power analysis includes abnormal power analysis of high voltage users and abnormal power analysis of low voltage users to determine the type of abnormal situation of the user.
[0108] Step S4, abnormal power consumption analysis for high-voltage users, includes:
[0109] Judgment of abnormal pressure loss for three-phase high-voltage users:
[0110] For three-phase four-wire high-voltage users, the undervoltage threshold is defined as U. H1Analyze the absolute values of the current at historical points of voltage loss in each phase. When three conditions are met simultaneously, it is determined that the high-voltage user has experienced voltage loss and abnormal current.
[0111] Condition C11: There is a daily abnormal moment in a day, which is the moment of voltage loss, and at least one phase sequence satisfies that the absolute value of the current value is not lower than the high voltage current threshold.
[0112] Condition C12: The number of daily anomalies in at least one phase sequence is not less than N1, where the number of daily anomalies is the number of daily anomaly times;
[0113] Condition C13: The number of consecutive days with daily abnormalities is not less than N2, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C12;
[0114] For example, if the standard voltage specification is 3*220V, the threshold voltage U H1 It is 176V; if the standard voltage specification is 3*100V, the threshold voltage U H1 It is 80V; if the standard voltage specification is 3*57.7V, the threshold U H1 The voltage is 46V; at least one point in any phase sequence at which the absolute value of the current is greater than or equal to 0.1A; the number of abnormal points per day for any phase sequence is greater than or equal to 12 (including cases where both two and three phases meet the voltage loss condition), and the number of consecutive days of abnormality is greater than or equal to 3 days. If the above conditions are met, the user is determined to have a voltage loss anomaly.
[0115] Judgment of current imbalance anomaly in three-phase four-wire high-voltage users:
[0116] For three-phase four-wire high-voltage users, the daily average absolute values of currents I1, I2, and I3 are not 0A, and the daily average absolute value of one phase sequence current is less than the daily average absolute value of the other two phase sequence currents. The phase sequence current imbalance is defined as the value corresponding to the minimum average value. The correlation coefficient P of the other two phase sequence currents at specific times is calculated using the Pearson correlation coefficient formula. H When P∈[0.8,1], it is confirmed to meet the strong positive correlation. Analyze the daily sampled values of the two-phase currents that are strongly positively correlated. Sort the absolute values of the two-phase currents from high to low. The time points corresponding to the first three values of each phase are taken as the three maximum time points of each phase. When all four conditions are met, it is determined that there is an abnormal current imbalance for low-voltage users:
[0117] Condition C21: The first three values of each phase are all greater than the high voltage current threshold;
[0118] Condition C22: The three maximum time points of each phase occur on three identical cross planes; (meaning, the three maximum time points of the three phases are distributed in cross plane one, cross plane two, and cross plane three respectively).
[0119] Condition C23: The absolute value of active power at any time point of maximum value of any phase is greater than the absolute value of reactive power;
[0120] Condition C24: At any point in time when the current reaches its maximum value in any phase, the ratio of the current at the maximum value to the phase sequence current corresponding to the minimum average value is higher than a preset ratio P. H ;
[0121] For example, if the daily average absolute values of currents I1, I2, and I3 are all not 0A (daily data refers to 96 data points), and in a three-phase four-wire system, the daily average absolute values of I2 and I3 are greater than the daily average absolute value of I1, then the current sequence of the phase containing I1 is defined as unbalanced. In a three-phase four-wire system, the absolute values of the two-phase currents I2 and I3 are ranked, and the top three maximum values of each phase satisfy the following conditions: the top three maximum absolute values are all greater than 0.1A; the three maximum values for any phase occur at the same cross section; the absolute values of active power at the three maximum values are respectively greater than the absolute values of reactive power; and the three maximum values satisfy |I3 / I1| > 1.5 and |I2 / I1| > 1.5. I2,I3 A correlation coefficient greater than 0.8 is required; if the above conditions are met, the user is determined to have an abnormal current imbalance. Here, the correlation coefficient P... I2,I3 The calculation formula is:
[0122]
[0123] In the formula, P I2,I3 Let I represent the correlation between the phase sequences of users I2 and I3, Cov(I2,I3) represent the covariance of the phase sequences of users I2 and I3, Var(I2) and Var(I3) represent the variances, and P represents the variance. I2,I3 ∈[0.8,1], when P I2,I3 The larger the value, the stronger the positive correlation;
[0124] Judgment of current imbalance anomaly in three-phase three-wire high-voltage users:
[0125] For three-phase three-wire high-voltage users, if the daily average absolute values of currents I1 and I3 are not 0A, the phase sequence with the smaller daily average absolute value is defined as having an unbalanced current sequence. The absolute values of currents with larger daily average absolute values are sorted from highest to lowest, and the three times corresponding to the first three values are taken as the three maximum times for their respective phase sequences. When all three conditions are met simultaneously, the three-phase three-wire high-voltage user is determined to have an abnormal current imbalance.
[0126] Condition C31: The first three values are all greater than the high voltage current threshold;
[0127] Condition C32: The ratio of the currents in each cross section at any given time is always greater than the preset ratio P. L Among them, the phase sequence current with the larger daily average absolute value of the current in the current ratio is used as the denominator.
[0128] Condition C33: The absolute value of active power at any point in time when the maximum value is reached is greater than the absolute value of reactive power.
[0129] For example, if the daily average absolute values of currents I1 and I3 are not 0A, and the daily average absolute value of I3 is greater than the daily average absolute value of I1 in a three-phase three-wire system, then the current imbalance in phase sequence I1 is defined. The absolute values of the three-phase three-wire I3 currents are sorted (96 points sorted), and the top three maximum values satisfy the following conditions: 1. The top three maximum absolute values are all greater than 0.1A; 2. |I3 / I1|>1.5; 3. The absolute values of active power corresponding to the three maximum values of I3 are greater than the absolute values of reactive power. If all three conditions are met, then the user is determined to have an abnormal current imbalance.
[0130] Preferably, step S4, abnormal power consumption analysis of high-voltage users, also includes the determination of abnormal public-private transformer users: Abnormal determination of private transformer users: The correlation r1 between the private transformer user power consumption data and the line loss data is calculated using the Pearson correlation coefficient formula; the DTW distance D1 between the private transformer user power consumption data and the line loss data is calculated; where, when r1∈[0.8,1] and D1∈[0,D...], the abnormality is determined by... t1 ), confirming abnormal metering for dedicated transformer users;
[0131] Anomaly detection for public transformer users: The correlation r2 between the public transformer area line loss data and the line loss data is calculated using the Pearson correlation coefficient formula; the DTW distance D2 between the public transformer area line loss data and the line loss data is calculated; where, when both r2∈[-1,-0.8] and D2∈(D t2 (+∞), confirm that the metering of the public transformer user is abnormal.
[0132] The formula for calculating the correlation coefficient r, as used by Pearson, is as follows:
[0133]
[0134] Among them, X i Y represents the electricity consumption data for dedicated transformer users or the line loss data for public transformer areas. i This represents the line loss data. For X i The mean, For Y i The mean of r ∈ [0.8,1] indicates that the two are strongly positively correlated; r ∈ [-1,-0.8] indicates that the two are strongly negatively correlated.
[0135] The DTW dynamic time bending distance calculation process is as follows:
[0136] Given two time series X = {x1, x2, ..., x...} m} and Y = {y1, y2, ..., y nConstruct the cumulative distance D(i,j), where X represents the time series set of dedicated transformer user electricity data or public transformer area line loss data, and Y represents the time series set of line loss data:
[0137] D(i,j)=d(x i ,y j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)} (11)
[0138] In the formula: d(x) i ,y j )=(x i -y j ) 2 , 1≤i≤m, 1≤j≤n, initial condition is D(1,1)=d(x i ,y j );
[0139] The range reached by the curved path W in the distance matrix is called the curvature window, and the final distance metric is defined as:
[0140]
[0141] In the formula, K is the length of the curved path W; a threshold D is set. t1 D t2 D t1 <D t2 , D∈[0,D t1 ) indicates that the two are strongly positively correlated; D∈(D t2 (+∞) indicates that the two are strongly negatively correlated.
[0142] Preferably, step S4, low-voltage user abnormal power analysis, includes:
[0143] Determination of voltage loss and abnormal current for three-phase four-wire low-voltage users:
[0144] For three-phase four-wire low-voltage users, including direct-connect and transformer-based meters, the voltage threshold below the lower limit is defined as U. L1 Analyze the current values at historical points of voltage loss. If three conditions are met simultaneously, it is determined that the low-voltage user has experienced voltage loss and abnormal current.
[0145] Condition C41: There is a daily abnormal moment in a day, which is the moment of voltage loss, and at least one phase sequence satisfies that the absolute value of the current value is not lower than the low voltage current threshold.
[0146] Condition C42: The percentage of daily outlier points in at least one phase sequence to the total number of daily sampling points is not less than a preset percentage P1, where the number of daily outlier points is the number of daily outlier moments.
[0147] Condition C43: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C42;
[0148] For example, the three-phase four-wire voltage exceeds the lower limit threshold of 190V; at least one time point during the voltage loss meets the condition that the maximum absolute value of the current is ≥0.1A; the number of abnormal points in any phase sequence is ≥50% (including cases where both two and three phases meet the voltage loss condition), and the number of abnormal days is ≥3 days. If the above conditions are met, the user is determined to have a voltage loss and current abnormality.
[0149] Determination of single-phase voltage exceeding the lower limit for low-voltage users:
[0150] For single-phase low-voltage users, the voltage threshold below the lower limit is defined as U. L2 When two conditions are met simultaneously, it is determined that a low-voltage user has a single-phase voltage exceeding the lower limit anomaly:
[0151] Condition C51: The percentage of daily outlier points to the total number of daily sampling points is not less than the preset percentage P1;
[0152] Condition C52: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C51;
[0153] For example, for a single-phase low-voltage user, the voltage threshold below the lower limit is 132V, the daily abnormality rate is ≥50%, and the number of abnormal days is ≥3 days. If these conditions are met, the user is determined to have a single-phase voltage below the lower limit abnormality.
[0154] Determination of single-phase voltage exceeding the upper limit for low-voltage users:
[0155] For single-phase low-voltage users, the voltage threshold above the upper limit is defined as U. L3 Analyzing historical current values at points of voltage loss, if two conditions are met simultaneously, it is determined that a single-phase voltage exceeding the upper limit is an anomaly for low-voltage users:
[0156] Condition C61: The percentage of daily abnormal points to the total number of daily sampling points is not less than the preset percentage P1;
[0157] Condition C62: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C61;
[0158] For example, a single-phase low-voltage user's voltage exceeding the upper limit threshold is defined as follows: daily abnormality rate ≥ 50%, and abnormal number of days ≥ 3. If these conditions are met, the user is determined to have a single-phase voltage exceeding the upper limit abnormality.
[0159] Current imbalance anomaly determination for three-phase four-wire low-voltage users:
[0160] For three-phase four-wire low-voltage users, if the daily average absolute value of the three-phase four-wire current is not 0A, and the daily average absolute value of one phase sequence current is less than the daily average absolute value of the other two phase sequence currents, the phase sequence current imbalance corresponding to the minimum average value is defined. The correlation coefficient P of the time point data of the other two phase sequence currents is calculated according to the Pearson correlation coefficient formula. When P∈[0.8,1], it is confirmed to be a strong positive correlation. The daily sampled values of the two mutually strongly correlated phase currents are analyzed. The absolute values of the two phase currents are sorted from high to low, and the time points corresponding to the first three values of each phase are taken as the three maximum time points of each phase. When all four conditions are met simultaneously, it is determined that the low-voltage user has an abnormal current imbalance:
[0161] Condition C71: The first three values of each phase are all greater than the low-voltage current threshold.
[0162] Condition C72: Among the three maximum time points of the two phases, there exists a maximum time point that occurs on the same tangent.
[0163] Condition C73: The absolute value of active power at any point in time when the maximum value of any phase is greater than the absolute value of reactive power;
[0164] Condition C74: At any point in time when the current reaches its maximum value in any phase, the ratio of the current at the maximum value to the phase sequence current corresponding to the minimum average value is higher than a preset ratio P. L .
[0165] For example, if the daily average absolute values of the three-phase four-wire currents I1, I2, and I3 are all not 0A, and the daily average absolute values of I2 and I3 are greater than the daily average absolute value of I1, then the phase sequence current of I1 is defined as unbalanced (similarly, the phase sequence currents of I2 and I3 are unbalanced); calculate the correlation coefficient P. I2,I3 (Refer to formula (9)), P I2,I3 A correlation coefficient greater than 0.8 indicates a strong positive correlation.
[0166] The absolute values of the two-phase currents I2 and I3 in a three-phase four-wire system are ranked, and the top three maximum values of each phase are selected. The following conditions must be met: the top three maximum values are all greater than 0.1A; at least one of the three maximum values occurs on the same cross section; the absolute values of active power at the three time points are greater than the absolute values of reactive power; and the cross sections at the three time points satisfy |I3 / I1|>1.5 and |I2 / I1|>1.5 respectively. If the above conditions are met, the user is determined to have an abnormal current imbalance.
[0167] Furthermore, the present invention provides a line loss analysis system based on carbon flow tracing, used to execute the method described in steps S1-S4. The system may include a data acquisition module, a model building module, a prediction module, and an analysis module.
[0168] The data acquisition module is used to collect the input power of each input branch and the output power of each output branch of each node; and to obtain historical electricity consumption data of high-voltage and low-voltage users of the node lines.
[0169] The model building module is used to build analytical models, such as carbon emission flow models based on tidal flow analysis and XGBoost models.
[0170] The prediction module first obtains carbon loss data based on the carbon emission flow model, and then inputs it into the XGBoost model to predict node anomalies and obtain nodes with abnormal carbon content.
[0171] The analysis module is used to analyze the line loss of nodes with abnormal carbon content, including abnormal power generation analysis for high-voltage users and abnormal power generation analysis for low-voltage users, and to determine the type of abnormal situation that exists for the user.
[0172] This invention identifies nodes with abnormal carbon levels by predicting abnormal carbon levels, and then identifies users with abnormal electricity consumption corresponding to these nodes. This can effectively improve the efficiency of monitoring and identifying abnormal line losses and enhance the operation and maintenance efficiency of the power system.
[0173] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the above-described embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.
Claims
1. A line loss analysis method based on carbon flow tracing, characterized in that, include: Step S1: Establish a carbon emission flow model based on tidal flow analysis: In the formula, CE represents the total carbon loss at node i; CE in The total amount of carbon input to node i; CE o The total output carbon at node i; m∈[1,M], where M is the total number of input branches at node i, p m e is the input power of the input branch m. m Let p be the nodal carbon flux density of input branch m; n∈[1,N], where N is the total number of output branches of node i, p n For the output power of branch n, e n The nodal carbon flux density of output branch n; Step S2: Construct an XGBoost model for carbon anomaly screening based on the gradient decision tree XGBoost. The XGBoost model is defined as follows: In the formula: F represents the classification and regression tree space, f k As the base learner, f k (x i ) represents the k-th tree pair of sample x i The predicted score; the input to the XGBoost model is the total carbon loss CE at node i. This indicates the prediction result obtained by the XGBoost model based on the total carbon loss of node i, and the conclusion of whether node i is an abnormal carbon node. The objective function of the XGBoost model is defined as: In the formula, g i and h i For loss function First and second partial derivatives, y i For sample x i The corresponding true value, T represents the number of decision trees, γ and λ are hyperparameters, j is the decision tree count value, j∈[1,T]; I j It is sample x i The set of leaf nodes j that have been assigned to; Step S3: Analyze each node in the network topology based on the XGBoost model, and predict nodes with abnormal carbon emissions based on the power and carbon emission density of each node. Step S4: Perform power analysis on each user corresponding to the abnormal carbon content node. The power analysis includes abnormal power analysis of high voltage users and abnormal power analysis of low voltage users to determine the type of abnormal situation of the user.
2. The line loss analysis method based on carbon flow tracing as described in claim 1, characterized in that, The derivation process of the objective function of the XGBoost model in step S2 includes: The initial definition of the objective function for the XGBoost model is: In the formula: y i For sample x i The corresponding true value, Let Ω(f) represent the prediction bias of the i-th sample, I be the total number of samples; Ω(f) represent the model complexity; T represent the number of decision trees, ω represent the weights, and γ and λ are hyperparameters; let To predict the result of the i-th sample in the t-th iteration, the objective function of the t trees is: The objective function of t trees is further expressed by performing a second-order Taylor expansion: Where: g i and h i For loss function The first and second partial derivatives, and I is a constant term; j is the decision tree count value, j∈[1,T]; j It is sample x i The set of leaf nodes j to which ω is assigned, j The weights of the leaf nodes; Taking the derivative of the second-order Taylor expansion, the leaf node weight ω is obtained when the derivative is 0. j * : ω j * Substituting the original objective function Obj(θ) into the new objective function Obj is obtained. t :
3. The line loss analysis method based on carbon flow tracing as described in claim 1, characterized in that, Step S4, abnormal power consumption analysis of high-voltage users, includes: Judgment of abnormal pressure loss for three-phase high-voltage users: For three-phase four-wire high-voltage users, the undervoltage threshold is defined as U. H1 Analyze the absolute values of the current at historical points of voltage loss in each phase. When three conditions are met simultaneously, it is determined that the high-voltage user has experienced voltage loss and abnormal current. Condition C11: There is a daily abnormal moment in a day, the daily abnormal moment is the time of voltage loss, and at least one phase sequence satisfies that the absolute value of the current value is not lower than the high voltage current threshold. Condition C12: The number of daily anomalies in at least one phase sequence is not less than N1, where the number of daily anomalies is the number of daily anomaly times; Condition C13: The number of consecutive days with daily anomalies is not less than N2, where the number of consecutive days with daily anomalies refers to the number of consecutive days that satisfy condition C12. Judgment of current imbalance anomaly in three-phase four-wire high-voltage users: For three-phase four-wire high-voltage users, the daily average absolute values of the three-phase currents I1, I2, and I3 are all not 0A, and the daily average absolute value of one phase sequence current is less than the daily average absolute value of the other two phase sequence currents. The phase sequence current imbalance is defined as the value corresponding to the minimum average value. The correlation coefficient P of the other two phase sequence currents at specific times is calculated using the Pearson correlation coefficient formula. H When P∈[0.8,1], it is confirmed to meet the strong positive correlation. Analyze the daily sampled values of the two-phase currents that are strongly positively correlated. Sort the absolute values of the two-phase currents from high to low. The time points corresponding to the first three values of each phase are taken as the three maximum time points of each phase. When all four conditions are met, it is determined that the low-voltage user has an abnormal current imbalance: Condition C21: The first three values of each phase are all greater than the high voltage current threshold; Condition C22: The three maximum time points of each phase occur on three identical tangent planes; Condition C23: The absolute value of active power at any maximum time point of any phase is greater than the absolute value of reactive power; Condition C24: At any maximum time point of any phase, the ratio of the current at the maximum time point to the phase sequence current corresponding to the minimum average value is higher than the preset ratio P. H ; Judgment of current imbalance anomaly in three-phase three-wire high-voltage users: For three-phase three-wire high-voltage users, if the daily average absolute values of currents I1 and I3 are not 0A, the phase sequence with the smaller daily average absolute value is defined as having an unbalanced current sequence. The absolute values of currents with larger daily average absolute values are sorted from highest to lowest, and the three times corresponding to the first three values are taken as the three maximum times for their respective phase sequences. When all three conditions are met simultaneously, the three-phase three-wire high-voltage user is determined to have an abnormal current imbalance. Condition C31: The first three values are all greater than the high voltage current threshold; Condition C32: The current ratio of each cross section at any given time is always greater than the preset ratio P. L In the current ratio, the phase sequence current containing the current with the larger daily average absolute value is used as the denominator. Condition C33: The absolute value of active power at any point in time when the maximum value is reached is greater than the absolute value of reactive power.
4. The line loss analysis method based on carbon flow tracing as described in claim 3, characterized in that, The step S4, abnormal power consumption analysis for high-voltage users, also includes the determination of abnormal public-private transformer users: Anomaly detection for dedicated transformer users: The correlation r1 between the electricity consumption data of dedicated transformer users and the line loss data is calculated using the Pearson correlation coefficient formula; Calculate the DTW distance D1 between the dedicated transformer user electricity data and the line loss data; where, when both r1∈[0.8,1] and D1∈[0,D... t1 ), confirming abnormal metering for dedicated transformer users; Anomaly detection for public transformer users: The correlation r2 between the public transformer area line loss data and the line loss data is calculated using the Pearson correlation coefficient formula; the DTW distance D2 between the public transformer area line loss data and the line loss data is calculated; where, when both r2∈[-1,-0.8] and D2∈(D t2 (+∞), confirm that the metering of the public transformer user is abnormal.
5. The line loss analysis method based on carbon flow tracing as described in claim 4, characterized in that, The formula for calculating the correlation r in claim 4 is as follows: Among them, X i Y represents the electricity consumption data for dedicated transformer users or the line loss data for public transformer areas. i This represents the line loss data. For X i The mean, For Y i The mean of r ∈ [0.8,1] indicates that the two are strongly positively correlated; r ∈ [-1,-0.8] indicates that the two are strongly negatively correlated.
6. The line loss analysis method based on carbon flow tracing as described in claim 4, characterized in that, The DTW dynamic time bending distance calculation process in claim 4 is as follows: Given two time series X = {x1, x2, ..., x...} m } and Y = {y1, y2, ..., y n Construct the cumulative distance D(i,j), where X represents the time series set of dedicated transformer user electricity data or public transformer area line loss data, and Y represents the time series set of line loss data: D(i,j)=d(x i ,y j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)} In the formula: d(x) i ,y j )=(x i -y j ) 2 , 1≤i≤m, 1≤j≤n, initial condition is D(1,1)=d(x i ,y j ); The range reached by the curved path W in the distance matrix is called the curvature window, and the final distance metric is defined as: In the formula, K is the length of the curved path W; a threshold D is set. t1 D t2 D t1 <D t2 , D∈[0,D t1 ) indicates that the two are strongly positively correlated; D∈(D t2 (+∞) indicates that the two are strongly negatively correlated.
7. The line loss analysis method based on carbon flow tracing as described in claim 1, characterized in that, Step S4, low-voltage user abnormal power analysis, includes: Determination of voltage loss and abnormal current for three-phase four-wire low-voltage users: For three-phase four-wire low-voltage users, the voltage threshold below the lower limit is defined as U. L1 Analyze the current values at historical points of voltage loss. When three conditions are met simultaneously, it is determined that the low-voltage user has experienced voltage loss and abnormal current. Condition C41: There is a daily abnormal moment in a day, the daily abnormal moment is the time of voltage loss, and at least one phase sequence satisfies that the absolute value of the current value is not lower than the low voltage current threshold. Condition C42: The percentage of daily outlier points in at least one phase sequence to the total number of daily sampling points is not less than a preset percentage P1, where the number of daily outlier points is the number of daily outlier moments. Condition C43: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C42; Determination of single-phase voltage exceeding the lower limit for low-voltage users: For single-phase low-voltage users, the voltage threshold below the lower limit is defined as U. L2 When two conditions are met simultaneously, it is determined that the low-voltage user has a single-phase voltage below the lower limit anomaly: Condition C51: The percentage of daily outlier points to the total number of daily sampling points is not less than the preset percentage P1; Condition C52: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that satisfy condition C51; Determination of single-phase voltage exceeding the upper limit for low-voltage users: For single-phase low-voltage users, the voltage threshold above the upper limit is defined as U. L3 Analyze the current values at historical points of voltage loss. If two conditions are met simultaneously, it is determined that the low-voltage user has a single-phase voltage exceeding the upper limit anomaly. Condition C61: The percentage of daily abnormal points to the total number of daily sampling points is not less than the preset percentage P1; Condition C62: The number of consecutive days with daily abnormalities is not less than N3, where the number of consecutive days with daily abnormalities refers to the number of consecutive days that meet condition C61; Current imbalance anomaly determination for three-phase four-wire low-voltage users: For three-phase four-wire low-voltage users, if the daily average absolute values of the three-phase four-wire currents I1, I2, and I3 are all non-0A, and the daily average absolute value of one phase sequence current is less than the daily average absolute values of the other two phase sequence currents, the phase sequence current imbalance corresponding to the minimum average value is defined. The correlation coefficient P of the time point data of the other two phase sequence currents is calculated according to the Pearson correlation coefficient formula. When P∈[0.8,1], it is confirmed to be a strong positive correlation. The daily sampled values of the two mutually strongly correlated phase currents are analyzed. The absolute values of the two phase currents are sorted from high to low, and the time points corresponding to the first three values of each phase are taken as the three maximum time points of each phase. When all four conditions are met simultaneously, it is determined that the low-voltage user has an abnormal current imbalance: Condition C71: The first three values of each phase are all greater than the low-voltage current threshold. Condition C72: Among the three maximum value times of two phases, there exists a maximum value time point that occurs on the same tangent plane; Condition C73: The absolute value of active power at any maximum value time point of any phase is greater than the absolute value of reactive power; Condition C74: On the tangent plane at any maximum value time point of any phase, the ratio of the current at the maximum value time point to the phase sequence current corresponding to the minimum average value is higher than the preset ratio P. L .
8. A line loss analysis system based on carbon flow tracing, characterized in that, Used to perform the method according to any one of claims 1-7.