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 I i * *
k 1 k 1
These can be derived by defining
Yik Gik jBik
Vi Vi e ji Vi i
ik i k
Recall e j cos j sin
0
Real Power Balance Equations
n n
j ik
Si Pi jQi Vi Yik*Vk* i k
V V e (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 sinik ) PGi PDi
k 1
n
Qi Vi Vk (Gik sin ik Bik cos ik ) QGi QDi
k 1
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
2
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
n
V Qn (x) QGn QDn
3
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 ) 1
x x J (x
(v)
) f (x (v)
)
v v 1
End While
4
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
5
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
6
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 7
Two Bus Example, cont’d
General power balance equations
n
Pi Vi Vk (Gik cosik Bik sin ik ) PGi PDi
k 1
n
Qi Vi Vk (Gik sin ik Bik cosik ) 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
8
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)
V 2
J ( x) 2
Q 2 (x) Q 2 (x)
V 2
2
10 V2 cos 2 10sin 2
10 V2 sin 2 10cos 2 20 V2
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
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
17
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 (10 cos 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 10 cos 2 20 V2 2.0 V2
18
Voltage Dependent Load, cont'd
0
Again set v 0, guess x (0)
1
Calculate
V 2 (10sin 2 ) 2.0 V2
2 2.0
f(x )
(0)
V2 (10 cos 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
19
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
20
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
21
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
22