ECE 476 Power System Analysis Lecture 12: Power Flow Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana- Champaign [email protected]
Jan 29, 2016
ECE 476 Power System Analysis
Lecture 12: Power Flow
Prof. Tom Overbye
Dept. of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign
Announcements
• Read Chapter 6• H6 is 6.19, 6.30, 6.31, 6.34, 6.38, 6.45. It does not
need to be turned in, but will be covered by an in-class quiz on Oct 15.
2
Transmission Line Corridors from the Air
Image Source: Jamie Padilla
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.
4
Stated Another Way
• From exam problem 4.c we had
• This Ybus is actually singular!
• So we cannot solve • This means (as you might expect), we cannot
independently specify all the current injections I
Bus 2 Bus 1
Bus 3
j0.2
j0.1 j0.1
15 5 10
5 15 10
10 10 20
j
busY
1 busV Y I
5
Gauss with Many Bus Systems
*( )( 1)
( )*1,
( ) ( ) ( )1 2
( 1)
With multiple bus systems we could calculate
new V ' as follows:
S1
( , ,..., )
But after we've determined we have a better
estimate of
i
i
nvv i
i ik kvii k k i
v v vi n
vi
s
V Y VY V
h V V V
V
its voltage , so it makes sense to use this
new value. This approach is known as the
Gauss-Seidel iteration. 6
Gauss-Seidel Iteration
( 1) ( ) ( ) ( )2 12 2 3
( 1) ( 1) ( ) ( )2 13 2 3
( 1) ( 1) ( 1) ( ) ( )2 14 2 3 4
( 1) ( 1) ( 1) ( 1) ( )2 1 2 3 4
Immediately use the new voltage estimates:
( , , , , )
( , , , , )
( , , , , )
( , , , ,
v v v vn
v v v vn
v v v v vn
v v v v vn n
V h V V V V
V h V V V V
V h V V V V V
V h V V V V V
)
The Gauss-Seidel works better than the Gauss, and
is actually easier to implement. It is used instead
of Gauss.7
Three Types of Power Flow Buses
• There are three main types of power flow buses– Load (PQ) at which P and Q are fixed; iteration solves for
voltage magnitude and angle. – Slack at which the voltage magnitude and angle are
fixed; iteration solves for P and 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 (covered in book, but not in slides since Gauss-Seidel is no longer commonly used)
8
Accelerated G-S Convergence
( 1) ( )
( 1) ( ) ( ) ( )
(
Previously in the Gauss-Seidel method we were
calculating each value x as
( )
To accelerate convergence we can rewrite this as
( )
Now introduce acceleration parameter
v v
v v v v
v
x h x
x x h x x
x
1) ( ) ( ) ( )( ( ) )
With = 1 this is identical to standard gauss-seidel.
Larger values of may result in faster convergence.
v v vx h x x
9
Accelerated Convergence, cont’d
( 1) ( ) ( ) ( )
Consider the previous example: - 1 0
(1 )
Comparison of results with different values of
1 1.2 1.5 2
0 1 1 1 1
1 2 2.20 2.5 3
2 2.4142 2.5399 2.6217 2.464
3 2.5554 2.6045 2.6179 2.675
4 2.59
v v v v
x x
x x x x
k
81 2.6157 2.6180 2.596
5 2.6118 2.6176 2.6180 2.626 10
Gauss-Seidel Advantages/Disadvantages
• Advantages– Each iteration is relatively fast (computational order is
proportional to number of branches + number of buses in the system
– Relatively easy to program
• 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
11
Newton-Raphson Algorithm
• The second major power flow solution method is the Newton-Raphson algorithm
• Key idea behind Newton-Raphson is to use sequential linearization
General form of problem: Find an x such that
( ) 0ˆf x
12
Newton-Raphson Method (scalar)
( )
( ) ( )
( )( ) ( )
2 ( ) 2( )2
1. For each guess of , , define ˆ
-ˆ
2. Represent ( ) by a Taylor series about ( )ˆ
( )( ) ( )ˆ
1 ( )higher order terms
2
v
v v
vv v
vv
x x
x x x
f x f x
df xf x f x x
dx
d f xx
dx
13
Newton-Raphson Method, cont’d
( )( ) ( )
( )
1( )( ) ( )
3. Approximate ( ) by neglecting all terms ˆ
except the first two
( )( ) 0 ( )ˆ
4. Use this linear approximation to solve for
( )( )
5. Solve for a new estim
vv v
v
vv v
f x
df xf x f x x
dx
x
df xx f x
dx
( 1) ( ) ( )
ate of x̂v v vx x x
14
Newton-Raphson Example
2
1( )( ) ( )
( ) ( ) 2( )
( 1) ( ) ( )
( 1) ( ) ( ) 2( )
Use Newton-Raphson to solve ( ) - 2 0
The equation we must iteratively solve is
( )( )
1(( ) - 2)
2
1(( ) - 2)
2
vv v
v vv
v v v
v v vv
f x x
df xx f x
dx
x xx
x x x
x x xx
15
Newton-Raphson Example, cont’d
( 1) ( ) ( ) 2( )
(0)
( ) ( ) ( )
3 3
6
1(( ) - 2)
2
Guess x 1. Iteratively solving we get
v ( )
0 1 1 0.5
1 1.5 0.25 0.08333
2 1.41667 6.953 10 2.454 10
3 1.41422 6.024 10
v v vv
v v v
x x xx
x f x x
16
Sequential Linear Approximations
Function is f(x) = x2 - 2 = 0.
Solutions are points where
f(x) intersects f(x) = 0 axis
At each
iteration the
N-R method
uses a linear
approximation
to determine
the next value
for x17
Newton-Raphson Comments
• When close to the solution the error decreases quite quickly -- method has quadratic convergence
• f(x(v)) is known as the mismatch, which we would like to drive to zero
• Stopping criteria is when f(x(v)) < • Results are dependent upon the initial guess. What
if we had guessed x(0) = 0, or x (0) = -1?• A solution’s region of attraction (ROA) is the set of
initial guesses that converge to the particular solution. The ROA is often hard to determine
18
Multi-Variable Newton-Raphson
1 1
2 2
Next we generalize to the case where is an n-
dimension vector, and ( ) is an n-dimension function
( )
( )( )
( )
Again define the solution so ( ) 0 andˆ ˆn n
x f
x f
x f
x
f x
x
xx f x
x
x f x
x
ˆ x x
19
Multi-Variable Case, cont’d
i
1 11 1 1 2
1 2
1
n nn n 1 2
1 2
n
The Taylor series expansion is written for each f ( )
f ( ) f ( )f ( ) f ( )ˆ
f ( )higher order terms
f ( ) f ( )f ( ) f ( )ˆ
f ( )higher order terms
nn
nn
x xx x
xx
x xx x
xx
x
x xx x
x
x xx x
x
20
Multi-Variable Case, cont’d
1 1 1
1 21 1
2 2 22 2
1 2
1 2
This can be written more compactly in matrix form
( ) ( ) ( )
( )( ) ( ) ( )
( )( )ˆ
( )( ) ( ) ( )
n
n
nn n n
n
f f fx x x
f xf f f
f xx x x
ff f fx x x
x x x
xx x x
xf x
xx x x
higher order terms
nx
21
Jacobian Matrix
1 1 1
1 2
2 2 2
1 2
1 2
The n by n matrix of partial derivatives is known
as the Jacobian matrix, ( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
n
n
n n n
n
f f fx x x
f f fx x x
f f fx x x
J x
x x x
x x x
J x
x x x
22
Multi-Variable Example
1
2
2 21 1 2
2 22 1 2 1 2
1 1
1 2
2 2
1 2
xSolve for = such that ( ) 0 where
x
f ( ) 2 8 0
f ( ) 4 0
First symbolically determine the Jacobian
f ( ) f ( )
( ) =f ( ) f ( )
x x
x x x x
x x
x x
x f x
x
x
x x
J xx x
23
Multi-variable Example, cont’d
1 2
1 2 1 2
11 1 2 1
2 1 2 1 2 2
(0)
1(1)
4 2( ) =
2 2
Then
4 2 ( )
2 2 ( )
1Arbitrarily guess
1
1 4 2 5 2.1
1 3 1 3 1.3
x x
x x x x
x x x f
x x x x x f
J x
x
x
x
x
24
Multi-variable Example, cont’d
1(2)
(2)
2.1 8.40 2.60 2.51 1.8284
1.3 5.50 0.50 1.45 1.2122
Each iteration we check ( ) to see if it is below our
specified tolerance
0.1556( )
0.0900
If = 0.2 then we wou
x
f x
f x
ld be done. Otherwise we'd
continue iterating.
25
NR Application to Power Flow
** * *
i1 1
We first need to rewrite complex power equations
as equations with real coefficients
S
These can be derived by defining
Recal
i
n n
i i i ik k i ik kk k
ik ik ik
ji i i i
ik i k
V I V Y V V Y V
Y G jB
V V e V
jl e cos sinj
26
Real Power Balance Equations
* *i
1 1
1
i1
i1
S ( )
(cos sin )( )
Resolving into the real and imaginary parts
P ( cos sin )
Q ( sin cos
ikn n
ji i i ik k i k ik ik
k k
n
i k ik ik ik ikk
n
i k ik ik ik ik Gi Dik
n
i k ik ik ik ik
P jQ V Y V V V e G jB
V V j G jB
V V G B P P
V V G B
)k Gi DiQ Q
27
Newton-Raphson Power Flow
i1
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
P ( cosn
i k ik ikk
V V G
i1
sin )
Q ( sin cos )
ik ik Gi Di
n
i k ik ik ik ik Gi Dik
B P P
V V G B Q Q
28
Power Flow Variables
2 2 2
n
2
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.
( )
( )
G
n
P P
V
V
x
x f x
2
2 2 2
( )
( )
( )
D
n Gn Dn
G D
n Gn Dn
P
P P P
Q Q Q
Q Q Q
x
x
x
29
N-R Power Flow Solution
( )
( )
( 1) ( ) ( ) 1 ( )
The power flow is solved using the same procedure
discussed last time:
Set 0; make an initial guess of ,
While ( ) Do
( ) ( )
1
End While
v
v
v v v v
v
v v
x x
f x
x x J x f x
30
Power Flow Jacobian Matrix
1 1 1
1 2
2 2 2
1 2
1 2
The most difficult part of the algorithm is determining
and inverting the n by n Jacobian matrix, ( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
n
n
n n n
n
f f fx x x
f f fx x x
f f fx x x
J x
x x x
x x x
J x
x x x
31
Power Flow Jacobian Matrix, cont’d
i
i
i1
Jacobian elements are calculated by differentiating
each function, f ( ), with respect to each variable.
For example, if f ( ) is the bus i real power equation
f ( ) ( cos sin )n
i k ik ik ik ik Gik
x V V G B P P
x
x
i
1
i
f ( )( sin cos )
f ( )( sin cos ) ( )
Di
n
i k ik ik ik iki k
k i
i j ij ij ij ijj
xV V G B
xV V G B j i
32
Two Bus Newton-Raphson Example
Line Z = 0.1j
One Two 1.000 pu 1.000 pu
200 MW 100 MVR
0 MW 0 MVR
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.
2
2
10 10
10 10busj j
V j j
x Y
33
Two Bus Example, cont’d
i1
i1
2 1 2
22 1 2 2
General power balance equations
P ( cos sin )
Q ( sin cos )
Bus two power balance equations
(10sin ) 2.0 0
( 10cos ) (10) 1.0 0
n
i k ik ik ik ik Gi Dik
n
i k ik ik ik ik Gi Dik
V V G B P P
V V G B Q Q
V V
V V V
34
Two Bus Example, cont’d
2 2 2
22 2 2 2
2 2
2 2
2 2
2 2
2 2 2
2 2 2 2
P ( ) (10sin ) 2.0 0
( ) ( 10cos ) (10) 1.0 0
Now calculate the power flow Jacobian
P ( ) P ( )
( )Q ( ) Q ( )
10 cos 10sin
10 sin 10cos 20
V
Q V V
VJ
V
V
V V
x
x
x x
xx x
35
Two Bus Example, First Iteration
(0)
2 2(0)2
2 2 2
2 2 2(0)
2 2 2 2
(1)
0Set 0, guess
1
Calculate
(10sin ) 2.0 2.0f( )
1.0( 10cos ) (10) 1.0
10 cos 10sin 10 0( )
10 sin 10cos 20 0 10
0 10 0Solve
1 0 10
v
V
V V
V
V V
x
x
J x
x1 2.0 0.2
1.0 0.9
36