A standardized method and system for calculating line losses in power distribution networks.

By using a standardized method for calculating distribution network line losses, machine learning algorithms are used to fill in missing data, and the Newton-Raphson method is combined for power flow calculation. This solves the problem of missing dynamic data in power flow calculation, reduces costs, and improves the availability and accuracy of the calculation.

CN119046268BActive Publication Date: 2026-07-03STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST
Filing Date
2024-07-18
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Power flow calculation methods suffer from problems such as missing dynamic data, high data requirements, and high financial and human resource costs in power grid line loss calculation, resulting in complex calculations and high costs.

Method used

A standardized method for calculating distribution network line losses is adopted. This method involves acquiring source-end data, parsing data, standardizing static and dynamic data, and performing power flow calculations. Machine learning algorithms are used to fill in missing data, and an equivalent model of the distribution network and transmission network is constructed. Power flow calculations are then performed using the Newton-Raphson method.

Benefits of technology

It enables power flow calculations to be completed even with missing data, reducing capital and labor costs, improving the availability and accuracy of calculations, solving the problems of data pre-filling in different dimensions and data integrity in practical applications, and simplifying the line loss management process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046268B_ABST
    Figure CN119046268B_ABST
Patent Text Reader

Abstract

This invention provides a standardized method for calculating distribution network line losses, including source-end data acquisition; data parsing; identification of missing data in dynamic data; and missing data imputation: first, all features are traversed, starting with the feature with the fewest missing values. When imputing a feature, the missing values ​​of other features are pre-filled with 0. After each regression prediction, the predicted value is placed in the original feature matrix, and the process continues to imput the next feature. After each imputation, the number of features with missing values ​​decreases by one. When the last feature is reached, there are no other features that need to be imputed with 0, and a large amount of effective information has already been used to imput other features using regression, which can be used to imput the feature with the most missing values. After traversing all features, the data is complete. The method also includes topology parsing of static data; standardization of static and dynamic data; and power flow calculation. This invention proposes a technical framework that combines sequential pre-filling of data by dimension with actual imputation, enhancing data usability and providing sufficient data basis for conducting power flow calculations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid technology, and in particular to the field of distribution network line loss calculation. Background Technology

[0002] Power grid energy loss (referred to as line loss) is an important comprehensive technical and economic indicator for power companies, reflecting the planning and design, production technology, and operation management level of the power grid. Currently, there are three main methods for calculating line loss:

[0003] One method is the equivalent resistance method. Its principle is to regard the active power loss of current passing through the component as the active power loss generated by the equivalent resistance of the power grid line and the equivalent resistance of the transformer. The power loss of the entire network in a certain period of time is the product of the square of the root mean square current in that period of time and these equivalent resistances.

[0004] The second method is the forward-backward substitution method. Its principle is to use the current and voltage data of each branch in the power system to calculate the current and voltage step by step forward from the source of the power grid (such as a power plant) to each node, and then calculate the power loss of each branch back from the end node.

[0005] The third method is the power flow calculation method. Its principle is based on the current distribution data of the power grid. It calculates the power loss of each transmission line according to the relationship between the product of current and resistance. That is, it uses the square of the current and the product of the resistance to obtain the power loss. By accumulating the losses of all transmission lines, the total power loss of the entire power grid is finally obtained.

[0006] Among them, power flow algorithms, while maintaining high computational accuracy, are not only applicable to various complex power grid structures, including radial and ring networks, but also adaptable to the diversity of power grid operation modes, making them the mainstream line loss calculation method at present.

[0007] Although power flow algorithms are characterized by high computational accuracy and wide applicability, they also have certain limitations, as follows:

[0008] First, the data requirements are high. Power flow calculations not only require static data such as the topology information and detailed parameters of lines and transformers, but also dynamic data such as voltage, active power, and reactive power of each line and component. However, in practical applications, there are many missing dynamic data, which cannot support the implementation of power flow calculations.

[0009] Secondly, there is the issue of capital costs. Since power flow calculation is quite complex, existing methods for calculating line loss are based on professional power system analysis software, and power companies need to bear high software purchase costs.

[0010] Thirdly, there is the issue of human resource costs. Professional power system analysis software involves four parts: data collection, model building, calculation execution, and result analysis. Not only is professional software function training required before use, but also a significant amount of human resource costs are incurred during its use. Summary of the Invention

[0011] The technical problem to be solved by this invention is how to ensure the integrity of dynamic data during power flow calculation.

[0012] This invention solves the above-mentioned technical problems through the following technical means: a standardized method for calculating distribution network line loss, comprising the following steps:

[0013] Step S1: Source data acquisition, acquiring static and dynamic data of the distribution network based on the source system;

[0014] Step S2, data parsing, specifically includes the parsing of static data and the parsing of dynamic data:

[0015] S21. Identification of missing data in dynamic data;

[0016] S22, Missing Data Imputation: First, iterate through all features, starting with the one with the fewest missing values. When imputing a feature, pre-fill the missing values ​​of other features with 0. After each regression prediction, put the predicted value into the original feature matrix and continue imputing the next feature. After each imputation, the number of features with missing values ​​decreases by one. Therefore, after each loop, the number of features that need to be imputed with 0 decreases. When the last feature is reached, there are no other features that need to be imputed with 0, and a lot of effective information has been used to impute other features by regression. This information can be used to impute the feature with the most missing values. After iterating through all features, the data is complete and there are no more missing values.

[0017] S23. Topological analysis of static data;

[0018] Step S3: Static and dynamic data standardization. Based on the parsing results in step S2, the static topology data and dynamic distribution network operation data are constructed into a data format that the distribution network power flow calculation algorithm can recognize.

[0019] Step S4: Power flow calculation. Power system power flow calculation is performed based on the standardized data.

[0020] As a further optimized technical solution, step S21, the identification of missing data in dynamic data, specifically includes:

[0021] The isnull() function is called to retrieve the voltage, active power, and reactive power data of each load node on a typical day that requires power flow calculation. This function can return a True value for the location of all missing values, thus identifying missing data.

[0022] As a further optimized technical solution, in step S22, missing data filling, label pairs are constructed to fully utilize the correlation between multidimensional data, and machine learning algorithms are used for regression prediction to replace missing values ​​with the prediction results.

[0023] As a further optimized technical solution, missing data filling is performed by taking the voltage, active power, and reactive power of a single load node as an example. Specifically, S22, missing data filling, includes:

[0024] S221. Sort by the number of missing values: Based on the number of actual data returned in step S21, sort the three-dimensional data of voltage, active power, and reactive power by the number of missing values, as follows:

[0025] NU1 <NU2<NU3#(1)

[0026] In equation (1) above, NU i NU3 indicates the number of missing values ​​in each dimension, where NU3 indicates the dimension with the most missing values, NU1 indicates the dimension with the fewest missing values, and NU2 indicates the dimension with missing values ​​between NU1 and NU3.

[0027] S222. Pre-fill all missing values ​​in the data corresponding to NU1 and NU2 with 0. Assume that the data corresponding to NU1 is DA1, which is the data with the fewest missing values ​​in the three-dimensional data of voltage, active power and reactive power at 24 points, as follows:

[0028] DA1=[*,T,*,*,*,*,*,*T,T,T,*,T,*,*,*,*,T,T,T,*,T,*,*]#(2)

[0029] In the above formula (2), * represents the normal value, and T represents True, that is, there is missing data at this moment. After pre-filling, DA′1 represents as follows:

[0030] DA′1=[*,0,*,*,*,*,*,*0,0,0,*,0,*,*,*,*,0,0,0,*,0,*,*]#(3)

[0031] Similarly, DA′2 can be obtained by pre-filling the DA2 data;

[0032] S223. Using the data of DA′1 and DA′2 as features and the data of DA3 as labels, construct label pairs as follows:

[0033] (DA'1, DA'2) → DA3#(4)

[0034] S224. Using the random forest algorithm, regression prediction is performed according to equation (4). Since the missing data in DA′1 and DA′2 have been pre-filled, the missing values ​​in DA3 are predicted directly using the data from DA′1 and DA′2 and the normal data in DA3, thus filling in the missing values ​​in DA3. The filled DA3 is then used... express;

[0035] S225, DA′1, Using the data from DA2 as features and the data from DA2 as labels, label pairs are constructed as follows:

[0036]

[0037] S226. Using the random forest algorithm, regression prediction is performed according to equation (5), that is, missing values ​​in DA2 are filled in. The filled DA2 is then used... express;

[0038] S227, Similarly, based on Label pairs are constructed using DA1, and missing values ​​in DA1 are filled using the random forest algorithm. The filled DA1 is then used... express.

[0039] As a further optimized technical solution, in step S4, power flow calculation, before performing power flow calculation on the distribution network, it is necessary to construct an equivalent model of the main components of the distribution network and transmission network, as detailed below:

[0040] (1) Head-end outgoing line conversion: The power flow algorithm requires that the grid structure must include a balancing node. Therefore, the head-end outgoing line of the distribution network is equivalent to a combination structure consisting of a virtual bus and a balancing node. At the same time, impedance equivalence, current injection and power injection are carried out. The parameters of the converted components should be consistent with those of the components before conversion.

[0041] (2) Transformer conversion without loss: refers to a transformer that does not include calculated losses, which is equivalent to a combination structure consisting of a virtual bus and a load. The component parameters before and after the conversion should remain consistent.

[0042] (3) Loss calculation transformer conversion: refers to the common transformer, which is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides and load. The loss of each transformer can be calculated through this structure. The component parameters before and after the conversion should be consistent.

[0043] Run data transformation:

[0044] (1) After the first-end outgoing line is equivalent to a balanced node, the voltage operation data of the first-end outgoing line needs to be added to the balanced node;

[0045] (2) After the distribution transformer is equivalent to a combination of busbar and load without considering losses, the load needs to have the power factor data of the distribution transformer added, using PF. bj It is expressed as follows, calculated by the following formula:

[0046]

[0047] Among them, P is Q is Let represent the active power and reactive power of the i-th transformer without considering losses, respectively.

[0048] (3) After the loss-calculating distribution transformer is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides, and the load, the load needs to have the power factor data of the distribution transformer added, using PF. j It is expressed as follows, calculated by the following formula:

[0049]

[0050] Among them, P is '、Q is ' represents the active power and reactive power of the i-th loss-calculating transformer, respectively.

[0051] As a further optimized technical solution, in step S4, power flow calculation, the Newton-Raphson curve is used to perform power flow calculation, specifically including:

[0052] The basic equations for power flow calculation are as follows:

[0053]

[0054] Among them, P i The active power injected into the i-th node, Q i The reactive power injected into the i-th node, Y ij For the nodal admittance matrix elements, For the elements of the node voltage column vector,

[0055] For node PQ, the node power P is known. is Q is The corresponding equation is

[0056]

[0057] For a PV node, the node power P is known. is V is The corresponding equation is

[0058]

[0059] By combining equations (19) and (20), we can construct the general form of the power flow equations.

[0060]

[0061] If X exists * , such that Y(X) * If ) = 0, then X * It is the solution to equation (21);

[0062] In equation (21), a parameter t is introduced to construct a family of images: Z(X,t) such that when t=1, Z is Y, and when t=0, the solution to the equation Y0(X)=0 is X. 0 That is, it is defined as Z(X,0)=Y0(X), where the solution X of Y0(X)=0 is... 0 Given the initial values, the equation Z(X,1)=0 is equivalent to the original nonlinear equation (21), therefore, we only need to calculate the following equivalent equation:

[0063] Z(X,t)=0,t∈[0,1] (22)

[0064] The equivalent equation is not unique; we assume it to be:

[0065] Z(X,t)=Y(X)-(1-t)Y(X) 0 ) (twenty three)

[0066] If Y'(X) is continuous and non-singular, and equation (23) has a unique solution x = x(t) satisfying X(0) = X 0 And X * =X(1) is the solution to equation (21). Therefore, finding the solution to equation (23) is equivalent to finding the initial value problem of the following Davidenko differential equation:

[0067]

[0068] Where M(X)=Y'(X) is M(θ,V) in equation (21), and the curve formed by the solutions X=X(t) in equation (24) is called the homotopy curve. The homotopy curve in equation (21) is calculated by the midpoint integral formula, and its calculation formula is:

[0069]

[0070] In the formula, N represents the number of segments of t, from which the step size h = 1 / N is obtained. Since the homotopy curve X = X(t) is close to a straight line, any numerical integration method of order 2 can be used to solve it.

[0071] If the initial value calculated by equation (25) does not meet the convergence requirements of Newton-Raphson, the number of segments N is increased until the convergence requirements of Newton-Raphson are met. Variable step size is used to shorten the calculation time. Variable step size means that the system will adjust the size of the time step as needed, while also improving the overall accuracy of the homotopy curve. If a certain segment value is taken, it is calculated using equation (25), and then expanded using the Newton-Raphson calculation equation (26). If the obtained ||x N+1 -x N ||Small enough, or satisfying||x k+1 -x k ||<|x k -x k-1 ||Just think X N It is a sufficiently good initial value for the Newton-Raphson iteration; otherwise, X is set to... N Treating this as an initial value, the new X is calculated by repeatedly calculating formula (25). N ,

[0072] X k+1 =x k -[M(x k )] -1 Y(X) k ,K=N,N+1,... (26)

[0073] When performing equation (24) to find the homotopy curve, the initial value is given, and x is taken as x. 0 =[0,1] T In some cases, it appears as M(X) 0 ) Strange and M(X * The non-singularity of M(X) prevents the calculation process from proceeding, or causes an error in the calculation of the homotopy curve. k Strange, actually when X 0 With X * On the surface det(Z) X If X is connected to both sides of ) = 0, 0 With X * The homotopy curve C exists, Z X There must be a singularity on C, especially when a power system line is under heavy load or near the stability boundary. The homotopy curve will have a singularity. To prevent this, a homotopy equation with parameters is used:

[0074] Z[x,t,α,x 0 ]=Y(x)-(1-t 3 )α(xx 0 (27)

[0075] Where α is a parameter matrix, the value of which changes automatically depending on whether M(X) is singular or not, for any x 0∈R, taking α, the homotopy equation constructed, i.e., equation (27), satisfies the condition Z(x) 0 Z(x,1) = Y(X), therefore the solution when Z(x,1) = 0 is the solution of the original equation (21);

[0076] The method for solving equation (27) is unified as solving the initial value problem of the Davidenko differential equation as follows, i.e., written as:

[0077]

[0078] The calculation method is the same as in equation (25).

[0079] This invention also provides a standardized distribution network line loss calculation system, comprising the following modules:

[0080] The source data acquisition module is used to acquire static and dynamic data of the distribution network based on the source system.

[0081] The data parsing module is used to parse both static and dynamic data, including:

[0082] The missing data identification unit for dynamic data is used to identify missing dynamic data.

[0083] The missing data imputation unit performs the following steps: First, it iterates through all features, starting with the feature with the fewest missing values. When imputing a feature, the missing values ​​of other features are pre-filled with 0. After each regression prediction is completed, the predicted value is placed into the original feature matrix, and the next feature is imputed. After each imputation, the number of features with missing values ​​decreases by one. Therefore, after each loop, the number of features that need to be imputed with 0 decreases. When the last feature is reached, there are no other features that need to be imputed with 0, and a large amount of effective information has been used to imput other features by regression. This information can be used to imput the feature with the most missing values. After iterating through all features, the data is complete and there are no more missing values.

[0084] The topology parsing unit for static data is used to perform topology parsing of static data.

[0085] The static and dynamic data standardization module, based on the parsing results of the data parsing module, constructs static topology data and dynamic distribution network operation data into a data format that the distribution network power flow calculation algorithm can recognize;

[0086] The power flow calculation module is used to perform power system power flow calculations based on standardized data.

[0087] As a further optimized technical solution, the missing data identification unit for dynamic data specifically performs the following steps:

[0088] The isnull() function is called to retrieve the voltage, active power, and reactive power data of each load node on a typical day that requires power flow calculation. This function can return a True value for the location of all missing values, thus identifying missing data.

[0089] As a further optimized technical solution, the missing data filling unit constructs label pairs, fully utilizes the correlation between multidimensional data, adopts machine learning algorithms for regression prediction, and replaces the missing values ​​with the prediction results.

[0090] As a further optimized technical solution, the missing data filling is performed by taking the voltage, active power, and reactive power of a single load node as an example. The missing data filling unit specifically performs the following steps:

[0091] S221. Sort by the number of missing values: Based on the number of actual data returned in step S21, sort the three-dimensional data of voltage, active power, and reactive power by the number of missing values, as follows:

[0092] NU1 <NU2<NU3#(1)

[0093] In equation (1) above, NU i NU3 indicates the number of missing values ​​in each dimension, where NU3 indicates the dimension with the most missing values, NU1 indicates the dimension with the fewest missing values, and NU2 indicates the dimension with missing values ​​between NU1 and NU3.

[0094] S222. Pre-fill all missing values ​​in the data corresponding to NU1 and NU2 with 0. Assume that the data corresponding to NU1 is DA1, which is the data with the fewest missing values ​​in the three-dimensional data of voltage, active power and reactive power at 24 points, as follows:

[0095] DA1=[*,T,*,*,*,*,*,*T,T,T,*,T,*,*,*,*,T,T,T,*,T,*,*]#(2)

[0096] In the above formula (2), * represents the normal value, and T represents True, that is, there is missing data at this moment. After pre-filling, DA′1 represents as follows:

[0097] DA′1=[*,0,*,*,*,*,*,*0,0,0,*,0,*,*,*,*,0,0,0,*,0,*,*]#(3)

[0098] Similarly, DA′2 can be obtained by pre-filling the DA2 data;

[0099] S223. Using the data of DA′1 and DA′2 as features and the data of DA3 as labels, construct label pairs as follows:

[0100] (DA'1, DA'2) → DA3#(4)

[0101] S224. Using the random forest algorithm, regression prediction is performed according to equation (4). Since the missing data in DA′1 and DA′2 have been pre-filled, the missing values ​​in DA3 are predicted directly using the data from DA′1 and DA′2 and the normal data in DA3, thus filling in the missing values ​​in DA3. The filled DA3 is then used... express;

[0102] S225, DA′1, Using the data from DA2 as features and the data from DA2 as labels, label pairs are constructed as follows:

[0103]

[0104] S226. Using the random forest algorithm, regression prediction is performed according to equation (5), that is, missing values ​​in DA2 are filled in. The filled DA2 is then used... express;

[0105] S227, Similarly, based on Label pairs are constructed using DA1, and missing values ​​in DA1 are filled using the random forest algorithm. The filled DA1 is then used... express.

[0106] As a further optimized technical solution, in step S4, power flow calculation, before performing power flow calculation on the distribution network, it is necessary to construct an equivalent model of the main components of the distribution network and transmission network, as detailed below:

[0107] (1) Head-end outgoing line conversion: The power flow algorithm requires that the grid structure must include a balancing node. Therefore, the head-end outgoing line of the distribution network is equivalent to a combination structure consisting of a virtual bus and a balancing node. At the same time, impedance equivalence, current injection and power injection are carried out. The parameters of the converted components should be consistent with those of the components before conversion.

[0108] (2) Transformer conversion without loss: refers to a transformer that does not include calculated losses, which is equivalent to a combination structure consisting of a virtual bus and a load. The component parameters before and after the conversion should remain consistent.

[0109] (3) Loss calculation transformer conversion: refers to the common transformer, which is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides and load. The loss of each transformer can be calculated through this structure. The component parameters before and after the conversion should be consistent.

[0110] Run data transformation:

[0111] (1) After the first-end outgoing line is equivalent to a balanced node, the voltage operation data of the first-end outgoing line needs to be added to the balanced node;

[0112] (2) After the distribution transformer is equivalent to a combination of busbar and load without considering losses, the load needs to have the power factor data of the distribution transformer added, using PF. bj It is expressed as follows, calculated by the following formula:

[0113]

[0114] Among them, P is Q is Let represent the active power and reactive power of the i-th transformer without considering losses, respectively.

[0115] (3) After the loss-calculating distribution transformer is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides, and the load, the load needs to have the power factor data of the distribution transformer added, using PF. j It is expressed as follows, calculated by the following formula:

[0116]

[0117] Among them, P is '、Q is ' represents the active power and reactive power of the i-th loss-calculating transformer, respectively.

[0118] As a further optimized technical solution, the power flow calculation module utilizes the Newton-Raphson method for power flow calculation, specifically including:

[0119] The basic equations for power flow calculation are as follows:

[0120]

[0121] Among them, P i The active power injected into the i-th node, Q i The reactive power injected into the i-th node, Y ij For the nodal admittance matrix elements, For the elements of the node voltage column vector,

[0122] For node PQ, the node power P is known. is Q is The corresponding equation is

[0123]

[0124] For a PV node, the node power P is known. is V is The corresponding equation is

[0125]

[0126] By combining equations (19) and (20), we can construct the general form of the power flow equations.

[0127]

[0128] If X exists * , such that Y(X) * If ) = 0, then X * It is the solution to equation (21);

[0129] In equation (21), a parameter t is introduced to construct a family of images: Z(X,t) such that when t=1, Z is Y, and when t=0, the solution to the equation Y0(X)=0 is X. 0 That is, it is defined as Z(X,0)=Y0(X), where the solution X of Y0(X)=0 is... 0 Given the initial values, the equation Z(X,1)=0 is equivalent to the original nonlinear equation (21), therefore, we only need to calculate the following equivalent equation:

[0130] Z(X,t)=0,t∈[0,1] (22)

[0131] The equivalent equation is not unique; we assume it to be:

[0132] Z(X,t)=Y(X)-(1-t)Y(X) 0 ) (twenty three)

[0133] If Y'(X) is continuous and non-singular, and equation (23) has a unique solution x = x(t) satisfying X(0) = X 0 And X * =X(1) is the solution to equation (21). Therefore, finding the solution to equation (23) is equivalent to finding the initial value problem of the following Davidenko differential equation:

[0134]

[0135] Where M(X)=Y'(X) is M(θ,V) in equation (21), and the curve formed by the solutions X=X(t) in equation (24) is called the homotopy curve. The homotopy curve in equation (21) is calculated by the midpoint integral formula, and its calculation formula is:

[0136]

[0137] In the formula, N represents the number of segments of t, from which the step size h = 1 / N is obtained. Since the homotopy curve X = X(t) is close to a straight line, any numerical integration method of order 2 can be used to solve it.

[0138] If the initial value calculated by equation (25) does not meet the convergence requirements of Newton-Raphson, the number of segments N is increased until the convergence requirements of Newton-Raphson are met. Variable step size is used to shorten the calculation time. Variable step size means that the system will adjust the size of the time step as needed, while also improving the overall accuracy of the homotopy curve. If a certain segment value is taken, it is calculated using equation (25), and then expanded using the Newton-Raphson calculation equation (26). If the obtained ||x N+1 -x N ||Small enough, or satisfying||x k+1 -x k ||<|x k -x k-1 ||Just think X N It is a sufficiently good initial value for the Newton-Raphson iteration; otherwise, X is set to... N Treating this as an initial value, the new X is calculated by repeatedly calculating formula (25). N ,

[0139] X k+1 =x k -[M(x k )] -1 Y(X) k ,K=N,N+1,... (26)

[0140] When performing equation (24) to find the homotopy curve, the initial value is given, and x is taken as x. 0 =[0,1] T In some cases, it appears as M(X) 0 ) Strange and M(X * The non-singularity of M(X) prevents the calculation process from proceeding, or causes an error in the calculation of the homotopy curve. k Strange, actually when X 0 With X * On the surface det(Z) X If X is connected to both sides of ) = 0, 0 With X * The homotopy curve C exists, Z X There must be a singularity on C, especially when a power system line is under heavy load or near the stability boundary. The homotopy curve will have a singularity. To prevent this, a homotopy equation with parameters is used:

[0141] Z[x,t,α,x 0 ]=Y(x)-(1-t 3 )α(xx 0 (27)

[0142] Where α is a parameter matrix, the value of which changes automatically depending on whether M(X) is singular or not, for any x 0∈R, taking α, the homotopy equation constructed, i.e., equation (27), satisfies the condition Z(x) 0 Z(x,1) = Y(X), therefore the solution when Z(x,1) = 0 is the solution of the original equation (21);

[0143] The method for solving equation (27) is unified as solving the initial value problem of the Davidenko differential equation as follows, i.e., written as:

[0144]

[0145] The calculation method is the same as in equation (25).

[0146] The advantages of this invention are:

[0147] 1. To address the issue of missing dynamic data during actual power flow calculations, this invention proposes a technical framework that combines sequential pre-filling of data across different dimensions with actual filling, enhancing data usability and providing sufficient data support for power flow calculations. In this invention, all features are first traversed, starting with those with the fewest missing values ​​(because filling the feature with the fewest missing values ​​requires the least amount of accurate information). When filling a feature, the missing values ​​of other features are replaced with 0. After each regression prediction, the predicted value is placed into the original feature matrix before continuing to fill the next feature. Each time filling is completed, the number of features with missing values ​​decreases, so after each loop, the number of features needing to be filled with 0 decreases. When the last feature is reached (which should have the most missing values ​​among all features), there are no other features that need to be filled with 0, and a large amount of effective information has already been filled in for other features using regression. This information can then be used to fill the feature with the most missing values. After traversing all features, the data is complete, with no more missing values.

[0148] 2. Building on the advantages mentioned above, by constructing label pairs, we can fully utilize the correlation between multidimensional data, use machine learning algorithms for regression prediction, and replace missing values ​​with the prediction results, making the filling effect closer to the real situation.

[0149] 3. Standardize static and dynamic data, and perform power flow calculations and distribution network line losses based on the standardized data. Existing technical solutions are not standardized processes; they utilize power analysis software and require a process of plotting, filling in data, and performing simulation calculations. The technical solution of this invention provides a standardized method for calculating distribution network line losses. It eliminates the need to purchase specialized power system analysis software. Using this method, calculations can be performed directly with the available data, exhibiting strong portability and effectively alleviating the problem of huge capital and manpower costs in line loss management. Furthermore, this method is simple to use, reducing the workload of frontline staff and lowering the difficulty of line loss management.

[0150] 4. Since the R / X ratio of distribution network components is relatively large, directly using the Newton-Raphson method to perform power flow calculations may lead to non-convergence problems. Therefore, this invention proposes an improved power flow algorithm to solve the nonlinear equation system, which can effectively solve the problem of difficult convergence in power flow calculations of distribution networks. Attached Figure Description

[0151] Figure 1 This is a flowchart of a standardized method for calculating line losses in a power distribution network according to the present invention.

[0152] Figure 2 It is a simple topology diagram of the distribution network equipment. Detailed Implementation

[0153] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0154] Example 1

[0155] This invention constructs a standardized method for calculating distribution network line losses, the overall flowchart of which is as follows: Figure 1 As shown, the process includes data acquisition, data parsing, data standardization, power flow calculation, and result output. The specific steps are as follows:

[0156] Step S1: Source Data Acquisition

[0157] The system acquires static data such as distribution network equipment information, equipment parameter information, and topology wiring information, as well as dynamic data such as voltage, active power, and reactive power of each load node.

[0158] Step S2, data parsing, specifically includes the parsing of static data and the parsing of dynamic data:

[0159] S21. Identification of missing data in dynamic data

[0160] For typical days requiring power flow calculations, the `isnull()` function is called to retrieve the voltage, active power, and reactive power data for each load node. This function returns a `True` value for the location of all missing values, thus identifying missing data. It's important to note that this step only applies to dynamic data; static data typically does not have missing values ​​and therefore does not require this step.

[0161] S22, Filling in missing data

[0162] For ease of explanation, we will use the voltage, active power, and reactive power of a single load node as an example to fill in the missing data:

[0163] S221. Sort by the number of missing values: Based on the number of True values ​​returned in step S21, sort the three-dimensional data of voltage, active power, and reactive power by the number of missing values, as follows:

[0164] NU1 <NU2<NU3#(1)

[0165] In equation (1) above, NU i NU3 indicates the number of missing values ​​in each dimension, where NU3 indicates the dimension with the most missing values, NU1 indicates the dimension with the fewest missing values, and NU2 indicates the dimension with missing values ​​between NU1 and NU3.

[0166] S222. Pre-fill all missing values ​​in the data corresponding to NU1 and NU2 with 0. Assume that the data corresponding to NU1 is DA1, which is the data with the fewest missing values ​​in the three-dimensional data of voltage, active power and reactive power at 24 points, as follows:

[0167] DA1=[*,T,*,*,*,*,*,*T,T,T,*,T,*,*,*,*,T,T,T,*,T,*,*]#(2)

[0168] In the above formula (2), * represents the normal value, and T represents True, that is, there is missing data at this moment. After pre-filling, DA′1 represents as follows:

[0169] DA′1=[*,0,*,*,*,*,*,*0,0,0,*,0,*,*,*,*,0,0,0,*,0,*,*]#(3)

[0170] Similarly, DA′2 can be obtained by pre-filling the DA2 data, which will not be elaborated here.

[0171] S223. Using the data of DA′1 and DA′2 as features and the data of DA3 as labels, construct label pairs as follows:

[0172] (DA'1, DA'2) → DA3#(4)

[0173] S224. Using the random forest algorithm, regression prediction is performed according to equation (4). Since the missing data in DA′1 and DA′2 have been pre-filled, the missing values ​​in DA3 are predicted directly using the data from DA′1 and DA′2 and the normal data in DA3, thus filling in the missing values ​​in DA3. The filled DA3 is then used... express.

[0174] S225, DA′1, Using the data from DA2 as features and the data from DA2 as labels, label pairs are constructed as follows:

[0175]

[0176] S226. Using the random forest algorithm, regression prediction is performed according to equation (5), that is, missing values ​​in DA2 are filled in. The filled DA2 is then used... express.

[0177] S227, Similarly, based on By constructing label pairs in DA1 and using the random forest algorithm, missing values ​​in DA1 can be filled in. The filled DA1 is then used... express.

[0178] It should be noted that all operations in steps S21 and S22 are only for dynamic data. Since static data usually does not have missing data, there is no need to perform these operations.

[0179] S23, Topological Analysis of Static Data

[0180] S231, Static topology analysis of the target distribution network

[0181] Based on the distribution network equipment topology data, the connection relationships between the main equipment in the distribution network, namely, the conductors, switches, and distribution transformers, are analyzed. Figure 2 This is a simple distribution network topology diagram. The distribution network devices are connected from left to right as follows: XX busbar—XX conductor—XX switch—XX conductor—XX transformer.

[0182] S232. Non-graphical representation of distribution network topology

[0183] Based on the topology resolution results of the distribution network equipment, endpoint data is assigned to the distribution network equipment to represent the connection relationships between the equipment. Figure 2 For example, assign one-dimensional endpoint data 2 to transformer XX, two-dimensional endpoint data (2, 3) to conductor XX, and two-dimensional endpoint data (3, 4) to switch XX. The same endpoint data indicates a connection between the distribution network devices. Therefore, it can be deduced that the connection relationship between the three distribution network devices is transformer XX—conductor XX—switch XX. Figure 2 Maintain consistency.

[0184] Step S3: Static and Dynamic Data Standardization

[0185] Based on the analysis results in step S2, the static topology data and dynamic distribution network operation data are constructed into a data format that the distribution network power flow calculation algorithm can recognize. The standardized data formats for distribution transformers, switches, and conductors are as follows.

[0186] (1) Distribution transformer

[0187]

[0188] (2) Switch

[0189] Serial Number Switch Name switch model Switch status Connection point 1 Connection point 2

[0190] (3) Conductor

[0191]

[0192] Step S4, Power Flow Calculation

[0193] Power flow calculations are performed based on standardized data. Power flow calculation is a type of calculation used to study the steady-state operation of a power system. It determines the operating state of each part of the entire power system based on given operating conditions, system topology, and component parameters: the voltage of each bus, the power flowing through each component, and the system's power losses, etc. Power flow calculations are needed in power system planning and design, and in studies of existing power system operation modes, to quantitatively analyze and compare the rationality, reliability, and economy of power supply schemes or operating modes.

[0194] However, power flow algorithms cannot be directly applied to distribution networks. Before performing power flow calculations on distribution networks, it is necessary to construct an equivalent model of the main components of the distribution network and transmission network, as follows:

[0195] (1) Head-end outgoing line conversion: The power flow algorithm requires that the grid structure must include a balancing node. Therefore, the head-end outgoing line of the distribution network is equivalent to a combination structure consisting of a virtual bus and a balancing node. At the same time, impedance equivalence, current injection and power injection should be carried out. The parameters of the converted components should be consistent with those of the components before the conversion.

[0196] (2) Transformer conversion without loss: This usually refers to transformers that do not include calculated losses. In the distribution network, the loss of such equipment is not considered. Therefore, it is equivalent to a combination structure composed of virtual bus and load. Similar to step (1) above, the component parameters before and after the conversion should be consistent.

[0197] (3) Loss-calculating transformer conversion: usually refers to the common transformer. In contrast to step (2), this type of equipment considers the losses of the transformer in the distribution network through calculation. Therefore, it is equivalent to a combination structure consisting of two winding transformers, virtual cross-connections on both sides and load. The loss of each transformer can be calculated through this structure. Similarly, the component parameters before and after the conversion should remain consistent.

[0198] Run data transformation:

[0199] (1) After the first-end outgoing line is equivalent to a balanced node, the voltage operation data of the first-end outgoing line needs to be added to the balanced node.

[0200] (2) After the distribution transformer is equivalent to a combination of busbar and load without considering losses, the load needs to have the power factor data of the distribution transformer added, using PF. bj It is indicated that it is calculated by the following formula.

[0201]

[0202] Among them, P is Q is Let represent the active power and reactive power of the i-th transformer without considering losses, respectively.

[0203] (3) After the loss-calculating distribution transformer is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides, and the load, the load needs to have the power factor data of the distribution transformer added, using PF. j It is indicated that it is calculated by the following formula.

[0204]

[0205] Among them, P is '、Q is ' represents the active power and reactive power of the i-th loss-calculating transformer, respectively.

[0206] After constructing the equivalent model of the distribution network and transmission network, the power flow calculation of the distribution network can be carried out directly. First, assume that the equivalent number of nodes in the distribution network is n, of which the number of PV nodes is n1 and the number of PQ nodes is n2. Define the following node set:

[0207]

[0208] The mathematical model of the distribution network adopts the following node voltage equations.

[0209] I = YV (9)

[0210] Their expansions are respectively

[0211]

[0212] In the formula, Y, Y ij , which are the nodal admittance matrices and their corresponding elements; I, These are the column vectors of net injected current at the nodes and their corresponding elements; V, These are the node voltage column vectors and their corresponding elements; n is the number of nodes in the power system. It should be noted that there are no nodes available for power flow calculation in the distribution network; the slack node here is the equivalent node of the head bus, and the other nodes are equivalent nodes of distributed generation sources.

[0213] In practical power systems, the known node injection quantity is often not the node current but the node power. Therefore, the node current can be expressed as the node power.

[0214]

[0215] Among them, P i The active power injected into the i-th node, Q i The reactive power injected into the i-th node is obtained by substituting the above equation into equation (7).

[0216]

[0217] This is the most basic equation for power flow calculation, a system of nonlinear algebraic equations with node voltage V as the variable. Separating the real and imaginary parts of this complex equation yields two real equations. Depending on the coordinate system used for the node voltages, the resulting power flow equations can take two forms: rectangular coordinates and polar coordinates.

[0218] (1) Power flow equations in rectangular coordinate form

[0219] If the voltage phasors of each node are represented in rectangular coordinate form

[0220]

[0221] Then equation (7) is obtained by separating the real and imaginary parts.

[0222]

[0223] “jεi” represents node j associated with node i.

[0224] For node PQ, the active and reactive power of the distribution transformer node, neglecting losses, are P... is Q is The active and reactive power of the distribution transformer node are P, respectively. is '、Q is ', then the corresponding equation is

[0225]

[0226] Equation (15) represents the nodal equation of the PQ distribution transformer without considering losses. When P in the equation is Q is Replace each with P is '、Qis ' can represent the PQ node equation for the loss-measuring distribution transformer.

[0227] For a PV node, the active power and voltage at the distribution transformer node, neglecting losses, are P... is V is The active power and voltage at the distribution transformer node are respectively P. is '、V is ',,then the corresponding equation is

[0228]

[0229] Equation (16) represents the PV node equation for the distribution transformer without considering losses. When P in the equation is V is Replace each with P is '、V is ' can be used to represent the PV node equation for loss-calculating distribution transformers.

[0230] For an n-node system, there are a total of 2(n-1) equations.

[0231] (2) Power flow equations in polar coordinate form

[0232] If the voltage phasors of each node are represented in polar coordinates

[0233]

[0234] Then (7) is obtained after separating the real and imaginary parts.

[0235]

[0236] For node PQ, the node power P is known. is Q is The corresponding equation is

[0237]

[0238] For a PV node, the node power P is known. is V is The corresponding equation is

[0239]

[0240] The problem of power flow calculation is to solve a system of nonlinear equations (14) to (15) (rectangular coordinates) or (18) to (19) (polar coordinates). There are many solution methods.

[0241] Considering the large R / X ratio of distribution network components, directly using the Newton-Raphson algorithm for power flow calculation may lead to non-convergence. Therefore, this proposal suggests an improved power flow algorithm to solve the nonlinear equation set, which can achieve fast convergence of the power flow algorithm. The following is a detailed process of solving equations (19) to (20):

[0242] By combining equations (19) and (20), we can construct the general form of the power flow equations.

[0243]

[0244] If X exists * , such that Y(X) * If ) = 0, then X * It is the solution to equation (21).

[0245] In equation (21), a parameter t is introduced to construct a family of images: Z(X,t) such that when t=1, Z is Y, and when t=0, the solution to the equation Y0(X)=0 is X. 0 That is, it is defined as Z(X,0)=Y0(X), where the solution X of Y0(X)=0 is... 0 Given the initial values, the equation Z(X,1)=0 is equivalent to the original nonlinear equation (21), therefore, we only need to calculate the following equivalent equation:

[0246] Z(X,t)=0,t∈[0,1] (22)

[0247] The equivalent equation is not unique, but it can be assumed to be:

[0248] Z(X,t)=Y(X)-(1-t)Y(X) 0 ) (twenty three)

[0249] If Y'(X) is continuous and non-singular, and equation (23) has a unique solution x = x(t) satisfying X(0) = X 0 And X * =X(1) is the solution to equation (21). Therefore, finding the solution to equation (23) is equivalent to finding the initial value problem of the following Davidenko differential equation.

[0250]

[0251] Where M(X)=Y'(X) is M(θ,V) in equation (21), and the curve formed by the solutions X=X(t) in equation (24) is called the homotopy curve. The homotopy curve in equation (21) can be calculated by the midpoint integral method, which can ensure the calculation accuracy and has a relatively small amount of calculation. Its calculation formula is:

[0252]

[0253] In the formula, N represents the number of segments of t, from which we can derive the step size h = 1 / N.

[0254] Since the homotopy curve X = X(t) is close to a straight line, it can be solved using any numerical integration method of order 2, such as the Runge-Kutta method.

[0255] After solving X(1), it is generally impossible to obtain an exact X. * However, if it enters the convergence region of Newton-Raphson, it can be accurately obtained using Newton-Raphson. If the initial value calculated by equation (25) does not meet the convergence requirements of Newton-Raphson, the number of segments N can be increased until the convergence requirements of Newton-Raphson are met. Therefore, the selection of the number of segments in the calculation is particularly important. Theoretically, the value of N that meets the convergence requirements can be proven, but the calculation process is time-consuming. To solve this problem, a variable step size is needed to shorten the calculation time. The variable step size means that the system will adjust the size of the time step as needed, and at the same time improve the accuracy of the homotopy curve as a whole. If a certain segment value is taken, it can be calculated using equation (25), and then the calculation can be expanded using Newton-Raphson calculation equation (26). If the obtained ||x N+1 -x N ||Small enough, or satisfying||x k+1 -x k ||<|x k -x k-1 || can be considered X N It is a sufficiently good initial value for the Newton-Raphson iteration; otherwise, X is set to... N Treating this as an initial value, the new X is calculated by repeatedly calculating formula (25). N .

[0256] X k+1 =x k -[M(x k )] -1 Y(X) k ,K=N,N+1,... (26)

[0257] When performing equation (24) to find the homotopy curve, the initial value is given, generally x. 0 =[0,1] T In some cases, it may appear as M(X) 0 ) Strange and M(X * The non-singularity of M(X) prevents the calculation from proceeding. Alternatively, it may cause an error during the calculation of the homotopy curve. k Strange, actually when X 0 With X * On the surface det(Z) X If X is connected to both sides of 0, then... 0 With X* The homotopy curve C exists, Z X There must be singularities on C, especially when a power system line is under heavy load or near the stability boundary. Hotopy curves may have singularities. To prevent this, a homotopy equation with parameters is used.

[0258] Z[x,t,α,x 0 ]=Y(x)-(1-t 3 )α(xx 0 (27)

[0259] Here, α is a parameter matrix, whose values ​​can be automatically changed depending on whether M(X) is singular or not. For any x 0 ∈R, taking α, the homotopy equation constructed, i.e., equation (27), satisfies the condition Z(x) 0 Z(x,1) = 0, Z(x,1) = Y(X). Therefore, the solution when Z(x,1) = 0 is the solution to the original equation (21).

[0260] The method for solving equation (27) is unified as solving the initial value problem of the Davidenko differential equation as follows, i.e., written as:

[0261]

[0262] The calculation method is the same as in equation (25).

[0263] Step S5, Result Output

[0264] Output the line loss calculation results for the target distribution network.

[0265] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A standardized method for calculating distribution network line loss, characterized in that: Includes the following steps: Step S1: Source data acquisition, acquiring static and dynamic data of the distribution network based on the source system; Step S2, data parsing, specifically includes the parsing of static data and the parsing of dynamic data: S21. Identification of missing data in dynamic data; S22, Missing Data Imputation: First, iterate through all features, starting with the one with the fewest missing values. When imputing a feature, pre-fill the missing values ​​of other features with 0. After each regression prediction, put the predicted value into the original feature matrix and continue imputing the next feature. After each imputation, the number of features with missing values ​​decreases by one. Therefore, after each loop, the number of features that need to be imputed with 0 decreases. When the last feature is reached, there are no other features that need to be imputed with 0, and a lot of effective information has been used to impute other features by regression. This information can be used to impute the feature with the most missing values. After iterating through all features, the data is complete and there are no more missing values. S23. Topological analysis of static data; Step S3: Static and dynamic data standardization. Based on the parsing results in step S2, the static topology data and dynamic distribution network operation data are constructed into a data format that the distribution network power flow calculation algorithm can recognize. Step S4: Power flow calculation, performing power system power flow calculation based on standardized data; In step S22, missing data filling, label pairs are constructed to fully utilize the correlation between multidimensional data. Machine learning algorithms are used for regression prediction, and the predicted results are used to replace missing values. Taking the voltage, active power, and reactive power of a single load node as an example, missing data filling is performed. Step S22, missing data filling, specifically includes: S221. Sort by the number of missing values: Based on the number of actual data returned in step S21, sort the three-dimensional data of voltage, active power, and reactive power by the number of missing values, as follows: (1) In the above formula (1), This indicates the number of missing values ​​in each dimension of the data, where This indicates that the one-dimensional data has the most missing values. This indicates that the number of missing values ​​in this one-dimensional data set is the smallest. This indicates that the one-dimensional data is missing values. and between; S222, will All missing values ​​in the corresponding data are pre-filled with 0, assuming The corresponding data is DA1, which is the data with the fewest missing values ​​in the three-dimensional data of voltage, active power, and reactive power at 24 points, as detailed below: (2) In the above formula (2), The value represents a normal value, and T represents True, meaning that there is missing data at this moment, and pre-filling is performed. It is expressed as follows: (3) Similarly, it can be done Data pre-filled ; S223, will , The number as a characteristic, The data is used as labels to construct label pairs, as follows: (4) S224. Using the random forest algorithm, regression prediction is performed according to equation (4). , The missing data has been pre-filled and can be used directly. , Data and Normal data processing Predicting missing values ​​in the middle, achieving Filling in missing values, after filling use express; S225, will , Data as features The data is used as labels to construct label pairs, as follows: (5) S226. Using the random forest algorithm, regression prediction is performed according to equation (5), that is, to achieve... Filling in missing values, after filling use express; S227, Similarly, based on , Label pairs are constructed using DA1, and missing values ​​in DA1 are filled using the random forest algorithm. The filled DA1 is then used... express.

2. The standardized method for calculating distribution network line loss as described in claim 1, characterized in that: Step S21, the identification of missing data in dynamic data, specifically includes: The isnull() function is called to retrieve the voltage, active power, and reactive power data of each load node on a typical day that requires power flow calculation. This function can return a True value for the location of all missing values, thus identifying missing data.

3. The standardized method for calculating distribution network line loss as described in claim 1, characterized in that: In step S4, power flow calculation, before performing power flow calculation on the distribution network, it is necessary to construct an equivalent model of the main components of the distribution network and transmission network, as follows: (1) Head-end outgoing line conversion: The power flow algorithm requires that the grid structure must include a balancing node. Therefore, the head-end outgoing line of the distribution network is equivalent to a combination structure consisting of a virtual bus and a balancing node. At the same time, impedance equivalence, current injection and power injection are carried out. The parameters of the converted components should be consistent with those of the components before conversion. (2) Transformer conversion without loss: refers to a transformer that does not include calculated losses, which is equivalent to a combination structure consisting of a virtual bus and a load. The component parameters before and after the conversion should remain consistent. (3) Loss calculation transformer conversion: refers to the common transformer, which is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides and load. The loss of each transformer can be calculated through this structure. The component parameters before and after the conversion should be consistent. Run data transformation: (1) After the first-end outgoing line is equivalent to a balanced node, the voltage operation data of the first-end outgoing line needs to be added to the balanced node; (2) After excluding losses, the distribution transformer is equivalent to a combination of busbar and load. The load needs to have the power factor data of the distribution transformer added. It is expressed as follows, calculated by the following formula: (6) Among them, P is Q is Let represent the active power and reactive power of the i-th transformer without considering losses, respectively. (3) After the loss-calculating distribution transformer is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides, and the load, the load needs to have the power factor data of the distribution transformer added. It is expressed as follows, calculated by the following formula: (7) in, , These represent the active power and reactive power of the i-th loss-calculating transformer, respectively.

4. The standardized method for calculating distribution network line loss as described in claim 3, characterized in that: Step S4, power flow calculation, utilizes the Newton-Raphson curve, specifically including: The basic equations for power flow calculation are as follows: (12) Among them, P i The active power injected into the i-th node, Q i The reactive power injected into the i-th node, Y ij For the nodal admittance matrix elements, For the elements of the node voltage column vector, For node PQ, the node power P is known. is Q is The corresponding equation is (19) For a PV node, the node power P is known. is V is The corresponding equation is (20) By combining equations (19) and (20), we can construct the general form of the power flow equations. (21) If it exists , making ,but It is the solution to equation (21); Introducing parameter t into equation (21) allows us to construct a family of images: When t=1, Z is Y, and when t=0, the equation is obtained. The solution is That is, defined as ,in Solution Given the initial values, the equation Equivalent to the original nonlinear equation (21), therefore only the following equivalent equation needs to be calculated: (22) The equivalent equation is not unique; we assume it to be: (23) like It is continuous and non-singular, and equation (23) has a unique solution. ,satisfy ,and This is the solution to equation (21). Therefore, finding the solution to equation (23) is equivalent to finding the initial value problem for the following Davidenko differential equation: (24) in In equation (21) The solution in equation (24) The curve formed is called the homotopy curve. In equation (21), the homotopy curve is calculated by integrating from the midpoint. The calculation formula is as follows: (25) In the formula, N represents the number of segments of t, from which the step size h = 1 / N is derived. This is due to the homotopy curve... Since it approximates a straight line, any numerical integration method of order 2 can be used to solve it; If the initial value calculated by equation (25) does not meet the convergence requirements of Newton-Raphson, the number of segments N is increased until the convergence requirements of Newton-Raphson are met. Variable step size is used to shorten the calculation time. Variable step size means that the system will adjust the size of the time step as needed, while also improving the overall accuracy of the homotopy curve. If a certain segment value is taken, it is calculated using equation (25), and then expanded using the Newton-Raphson calculation equation (26). If the obtained... Small enough, or meet Just think It is the Newton-Raphson iteration that provides a sufficiently good initial value; otherwise, it will... Treating it as an initial value, repeat the calculation of formula (25) to calculate the new value. , (26) When calculating the homotopy curve using equation (24), the initial value is given, and we take... In some cases, it appears as Strange and Non-singularity prevents the calculation process from proceeding, or causes errors during the calculation of homotopy curves. Strange, actually when and On curved surfaces If connected to both sides and The homotopy curve C exists. There must be a singularity on C, especially when a power system line is under heavy load or near the stability boundary. The homotopy curve will have a singularity. To prevent this, a homotopy equation with parameters is used: (27) in This is a parameter matrix, and its values ​​are determined according to... Whether it is singular or not changes automatically, for any , determine The homotopy equation constructed, i.e., equation (27), satisfies the condition. , Therefore when The solution at that time is the solution to the original equation (21); The method for solving equation (27) is unified as solving the initial value problem of the Davidenko differential equation as follows, i.e., written as: (28) The calculation method is the same as in equation (25).

5. A standardized distribution network line loss calculation system, characterized in that: Includes the following modules: The source data acquisition module is used to acquire static and dynamic data of the distribution network based on the source system. The data parsing module is used to parse both static and dynamic data, including: The missing data identification unit for dynamic data is used to identify missing dynamic data. The missing data imputation unit performs the following steps: First, it iterates through all features, starting with the feature with the fewest missing values. When imputing a feature, the missing values ​​of other features are pre-filled with 0. After each regression prediction is completed, the predicted value is placed into the original feature matrix, and the next feature is imputed. After each imputation, the number of features with missing values ​​decreases by one. Therefore, after each loop, the number of features that need to be imputed with 0 decreases. When the last feature is reached, there are no other features that need to be imputed with 0, and a large amount of effective information has been used to imput other features by regression. This information can be used to imput the feature with the most missing values. After iterating through all features, the data is complete and there are no more missing values. The topology parsing unit for static data is used to perform topology parsing of static data. The static and dynamic data standardization module, based on the parsing results of the data parsing module, constructs static topology data and dynamic distribution network operation data into a data format that the distribution network power flow calculation algorithm can recognize; The power flow calculation module is used to perform power system power flow calculations based on standardized data. In the missing data filling unit, label pairs are constructed to fully utilize the correlation between multidimensional data. Machine learning algorithms are used for regression prediction, and the predicted results are used to replace missing values. Taking the voltage, active power, and reactive power of a single load node as an example, missing data filling is performed. The missing data filling unit is specifically used to perform the following steps: S221. Sort by the number of missing values: Based on the number of actual data returned in step S21, sort the three-dimensional data of voltage, active power, and reactive power by the number of missing values, as follows: (1) In the above formula (1), This indicates the number of missing values ​​in each dimension of the data, where This indicates that the one-dimensional data has the most missing values. This indicates that the number of missing values ​​in this one-dimensional data set is the smallest. This indicates that the one-dimensional data is missing values. and between; S222, will All missing values ​​in the corresponding data are pre-filled with 0, assuming The corresponding data is DA1, which is the data with the fewest missing values ​​in the three-dimensional data of voltage, active power, and reactive power at 24 points, as detailed below: (2) In the above formula (2), The value represents a normal value, and T represents True, meaning that there is missing data at this moment, and pre-filling is performed. It is expressed as follows: (3) Similarly, it can be done Data pre-filled ; S223, will , The number as a characteristic, The data is used as labels to construct label pairs, as follows: (4) S224. Using the random forest algorithm, regression prediction is performed according to equation (4). , The missing data has been pre-filled and can be used directly. , Data and Normal data processing Predicting missing values ​​in the middle, achieving Filling in missing values, after filling use express; S225, will , Data as features The data is used as labels to construct label pairs, as follows: (5) S226. Using the random forest algorithm, regression prediction is performed according to equation (5), that is, to achieve... Filling in missing values, after filling use express; S227, Similarly, based on , Label pairs are constructed using DA1, and missing values ​​in DA1 are filled using the random forest algorithm. The filled DA1 is then used... express.

6. A standardized distribution network line loss calculation system as described in claim 5, characterized in that: The missing data identification unit for dynamic data specifically performs the following steps: The isnull() function is called to retrieve the voltage, active power, and reactive power data of each load node on a typical day that requires power flow calculation. This function can return a True value for the location of all missing values, thus identifying missing data.

7. A standardized distribution network line loss calculation system as described in claim 5, characterized in that: In the power flow calculation module, before performing power flow calculations on the distribution network, it is necessary to construct an equivalent model of the main components of the distribution network and transmission network, as detailed below: (1) Head-end outgoing line conversion: The power flow algorithm requires that the grid structure must include a balancing node. Therefore, the head-end outgoing line of the distribution network is equivalent to a combination structure consisting of a virtual bus and a balancing node. At the same time, impedance equivalence, current injection and power injection are carried out. The parameters of the converted components should be consistent with those of the components before conversion. (2) Transformer conversion without loss: refers to a transformer that does not include calculated losses, which is equivalent to a combination structure consisting of a virtual bus and a load. The component parameters before and after the conversion should remain consistent. (3) Loss calculation transformer conversion: refers to the common transformer, which is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides and load. The loss of each transformer can be calculated through this structure. The component parameters before and after the conversion should be consistent. Run data transformation: (1) After the first-end outgoing line is equivalent to a balanced node, the voltage operation data of the first-end outgoing line needs to be added to the balanced node; (2) After excluding losses, the distribution transformer is equivalent to a combination of busbar and load. The load needs to have the power factor data of the distribution transformer added. It is expressed as follows, calculated by the following formula: (6) Among them, P is Q is Let represent the active power and reactive power of the i-th transformer without considering losses, respectively. (3) After the loss-calculating distribution transformer is equivalent to a combination structure consisting of two winding transformers, virtual jumper wires on both sides, and the load, the load needs to have the power factor data of the distribution transformer added. It is expressed as follows, calculated by the following formula: (7) in, , These represent the active power and reactive power of the i-th loss-calculating transformer, respectively.