CHAPTER 4
LOAD FLOW STUDIES
Load flow studies are one of the most important aspects of power system planning and operation. The load flow gives us the sinusoidal steady state of the entire system − voltages, real and reactive power generated and absorbed and line losses. Since the load is a static quantity and it is the power that flows through transmission lines, the purists prefer to call this Power Flow studies rather than load flow studies. We shall however stick to the original nomenclature of load flow.
Through the load flow studies we can obtain the voltage magnitudes and angles at each bus in the steady state. This is rather important as the magnitudes of the bus voltages are required to be held within a specified limit. Once the bus voltage magnitudes and their angles are computed using the load flow, the real and reactive power flow through each line can be computed. Also based on the difference between power flow in the sending and receiving ends, the losses in a particular line can also be computed. Furthermore, from the line flow we can also determine the over and under load conditions.
The steady state power and reactive powers supplied by a bus in a power network are expressed in terms of nonlinear algebraic equations. We therefore would require iterative methods for solving these equations. In this chapter we shall discuss two of the load flow methods. We shall also delineate how to interpret the load flow results.
4.1 REAL AND REACTIVE POWER INJECTED IN A BUS
For the formulation of the real and reactive power entering a bus, we need to define the following quantities. Let the voltage at the ith bus be denoted by
( )iiiiii jVVV δδδ sincos +=∠= (4.1) Also let us define the self admittance at bus-i as
( ) iiiiiiiiiiiiiiii jBGjYYY +=+=∠= θθθ sincos (4.2) Similarly the mutual admittance between the buses i and j can be written as
( ) ijijijijijijijij jBGjYYY +=+=∠= θθθ sincos (4.3)
Let the power system contains a total number of n buses. The current injected at bus-i is given as
∑=
=
+++=n
kkik
niniii
VY
VYVYVYI
1
2211 L
(4.4)
2.2
It is to be noted we shall assume the current entering a bus to be positive and that leaving the bus to be negative. As a consequence the power and reactive power entering a bus will also be assumed to be positive. The complex power at bus-i is then given by
( ) ( )( )
( )( )( )∑
∑
∑
=
=
=
∗∗
++−=
++−=
==−
n
kkkikikiikiik
n
kkkikikkikiii
n
kkikiiiii
jjjVVY
jjVYjV
VYVIVjQP
1
1
1
sincossincossincos
sincossincossincos
δδθθδδ
δδθθδδ (4.5)
Note that
( )( )( )( ) ( ) ( )[ ]
( ) ( )ikikikik
kikkikii
kkikikii
jjj
jjj
δδθδδθδθδθδδδδθθδδ
−++−+=+++−=
++−
sincossincossincos
sincossincossincos
Therefore substituting in (4.5) we get the real and reactive power as
( )∑=
−+=n
kikikkiiki VVYP
1cos δδθ (4.6)
( )∑=
−+−=n
kikikkiiki VVYQ
1sin δδθ (4.7)
4.2 CLASSIFICATION OF BUSES
For load flow studies it is assumed that the loads are constant and they are defined by
their real and reactive power consumption. It is further assumed that the generator terminal voltages are tightly regulated and therefore are constant. The main objective of the load flow is to find the voltage magnitude of each bus and its angle when the powers generated and loads are pre-specified. To facilitate this we classify the different buses of the power system as listed below.
1. Load Buses: In these buses no generators are connected and hence the generated real power PGi and reactive power QGi are taken as zero. The load drawn by these buses are defined by real power − PLi and reactive power − QLi in which the negative sign accommodates for the power flowing out of the bus. This is why these buses are sometimes referred to as P-Q bus. The objective of the load flow is to find the bus voltage magnitude Vi and its angle δi.
2. Voltage Controlled Buses: These are the buses where generators are connected.
Therefore the power generation in such buses is controlled through a prime mover while the terminal voltage is controlled through the generator excitation. Keeping the input power constant through turbine-governor control and keeping the bus voltage constant using automatic voltage regulator, we can specify constant PGi and Vi for these buses.
2.3
This is why such buses are also referred to as P-V buses. It is to be noted that the reactive power supplied by the generator QGi depends on the system configuration and cannot be specified in advance. Furthermore we have to find the unknown angle δi of the bus voltage.
3. Slack or Swing Bus: Usually this bus is numbered 1 for the load flow studies. This bus
sets the angular reference for all the other buses. Since it is the angle difference between two voltage sources that dictates the real and reactive power flow between them, the particular angle of the slack bus is not important. However it sets the reference against which angles of all the other bus voltages are measured. For this reason the angle of this bus is usually chosen as 0°. Furthermore it is assumed that the magnitude of the voltage of this bus is known.
Now consider a typical load flow problem in which all the load demands are known. Even if the generation matches the sum total of these demands exactly, the mismatch between generation and load will persist because of the line I2R losses. Since the I2R loss of a line depends on the line current which, in turn, depends on the magnitudes and angles of voltages of the two buses connected to the line, it is rather difficult to estimate the loss without calculating the voltages and angles. For this reason a generator bus is usually chosen as the slack bus without specifying its real power. It is assumed that the generator connected to this bus will supply the balance of the real power required and the line losses.
4.3 PREPARATION OF DATA FOR LOAD FLOW
Let real and reactive power generated at bus-i be denoted by PGi and QGi respectively.
Also let us denote the real and reactive power consumed at the ith bus by PLi and QLi respectively. Then the net real power injected in bus-i is
LiGiinji PPP −=, (4.8) Let the injected power calculated by the load flow program be Pi,calc. Then the mismatch between the actual injected and calculated values is given by
calciLiGicalciinjii PPPPPP ,,, −−=−=∆ (4.9) In a similar way the mismatch between the reactive power injected and calculated values is given by
calciLiGicalciinjii QQQQQQ ,,, −−=−=∆ (4.10) The purpose of the load flow is to minimize the above two mismatches. It is to be noted that (4.6) and (4.7) are used for the calculation of real and reactive power in (4.9) and (4.10). However since the magnitudes of all the voltages and their angles are not known a priori, an iterative procedure must be used to estimate the bus voltages and their angles in order to calculate the mismatches. It is expected that mismatches ∆Pi and ∆Qi reduce with each iteration and the load flow is said to have converged when the mismatches of all the buses become less than a very small number.
2.4
For the load flow studies we shall consider the system of Fig. 4.1, which has 2 generator and 3 load buses. We define bus-1 as the slack bus while taking bus-5 as the P-V bus. Buses 2, 3 and 4 are P-Q buses. The line impedances and the line charging admittances are given in Table 4.1. Based on this data the Ybus matrix is given in Table 4.2. This matrix is formed using the same procedure as given in Section 3.1.3. It is to be noted here that the sources and their internal impedances are not considered while forming the Ybus matrix for load flow studies which deal only with the bus voltages.
Fig. 4.1 The simple power system used for load flow studies.
Table 4.1 Line impedance and line charging data of the system of Fig. 4.1.
Line (bus to bus) Impedance Line charging (Y/2)
1-2 0.02 + j0.10 j0.030
1-5 0.05 + j0.25 j0.020
2-3 0.04 + j0.20 j0.025
2-5 0.05 + j0.25 j0.020
3-4 0.05 + j0.25 j0.020
3-5 0.08 + j0.40 j0.010
4-5 0.10 + j0.50 j0.075
Table 4.2 Ybus matrix of the system of Fig. 4.1.
1 2 3 4 5
1 2.6923 − j13.4115 − 1.9231 + j9.6154 0 0 − 0.7692 + j3.8462
2 − 1.9231 + j9.6154 3.6538 − j18.1942 − 0.9615 + j4.8077 0 − 0.7692 + j3.8462
3 0 − 0.9615 + j4.8077 2.2115 − j11.0027 − 0.7692 + j3.8462 − 0.4808 + j2.4038
4 0 0 − 0.7692 + j3.8462 1.1538 − j5.6742 − 0.3846 + j1.9231
5 − 0.7692 + j3.8462 − 0.7692 + j3.8462 − 0.4808 + j2.4038 − 0.3846 + j1.9231 2.4038 − j11.8942
The bus voltage magnitudes, their angles, the power generated and consumed at each
bus are given in Table 4.3. In this table some of the voltages and their angles are given in boldface letters. This indicates that these are initial data used for starting the load flow program. The power and reactive power generated at the slack bus and the reactive power generated at the P-V bus are unknown. Therefore each of these quantities are indicated by a dash (−). Since we do not need these quantities for our load flow calculations, their initial
2.5
estimates are not required. Also note from Fig. 4.1 that the slack bus does not contain any load while the P-V bus 5 has a local load and this is indicated in the load column.
Table 4.3 Bus voltages, power generated and load – initial data.
Bus voltage Power generated Load Bus no.
Magnitude (pu) Angle (deg) P (MW) Q (MVAr) P (MW) P (MVAr)
1 1.05 0 − − 0 0
2 1 0 0 0 96 62
3 1 0 0 0 35 14
4 1 0 0 0 16 8
5 1.02 0 48 − 24 11
4.4 LOAD FLOW BY GAUSS-SEIDEL METHOD
The basic power flow equations (4.6) and (4.7) are nonlinear. In an n-bus power
system, let the number of P-Q buses be np and the number of P-V (generator) buses be ng such that n = np + ng + 1. Both voltage magnitudes and angles of the P-Q buses and voltage angles of the P-V buses are unknown making a total number of 2np + ng quantities to be determined. Amongst the known quantities are 2np numbers of real and reactive powers of the P-Q buses, 2ng numbers of real powers and voltage magnitudes of the P-V buses and voltage magnitude and angle of the slack bus. Therefore there are sufficient numbers of known quantities to obtain a solution of the load flow problem. However, it is rather difficult to obtain a set of closed form equations from (4.6) and (4.7). We therefore have to resort to obtain iterative solutions of the load flow problem.
At the beginning of an iterative method, a set of values for the unknown quantities are chosen. These are then updated at each iteration. The process continues till errors between all the known and actual quantities reduce below a pre-specified value. In the Gauss-Seidel load flow we denote the initial voltage of the ith bus by Vi
(0), i = 2, …, n. This should read as the voltage of the ith bus at the 0th iteration, or initial guess. Similarly this voltage after the first iteration will be denoted by Vi
(1). In this Gauss-Seidel load flow the load buses and voltage controlled buses are treated differently. However in both these type of buses we use the complex power equation given in (4.5) for updating the voltages. Knowing the real and reactive power injected at any bus we can expand (4.5) as
[ ]niniiiiii
n
kkikiinjiinji VYVYVYVYVVYVjQP +++++==− ∗
=
∗∑ LL22111
,, (4.11)
We can rewrite (4.11) as
−−−−
−= ∗ ninii
i
injiinji
iii VYVYVY
VjQP
YV L2211
,,1 (4.12)
In this fashion the voltages of all the buses are updated. We shall outline this procedure with the help of the system of Fig. 4.1, with the system data given in Tables 4.1 to 4.3. It is to be
2.6
noted that the real and reactive powers are given respectively in MW and MVAr. However they are converted into per unit quantities where a base of 100 MVA is chosen. 4.4.1 Updating Load Bus Voltages
Let us start the procedure with bus-2. Since this is load bus, both the real and reactive power into this bus is known. We can therefore write from (4.12)
( )( )
( ) ( ) ( )
−−−−
−=
∗
0525
0424
03231210
2
,2,2
22
12
1 VYVYVYVYV
jQPY
V injinj (4.13)
From the data given in Table 4.3 we can write
( )
−−−−
+−= 25242321
22
12 02.105.1
162.096.01 YYYYj
YV
It is to be noted that since the real and reactive power is drawn from this bus, both these quantities appear in the above equation with a negative sign. With the values of the Ybus elements given in Table 4.2 we get V2
(1) = 0.9927∠− 2.5959°.
The first iteration voltage of bus-3 is given by
( )( )
( ) ( ) ( )
−−−−
−=
∗
0535
0434
12321310
3
,3,3
33
13
1 VYVYVYVYV
jQPY
V injinj (4.14)
Note that in the above equation since the update for the bus-2 voltage is already available, we used the 1st iteration value of this rather than the initial value. Substituting the numerical data we get V3
(1) = 0.9883∠− 2. 8258°. Finally the bus-4 voltage is given by
( )( )
( ) ( ) ( )
−−−−
−=
∗
0545
1344
12421410
4
,4,4
44
14
1 VYVYVYVYV
jQPY
V injinj (4.15)
Solving we get V4
(1) = 0. 9968∠− 3.4849°. 4.4.2 Updating P-V Bus Voltages
It can be seen from Table 4.3 that even though the real power is specified for the P-V bus-5, its reactive power is unknown. Therefore to update the voltage of this bus, we must first estimate the reactive power of this bus. Note from Fig. 4.11 that
{ }[ ]niniiiiii
n
kkikiinji VYVYVYVYVVYVQ +++++−=
−= ∗
=
∗∑ LL22111
, ImIm (4.16)
And hence we can write the kth iteration values as
2.7
( ) ( ) ( ) ( ) ( ){ }[ ]112211
1, Im −−−∗ +++++−= k
nink
iiik
iik
ik
inji VYVYVYVYVQ LL (4.17) For the system of Fig. 4.1 we have
( ) ( ) ( ) ( ) ( ) ( ){ }[ ]0555
1454
1353
1252151
01
1,5 Im VYVYVYVYVYVQ inj ++++−= ∗ (4.18)
This is computed as 0.0899 per unit. Once the reactive power is estimated, the bus-5 voltage is updated as
( )( )
( )( ) ( ) ( )
−−−−
−=
∗
0454
1353
12521510
5
1,5,5
55
15
1 VYVYVYVYV
jQPY
V injinj (4.19)
It is to be noted that even though the power generation in bus-5 is 48 MW, there is a local load that is consuming half that amount. Therefore the net power injected by this bus is 24 MW and consequently the injected power P5,inj in this case is taken as 0.24 per unit. The voltage is calculated as V4
(1) = 1.0169∠− 0.8894°. Unfortunately however the magnitude of the voltage obtained above is not equal to the magnitude given in Table 4.3. We must therefore force this voltage magnitude to be equal to that specified. This is accomplished by
( )( )
( )15
15
51
,5 VVVV corr ×= (4.20)
This will fix the voltage magnitude to be 1.02 per unit while retaining the phase of − 0.8894°. The corrected voltage is used in the next iteration. 4.4.3 Convergence of the Algorithm
As can be seen from Table 4.3 that a total number of 4 real and 3 reactive powers are known to us. We must then calculate each of these from (4.6) and (4.7) using the values of the voltage magnitudes and their angle obtained after each iteration. The power mismatches are then calculated from (4.9) and (4.10). The process is assumed to have converged when each of ∆P2, ∆P3, ∆P4, ∆P5, ∆Q2, ∆Q3 and ∆Q4 is below a small pre-specified value. At this point the process is terminated.
Sometimes to accelerate computation in the P-Q buses the voltages obtained from (4.12) is multiplied by a constant. The voltage update of bus-i is then given by
( ) ( ) ( ) ( ) ( ) ( ) ( ){ }1,
1,
1,, 1 −−− −+=+−= k
accik
ik
accik
ik
accik
acci VVVVVV λλλ (4.21) where λ is a constant that is known as the acceleration factor. The value of λ has to be below 2.0 for the convergence to occur. Table 4.4 lists the values of the bus voltages after the 1st iteration and number of iterations required for the algorithm to converge for different values of λ. It can be seen that the algorithm converges in the least number of iterations when λ is 1.4 and the maximum number of iterations are required when λ is 2. In fact the algorithm will
2.8
start to diverge if larger values of acceleration factor are chosen. The system data after the convergence of the algorithm will be discussed later.
Table 4.4 Gauss-Seidel method: bus voltages after 1st iteration and number of iterations required for convergence for different values of λ.
Bus voltages (per unit) after 1st iteration λ
V2 V3 V4 V5
No of iterations for convergence
1 0.9927∠− 2.6° 0.9883∠− 2.83° 0.9968∠− 3.48° 1.02 ∠− 0.89° 28
2 0.9874∠− 5.22° 0.9766∠− 8.04° 0.9918∠− 14.02° 1.02∠− 4.39° 860
1.8 0.9883∠− 4.7° 0.9785∠− 6.8° 0.9903∠− 11.12° 1.02∠− 3.52° 54
1.6 0.9893∠− 4.17° 0.9807∠− 5.67° 0.9909∠− 8.65° 1.02∠− 2.74° 24
1.4 0.9903∠− 3.64° 0.9831∠− 4.62° 0.9926∠− 6.57° 1.02∠− 2.05° 14
1.2 0.9915∠− 3.11° 0.9857∠− 3.68° 0.9947∠− 4.87° 1.02∠− 1.43° 19
4.5 SOLUTION OF A SET OF NONLINEAR EQUATIONS BY
NEWTON-RAPHSON METHOD
In this section we shall discuss the solution of a set of nonlinear equations through Newton-Raphson method. Let us consider that we have a set of n nonlinear equations of a total number of n variables x1, x2, …, xn. Let these equations be given by
( )( )
( ) nnn
n
n
xxf
xxfxxf
η
ηη
=
==
,,
,,,,
1
212
111
L
M
L
L
(4.22)
where f1, …, fn are functions of the variables x1, x2, …, xn. We can then define another set of functions g1, …, gn as given below
( ) ( )( ) ( )
( ) ( ) 0,,,,
0,,,,0,,,,
11
21212
11111
=−=
=−==−=
nnnnn
nn
nn
xxfxxg
xxfxxgxxfxxg
η
ηη
LL
M
LL
LL
(4.23)
Let us assume that the initial estimates of the n variables are x1
(0), x2(0), …, xn
(0). Let us add corrections ∆x1
(0), ∆x2(0), …, ∆xn
(0) to these variables such that we get the correct solution of these variables defined by
( ) ( )
( ) ( )
( ) ( )00
02
022
01
011
nnn xxx
xxxxxx
∆+=
∆+=∆+=
∗
∗
∗
M (4.24)
2.9
The functions in (4.23) then can be written in terms of the variables given in (4.24) as
( ) ( ) ( ) ( ) ( )( ) nkxxxxgxxg nnknk ,,1,,,,, 0001
011 KLL =∆+∆+=∗∗ (4.25)
We can then expand the above equation in Taylor’s series around the nominal values of x1
(0), x2
(0), …, xn(0). Neglecting the second and higher order terms of the series, the expansion of gk,
k = 1, …, n is given as
( ) ( ) ( )( ) ( )( )
( )( )
( )( )0
00
2
02
0
1
01
0011 ,,,,
n
kn
kknknk x
gxxgx
xgxxxgxxg
∂∂
∆++∂∂
∆+∂∂
∆+=∗∗ LLL (4.26)
where ( )0
ik xg ∂∂ is the partial derivative of gk evaluated at x2(0), …, xn
(0).
Equation (4.26) can be written in vector-matrix form as
( ) ( )
( )
( )
( ) ( )( )( ) ( )( )( ) ( )( )
−
−−
=
∆
∆∆
∂∂∂∂∂∂
∂∂∂∂∂∂∂∂∂∂∂∂
001
0012
0011
0
02
01
0
21
22212
12111
,,0
,,0,,0
nn
n
n
nnnnn
n
n
xxg
xxgxxg
x
xx
xgxgxg
xgxgxgxgxgxg
L
M
L
L
M
L
MOMM
L
L
(4.27)
The square matrix of partial derivatives is called the Jacobian matrix J with J(0) indicating that the matrix is evaluated for the initial values of x2
(0), …, xn(0). We can then write the
solution of (4.27) as
( )
( )
( )
( )[ ]
( )
( )
( )
∆
∆∆
=
∆
∆∆
−
0
02
01
10
0
02
01
nn g
gg
J
x
xx
MM (4.28)
Since the Taylor’s series is truncated by neglecting the 2nd and higher order terms, we cannot expect to find the correct solution at the end of first iteration. We shall then have
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )001
02
02
12
01
01
11
nnn xxx
xxxxxx
∆+=
∆+=∆+=
M (4.29)
These are then used to find J(1) and ∆gk
(1), k = 1, …, n. We can then find ∆x2(1), …, ∆xn
(1) from an equation like (4.28) and subsequently calculate x2
(1), …, xn(1). The process continues till
∆gk, k = 1, …, n becomes less than a small quantity.
2.10
Example 4.1: Let us consider the following set of nonlinear equations
( )( )( ) 06,,
033,,
011,,
323113213
322213212
23
22
213211
=−+−==−−+=
=−+−=
xxxxxxxxgxxxxxxxg
xxxxxxg
The Jacobian matrix is then given by
+−−−+
−=
2133
212
321
132
222
xxxxxxx
xxxJ
The initial values to start the Newton-Raphson procedure must be carefully chosen. For example if we choose x1
(0) = x2(0) = x3
(0) = 0 then all the elements of the 1st row will be zero making the matrix J(0) singular. In our procedure let us choose x1
(0) = x2(0) = x3
(0) = 1. The Jacobian matrix is then given by
( )
−
−=
010331222
0J
Also the mismatches are given by
( )
( )
( )
( )
( )
( )
=
−−−
=
∆∆∆
54
10
000
03
02
01
03
02
01
ggg
ggg
Consequently the corrections and updates calculated respectively from (4.28) and (4.29) are
( )
( )
( )
( )
( )
( )
=
=
∆∆∆
25.600.675.5
and 25.500.575.4
13
12
11
03
02
01
xxx
xxx
The process converges in 7 iterations with the values of
4 and 3,2 321 === xxx ∆∆∆
4.6 LOAD FLOW BY NEWTON-RAPHSON METHOD
Let us assume that an n-bus power system contains a total number of np P-Q buses
while the number of P-V (generator) buses be ng such that n = np + ng + 1. Bus-1 is assumed to be the slack bus. We shall further use the mismatch equations of ∆Pi and ∆Qi given in (4.9) and (4.10) respectively. The approach to Newton-Raphson load flow is similar to that of
2.11
solving a system of nonlinear equations using the Newton-Raphson method: at each iteration we have to form a Jacobian matrix and solve for the corrections from an equation of the type given in (4.27). For the load flow problem, this equation is of the form
∆
∆∆
∆
=
∆
∆∆
∆
+
+
+p
p
pn
n
n
n
n
Q
QP
P
V
V
VV
J
1
2
2
1
1
2
2
2
M
M
M
M
δ
δ
(4.30)
where the Jacobian matrix is divided into submatrices as
=
2221
1211
JJJJ
J (4.31)
It can be seen that the size of the Jacobian matrix is (n + np − 1) × (n + np − 1). For example for the 5-bus problem of Fig. 4.1 this matrix will be of the size (7 × 7). The dimensions of the submatrices are as follows:
J11: (n − 1) × (n − 1), J12: (n − 1) × np, J21: np × (n − 1) and J22: np × np The submatrices are
∂∂
∂∂
∂∂
∂∂
=
n
nn
n
PP
PP
J
δδ
δδ
L
MOM
L
2
2
2
2
11 (4.32)
∂
∂∂∂
∂
∂∂∂
=
+
+
+
+
p
p
p
p
n
nn
n
nn
VPV
VPV
VPV
VPV
J
11
22
1
21
2
22
12
L
MOM
L
(4.33)
∂
∂
∂
∂
∂∂
∂∂
=++
n
nn
n
ppQQ
J
δδ
δδ
1
2
1
2
2
2
21
L
MOM
L
(4.34)
2.12
∂
∂
∂
∂
∂
∂∂∂
=
+
++
+
+
+
p
p
p
p
p
p
n
nn
n
nn
V
QV
VQ
V
VQV
VQV
J
1
11
2
12
1
21
2
22
22
L
MOM
L
(4.35)
4.6.1 Load Flow Algorithm
The Newton-Raphson procedure is as follows:
Step-1: Choose the initial values of the voltage magnitudes |V|(0) of all np load buses and n − 1 angles δ(0) of the voltages of all the buses except the slack bus.
Step-2: Use the estimated |V|(0) and δ(0) to calculate a total n − 1 number of injected real power Pcalc
(0) and equal number of real power mismatch ∆P(0).
Step-3: Use the estimated |V|(0) and δ(0) to calculate a total np number of injected reactive power Qcalc
(0) and equal number of reactive power mismatch ∆Q(0).
Step-3: Use the estimated |V|(0) and δ(0) to formulate the Jacobian matrix J(0).
Step-4: Solve (4.30) for ∆δ(0) and ∆|V|(0)÷|V|(0).
Step-5: Obtain the updates from
( ) ( ) ( )001 δδδ ∆+= (4.36)
( ) ( )( )
( )
∆+= 0
001 1
VV
VV (4.37)
Step-6: Check if all the mismatches are below a small number. Terminate the process
if yes. Otherwise go back to step-1 to start the next iteration with the updates given by (4.36) and (4.37). 4.6.2 Formation of the Jacobian Matrix
We shall now discuss the formation of the submatrices of the Jacobian matrix. To do that we shall use the real and reactive power equations of (4.6) and (4.7). Let us rewrite them with the help of (4.2) as
( )∑≠=
−++=n
ikk
ikikkiikiiii VVYGVP1
2 cos δδθ (4.38)
( )∑≠=
−+−−=n
ikk
ikikkiikiiii VVYBVQ1
2 sin δδθ (4.39)
2.13
A. Formation of J11
Let us define J11 as
=
nnn
n
LL
LLJ
L
MOM
L
2
222
11 (4.40)
It can be seen from (4.32) that Mik’s are the partial derivatives of Pi with respect to δk. The derivative Pi (4.38) with respect to k for i ≠ k is given by
( ) kiVVYPL ikikkiikk
iik ≠−+−=
∂∂
= ,sin δδθδ
(4.41)
Similarly the derivative Pi with respect to k for i = k is given by
( )∑≠=
−+=∂∂
=n
ikk
ikikkiiki
iii VVYPL
1sin δδθ
δ
Comparing the above equation with (4.39) we can write
iiiii
iii BVQPL 2−−=
∂∂
=δ
(4.42)
B. Formation of J21
Let us define J21 as
=
nnn
n
ppMM
MMJ
L
MOM
L
2
222
21 (4.43)
From (4.34) it is evident that the elements of J21 are the partial derivative of Q with respect to δ. From (4.39) we can write
( ) kiVVYQM ikikkiikk
iik ≠−+−=
∂∂
= ,cos δδθδ
(4.44)
Similarly for i = k we have
( ) iiii
n
ikk
ikikkiiki
iii GVPVVYQM 2
1cos −=−+=
∂∂
= ∑≠=
δδθδ
(4.45)
The last equality of (4.45) is evident from (4.38).
2.14
C. Formation of J12
Let us define J12 as
=
p
p
nnn
n
NN
NNJ
L
MOM
L
2
222
12 (4.46)
As evident from (4.33), the elements of J21 involve the derivatives of real power P with respect to magnitude of bus voltage |V|. For i ≠ k, we can write from (4.38)
( ) kiMVVYVPVN ikikikkiik
k
ikik ≠−=−+=∂∂
= δδθcos (4.47)
For i = k we have
( )
( ) iiiii
n
ikk
ikikkiikiii
n
ikk
ikikkikiiiii
iiii
MGVVVYGV
VYGVVVPVN
+=−++=
−++=
∂∂
=
∑
∑
≠=
≠=
2
1
2
1
2cos2
cos2
δδθ
δδθ
(4.48)
D. Formation of J22
For the formation of J22 let us define
=
ppp
p
nnn
n
OO
OOJ
L
MOM
L
2
222
22 (4.49)
For i ≠ k we can write from (4.39)
( ) kiLVVYVVQVO ikikikkiiki
k
iiik ≠=−+−=∂∂
= ,sin δδθ (4.50)
Finally for i = k we have
( )
( ) iiiii
n
ikk
ikikkiikiii
n
ikk
ikikkikiiiik
iiii
LBVVVYBV
VYBVVVQVO
−−=−+−−=
−+−−=
∂∂
=
∑
∑
≠=
≠=
2
1
2
1
2sin2
sin2
δδθ
δδθ
(4.51)
2.15
We therefore see that once the submatrices J11 and J21 are computed, the formation of the submatrices J12 and J22 is fairly straightforward. For large system this will result in considerable saving in the computation time. 4.6.3 Solution of Newton-Raphson Load Flow
The Newton-Raphson load flow program is tested on the system of Fig. 4.1 with the system data and initial conditions given in Tables 4.1 to 4.3. From (4.41) we can write
( ) ( ) ( ) ( ) 80774sinsin 23232323230
30
2230
23 .BYVVYL −=−=−=−+−= θδδθ
Similarly from (4.39) we have
( ) ( ) ( ) ( ) ( )
6327.002.105.1
sin
2524232122
21
2200
2222
202
02
−=−−−−−=
−+−−= ∑≠=
BBBBB
VVYBVQn
kk
kkkk δδθ
Hence from (4.42) we get
( ) ( ) ( ) 8269.186327.0 2222
202
02
022 =−−=−−= BBVQL
In a similar way the rest of the components of the matrix J11
(0) are calculated. This matrix is given by
( )
−−−−−−−−−−
=
4558.129615.14519.29231.39615.18077.58462.304519.28462.31058.118077.49231.308077.48269.18
011J
For forming the off diagonal elements of J21 we note from (4.44) that
( ) ( ) ( ) ( ) 0.9615cos 233223
03
0223
023 =−=−+−= GVVYM δδθ
Also from (4.38) the real power injected at bus-2 is calculated as
( ) ( ) ( ) ( ) ( )
1115.002.105.1
cos
2524232122
21
2200
2222
202
02
−=++++=
−++= ∑≠=
GGGGG
VVYGVPn
kk
kkkk δδθ
Hence from (4.45) we have
( ) ( ) 7654322
202
0222 .GVPM −=−=
2.16
Similarly the rest of the elements of the matrix J21 are calculated. This matrix is then given as
( )
−−
−=
3923.01615.17692.004904.07692.02212.29615.07846.009615.07654.3
021J
For calculating the off diagonal elements of the matrix J12 we note from (4.47) that
they are negative of the off diagonal elements of J21. However the size of J21 is (3 × 4) while the size of J12 is (4 × 3). Therefore to avoid this discrepancy we first compute a matrix M that is given by
=
44434241
34333231
24232221
14131211
MMMMMMMMMMMMMMMM
M
The elements of the above matrix are computed in accordance with (4.44) and (4.45). We can then define
( ) ( )3:1,4:1 and 4:1,3:1 1221 MJMJ −== Furthermore the diagonal elements of J12 are overwritten in accordance with (4.48). This matrix is then given by
( )
−−−
−−−
=
3923.04904.07846.01462.17692.007692.02019.29615.009615.05423.3
012J
Finally it can be noticed from (4.50) that J22 = J11(1:3, 1:3). However the diagonal
elements of J22 are then overwritten in accordance with (4.51). This gives the following matrix
( )
−−−
−=
5408.58462.308462.38996.108077.408077.45615.17
022J
From the initial conditions the power and reactive power are computed as
( ) [ ]( ) [ ]Tcalc
Tcalc
Q
P
1335.01031.06327.0
0098.00077.00096.01115.00
0
−−−=
−−−−=
Consequently the mismatches are found to be
2.17
( ) [ ]( ) [ ]T
T
Q
P
0535.00369.00127.0
2302.01523.03404.08485.00
0
−=∆
−−−=∆
Then the updates at the end of the first iteration are given as
( )
( )
( )
( )
( )
( )
( )
=
−−−−
=
9913.09817.09864.0
deg
09.319.795.691.4
04
03
02
04
03
03
02
VVV
δδδδ
The load flow converges in 7 iterations when all the power and reactive power mismatches are below 10−6.
4.7 LOAD FLOW RESULTS
In this section we shall discuss the results of the load flow. It is to be noted here that both Gauss-Seidel and Newton-Raphson methods yielded the same result. However the Newton-Raphson method converged faster than the Gauss-Seidel method. The bus voltage magnitudes, angles of each bus along with power generated and consumed at each bus are given in Table 4.4. It can be seen from this table that the total power generated is 174.6 MW whereas the total load is 171 MW. This indicates that there is a line loss of about 3.6 MW for all the lines put together. It is to be noted that the real and reactive power of the slack bus and the reactive power of the P-V bus are computed from (4.6) and (4.7) after the convergence of the load flow.
Table 4.4 Bus voltages, power generated and load after load flow convergence.
Bus voltage Power generated Load Bus no.
Magnitude (pu) Angle (deg) P (MW) Q (MVAr) P (MW) P (MVAr)
1 1.05 0 126.60 57.11 0 0
2 0.9826 − 5.0124 0 0 96 62
3 0.9777 − 7.1322 0 0 35 14
4 0.9876 − 7.3705 0 0 16 8
5 1.02 − 3.2014 48 15.59 24 11
The current flowing between the buses i and k can be written as
( ) kiVVYI kiikik ≠−−= , (4.52)
Therefore the complex power leaving bus-i is given by
∗=+ iiii IVjQP (4.53) Similarly the complex power entering bus-k is
2.18
∗=+ kkkk IVjQP (4.54) Therefore the I2R loss in the line segment i-k is
kikiloss PPP −=−, (4.55) The real power flow over different lines is listed in Table 4.5. This table also gives the I2R loss along various segments. It can be seen that all the losses add up to 3.6 MW, which is the net difference between power generation and load. Finally we can compute the line I2X drops in a similar fashion. This drop is given by
kikidrop QQQ −=−, (4.56) However we have to consider the effect of line charging separately.
Table 4.5 Real power flow over different lines.
Power dispatched Power received
from (bus) amount (MW) in (bus) amount (MW) Line loss (MW)
1 101.0395 2 98.6494 2.3901
1 25.5561 5 25.2297 0.3264
2 17.6170 3 17.4882 0.1288
3 0.7976 4 0.7888 0.0089
5 15.1520 2 14.9676 0.1844
5 18.6212 3 18.3095 0.3117
5 15.4566 4 15.2112 0.2454
Total = 3.5956
Consider the line segment 1-2. The voltage of bus-1 is V1 = 1.05∠0° per unit while
that of bus-2 is V2 = 0.9826∠−5.0124° per unit. From (4.52) we then have
°−∠=−= 33.280932.15187.09623.012 jI per unit Therefore the complex power dispatched from bus-1 is
4645.540395.10110012112 jIVS −−=×= ∗ where the negative signal indicates the power is leaving bus-1. The complex power received at bus-2 is
5141.426494.9810012221 jIVS +=×= ∗ Therefore out of a total amount of 101.0395 MW of real power is dispatched from bus-1 over the line segment 1-2, 98.6494 MW reaches bus-2. This indicates that the drop in the line segment is 2.3901 MW. Note that
2.19
3901.210002.00932.1100 212
212 =××=×× RI MW
where R12 is resistance of the line segment 1-2. Therefore we can also use this method to calculate the line loss.
Now the reactive drop in the line segment 1-2 is
9508.101001.00932.1100 212
212 =××=×× XI MVAr
We also get this quantity by subtracting the reactive power absorbed by bus-2 from that supplied by bus-1. The above calculation however does not include the line charging. Note that since the line is modeled by an equivalent-π, the voltage across the shunt capacitor is the bus voltage to which the shunt capacitor is connected. Therefore the current I12 flowing through line segment is not the current leaving bus-1 or entering bus-2 − it is the current flowing in between the two charging capacitors. Since the shunt branches are purely reactive, the real power flow does not get affected by the charging capacitors. Each charging capacitor is assumed to inject a reactive power that is the product of the half line charging admittance and square of the magnitude of the voltage of that at bus. The half line charging admittance of this line is 0.03. Therefore line charging capacitor will inject
3075.310003.0 21 =×× V MVAr
at bus-1. Similarly the reactive injected at bus-2 will be
8968.210003.0 22 =×× V MVAr
The power flow through the line segments 1-2 and 1-5 are shown in Fig. 4.2.
(a)
(b)
Fig. 4.2 Real and reactive power flow through (a) line segment 1-2 and (b) line segment 1-5. The thin lines indicate reactive power flow while the thick lines indicate real power flow.
2.20
4.8 LOAD FLOW PROGRAMS IN MATLAB
The load flow programs are developed in MATLAB. Altogether there are 4 mfiles that are attached with this chapter. The program listings and descriptions of these mfiles are given below. It must however be emphasized that these are not general purpose programs and are written only for the examples of this chapter. 4.7.1 Forming Ybus Matrix
This is a function that can be called by various programs. The function can be invoked by the statement
[yb,ych]=ybus; where ‘yb’ and ‘ych’ are respectively the Ybus matrix and a matrix containing the line charging admittances. It is assumed that the system data of Table 4.1 are given in matrix form and the matrix that contains line impedances is ‘zz’, while ‘ych’ contains the line charging information. This program is stored in the file ybus.m. The program listing is given below.
% Function ybus % THIS IS THE PROGRAM FOR CREATING Ybus MATRIX. function [yb,ych]=ybus % The line impedances are zz=[0 0.02+0.1i 0 0 0.05+0.25i 0.02+0.1i 0 0.04+0.2i 0 0.05+0.25i 0 0.04+0.2i 0 0.05+0.25i 0.08+0.4i 0 0 0.05+0.25i 0 0.1+0.5i 0.05+0.25i 0.05+0.25i 0.08+0.4i 0.1+0.5i 0]; % The line chargings are ych=j*[0 0.03 0 0 0.02 0.03 0 0.025 0 0.020 0 0.025 0 0.02 0.01 0 0 0.02 0 0.075 0.02 0.02 0.01 0.075 0]; % The Ybus matrix is formed here for i=1:5 for j=1:5 if zz(i,j) == 0 yb(i,j)=0; else yb(i,j)=-1/zz(i,j); end end end for i=1:5 ysum=0; csum=0; for j=1:5
2.21
ysum=ysum+yb(i,j); csum=csum+ych(i,j); end yb(i,i)=csum-ysum; end
4.7.2 Gauss-Seidel Load Flow
The Gauss-Seidel program is stored in the file loadflow_gs.m. This calls the ybus.m function discussed above. The program allows the selection of the acceleration factor. The program lists the number of iterations required to converge, bus voltages and their magnitudes and real and reactive power. The program listing is given below.
% Program loadflow_gs % THIS IS A GAUSS-SEIDEL POWER FLOW PROGRAM clear all d2r=pi/180;w=100*pi; % The Y_bus matrix is [ybus,ych]=ybus; g=real(ybus);b=imag(ybus); % The given parameters and initial conditions are p=[0;-0.96;-0.35;-0.16;0.24]; q=[0;-0.62;-0.14;-0.08;-0.35]; mv=[1.05;1;1;1;1.02]; th=[0;0;0;0;0]; v=[mv(1);mv(2);mv(3);mv(4);mv(5)]; acc=input('Enter the acceleration constant: '); del=1;indx=0; % The Gauss-Seidel iterations starts here while del>1e-6 % P-Q buses for i=2:4 tmp1=(p(i)-j*q(i))/conj(v(i)); tmp2=0; for k=1:5 if (i==k) tmp2=tmp2+0; else tmp2=tmp2+ybus(i,k)*v(k); end end vt=(tmp1-tmp2)/ybus(i,i); v(i)=v(i)+acc*(vt-v(i)); end
2.22
% P-V bus q5=0; for i=1:5 q5=q5+ybus(5,i)*v(i); end q5=-imag(conj(v(5))*q5); tmp1=(p(5)-j*q5)/conj(v(5)); tmp2=0; for k=1:4 tmp2=tmp2+ybus(5,k)*v(k); end vt=(tmp1-tmp2)/ybus(5,5); v(5)=abs(v(5))*vt/abs(vt); % Calculate P and Q for i=1:5 sm=0; for k=1:5 sm=sm+ybus(i,k)*v(k); end s(i)=conj(v(i))*sm; end % The mismatch delp=p-real(s)'; delq=q+imag(s)'; delpq=[delp(2:5);delq(2:4)]; del=max(abs(delpq)); indx=indx+1; if indx==1 pause end end 'GS LOAD FLOW CONVERGES IN ITERATIONS',indx,pause 'FINAL VOLTAGE MAGNITUDES ARE',abs(v)',pause 'FINAL ANGLES IN DEGREE ARE',angle(v)'/d2r,pause 'THE REAL POWERS IN EACH BUS IN MW ARE',(real(s)+[0 0 0 0 0.24])*100,pause 'THE REACTIVE POWERS IN EACH BUS IN MVar ARE',(-imag(s)+[0 0 0 0 0.11])*100
4.7.3 Solving Nonlinear Equations using Newton-Raphson
This program gives the solution of the nonlinear equations of Example 4.1 using the Newton-Raphson method. The equations and the Jacobian matrix are explicitly entered in the program itself. The program gives the number of iterations and the final values of x1, x2 and x3. The program listing is given below.
2.23
% Program nwtraph % THIS IS A NEWTON-RAPHSON PROGRAM % We have to solve three nonlinear equations given by % % g1=x1^2-x2^2+x3^2-11=0 % g2=x1*x2+x2^2-3x3-3=0 % g3=x1-x1*x3+x2*x3-6=0 % % Let us assume the initial conditions of x1=x2=x3=1 % % The Jacobian matrix is % % J=[2x1 -2x2 2x3 % x2 x1+2x2 -3 % 1-x3 x3 -x1+x2]; clear all x=[1;1;1]; % The Newton-Raphson iterations starts here del=1; indx=0; while del>1e-6 g=[x(1)^2-x(2)^2+x(3)^2-11;x(1)*x(2)+x(2)^2-3*x(3)-3;x(1)-x(1)*x(3)+x(2)*x(3)-6]; J=[2*x(1) -2*x(2) 2*x(3);x(2) x(1)+2*x(2) -3;1-x(3) x(3) -x(1)+x(2)]; delx=-inv(J)*g; x=x+delx; del=max(abs(g)); indx=indx+1; end 'NEWTON-RAPHSON SOLUTION CONVERGES IN ITERATIONS',indx,pause 'FINAL VALUES OF x ARE',x
4.7.1 Newton-Raphson Load Flow
The Newton-Raphson load flow program is stored in the files loadflow_nr.m. The outputs of the program can be checked by typing
indx the number of iterations v bus voltages in Cartesian form abs(v) magnitude of bus voltages angle(v)/d2r angle of bus voltage in degree preal real power in MW preac reactive power in MVAr pwr power flow in the various line segments qwr reactive power flow in the various line segments q reactive power entering or leaving a bus pl real power losses in various line segments
2.24
ql reactive drops in various line segments It is to be noted that in calculating the power and reactive power the conventions that the power entering a node is positive and leaving it is negative are maintained. The program listing for the Newton-Raphson load flow is given below.
% Program loadflow_nr % THIS IS THE NEWTON-RAPHSON POWER FLOW PROGRAM clear all d2r=pi/180;w=100*pi; % The Y_bus matrix is [ybus,ych]=ybus; g=real(ybus);b=imag(ybus); % The given parameters and initial conditions are p=[0;-0.96;-0.35;-0.16;0.24]; q=[0;-0.62;-0.14;-0.08;-0.35]; mv=[1.05;1;1;1;1.02]; th=[0;0;0;0;0]; del=1;indx=0; % The Newton-Raphson iterations starts here while del>1e-6 for i=1:5 temp=0; for k=1:5 temp=temp+mv(i)*mv(k)*(g(i,k)-j*b(i,k))*exp(j*(th(i)-th(k))); end pcal(i)=real(temp);qcal(i)=imag(temp); end % The mismatches delp=p-pcal'; delq=q-qcal'; % The Jacobian matrix for i=1:4 ii=i+1; for k=1:4 kk=k+1; j11(i,k)=mv(ii)*mv(kk)*(g(ii,kk)*sin(th(ii)-th(kk))-b(ii,kk)*cos(th(ii)-th(kk))); end j11(i,i)=-qcal(ii)-b(ii,ii)*mv(ii)^2; end for i=1:4 ii=i+1; for k=1:4
2.25
kk=k+1; j211(i,k)=-mv(ii)*mv(kk)*(g(ii,kk)*cos(th(ii)-th(kk))-b(ii,kk)*sin(th(ii)-th(kk))); end j211(i,i)=pcal(ii)-g(ii,ii)*mv(ii)^2; end j21=j211(1:3,1:4); j12=-j211(1:4,1:3); for i=1:3 j12(i,i)=pcal(i+1)+g(i+1,i+1)*mv(i+1)^2; end j22=j11(1:3,1:3); for i=1:3 j22(i,i)=qcal(i+1)-b(i+1,i+1)*mv(i+1)^2; end jacob=[j11 j12;j21 j22]; delpq=[delp(2:5);delq(2:4)]; corr=inv(jacob)*delpq; th=th+[0;corr(1:4)]; mv=mv+[0;mv(2:4).*corr(5:7);0]; del=max(abs(delpq)); indx=indx+1; end preal=(pcal+[0 0 0 0 0.24])*100; preac=(qcal+[0 0 0 0 0.11])*100; % Power flow calculations for i=1:5 v(i)=mv(i)*exp(j*th(i)); end for i=1:4 for k=i+1:5 if (ybus(i,k)==0) s(i,k)=0;s(k,i)=0; c(i,k)=0;c(k,i)=0; q(i,k)=0;q(k,i)=0; cur(i,k)=0;cur(k,i)=0; else cu=-(v(i)-v(k))*ybus(i,k); s(i,k)=-v(i)*cu'*100; s(k,i)=v(k)*cu'*100; c(i,k)=100*abs(ych(i,k))*abs(v(i))^2; c(k,i)=100*abs(ych(k,i))*abs(v(k))^2; cur(i,k)=cu;cur(k,i)=-cur(i,k); end end end pwr=real(s); qwr=imag(s);
2.26
q=qwr-c; % Power loss ilin=abs(cur); for i=1:4 for k=i+1:5 if (ybus(i,k)==0) pl(i,k)=0;pl(k,i)=0; ql(i,k)=0;ql(k,i)=0; else z=-1/ybus(i,k); r=real(z); x=imag(z); pl(i,k)=100*r*ilin(i,k)^2;pl(k,i)=pl(i,k); ql(i,k)=100*x*ilin(i,k)^2;ql(k,i)=ql(i,k); end end end