Sunteți pe pagina 1din 30

Newton-Raphson

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
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)
(v )
x +
f ( x ) = f ( x ) +
dx

1 d 2 f ( x(v) )
(v )
+

x
2 dx 2

+ higher order terms

Newton-Raphson Method
3. Approximate f ( x ) by neglecting all terms
except the first two
(v )
(
) (v )
df
x
(v)
f ( x ) = 0 f ( x ) +
x
dx

4. Use this linear approximation to solve for x (v )


x

(v)

(v)

df ( x )
=
dx

f ( x(v ) )

5. Solve for a new estimate of x


x( v +1) = x ( v ) + x (v )

Example
Use Newton-Raphson to solve f ( x ) = x 2 - 2 = 0
The equation we must iteratively solve is
x

(v )

(v )

(v )

df ( x )
=
dx

f ( x (v) )

1
(v) 2
=
x
((
) - 2)
(v )
2x

x ( v +1) = x ( v ) + x ( v )
x

( v +1)

= x

(v )

1
(v ) 2

x
((
) - 2)
(v)
2x

Example Solution
x

( v +1)

= x

Guess x

(0)

(v)

1
(v ) 2

(( x ) - 2)
(v )
2x

= 1. Iteratively solving we get

v
0
1

x(v)
1
1.5

f ( x(v ) )
1
0.25

x (v )
0.5
0.08333

1.41667

6.953 103

2.454 103

1.41422

6.024 10

Comments
When close to the solution the error decreases
quite quickly -- method has quadratic convergence
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?

Multi-Variable Newton-Raphson
Next we generalize to the case where x is an ndimension vector, and f (x) is an n-dimension function
x =

x1

f1 (x)

x2

f 2 ( x)

xn

f ( x) =

f n ( x)

Again define the solution x so f (x ) = 0 and


x = x x

Multi-Variable Case, contd


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 )
x n + higher order terms
xn
f n ( x )
f n ( x )
f n ( x ) = f n ( x ) +
x1 +
x2 +
x1
x2
f n ( x )
x n + higher order terms
xn

Multi-Variable Case, contd


This can be written more compactly in matrix form
f1 ( x )
x1

f1 ( x )
x2

f1 ( x )
xn

f 2 ( x )
f 2 (x)
+ x1
f (x ) =

f 2 ( x )
x2

f 2 ( x )
xn

f1 ( x )

f n (x)

f n ( x )
x1

f n ( x )
x2

+ higher order terms

f n ( x )
xn

x1
x2
xn

Jacobian Matrix
The n by n matrix of partial derivatives is known
as the Jacobian matrix, J (x)

J (x) =

f1 (x)
x1

f1 (x)
x2

f1 (x)
xn

f 2 (x)
x1

f 2 ( x)
x2

f 2 (x)
xn

f n (x)
x1

f n (x)
x2

f n (x)
xn

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
x

J (x) 1 f (x)

x( v+1) = x( v ) + x( v )
x( v+1) = x( v ) J (x( v ) ) 1 f (x( v ) )
Iterate until f (x( v ) ) <

Example
Solve for x =

x1
x2

such that f ( x ) = 0 where

f1 ( x ) = 2 x12 + x 22 8 = 0
f 2 ( x ) = x12 x 22 + x1 x 2 4 = 0
First symbolically determine the Jacobian
J (x ) =

f1 ( x )
x1

f1 ( x )
x2

f 2 ( x )
x1

f 2 ( x )
x2

Solution
J (x) =

4 x1

2 x2

2 x1 + x2

x1 2 x2

4 x1

2 x2

2 x1 + x2

x1 2 x2

Then
x1
x2

Arbitrarily guess x
x

(1)

1
1

(0)

f1 (x)
f 2 ( x)

1
1
2

3 1

5
3

2.1
1.3

Solution, contd

(2)

2.1
1.3

8.40

2.60

5.50 0.50

2.51
1.45

1.8284
1.2122

Each iteration we check f (x) to see if it is below our


specified tolerance
f (x

(2)

0.1556
0.0900

If = 0.2 then we would be done. Otherwise we'd


continue iterating.

NR Application to Power Flow


W e first need to rew rite com plex pow er equations
as equations w ith real coefficients
S i = V i I i*

= Vi

n
k =1

Yik V k

= Vi

T hese can be derived by defining


Yik = G ik + jB ik
Vi

= Vi e

j i

= Vi i

ik = i k
R ecal l e j = cos + j sin

n
k =1

Yik* V k*

Power Balance Equations


Si = Pi +
=

n
k =1

jQi = Vi Yik*Vk*
k =1

n
k =1

Vi Vk e

j ik

(Gik jBik )

Vi Vk (cos ik + j sin ik )(Gik jBik )

Resolving into the real and imaginary parts


Pi =
Qi =

n
k =1
n
k =1

Vi Vk (Gik cos ik + Bik sin ik ) = PGi PDi


Vi Vk (Gik sin ik Bik cos ik ) = QGi QDi

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
Pi =
Qi =

n
k =1
n
k =1

Vi Vk (Gik cos ik + Bik sin ik ) = PGi PDi


Vi Vk (Gik sin ik Bik cos ik ) = QGi QDi

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 =

P2 (x) PG 2 + PD 2

Pn (x) PGn + PDn


Q2 (x) QG 2 + QD 2

V2
Vn

f ( x) =

Qn (x) QGn + QDn

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 +1
v
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)

J (x) =

f1 (x)
x1

f1 (x)
x2

f1 (x)
xn

f 2 (x)
x1

f 2 (x)
x2

f 2 (x)
xn

f n (x)
x1

f n (x)
x2

f n (x)
xn

Power Flow Jacobian Matrix,


Jacobian elements are calculated by differentiating
each function, f i ( x ), with respect to each variable.
For example, if f i ( x ) is the bus i real power equation
fi ( x) =
f i ( x )
=
i

n
k =1
n
k =1
k i

Vi Vk (Gik cos ik + Bik sin ik ) PGi + PDi


Vi Vk ( Gik sin ik + Bik cos ik )

f i ( x )
= Vi V j (Gik sin ik Bik cos ik ) ( j i )
j

Two Bus, Example


For the two bus power system shown below, use the NewtonRaphson power flow to determine the voltage magnitude and angle
at bus two. Assume that bus one is the slack and SBase = 100 MVA.

x =

2
V2

Ybus =

j10 j10
j10 j10

Two Bus Example, contd


General power balance equations
Pi =
Qi =

n
k =1
n
k =1

Vi Vk (Gik cos ik + Bik sin ik ) = PGi PDi


Vi Vk (Gik sin ik Bik cos ik ) = QGi QDi

Bus two power balance equations


P2 = V2 V1 (10sin 2 ) + 2.0 = 0
2

Q2 = V2 V1 (10 cos 2 ) + V2 (10) + 1.0 = 0

Two Bus Example, contd


P2 (x) = V2 (10sin 2 ) + 2.0 = 0
2

Q2 (x) = V2 (10 cos 2 ) + V2 (10) + 1.0 = 0


Now calculate the power flow Jacobian

J ( x) =

P2 (x)
2

P2 (x)
V 2

Q 2 (x)
2

Q 2 (x)
V 2

10 V2 cos 2
10 V2 sin 2

10sin 2
10 cos 2 + 20 V2

First Iteration
Set v = 0, guess x

(0)

0
=
1

Calculate
f(x

(0)

J (x

V2 (10sin 2 ) + 2.0

)=

(0)

V2 (10cos 2 ) + V2 (10) + 1.0

10 V2 cos 2
)=
10 V2 sin 2

Solve x

(1)

10sin 2
=
10 cos 2 + 20 V2

0
10 0
=

1
0 10

2.0
1.0

2.0
1.0
10 0
0 10

0.2
0.9

Next Iterations
0.9 (10sin(0.2)) + 2.0

(1)

f(x ) =

0.9(10 cos(0.2)) + 0.9 10 + 1.0


8.82

1.986

1.788

8.199

(1)

J (x ) =
x

(2)

f(x

(2)

(3)

0.2
0.9

)=

f(x ) =

8.82

1.986

1.788

8.199

0.0145
0.0190
0.0000906
0.0001175

(3)

Done!

0.212
0.279

0.212
0.279

0.233
0.8586

0.236
0.8554
V2 = 0.8554 13.52

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
x =

2
3

f ( x) =

V2

!"

P2 ( x) PG 2 + PD 2
P3 (x) PG 3 + PD 3 = 0
Q2 (x) + QD 2

S-ar putea să vă placă și