A polar coordinate Newton method for power flow calculation suitable for research purposes
By improving the Jacobian matrix storage method, allowing the solution of functions using linear equations provided by the programming language, the problem of complex correspondence between nodes and equations is solved, and the speed and stability of trend calculations are improved.
Patent Information
- Application Number
- CN202210109051.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-01-29
AI Technical Summary
The current polar coordinate Newton's current calculation method is complex in programming. It is difficult to solve functions using the excellent linear equations provided by the programming language, resulting in high programming difficulty and slow calculation speed.
The Jacobian matrix is stored as (2n)×(2n). The elements of the rows corresponding to PV node ΔQ and the columns corresponding to ΔU are 0. The elements of the rows and columns related to the balance node are also 0. However, the diagonal elements are not cleared, and the original calculated value is retained, allowing the solution of functions using linear equations provided by the programming language.
The correspondence between nodes and equation coefficient matrix is simplified, programming difficulty is reduced, and the calculation speed and stability are improved through optimized linear equation solution functions.
Smart Images

Figure CN114566968B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a Newton method power flow calculation method for an electric power system, in particular to a polar coordinate Newton method power flow calculation method suitable for research purposes. Background Art
[0002] Power system flow calculation is a fundamental calculation used to study the steady-state operation of power systems. It determines the operating status of the entire power system based on given operating conditions and network structure. It also forms the basis for other power system analyses, such as security analysis and transient stability analysis. Due to its reliable convergence, fast computational speed, and moderate memory requirements, the Newton method has become the mainstream approach for power flow calculations. The Newton method is available in two forms: polar coordinates and rectangular coordinates. Both forms of Newton's method for power flow calculations are widely used in power systems.
[0003] In polar coordinate Newton method power flow calculation, the node i The voltage is expressed in polar coordinates as:
[0004]
[0005] like Figure 1 As shown in the figure, the conventional polar coordinate Newton method power flow calculation method mainly includes the following steps:
[0006] A. Input original data and initialization voltage.
[0007] According to the characteristics of power system nodes, power flow calculation divides power system nodes into three categories: nodes where the active power and reactive power injected by the node are known, but the node voltage amplitude and voltage phase angle are unknown are called PQ nodes; nodes where the active power and voltage amplitude injected by the node are known, but the node reactive power and voltage phase angle are unknown are called PV nodes; nodes where the voltage amplitude and voltage phase angle are known, but the node active power and reactive power injected by the node are unknown are called balance nodes.
[0008] Voltage initialization uses a flat start, meaning the voltage amplitudes at the PV and balancing nodes are set to given values, the voltage amplitude at the PQ node is set to 1.0, and the voltage phase angles at all nodes are set to 0.0. The voltage phase angles are expressed in radians, and all other quantities are expressed in per-unit values.
[0009] B. Form a node admittance matrix.
[0010] C. Set the iteration count t =0.
[0011] D. Calculate the node power and node power imbalance, and find the maximum imbalance Δ W max .
[0012] The node power calculation formula is:
[0013] (1)
[0014] Where, P i 、 Q i Node i Active power and reactive power; U i 、 U k Node i and nodes k The voltage amplitude; i ik = i i - i k , i i and i k Node i and nodes k The voltage phase angle; G ik 、 B ik are the node admittance matrix elements Y ik The real and imaginary parts of n is the number of nodes.
[0015] Set 1st~ m The node No. is a PQ node, m + 1~ n - Node 1 is the PV node, n Node No. is a balanced node, and the calculation formula for node power imbalance is:
[0016] (2)
[0017] Where, Δ P i , Δ Q i Node i Active power imbalance and reactive power imbalance; P is 、 Q is Node i Given the injected active power and injected reactive power.
[0018] Balanced nodes do not participate in iterative calculations, and there is no need to calculate node power imbalance.
[0019] The value with the largest absolute value among the power imbalances of each node is called the maximum imbalance.
[0020] E. Determine the absolute value of the maximum imbalance |Δ W max Is it less than the convergence accuracy? e ; If it is less than the convergence precision e , execute step I; otherwise, execute step F.
[0021] F. Forming the Jacobian Matrix J .
[0022] The basic equation for power flow calculation is a nonlinear equation, which is usually solved iteratively using the successive linearization method. The linearized correction equation (3) is used to calculate the correction value of voltage amplitude and phase angle.
[0023] (3)
[0024] Where, J for( n + m -1)×( n + m -1)-order Jacobian matrix, H 、 N 、 M 、 L They are the four block sub-matrices of the Jacobian matrix, and their dimensions are ( n -1)×( n -1) level, ( n -1)× m Stage, m ×( n -1) level, m × m Step; is the column vector of node voltage phase angle correction, and the superscript T indicates transposition; is the column vector of the node voltage amplitude correction divided by the node voltage amplitude; is the column vector of node active power imbalance; is the column vector of node reactive power unbalance.
[0025] Jacobian matrix J Elements ( i ≠ j The calculation formula is as follows:
[0026] (4)
[0027] (5)
[0028] (6)
[0029] (7)
[0030] Where, For nodes i The active power imbalance of the node j The partial derivative of the voltage phase angle; For nodes i The active power imbalance of the node j The partial derivative of the voltage amplitude; For nodes i The reactive power unbalance to the node j The partial derivative of the voltage phase angle; For nodes i The reactive power unbalance to the node j The partial derivative of the voltage amplitude.
[0031] Jacobian matrix J Elements ( i = j The calculation formula is as follows:
[0032] (8)
[0033] (9)
[0034] (10)
[0035] (11)
[0036] Where, For nodes i The active power imbalance of the node i The partial derivative of the voltage phase angle; For nodes i The active power imbalance of the node i The partial derivative of the voltage amplitude; For nodes i The reactive power unbalance to the node i The partial derivative of the voltage phase angle; For nodes i The reactive power unbalance to the node i The partial derivative of the voltage amplitude.
[0037] Or use the following formula to calculate:
[0038] (12)
[0039] (13)
[0040] (14)
[0041] (15)
[0042] Where, P i 、 Q i Node i The active power and reactive power are calculated according to formula (1).
[0043] G. Solve the correction equation and correct the node voltage amplitude U and phase angle i .
[0044] Solve the correction equation (3) to obtain the node voltage amplitude and voltage phase angle correction.
[0045] The node voltage amplitude and voltage phase angle correction formula is:
[0046] (16)
[0047] In the formula, the superscript ( t ) indicates the t Iterations; Δ U i and Δ i i Node i The voltage amplitude correction and voltage phase angle correction are calculated.
[0048] H. Order t = t + 1, return to step D for the next iteration.
[0049] I. Output node and branch data.
[0050] In the linear equation shown in formula (3), the PQ node has the associated Δ P and Δ Q Equation, the PV node only has Δ P equation, and the equilibrium node related Δ P and Δ Q The equations do not exist. Therefore, not every node has Δ P and Δ Q Equation, not every node needs to solve Δ i and Δ U In this way, the correspondence between nodes and equations needs to be determined according to the node type. If the type changes, the correspondence must also change, which brings great trouble to programming and debugging. m The first node is a PQ node, the m + 1~n - Node 1 is the PV node, n Nodes with the number "N" are equilibrium nodes. However, this rule may require you to renumber nodes according to this rule when entering data; in addition, the correspondence between nodes and equations may need to be readjusted when the node type changes.
[0051] To this end, Chinese patent CN201010509556.5 proposes a Newton method for current flow calculation suitable for research purposes, providing a Newton method for current flow calculation that is easy to modify and maintain for researchers who conduct further research based on polar coordinate Newton method for current flow calculation. The Jacobian matrix of the current flow calculation in this patent is calculated as (2 n )×(2 n ) storage, PV node Δ Q The corresponding rows and Δ U The corresponding columns are all zero, and the rows and columns associated with the equilibrium nodes are also all zero. Although this increases memory requirements, it simplifies the correspondence between nodes and the rows and columns of the equation coefficient matrix, greatly reducing programming difficulty and not increasing the computational effort. When solving the modified equations for power flow calculations, rows in the Jacobian matrix with zero main diagonal elements are skipped (a zero main diagonal element indicates that the row is all zero and has no corresponding equation) and are not processed.
[0052] Although the method in Chinese patent CN201010509556.5 simplifies the correspondence between nodes and rows and columns of the equation coefficient matrix, greatly reducing the programming difficulty, it requires special processing when solving the power flow calculation correction equation, and cannot use the high-performance linear equation solving function provided by the programming language. Summary of the Invention
[0053] In order to solve the above-mentioned problems existing in the prior art, the present invention proposes a polar coordinate Newton method tidal current calculation method suitable for research purposes, and provides a polar coordinate Newton method tidal current calculation algorithm that is easy to modify and maintain for scientific researchers who conduct further research based on the polar coordinate Newton method tidal current calculation.
[0054] In order to achieve the above purpose, the present invention improves the Jacobian matrix as follows: the Jacobian matrix is still (2 n )×(2 n ) storage, PV node Δ Q The corresponding rows and Δ U The corresponding columns are all zero, as are the rows and columns associated with the equilibrium node. However, the diagonal elements are not cleared, retaining their original calculated values. This allows the programming language's high-performance linear equation solver to be used to solve the corrected equations for power flow calculations.
[0055] The technical solution of the present invention is as follows: a polar coordinate Newton method power flow calculation method suitable for research purposes, comprising the following steps:
[0056] A. Input original data and initialization voltage.
[0057] B. Form a node admittance matrix.
[0058] C. Set the iteration count t =0.
[0059] D. Calculate the node power and node power imbalance, and find the maximum imbalance Δ W max .
[0060] The node power is calculated according to formula (1), and the node power imbalance is calculated according to formula (17).
[0061] (17)
[0062] Where, Δ P i , Δ Q i Node i Active power imbalance and reactive power imbalance; P is 、 Q is Node i Given the injected active power and injected reactive power.
[0063] Balanced nodes do not participate in iterative calculations, and there is no need to calculate node power imbalance.
[0064] Δ P and Δ Q All for n Dimensional vector, balance node i The corresponding active power imbalance Δ P i Set to 0; balance node i or PV node i The corresponding reactive power imbalance Δ Q i Set to 0.
[0065] Find the maximum absolute value of the active power imbalance and reactive power imbalance of each node as the maximum imbalance Δ W max .
[0066] E. Determine the absolute value of the maximum imbalance |Δ W max Is it less than the convergence accuracy? e; If it is less than the convergence precision e , execute step I; otherwise, execute step F.
[0067] F. Forming the Jacobian Matrix J .
[0068] Forming the Jacobian matrix J The steps are as follows:
[0069] F1, regardless of the node type, calculate the Jacobian matrix elements according to formula (18)-formula (25), forming (2 n )×(2 n )'s Jacobian matrix J ;
[0070] (18)
[0071] (19)
[0072] (20)
[0073] (twenty one)
[0074] Where, J i,j The Jacobian matrix i Rank j Elements of the column; For nodes i The active power imbalance of the node j The partial derivative of the voltage phase angle; For nodes i The active power imbalance of the node j The partial derivative of the voltage amplitude; For nodes i The reactive power unbalance to the node j The partial derivative of the voltage phase angle; For nodes i The reactive power unbalance to the node j The partial derivative of the voltage amplitude.
[0075] Jacobian matrix J Elements ( i = j The calculation formula is as follows:
[0076] (twenty two)
[0077] (twenty three)
[0078] (twenty four)
[0079] (25)
[0080] Where, For nodes i The active power imbalance of the node i The partial derivative of the voltage phase angle; For nodes i The active power imbalance of the node i The partial derivative of the voltage amplitude; For nodes i The reactive power unbalance to the node i The partial derivative of the voltage phase angle; For nodes i The reactive power unbalance to the node i The partial derivative of the voltage amplitude.
[0081] F2, set node count i = 1;
[0082] F3, judgment node i Is it a balanced node? If not, go to step F10.
[0083] F4, set count k = 1;
[0084] F5, Judge k = i Is it established? If so, go to step F8;
[0085] F6, let the Jacobian matrix i Rank k Column Elements J i,k = 0;
[0086] F7, Command J k,i = 0;
[0087] F8, Command k = k +1;
[0088] F9, Judgement k Is it greater than 2? n ,if k Greater than 2 n , go to step F10; otherwise return to step F5;
[0089] F10, judgment node i Is it a PQ node? If it is a PQ node, go to step F17;
[0090] F11, set countk = 1;
[0091] F12, Judgment k = n + i Is it established? If so, go to step F15;
[0092] F13, command J n+i,k = 0;
[0093] F14, command J k,n+i = 0;
[0094] F15, Command k = k +1;
[0095] F16, Judgment k Is it greater than 2? n ,if k Greater than 2 n , go to step F17; otherwise return to step F12;
[0096] F17, Order i = i +1;
[0097] F18, Judgment i Is it greater than n ,if i Greater than n , go to step G; otherwise, return to step F3.
[0098] G. Solve the modified equation (26) and correct the node voltage amplitude according to equation (27) U and phase angle i .
[0099] (26)
[0100] Where, J For (2 n )×(2 n )-order Jacobian matrix; is the column vector of node voltage phase angle correction, and the superscript T indicates transposition; is the column vector of the node voltage amplitude correction divided by the node voltage amplitude; is the column vector of node active power imbalance; is the column vector of node reactive power unbalance. The node voltage amplitude and voltage phase angle correction formula are:
[0101] (27)
[0102] In the formula, the superscript ( t ) indicates the t Iterations; Δ U i and Δ i i Node i The voltage amplitude correction and voltage phase angle correction are calculated.
[0103] H. Order t = t + 1, return to step D for the next iteration.
[0104] I. Output node and branch data.
[0105] Compared with the prior art, the present invention has the following beneficial effects:
[0106] 1. The Jacobian matrix of the power flow calculation of the present invention is (2 n )×(2 n ) storage can simplify the correspondence between nodes and rows and columns of the equation coefficient matrix, greatly reducing the programming difficulty without increasing the amount of calculation.
[0107] 2. For equations where PV nodes or equilibrium nodes do not exist, all elements in the corresponding rows of the Jacobian matrix, except for the diagonal elements, are zero, indicating the non-existence of the corresponding equation. Since the diagonal elements are not zero, the linear equation solver provided by the programming language can be used to solve the corrected equations for power flow calculations, significantly reducing programming complexity. These linear equation solvers have been optimized for high computational speed and stability, significantly improving both power flow calculation speed and program stability.
[0108] 3. The node numbering of the power flow calculation of the present invention is flexible and has nothing to do with the node type. The PQ node number is not required to be in the front, and the balance node is the last node. There is no need to change the original numbering of the system nodes according to the program design requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0109] The present invention has the following Figure 2 Zhang. Among them:
[0110] Figure 1 This is the flow chart of the conventional polar coordinate Newton method power flow calculation.
[0111] Figure 2 It is a flowchart of the Jacobian matrix formation of the present invention. DETAILED DESCRIPTION
[0112] The present invention will be further described below with reference to the accompanying drawings. Figure 1 The flowchart of polar coordinate Newton method power flow calculation and Figure 2The flowchart for the Jacobian matrix formation process of the present invention is shown, and a power flow calculation is performed on a real large-scale power grid. This large-scale power grid has 445 nodes and contains a large number of low-impedance branches. To enable conventional power flow calculation methods, these low-impedance branches are converted to normal branches. The convergence accuracy of the power flow calculation is 0.00001.
[0113] For comparison, the following three methods were used to calculate the power flow of the actual large-scale power grid:
[0114] Conventional method: conventional polar coordinate Newton method power flow calculation method;
[0115] Patented method: Patent CN201010509556.5;
[0116] Comparison method: The method of patent CN201010509556.5 is adopted, but the correction equation for the power flow calculation is solved using the linear equation solving function of Matlab.
[0117] Various power flow calculation methods are programmed using Matlab M files. The calculation time of different power flow calculation methods is shown in Table 1.
[0118] Table 1 Calculation time (s) of different power flow calculation methods
[0119]
[0120] As shown in Table 1, for the modified 445-node real-world power system example, the computation time for the conventional polar coordinate Newton method for power flow calculation and the patented method is similar. However, the proposed method is much faster because it uses the linear equation solver provided by the Matlab programming language to solve the equations. However, some diagonal elements in the Jacobian matrix of the comparison method are zero, resulting in a singular coefficient matrix in the modified equations, making them unsolvable using the linear equation solver provided by the programming language.
[0121] The present invention can be implemented using any programming language and programming environment, such as C language, C++, FORTRAN, Delphi, MATLAB M-file programming language, etc. The development environment can be Visual C++, Borland C++Builder, Visual FORTRAN, MATLAB, etc.
[0122] The present invention is not limited to this embodiment, and any equivalent concepts or modifications within the technical scope disclosed by the present invention are included in the protection scope of the present invention.
Claims
1. A polar coordinate Newton method for calculating power flow suitable for research purposes, characterized by: The following steps are involved: A. Input original data and initialization voltage; According to the characteristics of power system nodes, power flow calculation divides power system nodes into three categories: nodes with known active power and reactive power injection but unknown voltage amplitude and voltage phase angle are called PQ nodes; nodes with known active power and voltage amplitude but unknown reactive power injection and voltage phase angle are called PV nodes; nodes with known voltage amplitude and voltage phase angle but unknown active power and reactive power injection are called balancing nodes; The voltage initialization adopts flat start, that is, the voltage amplitude of the PV node and the balance node takes the given value, and the voltage amplitude of the PQ node takes 1.0; the voltage phase angle of all nodes is 0.0; the voltage phase angle unit here is radian, and other quantities use per unit value; B. Forming a node admittance matrix; C. Set the iteration count t = 0; D. Calculate the node power and node power imbalance, and find the maximum imbalance Δ W max ; The node power calculation formula is: (1) Where, P i 、 Q i Node i Active power and reactive power; U i 、 U k Node i and nodes k The voltage amplitude; θ ik = θ i - θ k , θ i and θ k Node i and nodes k The voltage phase angle; G ik 、 B ik are the node admittance matrix elements Y ik The real and imaginary parts of n is the number of nodes; The calculation formula for node power imbalance is: (2) Where, Δ P i , Δ Q i Node i Active power imbalance and reactive power imbalance; P is 、 Q is Node i Given injected active power and injected reactive power; Balanced nodes do not participate in iterative calculations, and there is no need to calculate node power imbalance; Δ P and Δ Q All for n Dimensional vector, balance node i The corresponding active power imbalance Δ P i Set to 0; balance node i or PV node i The corresponding reactive power imbalance Δ Q i Set to 0; find the maximum absolute value of the active power imbalance and reactive power imbalance of each node, which is called the maximum imbalance; E. Determine the absolute value of the maximum imbalance |Δ W max Is it less than the convergence accuracy? ε ; If it is less than the convergence precision ε , execute step I; Otherwise, go to step F; F. Forming the Jacobian Matrix J ; F1, regardless of the node type, calculate the Jacobian matrix elements according to formulas (3)-(10) to form (2 n )×(2 n )'s Jacobian matrix J ; when i ≠ j When , the Jacobian matrix element calculation formula is as follows: (3) (4) (5) (6) Where, J i,j The Jacobian matrix i Rank j Elements of the column; For nodes i The active power imbalance of the node j The partial derivative of the voltage phase angle; For nodes i The active power imbalance of the node j The partial derivative of the voltage amplitude; For nodes i The reactive power unbalance to the node j The partial derivative of the voltage phase angle; For nodes i The reactive power unbalance to the node j The partial derivative of the voltage amplitude; when i = j When the Jacobian matrix J The element calculation formula is as follows: (7) (8) (9) (10) Where, For nodes i The active power imbalance of the node i The partial derivative of the voltage phase angle; For nodes i The active power imbalance of the node i The partial derivative of the voltage amplitude; For nodes i The reactive power unbalance to the node i The partial derivative of the voltage phase angle; For nodes i The reactive power unbalance to the node i The partial derivative of the voltage amplitude; F2, set node count i = 1; F3, judgment node i Is it a balanced node? If not, go to step F10. F4, set count k = 1; F5, Judge k = i Is it established? If so, go to step F8; F6, let the Jacobian matrix i Rank k Column Elements J i,k = 0; F7, Command J k,i = 0; F8, Command k = k + 1; F9, Judgement k Is it greater than 2? n ,if k Greater than 2 n , go to step F10; Otherwise return to step F5; F10, judgment node i Is it a PQ node? If it is a PQ node, go to step F17; F11, set count k = 1; F12, Judgment k = n + i Is it established? If so, go to step F15; F13, command J n+i,k = 0; F14, command J k,n+i = 0; F15, Command k = k + 1; F16, Judgment k Is it greater than 2? n ,if k Greater than 2 n , go to step F17; otherwise return to step F12; F17, Order i = i + 1; F18, Judgment i Is it greater than n ,if i Greater than n , go to step G; Otherwise return to step F3; G. Solve the correction equation and correct the node voltage amplitude U and phase angle θ ; The corrected equation is: (11) Where, J For (2 n )×(2 n )-order Jacobian matrix; is the column vector of node voltage phase angle correction, and the superscript T indicates transposition; is the column vector of the node voltage amplitude correction divided by the node voltage amplitude; is the column vector of node active power imbalance; is the column vector of node reactive power unbalance; The node voltage amplitude and voltage phase angle correction formula is: (12) (13) In the formula, the superscript ( t ) indicates the t iterations; Δ U i and Δ θ i Node i Voltage amplitude correction and voltage phase angle correction; H. Order t = t + 1, return to step D for the next iteration; I. Output node and branch data.
Citation Information
Patent Citations
Newton-process power flow calculation method for study purpose
CN101976838B
Newton method power flow calculation method which changes Jacobi matrix with iteration and node types
CN106532711A
Polar coordinate Newton method load flow calculation method for Jacobian matrix change
CN111046336A