Você está na página 1de 42

ECE 530 – Analysis Techniques for

Large-Scale Electrical Systems

Lecture 4: Newton-Raphson Power Flow

Prof. Hao Zhu


Dept. of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign
haozhu@illinois.edu
9/2/2015

1
Announcements

• No class next Monday (labor day)


• Homework 1 due next Wednesday, in class
• A reference book on linear algebra: The Matrix
Cookbook
http://www.math.uwaterloo.ca/~hwolkowi/matrixcookb
ook.pdf

2
Newton-Raphson Method
• To solve a set of nonlinear equations denoted by
f(x) = 0
•Derivation of N-R
N-R proceeds by method
iterativeislinearization
similar to the scalar case
f (xˆ )  f (x)  J (x) x  higher order terms
f (xˆ )  0  f (x)  J (x) x
x   J (x) 1f (x)
x( v 1)  x( v )  x( v )
x( v 1)  x( v )  J (x( v ) ) 1f (x( v ) )
Iterate until f (x( v ) )  
3
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)  
V Q2 (x)  QG 2  QD 2 
 2  
   
   
 Vn   Qn (x)  QGn  QDn 

4
N-R Power Flow Solution
The power flow is solved using the same procedure
discussed with the general Newton-Raphson:
Set v  0; make an initial guess of x, x( v )
While f (x( v ) )   Do

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


v  v 1
End While

5
Power Flow Formulation
• First consider the case that all buses are PQ-bus;
– 𝑃𝑖 and 𝑄𝑖 are specified; |𝑉𝑖 | and 𝜃𝑖 unknown
• This specification of the two bus variables leads to two
equality constraints (recall the real-valued power
balance equations)
𝑛

𝑓𝑖𝑃 = ෍ 𝑉𝑖 𝑉𝑘 𝐺𝑖𝑘 cos 𝜃𝑖𝑘 + 𝐵𝑖𝑘 sin 𝜃𝑖𝑘 − 𝑃𝐺𝑖 + 𝑃𝐷𝑖


𝑘=1
𝑛
𝑄
𝑓𝑖 = ෍ 𝑉𝑖 𝑉𝑘 𝐺𝑖𝑘 sin 𝜃𝑖𝑘 − 𝐵𝑖𝑘 cos 𝜃𝑖𝑘 − 𝑄𝐺𝑖 + 𝑄𝐷𝑖
𝑘=1
6
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 

7
Power Flow Jacobian
• Elements of Jacobian matrix: differentiating each
function with respect to (wrt) every variable
• Consider the real power equation at bus i
𝑛

𝑓𝑖𝑃 = ෍ 𝑉𝑖 𝑉𝑘 𝐺𝑖𝑘 cos 𝜃𝑖𝑘 + 𝐵𝑖𝑘 sin 𝜃𝑖𝑘 − 𝑃𝐺𝑖 + 𝑃𝐷𝑖


𝑘=1

• The corresponding Jacobian entries are:


𝜕𝑓𝑖𝑃
= ෍ 𝑉𝑖 𝑉𝑘 −𝐺𝑖𝑘 sin 𝜃𝑖𝑘 + 𝐵𝑖𝑘 cos 𝜃𝑖𝑘
𝜕𝜃𝑖
𝑘≠𝑖
𝜕𝑓𝑖𝑃
= 𝑉𝑖 |𝑉𝑗 |(𝐺𝑖𝑗 sin 𝜃𝑖𝑗 − 𝐵𝑖𝑗 cos 𝜃𝑖𝑗 )
𝜕𝜃𝑗 8
Power Flow Jacobian, cont’d
• By differentiating it wrt voltage magnitude
𝑛

𝑓𝑖𝑃 = ෍ 𝑉𝑖 𝑉𝑘 𝐺𝑖𝑘 cos 𝜃𝑖𝑘 + 𝐵𝑖𝑘 sin 𝜃𝑖𝑘 − 𝑃𝐺𝑖 + 𝑃𝐷𝑖


𝑘=1

We have
𝜕𝑓𝑖𝑃
= 2 𝑉𝑖 𝐺𝑖𝑖 + σ𝑘≠𝑖 𝑉𝑘 𝐺𝑖𝑘 cos 𝜃𝑖𝑘 + 𝐵𝑖𝑘 sin 𝜃𝑖𝑘
𝜕|𝑉𝑖 |

𝜕𝑓𝑖𝑃
= 𝑉𝑖 (𝐺𝑖𝑘 cos 𝜃𝑖𝑘 + 𝐵𝑖𝑘 sin 𝜃𝑖𝑘 )
𝜕 𝑉𝑗

• Similar derivations for reactive power equations


9
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
Slack bus 1, SBase = 100 MVA, and 𝜖 = 1𝑒 −3 .
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 
10
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
V2 V1 (10cos 2 )  V2 (10)  1.0  0
2

11
Two Bus Example, cont’d
P2 (x)  V2 (10sin  2 )  2.0  0
Q2 (x)  V2 (10cos 2 )  V2 (10)  1.0  0
2

Now calculate the power flow Jacobian


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

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

10 V2 cos 2 10sin  2 


 
10 V2 sin  2 10cos 2  20 V2 
12
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 (10cos 2 )  V2 (10)  1.0 
2
 
10 V2 cos 2 10sin  2  10 0 
J (x )  
(0)
   0 10 
10 V2 sin  2 10cos 2  20 V2   
1
0  10 0   2.0   0.2 
Solve x (1)
   1.0    
  
1 0 10     0.9 
13
Two Bus Example, Convergence
 0.9(10sin(0.2))  2.0  0.212 
f(x )  
(1)
 
0.9(10cos(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
14
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

PowerWorld Case Name: Bus2_Intro

15
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 
Set v  0, guess x (0)
 
 0.25 
Calculate
 V2 (10sin  2 )  2.0   2 
f(x )  
(0)
   0.875
 V2 (10 cos 2 )  V2 (10)  1.0 
2
 
10 V2 cos 2 10sin  2   2.5 0 
J (x )  
(0)
   0 5
10 V2 sin  2 10 cos 2  20 V2   
16
Low Voltage Solution, cont'd
1
 0   2.5 0   2   0.8 
Solve x  
(1)
       
 0.25   0  5   0.875   0.075 
1.462  (2)  1.42   0.921
f (x )  
(2)
 x   x 
(3)

 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

17
Practical Power Flow Software
• Most commercial software packages have built in
defaults to prevent convergence to low voltage
solutions.
– One approach is to automatically change the load model from
constant power to constant current or constant impedance
when the load bus voltage gets too low
– In PowerWorld these defaults can be modified on the Tools,
Simulator Options, Advanced Options page; note you also
need to disable the “Initialize from Flat Start Values” option
– The PowerWorld case Bus2_Intro_Low is set solved to the
low voltage solution
– Initial bus voltages can be set using the Bus Information
Dialog
18
NR Initialization
• A textbook starting solution for the NR is to use “flat
start” values in which all the angles are set to the slack
bus angle, all the PQ bus voltages are set to 1.0, and all
the PV bus voltages are set to their PV setpoint values
• This approach usually works for small systems
• It seldom works for large systems. The usual approach
for solving large systems is to start with an existing
solution, modify it, then hope it converges
– If not make the modification smaller
– More robust methods are possible, but convergence is
certainly not guaranteed!!
19
PV Buses
• At PV–bus i (generator bus), 𝑃𝑖 and |𝑉𝑖 | are fixed
• Similar to slack bus, no need to include these |𝑉𝑖 |’s 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)
• Otherwise, it can be included in x using an additional
equality for PV-bus i
𝑛

𝑓𝑖𝑃 = ෍ 𝑉𝑖 𝑉𝑘 𝐺𝑖𝑘 cos 𝜃𝑖𝑘 + 𝐵𝑖𝑘 sin 𝜃𝑖𝑘 − 𝑃𝐺𝑖 + 𝑃𝐷𝑖


𝑘=1
setpoint
𝑓𝑖𝑉 = 𝑉𝑖 − 𝑉𝑖
20
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

21
Modeling Voltage Dependent Load
So far we've assumed that the load is independent of
the bus voltage (i.e., constant power). However, the
power flow can be easily extended to include voltage
depedence with both the real and reactive load. This
is done by making PDi and Q Di a function of Vi :
n
 Vi Vk (Gik cosik  Bik sin ik )  PGi  PDi ( Vi )  0
k 1
n
 Vi Vk (Gik sin ik  Bik cosik )  QGi  QDi ( Vi )  0
k 1

22
Voltage Dependent Load Example
In previous two bus example now assume the load is
constant impedance, so
P2 (x)  V2 (10sin  2 )  2.0 V2
2
 0
Q2 (x)  V2 (10cos 2 )  V2 (10)  1.0 V2  0
2 2

Now calculate the power flow Jacobian


10 V2 cos 2 10sin  2  4.0 V2 
J ( x)  
10 V2 sin  2 10cos 2  20 V2  2.0 V2 

23
Voltage Dependent Load, cont'd
0 
Again set v  0, guess x (0)
 
1 
Calculate
 V2 (10sin  2 )  2.0 V2
2   2.0 
f(x )  
(0)
   
 V2 (10cos 2 )  V2 (10)  1.0 V2 
2 2
1.0 
10 4 
J (x )  
(0)

 0 12 
1
0  10 4   2.0   0.1667 
Solve x (1)
   1.0    
  
1 0 12     0.9167 
24
Voltage Dependent Load, cont'd
With constant impedance load the MW/Mvar load at
bus 2 varies with the square of the bus 2 voltage
magnitude. This if the voltage level is less than 1.0,
the load is lower than 200/100 MW/Mvar
160.0 MW -160.0 MW
120.0 MVR Line Z = 0.1j -80.0 MVR

0.894 pu
One 1.000 pu Two -10.304 Deg

160.0 MW 160 MW
120.0 MVR 80 MVR

PowerWorld Case Name: Bus2_Intro_Z

25
Generator Reactive Power Limits
• The reactive power output of generators varies to
maintain the terminal voltage; on an actual generator this
is done by the exciter
• To maintain higher voltages requires more reactive power
• Generators have reactive power limits, which are
dependent upon the generator's MW output
• So for PV-bus i, we have 𝑄𝑖min ≤ 𝑄𝑖 ≤ 𝑄𝑖max
• These limits must be satisfied by the power flow solution.

26
Generator Reactive Limits, cont'd
• During power flow once a solution is obtained, check to
make sure every generator reactive power output 𝑄𝑖 is
within its limits
• If the reactive power is outside of the limits, fix Q at the
max or min value, and resolve treating the generator as
a PQ bus
– this is know as "type-switching"
– also need to check if a PQ generator can again regulate
• Rule of thumb: to raise system voltage we need to
supply more Vars

27
Switching Bus Status
• At iteration 𝜈, we use 𝐱 (𝜈−1) to compute 𝐱 (𝜈)
• Suppose that after N-R update 𝐱 (𝜈) violates the reactive
power limits at a PV-bus k
• Then, in iteration 𝜈, we need to change bus k to a PQ-bus
𝑄𝑘max 𝑖𝑓 𝑄𝑘 𝐱 𝜈 > 𝑄𝑘max
𝑄𝑘 = ቊ min
𝑄𝑘 𝑖𝑓 𝑄𝑘 𝐱 𝜈 < 𝑄𝑘min
• And 𝑉𝑘 should be included in x
• After computing 𝐱 (𝜈+1) , we may need to switch bus k
(𝜈+1) setpoint
back to a PV-one by comparing 𝑉𝑘 with 𝑉𝑘
How do we want to code up the N-R algorithm?
28
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

Line 2

Line 1
400 MVA 345 kV 345 kV 40 Mvar 80 MW
15/345 kV 100 mi 200 mi

2
280 Mvar 800 MW
Single-line diagram

This five bus example is taken from Chapter 6 of Power System


Analysis and Design by Glover, Sarma, and Overbye, 5th
Edition, 2011
29
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
30
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
31
Five Bus Case Ybus

PowerWorld Case Name: Bus5_GSO


32
Ybus Calculation 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
33
Here are the Initial Bus Mismatches

34
And the Initial Power Flow Jacobian

35
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

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


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

One Five Four Three


A A

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

37
Quasi-Newton Power Flow Methods

• We will introduced some modified versions of the


Newton-Raphson (N-R) power flow
• Since most of the computation in the N-R PF is
associated with building and solving the Jacobian matrix,
J, the focus is on trying to reduce this computation
• Quasi-Newton methods of a more general update
−1
𝐱 (𝜈+1) = 𝐱 (𝜈) −𝐌 𝐱 𝜈 𝐟(𝐱 𝜈 )

• Even if 𝐌 ≠ 𝐉, the solution is still valid for f(x) = 0 if the


quasi-Newton iterations do converge

38
Dishonest Newton Method
• The simplest modification results when J is kept
constant for a number of iterations, say 𝐾 iterations
– Sometimes known as the Dishonest Newton method
−1
𝐱 (𝜈+1) = 𝐱 (𝜈) −𝐉 𝐱 ( 𝜈/𝐾 𝐾) 𝐟(𝐱 𝜈 )

• The approach balances increased speed per iteration,


with potentially more iterations to perform
• There is also an increased possibility for divergence

39
Dishonest N-R Example, cont’d

x ( v 1)
 x (v)  1  (v) 2
  (0)  (( x ) - 2)
2x 
Guess x (0)  1. Iteratively solving we get We pay a price
v x ( v ) (honest) x ( v ) (dishonest) in increased
0 1 1 iterations, but
with decreased
1 1.5 1.5
computation
2 1.41667 1.375 per iteration
3 1.41422 1.429
4 1.41422 1.408
40
Numerical differentiation

• Another approach to avoid directly computing the


Jacobian matrix J at every iteration
• Based on numerical approximation
𝜕𝑓𝑖 𝑓𝑖 𝑥𝑗 + Δ𝑥𝑗 − 𝑓𝑖 𝑥𝑗 − Δ𝑥𝑗

𝜕𝑥𝑗 2Δ𝑥𝑗
with small perturbation Δ𝑥𝑗 (of about 1%)

41
Secant Method
• Consider a linear approximation of 𝑓
𝑔 𝑥 = 𝑔0 + 𝑔1 𝑥
with 𝑔 𝑥 (𝜈−1) = 𝑓 𝑥 (𝜈−1) and 𝑔 𝑥 (𝜈) = 𝑓 𝑥 (𝜈)
• The iterative solution to 𝑔 𝑥 = 0 becomes
−1
𝑓 𝑥 𝜈 −𝑓 𝑥 𝜈−1
𝑥 (𝜈+1) = 𝑥 (𝜈) − 𝑓 𝑥 (𝜈)
𝑥 𝜈 −𝑥 𝜈−1

Fig. 3.8 of Crow’s


book, 3rd edition

42

Você também pode gostar