Introduction To Optimal Power Flow
Introduction To Optimal Power Flow
Power Flow
Prof. Dr. Ashik Ahmed
Dept. of EEE
Islamic University of Technology
Boardbazar, Gazipur-1704
Outline
• Introduction to the optimal power flow problem
Motivation
Basic formulation
Challenges and solution techniques
• Security constrained optimal power flow
DC formulation
Solution by relaxation
Examples
Motivation
l
• Recall the economic dispatch problem F min Ci g i
i 1
Subject to: g
i 1
i d dloss 0
Subject to:
G u, x, y 0
H u, x, y 0
Subject to Pg Pd B / 0
H (Pg , , y) 0
• Minimizing system pre-contingency generation cost f(Pg (0), y(0)) using active/reactive
dispatch and tap/phase changers such that
Active and reactive power will balance in both pre (k = 0) and post (k = 1… K)
contingency conditions
All generation and network limits are met under pre and post contingency conditions
• Contingency conditions are modelled through the parameters y(k)
DC SCOPF
• Study the SCOPF in linear form only
Simple, can be worked out by hand
Neglects reactive power balance and bus voltage magnitudes
Widely used in the industries
Easy to implement and solve using off-the-shelf (commercial) software
Formulation of DC SCOPF
• So, the line flow becomes a linear combination of terminal bus voltage
angles.
Calculation of GOSF
• The current flow over the line ‘i-j’ is:
Vi V j
I ij
jxij
V cos
i i jVi sin i V j cos j jV j sin j
jxij
Vi cos i V j cos j j (Vi sin i V j sin j )
jxij
(Vi sin i V j sin j ) 1
(i j )
xij xij
• So, in DC load flow, the expressions of line power flow and line
current are identical in per unit.
Calculation of GOSF
• Calculate
• Fill up the row and column entries of the [X] matrix (corresponding to
the swing bus) with zeros.
• This is to signify that the swing bus angle will not change during any
kind of outage.
Calculation of GOSF- Example
Calculation of GOSF- Example
• Updated line (branch) data: Ignore R and Bshunt
From bus To bus R (p. u ) X (p. u) Bshunt (p.u)
1 2 0 0.2 0
1 4 0 0.2 0
1 5 0 0.3 0
2 3 0 0.25 0
2 4 0 0.1 0
2 5 0 0.3 0
2 6 0 0.2 0
3 5 0 0.26 0
3 6 0 0.1 0
4 5 0 0.4 0
5 6 0 0.3 0
Calculation of GOSF- Example
• Form Ybus Matrix using the updated line data.
0 0 0 0 0 0
• Update [X] matrix0having0.0941
zeros in the rows and
0.0805
columns
0.0630
corresponding
0.0643 0.0813
to swing
bus entries. (n by 0n) 0.0805 0.1659 0.0590 0.0908 0.1290
0 0.0630 0.0590 0.1009 0.0542 0.0592
0 0.0643 0.0908 0.0542 0.1222 0.0893
0 0.0813 0.1290 0.0592 0.0893 0.1633
Calculation of GOSF- Example
• GOSF for the Example Six bus System Pij
k
ij X P
Line flows Bus 1 Bus 2 Bus 3 Pk
1
Pij i j
l = 1 (line 1-2) 0 -0.47 -0.40
l = 2 (line 1-4) 0 -0.31 -0.29
xij
l = 3 (line 1-5) 0 -0.21 -0.30
l = 4 (line 2-3) 0 0.05 -0.34 i X ik Pk
l = 5 (line 2-4) 0 0.31 0.22 j X jk Pk
l = 6 (line 2-5) 0 0.10 -0.03
l = 7 (line 2-6) 0 0.06 -0.24
l = 8 (line 3-5) 0 0.06 0.29
l = 9 (line 3-6) 0 -0.01 0.37
l = 10 (line 4-5) 0 0 -0.08
l = 11 (line 5-6) 0 -0.06 -0.13
Calculation of GOSF- Example
•
• Sample GOSF Calculation:
k = 2 Generation outage at bus 2
l = 1 (line 1-2) i = 1, j =2
xij = x12 = 0.2 (from given line data)
Xik = X12 = 0 (from X matrix)
Xjk = X22 = 0.0941 (from X matrix)
So, GOSF,
Calculation of GOSF- Example
•
• Sample GOSF Calculation:
k = 3 Generation outage at bus 3
l = 2 (line 1-4) i = 1, j =4
xij = x14 = 0.2 (from given line data)
Xik = X13 = 0 (from X matrix)
Xjk = X43 = 0.0590 (from X matrix)
So, GOSF,
Line flow Calculation using GOSF
• Sample Post-Contingency Line Flow Calculation
Lines to Lines to
remainder of remainder of
the network the network
Line k Line k
Line k before Line k after
Pnm outage outage
(a) (b)
Bus n Bus m
Line k outage
Line k simulated with
injections at bus n
and bus m
Pnm
Pn
Pm
(c)
Line outage simulation
• The opening of line k can be simulated if:
Pn Pnm and
Pm Pnm
This means whatever power injection happened at bus n is taken out of bus m
through line k.
This also means:
No flow through the breaker connecting bus n to the remaining system and
No flow through the breaker connecting bus m to the remaining system
So, both breakers will carry zero flow (as if they are open).
LOSF Expression
P
• From FDLF formulation: X P ; P n
mP
( X in X im ) xk ( X jn X jm ) xk
i ,nm and j,nm
xk X nn X mm 2 X mn xk X nn X mm 2 X mn
1 ( X in X im ) xk ( X jn X jm ) xk
• Then,
dl ,k
xl xk X nn X mm 2 X mn xk X nn X mm 2 X mn
xk X in X jn X im X jm )
xl xk X nn X mm 2 X mn
LOSF and δ’s
• If either n or m is the reference bus:
X in xk
i,nm if m is the reference bus
xk X nn
X im xk
i,nm n is the reference bus
if
xk X mm
Generator data
Gen no. gi min (MW) gi max (MW) Ci ($/MWh) Bus 3
G3 50 MW
1 100 250 20
2 20 100 40
3 0 50 50 What is the most economic N-1 secure
dispatch assuming we approximate the
network with a DC power flow?
DC OPF- Relaxation Approach
• Solve
an economic dispatch ignoring network constraints and contingent states
min F = 20g1 + 40g2 + 50g3
subject to:
g1 + g2 + g3 = 250 = Pdem
g1 100
-g1 -250
g2 20
-g2 -100
g3 0
-g3 -50
DC OPF- Relaxation Approach
• Solve an economic dispatch ignoring network constraints and contingent
states
55
Since generator 1 is the cheapest
50
we maximize its output
45
By inspection, we get
40
g1[0] = 230 MW
35
g2[0] = 20 MW
g 3 (MW)
g3[0] = 0 MW 30
0
0 10 20 30 40 50 60 70 80 90 100
g 2 (MW)
DC OPF- Relaxation Approach
• Calculate the line flows in the intact network using a DC power flow
By inspection, B’ and C matrices are
5 5 0
15 10 5 5 5 0
B ' 10 15 5 C
5 0 5
5 5 10
0 5 5
a
b
5 0 0 0
0 1 1 1 0
0
1 2
5 0
diag (bl ) A 1 1 0 1 C diag (bl ) AT
c d 0 0 5 0
0 0 1 1
0 0 0 5
3
DC OPF- Relaxation Approach
• Calculate the line flows in the intact network using a DC power flow
0 0.4 0.2
0 0 0 0 0.4 0.2
X 0 0.08 0.04 H
0 0.2 0.6
0 0.04 0.12
0 0.2 0.4
DC OPF- Relaxation Approach
• Calculate the line flows in the intact network using a DC power flow
The bus voltage angles corresponding to the economic dispatch are
0 0 0 2.3 0
0 XP 0 0 0.08 0.04 1.8 0.164
0 0.04 0.12 0.5 0.132
0 MW G3 50 MW
DC OPF- Relaxation Approach
••Correct
the line flow violations in the intact network by redispatching generations in the most
economic way
70 0.2g 2 0.6g3 60
o We append the constraint to relieve flow limit violation in line 3
DC OPF- Relaxation Approach
•• Correct
the line flow violations in the intact network by redispatching generations in the
most economic way
The tighter version of the economic dispatch is
min F = 20g1 + 40g2 + 50g3
subject to
2g2 + 6g3 100
g1 + g2 + g3 = 250 = Pdem
g1 100
-g1 -250
g2 20
-g2 -100
g3 0
-g3 -50
DC OPF- Relaxation Approach
• Correct the line flow violations in the intact network by redispatching
generations in the most economic way 55
45
o Upper/lower generation limits
40
o The flow limit on line 3 cutting off
35
the previous solution
g 3 (MW)
30
Which generator should we use to 25
15
Generator Rate of g2 (MW) g3 (MW) Cost of line Pre-fault flow limit on line 3
10
providing line relief relief ($/h)
relief (MW/MW) 5
2 -0.2 50 0 600 0
0 10 20 30 40 50 60 70 80 90 100
g1[1] = 220 MW 45
g2[1] = 20 MW 40
g3[1] = 10 MW 35
F[1] = 5700 $/h
g 3 (MW)
30 New ED
g2 = 20 MW
25 g3 = 10 MW
(g1 = 220 MW)
20
15
10
0
0 10 20 30 40 50 60 70 80 90 100
g 2 (MW)
DC OPF- Relaxation Approach
• Correct the line flow violations in the intact network by redispatching generations in the
most economic way
10 MW G3 50 MW
DC SCOPF- Relaxation Approach
• Correct post-contingency security violations by redispatching generations in the most
economic way
Startingwith line 1, we find the immediate impact of losing this line using the factors dl|k
for K =1 and l = 2, 3, 4
DC SCOPF- Relaxation Approach
•• Correct
post-contingency security violations by redispatching generations in the most
economic way
First we get for buses i = 1, 2, 3 and n =1 and m=2, the values of
1|12 0
X 22
2|12 0.1333
1 b1 X 22
X 32
3|12 0.0667
1 b1 X 22
80 0.6667x 80 86.7 MW
46.7 MW
failure of line k = 3 G1 G2
For example, in l = 1 (or equally l =2) 110 MW
f1|3 f1[1] d3|1f 3[1] 200 MW
80 0.5 x 60 40 MW
i 1
where f 𝑙∨ 𝑘 is the flow on line l after the failure of line k prior to redispatching
DC SCOPF- Relaxation Approach
The outage of line k =1 (or k =2), implies two flow violations. One on l = 2
(l =1) and the other on l = 3
Starting with k = 1 and l =2 , we have
2 1
f̂ 2 133.33 (g 2 20) (g 3 10)
3 3
Limiting the line flow to 100 MW and simplifying, we obtain
2 g 2 g3 150
What next?
We add this constraint to the original economic dispatch along with
the constraint limiting the pre-fault flow on line 3
DC SCOPF- Relaxation Approach
That is min F = 20g1 + 40g2 + 50g3
55
subject to 50
2g2 + g3 ≥ 150 45
g1 + g2 + g3 = 250 35
g 3 (MW)
g1 ≥ 100 30
25
-g1 ≥ -250
20
g2 ≥ 20
15 Post-fault limit
-g2 ≥ -100 10
on line 2 due to
failure of line 1
g3 ≥ 0 5
-g3 ≥ -50 0
0 10 20 30 40 50 60 70 80 90 100
g 2 (MW)
DC SCOPF- Relaxation Approach
• Correct post-contingency security violations by redispatching
generations in the most economic way
55
50
The “tighter” optimal dispatch is now
45
g1[2] = 175 MW 40
g2[2] = 75 MW 35
g3[2] = 0 MW
g 3 (MW)
30
20
New ED
g2 = 75 MW
15
Verify that the pre-fault limits are satisfied 10
g3 = 0 MW
(g1 = 175 MW)
45
subject to 40
Post-fault limit on line 3
due to failure of line 1
g2 + 2g3 ≥ 120 35
2g2 + g3 ≥ 150
g 3 (MW)
30
g1 + g2 + g3 = 250 20
g1 ≥ 100 15
-g1 ≥ -250 10
g2 ≥ 20 5
-g2 ≥ -100 0
0 10 20 30 40 50 60 70 80 90 100
g3 ≥ 0 g 2 (MW)
-g3 ≥ -50
DC SCOPF- Relaxation Approach
50
g 3 (MW)
30
g3[3] = 30 MW
25
F[3] = 7100 $/h 20
satisfied 10
0
failure of line k =1 (k =2) within limits? 0 10 20 30 40 50 60
g 2 (MW)
70 80 90 100
DC SCOPF- Relaxation Approach
Lastly, looking at the effect of the failure of line k =3 on line l = 1 (or equally l =2 )
f̂1 f1|3 11|3 (g1 g1[1] ) 12|3 (g 2 g 2[1] ) 13|3 (g 3 g3[1] ) f1max
g 2 g3 50
DC SCOPF- Relaxation Approach
50
subject to 45
g2 + g3 ≥ 50 40
g2 + 2g3 ≥ 120 35
2g2 + g3 ≥ 150
g 3 (MW)
30 Post fault limits on line
1 and 2 due to failure
2g2 + 6g3 ≥ 100 25 of line 3
g1 + g2 + g3 = 250 20
g1 ≥ 100 15
-g1 ≥ -250 10
g2 ≥ 20 5
-g2 ≥ -100 0
0 10 20 30 40 50 60 70 80 90 100
g3 ≥ 0 g 2 (MW)
-g3 ≥ -50
DC SCOPF- Relaxation Approach
30 MW G3 50 MW
DC SCOPF- Relaxation Approach
30 MW G3 50 MW
DC SCOPF- Relaxation Approach
20 MW
30 MW G3 50 MW
DC SCOPF- Relaxation Approach
terminates 20 MW