Professional Documents
Culture Documents
Power Flow
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
Newton-Raphson Method
(v)
1. For each guess of x,
(v) ( v )
x
, define
Ax
=
x-
x
2. Represent
f x) by a Taylor series about
f
(x)
(v)
(v)
df
(x
)
(v)
f x)
=
f
(x
1d
+
2
) +
2
f(x
2
dx
dx
(v)
)
Ax
(v)
Ax
(
+
2
+higher order terms
)
Newton-Raphson Method
3. Approximate
f x) by neglecting all terms
except the first two
(v)
f x) = 0
(v)
~ f(x ) +
df(x )
dx
(v)
Ax
(v)
4. Use this linear approximation to solve for
Ax
1
(v)
(v)
Ax =
df
(x )
dx
(v)
f(x )
5. Solve for a new estimate of
(v+1) ( v ) ( v )
x
=
x
+Ax
Example
2
Use Newton-Raphson to solve
f
(x)
=
x
-2
=
0
The equation we must iteratively solve is
1
(v)
(v)
Ax =
(v)
Ax =
(v+1)
df(x
dx
1
(v)
2x
(v)
)
(v)
f(x )
(v) 2
((x ) -2)
(v)
x = x +A x
(v+1) ( v )
x = x
1
(v)
(v) 2
((x ) -2)
2x
Example Solution
(v+1) ( v )
x = x
(0)
1
(v)
2x
(v) 2
((x ) -2)
Guess x
=1. Iteratively solving we get
(v)
(v)
(v)
v
x
f
(x
)
Ax
0
1
1
0.5
1
1.5
0.25
0.08333
3
3
2
1.41667
6.95310
2.45410
6
3
1.41422
6.02410
Comments
When close to the solution the error decreases
quite quickly -- method has quadratic convergence
Stopping criteria is when |f(x(v)) | < c
Results are dependent upon the initial guess.
What if we had guessed x(0) = 0, or x (0) = -1?
Multi-Variable Newton-Raphson
Next we generalize to the case where x is an n-
dimension vector, and
x
f(x) is an n-dimension function
f(x)
1
1
x
f
(x)
2
x = f ( x )
x
2
=
f ( x )
n
n
Again define the solution x so
f x)
=
0 and
Ax=
xx
Multi-Variable Case, contd
The Taylor series expansion is written for each f
c f(x) c f(x)
i
(x)
f(x) = f
1
(x)+ A x
1
+ A x +
1 1
cx
cf
(x)
1
1
2
cx
2
1
cx
Ax
n
n
+higher order terms
f
n
cf
(x) = f ( x )+
n
n
(x) c f
Ax +
1
(x)
n
Ax +
2
cf
n
cx
(x)
1
cx
2
cx
Ax
n
n
+higher order terms
Multi-Variable Case, contd
This can be written more compactly in matrix form
cf
1
(x) c f(x) c f(x)
1 1
cx
cx
cx
1
f
1
f
(x)
c f
(x)
2
2
(x) c f ( x )
2
n
Ax
1
cf ( x )
2
Ax
2
f x)=
+ c x c x
2
cx
f
n
(x)
c f
n
1 2
(x) c f ( x )
n
n
Ax
n
cf ( x )
n
cx
cx
cx
1
2
n
+
higher order terms
Jacobian Matrix
The n by n matrix of partial derivatives is known
as the Jacobian matrix,
c f(x)
J(x)
cf(x) c f(x)
1
1
1
cx
cx
cx
1
cf
2 n
(x) c f ( x ) c f ( x )
2 2 2
J(x) = c x
cx c x
cf
n
1 2 n
(x) c f ( x ) c f ( x )
n n
cx
cx
cx
1
2
n
Multi-Variable N-R Procedure
Derivation of N-R method is similar to the scalar case
f x)
f x)
Ax
(v+1)
=
=
~
f(x) +J(x x+) higher order terms
0~f(x) +J(x)Ax
1
J(x) f ( x )
(v) ( v )
x
=
x
+Ax
(v+1)
(v)
(v)
1
(v)
x
=
x
J(x
)
f(x
)
(v)
Iterate until
f(x
)
<c
Example
Solve forx=
f(x)=2x
x
x
2
+
1
such that
2
2
x 8=0
f (x)=0 where
1
f ( x )=x
1 2
2 2
x +x
x 4=0
2
1
2
1
2
First symbolically determine the Jacobian
cf
(x)
cf
(x)
1
cx
J(x)=
1
1
cx
2
cf
2
(x) c f ( x )
2
cx
1
cx
2
Solution
J(x) =
4x
2x+
1
x x
2x
2
2x
1
Then
A x 4 x
2 1 2
1
2x f(x)
1
Ax
1
=
2 x+
2 1
x x2x f ( x )
2 1 2
(0)
Arbitrarily guessx =
1 4
1 2 2
1
1
1
2 5 2.1
(1)
x =
1
=
3 1 3 1.3
Solution, contd
(2)
x =
2.1
1.3
8.40 2.60
5.50 0.50
1
2.51 1.8284
=
1.45 1.2122
Each iteration we check
specified tolerancec
0.1556
f(x) to see if it is below our
(2)
f(x ) =
0.0900
If
c
= 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
S
i
*
= V I i =
n
V Y V k
i
k=1
*
n
* *
=V Y V k
i
k=1
These can be derived by defining
Y
=
G
+
jB
ik ik
V = V
ik
jui
e =V Z u
u
i
ik
i i i
= u u
i k
j
Recall e
u =
cosu +
jsinu
Power Balance Equations
S
i
= P+jQ
i i
n
= V V
n n
* *
=V Y V =
i
k=1 k = 1
(cosu +jsinu
juik
V V e
i k
)(G jB
(G jB )
ik ik
)
i
k
ik
ik
ik
ik
k=1
Resolving into the real and imaginary parts
n
P
i
Q
= V V
i k
k=1
n
= V V
(G cos u
ik ik
(G sin u
+B sin u
ik
B cos u
)=P P
ik Gi Di
)=Q Q
i i
k=1
k ik ik
ik ik Gi Di
NR 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
P
i
Q
= V V
i k
k=1
n
= V V
(G cos u
ik
(G sin u
+B sin u
ik ik
B cos u
)=P P
ik Gi Di
)=Q Q
i i
k=1
k ik ik
ik ik Gi Di
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.
x =
u
u
V
2
n
f(x)
P(x) P +P
2 G 2 D 2
P(x) P +P
n Gn Dn
=
Q(x) Q + Q
2 2
V Q
G2 D 2
(x) Q + Q
n
n
Gn
Dn
N-R Power Flow Solution
The power flow is solved using the same procedure
discussed last time:
(v)
Setv = 0; make an initial guess of
(v)
Whilef(x )>c Do
(v+1) ( v ) ( v ) 1 ( v )
x,
x
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)
cf
1
(x) c f(x) c f(x)
1 1
cx
cx
cx
1
cf
2 n
(x) c f(x) c f(x)
2 2 2
J(x) = c x
cx c x
cf
n
1 2 n
(x) c f ( x ) c f ( x )
n n
cx
cx
cx
1
2
n
Power Flow Jacobian Matrix,
Jacobian elements are calculated by differentiating
each function, f
i
(x), with respect to each variable.
For example, if f
n
i
(x) is the bus i real power equation
f(x) = V
V ( G cos u
+B sin u
)P +P
i
cf
i
k=1
n
(x)
=
i k ik
V V ( G
ik ik
sinu +B
ik Gi Di
cosu )
cu
i
i k = 1
k=i
k ik ik ik ik
cf(x)
i
= V
V ( G sin u
B cos u
) (j=i)
cu
i j
j
ik ik ik ik
Two Bus, 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.
u
x =
2
Y
bus
j10 j 10
=
V
2
j10 j10
Two Bus Example, contd
General power balance equations
n
P
i
Q
= V V
i k
k=1
n
= V V
(G cos u
ik ik
(G sin u
+B sin u
ik
B cos u
)=P P
ik Gi Di
)=Q Q
i i k ik ik ik
k=1
Bus two power balance equations
P=VV(10sinu) +2.0=
ik Gi Di
0
2
Q
2
2 1 2
= V V ( 10cos u
2 1
2
) +V (10) + 1.0=0
2 2
Two Bus Example, contd
P
2
Q
(x)= V
2
(x)= V
(10sinu ) + 2.0
2
(10 cosu ) +V
= 0
2
(10)+1.0=0
2
2
2
2
Now calculate the power flow Jacobian
cP
2
(x) c P(x)
2
cu
J(x)=
2
cV
2
cQ
2
(x) c Q(x)
2
cu
10V
2
cosu
cV
2
10 sinu
=
2
10V
2
2 2
sinu 10cos u +20V
2 2 2
First Iteration
(0)
Setv = 0, guessx =
Calculate
0
1
V
2
(0)
f(x )=
(10sinu ) + 2.0
2 2.0
=
2
V
2
(10cosu
) +V (10) + 1.0 1.0
2 2
(0)
J(x )=
10V cos u
2 2
10V sin u
10 sinu
10cosu+
10 0
2
=
20V 0 10
(1)
Solve x =
2
0
1
2
10 0
0 10
2 2
1
2.0 0.2
=
1.0 0.9
Next Iterations
(1)
f(x )=
(1)
J(x )=
0.9(10sin(0.2))+2.0
2
0.9(10 cos(0.2))+0.9 10 + 1.0
8.82 1.986
1.788 8.199
1
0.212
=
0.279
(2)
x =
0.2
0.9
8.82 1.986
1.788 8.199
0.212 0.233
=
0.279 0.8586
(2)
f(x )=
(3)
f(x )=
0.0145
0.0190
0.0000906
0.236
(3)
x =
0.8554
Done! V =
0.8554Z13.52
2
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
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
u
x = u
2
3
P
2
f(x) = P
3
(x) P +P
G2 D 2
(x) P +P =0
G3 D 3
V
2
!"
Q(x) + Q
2 D 2