Power Flow Analysis - Part2

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

ELE B7 Power Systems Engineering

Newton-Raphson Method
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
f ( xˆ )  0

Slide # 2
Newton-Raphson Method (scalar)

1. For each guess of xˆ , x ( v ) , define


x (v )  xˆ - x (v )
2. Represent f ( xˆ ) by a Taylor series about f ( x)
(v )
df ( x ) (v )
f ( xˆ )  f ( x ) 
(v)
x 
dx
d 2 f ( x(v ) )
 
2
 x (v )
 higher order terms
dx 2

Slide # 3
Newton-Raphson Method, cont’d

3. Approximate f ( xˆ ) by neglecting all terms


except the first two
(v)
df ( x ) ( v )
f ( xˆ )  0  f ( x (v)
) x
dx
4. Use this linear approximation to solve for x (v )
1
 df ( x ) (v )
x  
(v )
 f ( x (v)
)
 dx 
5. Solve for a new estimate of x̂
x (v 1)  x ( v )  x ( v )
Slide # 4
Newton-Raphson Example

Use Newton-Raphson to solve f ( x )  x 2 - 2  0


The equation we must iteratively solve is
1
 df ( x ) (v )
x (v )
   f ( x (v )
)
 dx 
x (v )  1  (v) 2
   ( v )  (( x ) - 2)
 2x 
x (v 1)  x ( v )  x ( v )

x ( v 1)
 x (v )  1  (v ) 2
  (v )  (( x ) - 2)
2x 
Slide # 5
Newton-Raphson Example, cont’d

x ( v 1)
 x (v )  1  (v) 2
  ( v )  (( x ) - 2)
2x 
Guess x (0)  1. Iteratively solving we get
v x(v ) f ( x(v) ) x ( v )
0 1 1 0.5
1 1.5 0.25 0.08333
2 1.41667 6.953  103 2.454  103
6
3 1.41422 6.024  10

Slide # 6
Sequential Linear Approximations

At each
iteration the
N-R method
uses a linear
approximation
to determine
Function is f(x) = x2 - 2 = 0. the next value
Solutions are points where for x
f(x) intersects f(x) = 0 axis

Slide # 7
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

Slide # 8
Multi-Variable Newton-Raphson

Next we generalize to the case where x is an n-


dimension vector, and f (x) is an n-dimension function
 x1   f1 (x) 
x   f ( x) 
x   2 f ( x)   2 
   
x   f ( x) 
 n  n 
Again define the solution xˆ so f ( xˆ )  0 and
x  xˆ  x

Slide # 9
Multi-Variable Case, cont’d

The Taylor series expansion is written for each f i ( x)


f1 (x) f1 (x)
f1 (xˆ )  f1 (x)  x1  x2  
x1 x2
f1 (x)
xn  higher order terms
xn

f n (x) f n (x)
f n (xˆ )  f n (x)  x1  x2  
x1 x2
f n (x)
xn  higher order terms
xn Slide # 10
Multi-Variable Case, cont’d

This can be written more compactly in matrix form


 f1 (x)
f1 (x)

f1 (x) 
 x x2 xn 
 f1 (x)     x1 
1

 f (x)   f 2 (x)
f 2 (x)

f 2 (x)  
 x 
f (xˆ )   2    x1 x2 xn   2 
      
 f ( x)       
 
 n   f (x) f n (x)   n 
x
f n (x)
 n  
 x1 x2 xn 
 higher order terms
Slide # 11
Jacobian Matrix

The n by n matrix of partial derivatives is known


as the 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 
Slide # 12
Multi-Variable N-R Procedure

Derivation of N-R method is similar to the scalar case


f (xˆ )  f (x)  J (x)x  higher order terms
f (xˆ )  0  f (x)  J (x)x
1
x   J ( x) f ( x)
( v 1)
x  x (v )
 x (v)

x(v 1)  x(v )  J (x( v ) ) 1 f (x(v ) )


Iterate until f (x(v ) )  

Slide # 13
Multi-Variable Example

 x1 
Solve for x =   such that f (x)  0 where
x2 
f1 (x)  2 x1  x2  8  0
2 2

f 2 (x)  x12  x22  x1 x2  4  0


First symbolically determine the Jacobian
 f1 (x) f1 (x) 
 x x2 
J (x) =  1

 f 2 (x) f 2 (x) 
 x1 x2 
Slide # 14
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
1
Arbitrarily guess x(0)  
1
1
1  4 2   5  2.1
x (1)
        
1  3 1  3 1.3  Slide # 15
Multi-variable Example, cont’d

1
 2.1 8.40 2.60   2.51 1.8284 
x (2)
        
  
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 
0.1556 
f (x )  
(2)

 0.0900 
If  = 0.2 then we would be done. Otherwise we'd
continue iterating.

Slide # 16
NR Application to Power Flow

We first need to rewrite complex power equations


as equations with real coefficients
*
 n n
Si  Vi I i*  Vi   YikVk   Vi  Yik*Vk*
 k 1  k 1
These can be derived by defining
Yik = Gik  jBik
j i
Vi = Vi e  Vi  i
 ik =  i   k
Recall e j  cos  j sin 

Slide # 17
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

Slide # 18
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

Slide # 19
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   ΔP(x)   Pn (x)  PGn  PDn 
X  , f(x)     
 V2  ΔQ(x) Q2 (x)  QG 2  QD 2 
     
   
 Vn   Qn (x)  QGn  QDn 
Slide # 20
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

x( v 1)  x( v )  J (x( v ) ) 1 f (x( v ) )


v  v 1
End While

Slide # 21
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 

Slide # 22
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

fi ( x) n

 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
Slide # 23
Line Flows and Losses

Slide # 24
Line Flows and Losses

Slide # 25
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.
 
V1  10 0 V2  V2  2


S 2  200  j100

2    j10 j10 


x    Ybus   
 V2   j10  j10 
Slide # 26
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
P2  V2 V1 (10sin  2 )  2.0  0
Q2  V2 V1 (10 cos 2 )  V2 (10)  1.0  0
2

Slide # 27
Two Bus Example, cont’d

P2 (x)  V2 (10sin  2 )  2.0  0


Q2 (x)  V2 (10 cos 2 )  V2 (10)  1.0  0
2

Now calculate the power flow Jacobian


 P2 (x) P2 (x) 
  V 2 
J ( x)   2

 Q 2 (x) Q 2 (x) 
   V 2 
 2

10 V2 cos 2 10sin  2 


 
10 V2 sin  2 10 cos  2  20 V2 
Slide # 28
Two Bus Example, First Iteration

0
Set v  0, guess x (0)
 
1 
Calculate
 V2 (10sin  2 )  2.0   2.0 
f(x )  
(0)
  1.0 
 V2 (10 cos 2 )  V2 (10)  1.0 
2
 
10 V2 cos 2 10sin  2  10 0 
J (x )  
(0)
   0 10 
10 V2 sin  2 10 cos  2  20 V2   
1
0  10 0   2.0   0.2 
Solve x (1)
   1.0    
  
1 0 10     0.9 
Slide # 29
Two Bus Example, Next Iterations

 0.9 (10sin(0.2))  2.0  0.212 


f(x )  
(1)
 
0.9(10 cos(0.2))  0.9  10  1.0  
2 0.279 
 8.82 1.986 
J (x )  
(1)

 1.788 8.199 
1
 0.2   8.82 1.986  0.212   0.233
x 
(2)
       
 0.9   1.788 8.199   0.279   0.8586 
 0.0145   0.236 
f(x )  
(2)
 x (3)
  
 0.0190   0.8554 
 0.0000906 
f(x )  
(3)
 Done! V2  0.8554  13.52
 0.0001175
Slide # 30
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
 
S12  200  j168.3 S 21  200  j100
 
V1  10 0 V2  0.855  13.520

  
Sloss12  S12  S21  0  j 68.3

S 2  200  j100

Slide # 31
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

Slide # 32
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  PD 3   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

Slide # 33
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

Slide # 34
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

Slide # 35

You might also like