A power distribution network line loss online calculation method, system, medium and computer device

By using historical data in the distribution network for power flow calculation and constructing a kernel ridge regression model, the problems of accuracy and real-time performance in distribution network line loss calculation are solved, achieving high efficiency and accuracy in online calculation and optimizing the economy and security of the power system.

CN115347551BActive Publication Date: 2026-06-05ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID SHANDONG ELECTRIC POWER COMPANY +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID SHANDONG ELECTRIC POWER COMPANY
Filing Date
2022-07-01
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately and in real-time calculate distribution network line losses, especially due to the complex structure and low level of automation of distribution networks, which makes calculation difficult.

Method used

By using historical data of the distribution network to perform power flow calculations, establishing training and testing sets, constructing a kernel ridge regression model, and performing online calculations using the kernel method and matrix inversion lemma, the online calculation of distribution network line losses is realized by combining a data acquisition unit, a data processing unit, and an online calculation unit.

Benefits of technology

It improves the accuracy and real-time performance of distribution network line loss calculation, enabling accurate calculation of line losses even with low levels of automation, optimizing power network design, and enhancing the economy and security of power system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115347551B_ABST
    Figure CN115347551B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of power system operation management, and discloses a power distribution network line loss online calculation method, comprising the following steps: performing power flow calculation by using power distribution network historical data, establishing a training set and a test set based on the calculation result; constructing a power distribution network line loss calculation model, and performing offline training on the online calculation model using the training set; testing the calculation model training effect by using the test set and outputting an online application model to calculate the power distribution network line loss. The present disclosure can accurately and timely calculate the power distribution network line loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system operation and management technology, and in particular to a method, system, medium, and computer equipment for online calculation of distribution network line losses. Background Technology

[0002] Line loss rate is an important indicator for measuring the economic efficiency and operational level of a power system. Most losses in a power system occur in the lower-voltage distribution network. In my country, the distribution network is vast and complex. With economic development and the continuous growth of electrical load, the problem of power loss in the distribution network has become increasingly prominent. Distribution network line loss calculation is a crucial basis for monitoring and management, playing a decisive role in dispatching processes such as distribution network reconfiguration. Therefore, the accuracy of distribution network line loss calculation is extremely important. Precise line loss calculation can not only optimize power network design and improve the economic efficiency of power system operation, but also provide strong guidance for system security and power quality improvement.

[0003] Transmission networks have a relatively simple structure and a high degree of automation, and widely used methods for calculating line losses include power flow calculation, root-mean-square current method, and equivalent resistance method. These methods can calculate transmission network line losses relatively accurately. However, due to the lower voltage levels, wider line distribution, more branches, and more complex electrical equipment in distribution networks, many line loss calculation methods widely used in transmission networks cannot be applied to distribution network line loss calculations. Furthermore, most distribution networks have a lower degree of automation; the electrical quantity acquisition intervals at each node in a distribution network are not uniform, and the time interval for completing a power flow calculation depends on the node with the longest acquisition interval. This makes accurate and real-time calculation of distribution network line losses extremely difficult.

[0004] Therefore, how to provide an online calculation method, system, and computer equipment for power distribution network line losses is an urgent problem to be solved. Summary of the Invention

[0005] This invention provides a solution to the problem of the difficulty in accurately and in real-time calculating distribution network line losses in the prior art. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general description, nor is it intended to identify key / important components or to describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.

[0006] On the one hand, this application provides a method for online calculation of distribution network line losses, including the following steps:

[0007] Power flow calculations were performed using historical data from the distribution network, and training and testing sets were established based on the calculation results.

[0008] A distribution network line loss calculation model is constructed, and the online calculation model is trained offline using a training set;

[0009] The training effect of the computational model is tested using a test set and output as an online application model. The online application model is then used to calculate the distribution network line loss online.

[0010] Optionally, the step of performing power flow calculation using historical data of the distribution network includes: determining the line loss of each branch in the distribution network using the maximum acquisition interval time in the distribution network as a cross-section, and performing power flow calculation.

[0011] Optionally, the step of establishing a training set and a test set based on the calculation results includes: combining the line loss of each branch line with the historical data of the distribution network at the corresponding time to form a training set and a test set.

[0012] Optionally, the power sources in the distribution network include root nodes and / or distributed power sources.

[0013] Optionally, the root node of the distribution network includes an upstream substation, and the distributed power source includes wind power generation equipment and / or photovoltaic power generation equipment.

[0014] Optionally, the step of performing power flow calculation using historical data of the distribution network includes: performing power flow calculation using historical data via the Newton-Raphson method.

[0015] The node power is calculated using the following formula:

[0016]

[0017] Among them, P b,t Let be the active power flowing through branch b at time t. Let I be the injected active and reactive power at node i at time t. b,t Let R be the current in branch b at time t. b,t Let the resistance of branch b be, and,

[0018] The formula for calculating branch power is as follows:

[0019]

[0020] in, Inject power into the root node at time t. Inject power into the distributed power source at node i at time t. Let be the load power of node i at time t; and .

[0021] The formula for calculating branch line loss power is as follows:

[0022]

[0023] in, Let be the line loss power on branch ij at time t. Inject power into the first node of branch ij at time t. The power injected into the final node of branch ij at time t.

[0024] Optionally, the node voltages in the distribution network satisfy:

[0025]

[0026] Among them, U i,t Let R be the voltage at node i at time t. b X is the impedance on branch b; b For the inductive impedance on branch b, P b,t Let Q be the active power flowing through branch b at time t. b,t Let be the reactive power flowing through branch b at time t.

[0027] Optionally, the step of constructing the distribution network line loss calculation model includes:

[0028] Kernel ridge regression is used to realize online calculation of distribution network line loss. The kernel method is introduced into ridge regression to construct a kernel ridge regression model.

[0029] By using the matrix inversion lemma, the parameter matrix is ​​transformed into an inner product form, and the parameters of the computational model after the kernel is introduced are calculated.

[0030] Optionally, the step of constructing a kernel ridge regression model by introducing a kernel method into ridge regression to achieve online calculation of distribution network line losses through kernel ridge regression includes:

[0031] The loss function for ridge regression is calculated using the following formula:

[0032]

[0033] Where Loss(A) is the loss function, A is the parameter matrix, and A T =(a1,a2,…,a n ), X = (x1, x2…x n Let Z = (z1, z2, ..., zn) be the state matrix. n Let be the prediction matrix, and T denote the matrix transpose; and,

[0034] The model estimate is calculated using the following formula:

[0035] A1=(X T X+α -1 I) -1 XT Z (6)

[0036] Where A1 is the model estimate, X = (x1, x2, ..., x...) n Let Z = (z1, z2, ..., zn) be the state matrix. n ) represents the prediction matrix, T represents the matrix transpose, α represents the hyperparameter matrix, and I represents the identity matrix.

[0037] Optionally, the step of using the matrix inversion lemma includes:

[0038] Using the matrix inversion lemma: (E-FH) -1 G) -1 FH -1 =E -1 F(H-GE -1 F) -1 (7).

[0039] Optionally, the step of converting the parameter matrix into the form of an inner product and calculating the parameters of the computational model after introducing the kernel is performed using the following formula:

[0040]

[0041] Where A2 represents the computational model parameters after the kernel is introduced, and β is the weight parameter matrix. i The elements in the weight parameter matrix, X = (x1, x2, ..., x...) n ) is the state matrix, x i is an element in the state matrix, and T is the matrix transpose.

[0042] On the other hand, this application provides an online calculation system for distribution network line losses, comprising: a data acquisition unit, a data processing unit, and an online calculation unit; wherein,

[0043] The data acquisition unit is used to collect and record historical data of the power distribution network;

[0044] The data processing unit incorporates the online calculation method for distribution network line loss as described above. It performs power flow calculation using historical distribution network data, establishes training and testing sets, constructs a distribution network line loss calculation model, and uses the training set to train the calculation model offline. It then uses the testing set to test the training effect of the calculation model and outputs it as an online application model.

[0045] The online calculation unit is used to calculate the line loss of the distribution network online through the online application model.

[0046] Optionally, the data processing unit performs power flow calculations using historical data of the distribution network to establish training and test sets, including: determining the line loss of each branch in the distribution network, and combining the line loss with the historical data of the distribution network at the corresponding time to form training and test sets.

[0047] Optionally, the data processing unit constructs an online calculation model for distribution network line losses, including:

[0048] Online calculation of distribution network line loss is achieved through kernel ridge regression. The kernel method is introduced into kernel ridge regression to construct a kernel ridge regression model.

[0049] By using the matrix inversion lemma, the parameter matrix is ​​transformed into an inner product, and the parameters of the computational model after the kernel is introduced are calculated.

[0050] In another aspect, this application provides a medium on which a program is stored, which, when executed by a processor, implements the steps in the online calculation method for distribution network line losses as described in any of the preceding claims.

[0051] In another aspect, this application provides a computer device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the online calculation method for distribution network line losses as described in any of the preceding claims.

[0052] The technical solution provided in this application can achieve the following technical effects:

[0053] By collecting historical data from the distribution network, performing power flow calculations, and establishing a training set, the historical data in the distribution network can be effectively used to train and generate a calculation model. Since the data all comes from the distribution network, the accuracy of the calculation model is guaranteed to a certain extent. In addition, by testing the calculation model, its calculation accuracy can be further improved. Furthermore, when the level of automation in the distribution network is low, the solution provided in this application can use limited distribution network operation data to calculate line losses and ensure accuracy.

[0054] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit the invention. Attached Figure Description

[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0056] Figure 1 This is a flowchart illustrating an online method for calculating line losses in a distribution network according to an exemplary embodiment;

[0057] Figure 2This is a schematic diagram illustrating the process of constructing a distribution network line loss calculation model according to an exemplary embodiment;

[0058] Figure 3 This is a schematic diagram of the topology and energy flow variables of an energy hub model of a distribution network connection according to an exemplary embodiment;

[0059] Figure 4 This is a schematic diagram of multi-node data acquisition in a power distribution network according to an exemplary embodiment;

[0060] Figure 5 This is a schematic diagram of an online distribution network line loss calculation system according to an exemplary embodiment;

[0061] Figure 6 This is a schematic diagram of the structure of a computer device according to an exemplary embodiment. Detailed Implementation

[0062] The following description and accompanying drawings fully illustrate specific embodiments described herein to enable those skilled in the art to practice them. Some embodiments may include or substitute parts and features of other embodiments. The scope of the embodiments herein encompasses the entire scope of the claims and all available equivalents thereof. Throughout this document, the terms “first,” “second,” etc., are used only to distinguish one element from another without requiring or implying any actual relationship or order between the elements. Indeed, a first element can also be referred to as a second element, and vice versa. Furthermore, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a structure, apparatus, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a structure, apparatus, or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the structure, apparatus, or device that includes said element. The various embodiments described herein are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.

[0063] The terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer" used in this document to indicate orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings. They are used solely for the convenience of describing the document and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In the description herein, unless otherwise specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two elements; they can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0064] In this document, unless otherwise stated, the term "multiple" means two or more.

[0065] In this article, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0066] In this article, the term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0067] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0068] like Figure 1 As shown in the figure, this disclosure provides a method for online calculation of distribution network line losses, including the following steps:

[0069] Power flow calculations were performed using historical data from the distribution network, and training and testing sets were established based on the calculation results.

[0070] A distribution network line loss calculation model is constructed, and the online calculation model is trained offline using a training set;

[0071] The training effect of the computational model is tested using a test set, and the result is output as an online application model to calculate the line loss of the distribution network.

[0072] In one embodiment, the step of performing power flow calculation using historical data of the distribution network includes: determining the line loss of each branch in the distribution network using the maximum data collection interval as a cross-section, and performing power flow calculation.

[0073] In one embodiment, the step of establishing a training set and a test set based on the calculation results includes: combining the line loss of each branch line with the historical data of the distribution network at the corresponding time to form a training set and a test set.

[0074] In one embodiment, the power sources in the distribution network include root nodes and / or distributed generation.

[0075] Optionally, the root node of the distribution network includes the upstream substation, and the distributed power source includes wind power generation equipment and / or photovoltaic power generation equipment.

[0076] Historical data of the distribution network includes historical load and / or output data of distributed generation. In addition to the upstream substation, the existence of distributed generation (DG) is considered in the distribution network in this embodiment. At this time, the power flow distribution in the distribution network is bidirectional rather than simple unidirectional flow, which further conforms to the actual operating environment of the distribution network and improves the calculation accuracy.

[0077] Please refer to Figure 2 In one embodiment, the step of constructing an online calculation model for distribution network line losses includes:

[0078] Kernel ridge regression is used to realize online calculation of distribution network line loss. The kernel method is introduced into ridge regression to construct a kernel ridge regression model.

[0079] By using the matrix inversion lemma, the parameter matrix is ​​transformed into an inner product, allowing for the calculation of the computational model parameters after the kernel is introduced.

[0080] In one embodiment, the step of performing power flow calculation using historical data of the distribution network includes: performing power flow calculation using historical data via the Newton-Raphson method.

[0081] The node power is calculated using the following formula:

[0082]

[0083] Among them, P b,t Let be the active power flowing through branch b at time t. Let I be the injected active and reactive power at node i at time t. b,t Let R be the current in branch b at time t. b,t Let the resistance of branch b be, and,

[0084] The formula for calculating branch power is as follows:

[0085]

[0086] in, Inject power into the root node at time t. Inject power into the distributed power source at node i at time t. Let be the load power of node i at time t; and .

[0087] The formula for calculating branch line loss power is as follows:

[0088]

[0089] in, Let be the line loss power on branch ij at time t. Inject power into the first node of branch ij at time t. The power injected into the final node of branch ij at time t.

[0090] Optionally, the power sources in the distribution network include the root nodes of the distribution network and distributed power sources connected within the distribution network, and the node voltages satisfy:

[0091]

[0092] Among them, U i,t Let R be the voltage at node i at time t. b X is the impedance on branch b; b For the inductive impedance on branch b, P b,t Let Q be the active power flowing through branch b at time t. b,t Let be the reactive power flowing through branch b at time t.

[0093] In one embodiment, the topology and energy flow variables of the energy hub model connected to the distribution network are as follows: Figure 3 As shown, the energy hub model takes electricity and natural gas as inputs and outputs electricity and heat as outputs. The energy hub model consists of a combined heat and power (CHP) unit, a heat pump unit, an energy storage unit, and a thermal storage unit, unlike a residential energy hub whose output is connected to end users. Figure 3 The energy hub in the diagram connects to the distribution network energy system via nodes 1 and 33. In this embodiment, numbers 1-33 represent nodes, and S1-S32 represent branches. The distribution network has two sources of power: first, the root node of the distribution network, i.e., the substation above node 1 in the diagram; second, distributed power sources connected within the distribution network, i.e., DG1-DG4 in the diagram. These distributed power sources are wind power generation equipment or photovoltaic power generation equipment. The energy flow of the distribution network is described as follows:

[0094] The node power is calculated using the following formula:

[0095]

[0096] Among them, P bt Let be the active power flowing through branch b at time t. Let I be the injected active and reactive power at node i at time t. b,t Let R be the current in branch b at time t. b,t Let the resistance of branch b be, and,

[0097] The formula for calculating branch power is as follows:

[0098]

[0099] in, Inject power into the root node at time t. Inject power into the distributed power source at node i at time t. Let be the load power of node i at time t; and .

[0100]

[0101] Among them, U i,t Let R be the voltage at node i at time t. b X is the impedance on branch b; b For the inductive impedance on branch b, P b,t Let Q be the active power flowing through branch b at time t. b,t Let be the reactive power flowing through branch b at time t.

[0102] In one embodiment, online calculation of distribution network line losses is achieved through kernel ridge regression. The steps of constructing a kernel ridge regression model by introducing the kernel method into ridge regression include:

[0103] The loss function for ridge regression is calculated using the following formula:

[0104]

[0105] Where Loss(A) is the loss function, A is the parameter matrix, and A T =(a1,a2,…,a n ), X = (x1, x2…x n Let Z = (z1, z2, ..., zn) be the state matrix. n Let be the prediction matrix, and T denote the matrix transpose; and,

[0106] The model estimate is calculated using the following formula:

[0107] A1=(X T X+α -1 I) -1 X T Z (6)

[0108] Where A1 is the model estimate, X = (x1, x2, ..., x...) n Let Z = (z1, z2, ..., zn) be the state matrix.n ) represents the prediction matrix, T represents the matrix transpose, α represents the hyperparameter matrix, and I represents the identity matrix.

[0109] In one embodiment, the steps of using the matrix inversion lemma to transform the parameter matrix into an inner product form and calculating the computational model parameters after introducing the kernel include:

[0110] Using the matrix inversion lemma: (E-FH) -1 G) -1 FH -1 =E -1 F(H-GE -1 F) -1 (7) Transform the parameter matrix into the form of an inner product, and calculate the parameters of the computational model after introducing the kernel. The calculation formula is as follows:

[0111]

[0112] Where A2 represents the computational model parameters after the kernel is introduced, and β is the weight parameter matrix. i The elements in the weight parameter matrix, X = (x1, x2, ..., x...) n ) is the state matrix, x i is an element in the state matrix, and T is the matrix transpose.

[0113] Figure 4 This diagram illustrates a multi-node data acquisition method in a distribution network. Numbers 1-33 represent nodes, and S1-S32 represent branches. The distribution network has two power sources: first, the root node, i.e., the substation above node 1 in the diagram; second, distributed power sources connected within the distribution network, i.e., DG1-DG4 in the diagram. As shown, the distribution network contains various nodes with electrical quantity acquisition intervals of 15 minutes and 45 minutes. Using traditional methods, this distribution network can only perform power flow calculations every 45 minutes to obtain line loss data, resulting in wasted data from nodes acquired every 15 minutes. However, by utilizing the online line loss calculation method for distribution networks disclosed in the above embodiment, data is collected at a maximum acquisition interval of 45 minutes as a cross-section, and historical data from the training set is mined to obtain the line loss information of all branches every 15 minutes, thus improving the accuracy of the calculation.

[0114] Please refer to Figure 5 In one embodiment, an online distribution network line loss calculation system is provided, comprising: a data acquisition unit, a data processing unit, and an online calculation unit; wherein,

[0115] The data acquisition unit is used to collect and record historical data of the power distribution network;

[0116] The data processing unit incorporates the above-mentioned online calculation method for distribution network line losses. It performs power flow calculations using historical distribution network data to establish training and testing sets; constructs a distribution network line loss calculation model and trains the calculation model offline using the training set; and tests the training effect of the calculation model using the testing set and outputs it as an online application model.

[0117] The online calculation unit is used to calculate the line loss of the distribution network online by applying an online model.

[0118] In one embodiment, the data processing unit performs power flow calculations using historical data of the distribution network to establish training and test sets, including: determining the line loss of each branch in the distribution network, and combining the line loss with the historical data of the distribution network at the corresponding time to form training and test sets.

[0119] In one embodiment, the data processing unit constructs an online calculation model for distribution network line losses, including:

[0120] Online calculation of distribution network line loss is achieved through kernel ridge regression. The kernel method is introduced into kernel ridge regression to construct a kernel ridge regression model.

[0121] By using the matrix inversion lemma, the parameter matrix is ​​transformed into an inner product, and the parameters of the computational model after the kernel is introduced are calculated.

[0122] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores static and dynamic information data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the above method embodiments.

[0123] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0124] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0125] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the method embodiments described above.

[0126] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0127] It should be noted that the above description is merely an embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0128] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0129] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for online calculation of line losses in a distribution network, characterized in that, Includes the following steps: Power flow calculations are performed using historical data from the distribution network. Taking the maximum data collection interval as a cross-section, the line loss of each branch in the distribution network is determined, and power flow calculations are conducted. Training and test sets are established based on the calculation results. Specifically, the Newton-Raphson method is used to perform power flow calculations using historical data. The node power is calculated using the following formula: (1) in, for Flowing through the side road at all times active power, for Time Node The injected active and reactive power, for Time Branch The current, for Time Branch The resistance, and, The formula for calculating branch power is as follows: (2) in, for Power is injected into the root node at any given time. for Time Node Distributed power injection power, for Time Node The load power; and, The formula for calculating branch line loss power is as follows: (3) in, for Time Branch Line loss power, for Time Branch The first node injected power, for Time Branch The power injected at the end node; The node voltages in the distribution network satisfy the following: (4) in, for Time Node voltage, branch road impedance; branch road The upper resistance, for Flowing through the side road at all times active power, for Flowing through the side road at all times reactive power; A distribution network line loss calculation model is constructed, and the online calculation model is trained offline using a training set; The training effect of the computational model is tested using a test set and output as an online application model. The online application model is then used to calculate the distribution network line loss online.

2. The method for online calculation of distribution network line losses according to claim 1, characterized in that, The steps of establishing training and test sets based on the calculation results include: combining the line loss of each branch line with the historical data of the distribution network at the corresponding time to form training and test sets.

3. The method for online calculation of distribution network line losses according to claim 1, characterized in that, The power sources in the distribution network include root nodes and / or distributed power sources.

4. The method for online calculation of distribution network line losses according to claim 3, characterized in that, The root node of the distribution network includes the upstream substation, and the distributed power source includes wind power generation equipment and / or photovoltaic power generation equipment.

5. The method for online calculation of distribution network line losses according to claim 1, characterized in that, The steps for constructing the distribution network line loss calculation model include: Kernel ridge regression is used to realize online calculation of distribution network line loss. The kernel method is introduced into ridge regression to construct a kernel ridge regression model. By using the matrix inversion lemma, the parameter matrix is ​​transformed into an inner product form, and the parameters of the computational model after the kernel is introduced are calculated.

6. The method for online calculation of distribution network line losses according to claim 5, characterized in that, The steps of implementing online calculation of distribution network line losses through kernel ridge regression, and constructing a kernel ridge regression model by introducing the kernel method into ridge regression, include: The loss function for ridge regression is calculated using the following formula: ; (5) in, For loss function, Let be a parameter matrix, and , The state matrix, For the prediction matrix, Indicates matrix transpose; and, The model estimate is calculated using the following formula: (6) in, For model estimates, The state matrix, For the prediction matrix, Indicates matrix transpose. Let I denote the hyperparameter matrix, and let I denote the identity matrix.

7. The method for online calculation of distribution network line losses according to claim 6, characterized in that, The steps of using the matrix inversion lemma include: Lemma of finding the inverse of a matrix: (7).

8. The method for online calculation of distribution network line losses according to claim 7, characterized in that, The step of transforming the parameter matrix into the form of an inner product and calculating the parameters of the computational model after introducing the kernel is described in the following formula: (8) in, For the parameters of the computational model after the kernel is introduced, The weight parameter matrix, Elements in the weight parameter matrix, The state matrix, is an element in the state matrix, and T is the matrix transpose.

9. An online calculation system for distribution network line losses, characterized in that, include: The system comprises a data acquisition unit, a data processing unit, and an online computing unit; among which, The data acquisition unit is used to collect and record historical data of the power distribution network; The data processing unit performs power flow calculations using historical data from the distribution network. Using the maximum data collection interval in the distribution network as a cross-section, it determines the line loss of each branch in the distribution network, performs power flow calculations, and establishes training and testing sets based on the calculation results. Specifically, the Newton-Raphson method is used to perform power flow calculations using historical data. The node power is calculated using the following formula: (1) in, for Flowing through the side road at all times active power, for Time Node The injected active and reactive power, for Time Branch The current, for Time Branch The resistance, and, The formula for calculating branch power is as follows: (2) in, for Power is injected into the root node at any given time. for Time Node Distributed power injection power, for Time Node The load power; and, The formula for calculating branch line loss power is as follows: (3) in, for Time Branch Line loss power, for Time Branch The first node injected power, for Time Branch The power injected at the end node; The node voltages in the distribution network satisfy the following: (4) in, for Time Node voltage, branch road impedance; branch road The upper resistance, for Flowing through the side road active power, for Flowing through the side road The reactive power is used to establish training and testing sets; to construct a distribution network line loss calculation model and to train the calculation model offline using the training set; and to test the training effect of the calculation model using the testing set and output it as an online application model. The online calculation unit is used to calculate the line loss of the distribution network online through the online application model.

10. The online distribution network line loss calculation system according to claim 9, characterized in that, The data processing unit performs power flow calculations using historical data from the distribution network to establish training and test sets, including: determining the line loss of each branch in the distribution network, and combining the line loss with the historical data of the distribution network at the corresponding time to form training and test sets.

11. The online distribution network line loss calculation system according to claim 9, characterized in that, The power sources in the distribution network include root nodes and / or distributed power sources.

12. The online distribution network line loss calculation system according to claim 11, characterized in that, The root node of the distribution network includes the upstream substation, and the distributed power source includes wind power generation equipment and / or photovoltaic power generation equipment.

13. The online distribution network line loss calculation system according to claim 9, characterized in that, The data processing unit constructs an online calculation model for distribution network line losses, including: Online calculation of distribution network line loss is achieved by kernel ridge regression. The kernel method is introduced into kernel ridge regression to construct a kernel ridge regression model. By using the matrix inversion lemma, the parameter matrix is ​​transformed into an inner product, and the parameters of the computational model after the kernel is introduced are calculated.

14. The online distribution network line loss calculation system according to claim 13, characterized in that, The method of realizing online calculation of distribution network line losses through kernel ridge regression introduces the kernel method into ridge regression to construct a kernel ridge regression model, including: The loss function for ridge regression is calculated using the following formula: ; (5) in, For loss function, Let be a parameter matrix, and , The state matrix, For the prediction matrix, Indicates matrix transpose; and, The model estimate is calculated using the following formula: (6) in, For model estimates, The state matrix, For the prediction matrix, Indicates matrix transpose. Let I denote the hyperparameter matrix, and let I denote the identity matrix.

15. A medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the online calculation method for distribution network line losses as described in any one of claims 1 to 8.

16. A computer device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the online calculation method for distribution network line losses as described in any one of claims 1 to 8.