Download - Lecture5 PowerFlow-NR - Extended
Newton-Raphson Power Flow
POWER SYSTEM ANALYSIS
1
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( ) 0ˆf x
2
Newton-Raphson Method (scalar)
( )
( ) ( )
( )( ) ( )
2 ( ) 2( )2
1. For each guess of , , define ˆ
-ˆ2. Represent ( ) by a Taylor series about ( )ˆ
( )( ) ( )ˆ
1 ( ) higher order terms2
v
v v
vv v
vv
x x
x x xf x f x
df xf x f x xdx
d f x xdx
3
Newton-Raphson Method, cont’d
( )( ) ( )
( )
1( )( ) ( )
3. Approximate ( ) by neglecting all termsˆexcept the first two
( )( ) 0 ( )ˆ
4. Use this linear approximation to solve for
( ) ( )
5. Solve for a new estim
vv v
v
vv v
f x
df xf x f x xdx
x
df xx f xdx
( 1) ( ) ( )
ate of x̂v v vx x x
4
Newton-Raphson Example
2
1( )( ) ( )
( ) ( ) 2( )
( 1) ( ) ( )
( 1) ( ) ( ) 2( )
Use Newton-Raphson to solve ( ) - 2 0The equation we must iteratively solve is
( ) ( )
1 (( ) - 2)2
1 (( ) - 2)2
vv v
v vv
v v v
v v vv
f x x
df xx f xdx
x xx
x x x
x x xx
5
Newton-Raphson Example, cont’d
( 1) ( ) ( ) 2( )
(0)
( ) ( ) ( )
3 3
6
1 (( ) - 2)2
Guess x 1. Iteratively solving we get
v ( )0 1 1 0.51 1.5 0.25 0.08333
2 1.41667 6.953 10 2.454 10
3 1.41422 6.024 10
v v vv
v v v
x x xx
x f x x
6
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
7
Multi-Variable Newton-Raphson
1 1
2 2
Next we generalize to the case where is an n-dimension vector, and ( ) is an n-dimension function
( )( )
( )
( )Again define the solution so ( ) 0 andˆ ˆ
n n
x fx f
x f
xf x
xx
x f x
xx f x
x
ˆ x x
8
Multi-Variable Case, cont’d
i
1 11 1 1 2
1 2
1
n nn n 1 2
1 2
n
The Taylor series expansion is written for each f ( )f ( ) f ( )f ( ) f ( )ˆ
f ( ) higher order terms
f ( ) f ( )f ( ) f ( )ˆ
f ( ) higher order terms
nn
nn
x xx x
xx
x xx x
xx
xx xx x
x
x xx x
x
9
Multi-Variable Case, cont’d
1 1 1
1 21 1
2 2 22 2
1 2
1 2
This can be written more compactly in matrix form( ) ( ) ( )
( )( ) ( ) ( )
( )( )ˆ
( )( ) ( ) ( )
n
n
nn n n
n
f f fx x x
f xf f f
f xx x x
ff f f
x x x
x x x
xx x x
xf x
xx x x
higher order terms
nx
10
Jacobian Matrix
1 1 1
1 2
2 2 2
1 2
1 2
The n by n matrix of partial derivatives is knownas the Jacobian matrix, ( )
( ) ( ) ( )
( ) ( ) ( )( )
( ) ( ) ( )
n
n
n n n
n
f f fx x x
f f fx x x
f f fx x x
J xx x x
x x xJ x
x x x
11
Multi-Variable N-R Procedure
1
( 1) ( ) ( )
( 1) ( ) ( ) 1 ( )
( )
Derivation of N-R method is similar to the scalar case( ) ( ) ( ) higher order termsˆ( ) 0 ( ) ( )ˆ
( ) ( )
( ) ( )
Iterate until ( )
v v v
v v v v
v
f x f x J x xf x f x J x x
x J x f x
x x x
x x J x f x
f x
12
Multi-Variable Example
1
22 2
1 1 22 2
2 1 2 1 2
1 1
1 2
2 2
1 2
xSolve for = such that ( ) 0 where
x
f ( ) 2 8 0
f ( ) 4 0First symbolically determine the Jacobian
f ( ) f ( )
( ) =f ( ) f ( )
x x
x x x x
x x
x x
x f x
x
x
x x
J xx x
13
Multi-variable Example, cont’d
1 2
1 2 1 2
11 1 2 1
2 1 2 1 2 2
(0)
1(1)
4 2( ) =
2 2Then
4 2 ( )2 2 ( )
1Arbitrarily guess
1
1 4 2 5 2.11 3 1 3 1.3
x xx x x x
x x x fx x x x x f
J x
xx
x
x
14
Multi-variable Example, cont’d
1(2)
(2)
2.1 8.40 2.60 2.51 1.82841.3 5.50 0.50 1.45 1.2122
Each iteration we check ( ) to see if it is below our specified tolerance
0.1556( )
0.0900If = 0.2 then we wou
x
f x
f x
ld be done. Otherwise we'd continue iterating.
15
NR Application to Power Flow
16
Real Power Balance Equations
* *i
1 1
1
i1
i1
S ( )
(cos sin )( )
Resolving into the real and imaginary parts
P ( cos sin )
Q ( sin cos
ikn n
ji i i ik k i k ik ik
k kn
i k ik ik ik ikk
n
i k ik ik ik ik Gi Dikn
i k ik ik ik ik
P jQ V Y V V V e G jB
V V j G jB
V V G B P P
V V G B
)k Gi DiQ Q
17
Newton-Raphson Power Flow
i1
In the Newton-Raphson power flow we use Newton'smethod to determine the voltage magnitude and angleat each bus in the power system. We need to solve the power balance equations
P ( cosn
i k ik ikk
V V G
i1
sin )
Q ( sin cos )
ik ik Gi Di
n
i k ik ik ik ik Gi Dik
B P P
V V G B Q Q
*
*
18
Power Flow Variables
2 2 2
n
2
Assume the slack bus is the first bus (with a fixedvoltage angle/magnitude). We then need to determine the voltage angle/magnitude at the other buses.
( )
( )
G
n
P P
V
V
x
x f x
2
2 2 2
( )( )
( )
D
n Gn Dn
G D
n Gn Dn
P
P P PQ Q Q
Q Q Q
xx
x
*
19
N-R Power Flow Solution
( )
( )
( 1) ( ) ( ) 1 ( )
The power flow is solved using the same procedurediscussed last time:
Set 0; make an initial guess of ,
While ( ) Do
( ) ( )1
End While
v
v
v v v v
v
v v
x x
f x
x x J x f x
20
Power Flow Jacobian Matrix
1 1 1
1 2
2 2 2
1 2
1 2
The most difficult part of the algorithm is determiningand inverting the n by n Jacobian matrix, ( )
( ) ( ) ( )
( ) ( ) ( )( )
( ) ( ) ( )
n
n
n n n
n
f f fx x x
f f fx x x
f f fx x x
J xx x x
x x xJ x
x x x
21
Power Flow Jacobian Matrix, cont’d
22
Two Bus Newton-Raphson Example
Line Z = 0.1j
One Two 1.000 pu 1.000 pu
200 MW 100 MVR
0 MW 0 MVR
For the two bus power system shown below, use the Newton-Raphson power flow to determine the voltage magnitude and angle at bus two. Assumethat bus one is the slack and SBase = 100 MVA.
2
2
10 1010 10busj j
V j j
x Y
23
Two Bus Example, cont’d
i1
i1
2 2 1 22
2 2 1 2 2
General power balance equations
P ( cos sin )
Q ( sin cos )
Bus two power balance equationsP (10sin ) 2.0 0
( 10cos ) (10) 1.0 0
n
i k ik ik ik ik Gi Dikn
i k ik ik ik ik Gi Dik
V V G B P P
V V G B Q Q
V V
Q V V V
Note: Gik = 0
Also note: Y22=-10
24
Two Bus Example, cont’d
2 2 22
2 2 2 2
2 2
2 2
2 2
2 2
2 2 2
2 2 2 2
P ( ) (10sin ) 2.0 0
( ) ( 10cos ) (10) 1.0 0Now calculate the power flow Jacobian
P ( ) P ( )
( )Q ( ) Q ( )
10 cos 10sin10 sin 10cos 20
V
Q V V
VJ
V
VV V
x
x
x x
xx x
25
Two Bus Example, First Iteration
(0)
2 2(0)2
2 2 2
2 2 2(0)
2 2 2 2
(1)
0Set 0, guess
1Calculate
(10sin ) 2.0 2.0f( )
1.0( 10cos ) (10) 1.0
10 cos 10sin 10 0( )
10 sin 10cos 20 0 10
0 10 0Solve
1 0 10
v
V
V V
VV V
x
x
J x
x1 2.0 0.2
1.0 0.9
26
Two Bus Example, Next Iterations
(1)2
(1)
1(2)
0.9(10sin( 0.2)) 2.0 0.212f( )
0.2790.9( 10cos( 0.2)) 0.9 10 1.08.82 1.986
( )1.788 8.199
0.2 8.82 1.986 0.212 0.2330.9 1.788 8.199 0.279 0.8586
f(
x
J x
x
(2) (3)
(3)2
0.0145 0.236)
0.0190 0.85540.0000906
f( ) Done! V 0.8554 13.520.0001175
x x
x
27
Two Bus Solved Values
Line Z = 0.1j
One Two 1.000 pu 0.855 pu
200 MW 100 MVR
200.0 MW168.3 MVR
-13.522 Deg
200.0 MW 168.3 MVR
-200.0 MW-100.0 MVR
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
28
Two Bus Case Low Voltage Solution
(0)
2 2(0)2
2 2 2
This case actually has two solutions! The second "low voltage" is found by using a low initial guess.
0Set 0, guess
0.25Calculate
(10sin ) 2.0f( )
( 10cos ) (10) 1.0
v
V
V V
x
x
2 2 2(0)
2 2 2 2
20.875
10 cos 10sin 2.5 0( )
10 sin 10cos 20 0 5VV V
J x
29
Low Voltage Solution, cont'd
1(1)
(2) (2) (3)
0 2.5 0 2 0.8Solve
0.25 0 5 0.875 0.0751.462 1.42 0.921
( )0.534 0.2336 0.220
x
f x x x
Line Z = 0.1j
One Two 1.000 pu 0.261 pu
200 MW 100 MVR
200.0 MW831.7 MVR
-49.914 Deg
200.0 MW 831.7 MVR
-200.0 MW-100.0 MVR
Low voltage solution
30
Two Bus Region of Convergence
Slide shows the region of convergence for different initialguesses of bus 2 angle (x-axis) and magnitude (y-axis)
Red regionconvergesto the highvoltage solution,while the yellow regionconvergesto the lowvoltage solution
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
32
Three Bus PV Case Example
Line Z = 0.1j
Line Z = 0.1j Line Z = 0.1j
One Two 1.000 pu 0.941 pu
200 MW 100 MVR
170.0 MW 68.2 MVR
-7.469 Deg
Three 1.000 pu
30 MW 63 MVR
2 2 2 2
3 3 3 3
2 2 2
For this three bus case we have( )
( ) ( ) 0V ( )
G D
G D
D
P P PP P P
Q Q
xx f x x
x
33
Modeling Voltage Dependent Load
So far we've assumed that the load is independent ofthe bus voltage (i.e., constant power). However, thepower flow can be easily extended to include voltagedepedence with both the real and reactive l
Di Di
1
1
oad. Thisis done by making P and Q a function of :
( cos sin ) ( ) 0
( sin cos ) ( ) 0
in
i k ik ik ik ik Gi Di ikn
i k ik ik ik ik Gi Di ik
V
V V G B P P V
V V G B Q Q V
34
Voltage Dependent Load Example
22 2 2 2
2 22 2 2 2 2
2 2 2 2
In previous two bus example now assume the load isconstant impedance, so
P ( ) (10sin ) 2.0 0
( ) ( 10cos ) (10) 1.0 0Now calculate the power flow Jacobian
10 cos 10sin 4.0( )
10
V V
Q V V V
V VJ
x
x
x2 2 2 2 2sin 10cos 20 2.0V V V
35
Voltage Dependent Load, cont'd
(0)
22 2 2(0)
2 22 2 2 2
(0)
1(1)
0Again set 0, guess
1Calculate
(10sin ) 2.0 2.0f( )
1.0( 10cos ) (10) 1.010 4
( )0 12
0 10 4 2.0 0.1667Solve
1 0 12 1.0 0.9167
v
V V
V V V
x
x
J x
x
36
Voltage Dependent Load, cont'd
Line Z = 0.1j
One Two 1.000 pu 0.894 pu
160 MW 80 MVR
160.0 MW120.0 MVR
-10.304 Deg
160.0 MW 120.0 MVR
-160.0 MW -80.0 MVR
With constant impedance load the MW/Mvar load atbus 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
37
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
– 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
38
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
39
Dishonest Newton-Raphson
Since most of the time in the Newton-Raphson iteration is spent calculating the inverse of the Jacobian, one way to speed up the iterations is to only calculate/inverse the Jacobian occasionally– known as the “Dishonest” Newton-Raphson– an extreme example is to only calculate the Jacobian for
the first iteration( 1) ( ) ( ) -1 ( )
( 1) ( ) (0) -1 ( )
( )
Honest: - ( ) ( )
Dishonest: - ( ) ( )
Both require ( ) for a solution
v v v v
v v v
v
x x J x f x
x x J x f x
f x
40
Dishonest Newton-Raphson Example
2
1(0)( ) ( )
( ) ( ) 2(0)
( 1) ( ) ( ) 2(0)
Use the Dishonest Newton-Raphson to solve
( ) - 2 0
( ) ( )
1 (( ) - 2)2
1 (( ) - 2)2
v v
v v
v v v
f x x
df xx f xdx
x xx
x x xx
41
Dishonest N-R Example, cont’d
( 1) ( ) ( ) 2(0)
(0)
( ) ( )
1 (( ) - 2)2
Guess x 1. Iteratively solving we get
v (honest) (dishonest)0 1 11 1.5 1.52 1.41667 1.3753 1.41422 1.4294 1.41422 1.408
v v v
v v
x x xx
x x
We pay a pricein increased iterations, butwith decreased computationper iteration
42
Two Bus Dishonest ROC
Slide shows the region of convergence for different initialguesses for the 2 bus case using the Dishonest N-R
Red regionconvergesto the highvoltage solution,while the yellow regionconvergesto the lowvoltage solution
43
Honest N-R Region of Convergence
Maximumof 15
iterations
44
Decoupled Power Flow
The completely Dishonest Newton-Raphson is not used for power flow analysis. However several approximations of the Jacobian matrix are used.
One common method is the decoupled power flow. In this approach approximations are used to decouple the real and reactive power equations.
45
Decoupled Power Flow Formulation
( ) ( )
( ) ( )( )
( )( ) ( ) ( )
( )2 2 2
( )
( )
General form of the power flow problem
( )( )
( )
where
( )( )
( )
v v
v vv
vv v v
vD G
v
vn Dn Gn
P P P
P P P
P Pθθ V P x
f xQ xVQ Q
θ V
xP x
x
46
Decoupling Approximation( ) ( )
( )
( ) ( )( )
( ) ( ) ( )
Usually the off-diagonal matrices, and
are small. Therefore we approximate them as zero:
( )( )
( )
Then the problem
v v
v
v vv
v v v
P QV θ
P 0 θ P xθf x
Q Q xV0V
1 1( ) ( )( )( ) ( ) ( )
can be decoupled
( ) ( )v v
vv v v
P Qθ P x V Q xθ V
47
Fast Decoupled Power Flow
By continuing with our Jacobian approximations we can actually obtain a reasonable approximation that is independent of the voltage magnitudes/angles.
This means the Jacobian need only be built/inverted once.
This approach is known as the fast decoupled power flow (FDPF)
FDPF uses the same mismatch equations as standard power flow so it should have same solution
The FDPF is widely used, particularly when we only need an approximate solution
48
FDPF Approximations
ij
( ) ( )( )( ) 1 1
( ) ( )
bus
The FDPF makes the following approximations:
1. G 0
2. 13. sin 0 cos 1
Then
( ) ( )
Where is just the imaginary part of the ,except the slack bus row/co
i
ij ij
v vvv
v v
V
j
P x Q xθ B V BV V
B Y G Blumn are omitted
49
FDPF Three Bus Example
Line Z = j0.07
Line Z = j0.05 Line Z = j0.1
One Two
200 MW 100 MVR
Three 1.000 pu
200 MW100 MVR
Use the FDPF to solve the following three bus system
34.3 14.3 2014.3 24.3 1020 10 30
bus j
Y
50
FDPF Three Bus Example, cont’d
1
(0)(0)2 2
3 3
34.3 14.3 2024.3 10
14.3 24.3 1010 30
20 10 300.0477 0.01590.0159 0.0389
Iteratively solve, starting with an initial voltage guess
0 10 1
bus j
VV
Y B
B
(1)2
3
0 0.0477 0.0159 2 0.12720 0.0159 0.0389 2 0.1091
51
FDPF Three Bus Example, cont’d
(1)2
3
i
i i1(2)
2
3
1 0.0477 0.0159 1 0.93641 0.0159 0.0389 1 0.9455
P ( ) ( cos sin )V V
0.1272 0.0477 0.01590.1091 0.0159 0.0389
nDi Gi
k ik ik ik ikk
VV
P PV G B
x
(2)2
3
0.151 0.13610.107 0.1156
0.9240.936
0.1384 0.9224Actual solution:
0.1171 0.9338
VV
θ V
52
“DC” Power Flow
The “DC” power flow makes the most severe approximations:– completely ignore reactive power, assume all the voltages
are always 1.0 per unit, ignore line conductance
This makes the power flow a linear set of equations, which can be solved directly
1θ B P
53
Power System Control
A major problem with power system operation is the limited capacity of the transmission system– lines/transformers have limits (usually thermal)– no direct way of controlling power flow down a
transmission line (e.g., there are no valves to close to limit flow)
– open transmission system access associated with industry restructuring is stressing the system in new ways
We need to indirectly control transmission line flow by changing the generator outputs, for example
54
Indirect Transmission Line Control
What we would like to determine is how a change in generation at bus k affects the power flow on a line from bus i to bus j.
The assumption isthat the changein generation isabsorbed by theslack bus
55
Power Flow Simulation - Before
One way to determine the impact of a generator change is to compare a before/after power flow.For example below is a three bus case with an overload
Z for all lines = j0.1
One Two
200 MW 100 MVR
200.0 MW 71.0 MVR
Three 1.000 pu
0 MW 64 MVR
131.9 MW
68.1 MW 68.1 MW
124%
56
Power Flow Simulation - After
Z for all lines = j0.1Limit for all lines = 150 MVA
One Two
200 MW 100 MVR
105.0 MW 64.3 MVR
Three1.000 pu
95 MW 64 MVR
101.6 MW
3.4 MW 98.4 MW
92%
100%
Increasing the generation at bus 3 by 95 MW (and hence decreasing it at bus 1 by a corresponding amount), resultsin a 31.3 drop in the MW flow on the line from bus 1 to 2.
57
Operating Areas
An operating area has traditionally represented the portion of the interconnected electric grid operated by a single utility
Transmission lines that join two areas are known as tie-lines.
The net power out of an area is the sum of the flow on its tie-lines.
The flow out of an area is equal to
total gen - total load - total losses = tie-flow