03 Load Flow Solution

Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

Load Flow Solution

EEE 4103: Power System Analysis


Fall 2015-16

Course Instructor: M. Abu Abdullah, PhD


Assistant Professor, Dept. of EEE
American International University-Bangladesh (AIUB)
Power Flow Solution
oThe Power Flow problem is the computation of
voltage magnitude and phase angle at each bus
in a power system under balanced three-phase
steady-state condition. As a by-product of this
calculation, real and reactive power flows in
equipment such as transmission lines and
transformers, as well as equipment losses can
be computed.

EEE304 2
10/21/2015
Bus Admittance Matrix or Ybus

oFirst step in solving the power flow is to create


what is known as the bus admittance matrix, often
call the Ybus.
oThe Ybus gives the relationships between all the bus
current injections, I, and all the bus voltages, V,
I = Ybus V
oThe Ybus is developed by applying KCL at each
bus in the system to relate the bus current
injections, the bus voltages, and the branch
impedances and admittances
Ybus Example
Determine the bus admittance matrix for the network
shown below, assuming the current injection at each
bus i is Ii = IGi - IDi where IGi is the current injection into the
bus from the generator and IDi is the current flowing into the
load
Ybus Example, cont’d
By KCL at bus 1 we have
I1 IG1  I D1
V1  V2 V1  V3
I1  I12  I13  
ZA ZB
1
I1  (V1  V2 )YA  (V1  V3 )YB (with Yj  )
Zj
 (YA  YB )V1  YA V2  YB V3
Similarly
I 2  I 21  I 23  I 24
 YA V1  (YA  YC  YD )V2  YC V3  YD V4
Ybus Example, cont’d
We can get similar relationships for buses 3 and 4
The results can then be expressed in matrix form
I  Ybus V
 I1  YA  YB YA YB 0  V1 
 I   Y YA  YC  YD YC YD  V2 
 2  A  
 I 3   YB YC YB  YC 0  V3 
I   0 YD 0 YD  V4 
 4 

For a system with n buses, Ybus is an n by n


symmetric matrix (i.e., one where Aij = Aji)
Ybus General Form
oThe diagonal terms, Yii, are the self admittance
terms, equal to the sum of the admittances of all
devices incident to bus i.
oThe off-diagonal terms, Yij, are equal to the
negative of the sum of the admittances joining
the two buses.
o

oWith large systems Ybus is a sparse matrix (that


is, most entries are zero)
oShunt terms, such as with the p line model, only
affect the diagonal terms.
Modeling Shunts in the Ybus

Ykc
Since I ij  (Vi  V j )Yk  Vi
2
Ykc
Yii  Yiifrom other lines
 Yk 
2
1 1 Rk  jX k Rk  jX k
Note Yk    2
Z k Rk  jX k Rk  jX k Rk  X k2
Two Bus System Example

(V1  V2 ) Yc 1
I1   V1  12  j16
Z 2 0.03  j 0.04
 I1  12  j15.9 12  j16  V1 
 I    12  j16 12  j15.9  V 
 2   2
Using the Ybus
If the voltages are known then we can solve for
the current injections:
Ybus V  I
If the current injections are known then we can
solve for the voltages:
1
Ybus I  V  Zbus I
where Z bus is the bus impedance matrix
Solving for Bus Currents
For example, in previous case assume
 1.0 
V 
 0.8  j 0.2 
Then
12  j15.9 12  j16   1.0   5.60  j 0.70 
 12  j16 12  j15.9  0.8  j 0.2    5.58  j 0.88
    
Therefore the power injected at bus 1 is
S1  V1I1*  1.0  (5.60  j 0.70)  5.60  j 0.70
*
S 2  V2 I 2  (0.8  j 0.2)  (5.58  j 0.88)  4.64  j 0.41
Solving for Bus Voltages
For example, in previous case assume
 5.0 
I 
 4.8 
Then
1
12  j15.9 12  j16   5.0   0.0738  j 0.902 
 12  j16 12  j15.9  4.8   0.0738  j1.098
     
Therefore the power injected is
S1  V1I1*  (0.0738  j 0.902)  5  0.37  j 4.51
S 2  V2 I 2*  (0.0738  j1.098)  (4.8)  0.35  j 5.27
Power Flow Analysis

When analyzing power systems we know neither


the complex bus voltages nor the complex
current injections
Rather, we know the complex power being
consumed by the load, and the power being
injected by the generators plus their voltage
magnitudes
Therefore we can not directly use the Ybus
equations, but rather must use the power balance
equations
Three Types of Power Flow Buses

There are three main types of power flow


buses
– Load (PQ) at which P/Q are fixed; iteration solves for
voltage magnitude and angle.
– Slack at which the voltage magnitude and angle are
fixed; iteration solves for P/Q injections
– Generator (PV) at which P and |V| are fixed; iteration
solves for voltage angle and Q injection
special coding is needed to include PV buses in the Gauss-
Seidel iteration
Power Balance Equations
From KCL we know at each bus i in an n bus system
the current injection, Ii , must be equal to the current
that flows into the network
n
I i  IGi  I Di   Iik
k 1
Since I = Ybus V we also know
n
I i  IGi  I Di   YikVk
k 1

The network power injection is then Si  Vi Ii*


Power Balance Equations, cont’d
n *n
*   * *
Si   Vi   YikVk   Vi  YikVk
Vi Ii
 k 1  k 1
This is an equation with complex numbers.
Sometimes we would like an equivalent set of real
power equations. These can be derived by defining
Yik Gik  jBik
Vi Vi e ji  Vi  i
 ik i   k
Recall e j  cos  j sin 
Real Power Balance Equations
n n
Si  Pi  jQi  Vi  Yik*Vk*   Vi Vk e jik (Gik  jBik )
k 1 k 1
n
  Vi Vk (cos ik  j sin ik )(Gik  jBik )
k 1
Resolving into the real and imaginary parts
n
Pi   Vi Vk (Gik cosik  Bik sin ik )  PGi  PDi
k 1
n
Qi   Vi Vk (Gik sin ik  Bik cos ik )  QGi  QDi
k 1
Power Flow Requires Iterative Solution

In the power flow we assume we know Si and the


Ybus . We would like to solve for the V's. The problem
is the below equation has no closed form solution:
n * n
 
Si  Vi I i*  Vi   YikVk   Vi  Yik*Vk*
 k 1  k 1
Rather, we must pursue an iterative approach.
Gauss Iteration
There are a number of different iterative methods
we can use. We'll consider two: Gauss and Newton.

With the Gauss method we need to rewrite our


equation in an implicit form: x = h(x)

To iterate we first make an initial guess of x, x (0) ,


and then iteratively solve x (v +1)  h( x( v ) ) until we
ˆ such that xˆ  h(x).
find a "fixed point", x, ˆ
Gauss Iteration Example
Example: Solve x - x  1  0
x (v 1)  1  x( v )
Let k = 0 and arbitrarily guess x (0)  1 and solve
k x(v ) k x(v )
0 1 5 2.61185
1 2 6 2.61612
2 2.41421 7 2.61744
3 2.55538 8 2.61785
4 2.59805 9 2.61798
Stopping Criteria
A key problem to address is when to stop the
iteration. With the Guass iteration we stop when
x (v )   with x (v ) x (v 1)  x (v )
If x is a scalar this is clear, but if x is a vector we
need to generalize the absolute value by using a norm
x (v ) 
j
Two common norms are the Euclidean & infinity
n
2
x 2   i
x x   max i x i
i 1
Gauss Power Flow
We first need to put the equation in the correct form
n * n
 
Si  Vi I i*  Vi   YikVk   Vi  Yik*Vk*
 k 1  k 1
n n
S*i  Vi* Ii  Vi*  YikVk  Vi*  YikVk
k 1 k 1

S*i n n

Vi*
  YikVk  YiiVi   YikVk
k 1 k 1,k i

1  S*i n 
Vi   *   YikVk 
Yii  V k 1,k i


i
Gauss Two Bus Power Flow Example

oA 100 MW, 50 Mvar load is connected to a


generator
othrough a line with z = 0.02 + j0.06 p.u. and
line charging of 5 Mvar on each end (100 MVA
base). Also, there is a 25 Mvar capacitor at bus
2. If the generator voltage is 1.0 p.u., what is
V2?

SLoad = 1.0 + j0.5 p.u.


Gauss Two Bus Example, cont’d
The unknown is the complex load voltage, V2 .
To determine V2 we need to know the Ybus .
1
 5  j15
0.02  j 0.06
5  j14.95 5  j15 
Hence Ybus   
  5  j15 5  j14.70 
( Note B22  - j15  j 0.05  j 0.25)
Gauss Two Bus Example, cont’d
1  S*2 n 
V2   *   YikVk 
Y22  V2 k 1,k i 
1  -1  j 0.5 
V2   *
 (5  j15)(1.00) 
5  j14.70  V2 
Guess V2(0)  1.00 (this is known as a flat start)
v V2(v ) v V2(v )
0 1.000  j 0.000 3 0.9622  j 0.0556
1 0.9671  j 0.0568 4 0.9622  j 0.0556
2 0.9624  j 0.0553
Gauss Two Bus Example, cont’d
V2  0.9622  j 0.0556  0.9638  3.3
Once the voltages are known all other values can
be determined, such as the generator powers and the
line flows
S1*  V1* (Y11V1  Y12V2 )  1.023  j 0.239
In actual units P1  102.3 MW, Q1  23.9 Mvar
2
The capacitor is supplying V2 25  23.2 Mvar
Slack Bus

In previous example we specified S2 and V1


and then solved for S1 and V2.
We can not arbitrarily specify S at all buses
because total generation must equal total load +
total losses
We also need an angle reference bus.
To solve these problems we define one bus as
the "slack" bus. This bus has a fixed voltage
magnitude and angle, and a varying
real/reactive power injection.
Gauss with Many Bus Systems
With multiple bus systems we could calculate
new Vi ' s as follows:

1  S*i n 
Vi(v 1)   ( v )*   YikVk(v ) 
Yii  V k 1, k  i 
 i 
 hi (V1( v ) ,V2( v ) ,...,Vn( v ) )
But after we've determined Vi(v 1) we have a better
estimate of its voltage , so it makes sense to use this
new value. This approach is known as the
Gauss-Seidel iteration.
Gauss-Seidel Iteration
Immediately use the new voltage estimates:
V2( v 1)  h2 (V1 ,V2( v ) ,V3(v ) ,,Vn(v ) )
V3( v 1)  h2 (V1 ,V2( v1) ,V3(v ) ,,Vn( v ) )
V4( v 1)  h2 (V1 ,V2( v1) ,V3(v 1) ,V4( v ) ,Vn( v ) )

Vn( v 1)  h2 (V1 ,V2( v1) ,V3(v 1) ,V4( v1) ,Vn( v ) )
The Gauss-Seidel works better than the Gauss, and
is actually easier to implement. It is used instead
of Gauss.
Three Types of Power Flow Buses

There are three main types of power flow


buses
– Load (PQ) at which P/Q are fixed; iteration solves for
voltage magnitude and angle.
– Slack at which the voltage magnitude and angle are
fixed; iteration solves for P/Q injections
– Generator (PV) at which P and |V| are fixed; iteration
solves for voltage angle and Q injection
special coding is needed to include PV buses in the Gauss-
Seidel iteration
Gauss-Seidel Advantages

Each iteration is relatively fast (computational


order is proportional to number of branches +
number of buses in the system
Relatively easy to program
Gauss-Seidel Disadvantages

Tends to converge relatively slowly, although


this can be improved with acceleration
Has tendency to miss solutions, particularly on
large systems
Tends to diverge on cases with negative branch
reactances (common with compensated lines)
Need to program using complex numbers
Multi-Variable Example
 x1 
Solve for x =   such that f (x)  0 where
x2 
f1 (x)  2 x12  x22  8  0
f 2 (x)  x12  x22  x1x2  4  0
First symbolically determine the Jacobian
 f1 (x) f1 (x) 
 x x2 
1
J (x) =  
 f 2 (x) f 2 (x) 
 x1 x2 
Multi-variable Example, cont’d
 4 x1 2 x2 
J (x) = 
 2 x1  x2 x1  2 x2 
Then
1
 x1   4 x1 2 x2   f1 (x) 
 x     2 x  x x1  2 x2   f 2 (x) 
 2  1 2
(0) 1
Arbitrarily guess x  
1
1
(1) 1  4 2   5  2.1
x         
1  3 1  3 1.3 
Multi-variable Example, cont’d
1
(2)  2.1 8.40 2.60   2.51 1.8284
x         
1.3
   5.50  0.50   1.45  1.2122 
Each iteration we check f (x) to see if it is below our
specified tolerance 
(2) 0.1556 
f (x )   
 0.0900 
If  = 0.2 then we would be done. Otherwise we'd
continue iterating.
NR Application to Power Flow
We first need to rewrite complex power equations
as equations with real coefficients
n *n
*   * *
Si   Vi   YikVk   Vi  YikVk
Vi Ii
 k 1  k 1
These can be derived by defining
Yik Gik  jBik
Vi Vi e ji  Vi  i
 ik i   k
Recall e j  cos  j sin 
Real Power Balance Equations
n n
Si  Pi  jQi  Vi  Yik*Vk*   Vi Vk e jik (Gik  jBik )
k 1 k 1
n
  Vi Vk (cos ik  j sin ik )(Gik  jBik )
k 1
Resolving into the real and imaginary parts
n
Pi   Vi Vk (Gik cosik  Bik sin ik )  PGi  PDi
k 1
n
Qi   Vi Vk (Gik sin ik  Bik cos ik )  QGi  QDi
k 1
Newton-Raphson Power Flow
In the Newton-Raphson power flow we use Newton's
method to determine the voltage magnitude and angle
at each bus in the power system.
We need to solve the power balance equations
n
Pi   Vi Vk (Gik cos ik  Bik sin  ik )  PGi  PDi
k 1
n
Qi   Vi Vk (Gik sin  ik  Bik cos ik )  QGi  QDi
k 1
Power Flow Variables

Assume the slack bus is the first bus (with a fixed


voltage angle/magnitude). We then need to determine
the voltage angle/magnitude at the other buses.
 2   P2 (x)  PG 2  PD 2 
     
   
 n   Pn (x)  PGn  PDn 
x   f ( x)  
V2 Q (x)  QG 2  QD 2 
   2 
     
V   
 n   Qn (x)  QGn  QDn 
N-R Power Flow Solution
The power flow is solved using the same procedure
discussed last time:
Set v  0; make an initial guess of x, x(v )
While f (x (v ) )   Do
( v 1) (v ) ( v ) 1 (v)
x  x  J (x ) f (x )
v  v 1
End While
Power Flow Jacobian Matrix
The most difficult part of the algorithm is determining
and inverting the n by n Jacobian matrix, J (x)
 f1 (x) f1 (x)

f1 (x) 
 x x2 xn 
1
 
 f 2 (x) f 2 (x)

f 2 (x) 
J (x)   x1 x2 xn 
 
     
 f (x) f n ( x) f n (x) 
 n  
 x1 x2 xn 
Power Flow Jacobian Matrix, cont’d
Jacobian elements are calculated by differentiating
each function, fi (x), with respect to each variable.
For example, if fi (x) is the bus i real power equation
n
fi ( x)   Vi Vk (Gik cos  ik  Bik sin  ik )  PGi  PDi
k 1
n
fi ( x)
 i
  Vi Vk (Gik sin  ik  Bik cos ik )
k 1
k i

fi ( x)
 Vi V j (Gik sin  ik  Bik cos ik ) ( j  i )
 j
Two Bus Newton-Raphson Example
For the two bus power system shown below, use the
Newton-Raphson power flow to determine the
voltage magnitude and angle at bus two. Assume
that bus one is the slack and SBase = 100 MVA.
Line Z = 0.1j

One 1.000 pu Two 1.000 pu

0 MW 200 MW
0 MVR 100 MVR

2    j10 j10 


x    Ybus   
 V2   j10  j10 
Two Bus Example, cont’d
General power balance equations
n
Pi   Vi Vk (Gik cosik  Bik sin ik )  PGi  PDi
k 1
n
Qi   Vi Vk (Gik sin ik  Bik cosik )  QGi  QDi
k 1
Bus two power balance equations
V2 V1 (10sin  2 )  2.0  0
2
V2 V1 ( 10cos  2 )  V2 (10)  1.0  0
Two Bus Example, cont’d
P2 (x)  V2 (10sin  2 )  2.0  0
2
Q2 (x)  V2 (10 cos 2 )  V2 (10)  1.0  0
Now calculate the power flow Jacobian
 P2 (x) P2 (x) 
  V 2 
2
J ( x)   
 Q 2 (x) Q 2 (x) 
   V 2 
 2

10 V2 cos 2 10sin  2 


 
10 V2 sin  2 10 cos 2  20 V2 
Two Bus Example, First Iteration
(0) 0
Set v  0, guess x  
1 
Calculate

(0)
 V2 (10sin  2 )  2.0   2.0 
f(x )   2   1.0 
 V2 (10cos  2 )  V2 (10)  1.0  
(0) 10 V2 cos 2 10sin  2  10 0 
J (x )      0 10 
10 V2 sin  2 10cos 2  20 V2   
1
(1) 0  10 0   2.0   0.2 
Solve x    1.0    
1
   0 10     0.9 
Two Bus Example, Next Iterations
(1)  0.9 (10sin( 0.2))  2.0  0.212 
f(x )   2  
0.9( 10cos( 0.2))  0.9  10  1.0   0.279 
(1)  8.82 1.986 
J (x )   
  1.788 8.199 
1
(2)  0.2   8.82 1.986  0.212   0.233
x         
 0.9    1.788 8.199   0.279   0.8586 
(2)  0.0145  (3)  0.236 
f(x )    x   
 0.0190   0.8554 
(3) 0.0000906 
f(x )    Done! V2  0.8554  13.52
 0.0001175
Two Bus Solved Values
Once the voltage angle and magnitude at bus 2 are
known we can calculate all the other system values,
such as the line flows and the generator reactive
power output
200.0 MW -200.0 MW
168.3 MVR Line Z = 0.1j -100.0 MVR

One 1.000 pu Two 0.855 pu -13.522 Deg

200.0 MW 200 MW
168.3 MVR 100 MVR
Two Bus Case Low Voltage Solution
This case actually has two solutions! The second
"low voltage" is found by using a low initial guess.
(0)  0 
Set v  0, guess x  
 0.25 
Calculate

(0)
 V2 (10sin  2 )  2.0   2 
f(x )   2    0.875
 V2 ( 10cos 2 )  V2 (10)  1.0   
(0) 10 V2 cos 2 10sin  2   2.5 0 
J (x )      0 5 
10 V2 sin  2 10 cos 2  20 V2   
Low Voltage Solution, cont'd
1
(1)  0   2.5 0   2   0.8 
Solve x          
 0.25   0  5   0.875   0.075 
(2) 1.462  (2)  1.42  (3)  0.921
f (x )    x   x  
 0.534   0.2336   0.220 
Low voltage solution
200.0 MW -200.0 MW
831.7 MVR Line Z = 0.1j -100.0 MVR

One 1.000 pu Two 0.261 pu -49.914 Deg

200.0 MW 200 MW
831.7 MVR 100 MVR
PV Buses

Since the voltage magnitude at PV buses is fixed


there is no need to explicitly include these
voltages in x or write the reactive power balance
equations
– the reactive power output of the generator varies to
maintain the fixed terminal voltage (within limits)
– optionally these variations/equations can be included by
just writing the explicit voltage constraint for the
generator bus
|Vi | – Vi setpoint = 0
Three Bus PV Case Example
For this three bus case we have
 2   P2 (x)  PG 2  PD 2 
x   3  f (x)   P3 (x)  PG 3  PD3   0
   
 V2   Q2 (x)  QD 2 
Line Z = 0.1j

0.941 pu
One 1.000 pu Two -7.469 Deg

170.0 MW 200 MW
68.2 MVR 100 MVR
Line Z = 0.1j Line Z = 0.1j

Three 1.000 pu

30 MW
63 MVR
The N-R Power Flow: 5-bus Example

T2
800 MVA
1 T1 5 4 345/15 kV 3 520 MVA
Line 3
345 kV
50 mi
400 MVA 800 MVA
15 kV 15 kV
400 MVA 345 kV 40 Mvar 80 MW
Line 2

Line 1
345 kV
15/345 kV 100 mi 200 mi

2
280 Mvar 800 MW

Single-line diagram
The N-R Power Flow: 5-bus Example
V  PG QG PL QL QGmax QGmin
Bus Type per degrees per per per per per per
unit unit unit unit unit unit unit
Table 1. 1 Swing 1.0 0   0 0  
Bus input
data 2 Load   0 0 8.0 2.8  
3 Constant 1.05  5.2  0.8 0.4 4.0 -2.8
voltage
4 Load   0 0 0 0  
5 Load   0 0 0 0  

Maximum
R’ X’ G’ B’ MVA
Table 2. Bus-to- per unit per unit per unit per unit per unit
Line input data Bus
2-4 0.0090 0.100 0 1.72 12.0
2-5 0.0045 0.050 0 0.88 12.0
4-5 0.00225 0.025 0 0.44 12.0
The N-R Power Flow: 5-bus Example

Maximum
R X Gc Bm Maximum TAP
per per per per MVA Setting
Table 3. Bus-to- unit unit unit unit per unit per unit
Transformer Bus
input data
1-5 0.00150 0.02 0 0 6.0 —
3-4 0.00075 0.01 0 0 10.0 —

Bus Input Data Unknowns


1 V1 = 1.0, 1 = 0 P1, Q1

2 P2 = PG2-PL2 = -8 V2, 2
Table 4. Input data Q2 = QG2-QL2 = -2.8
and unknowns
3 V3 = 1.05 Q3, 3
P3 = PG3-PL3 = 4.4
4 P4 = 0, Q4 = 0 V4, 4
5 P5 = 0, Q5 = 0 V5, 5
Ybus Details
Elements of Ybus connected to bus 2

Y21  Y23  0
1 1
Y24  ' '
  0.89276  j 9.91964 per unit
R24  jX 24 0.009  j 0.1

1 1
Y25  ' '
  1.78552  j19.83932 per unit
R25  jX 25 0.0045  j 0.05

' '
1 1 B24 B25
Y22  ' '
 ' '
j j
R24  jX 24 R25  jX 25 2 2
1.72 0.88
 (0.89276  j 9.91964)  (1.78552  j19.83932)  j j
2 2
 2.67828  j 28.4590  28.5847  84.624 per unit
And the Hand Calculation Details!

P2 (0)  P2  P2 ( x)  P2  V2 (0){Y21V1 cos[ 2 (0)   1 (0)   21 ]


 Y22V2 cos[ 22 ]  Y23V3 cos[ 2 (0)   3 (0)   23 ]
 Y24V4 cos[ 2 (0)   4 (0)   24 ]
 Y25V5 cos[ 2 (0)   5 (0)   25 ]}
 8.0  1.0{28.5847(1.0) cos(84.624)
 9.95972(1.0) cos(95.143)
 19.9159(1.0) cos(95.143)}
 8.0  (2.89  10 4 )  7.99972 per unit

J 124 (0)  V2 (0)Y24V4 (0) sin[ 2 (0)   4 (0)   24 ]


 (1.0)(9.95972)(1.0) sin[95.143]
 9.91964 per unit
Five Bus Power System Solved

A A
One Five Four Three
MVA MVA

395 MW A
520 MW
MVA

114 Mvar slack


337 Mvar

1.000 pu 0.974 pu A A
1.019 pu 80 MW
0.000 Deg -4.548 Deg MVA MVA
-2.834 Deg 40 Mvar
1.050 pu
-0.597 Deg

0.834 pu Two
-22.406 Deg

800 MW
280 Mvar
Generation Changes and The Slack Bus

• The power flow is a steady-state analysis tool, so the


assumption is total load plus losses is always equal
to total generation
• Generation mismatch is made up at the slack bus
• When doing generation change power flow studies
one always needs to be cognizant of where the
generation is being made up
• Common options include system slack, distributed across
multiple generators by participation factors or by economics
Solving Large Power Systems

The most difficult computational task is inverting


the Jacobian matrix
– inverting a full matrix is an order n3 operation, meaning
the amount of computation increases with the cube of the
size size
– this amount of computation can be decreased substantially
by recognizing that since the Ybus is a sparse matrix, the
Jacobian is also a sparse matrix
– using sparse matrix methods results in a computational
order of about n1.5.
– this is a substantial savings when solving systems with
tens of thousands of buses
Newton-Raphson Power Flow

Advantages
– fast convergence as long as initial guess is close to
solution
– large region of convergence
Disadvantages
– each iteration takes much longer than a Gauss-Seidel
iteration
– more complicated to code, particularly when
implementing sparse matrix algorithms
Newton-Raphson algorithm is very common in
power flow analysis

You might also like