A Reactive Power Optimization Algorithm and System for Distribution Network Based on Topological Structure
Through the topological structure-based reactive power grid reactive power optimization algorithm, the problems of low calculation efficiency and deviation of results in reactive voltage optimization and control in the power grid are solved, and more efficient and accurate reactive power optimization calculations are achieved, which improves the stability and economicality of power grid operation.
Patent Information
- Application Number
- CN202210412523.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-04-19
AI Technical Summary
The reactive voltage optimization and control in the existing power grid have problems such as large data preparation workload, slow calculation speed, deviation from the actual operating conditions, inaccurate basic data, poor operating performance of human-computer interactive interface, large labor intensity of capacitor turnover and transformer gear adjustment.
The topological structure-based reactive power optimization algorithm of the distribution network is adopted to finally obtain the optimal optimization solution by calculating branch trends, determining the total reactive power compensation capacity required for the entire network, obtaining the compensation point layout optimization solution, calculating the loss difference before and after optimization and the investment recovery period.
It improves the accuracy and efficiency of reactive power optimization calculations, can better guide the construction and transformation of the power grid, reduce grid power loss, and improve operating economic benefits.
Smart Images

Figure CN114970957B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distribution network optimization calculation, and particularly relates to a reactive power optimization algorithm and system for a distribution network based on a topological structure. Background Art
[0002] The reactive power optimization calculation of a power system is an important basis for improving the voltage qualification rate of the power system and reducing the operating network loss, and is a necessary work for ensuring the safe, stable and economic operation of the power grid. This not only relates to the quality of electric energy provided by the power system to power users, but also directly affects the safety and economy of the operation of the power grid itself; the voltage qualification rate is the most important quality index of the power grid, and the power grid line loss rate is the most important economic index of the power grid. Effective voltage control and reasonable reactive power compensation can not only ensure the voltage quality, but also effectively improve the stability and safety of the operation of the power system, reduce the electric energy loss of the power grid, and improve the economic benefits of the operation of the distribution network.
[0003] At present, reducing 1% of the network loss in our country is equivalent to building a large power plant with a capacity of 2 million kilowatts. However, there are still many deficiencies in the reactive power voltage optimization and control in the current power grid: the workload of preparing data for the optimization program is large, the calculation speed is slow, and the calculation results deviate from the actual operating conditions; the basic data, especially the reactive power data, is inaccurate; the operation performance of the man-machine interaction interface of the software system is poor and lacks maintenance; the labor intensity of capacitor switching and transformer tap adjustment is large and cannot be adjusted in a timely and accurate manner; the input capacity and position of the capacitor cannot be calculated based on a basis and have a certain degree of randomness. Summary of the Invention
[0004] The present invention is made to overcome the above defects, and aims to provide a reactive power optimization algorithm and system for a distribution network based on a topological structure.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] The present invention provides a reactive power optimization algorithm for a distribution network based on a topological structure, which is characterized by including the following steps:
[0007] a. Calculate the branch power flow: Obtain the daily or monthly electricity sales volume of the transformer in each branch line, and calculate the power flow of each branch line in the power grid of the topological structure based on the first calculation rule;
[0008] b. Determine the total reactive power compensation capacity required for the whole network;
[0009] c. Obtain all optimized layout schemes of compensation points for the whole network: Assume that the total number of nodes in the whole network of the power grid of the topological structure is n, and the number of compensation points is m, and obtain all optimized layout schemes of compensation points based on the third calculation rule;
[0010] d. Calculate the difference between the losses before and after optimization: For each optimization scheme of the compensation point arrangement obtained in step c, calculate the loss △P1 before optimization and the loss △P2 after optimization respectively based on the fourth calculation rule, and calculate the difference △P1 - △P2 of the losses before and after optimization;
[0011] e. Calculate the payback period: For each optimization scheme of the compensation point arrangement obtained in step c, calculate the payback period based on the fifth calculation rule;
[0012] f. Obtain the optimal optimization scheme: Based on the calculation results in step d, select the scheme with the largest difference in losses before and after optimization, denoted as Scheme A; based on the calculation results in step e, select the scheme with the smallest payback period, denoted as Scheme B; Scheme A and Scheme B are the optimal compensation point arrangement optimization schemes.
[0013] Furthermore, in the reactive power optimization algorithm for distribution networks based on topological structure provided by the present invention, it can also have the following characteristics: Among them, the specific content of the first calculation rule in step a is as follows: Step a1, calculate the active power flow of each transformer in the branch line through formula (1) or formula (2):
[0014] Calculated daily: P b = F qx Y gd变 (1)
[0015] Calculated monthly:
[0016] In formulas (1) and (2), Pb represents the active power flow; F qx is the coefficient of the maximum load; Y gd变 is the daily electricity sales volume (kW·h) input to the transformer; Y gm变 is the monthly electricity sales volume (kW·h) input to the transformer; T L is the operating time (hours) of the line; T b is the outage time (hours) of the transformer;
[0017] Step a2, calculate the power flow of the branch line through formula (3):
[0018]
[0019] In formula (3), S a represents the power flow of this section of the branch line; P a represents the active power; j represents the imaginary unit, j 2 = -1; Q a represents the reactive power; d represents the number of transformers in this section of the branch line; Pb i is the active power flow of the i-th transformer in this section of the branch line.
[0020] Further, in the reactive power optimization algorithm for distribution network based on topological structure provided by the present invention, it may also have the following characteristics: Among them, the specific determination of the total reactive power compensation capacity required for the whole network in step b is as follows: Calculate the total reactive power compensation capacity required for the whole network according to the power factor based on the optimization goal and the second calculation rule; the second calculation rule is to determine the total reactive power compensation capacity required for the whole network according to formula (4):
[0021]
[0022] In formula (4), Qc is the total reactive power compensation capacity required for the whole network (kVar); is the current power factor; is the power factor of the optimization goal; P av is the average active power on the maximum load day (kW);
[0023] The above-mentioned average active power P on the maximum load day av is calculated through formula (5) or formula (6):
[0024] Calculated on a daily basis: P av = Y gd线 / 24 (5)
[0025] Calculated on a monthly basis:
[0026] In formulas (5) and (6), Y gd线 is the daily active power consumption at the head of the input line (kW·h); Y gm线 is the monthly active power consumption at the head of the input line (kW·h); T L is the operation time of the line (hours).
[0027] Further, in the reactive power optimization algorithm for distribution network based on topological structure provided by the present invention, it may also have the following characteristics: Among them, in step c, the compensation points are only arranged on the main lines.
[0028] Further, in the reactive power optimization algorithm for distribution network based on topological structure provided by the present invention, it may also have the following characteristics: Among them, the third calculation rule in step c is specifically as follows:
[0029] Based on the total number of nodes in the whole network being n, define the following matrix A and matrix Qc_matrix:
[0030] Matrix A is an n×n matrix, and the determinant of matrix A is expressed as follows:
[0031]
[0032] Each element value in matrix A is either 1 or 0;
[0033] The set of the main diagonal elements in matrix A is represented as {A 11 , A 22 , …, A xk , …, A nn}, where x = k. This set has n elements. When the value of A xk is 1, it means there is compensation at the end of the corresponding wire x. When the value of A xk is 0, it means there is no compensation at the end of the corresponding wire x;
[0034] The non - main diagonal element at the x - th row and y - th column in matrix A is represented as A xy , where x ≠ y. When the value of A xy is 1, it means wire y is the wire connected to the end of wire x and there is compensation at the end of wire y. When the value of A xy is 0, it means wire y is not connected to wire x or there is no compensation at the end of wire y;
[0035] Matrix Qc_matrix is a matrix with n rows and 1 column. The determinant of matrix Qc_matrix is expressed as follows:
[0036]
[0037] In matrix Qc_matrix, Q xc corresponds to representing all the compensation capacities of wire x and the lines it carries, that is, the compensation capacity at the end of wire x;
[0038]
[0039] Use the Gaussian elimination method to solve equation (9). Set up the following system of equations (10):
[0040]
[0041] In formula (10), Qc is the total reactive power compensation capacity required for the whole network (kVar); λ and Q cy are the parameters to be solved; C ky and B k are intermediate parameters, which are obtained through the following formulas (11) and (12) respectively:
[0042]
[0043] In formulas (11) and (12), R x is the resistance of wire x (Ω); V N is the average voltage at the head of the line (KV); Q x is the reactive power of wire x (kVar),
[0044] As can be seen from the above steps, equation (10) has a total of n + 1 expressions; there is an unknown Q c1 , Q c2 , …, Q cn and λ, a total of n + 1; if the calculated Q xc is negative, then all the elements in the x-th row and y-th column of matrix A are set to 0; if multiple Q xc are negative, then all the elements in the corresponding multiple rows and multiple columns of matrix A are set to 0.
[0045] Furthermore, in the reactive power optimization algorithm of the distribution network based on the topological structure provided by the present invention, it can also have the following characteristics: Among them, the fourth calculation rule of step d is specifically as follows:
[0046] Calculate the losses before and after the whole network optimization through formula (13) and formula (14) respectively:
[0047] Loss before optimization ΔP1:
[0048] Loss after optimization ΔP2:
[0049] In formulas (13) and (14), P x represents the active power flow of wire x; Q x represents the reactive power of wire x; Q xc represents all the compensation capacities of wire x and the lines it carries; R x is the resistance of wire x; n represents the total number of nodes in the whole network; V N is the average voltage at the head of the line;
[0050] The difference in losses before and after optimization is ΔP1 - ΔP2.
[0051] Furthermore, in the reactive power optimization algorithm of the distribution network based on the topological structure provided by the present invention, it can also have the following characteristics: Among them, the fifth calculation rule of step e is specifically as follows:
[0052] Calculate the payback period through formula (15):
[0053]
[0054] In formula (15), T 年限 represents the payback period; K b is the unit comprehensive investment of the compensation device (yuan / kVar); B is the price of unit active power (yuan / kW·h); T is the annual operating hours of the compensation device; Qc is the total reactive power compensation capacity of the whole network (kVar), and * represents multiplication operation.
[0055] The present invention provides a reactive power optimization calculation system for a distribution network, which is used to implement the above-mentioned reactive power optimization algorithm for a distribution network based on the topological structure. It is characterized by including: a user input module, a topological structure power grid information data acquisition module, a first calculation module, a second calculation module, a third calculation module, a fourth calculation module, a fifth calculation module, a first screening module, a second screening module, and an optimization result output module; the user input module is used to display an optimization target data input interface for the user to input relevant optimization target data; the optimization target data is the power factor of the optimization target or the total reactive power compensation capacity of the entire network; the topological structure power grid information data acquisition module obtains topological structure power grid information data through external data input or import. The topological structure power grid information data includes a topological structure power grid diagram, electricity sales data in the topological structure power grid, the total number of nodes in the entire network, and the positions where compensation devices are set; the first calculation module is used to calculate the power flow of each branch line in the topological structure power grid based on the electricity sales data according to the first calculation rule; the second calculation module is used to calculate the total reactive power compensation capacity of the entire network based on the power factor of the optimization target according to the second calculation rule when the user inputs the power factor of the optimization target; the third calculation module is used to obtain all optimized compensation point layout schemes according to the third calculation rule based on the total reactive power compensation capacity of the entire network, topological structure power grid information data, and the power flow data calculated by the first calculation module; the fourth calculation module is used to calculate the difference in losses before and after optimization of all optimized compensation point layout schemes according to the fourth calculation rule; the fifth calculation module is used to calculate the payback period of all optimized compensation point layout schemes according to the fifth calculation rule; the first screening module is used to sort the difference data in losses before and after optimization calculated by the fourth calculation module in terms of size, and screen out the optimized compensation point layout scheme with the smallest difference in losses before and after optimization; the second screening module is used to sort the payback period data calculated by the fifth calculation module in terms of size, and screen out the optimized compensation point layout scheme with the smallest payback period; the optimization result output module outputs the screening results of the first screening module and the second screening module as two optimal compensation point layout optimization schemes.
[0056] Advantages of the present invention:
[0057] Compared with the prior art, the topology-based reactive power optimization algorithm and system of the present invention adopt the "full enumeration" method, and give the optimization strategy for the position and compensation capacity of the compensation points in the power grid lines. Users can give the power factor of the optimization target or directly give the total input capacity. After specifying the number of compensation points, the optimal compensation point positions and the compensation capacities at each position of the compensation points are calculated. In addition, users can give the power factor of the optimization target or directly give the total input capacity, and perform compensation at the specified compensation point positions in the power grid, and calculate the compensation capacities at each compensation point position. The present invention solves the problems of poor convergence of the current reactive power optimization calculation and inability to better guide production practice; helps the relevant responsible persons better understand the weak links of the power grid and the composition of line losses caused, and guides the power grid construction and transformation work; improves the ability of relevant professionals to discover and solve problems, and provides quantitative indicators such as data and scientific basis for decision-making for the work of compiling the power grid loss reduction and energy conservation plan, formulating targeted loss reduction measures, reactive power optimization and loss reduction implementation, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a schematic diagram of the compensation capacity of a certain line segment in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] In order to make the technical means, creative features, achieved purposes and functions of the present invention easy to understand, the following embodiments specifically describe the technical solutions of the present invention.
[0060] <Embodiment>
[0061] This embodiment describes a topology-based reactive power optimization algorithm for a distribution network and a reactive power optimization system for a distribution network for implementing the algorithm program. A corresponding computer operation program is set in the system.
[0062] The prerequisites for the topology-based reactive power optimization algorithm for a distribution network are as follows: 1) Do not consider reactive power losses; 2) Take the average voltage of the whole network; 3) Assume that the power factor of the whole network is consistent. The topology-based reactive power optimization algorithm for a distribution network includes the following steps:
[0063] a. Calculate the branch power flow:
[0064] Obtain the daily or monthly electricity sales of the transformers in each branch line, and calculate the power flow of each branch line in the topology-based power grid based on the first calculation rule.
[0065] The specific content of the first calculation rule is as follows:
[0066] Step a1, calculate the active power flow of each transformer in the branch line through formula (1) or formula (2):
[0067] Calculated by day: P b = Fqx Y gd变 (1)
[0068] Calculated monthly:
[0069] In formulas (1) and (2), P b represents the active power flow; F qx is the coefficient of the maximum load; Y gd变 is the daily electricity sales volume (kW·h) input to the transformer; Y gm变 is the monthly electricity sales volume (kW·h) input to the transformer; T L is the operation time (hours) of the line; T b is the outage time (hours) of the transformer;
[0070] Step a2, calculate the power flow of the branch line through formula (3):
[0071]
[0072] In formula (3), S a represents the power flow of a certain section of branch line a; P a represents the active power of this branch line a; j represents a complex number, j 2 = -1; Q a represents the reactive power, Q a is calculated based on the active power Pa and the power factor of the line; d represents the number of transformers in this section of the branch line; P bi is the active power flow of the i-th transformer in this section of the branch line, and the active power flow of this transformer is calculated by using step a1.
[0073] When implementing the algorithm of the present invention, if the original data collected in step a uses the daily electricity sales volume, then subsequent related calculations all use the related calculations of the daily electricity sales volume; if the original data collected in step a uses the monthly electricity sales volume, then subsequent related calculations all use the related calculations of the monthly electricity sales volume.
[0074] b. Determine the total reactive power compensation capacity required for the entire network:
[0075] The total reactive power compensation capacity required for the entire network can be directly specified by a person, or a person can specify the power factor of the optimization target, and then calculate the total reactive power compensation capacity required for the entire network according to the second calculation rule.
[0076] This second calculation rule is to determine the total reactive power compensation capacity required for the entire network according to formula (4):
[0077]
[0078] In formula (4), Qc is the total reactive power compensation capacity required for the entire network (kVar); is the power factor of the current situation; is the power factor of the optimization target; P av is the average active power on the maximum load day (kW);
[0079] The above average active power P on the maximum load day av is calculated through formula (5) or formula (6):
[0080] Calculated on a daily basis: P av = Y gd线 / 24 (5)
[0081] Calculated on a monthly basis:
[0082] In formulas (5) and (6), Y gd线 is the daily active power consumption at the head end of the input line (kW·h); Y gm线 is the monthly active power consumption at the head end of the input line (kW·h); T L is the operating time of the line (hours).
[0083] c. Obtain the optimized layout scheme of all compensation points in the entire network:
[0084] In the present invention, the compensation points are only arranged on the main lines. Assume that the total number of nodes in the entire network with this topological structure is n, and the number of compensation points is m. Based on the third calculation rule, all kinds of optimized layout schemes of compensation points are obtained.
[0085] Refer to Figure 1 , Figure 1 shows the impedance formula of a certain section of wire line i: Impedance = Ri + jXi, where Ri represents the resistance of this section of wire line i, Xi represents the reactance of this section of wire line i, and j represents a complex number. The power flow of this section of wire line i is expressed as Si, Si = Pi + j(Qi - Qic), where Pi represents the active power of this section of wire line i, Qi represents the reactive power, and Qic represents all compensation capacities of this section of line and the lines carried by this section.
[0086] The specific third calculation rule of step c is as follows:
[0087] Based on the total number of nodes in the entire network being n, define the following matrix A and matrix Qc_matrix:
[0088] Matrix A is an n×n matrix, and the determinant of matrix A is expressed as follows:
[0089]
[0090] Each element value in matrix A of formula (7) is either 1 or 0;
[0091] The set of main diagonal elements in matrix A is represented as {A 11 , A 22 , …, A xk , …, A nn}, where x = k. This set has n elements. When the value of A xk is 1, it means there is compensation at the end of the corresponding wire x. When the value of A xk is 0, it means there is no compensation at the end of the corresponding wire x;
[0092] The non - main diagonal element at the x - th row and y - th column in matrix A is represented as A xy , where x ≠ y. When the value of A xy is 1, it means wire y is the wire connected to the end of wire x and there is compensation at the end of wire y. When the value of A xy is 0, it means wire y is not connected to wire x or there is no compensation at the end of wire y;
[0093] Matrix Qc_matrix is a matrix with n rows and 1 column. The determinant of matrix Qc_matrix is expressed as follows:
[0094]
[0095] In the matrix Qc_ matrix of formula (8), Q xc correspondingly represents all the compensation capacities of wire x and the lines it carries, that is, the compensation capacity at the end of wire x;
[0096]
[0097] Let the system of equations (10):
[0098]
[0099] Solve the equation (10) using the Gauss elimination method: Use elementary row operations to transform the augmented matrix into a row echelon form, and then back - substitute to find the solution of the equation. In formula (10), Qc is the total reactive power compensation capacity required for the whole network (kVar); λ and Q cy are the parameters to be solved; C ky and B k are intermediate parameters, which are obtained through the following formulas (11) and (12) respectively:
[0100]
[0101] In formulas (11) and (12), R x is the resistance of wire x (Ω); V N is the average voltage at the beginning of the line (KV); Qx is the reactive power (KVar) of wire x,
[0102] From the above steps, it can be seen that equation (10) has a total of n + 1 expressions; there are unknowns Q c1 , Q c2 , …, Q cn and λ, a total of n + 1; if the calculated Q xc is negative, then all elements in the x-th row and y-th column of matrix A are set to 0. For example, if Q 1c is negative, then all elements in the 1st row and 1st column of matrix A are set to 0; if multiple Q xc are negative, then all corresponding multiple rows and multiple columns of elements in matrix A are set to 0. For example, if Q 1c and Q 2c are negative, then all elements in the 1st and 2nd rows and 1st and 2nd columns of matrix A are set to 0.
[0103] d. Calculate the difference between the losses before optimization and after optimization:
[0104] For each optimized compensation point layout scheme obtained in step c, based on the fourth calculation rule, calculate the loss ΔP1 before optimization and the loss ΔP2 after optimization respectively, and calculate the difference between the losses before and after optimization, ΔP1 - ΔP2.
[0105] The fourth calculation rule is as follows:
[0106] Calculate the losses of the whole network before and after optimization respectively through formula (13) and formula (14):
[0107] Loss before optimization ΔP1:
[0108] Loss after optimization ΔP2:
[0109] In formula (13)(14), P x represents the active power flow of wire x; Q x represents the reactive power of wire x; Q xc represents all compensation capacities of wire x and the lines it carries; R x is the resistance of wire x; n represents the total number of nodes in the whole network; V N is the average voltage at the beginning of the line;
[0110] The difference between the losses before and after optimization is ΔP1 - ΔP2.
[0111] e. Calculate the payback period:
[0112] For each optimized compensation point layout scheme obtained in step c, calculate the payback period based on the fifth calculation rule.
[0113] The fifth calculation rule is as follows: Calculate the investment recovery period through formula (15):
[0114]
[0115] In formula (15), T 年限 represents the investment recovery period; K b is the unit comprehensive investment of the compensation device (yuan / kVar); B is the price of unit active power (yuan / kW·h); T is the annual operating hours of the compensation device; Qc is the total reactive power compensation capacity of the whole network (kVar), and * represents the multiplication operation.
[0116] f. Obtain the optimal optimization plan:
[0117] Based on the calculation results in step d, select the plan with the largest difference in losses before and after optimization, denoted as Plan A; based on the calculation results in step e, select the plan with the smallest investment recovery period, denoted as Plan B; Plan A and Plan B are the optimal compensation point layout optimization plans.
[0118] In the reactive power optimization calculation system of this embodiment, it includes: a user input module, a topological structure power grid information data acquisition module, a first calculation module, a second calculation module, a third calculation module, a fourth calculation module, a fifth calculation module, a first screening module, a second screening module, and an optimization result output module.
[0119] The user input module is used to display an optimization target data input interface for the user to input relevant optimization target data, and the optimization target data is the power factor of the optimization target or the total reactive power compensation capacity of the whole network.
[0120] The topological structure power grid information data acquisition module obtains topological structure power grid information data through external data input or import. The topological structure power grid information data includes a topological structure power grid diagram, electricity sales data in the topological structure power grid, the total number of nodes in the whole network, and the positions where compensation devices are set (the compensation devices have been set in the power grid, and their working states are manually operated. Specifically, which compensation device needs to be used as a compensation point is determined by an optimization algorithm).
[0121] The first calculation module is used to calculate the power flow of each branch line in the topological structure power grid based on the electricity sales data according to the first calculation rule.
[0122] The second calculation module is used to calculate the total reactive power compensation capacity of the whole network based on the power factor of the optimization target when the optimization target data input by the user is the power factor of the optimization target.
[0123] The third calculation module is used to obtain all the optimized compensation point layout schemes according to the third calculation rule based on the total reactive power compensation capacity of the whole network, the topological structure power grid information data, and the power flow data calculated by the first calculation module.
[0124] The fourth calculation module is used to calculate the difference in losses before and after optimization for all the optimized compensation point layout schemes according to the fourth calculation rule.
[0125] The fifth calculation module is used to calculate the payback period of all the optimized compensation point layout schemes according to the fifth calculation rule.
[0126] The first screening module is used to sort the difference data of losses before and after optimization calculated by the fourth calculation module in terms of magnitude, and screen out the optimized compensation point layout scheme with the smallest difference in losses before and after optimization.
[0127] The second screening module is used to sort the payback period data of all the optimized compensation point layout schemes calculated by the fifth calculation module in terms of magnitude, and screen out the optimized compensation point layout scheme with the smallest payback period.
[0128] The optimization result output module outputs the screening results of the first screening module and the second screening module as two optimal compensation point layout optimization schemes. The optimization result output module can adopt conventional data visualization expression forms such as charts, graphs, and data lists. After the user obtains these two optimal compensation point layout optimization schemes, the user decides which one to finally adopt according to the actual needs.
[0129] The above embodiments are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A reactive power optimization algorithm for distribution networks based on topological structure, characterized in that, It includes the following steps: a. Calculate branch power flow: Obtain the daily or monthly electricity sales volume of the transformers in each branch line, and calculate the power flow of each branch line in the power grid with this topological structure based on the first calculation rule; The specific content of the first calculation rule is as follows: In step a1, calculate the active power flow of each transformer in the branch line through formula (1) or formula (2): Calculated on a daily basis: P b = F qx Y gd变 (1) Calculated monthly: In Formulas (1) and (2), P b represents the active power flow; F qx is the coefficient of the maximum load; Y gd变 is the daily electricity sales volume (kW·h) input by the transformer; Y gm变 is the monthly electricity sales volume (kW·h) input by the transformer; T L is the operation time (hours) of the line; T b is the outage time (hours) of the transformer; In step a2, calculate the power flow of the branch line through formula (3): In formula (3), S a represents the power flow of this section of the branch line; P a represents the active power; j represents the complex number, j 2 = -1; Q a represents the reactive power; d represents the number of transformers in this section of the branch line; P bi is the active power flow of the i-th transformer in this section of the branch line; b. Determine the total reactive power compensation capacity of the whole network; Specifically, to determine the total reactive power compensation capacity required for the whole network: Based on the power factor of the optimization target, calculate the total reactive power compensation capacity required for the whole network according to the second calculation rule; The second calculation rule is to determine the total reactive power compensation capacity required for the whole network according to formula (4): In formula (4), Qc is the total reactive power compensation capacity required for the entire network (kVar); is the power factor of the current actual situation; is the power factor of the optimization target; P av is the average active power on the day of maximum load (kW); The above-mentioned average active power P on the maximum load day av is calculated through formula (5) or formula (6): Calculated on a daily basis: P av = Y gd线 / 24 (5) Calculated monthly: In Formulas (5) and (6), Y gd线 is the daily active power consumption (kW·h) at the head end of the input line; Y gm线 is the monthly active power consumption (kW·h) at the head end of the input line; T L is the operating time (hours) of the line. c. Obtain all the optimized compensation point layout schemes for the entire network: Assume that the total number of nodes in the power grid with this topological structure is n, and the number of compensation points is m. Obtain all kinds of optimized compensation point layout schemes based on the third calculation rule; The compensation points are only arranged on the main lines, and the specific content of the third calculation rule is as follows: Based on the total number of nodes in the whole network being n, define the following matrix A and matrix Qc_matrix: Matrix A is an n×n matrix, and the determinant of matrix A is expressed as follows: The value of each element in matrix A is 1 or 0; The set of the main diagonal elements in matrix A is represented as {A 11 , A 22 , …, A xk , …, A nn}, where x = k, and there are n elements in this set. When the value of A xk is 1, it means there is compensation at the end of the corresponding wire x. When the value of A xk is 0, it means there is no compensation at the end of the corresponding wire x; The non - diagonal elements of any \(x\) - th row and \(y\) - th column in matrix \(A\) are denoted as \(A\) xy , where \(x\neq y\). When \(A\) xy has a value of 1, it means that wire \(y\) is the wire connected to the end of wire \(x\) and there is compensation at the end of wire \(y\). When \(A\) xy has a value of 0, it means that wire \(y\) is not connected to wire \(x\) or there is no compensation at the end of wire \(y\); Matrix Qc_matrix is an n×1 matrix, and the determinant of matrix Qc_matrix is expressed as follows: Q in the matrix Qc_matrix xc Correspondingly, it represents all the compensation capacities of the wire x and the lines carried by this section, that is, the compensation capacity at the end of the wire x; Set up the following equation group (10): In formula (10), Qc is the total reactive power compensation capacity required for the entire network (kVar); λ and Q cy are parameters to be determined; C ky and B k are intermediate parameters, which are obtained through the following formulas (11) and (12) respectively: In formulas (11) and (12), R x is the resistance (Ω) of conductor x; V N is the average voltage (KV) at the line head; Q x is the reactive power (KVar) of conductor x, From the above steps, it can be seen that equation (10) has a total of n + 1 expressions; there are unknowns Q c1 , Q c2 , …, Q cn and λ, a total of n + 1; if the calculated Q xc is negative, then all elements in the x-th row and y-th column of matrix A are set to 0; if multiple Q xc are negative, then all elements in the corresponding multiple rows and multiple columns of matrix A are set to 0; d. Calculate the difference between the losses before optimization and after optimization: For each compensation point layout optimization plan obtained in step c, based on the fourth calculation rule, calculate the loss △P1 before optimization and the loss △P2 after optimization respectively, and calculate the difference △P1 - △P2 between the losses before and after optimization; The specific content of the fourth calculation rule is as follows: Calculate the losses of the whole network before and after optimization through formula (13) and formula (14) respectively: Loss before optimization ΔP1: Optimized loss ΔP2: In Formulas (13) and (14), P x represents the active power flow of conductor x; Q x represents the reactive power of conductor x; Q xc represents all compensation capacities of conductor x and the lines carried by this section; R x is the resistance of conductor x; n represents the total number of nodes in the whole network; V N is the average voltage at the head of the line; the difference in losses before and after optimization is △P1 - △P2; e. Calculate the payback period: For each compensation point layout optimization plan obtained in step c, calculate the payback period based on the fifth calculation rule; The specific content of the fifth calculation rule is as follows: Calculate the payback period through formula (15): In formula (15), T 年限 represents the payback period of investment; K b is the unit comprehensive investment of the compensation device (yuan / kVar); B is the price of unit active power (yuan / kW·h); T is the annual operating hours of the compensation device; Q c is the total reactive power compensation capacity of the whole network (kVar), and * represents the multiplication operation; f. Obtain the optimal optimization plan: Based on the calculation results in step d, screen out the plan with the largest difference between the losses before and after optimization, denoted as plan A; Based on the calculation results in step e, screen out the plan with the smallest payback period, denoted as plan B; The plan A and the plan B are the optimal compensation point layout optimization plans.
2. A reactive power optimization calculation system for a distribution network, which is used to implement the reactive power optimization algorithm for a distribution network based on the topological structure as described in Claim 1, and is characterized in that, It includes: User input module, topological structure power grid information data acquisition module, first calculation module, second calculation module, third calculation module, fourth calculation module, fifth calculation module, first screening module, second screening module, optimization result output module, The user input module is used to display an optimization target data input interface for the user to input relevant optimization target data, and the optimization target data is the power factor of the optimization target or the total reactive power compensation capacity of the whole network; The topological structure power grid information data acquisition module obtains topological structure power grid information data through external data input or import. The topological structure power grid information data includes a topological structure power grid diagram, electricity sales volume data in the topological structure power grid, the total number of nodes in the whole network, and the positions where compensation devices are set; The first calculation module is used to calculate the power flow of each branch line in the topological structure power grid based on the electricity sales data according to the first calculation rule; The second calculation module is used to calculate the total reactive power compensation capacity of the whole network based on the power factor of the optimization target according to the second calculation rule when the user inputs the power factor of the optimization target; The third calculation module is used to obtain all compensation point layout optimization schemes according to the third calculation rule based on the total reactive power compensation capacity of the whole network, the topological structure power grid information data, and the power flow data calculated by the first calculation module; The fourth calculation module is used to calculate the difference in losses before and after optimization of all the compensation point layout optimization schemes according to the fourth calculation rule; The fifth calculation module is used to calculate the payback period of all the compensation point layout optimization schemes according to the fifth calculation rule; The first screening module is used to sort the difference data of losses before and after optimization calculated by the fourth calculation module in terms of size, and screen out the compensation point layout optimization scheme with the smallest difference in losses before and after optimization; The second screening module is used to sort the payback period data of all the compensation point layout optimization schemes calculated by the fifth calculation module in terms of size, and screen out the compensation point layout optimization scheme with the smallest payback period; The optimization result output module outputs the screening results of the first screening module and the second screening module as two optimal compensation point layout optimization schemes.