Power system power flow calculation (Python & Matlab implementation)

content

1 Overview

2 Basic equations of power flow calculation

2.1 Several forms of the power flow equation

2.2 Node Classification

2.3 Newton-Larson power flow calculation (Cartesian coordinates)

3 Python&Matlab implementation


1 Overview

With the continuous improvement of the automation level of distribution systems at home and abroad, personnel in the power industry have begun to study distribution network systems more deeply. As an important basis of DMS (distribution management system), power flow calculation of distribution network has attracted the attention of people in the industry. Therefore, the power flow calculation of distribution network has become an important content of distribution network analysis. Compared with the transmission network, the distribution network and the transmission network are obviously different. The former generally adopts a grid structure, the value of the line parameter R/X is large, and the three-phase load asymmetry is obvious. These characteristics make calculations effective in transmission grids, such as Newton's method, no longer applicable to distribution grids. To this end, some scholars have proposed power flow algorithms suitable for distribution networks, including power flow algorithms based on loop equations, forward pushback methods and improved Newton-Raphson method (referred to as improved Newton pull method) . Among them, the method based on loop equation has strong grid processing ability and good convergence, but the processing of the number of nodes and branches of this method is very complicated. The forward and backward method is aimed at the tree-like characteristics of the distribution network, which can avoid the ill-conditioned conditions in the power flow calculation, and at the same time, the speed is faster. However, because its formula and algorithm are different from Newton's power flow algorithm, its application in other aspects (such as power flow optimization) will be limited.

The improved Newton method writes the J matrix in the form of U*D*UT by making a certain approximation to the traditional method . U is determined only by the network topology and is an upper triangular matrix; D is a diagonal matrix. In the New method, it is necessary to factorize the J matrix and replace it with the previous generation. The improved method only has the calculation process of the forward and backward generation. It is a great improvement over the traditional method as well as the push-forward push-back method. The calculation results of the example show that the improved method can avoid the ill-conditioned J array, and has the convergence speed and accuracy of the forward-backward substitution method, and because it belongs to the Newton-type algorithm, the algorithm has been widely used.

2 Basic equations of power flow calculation

2.1 Several forms of the power flow equation

When using the admittance matrix, the node injection current and node voltage form the following linear equations: I=YU

2.2 Node Classification

For the PQ node , the node power (P, Q) is given in advance, and the unknown quantity to be determined is the node voltage vector (U, 0), so it is called the PQ node. In the power flow calculation, most of the nodes in the system belong to PQ nodes.
For the PV node , the given parameters are the active power P and the voltage amplitude U of the node, and the quantities to be calculated are the reactive power Q of the node and the phase angle 0 of the voltage vector. Such nodes often have a certain adjustable reactive power supply in operation to maintain a given voltage value.
For the balance node , in the power flow calculation, generally only one such node is set. Given its voltage value, and taking the direction of the voltage vector of this node as the reference axis in the calculation, it is equivalent to the angle of the voltage vector at the given point being zero. That is to say, the given operating parameters for the balanced node are U and 8, so it is also called the U node, and the quantity to be calculated is the P of the node. Q, the power balance of the entire system is borne by this node.
Among the four operating parameters P, Q, U, and 0 of the above three types of nodes, there are two known quantities and two quantities to be obtained, but the types are different. If it is known that the power system has m PQ nodes, r PV nodes and 1 balance node, then m+r active power equations and m reactive power equations can be extracted to solve m+r 8 and m V, thus completing the power flow calculation.


2.3 Newton-Larson power flow calculation (Cartesian coordinates)

Newton-Larson flow calculation basic process

Here △p is f(xn) in the New Drawing method, and e, f are (×n+1-Xn) in the New Drawing method.

3 Python&Matlab implementation

Complete resource:​​​​​​​(110 messages) Power flow simulation (Matlab)_matlab for power system power flow analysis-Matlab documentation resources-CSDN library 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326982823&siteId=291194637