CN106356859B - A kind of rectangular coordinate Newton load flow calculation method based on Matlab - Google Patents
A kind of rectangular coordinate Newton load flow calculation method based on Matlab Download PDFInfo
- Publication number
- CN106356859B CN106356859B CN201610864281.4A CN201610864281A CN106356859B CN 106356859 B CN106356859 B CN 106356859B CN 201610864281 A CN201610864281 A CN 201610864281A CN 106356859 B CN106356859 B CN 106356859B
- Authority
- CN
- China
- Prior art keywords
- node
- voltage
- matrix
- power
- deviation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 70
- 239000011159 matrix material Substances 0.000 claims abstract description 103
- 238000002347 injection Methods 0.000 claims abstract description 7
- 239000007924 injection Substances 0.000 claims abstract description 7
- 238000000034 method Methods 0.000 claims description 59
- 239000013598 vector Substances 0.000 claims description 32
- 238000012937 correction Methods 0.000 claims description 20
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 238000012986 modification Methods 0.000 claims 1
- 230000004048 modification Effects 0.000 claims 1
- 238000011160 research Methods 0.000 abstract description 17
- 230000006870 function Effects 0.000 abstract description 10
- 238000004458 analytical method Methods 0.000 abstract description 7
- 238000012360 testing method Methods 0.000 abstract description 2
- 238000005516 engineering process Methods 0.000 description 5
- 238000005457 optimization Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000000243 solution Substances 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for AC mains or AC distribution networks
- H02J3/04—Circuit arrangements for AC mains or AC distribution networks for connecting networks of the same frequency but supplied from different sources
- H02J3/06—Controlling transfer of power between connected networks; Controlling sharing of load between connected networks
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Supply And Distribution Of Alternating Current (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种电力系统牛顿法潮流计算方法,特别是一种适合研究目的使用的直角坐标牛顿法潮流计算方法。The invention relates to a power system Newton method power flow calculation method, in particular to a Cartesian coordinate Newton method power flow calculation method suitable for research purposes.
背景技术Background technique
电力系统潮流计算是研究电力系统稳态运行的一项基本计算,它根据给定的运行条件和网络结构确定整个网络的运行状态。潮流计算也是电力系统其他分析的基础,如安全分析、暂态稳定分析等都要用到潮流计算。直角坐标牛顿法潮流计算方法是一种最常用的潮流计算方法,科研人员经常以直角坐标牛顿法潮流计算为基础进行进一步地研究。实用的商业软件采用稀疏矩阵技术和节点优化编号等高级技术。这些技术虽然能大幅度提高潮流计算的速度、降低内存占用量,但编程非常麻烦且难以修改和维护,不易增加新的功能,因而不适合科研人员用于研究目的使用。Power system power flow calculation is a basic calculation for studying the steady-state operation of the power system. It determines the operating state of the entire network according to the given operating conditions and network structure. The power flow calculation is also the basis of other analysis of the power system, such as safety analysis, transient stability analysis, etc., all use power flow calculation. Cartesian coordinate Newton method power flow calculation method is the most commonly used power flow calculation method, and researchers often conduct further research on the basis of Cartesian coordinate Newton method power flow calculation. Practical commercial software employs advanced techniques such as sparse matrix techniques and node-optimized numbering. Although these technologies can greatly increase the speed of power flow calculation and reduce memory usage, programming is very cumbersome and difficult to modify and maintain, and it is not easy to add new functions, so it is not suitable for researchers to use for research purposes.
Matlab软件以矩阵为最基本的数据单位,可以方便地处理各种矩阵和向量运算,也可以很方便自然地处理复数类型,其指令表达式与数学中常用的形式很接近,还有大量常见实用的函数,给编程带来很大便利。Matlab软件简单易用、代码短小易操作,易于编程和调试,计算功能强大,同时还具有非常强大的可视化图形处理和交互式功能,为科学研究以及工程应用提供了一种高效的编程工具,目前已经成为许多科学领域的基本工具和首选平台,在各种科学和工程计算领域得到了广泛的应用。为了适应越来越多的科研人员需要在Matlab平台上以直角坐标牛顿法潮流计算为基础进行进一步地研究的需求,迫切需要一种基于Matlab软件的易于编程、修改和调试的直角坐标牛顿法潮流计算方法。Matlab software uses matrix as the most basic data unit, which can easily handle various matrix and vector operations, and can also handle complex number types conveniently and naturally. Its instruction expressions are very close to those commonly used in mathematics, and there are a large number of common and practical The function brings great convenience to programming. Matlab software is easy to use, short in code, easy to operate, easy to program and debug, powerful in calculation, and also has very powerful visual graphics processing and interactive functions, providing an efficient programming tool for scientific research and engineering applications. It has become the basic tool and preferred platform in many scientific fields, and has been widely used in various scientific and engineering computing fields. In order to meet the needs of more and more researchers who need to carry out further research based on the Cartesian Newton method power flow calculation on the Matlab platform, there is an urgent need for a Cartesian coordinate Newton method power flow calculation based on Matlab software that is easy to program, modify and debug. Calculation method.
根据电力系统节点的特点,潮流计算把电力系统节点分成3类:节点有功功率和无功功率已知、节点电压幅值和电压相角未知的节点称为PQ节点;节点有功功率和电压幅值已知、节点无功功率和电压相角未知的节点称为PV节点;节点电压幅值和电压相角已知,节点有功功率和无功功率未知的节点称为平衡节点。According to the characteristics of the power system nodes, the power flow calculation divides the power system nodes into three categories: nodes whose active power and reactive power are known, nodes whose voltage amplitude and voltage phase angle are unknown are called PQ nodes; nodes whose active power and voltage amplitude are unknown Nodes with known node reactive power and unknown voltage phase angle are called PV nodes; nodes with known node voltage amplitude and voltage phase angle but unknown node active power and reactive power are called balanced nodes.
牛顿法潮流计算分为两类:牛顿法潮流计算中节点电压采用极坐标表示时的计算方法,称为极坐标牛顿法潮流计算方法;牛顿法潮流计算中节点电压采用直角坐标表示时的计算方法,称为直角坐标牛顿法潮流计算方法。直角坐标牛顿法潮流计算主要方程如下:The Newton method power flow calculation is divided into two categories: the node voltage in the Newton method power flow calculation uses polar coordinates The calculation method when expressed is called the polar coordinate Newton method power flow calculation method; the node voltage in the Newton method power flow calculation adopts rectangular coordinates The calculation method when expressed is called Cartesian coordinate Newton method power flow calculation method. Cartesian Newton method power flow calculation main equation is as follows:
节点导纳矩阵为:The nodal admittance matrix is:
式中,Yik为节点导纳矩阵元素,当下标i≠k时,为节点i和节点k的互导纳,当下标i=k时,为节点i的自导纳;n为节点数。In the formula, Y ik is the node admittance matrix element. When the subscript i≠k, it is the mutual admittance of node i and node k. When the subscript i=k, it is the self-admittance of node i; n is the number of nodes.
节点功率方程为:The node power equation is:
式中,Pi、Qi分别为节点i的节点有功功率和无功功率;ei、ek分别为节点i和节点k的节点电压相量实部;fi和fk分别为节点i和节点k的节点电压相量虚部;Gik、Bik分别为节点导纳矩阵元素Yik的实部和虚部。In the formula, P i and Q i are the node active power and reactive power of node i respectively; e i and e k are the node voltage phasor real parts of node i and node k respectively; f i and f k are node i and the node voltage phasor imaginary part of node k; G ik , B ik are the real part and imaginary part of node admittance matrix element Y ik respectively.
功率偏差及电压偏差方程为:The power deviation and voltage deviation equations are:
式中,ΔPi、ΔQi分别为节点i的节点有功功率偏差和无功功率偏差;ΔUi 2为节点i的节点电压幅值偏差;PiS、QiS分别为节点i给定的节点注入有功功率和注入无功功率;UiS为节点i给定的节点电压幅值;m为PQ节点数。In the formula, ΔP i and ΔQ i are the node active power deviation and reactive power deviation of node i respectively; ΔU i 2 is the node voltage amplitude deviation of node i; Active power and injected reactive power; U iS is the node voltage amplitude given by node i; m is the number of PQ nodes.
功率偏差及电压偏差方程也可以表示为:The power deviation and voltage deviation equations can also be expressed as:
式中,ai、bi分别为节点i的注入电流相量的实部和虚部,为In the formula, a i and b i are the real part and imaginary part of the injected current phasor of node i respectively, which is
修正方程组为:The corrected equations are:
式中,J为雅可比矩阵,H、N、M、L、R、K为雅可比矩阵的分块子矩阵。雅可比矩阵各元素计算公式为:In the formula, J is the Jacobian matrix, and H, N, M, L, R, K are the block sub-matrices of the Jacobian matrix. The calculation formula of each element of the Jacobian matrix is:
当j≠i时when j≠i
Hij=-Gijei-Bijfi (7)H ij =-G ij e i -B ij f i (7)
Nij=Bijei-Gijfi (8)N ij =B ij e i -G ij f i (8)
Mij=Bijei-Gijfi (9)M ij =B ij e i -G ij f i (9)
Lij=Gijei+Bijfi (10)L ij =G ij e i +B ij f i (10)
Rij=0 (11)R ij =0 (11)
Kij=0 (12)K ij =0 (12)
当j=i时when j=i
Hii=-Giiei-Biifi-ai (13)H ii =-G ii e i -B ii f i -a i (13)
Nii=Biiei-Giifi-bi (14)N ii =B ii e i -G ii f i -b i (14)
Mii=Biiei-Giifi+bi (15)M ii =B ii e i -G ii f i +b i (15)
Lii=Giiei+Biifi-ai (16)L ii =G ii e i +B ii f i -a i (16)
Rii=-2ei (17)R ii =-2e i (17)
Kii=-2fi (18)K ii =-2f i (18)
如图1-2所示,现有直角坐标牛顿法潮流计算方法,主要包括以下步骤:As shown in Figure 1-2, the existing Cartesian coordinate Newton method power flow calculation method mainly includes the following steps:
A、原始数据输入和电压初始化;A. Raw data input and voltage initialization;
原始数据包括线路和变压器支路数据、节点注入有功功率和无功功率、节点电压幅值、节点无功补偿数据,以及收敛精度、最大迭代次数。The original data includes line and transformer branch data, node injection active power and reactive power, node voltage amplitude, node reactive power compensation data, as well as convergence accuracy and maximum number of iterations.
电压初始化采用平启动,即PV节点和平衡节点的节点电压实部取给定值,PQ节点的节点电压实部取1.0;所有节点电压的虚部都取0.0。这里单位采用标幺值。The voltage initialization adopts a flat start, that is, the real part of the node voltage of the PV node and the balance node takes a given value, and the real part of the node voltage of the PQ node takes 1.0; the imaginary part of all node voltages takes 0.0. The units here are per unit.
B、形成节点导纳矩阵;B. Form a node admittance matrix;
根据输入的线路和变压器支路数据形成如式(1)所示的节点导纳矩阵。Form the node admittance matrix shown in formula (1) according to the input line and transformer branch data.
C、形成雅可比矩阵;C. Form the Jacobian matrix;
按式(7)~式(18)和式(5)计算雅可比矩阵的各元素。Calculate each element of the Jacobian matrix according to formula (7) ~ formula (18) and formula (5).
D、计算节点功率及功率偏差和电压偏差;D. Calculate node power, power deviation and voltage deviation;
按式(2)计算节点功率,按式(3)计算节点功率偏差和节点电压偏差。Calculate the node power according to formula (2), and calculate the node power deviation and node voltage deviation according to formula (3).
E、解方程及修正节点电压实部e和虚部f;E. Solve the equation and correct the real part e and imaginary part f of the node voltage;
解修正方程组(6),求出电压实部修正量列向量Δe及电压虚部修正量列向量Δf。Solve the correction equation group (6), and obtain the column vector Δe of the correction amount of the real part of the voltage and the column vector Δf of the correction amount of the imaginary part of the voltage.
电压修正公式为:The voltage correction formula is:
式中,上标(t)表示第t次迭代的值;Δei和Δfi分别为节点i的节点电压实部修正量和节点电压虚部修正量。In the formula, the superscript (t) represents the value of the t-th iteration; Δe i and Δf i are the correction amount of the real part of the node voltage and the correction amount of the imaginary part of the node voltage of node i, respectively.
F、判断最大不平衡量|ΔP|max、|ΔQ|max和|ΔU2|max是否都小于收敛精度ε;如果都小于收敛精度ε,进行步骤G,否则返回步骤C进行下一次迭代;F. Determine whether the maximum unbalance |ΔP| max , |ΔQ| max and |ΔU 2 | max are all less than the convergence precision ε; if they are all less than the convergence precision ε, proceed to step G, otherwise return to step C for the next iteration;
G、计算平衡节点的有功功率和无功功率及PV节点的无功功率,计算各支路有功功率和无功功率,结束。G. Calculate the active power and reactive power of the balance node and the reactive power of the PV node, calculate the active power and reactive power of each branch, and end.
直接采用上述原理实现的直角坐标牛顿法潮流计算软件计算速度较慢,商业使用的直角坐标牛顿法潮流计算软件采用稀疏矩阵技术和节点优化编号技术,比较复杂,不适合科研人员以此为基础进一步进行科学研究。因此,中国专利ZL201010509556.5提出了一种适合研究目的使用的牛顿法潮流计算方法,为以极坐标牛顿法潮流计算为基础进行进一步研究的科研人员提供一个易于修改和维护的牛顿法潮流计算方法,其特点如下:Cartesian coordinate Newton method power flow calculation software directly using the above principles has a slow calculation speed, and commercially used Cartesian coordinate Newton method power flow calculation software uses sparse matrix technology and node optimization numbering technology, which is relatively complicated and is not suitable for scientific researchers to use this as a basis for further research. Conduct scientific research. Therefore, Chinese patent ZL201010509556.5 proposes a Newton method power flow calculation method suitable for research purposes, and provides an easy-to-modify and maintain Newton method power flow calculation method for researchers who conduct further research based on polar coordinate Newton method power flow calculations , whose characteristics are as follows:
(1)不采用稀疏矩阵技术和节点优化编号,大大降低了算法的实现难度;(1) Does not use sparse matrix technology and node optimization numbering, which greatly reduces the difficulty of implementing the algorithm;
(2)通过简单逻辑判断来避免不必要运算,提高了潮流计算的计算速度。(2) Avoid unnecessary calculations through simple logic judgments, and improve the calculation speed of power flow calculations.
中国专利ZL201010509556.5所提出方法为以极坐标牛顿法潮流计算为基础进行进一步研究的科研人员提供了一个易于修改和维护的极坐标牛顿法潮流计算方法。该方法采用C语言等编译型编程语言实现时速度很快,但使用Matlab这类解释型编程语言实现时计算速度则很慢,同时该专利也没有充分利用Matlab擅长矩阵运算和复数运算的特点。因此需要一个充分利用Matlab的特点且计算快速的直角坐标牛顿法潮流计算方法供在Matlab平台上进行科学研究的科研人员使用。The method proposed in Chinese patent ZL201010509556.5 provides an easy-to-modify and maintain polar coordinate Newton method power flow calculation method for researchers who conduct further research on the basis of polar coordinate Newton method power flow calculation. This method is fast when implemented in a compiled programming language such as C language, but the calculation speed is very slow when implemented in an interpreted programming language such as Matlab. At the same time, this patent does not make full use of the characteristics of Matlab that is good at matrix operations and complex operations. Therefore, a Cartesian coordinate Newton method power flow calculation method that makes full use of the characteristics of Matlab and calculates quickly is needed for researchers who conduct scientific research on the Matlab platform.
发明内容Contents of the invention
为解决现有技术存在的上述问题,本发明要提出一种基于Matlab的直角坐标牛顿法潮流计算方法,可以充分利用Matlab特有的擅长矩阵运算和复数运算的特点,同时又有较快计算速度的直角坐标牛顿法潮流计算方法。In order to solve the above-mentioned problems existing in the prior art, the present invention proposes a Matlab-based Cartesian Newton method power flow calculation method, which can make full use of Matlab's unique characteristics of being good at matrix operations and complex number operations, and has the advantage of faster calculation speed Cartesian coordinate Newton method power flow calculation method.
为了实现上述目的,本发明的技术方案如下:一种基于Matlab的直角坐标牛顿法潮流计算方法,采用矩阵运算和复数运算。包括以下步骤:In order to achieve the above object, the technical solution of the present invention is as follows: a Matlab-based Cartesian Newton method power flow calculation method, using matrix operations and complex operations. Include the following steps:
A、原始数据输入和电压初始化;A. Raw data input and voltage initialization;
B、形成节点导纳矩阵;B. Form a node admittance matrix;
C、形成雅可比矩阵及计算节点功率;C. Form Jacobian matrix and calculate node power;
Matlab擅长矩阵运算和复数运算,因此采用Matlab编程,应该推导出基于矩阵运算和复数运算的雅可比矩阵计算方法。Matlab is good at matrix operations and complex number operations, so using Matlab programming, the Jacobian matrix calculation method based on matrix operations and complex number operations should be derived.
雅可比矩阵元素与节点类型有关,常规形成雅可比矩阵时要判断节点类型,根据节点类型决定哪些节点需要形成雅可比矩阵元素。这样处理对于通过循环来实现的算法,容易处理,但不适合通过矩阵整体运算形成雅可比矩阵的方法。因此,本发明形成雅可比矩阵时,不判断节点类型,对所有节点都形成雅可比矩阵元素,之后再去掉不需要的行和列。The elements of the Jacobian matrix are related to the node type. When forming the Jacobian matrix, the node type must be judged, and which nodes need to form the Jacobian matrix elements are determined according to the node type. Such processing is easy to handle for an algorithm realized by loops, but it is not suitable for a method of forming a Jacobian matrix by an overall matrix operation. Therefore, when the present invention forms the Jacobian matrix, it does not judge the node type, but forms Jacobian matrix elements for all nodes, and then removes unnecessary rows and columns.
下面推导采用矩阵运算计算雅可比矩阵元素和节点功率的公式。The formulas for calculating Jacobian matrix elements and node powers using matrix operations are derived below.
对式(7)~式(10)的分析,可得Analysis of formula (7) ~ formula (10), we can get
Mij=Nij (21)M ij = N ij (21)
Lij=-Hij (22)L ij =-H ij (22)
因此,先求Hij和Nij,求出Hij和Nij后,自然就能得到Mij和Lij。Therefore, H ij and N ij are calculated first, and after H ij and N ij are calculated, M ij and L ij can be obtained naturally.
推导由矩阵运算计算雅可比矩阵的公式之前,先看看雅可比矩阵各元素如何用复数或相量表示。Before deriving the formula for computing the Jacobian matrix by matrix operations, let's see how each element of the Jacobian matrix is represented by a complex number or a phasor.
从式(7)和式(8)可见,雅可比矩阵各元素应该由Yij与的共轭的乘积,即得到。因此Hij、Nij、Mij、Lij可以由下式生成:From formula (7) and formula (8), it can be seen that each element of the Jacobian matrix should be composed of Y ij and the conjugate of the product of get. Therefore, H ij , N ij , M ij , and L ij can be generated by the following formula:
式中,上标(^)表示复数的共轭。where the superscript (^) represents the conjugate of a complex number.
式(23)可以看成由节点导纳矩阵与下式对应位置元素相乘得到的矩阵J0的第i行第j列的元素:Equation (23) can be regarded as the element in row i and column j of matrix J 0 obtained by multiplying the node admittance matrix with the corresponding position element of the following formula:
式(24)则可用Matlab的一个矩阵填充函数repmat实现,因此雅可比矩阵分块子矩阵可由下式得到:Equation (24) can be realized by a matrix filling function repmat of Matlab, so the block submatrix of Jacobian matrix can be obtained by the following formula:
式中,J0为雅可比初始计算矩阵;repmat为Matlab的矩阵填充函数,函数中1表示填充时的行重复1次,函数中n表示填充时的列重复n次;.*表示两矩阵对应行列的元素相乘。In the formula, J 0 is the Jacobian initial calculation matrix; repmat is the matrix filling function of Matlab, and 1 in the function means filling time The row is repeated once, and n in the function indicates when filling The column of is repeated n times; .* indicates that the elements of the corresponding rows and columns of the two matrices are multiplied.
由J0得到初始雅可比矩阵分块子矩阵为:The block sub-matrix of the initial Jacobian matrix obtained from J 0 is:
H0=-Re(J0) (26)H 0 =-Re(J 0 ) (26)
N0=Im(J0) (27)N 0 =Im(J 0 ) (27)
M0=Im(J0) (28)M 0 =Im(J 0 ) (28)
L0=Re(J0) (29)L 0 =Re(J 0 ) (29)
式中,H0、N0、M0、L0为初始雅可比矩阵的分块子矩阵;Re表示取矩阵元素的实部;Im表示取矩阵元素的虚部。In the formula, H 0 , N 0 , M 0 , and L 0 are block sub-matrixes of the initial Jacobian matrix; Re means to take the real part of the matrix elements; Im means to take the imaginary parts of the matrix elements.
由式(26)~式(29)得到的初始雅可比矩阵分块子矩阵的非对角元已经是雅可比矩阵元素了,对角元还需要修正。The off-diagonal elements of the block sub-matrix of the initial Jacobian matrix obtained from formulas (26) to (29) are already Jacobian matrix elements, and the diagonal elements need to be corrected.
式(13)~式(16)中等式右侧的第1和第2项就是H0、N0、M0、L0的对角元,因此只需对得到的H0、N0、M0、L0用ai和bi修正,就能得到雅可比矩阵分块子矩阵对角元。The first and second items on the right side of the equations in formula (13) ~ formula (16) are the diagonal elements of H 0 , N 0 , M 0 , L 0 , so only the obtained H 0 , N 0 , M 0 and L 0 are corrected by a i and b i , and the diagonal elements of the block sub-matrix of the Jacobian matrix can be obtained.
把节点功率方程(2)中求和的控制变量换成j,并重新整理为:Replace the control variable summed in the nodal power equation (2) by j, and rearrange as:
式(23)展开为:Equation (23) expands to:
观察式(30)和式(31),可得复功率:Observing formula (30) and formula (31), the complex power can be obtained:
式中,为复功率列向量。In the formula, is a complex power column vector.
注入电流相量为:The injected current phasor is:
式中,为注入电流相量列向量;为节点电压列向量。In the formula, is the column vector of the injection current phasor; is the node voltage column vector.
由于ai、bi分别为节点i的注入电流相量的实部和虚部,因此Since a i and b i are the real part and imaginary part of the injected current phasor of node i respectively, so
式中,为节点i的注入电流相量。In the formula, is the injected current phasor of node i.
用注入电流相量对雅可比矩阵分块子矩阵对角元进行修正如下:The diagonal elements of the block submatrix of the Jacobian matrix are corrected with the injected current phasor as follows:
电压偏差对电压偏导的非对角元为0,对角元为:The off-diagonal elements of the voltage deviation to the voltage partial conduction are 0, and the diagonal elements are:
Rii=-2ei i=m+1,…,n-1 (40)R ii =-2e i i = m+1,...,n-1 (40)
Kii=-2fi i=m+1,…,n-1 (41)K ii =-2f i i = m+1,...,n-1 (41)
可以把R、K第m+1行至n-1行的元素放到M、L的对应行,形成M′、L′:The elements from the m+1 to n-1 rows of R and K can be placed in the corresponding rows of M and L to form M' and L':
Mi′j=Mij i=1,…,m j=1,…,n-1 (42)M i ′ j =M ij i=1,...,mj=1,...,n-1 (42)
Li′j=Lij i=1,…,m j=1,…,n-1 (43)L i ′ j =L ij i=1,...,mj=1,...,n-1 (43)
Mi′j=Rij i=m+1,…,n-1 j=1,…,n-1 (44)M i ′ j =R ij i=m+1,...,n-1 j=1,...,n-1 (44)
Li′j=Kij i=m+1,…,n-1 j=1,…,n-1 (45)L i ′ j =K ij i=m+1,...,n-1 j=1,...,n-1 (45)
形成雅可比矩阵及计算节点功率,包括以下步骤:Forming the Jacobian matrix and calculating node power includes the following steps:
C1、计算雅可比初始计算矩阵J0;C1. Calculating the Jacobian initial calculation matrix J 0 ;
C2、计算节点复功率;C2. Compute node complex power;
C3、由J0计算初始的雅可比矩阵分块子矩阵;C3, calculate the initial Jacobian matrix block sub-matrix by J 0 ;
C4、计算注入电流相量;C4. Calculate the injection current phasor;
C5、用注入电流相量对雅可比矩阵分块子矩阵对角元进行修正;C5, using the injected current phasor to modify the diagonal elements of the Jacobian matrix block submatrix;
C6、计算R、K,形成M′、L′;C6, calculate R, K, form M', L';
C7、由雅可比矩阵分块子矩阵形成雅可比矩阵;C7, the Jacobian matrix is formed by the Jacobian matrix block sub-matrix;
C8、对雅可比矩阵进行调整,去掉平衡节点有功功率偏差和无功功率偏差对应的行;去掉平衡节点电压实部修正量和电压虚部修正量对应的列,结束。C8. Adjust the Jacobian matrix, delete the rows corresponding to the active power deviation and the reactive power deviation of the balance node; delete the columns corresponding to the correction amount of the real part of the voltage at the balance node and the correction amount of the imaginary part of the voltage, and end.
D、计算节点功率偏差和节点电压偏差;D. Calculate node power deviation and node voltage deviation;
式(4)计算节点功率偏差及电压偏差方程写成矩阵运算的形成为:Equation (4) calculates the node power deviation and voltage deviation equation and writes the matrix operation as follows:
式中,ΔP、ΔQ分别为节点有功功率偏差列向量和无功功率偏差列向量;ΔU2为节点电压幅值偏差列向量;PS、QS分别为节点给定的注入有功功率列向量和注入无功功率列向量;US为节点电压给定值列向量;为节点电压列向量。In the formula, ΔP and ΔQ are the column vectors of node active power deviation and reactive power deviation respectively; ΔU 2 is the column vector of node voltage amplitude deviation; Inject reactive power column vector; U S is the column vector of node voltage given value; is the node voltage column vector.
计算得到的节点功率偏差向量ΔP和ΔQ中去掉PV节点无功功率偏差及平衡节点有功功率偏差和无功功率偏差;节点电压幅值偏差列向量去掉PQ节点和平衡节点的节点电压幅值偏差。The calculated node power deviation vectors ΔP and ΔQ remove the PV node reactive power deviation and the balance node active power deviation and reactive power deviation; the node voltage amplitude deviation column vector removes the node voltage amplitude deviation of the PQ node and the balance node.
E、解方程及修正电压实部e和虚部f;E. Solve the equation and correct the real part e and imaginary part f of the voltage;
直接调用Matlab软件的解线性方程组算法解修正方程组(6),求出节点电压实部修正量列向量Δe及节点电压虚部修正量列向量Δf。Directly invoke the algorithm of solving linear equations of Matlab software to solve the correction equations (6), and obtain the column vector Δe of the correction amount of the real part of the node voltage and the column vector Δf of the correction amount of the imaginary part of the node voltage.
对电压进行修正的式(19)和式(20)改写成矩阵形式为:The formulas (19) and (20) for voltage correction are rewritten into matrix form as:
e(t+1)=e(t)-Δe(t) (48)e (t+1) = e (t) -Δe (t) (48)
f(t+1)=f(t)-Δf(t) (49)f (t+1) = f (t) -Δf (t) (49)
式中,上标(t)表示第t次迭代的值;Δe和Δf分别为节点电压实部修正量列向量和节点电压虚部修正量列向量。In the formula, the superscript (t) represents the value of the t-th iteration; Δe and Δf are the column vectors of the correction amount of the real part of the node voltage and the column vector of the correction amount of the imaginary part of the node voltage, respectively.
F、判断最大不平衡量|ΔP|max、|ΔQ|max和|ΔU2|max是否都小于收敛精度ε;如果都小于收敛精度ε,进行步骤G,否则返回步骤C进行下一次迭代。F. Determine whether the maximum unbalance |ΔP| max , |ΔQ| max and |ΔU 2 | max are all less than the convergence precision ε; if they are all less than the convergence precision ε, proceed to step G, otherwise return to step C for the next iteration.
G、计算平衡节点的有功功率和无功功率及PV节点的无功功率,计算各支路有功功率和无功功率,结束。G. Calculate the active power and reactive power of the balance node and the reactive power of the PV node, calculate the active power and reactive power of each branch, and end.
与现有技术相比,本发明具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
1、本发明提出的方法在Matlab平台实现,便于科研人员使用Matlab提供的各种工具和函数对计算结果进行测试和分析。1, the method that the present invention proposes realizes in Matlab platform, is convenient to scientific research personnel to use various tools and the function that Matlab provides to test and analyze calculation result.
2、本发明提出的方法采用矩阵运算和复数运算,减少了程序代码,简化了编程,使得程序更加清晰,便于科研人员修改程序、对程序进行调试和改进、添加新功能。2. The method proposed by the present invention adopts matrix operation and complex number operation, reduces the program code, simplifies programming, makes the program clearer, and is convenient for scientific researchers to modify the program, debug and improve the program, and add new functions.
3、由于Matlab对矩阵运算实行优化,采用矩阵运算要比按矩阵元素循环运算编程快得多,同时直接调用Matlab的方程求解算法,也大大提高了计算速度。实践证明,本发明的方法既方便了科研人员对程序进行编写、修改和调试,同时计算速度也基本接近了在C语言平台上实现的速度,为科研人员的科研工作提供了一个优秀的分析工具。3. Since Matlab optimizes matrix operations, using matrix operations is much faster than programming by matrix element loop operations. At the same time, directly calling Matlab's equation solving algorithm also greatly improves the calculation speed. Practice has proved that the method of the present invention is convenient for scientific research personnel to write, modify and debug programs, and at the same time, the calculation speed is basically close to the speed realized on the C language platform, providing an excellent analysis tool for scientific research personnel .
附图说明Description of drawings
本发明共有附图4张。其中:The present invention has 4 accompanying drawings. in:
图1是现有直角坐标牛顿法潮流计算的流程图。Fig. 1 is a flow chart of the existing Cartesian coordinate Newton method power flow calculation.
图2是现有直角坐标牛顿法形成雅可比矩阵的流程图。Fig. 2 is a flow chart of forming a Jacobian matrix by the existing rectangular coordinate Newton method.
图3是本发明直角坐标牛顿法潮流计算的流程图。Fig. 3 is a flow chart of the flow calculation of the Cartesian Newton method of the present invention.
图4是本发明形成雅可比矩阵和计算节点功率的流程图。Fig. 4 is a flow chart of forming Jacobian matrix and calculating node power in the present invention.
具体实施方式Detailed ways
下面结合附图对本发明进行进一步地说明,按照图3-4所示流程对一个修改后的445节点实际系统算例进行了计算。The present invention will be further described below in conjunction with the accompanying drawings, and a modified 445-node actual system calculation example is calculated according to the flow shown in Figures 3-4.
445节点实际大型电力系统有445个节点,544条支路,含有大量的小阻抗支路。为了对各种方法进行比较,把这些小阻抗支路改为正常阻抗支路以满足各种方法的要求。445 nodes The actual large-scale power system has 445 nodes and 544 branches, including a large number of small impedance branches. In order to compare various methods, these small impedance branches are changed to normal impedance branches to meet the requirements of various methods.
采用本发明和几种对比方法对445节点实际系统算例进行了计算,计算时收敛精度为0.00001。几种潮流计算算法分别为:The calculation example of the 445-node actual system is calculated by using the present invention and several comparison methods, and the convergence precision is 0.00001 during the calculation. Several power flow calculation algorithms are:
方法1:中国专利ZL201010509556.5方法改为直角坐标形式,采用Matlab语言实现。Method 1: The method of Chinese patent ZL201010509556.5 is changed to the form of Cartesian coordinates and implemented by Matlab language.
方法2:中国专利ZL201010509556.5方法改为直角坐标形式,采用Matlab语言实现,但解方程直接调用Matlab的解方程算法。Method 2: The method of the Chinese patent ZL201010509556.5 is changed to the form of Cartesian coordinates and implemented in Matlab language, but the equation solving algorithm of Matlab is directly called.
方法3:中国专利ZL201010509556.5方法改为直角坐标形式,采用Matlab语言实现,但解方程直接调用Matlab的解方程算法,同时对矩阵变量预定义维数。Method 3: The method of Chinese patent ZL201010509556.5 is changed to Cartesian coordinates and implemented in Matlab language, but the equation solving algorithm directly invokes Matlab's equation solving algorithm, and at the same time pre-defines the dimension of the matrix variable.
方法4:本发明方法。Method 4: the method of the present invention.
几种方法的计算时间见表1,计算时间不包括数据读入和输出及支路功率计算的时间。The calculation time of several methods is shown in Table 1, and the calculation time does not include the time for data input and output and branch power calculation.
表1 几种直角坐标牛顿法潮流计算计算时间比较Table 1 Comparison of calculation time of several Cartesian Newton methods for power flow calculation
从表1可见,中国专利ZL201010509556.5方法改为直角坐标形式时直接采用Matlab实现,计算时间很长;专利ZL201010509556.5方法改为直角坐标形式直接采用Matlab实现时,如果直接调用Matlab的解方程方法,计算速度就能大大提高,Matlab的解方程方法比较成熟稳定,有利于算法稳定性,Matlab的解方程方法的调用也非常简单,简化了编程,使程序更加清晰;如果同时对矩阵变量预定义维数,避免程序在执行过程中不断扩充矩阵的大小,可以大大提高计算速度。本发明的计算结果表明形成雅可比矩阵时采用矩阵运算技术可以进一步较大幅度地提高计算速度,程序也进一步简化。As can be seen from Table 1, when the method of Chinese patent ZL201010509556.5 is changed to Cartesian coordinates and directly adopts Matlab to realize, the calculation time is very long; method, the calculation speed can be greatly improved. Matlab's equation-solving method is relatively mature and stable, which is conducive to the stability of the algorithm. The call of Matlab's equation-solving method is also very simple, which simplifies programming and makes the program clearer; Defining the dimension and avoiding the continuous expansion of the size of the matrix during the execution of the program can greatly improve the calculation speed. The calculation result of the present invention shows that the calculation speed can be further greatly improved by adopting the matrix operation technology when forming the Jacobian matrix, and the program is further simplified.
本发明方法可以在任何版本的MATLAB编程语言实现,但建议使用较新版本的MATLAB语言。The method of the present invention can be implemented in any version of the MATLAB programming language, but it is recommended to use a newer version of the MATLAB language.
本发明不局限于本实施例,任何在本发明披露的技术范围内的等同构思或者改变,均列为本发明的保护范围。The present invention is not limited to this embodiment, and any equivalent ideas or changes within the technical scope disclosed in the present invention are listed in the protection scope of the present invention.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610864281.4A CN106356859B (en) | 2016-09-29 | 2016-09-29 | A kind of rectangular coordinate Newton load flow calculation method based on Matlab |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610864281.4A CN106356859B (en) | 2016-09-29 | 2016-09-29 | A kind of rectangular coordinate Newton load flow calculation method based on Matlab |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106356859A CN106356859A (en) | 2017-01-25 |
CN106356859B true CN106356859B (en) | 2018-12-18 |
Family
ID=57865794
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610864281.4A Expired - Fee Related CN106356859B (en) | 2016-09-29 | 2016-09-29 | A kind of rectangular coordinate Newton load flow calculation method based on Matlab |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106356859B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108427497A (en) * | 2017-02-15 | 2018-08-21 | 联想企业解决方案(新加坡)有限公司 | Method and system for calculating power loss exponent |
CN106856327B (en) * | 2017-02-28 | 2019-03-12 | 大连海事大学 | A kind of compensation of line series containing small impedance branches algorithm quicksort tidal current computing method |
CN107196306B (en) * | 2017-07-10 | 2019-10-01 | 大连海事大学 | Algorithm quicksort tidal current computing method based on Matlab sparse matrix |
CN107181260B (en) * | 2017-07-10 | 2019-10-29 | 大连海事大学 | Based on Matlab sparse matrix rectangular coordinate Newton load flow calculation method |
CN108233382B (en) * | 2017-11-29 | 2020-09-01 | 广西大学 | Method for extracting Jacobian matrix of rectangular coordinate tidal current equation |
CN109494748B (en) * | 2018-12-28 | 2021-10-26 | 大连海事大学 | Newton method load flow calculation method based on node type and modified Jacobian matrix |
CN109617080B (en) * | 2018-12-28 | 2021-10-26 | 大连海事大学 | Rectangular coordinate Newton method load flow calculation method based on improved Jacobian matrix |
CN110417021A (en) * | 2019-07-30 | 2019-11-05 | 大连海事大学 | A three-phase power flow calculation method for distribution network based on rapid extraction of Jacobian elements |
CN110336288B (en) * | 2019-07-30 | 2022-08-16 | 大连海事大学 | Three-phase power flow calculation method for power distribution network based on extraction of Jacobian elements through matrix operation |
CN110336287B (en) * | 2019-07-30 | 2022-08-12 | 大连海事大学 | A three-phase power flow calculation method for power distribution system based on Jacobian element extraction |
CN110417022A (en) * | 2019-07-30 | 2019-11-05 | 大连海事大学 | Calculation method of three-phase power flow in distribution network based on extraction of Jacobian elements by matrix multiplication |
CN113158126B (en) * | 2021-04-27 | 2023-05-05 | 广西大学 | Calculation method for extracting complex power equation hessian matrix of polar coordinate node |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101621200A (en) * | 2009-08-04 | 2010-01-06 | 大连海事大学 | Rectangular coordinate Newton load flow calculation method |
CN101976838A (en) * | 2010-10-15 | 2011-02-16 | 大连海事大学 | Newton-process power flow calculation method for study purpose |
CN103441496A (en) * | 2013-09-04 | 2013-12-11 | 博爱县电业公司 | MATLAB-based electric-power-system load-flow calculation method |
WO2014186187A1 (en) * | 2013-05-14 | 2014-11-20 | Rensselaer Polytechnic Institute | Methods of computing steady-state voltage stability margins of power systems |
-
2016
- 2016-09-29 CN CN201610864281.4A patent/CN106356859B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101621200A (en) * | 2009-08-04 | 2010-01-06 | 大连海事大学 | Rectangular coordinate Newton load flow calculation method |
CN101976838A (en) * | 2010-10-15 | 2011-02-16 | 大连海事大学 | Newton-process power flow calculation method for study purpose |
WO2014186187A1 (en) * | 2013-05-14 | 2014-11-20 | Rensselaer Polytechnic Institute | Methods of computing steady-state voltage stability margins of power systems |
CN103441496A (en) * | 2013-09-04 | 2013-12-11 | 博爱县电业公司 | MATLAB-based electric-power-system load-flow calculation method |
Also Published As
Publication number | Publication date |
---|---|
CN106356859A (en) | 2017-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106356859B (en) | A kind of rectangular coordinate Newton load flow calculation method based on Matlab | |
CN104037764B (en) | The rectangular coordinate Newton load flow calculation method that a kind of Jacobian matrix changes | |
CN102013680B (en) | Fast decoupled flow calculation method for power systems | |
CN106602570B (en) | A kind of algorithm quicksort tidal current computing method based on Matlab | |
CN106229988B (en) | A kind of polar coordinates Newton load flow calculation method based on Matlab | |
CN107196306B (en) | Algorithm quicksort tidal current computing method based on Matlab sparse matrix | |
CN102609598B (en) | A Method of Electromagnetic Transient Simulation for Large Power System | |
CN104993491B (en) | Linear power flow calculation method with voltage and reactive power being taken into consideration | |
CN107194131B (en) | Polar Newton's Method Power Flow Calculation Method Based on Matlab Sparse Matrix | |
CN110336288B (en) | Three-phase power flow calculation method for power distribution network based on extraction of Jacobian elements through matrix operation | |
CN106709243A (en) | Small-impedance branch network contained compensation-method polar coordinate Newton method tidal current calculation method | |
Dai et al. | A multiple scale time domain collocation method for solving non-linear dynamical system | |
CN109617080A (en) | A Newton's Method for Calculating Power Flow in Cartesian Coordinates Based on Improved Jacobian Matrix | |
CN106532712B (en) | Compensation Method Cartesian Coordinate Newton's Method of Power Flow Calculation Method for Power Networks with Small Impedance Branch | |
Borzacchiello et al. | Unified formulation of a family of iterative solvers for power systems analysis | |
CN107181260B (en) | Based on Matlab sparse matrix rectangular coordinate Newton load flow calculation method | |
CN110417022A (en) | Calculation method of three-phase power flow in distribution network based on extraction of Jacobian elements by matrix multiplication | |
CN104218577B (en) | A kind of three-phase load flow of active distribution network computational methods based on node voltage | |
CN110336287B (en) | A three-phase power flow calculation method for power distribution system based on Jacobian element extraction | |
CN107658880B (en) | Calculation Method of Coefficient Matrix of Fast Decomposition Method Based on Incidence Matrix Operation | |
CN106712029A (en) | Small-impedance branch PQ endpoint variable Jacobian matrix newton-method power flow calculation method | |
CN104156574B (en) | Based on the power distribution network PV curve generation methods for improving Continuation Method | |
CN107704686B (en) | Matrix operation method for rapid decomposition method load flow calculation correction equation coefficient matrix | |
CN107944682A (en) | Load flow calculation admittance matrix computational methods based on Matlab matrix operations | |
CN107834562B (en) | Algorithm quicksort coefficient matrix calculating method based on Matlab matrix operation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20181218 Termination date: 20190929 |
|
CF01 | Termination of patent right due to non-payment of annual fee |