Power flow calculation method and device for power distribution network, terminal and medium

Through the undirected graph model and leaf node recursive pruning logic to optimize the trend calculation sequence, the problem of low computing efficiency in traditional methods in large-scale distribution networks is solved, and more efficient trend calculation and fast response capabilities are achieved.

CN119134355APending Publication Date: 2024-12-13GUANGZHOU SHUIMU QINGHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411344314.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The traditional forward-back-generation trend computing method is inefficient in large-scale distribution networks and is susceptible to topological changes, resulting in insufficient real-time response capabilities of trend computing.

Method used

The undirected graph model and leaf node recursive pruning logic are adopted, and the calculation sequence is determined through the combination of forward calculation and backward calculation, the trend calculation process is optimized, and the solution efficiency is improved.

Benefits of technology

It significantly improves the efficiency of trend computing, can respond quickly when the distribution network topology changes, and reduces computing resources and time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119134355A_ABST
    Figure CN119134355A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution network load flow calculation method and device, a terminal and a medium, and the method comprises the steps: constructing a corresponding undirected graph model based on a target power distribution network through the combination of a leaf node recursive pruning logic and a power distribution network forward-backward substitution load flow calculation logic, and calculating the load flow of the target power distribution network according to leaf nodes in the undirected graph model; according to the edge connection relationship of each leaf node, obtaining a leaf node adjacent edge set; according to the leaf node adjacent edge set, respectively calculating a tide power value of each connecting edge in the leaf node adjacent edge set, and according to a forward calculation sequence, updating leaf nodes and the leaf node adjacent edge set in the undirected graph model to calculate the tide power value of each connecting edge in each set, so as to complete forward calculation and then perform back substitution calculation; according to the scheme, the front step for determining the calculation sequence in the forward-backward substitution logic is completed by utilizing the inherent attributes of the leaf nodes, and the front step and the forward calculation can be realized at the same time, so that the solving efficiency of the load flow calculation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power flow calculation, and in particular to a method, device, terminal and medium for calculating power flow in a distribution network. Background Art

[0002] In the context of the new power system, the dynamics and flexibility of the distribution network have become its prominent features. The access of distributed energy, the charging demand of electric vehicles, and the application of smart grid technology have jointly led to frequent changes in the topology of the distribution network.

[0003] Faced with these characteristics of the new power system, the traditional forward-backward method of power flow calculation has exposed obvious limitations. The traditional forward-backward method of power flow calculation requires two methods to determine the order of power flow calculation, namely network layering or network search. The computational complexity of this pre-step increases rapidly with the increase of nodes and branches, which leads to a decrease in the computational efficiency of the above method in large-scale distribution networks. Moreover, in the scenario of dynamic distribution networks, each topology change means that these pre-steps must be re-executed, which will consume valuable computing resources and time, limiting the real-time response capability of power flow calculation. Summary of the invention

[0004] The present application provides a distribution network power flow calculation method, device, terminal and medium, which are used to solve the technical problem that the existing forward-backward power flow calculation method is easily affected by the changes in the distribution network topology, resulting in low real-time response capability of power flow calculation.

[0005] In order to solve the above technical problems, the first aspect of the present application provides a method for calculating power flow in a distribution network, comprising:

[0006] According to the target distribution network for which power flow calculation is required, an undirected graph model of the target distribution network is constructed;

[0007] According to the leaf nodes in the undirected graph model, traverse the edge relationship of each leaf node in the undirected graph model according to the leaf node recursive pruning logic to obtain a leaf node adjacent edge set;

[0008] According to the leaf node adjacent edge set, respectively calculate the power flow value of each edge in the leaf node adjacent edge set, update the leaf nodes and the leaf node adjacent edge set in the undirected graph model in a forward calculation order, and calculate the power flow value of each edge in the leaf node adjacent edge set;

[0009] After the forward calculation is completed, the node voltage value and voltage phase angle of each node in each leaf node adjacent edge set are calculated according to the leaf node adjacent edge set in a back-alternation calculation order to obtain the power flow calculation result of the target distribution network.

[0010] Preferably, the step of traversing the connection relationship between each leaf node and its neighboring nodes in the undirected graph model according to the leaf node recursive pruning logic according to the leaf nodes included in the undirected graph model to obtain the leaf node neighbor edge set specifically includes:

[0011] According to the leaf nodes in the undirected graph model, and in accordance with the node connection relationship in the undirected graph model, determining a unique neighbor node corresponding to each leaf node;

[0012] Extract the edge information between each leaf node and its unique neighbor node to obtain a leaf node neighbor edge set.

[0013] Preferably, updating the leaf nodes and leaf node adjacent edge sets in the undirected graph model in the forward calculation order specifically includes:

[0014] According to the forward calculation order, the current leaf node is removed from the undirected graph model, and the undirected graph model is updated;

[0015] According to the updated undirected graph model, the leaf nodes in the undirected graph model are determined, and the edge relationship between each leaf node and its unique neighbor node is extracted to obtain a new leaf node neighbor edge set.

[0016] Preferably, the calculating, according to the leaf node adjacent edge set, the power flow value of each edge in the leaf node adjacent edge set comprises:

[0017] According to any edge in the adjacent edge set of the leaf node, the power loss of the edge is calculated in combination with a preset power loss calculation formula;

[0018] The power flow power value of the edge is calculated based on the power loss and the complex power of the nodes at both ends of the edge in combination with a preset edge power flow calculation formula.

[0019] Preferably, the step of calculating the node voltage value and the voltage phase angle of each node in the leaf node adjacent edge set according to the leaf node adjacent edge set and in a back-substitution calculation order specifically includes:

[0020] According to the leaf node adjacent edge set, in a back-substitution calculation order, respectively calculate the longitudinal component and the transverse component of the voltage drop of each connecting edge in the leaf node adjacent edge set;

[0021] Calculate the node voltage of the terminal node of each connecting edge according to the longitudinal component and the transverse component of each connecting edge in combination with a preset voltage node calculation formula;

[0022] The voltage phase angles are calculated according to the node voltage and the longitudinal component and the transverse component of the connecting edge.

[0023] Preferably, before respectively calculating each voltage phase angle according to the node voltage and the longitudinal component and the transverse component of the connecting edge, the method further includes:

[0024] According to the error of the node voltage obtained from two adjacent iterations, when the error of the node voltage is not less than a preset convergence threshold, the forward and backward calculation loop iteration is continued according to the adjacent edge sets of each leaf node until the error of the node voltage is less than the preset convergence threshold, and then the loop iteration is exited and each voltage phase angle is calculated respectively according to the node voltage and the longitudinal component and the transverse component of the connecting edge.

[0025] Preferably, when there is a PV power generation device node in the target power distribution network, the step of obtaining the leaf node adjacent edge set further includes:

[0026] When the error between the actual voltage and the rated voltage of the PV power generation equipment node is less than a preset convergence threshold, constructing a reactance matrix according to the adjacent edge set of the leaf node;

[0027] The reactive power correction amount of the PV power generation device node is solved according to the reactance matrix, so as to perform reactive power correction on the PV power generation device node according to the reactive power correction amount.

[0028] At the same time, the second aspect of the present application provides a distribution network power flow calculation device, including:

[0029] An undirected graph construction unit, configured to construct an undirected graph model of a target distribution network for which power flow calculation is required;

[0030] A leaf node adjacent edge set acquisition unit is used to traverse the edge relationship of each leaf node in the undirected graph model according to the leaf node recursive pruning logic, and obtain the leaf node adjacent edge set;

[0031] A forward calculation unit, used to calculate the power flow value of each edge in the leaf node adjacent edge set according to the leaf node adjacent edge set, update the leaf nodes and leaf node adjacent edge sets in the undirected graph model in a forward calculation order, and calculate the power flow value of each edge in the leaf node adjacent edge set;

[0032] The back-alternative calculation unit is used to calculate the node voltage value and voltage phase angle of each node in each leaf node adjacent edge set according to the leaf node adjacent edge set and the back-alternative calculation order after the forward calculation is completed, so as to obtain the power flow calculation result of the target distribution network.

[0033] A third aspect of the present application provides a distribution network power flow calculation terminal, including: a memory and a processor;

[0034] The memory is used to store program codes, and the program codes correspond to a distribution network power flow calculation method provided in the first aspect of the present application;

[0035] The processor is used for reading and executing the program code.

[0036] The fourth aspect of the present application provides a computer-readable storage medium, in which a program code is stored. When the program code is used to be read and executed by a processor, a distribution network flow calculation method as provided in the first aspect of the present application is implemented.

[0037] It can be seen from the above technical solutions that this application has the following advantages:

[0038] The solution provided by the present application combines the leaf node recursive pruning logic with the forward and backward flow calculation logic of the distribution network. First, based on the target distribution network, a corresponding undirected graph model is constructed. According to the leaf nodes in the undirected graph model, the edge relationship of each leaf node in the undirected graph model is traversed according to the leaf node recursive pruning logic to obtain the leaf node adjacent edge set; according to the leaf node adjacent edge set, the flow power value of each edge in the leaf node adjacent edge set is calculated respectively, and the leaf nodes and leaf node adjacent edge sets in the undirected graph model are updated in the forward calculation order to calculate the flow power value of each edge in each set, and the forward calculation is completed and then the backward calculation is performed to obtain the flow calculation result of the target distribution network. This solution uses the inherent properties of the leaf nodes to complete the pre-step of determining the calculation order in the forward and backward flow calculation logic, and the sorting process is consistent with the forward calculation, and can simultaneously implement the pre-step and the forward calculation, thereby improving the efficiency of solving the flow calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for calculating power flow in a distribution network provided in the present application.

[0041] Figure 2 A schematic diagram of the overall process of an embodiment of a distribution network power flow calculation method provided in this application.

[0042] Figure 3 This is the IEEE33 node standard network topology diagram.

[0043] Figure 4This is the IEEE69 node network topology diagram.

[0044] Figure 5 This is a 303-node network topology diagram.

[0045] Figure 6 A schematic diagram comparing the solution time of a distribution network power flow calculation method provided in this application with other algorithms.

[0046] Figure 7 A schematic diagram of the structure of an embodiment of a power distribution network flow calculation device provided in the present application.

[0047] Figure 8 A schematic diagram of the structure of a power distribution network flow calculation terminal embodiment provided in the present application. DETAILED DESCRIPTION

[0048] The embodiments of the present application provide a distribution network power flow calculation method, device, terminal and medium, which are used to solve the technical problem that the existing forward-backward power flow calculation method is easily affected by the changes in the distribution network topology and leads to low real-time response capability of power flow calculation.

[0049] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] First, a detailed description of an embodiment of a distribution network power flow calculation method provided by the present application is as follows:

[0051] See also Figure 1 , a distribution network power flow calculation method provided in this embodiment includes:

[0052] Step 101: construct an undirected graph model of a target distribution network according to a target distribution network for which power flow calculation is required;

[0053] It should be noted that, according to the target distribution network that needs to perform power flow calculation, the power sources and loads in the target distribution network are abstracted as nodes V of the graph, and the lines between the loads are abstracted as edges E of the graph, so as to construct an undirected graph model G(V,E).

[0054] Step 102: According to the leaf nodes in the undirected graph model, the edge relationship of each leaf node in the undirected graph model is traversed according to the leaf node recursive pruning logic to obtain a set of adjacent edges of the leaf nodes;

[0055] Step 103: According to the leaf node adjacent edge set, respectively calculate the power flow value of each edge in the leaf node adjacent edge set, update the leaf nodes and the leaf node adjacent edge set in the undirected graph model in the forward calculation order, and calculate the power flow value of each edge in the leaf node adjacent edge set;

[0056] It should be noted that a leaf node is a node in a tree or graph that has no child nodes (or child edges). In a tree structure, leaf nodes are those nodes that have no child nodes, while in a graph, leaf nodes are nodes that have no child edges. Leaf nodes are often called terminal nodes because they are the ends of branches.

[0057] Get all leaf nodes from G. That is, except for the power source (root node), the load node with degree 1 can be recorded as V l ={v l,1 , v l,2 , …, v l,i}, through the leaf node v l,i and its only neighbor v n,i , determine its corresponding adjacent edge e l,j =(v n,i , v l,i ), and record the adjacent edges of all leaf nodes into set E l,1 ={e l,1 , e l,2 , …, e l,i}, that is, the set of adjacent edges of a leaf node, where an edge consists of two nodes, the first position is the starting point of the edge, represented by the symbol f, and the second position is the end point of the edge, represented by the symbol t.

[0058] Then, forward calculation is performed according to the obtained leaf node adjacent edge set, and based on the obtained leaf node adjacent edge set, the power flow value of each edge in the leaf node adjacent edge set is calculated respectively, that is, the power flowing through each edge;

[0059] Further, the steps for calculating the power flow value of each edge can be referred to in the following example:

[0060] Calculate E l,1 The loss of all edges in is calculated as follows:

[0061]

[0062] Where: for e l,i The loss, and e l,i The resistance and reactance of the t for e l,i The t position node. , and The nodes v t The active power, reactive power and voltage of the

[0063] Calculate the power flowing through the branch. The specific calculation formula is as follows:

[0064]

[0065] Where: for e l,i The power flowing through v t The complex power.

[0066] Add the power flowing through the branch to the first end f of the branch. The specific calculation formula is as follows:

[0067]

[0068] Where: v f for e l,i The f position node, v f The complex power.

[0069] Then, according to the forward calculation order, the leaf nodes are searched forward step by step, and the corresponding leaf node adjacent edge set is generated. At the same time, the power flow value of each edge in the leaf node adjacent edge set is calculated. For example, after the corresponding power flow value is calculated according to the current leaf node and the corresponding leaf node adjacent edge set, the leaf node V in G is eliminated. l , update the undirected graph model, then re-determine the new leaf node based on the updated undirected graph model, and generate the corresponding leaf node adjacent edge set, and so on. Assuming that the maximum level from the leaf node to the root node of the original undirected graph model is m, then m leaf node adjacent edge sets E can be obtained in sequence. l,1 , E l,2 , …, E l,m For the remaining leaf node adjacent edge sets, follow the above steps to solve the power flowing through each edge in each set, and the forward calculation is completed.

[0070] Step 104, after the forward calculation is completed, according to the leaf node neighbor edge set, in accordance with the back-alternation calculation order, the node voltage value and voltage phase angle of each node in each leaf node neighbor edge set are calculated respectively to obtain the power flow calculation result of the target distribution network.

[0071] It should be noted that, next, the power flowing through the edge is obtained by using the leaf node adjacent edge set and forward calculation to complete the back-substitution calculation in the forward back-substitution power flow calculation. The order of the back-substitution calculation is opposite to that of the forward calculation. l,m Start. Calculate El,m The longitudinal and transverse components of the voltage drop on all sides of the , the specific calculation formula is as follows:

[0072]

[0073] Where: and e l,i The longitudinal component of the voltage drop and the transverse component of the voltage drop.

[0074] According to the longitudinal and transverse components of the voltage drop, v is solved. t The voltage is as follows:

[0075]

[0076] judge Whether the constraint conditions are met, if not, they will be corrected. The specific formula is as follows:

[0077]

[0078]

[0079] Where: and They are v t The lower and upper voltage limits.

[0080] For the remaining leaf node adjacent edge sets, follow the above steps to solve the voltage of each node, thus completing the back-substitution calculation.

[0081] Next, the voltage phase angle solution in the forward back-substitution power flow calculation is completed by using the leaf node adjacent edge set and the result of the back-substitution calculation. The voltage phase angle solution is in the same order as the back-substitution calculation. Therefore, it is also necessary to start from E l,m Start. Calculate E l,m The phase angle difference Δθ of all edges in is calculated as follows:

[0082]

[0083] Calculate v based on Δθ t The specific formula is as follows:

[0084]

[0085] Where: v f The phase angle, v t The phase angle.

[0086] For the remaining leaf node adjacent edge sets, follow the above steps to solve the phase angle of each node, thus completing the voltage phase angle solution.

[0087] On the basis of the above steps, further, when there is a PV power generation equipment node in the target distribution network, after obtaining the leaf node adjacent edge set, the following steps are further included:

[0088] When the error between the actual voltage and the rated voltage of the PV power generation equipment node is less than the preset convergence threshold, the reactance matrix is ​​constructed according to the adjacent edge set of the leaf node;

[0089] According to the reactance matrix, the reactive power correction amount of the PV power generation device node is solved to perform reactive power correction on the PV power generation device node according to the reactive power correction amount.

[0090] It should be noted that if there are PV-type generators in the distribution network, the reactance matrix X is solved, otherwise it is not necessary to solve X.

[0091] Solve for the main diagonal elements of X. The specific steps are as follows:

[0092] Determine the corresponding node of the PV type generator in G, denoted as V pv ={v pv,1 , v pv,2 , …, v pv,k}.

[0093] Then, find v in all leaf node neighbor edge sets pv,k The edge at position t is denoted by e pv,1 , and e pv,1 The set of adjacent edges of the leaf node is denoted as E l,n .

[0094] Then, according to e pv,1 The node v at position f f , in E l,n+1 Find v f The edge at position t is denoted by e pv,2 .

[0095] Then, repeat the above process until the leaf node adjacent edge set is E l,m , we can get v pv,k To the power node v s The path is recorded as E pv,k ={ e pv,1 , e pv,2 , …, e pv,j}.

[0096] Finally, according to E pv,k Calculate the kth main diagonal element x kkThe specific formula is as follows:

[0097]

[0098] Where: x e is the reactance of edge e.

[0099] Solve for the non-main diagonal elements of X. Since X is a symmetric matrix, we only need to solve the lower triangular part. The details are as follows:

[0100]

[0101] Where: is the k1-row and k2-column element of X. and They are and to v s Path.

[0102] Solve for V using X pv The reactive power correction value ΔQ is calculated, otherwise no solution is performed. The specific formula is as follows:

[0103]

[0104] Where: U pv V pv Voltage, U N,pv V pv Rated voltage. is the hadamard product.

[0105] Correct V according to ΔQ pv The specific formula is as follows:

[0106]

[0107] Where: Q pv,k v pv,k Reactive power, ΔQ pv,k v pv,k The reactive power correction amount.

[0108] Judge Q pv,k Whether the constraint conditions are met, if not, they will be corrected. The specific formula is as follows:

[0109]

[0110] Where: Q min,pv,k and Q max,pv,k They are v pv,k The lower and upper limits of reactive power.

[0111] When there is a v that does not satisfy the constraints pv,k , it can be removed and converted into PQ type.

[0112] The above is a detailed description of the embodiment process of a distribution network flow calculation method provided by this application. The following is a detailed description of a verification example provided based on the above distribution network flow calculation method, which is as follows:

[0113] Based on the preset initialization parameter settings, specifically including: setting the initial voltage of all nodes to the rated voltage, the upper and lower limits of the voltage of each node, v s The phase angle is 0, the number of iterations is 0, and the convergence threshold is ε. If there is a PV type generator, set V pv The reactive power is 0.

[0114] According to steps 103 and 104, a forward-backward power flow calculation is completed to obtain the node voltage U solved for the first time. 1 If there is a PV type generator, determine whether the following conditions are met:

[0115]

[0116] Where: is the maximum norm.

[0117] If it satisfies, there is no need to correct Q pv,k , proceed to the next step. Otherwise, according to U 1 Solve ΔQ with S7 and correct Q pv,k And return to the previous step, complete the forward-backward power flow calculation again, and obtain the node voltage U for the next solution K+1 .

[0118] Determine whether the voltage converges, as shown below:

[0119]

[0120] Where: U K is the voltage calculated for the Kth time.

[0121] If the conditions are met, it means that the power flow has converged and the iterative calculation ends. Otherwise, it returns to the first step and iterates again until the conditions are met.

[0122] According to the final result after the power flow converges, the voltage phase angle is further solved.

[0123] More specifically, see Figure 2 ,by Figure 3Taking the network topology as an example, the distribution network model is constructed. The power source and load are abstracted as the nodes V of the graph, and the lines between the loads are abstracted as the edges E of the graph. An undirected graph model G(V,E) is constructed. The specific parameters are shown in Table 1 below.

[0124] Table 1 IEEE33 node parameters

[0125]

[0126] 2) Initialization settings:

[0127] Set the initial voltage of all nodes to the rated voltage of 12.66kV, and the upper and lower limits of the voltage of each node, v s The phase angle is 0, the number of iterations is 0, and the convergence threshold is ε. Assume that 10, 18, 20, 24, and 30 have PV type generators, V pv ={v 10 , v 18 ,v 20 , v 24 , v 30}, and set V pv The reactive power is 0.

[0128] 3) Determine whether there is a leaf node adjacent edge set. If not, execute 4). Otherwise, execute 5).

[0129] 4) Based on the constructed model, the leaf node neighbor edge set is determined based on the leaf node recursive pruning method:

[0130] 4.1) Get all leaf nodes from G. That is, nodes with degree 1 except the power source, denoted as V l ={v 18 , v 22 ,v 25 , v 33}.

[0131] 4.2) Through the leaf node v l,i and its only neighbor v n,i , determine its corresponding adjacent edge e l,j =(v n,i , v l,i ), as shown below:

[0132]

[0133] And record the adjacent edges of all leaf nodes into set E l,1 ={e 17 , e 21 , e 24 , e 32}, where the edge consists of two nodes, the first position is the starting point of the edge, represented by the symbol f, and the second position is the end point of the edge, represented by the symbol t. l,1 The power flowing through the edge is solved as follows:

[0134]

[0135]

[0136] 4.3) Delete the leaf node V in G l .

[0137] 4.4) Repeat steps 4.1) to 4.3) to get the m leaf node neighbor edge sets E l,1 , E l,2 , …, E l,m , where m=17, as shown below:

[0138]

[0139] 5) Use the leaf node adjacent edge set to complete the forward calculation:

[0140] 5.1) Calculation of E l,1 The loss of all edges in is calculated as follows:

[0141]

[0142] 5.2) Calculate the power flowing through the branch. The specific calculation formula is as follows:

[0143]

[0144] 5.3) Add the power flowing through the branch to the first end f of the branch. The specific calculation formula is as follows:

[0145]

[0146] 5.4) For the remaining leaf node adjacent edge sets, follow the above steps to solve the power flowing through each edge, thus completing the forward calculation.

[0147] 6) Use the leaf node adjacent edge set to complete the back-substitution calculation:

[0148] 6.1) Use the leaf node adjacent edge set and forward calculation to obtain the power flowing through the edge and complete the back-substitution calculation in the forward back-substitution power flow calculation. The order of back-substitution calculation is exactly the opposite of the forward calculation. Therefore, it is necessary to l,m Start. Calculate E l,m The longitudinal and transverse components of the voltage drop on all sides of the , the specific calculation formula is as follows:

[0149]

[0150] 6.2) Solve for v based on the longitudinal and transverse components of the voltage drop t The voltage is as follows:

[0151]

[0152] 6.3) Judgment Whether the constraint conditions are met, if not, they will be corrected. The specific formula is as follows:

[0153]

[0154]

[0155] 6.4) For the remaining leaf node adjacent edge sets, follow the above steps to solve the voltage of each node, that is, complete the back-substitution calculation and get U K+1 .

[0156] 7) Determine whether there is a PV type generator, if yes, execute 8), otherwise 12)

[0157] 8) Determine whether the following conditions are met:

[0158]

[0159] If it satisfies, there is no need to correct Q pv,k , execute 12). Otherwise, execute 9).

[0160] 9) Determine whether there is X. If not, execute 10). Otherwise, execute 11).

[0161] 10) Based on the leaf node adjacent edge set obtained above, solve the reactance matrix:

[0162] 10.1) Solve for the main diagonal elements of X. Determine the corresponding node in G for the PV type generator, denoted by V pv ={v 10 , v 18 , v 20 , v 24 , v 30}, where k=5.

[0163] 10.2) Find v in the set of all leaf node neighbor edges pv,k The edge at position t is denoted by e pv,1 , and e pv,1 The set of adjacent edges of the leaf node is denoted as E l,n The details are as follows:

[0164] v pv,1 = v 10 , e pv,1 = e9,E l,n = E l,9

[0165] 10.3) According to e pv,1 The node v at position f f = v9, in E l,n+1 = E l,10 Find v f The edge e8 at position t is denoted as e pv,2 .

[0166] 10.4) Repeat the above process until the adjacent edge set of the leaf node is E l,m , we can get v pv,k To the power node v s The path is recorded as E pv,k ={ e pv,1 , e pv,2 , …, e pv,j}, as shown below:

[0167]

[0168] 10.5) According to E pv,k Calculate the kth main diagonal element x kk The specific formula is as follows:

[0169]

[0170] 10.6) Solve for the non-main diagonal elements of X. Since X is a symmetric matrix, we only need to solve the lower triangular part. The details are as follows:

[0171]

[0172] 10.7) The resulting reactance matrix is ​​shown below:

[0173]

[0174] 11) Use the reactance matrix to solve the reactive power correction of the PV type generator. The specific formula is as follows:

[0175]

[0176] 11.1) Correct V according to ΔQ pv The specific formula is as follows:

[0177]

[0178] 11.2) Determine Q pv,k Whether the constraint conditions are met, if not, they will be corrected. The specific formula is as follows:

[0179]

[0180] 11.3) When there is a v that does not satisfy the constraints pv,k , then it needs to be removed and converted into PQ type.

[0181] 11.4) Return to step 5).

[0182] 12) Determine whether the voltage converges, as shown below:

[0183]

[0184] If the conditions are met, it means that the power flow has converged and the iterative calculation ends. Otherwise, return to 5) and iterate again until the conditions are met.

[0185] 13) According to the final result after the power flow converges, solve the voltage phase angle:

[0186] 13.1) Use the leaf node adjacent edge set and the result of the back-substitution calculation to complete the voltage phase angle solution in the forward back-substitution power flow calculation. The voltage phase angle solution is in the same order as the back-substitution calculation. Therefore, it is also necessary to start from E l,m Start. Calculate E l,m The phase angle difference Δθ of all edges in is calculated as follows:

[0187]

[0188] 13.2) Calculate v from Δθ t The specific formula is as follows:

[0189]

[0190] 13.3) For the remaining leaf node adjacent edge sets, follow the above steps to solve the phase angle of each node, thus completing the voltage phase angle solution.

[0191] In order to verify the effectiveness of the invention, this paper uses python3.8 to compile the algorithm in this paper for simulation test under the system environment: i5-12500 (processor) and 16G (running memory). The example used is: IEEE33 (such as Figure 3 As shown), IEEE69 (as Figure 4 ) and the real 303-node network (as shown Figure 5As shown). This paper uses the Networkx tool to establish an undirected graph model of IEEE33, IEEE69 and 303 node networks. Among them, the initial voltage value of IEEE33 and IEEE69 is 12.66kV, and the initial voltage value of 303 node is 10kV. In order to ensure the fairness of the comparison, this paper uses the established model to derive the adjacency matrix and pre-calculate the node-branch association matrix, which is used as the input of the network hierarchical method. Other data such as impedance, load, etc. are all saved in the same type. In order to avoid errors, 10 solutions are performed and the average is taken as the result. The convergence threshold ε is set to 10 -4 Since the algorithms are essentially the same, we only need to compare the speed of solving the voltage amplitude. Figure 6 As shown. Figure 6 It can be seen that the distribution network power flow calculation method proposed in this embodiment is significantly better than other methods in terms of computational efficiency. The solution efficiency of this method is significantly higher than that of traditional network hierarchical methods, and it is still improved to a certain extent compared with graph search methods. In particular, as the scale of network nodes increases, the calculation speed of this method is more obvious than other forward and backward methods.

[0192] The above is a detailed description of an embodiment of a distribution network power flow calculation method provided by the present application. The following is a detailed description of an embodiment of a distribution network power flow calculation device provided by the present application.

[0193] See also Figure 7 This embodiment provides a power distribution network flow calculation device, including:

[0194] An undirected graph construction unit 201 is used to construct an undirected graph model of a target distribution network according to a target distribution network for which power flow calculation is required;

[0195] The leaf node neighbor edge set acquisition unit 202 is used to traverse the edge relationship of each leaf node in the undirected graph model according to the leaf node recursive pruning logic to obtain the leaf node neighbor edge set;

[0196] A forward calculation unit 203 is used to calculate the power flow value of each edge in the leaf node adjacent edge set according to the leaf node adjacent edge set, update the leaf nodes and the leaf node adjacent edge set in the undirected graph model according to the forward calculation sequence, and calculate the power flow value of each edge in the leaf node adjacent edge set;

[0197] The back-alternative calculation unit 204 is used to calculate the node voltage value and voltage phase angle of each node in each leaf node adjacent edge set according to the leaf node adjacent edge set and the back-alternative calculation order after the forward calculation is completed, so as to obtain the power flow calculation result of the target distribution network.

[0198] like Figure 8As shown, the present application also provides a distribution network power flow calculation terminal, the terminal types include but are not limited to: personal computers, industrial computers, servers and embedded intelligent devices, the main components of the terminal include: a memory 33 and a processor 31, which can be connected via a communication bus 34;

[0199] The memory 33 is used to store program codes, and the program codes correspond to a method for calculating power flow in a distribution network as described in the above embodiment;

[0200] The processor 31 is used to read and execute program codes.

[0201] The present application also provides a computer-readable storage medium, in which program code is stored. When the program code is read and executed by a processor, a distribution network power flow calculation method provided in the above embodiment is implemented.

[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the terminals, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0203] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0204] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0205] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0206] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0207] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0208] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0209] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for calculating power flow in a distribution network. It is characterized in that include: According to the target distribution network for which power flow calculation is required, an undirected graph model of the target distribution network is constructed; According to the leaf nodes in the undirected graph model, traverse the edge relationship of each leaf node in the undirected graph model according to the leaf node recursive pruning logic to obtain a leaf node adjacent edge set; According to the leaf node adjacent edge set, respectively calculate the power flow value of each edge in the leaf node adjacent edge set, update the leaf nodes and the leaf node adjacent edge set in the undirected graph model in a forward calculation order, and calculate the power flow value of each edge in the leaf node adjacent edge set; After the forward calculation is completed, the node voltage value and voltage phase angle of each node in each leaf node adjacent edge set are calculated according to the leaf node adjacent edge set in a back-alternation calculation order to obtain the power flow calculation result of the target distribution network.

2. A method for calculating power flow in a distribution network according to claim 1, It is characterized in that According to the leaf nodes included in the undirected graph model, traversing the connection relationship between each leaf node and its neighboring nodes in the undirected graph model according to the leaf node recursive pruning logic to obtain the leaf node neighbor edge set specifically includes: According to the leaf nodes in the undirected graph model, and in accordance with the node connection relationship in the undirected graph model, determining a unique neighbor node corresponding to each leaf node; Extract the edge information between each leaf node and its unique neighbor node to obtain a leaf node neighbor edge set.

3. A method for calculating power flow in a distribution network according to claim 2, It is characterized in that The updating of the leaf nodes and the leaf node adjacent edge sets in the undirected graph model according to the forward calculation order specifically includes: According to the forward calculation order, the current leaf node is removed from the undirected graph model, and the undirected graph model is updated; According to the updated undirected graph model, the leaf nodes in the undirected graph model are determined, and the edge relationship between each leaf node and its unique neighbor node is extracted to obtain a new leaf node neighbor edge set.

4. A method for calculating power flow in a distribution network according to claim 1, It is characterized in that The calculating, according to the leaf node adjacent edge set, the power flow value of each edge in the leaf node adjacent edge set comprises: According to any edge in the adjacent edge set of the leaf node, the power loss of the edge is calculated in combination with a preset power loss calculation formula; The power flow power value of the edge is calculated based on the power loss and the complex power of the nodes at both ends of the edge in combination with a preset edge power flow calculation formula.

5. A method for calculating power flow in a distribution network according to claim 1, It is characterized in that The step of calculating the node voltage value and the voltage phase angle of each node in the leaf node adjacent edge set according to the leaf node adjacent edge set and in a back-substitution calculation order specifically includes: According to the leaf node adjacent edge set, in a back-substitution calculation order, respectively calculate the longitudinal component and the transverse component of the voltage drop of each connecting edge in the leaf node adjacent edge set; Calculate the node voltage of the terminal node of each connecting edge according to the longitudinal component and the transverse component of each connecting edge in combination with a preset voltage node calculation formula; The voltage phase angles are calculated according to the node voltage and the longitudinal component and the transverse component of the connecting edge.

6. A method for calculating power flow in a distribution network according to claim 5, It is characterized in that Before respectively calculating each voltage phase angle according to the node voltage and the longitudinal component and the transverse component of the connecting edge, the method further includes: According to the error of the node voltage obtained from two adjacent iterations, when the error of the node voltage is not less than a preset convergence threshold, the forward and backward calculation loop iteration is continued according to the adjacent edge sets of each leaf node until the error of the node voltage is less than the preset convergence threshold, and then the loop iteration is exited and each voltage phase angle is calculated respectively according to the node voltage and the longitudinal component and the transverse component of the connecting edge.

7. A method for calculating power flow in a distribution network according to claim 1, It is characterized in that When there is a PV power generation device node in the target distribution network, the step of obtaining the leaf node adjacent edge set further includes: When the error between the actual voltage and the rated voltage of the PV power generation equipment node is less than a preset convergence threshold, constructing a reactance matrix according to the adjacent edge set of the leaf node; The reactive power correction amount of the PV power generation device node is solved according to the reactance matrix, so as to perform reactive power correction on the PV power generation device node according to the reactive power correction amount.

8. A power flow calculation device for a distribution network, It is characterized in that include: An undirected graph construction unit, configured to construct an undirected graph model of a target distribution network for which power flow calculation is required; A leaf node adjacent edge set acquisition unit is used to traverse the edge relationship of each leaf node in the undirected graph model according to the leaf node recursive pruning logic, and obtain the leaf node adjacent edge set; A forward calculation unit, used to calculate the power flow value of each edge in the leaf node adjacent edge set according to the leaf node adjacent edge set, update the leaf nodes and leaf node adjacent edge sets in the undirected graph model in a forward calculation order, and calculate the power flow value of each edge in the leaf node adjacent edge set; The back-alternative calculation unit is used to calculate the node voltage value and voltage phase angle of each node in each leaf node adjacent edge set according to the leaf node adjacent edge set and the back-alternative calculation order after the forward calculation is completed, so as to obtain the power flow calculation result of the target distribution network.

9. A distribution network power flow calculation terminal, It is characterized in that include: Memory and processor; The memory is used to store program codes, and the program codes correspond to a method for calculating power flow in a distribution network according to any one of claims 1 to 7; The processor is used for reading and executing the program code.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores program code, and the program code is used to be read and executed by a processor to implement a distribution network power flow calculation method as described in any one of claims 1 to 7.