Power Flow Studies Using MATLAB
9532 words (38 pages) Essay
23rd Sep 2019 Mathematics Reference this
Disclaimer: This work has been submitted by a university student. This is not an example of the work produced by our Essay Writing Service. You can view samples of our professional work here.
Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.
Power Flow Studies Using MATLAB
Executive Summary
The report aims to show the differences between NewtonRaphson and GaussSeidel methods by using them to analyse a power flow system. During the study in a twobus system, with a slack bus and PQ bus, two convergence tolerances were used. The case study 1 compares the iterative process of the two methods for a voltage tolerance convergence and case study 2 compares the iterative process of the two methods for a power mismatch convergence. The main points that investigated are the results and the speed of convergence. Although, both methods converge to the same values, NewtonRaphson converges exponentially and compared to GaussSeidel which converges linearly, needs only around half iterations to return the expected result.
Table of Contents
Power Flow Study Results and Analysis
Introduction
A load or power flow analysis is a computational procedure required to determine the sinusoidal steady state of the entire power system. The mathematical solution includes a system of nonlinear algebraic equations, which during an iterative process, the values converge to only one solution. The outcome of the power flow analysis is the acquisition of the voltage magnitudes and angles at each bus. Once the voltage magnitudes and angles at each bus have been acquired using power flow analysis, the real and reactive power at each branch of the power system can be computed. Furthermore, losses in particular lines can be computed by investigating the difference between the power flow in the sending and receiving ends and by determining over and under load conditions, the appropriate solution is taken into consideration. In the power industry, load flow analysis is used on a daily basis as it is essential in determining the faultfree, stable and economical operation of existing power systems, as well as for future expansion of power systems.
A twobus system is given in Figure 1 below.
Figure 1: Twobus System
The power system consists of a slack bus, which is illustrated as bus 1 and a load bus, which is illustrated as bus 2.
Bus 1 is a slack bus (or swing, or reference) and its main role is to be the phase angle reference of the system. It also balances the active power P and reactive power Q in a system by injection in circumstances when is required. It is a reference bus for which the voltage magnitude and angle are input data ${(V}_{1}\textcolor[rgb]{}{\angle}{\textcolor[rgb]{}{\delta}}_{\textcolor[rgb]{}{1}}\textcolor[rgb]{}{)}$
and the active power P and reactive power Q are the unknown quantities need to be calculated by the power flow analysis. Usually the ${V}_{1}\textcolor[rgb]{}{\angle}{\textcolor[rgb]{}{\delta}}_{\textcolor[rgb]{}{1}}$
is $1.0\textcolor[rgb]{}{\angle}\textcolor[rgb]{}{0}\textcolor[rgb]{}{\xb0}$
, however in this assignment should be considered as $1.06\textcolor[rgb]{}{\angle}\textcolor[rgb]{}{0}\textcolor[rgb]{}{\xb0}$
.
Bus 2 is a load (PQ) bus which absorbs power from the system. The active power P and reactive power Q are quantified and voltage magnitude V and angle δ need to be computed.
Background Theory
NewtonRaphson Method
The NewtonRaphson method is a powerful method for maximising an objective function by using quadratic convergence of approximations [1].
A number of nonlinear algebraic equations is given in matrix format
$f\left(x\right)=\left[\begin{array}{c}{f}_{1}\left(x\right)\\ {f}_{2}\left(x\right)\\ \dots \end{array}\right]=\mathit{y}(1.1)$
where x and y are N vectors and $f\left(x\right)$
is an N vector of functions. The aim is to solve for x, accounting that $f\left(x\right)$
and y are given. By rewriting eq. 1.1
$y\u2013f\left(x\right)=0\mathit{}(1.2)$
Then, by adding Dx to both of the eq. 1.2
$y\u2013f\left(x\right)+\mathit{Dx}=\mathit{Dx}(1.3)$
, where D is a square NxN invertible matrix. Then, multiplying by ${D}^{\u20131}$
in both parts
$x+{D}^{\u20131}\left(y\u2013f\left(x\right)\right)=\mathit{x}(1.4)$
The values of x on the left side are used to calculate the next values of x on the right side, so that
$x\left(i+1\right)=x\left(i\right)+{D}^{\u20131}\left(y\u2013f\left(x\left(i\right)\right)\right)\mathit{}(1.5)$
For nonlinear equations, it is necessary that matrix D must be specified. One of the methods of specifying matrix D called the NewtonRaphson method.
The NewtonRaphson method is based on the Taylor series expansion of $\mathit{f}\left(x\right)$
.
$y=f\left({x}_{0}\right)+\frac{\mathit{df}}{\mathit{dx}}{}_{x={x}_{0}}\left(x\u2013{x}_{0}\right)\dots \mathit{}(1.6)$
By neglecting the higher order terms in eq 1.6
$x={x}_{0}+{\left[\frac{\mathit{df}}{\mathit{dx}}{}_{x={x}_{0}}\right]}^{\u20131}\left(y\u2013f\left({x}_{0}\right)\right)\mathit{}(1.7)$
During the Newton Raphson iteration process, ${x}_{0}$
is been replaced by the old value x and x by the new value $\mathit{x}\left(i+1\right).$
To continue to the next step, the $N\times N$
Jacobian matrix is used.
$J\left(i\right)=\frac{\mathit{df}}{\mathit{dx}}{}_{x={x}_{\left(i\right)}}=\left[\begin{array}{cccc}\frac{\partial {f}_{1}}{\partial {x}_{1}}& \frac{\partial {f}_{1}}{\partial {x}_{2}}& \dots & \frac{\partial {f}_{1}}{\partial {x}_{N}}\\ \frac{\partial {f}_{2}}{\partial {x}_{1}}& \frac{\partial {f}_{2}}{\partial {x}_{2}}& \dots & \frac{\partial {f}_{2}}{\partial {x}_{N}}\\ \dots & \dots & \dots & \dots \\ \frac{\partial {f}_{N}}{\partial {x}_{1}}& \frac{\partial {f}_{N}}{\partial {x}_{2}}& \dots & \frac{\partial {f}_{N}}{\partial {x}_{N}}\end{array}\right]\mathit{}(1.8)$
where the elements inside the Jacobian matrix are partial derivatives. Therefore, by substituting the Jacobian matrix into eq. 1.7.
$x\left(i+1\right)=x\left(i\right)+{{J}^{\u20131}}_{\left(i\right)}\left(y\u2013f\left(x\left(i\right)\right)\right)$
(1.9)
Instead of computing the inverse of the Jacobian matrix ${J}^{\u20131}$
, it can be rewritten as :
$J\left(i\right)\Delta x\left(i\right)=\Delta y\left(i\right)\mathit{}(1.10)$
, where $\mathit{}\Delta x\left(i\right)=x\left(i+1\right)\u2013x\left(i\right)\mathit{}\left(1.11\right)\mathit{and}\Delta y\left(i\right)=y\u2013f\left(x\left(i\right)\right)\mathit{}(1.12)$
The NewtonRaphson method converges to the result in each iteration and depending on the convergence tolerance we can select the precision needed. The steps below show the process during each iteration.
Step 1 By using the eq. 1.12, we compute $\Delta y\left(i\right)$
Step 2 By using the eq. 1.8, we compute $J\left(i\right)$
Step 3 By using Gauss elimination and back substitution, we solve the eq. 1.10 in order to find $\Delta x\left(i\right)$
Step 4 Finally we compute $x\left(i+1\right)$
from eq. 1.11. Compare $x\left(i+1\right)$
with $x\left(i\right)$
to find the convergence tolerance to determine the precision of the result. [2]
Power Mismatch
The equation for complex power expressed as ${S}_{i}$
:
${S}_{i}={P}_{i}+j{Q}_{i}={V}_{i}{{I}_{i}}^{*}\mathit{}(1.13)$
From equation 1.13, the current injection into any bus I can be expressed as:
${I}_{i}=\sum _{k=1}^{n}{Y}_{\mathit{ik}}{V}_{k}\mathit{}(1.14)$
where, ${Y}_{\mathit{ik}}$
terms are admittance matrix elements. Then, we substitute eq. 1.14 into eq. 1.13:
${{S}_{i}={V}_{i}\left(\sum _{k=1}^{n}{Y}_{\mathit{ik}}{V}_{k}\right)}^{*}\mathit{}(1.15)$
where, V_{k} is a phasor, with magnitude and angle ${V}_{i}=\left{V}_{i}\right\textcolor[rgb]{}{\angle}{\theta}_{i}$
. Moreover, the admittance matrix is complex with real and imaginary parts ${Y}_{\mathit{ik}}={G}_{\mathit{ik}}+j{B}_{\mathit{ik}}$
. Then, by rewriting eq. X as
${S}_{i}={V}_{i}\sum _{k=1}^{n}{{Y}_{\mathit{ik}}}^{*}{{V}_{k}}^{*}=\left{V}_{i}\right\textcolor[rgb]{}{\angle}{\theta}_{i}\sum _{k=1}^{n}{{(G}_{\mathit{ik}}+j{B}_{\mathit{ik}})}^{*}{\left({V}_{k}\textcolor[rgb]{}{\angle}{\theta}_{k}\right)}^{*}\mathit{}(1.16)\mathit{}$
$=\left{V}_{i}\right\textcolor[rgb]{}{\angle}{\theta}_{i}\sum _{k=1}^{n}{(G}_{\mathit{ik}}\u2013j{B}_{\mathit{ik}}\left)\right({V}_{k}\left\textcolor[rgb]{}{\angle}\textcolor[rgb]{}{\u2013}{\theta}_{k}\right)\mathit{}(1.17)$
$=\sum _{k=1}^{n}\left{V}_{i}\right\textcolor[rgb]{}{\angle}{\theta}_{i}\left({V}_{k}\right\textcolor[rgb]{}{\angle}\textcolor[rgb]{}{\u2013}{\theta}_{k}){(G}_{\mathit{ik}}\u2013j{B}_{\mathit{ik}})\mathit{}(1.18)$
$=\sum _{k=1}^{n}\left(\right{V}_{i}\left{V}_{k}\right\textcolor[rgb]{}{\angle}{\theta}_{i}\textcolor[rgb]{}{\u2013}{\theta}_{k}){(G}_{\mathit{ik}}\u2013j{B}_{\mathit{ik}})\mathit{}(1.19)$
A phasor may be also expressed as a function of sinusoids ${V}_{i}=\left{V}_{i}\right\textcolor[rgb]{}{\angle}{\theta}_{i}=\left{V}_{i}\right\left(\mathit{cos\theta}+\mathit{jsin}\theta \right).$
Then by rewriting the eq. 1.19 we get:
${S}_{i}=\sum _{k=1}^{n}\left{V}_{i}\right{V}_{k}\left\left\{\left(\mathrm{cos}\left({\theta}_{i}\textcolor[rgb]{}{\u2013}{\theta}_{k}\right)+\mathit{jsin}\left({\theta}_{i}\textcolor[rgb]{}{\u2013}{\theta}_{k}\right)\right){(G}_{\mathit{ik}}\u2013j{B}_{\mathit{ik}}\right)\right\}\mathit{}(1.20)$
Then by performing the multiplications inside the parenthesis and by splitting the equation into real and imaginary parts, we can find the active ( ${P}_{i}$
) and reactive ( ${Q}_{i}$
) power.
${S}_{i}={P}_{i}+j{Q}_{i}\mathit{}(1.21)$
${P}_{i}=\mathit{Re}\left({V}_{i}{I}_{i}\right)=\sum _{k=1}^{n}{\left{V}_{i}\rightV}_{k}\left({G}_{\mathit{ik}}\mathit{cos}{\theta}_{ik}+{B}_{\mathit{ik}}\mathit{sin}{\theta}_{ik}\right)\mathit{}(1.22)$
${Q}_{i}=\mathit{Im}\left({V}_{i}{I}_{i}\right)=\sum _{k=1}^{n}{\left{V}_{i}\rightV}_{k}\left({G}_{\mathit{ik}}\mathit{sin}{\theta}_{ik}+{B}_{\mathit{ik}}\mathit{cos}{\theta}_{ik}\right)\mathit{}(1.23)$
These two equations called the power flow equations and are used as fundamental equations for load flow analysis.
Jacobian matrix for a twobus power system:
$\mathit{Jacobian\; Matrix}=\left[\begin{array}{cc}\frac{\partial {P}_{2}}{\partial {\theta}_{2}}& \frac{\partial {P}_{2}}{\partial {V}_{2}}\\ \frac{\partial {Q}_{2}}{\partial {\theta}_{2}}& \frac{\partial {Q}_{2}}{\partial {V}_{2}}\end{array}\right]\mathit{}(1.24)$
$\frac{\partial {P}_{2}}{\partial {\theta}_{2}}={V}_{1}\left{V}_{2}\right{B}_{21}\mathrm{cos}\left({\theta}_{2}\u2013{\theta}_{1}\right)\mathit{}(1.25)\mathit{}$
$\frac{\partial {P}_{2}}{\partial {V}_{2}}={V}_{1}\left{B}_{21}\mathit{sin}\left({\theta}_{2}\u2013{\theta}_{1}\right)\mathit{}\right(1.26)$
$\frac{\partial {Q}_{2}}{\partial {\theta}_{2}}=\left{V}_{1}\right{V}_{2}{B}_{21}\mathrm{sin}\left({\theta}_{2}\u2013{\theta}_{1}\right)\mathit{}(1.27)$
$\frac{\partial {Q}_{2}}{\partial {V}_{2}}=\u2013\left{V}_{1}\right{B}_{21}\mathrm{cos}\left({\theta}_{2}\u2013{\theta}_{1}\right)\u2013\left{V}_{2}\right{B}_{22}\mathit{}(1.28)$
GaussSeidel Method
The GaussSeidel method used as an iterative process to solve a square system of linear equations. It uses the form
${x}_{i}={f}_{i}\left({x}_{1,}{x}_{2},{x}_{3},\dots {x}_{N}\right)\mathit{}(2.1)$
To do a power flow analysis into a power system, a set of linear equations $I={Y}_{\mathit{bus}}V$
analogous to y=Ax needs to be solved. For every load bus load bus, ${I}_{i}$
can be calculated from
${I}_{i}=\frac{{P}_{i}\u2013j{Q}_{i}}{{V}_{i}^{*}}\mathit{}(2.2)$
The GaussSeidel method equation is ${x}_{i}\left(n+1\right)=\frac{1}{{A}_{\mathit{ii}}}\left[{y}_{k}\u2013\sum _{k=1}^{i\u20131}{A}_{\mathit{ik}}{x}_{k}\left(n+1\right)\u2013\sum _{k=i+1}^{i\u20131}{A}_{\mathit{ik}}{x}_{k}\left(n\right)\right]\mathit{}(2.3)$
By using eq. 2.3 and applying it to the nodal equations
${V}_{i}\left(n+1\right)=\frac{1}{{Y}_{\mathit{ii}}}\left[\frac{{P}_{i}\u2013j{Q}_{i}}{{V}_{i}^{*}\left(n\right)}\u2013\sum _{k=1}^{i\u20131}{Y}_{\mathit{ik}}{V}_{k}\left(n+1\right)\u2013\sum _{k=i+1}^{i\u20131}{Y}_{\mathit{ik}}{V}_{k}\left(n\right)\right]\mathit{}(2.4)$
Power Flow Study Results and Analysis
Case Study 1
This case study will focus on the comparison of the NewtonRaphson and GaussSeidel methods by drawing a relationship ${\mathrm{log}}_{10}(\mathrm{max}\left{V}_{i}^{k+1}\u2013{V}_{i}^{k}\right)$
vs number of iterations using a voltage convergence tolerance of ${\epsilon}_{p}={10}^{\u20136}:\mathrm{max}\left{V}_{i}^{k+1}\u2013{V}_{i}^{k}\right{\epsilon}_{p}$
.
Figure 2: NewtonRaphson method with voltage convergence tolerance
Figure 3: GaussSeidel method with voltage convergence tolerance
${\mathbf{log}}_{\mathit{10}}\mathbf{(}\mathbf{max}\left{\mathit{V}}_{\mathit{i}}^{\mathit{k}\mathit{+}\mathit{1}}\mathit{\u2013}{\mathit{V}}_{\mathit{i}}^{\mathit{k}}\right\mathit{)}$ 

Iterations(k) 
NewtonRaphson Convergence 
GaussSeidel Convergence 
1 
7.96567e01 
7.82716e01 
2 
1.85971e+00 
1.59734e+00 
3 
3.72734e+00 
2.42426e+00 
4 
7.45094e+00 
3.24175e+00 
5 
4.05939e+00 

6 
4.87682e+00 

7 
5.69426e+00 

8 
6.51169e+00 
Table 1: Comparison of NewtonRaphson and GaussSeidel solutions with voltage convergence tolerance
NewtonRaphson 
GaussSeidel 

Active Power Injection at Bus 2 
8.00000e01 
8.00000e01 
Reactive Power Injection at Bus 2 
2.22751e01 
2.22752e01 
Voltage Magnitude at Bus 2 
1.02910e+00 
1.02910e+00 
Voltage Angle at Bus 2 (rad) 
1.47206e01 
1.472059e01 
Table 2: Comparison of the Active and Reactive Power Injection values and the Voltage magnitude and angle values between the NewtonRaphson and GaussSeidel solutions
The two graphs above show the voltage convergence of the voltage at bus 2 using Newton Raphson and GaussSeidel method respectively. For the GaussSeidel solution, it takes eight iterations till the value of the change between each iteration ( $\mathrm{max}\left{V}_{i}^{k+1}\u2013{V}_{i}^{k}\right$
) is below the voltage convergence tolerance ( ${\epsilon}_{p}={10}^{\u20136}$
). From the other side, NewtonRaphson method converges in half iterations, showing the quadratic convergence of the method, in contrast with the GaussSeidel method, which converges linearly. The difference between the two methods can be shown in table 1, as the difference between each iteration for the GaussSeidel method is the same, comparatively with the NewtonRaphson which the difference doubles in each iteration. Furthermore, at the beginning both methods have the same gradient, but NewtonRaphson’s gradient sharply converges closer to the result. Finally, there is no difference in active and reactive power and voltage magnitude and angle calculated by both methods. This could be due to restriction of decimal places and little changes would exist if we had more decimal places.
Case Study 2
This case study will focus on the comparison of the NewtonRaphson and GaussSeidel methods by drawing a relationship ${\mathrm{log}}_{10}(\mathrm{max}\left(\left{\Delta P}_{2},{\Delta Q}_{2}\right\right)$
vs number of iterations using a power convergence mismatch of ${\epsilon}_{p}={10}^{\u20136}$
.
Figure 4: NewtonRaphson method with power mismatch tolerance
Figure 5: GaussSeidel method with power mismatch tolerance
LOG10(Max deltaP deltaQ) 

Iterations(k) 
NewtonRaphson Convergence 
GaussSeidel Convergence 
1 
9.69100e02 
9.69100e02 
2 
1.14339e+00 
9.06578e01 
3 
3.01934e+00 
1.72616e+00 
4 
6.75115e+00 
2.56041e+00 
5 
3.36113e+00 

6 
4.19571e+00 

7 
4.99599e+00 

8 
5.83058e+00 

9 Table 3: Comparison of NewtonRaphson and GaussSeidel solutions with power mismatch tolerance 
6.63085e+00 
NewtonRaphson 
GaussSeidel 

Active Power Injection at Bus 2 
8.00000e01 
8.00000e01 
Reactive Power Injection at Bus 2 
2.22751e01 
2.22752e01 
Voltage Magnitude at Bus 2 
1.02910e+00 
1.02910e+00 
Voltage Angle at Bus 2 (rad) 
1.47206e01 
1.472059e01 
Table 4: Comparison of the Active and Reactive Power Injection values and the Voltage magnitude and angle values between the NewtonRaphson and GaussSeidel solutions
The two graphs above show the power mismatch convergence using Newton Raphson and GaussSeidel method respectively. For the GaussSeidel solution, it takes nine iterations until the value of the change between each iteration is below the power mismatch tolerance (
Our academic experts are ready and waiting to assist with any writing project you may have. From simple essay plans, through to full dissertations, you can guarantee we have a service perfectly matched to your needs.
View our services). From the other side, NewtonRaphson method converges in four iterations, showing the quadratic convergence of the method, in contrast with the GaussSeidel method, which converges linearly. The difference between the two methods can be shown in table 3, as the difference between each iteration for the GaussSeidel method is the same, comparatively with the NewtonRaphson which doubles in each iteration. Furthermore, at the beginning both methods have the same gradient, but NewtonRaphson’s gradient sharply converges closer to the result. Finally, there is no difference in active and reactive power and voltage magnitude and angle calculated by both methods. This could be due to restriction of decimal places and little changes would exist if we had more decimal places.
Analysis of the results and convergence characteristics acquired by the NewtonRaphson and GaussSeidel methods
The NewtonRaphson method needs almost half iterations to converge, in contrast with the GaussSeidel method. GaussSeidel converges closer to the result diagonally, resulting in a linear convergence, which takes more iterations to compute the expected result. However, Newton Raphson method converges exponentially and has an abrupt inclination every iteration, and this explains the quadratic convergence of this method. By comparing the number of iterations of these two methods, it is clear that NewtonRaphson is much more effective. Although the NewtonRaphson method needs fewer iterations, it needs more time per iteration due to the computation of the Jacobian matrix in each iteration. However, both methods accurately converge to the same result with the precision of five decimal places and thus both can be used to provide accurate results in a twobus power system analysis.
Conclusions
During the study undertaken into a twobus power system, valuable information was acquired for the NewtonRaphson and GaussSeidel methods. The report demonstrateS the advantages and disadvantages of each method, as well as, analyse the results and convergence characteristics of these two methods acquired by solving a twobus power system. To summarise, NewtonRaphson method is more efficient especially if used in large power system with advanced complexity, due to its performance. From the other side, GaussSeidel needs a large number of iterations compared TO NewtonRaphson and so on the use in large power systems is avoided. Moreover, this report enhances the use of MATLAB for calculating system data, as the manual computation of power flow analysis is prone to human errors. Finally, an advanced level of understanding was achieved in Power Systems and further interest has been developed.
References
[1] https://cs.nyu.edu/overton/NumericalComputing/newton.pdf [accessed 25 January 2019]
[2] Glover, J., Overbye, T. and Sarma, M. (n.d.). Power system analysis & design. pp.321323.
[3] Prof Zhang, XiaoPing, LH Power Electronics and Power Systems Lecture 7 – Power flow analysis (I). [Online] [Accessed 18 January 2015].
[4] Prof Zhang, XiaoPing, LH Power Electronics and Power Systems Lecture 8 – Power flow analysis (II). [Online] [Accessed 18 January 2015].
[3] http://portal.unimap.edu.my/portal/page/portal30/Lecture%20Notes/KEJURUTERAAN_SISTEM_ELEKTRIK/Semester%202%20Sidang%20Akademik%2020162017/EET%20308%20%20Power%20System%20Analysis/Tutorial/Tutorial%20Power%20System%20Analysis%20%20Power%20Flow%20AnalysisSolution.pdf [accessed 25 January 2019]
Cite This Work
To export a reference to this article please select a referencing stye below:
Related Services
View allDMCA / Removal Request
If you are the original writer of this essay and no longer wish to have your work published on the UKDiss.com website then please: