ECE 421/599 Electric Energy Systems 7 – Optimal Dispatch of Generation Instructor:

advertisement
ECE 421/599
Electric Energy Systems
7 – Optimal Dispatch of Generation
Instructor:
Kai Sun
Fall 2014
1
Background
• In a practical power system, the costs of generating and delivering electricity
from power plants are different (due to fuel costs and distances to load
centers)
• Under normal conditions, the system generation capacity is more than the
total load demand and losses.
• Thus, there is room to schedule generation within capacity limits
– Minimizing a cost function that represents, e.g.
• Operating costs
• Transmission losses
• System reliability impacts
• This is called Optimal Power Flow (OPF) problem
• A typical problem is the Economic Dispatch (ED) of real power generation
2
Introduction of Nonlinear Function Optimization
•Unconstrained parameter optimization
•Constrained parameter optimization
– Equality constraints
– Inequality constraints
3
Unconstrained parameter optimization
Minimize cost function
1.
f ( x1 , x2 , , xn )
Solve all local minima satisfying two conditions (necessary & sufficient)
Condition-1: Gradient vector
∂f ∂f
∂f
Stationary point
=
∇f ( =
,
, ,
) 0
(where f is flat in all
∂x1 ∂x2
∂xn
directions)
Condition-2: Hessian matrix H is positive definite
Local minimum
(a pure source in ∇f
vector field)
2.
Find the global minimum from all local minima
4
f(x,y) = −(cos2x + cos2y)2
5
•Minimize
f(x, y)=x2+y2
y
∂f ∂f
=
∇f ( =
, ) (2 x=
, 2 y) 0
∂x ∂y
∇f
=
x 0,=
y 0
H
 ∂2 f
∂2 f 
 ∂x 2 ∂x∂y  2 0

=
 



∂ 2 f  0 2
∂y∂x
2 
∂y 

0
x
6
Parameter Optimization with Equality Constraints
Minimize
f ( x1 , x2 , , xn )
Subject to
g k ( x1 , x2 , , xn ) = 0
k = 1, 2, , K
• Introduce Lagrange Multipliers λ1~ λK
K
L= f + ∑ λk g k
i =1
• Necessary conditions for the local minima of L (also necessary for
the original problem)
K
∂g
∂L ∂f
=
+ ∑ λk k =
0
∂xi ∂xi i =1
∂xi
∂L
= g=
0
k
∂λk
7
• Minimize
Subject to
f(x, y)=x2+y2
(x-8)2+(y-6)2=25
→ g(x, y)=(x-8)2+(y-6)2-25=0
y
∇f
L = x 2 + y 2 + λ[( x − 8) 2 + ( y − 6) 2 − 25]
∂L
=2 x + λ (2 x − 16) =0
∂x
∂L
= 2 y + λ (2 y − 12) = 0
∂y
∂L
= ( x − 8) 2 + ( y − 6) 2 − 25 = 0
∂λ
6
0
8
x
Solutions (from the N-R method):
λ=1, x=4 and y=3 (f=25)
λ=3, x=12 and y=9 (f=225)
8
Parameter Optimization with Inequality Constraints
f ( x1 , x2 , , xn )
Minimize
Subject to :
g k ( x1 , x2 , , xn ) = 0
u j ( x1 , x2 , , xn ) ≤ 0
k = 1, 2, , K
j = 1, 2, , m
• Introduce Lagrange Multipliers λ1~ λK and µ1~ µm
K
m
L=
f + ∑ λk g k + ∑ µ j u j
=
k 1 =j 1
• Necessary conditions for the local minima of L
K
∂u j
∂g k m
∂L ∂f
=
+ ∑ λk
+ ∑µj
=
0 i = 1, , n
∂x=
∂xi i 1 =
∂xi j 1
∂xi
i
∂L
= g=
0
k
∂λk
Kuhn-Tucker (KKT)
necessary condition
k = 1, 2, , K
∂L
= uj ≤ 0
∂µ j
µ ju j = 0
µj ≥ 0
j = 1, , m
9
• Minimize
Subject to
f(x, y)=x2+y2
(x-8)2+(y-6)2=25 → g(x, y)=(x-8)2+(y-6)2-25=0
2 x + y ≥ 12
→
u( x, y ) = 12 − 2 x − y ≤ 0
L = x 2 + y 2 + λ [( x − 8) 2 + ( y − 6) 2 − 25] + µ (12 − 2 x − y )
∂L
= 2 x + λ (2 x − 16) − 2 µ = 0
∂x
∂L
= 2 y + λ (2 y − 12) − µ = 0
∂y
∂L
= ( x − 8) 2 + ( y − 6) 2 − 25 = 0
∂λ
∂L
≤ 0,
∂µ
=
µ j u j 0, µ j ≥ 0
∂L
= 12 − 2 x − y < 0 µ = 0
∂µ
∂L
= 12 − 2 x − y = 0 µ > 0
or
∂µ
y
∇f
6
0
8
x
Solutions:
µ=0, λ=3, x=12 and y=9 (f=225)
µ=5.6, λ=-0.2, x=5 and y=2 (f=29)
µ=12, λ=-1.8, x=3 and y=6 (f=33)
10
Operating Cost of a Thermal Plant
• Fuel-cost curve of a generator (represented by a quadratic function of real
power)
Ci =αi + β i Pi + γ i Pi 2
• Incremental fuel-cost curve:
=
λi
dCi
= 2γ i Pi + β i
dPi
11
A real case
Gen
A
B
ID
1
2
FUELCO PMAX PMIN HEMIN
X1
Y1
X2
Y2
X3
Y3
PRIOR ($/MBtu) (MW) (WM) (MBtu/hr) (MW) (Btu/kWh) (MW) (Btu/kWh) (Btu/kWh) (Btu/kWh)
0
1.91
230
65
532
65
8760
176
9507
260
10072
0
0.539
106
50
425
50
8501
75
9198
106
10341
Btu/h = Xi × Yi × 1000
$/h = Btu/h × $/MBtu / 1000,000
$/MWh = Yi /1000 × $/MBtu
6000
20
18
5000
16
Lambda ($/MWh)
Cost ($/h)
4000
3000
2000
14
12
10
8
6
4
1000
2
0
0
50
100
150
P (MW)
200
250
300
0
0
50
100
150
P (MW)
200
250
300
12
ED Neglecting Losses and No Generator Limits
If transmission line losses are neglected,
minimize the total production cost:
ng
n
2
α
+
β
+
γ
P
P
∑ i ii ii
Ct = ∑ Ci =
i =1
i =1
subject to
ng
∑P = P
i
i =1
D
• Apply the Lagrange multiplier method
(ng+1 unknowns to solve):
ng
L=
Ct + λ ( PD − ∑ Pi )
All plants must operate at
equal incremental cost
∂L
=0
∂Pi
∂Ct
0
−λ =
∂Pi
∂Ct dCi
βi + 2γ i Pi =
λ
= =
∂Pi
dPi
∂L
=0
∂λ
ng
i =1
∑P = P
i =1
i
D
λ − βi
= PD
∑
2γ i
i =1
ng
Pi =
PD + ∑ i =g1
n
λ=
∑
ng
i =1
βi
2γ i
1
2γ i
λ − βi
2γ i
i = 1, , ng
Solve Pi
13
Example 7.4
The fuel-cost functions for three thermal plants are C1~C2
in $/h. P1, P2 and P3 are in MW. PD=800MW. Neglecting
line losses and generator limits, find the optimal dispatch
and the total cost in $/h
PD + ∑ i =g1
n
λ=
Pi =
P1
P2
P3
∑
ng
i =1
βi
2γ i
1
2γ i
=
C1 =500 + 5.3P1 + 0.004 P12
C2 =400 + 5.5P2 + 0.006 P22
C3 =200 + 5.8P3 + 0.009 P32
5.3
5.5
5.8
+
+
+ 1443.0555
0.008=
0.012 0.018 800
= 8.5 $ / MWh
1
1
1
263.8889
+
+
0.008 0.012 0.018
800 +
λ − βi
2γ i
8.5 − 5.3
= 400.0000
2(0.004)
8.5 − 5.5
= 250.0000
2(0.006)
8.5 − 5.8
= 150.0000
2(0.009)
λ=
3
dC3
= 5.8 + 0.018 P3
dP3
dC2
λ=
= 5.5 + 0.012 P2
2
dP2
λ=
1
dC1
= 5.3 + 0.008 P1
dP1
Equal
incremental
cost λ
Ct = 6682.5 $ / h
14
Solving λ by the N-R Method
λ = g ( Pi )
λ − βi
PD
=
∑
γ
2
=i 1 =i 1
i
ng
=
∑ Pi
ng
• For a general case:
f=
(λ )
ng
=
P
∑
i =1
f (λ )( k ) + (
i
PD
df (λ ) ( k ) ( k )
) ∆λ ≈ PD
dλ
+1)
λ ( k=
λ ( k ) + ∆λ ( k )
PD − f (λ )( k )
∆P ( k )
=
∆λ
=
=
df (λ ) ( k )
df (λ ) ( k )
(
)
(
)
dλ
dλ
(k )
until
ng
PD − ∑ Pi ( k )
i =1
dPi
∑ ( dλ )
(k )
| λ ( k +1) − λ ( k ) |≤ ε
15
Apply the R-N Method
in Example 7.4
=
λ
λ
− βi
2γ i
(1)
∆P ( k )
(k )
=
∆λ
=
dPi ( k )
∑( dλ )
10.5
10
9.5
∆P ( k )
1
∑ 2γ
i
= 6.0
=
P1(1)
6.0 − 5.3
= 87.5000
2(0.004)
6.0 − 5.5
= 41.6667
2(0.006)
6.0 − 5.8
=
P3(1) = 11.1111
2(0.009)
=
P2(1)
∆P (1) = 800 − (87.5 + 41.6667 + 11.1111)
= 659.7222
659.7222
1
1
1
+
+
2(0.004) 2(0.006) 2(0.009)
659.7222
= = 2.5
263.8888
∆λ (1) =
9
$/MWh
Pi
(k )
(k )
11
8.5
8
7.5
7
6.5
6
5.5
5
0
50
100
150
200
250
P (MW)
300
350
400
λ (2) = 6.0 + 2.5 = 8.5
8.5 − 5.3
= 400.0000
2(0.004)
8.5 − 5.5
=
P2(2) = 250.0000
2(0.006)
8.5 − 5.8
=
P3(2) = 150.0000
2(0.009)
=
P1(2)
∆P (2) = 800 − (400 + 250 + 150) = 0.0
Ct = 6682.5 $ / h
16
450
ED Neglecting Losses but Including Generator Limits
• Considering the maximum (by rating) and minimum (for stability) generation limits,
ng
n
Minimize
Ct = ∑ Ci = ∑ αi + β i Pi + γ i Pi 2
i =1
i =1
Subject to
ng
∑P = P
i =1
i
D
Pi (min) ≤ Pi ≤ Pi (max),i =
1, 2, , ng
ng
P1
P2
P3
P4
ng
L=
Ct + λ ( PD − ∑ Pi ) + ∑ [ µi ( Pi − Pi (max) ) + γ i ( Pi (min) − Pi )]
=i 1 =i 1
∂L
=0
∂Pi
∂L
=0
∂λ
∂L
≤0
∂µi
∂L
≤0
∂γ i
∂Ci
− λ + µi − γ i =
0
∂Pi
ng
∑P = P
i =1
i
Pi (min) ≤ Pi ≤ Pi (max)
( µ=i γ=i 0)
=
Pi P=
0)
i (max) (γ i
dCi
=λ − µi ≤ λ
dPi
=
Pi P=
0)
i (min) ( µi
dCi
=λ + γ i ≥ λ
dPi
D
µi ( Pi − Pi (max) ) = 0, µi ≥ 0
γ i ( Pi (min) − Pi )= 0 γ i ≥ 0
Pi (min) ≤ Pi ≤ Pi (max) , i =
1,2, , ng
dCi
=λ
dPi
Excluding the plants that reach their limits,
the other plants still operate at equal
incremental cost
17
Example 7.6
Consider generator limits (in MW) for Example 7.4,
let PD=975MW
250 ≤ P1 ≤ 450
150 ≤ P2 ≤ 350
100 ≤ P3 ≤ 225
dC3
5.8 + 0.018P3 =
=
λ
dP3
PD=975MW
PD=906MW
dC2
=
λ
5.5 + 0.012 P2 =
dP2
dC1
5.3 + 0.008P1 =
=
λ
dP1
PD=800MW
Solution:
P1=450MW
P2=325MW
P3=200MW
λ=9.4$/MWh
Ct=8236.25 $/h
18
Pi
(k )
λ ( k ) − βi
=
2γ i
∆P ( k )
=
∆λ
=
dPi ( k )
∑( dλ )
(k )
∆P ( k )
1
∑ 2γ
i
λ (1) = 6.0
6.0 − 5.3
=
P
= 87.5000
2(0.004)
(1)
1
6.0 − 5.5
= 41.6667
2(0.006)
6.0 − 5.8
=
P3(1) = 11.1111
2(0.009)
=
P2(1)
∆P (1) = 975 − (87.5 + 41.6667 + 11.1111) = 834.7222
∆=
λ (1)
250 ≤ P1 ≤ 450
150 ≤ P2 ≤ 350
100 ≤ P3 ≤ 225
6.0 + 3.1632 =
9.1632
λ (2) =
9.1632 − 5.3
= 482.8947 > P1(max) , so let P1 ≡ 450
2(0.004)
9.1632 − 5.5
=
P2(2)
= 305.2632
2(0.006)
9.1632 − 5.8
=
P3(2)
= 186.8421
2(0.009)
=
P1(2)
∆P (2) = 975 − ( 450 + 305.2632 + 186.8421) = 32.8947
∆=
λ (2)
834.7222
834.7222
=
= 3.1632
1
1
1
263.8888
+
+
2(0.004) 2(0.006) 2(0.009)
32.8947
32.8947
=
= 0.2368
1
1
132.8889
+
2(0.006) 2(0.009)
λ (3) = 9.1632 + 0.2368 = 9.4
P1(3) = 450
9.4 − 5.5
= 325
2(0.006)
9.4 − 5.8
=
P3(3) = 200
2(0.009)
=
P2(3)
∆P (3) = 975 − (450 + 325 + 200) = 0.0
19
Solve the optimal dispatch for PD=550MW
C1 =500 + 5.3P1 + 0.004 P12
C2 =400 + 5.5P2 + 0.006 P22
C3 =200 + 5.8P3 + 0.009 P32
250 ≤ P1 ≤ 450 or P1 = 0
150 ≤ P2 ≤ 350 or P2 = 0
100 ≤ P ≤ 225 or P3 = 0
3
dC3
5.8 + 0.018 P3 =
=
λ
dP3
P1=0
dC2
=
5.5 + 0.012 P2 =
λ
dP2
Unit Commitment Problem
(mixed-integer optimization)
Solution 1:
Solution 2:
P1=280MW
P1=340MW
P2=170MW
P2=210MW
dC1
P3=100MW
5.3 + 0.008P1 =
=
λ
dP1
P2=0
P3=0MW
λ=7.54$/MWh
λ=8.02$/MWh
Ct=4676 $/h
Ct=4584 $/h
Solution 3:
Solution 4:
P1=0MW
P1=400MW
P2=340MW
P2=0MW
P3=210MW
P3=150MW
λ=9.58$/MWh
λ=8.5$/MWh
Ct=47785 $/h
Ct=4532 $/h
P3=0
20
Transmission Loss
•When transmission distances are very small and load density in
the system is very high
– Transmission losses may be neglected
– All plants operate at equal incremental production cost to
achieve optimal dispatch of generation
•However, in a large interconnected network
– Power is transmitted over long distances with low load
density areas
– Transmission losses are a major factor affecting the optimal
dispatch.
21
Calculation of Transmission Losses
V
P
P
| I |=
| V | cos φ
I
R+jX
2


P
=
PL | I=
R
|2 R 

 | V | cos φ 
R
=
P2
2
2
| V | cos φ
PD
P1 V1
PL = BP 2
2
2
2
I2
I3
2




P1
P2
+
R

 1 
 R2
 | V1 | cos φ1 
 | V2 | cos φ2 
R3+jX3
PD
2
 cos α ⋅ P1
cos β ⋅ P2 
+
+
 R3
 | V1 | cos φ1 | V2 | cos φ2 
PL =
B P + B12 P1 P2 + B P
2
11 1
2
22 2
V2 P2
R2+jX2
R1+jX1
P=
| I1 | R1 + | I 2 | R2 + | I1 + I 2 | R3
L
2
I1
I2
β
I1
α
I3
22
More general loss formulas:
•Quadratic form
ng
ng
PL   PB
i ij Pj
i 1 j 1
•Kron’s loss formula
ng
ng
ng
PL   PB
i ij Pj   B0 i Pi  B00
i 1 j 1
i 1
– Bij, B0i and B00 are Loss coefficients or B-coefficients.
• See Chapter 7.7 for details of calculating B-coefficients
• Changes with power flows but usually assumed constant and estimated
for a power-flow base case
23
Economic Dispatch Including Losses
•Cost function
ng
ng
Ct   Ci   i  i Pi   i Pi
i 1
2
i 1
dCi
= β i + 2γ i Pi
dPi
Incremental fuel cost
Subject to
ng
P  P
i
D
 PL
i 1
n
ng
ng
ng
PL   PB
i ij Pj   B0 i Pi  B00
i 1 j 1
Pi (min)  Pi  Pi (max)
i 1
g
PL
 2 Bij Pj  B0i
Pi
j 1
Incremental transmission loss
i  1, , ng
24
• Using Lagrange Multipliers
ng
ng
ng
ng
i 1
i 1
i 1
i 1
L   Ci   ( PD  PL   Pi )   i (max) ( Pi  Pi (max) )   i (min) ( Pi  Pi (min) )
ng
where
ng
ng
PL   PB
i ij Pj   B0 i Pi  B00
i 1 j 1
ng
ng
i 1
i 1
i 1
Ct   Ci   i  i Pi   i Pi 2
ng
ng
ng
∂L
=0
∂λ
P  P
∂L
=0
∂Pi
dCi
∂P
dCi
∂P
0
+ λ (0 + L − 1) =
+λ L =λ
∂Pi
dPi
∂Pi
dPi
i
i 1
D
Penalty factor:
ng
 PL  PD   PB
i ij Pj   B0 i Pi  B00
i 1 j 1
dCi
= β i + 2γ i Pi
dPi
i 1
Li
Li 
1
P
1 L
Pi
dCi
  i  1, , ng
dPi
n
g
PL
 2 Bij Pj  B0i
Pi
j 1
ng
i  2i Pi  2  Bij Pj  B0i   i  1, , ng
j 1
25
g
i

1
(  Bii ) Pi   Bij Pj  (1  B0i  i )


2
j 1
n
ng
i  2 i Pi  2  Bij Pj  B0i  
j 1
j i
Solve λ and Pi (i=1~ng) for the optimal dispatch:
ng
P  P
i
i 1
D
ng
ng
 PL  PD   PB
i ij Pj   B0 i Pi  B00
 1
  B11
B12


2

B
 B22
 21


 




 Bng 1
Bng 2

i 1 j 1





B12 







 ng


 Bng ng 



B1ng
• Use the N-R Method:
ng
i 1

 
1 B01  1 

 
 P1 


 


 P2  1 1 B  2 
02
 
 
   2 

 



P 


 ng 
ng 

1 B0 ng  
 

ng
f ( )   Pi PD  PL
i 1
Pi 
 (1 B0i )  i  2 
j i
Bij Pj
2(i   Bii )
f ( )( k )  (
df ( ) ( k )
)  ( k )  PD  PL( k )
d
P ( k )  PD  PL( k )  f ( )( k )
(k )
Check inequality constraints:
If Pi<Pi(min), let Pi ≡ Pi(min)
If Pi>Pi(max), let Pi ≡ Pi(max)
ng
 Pi 
df ( ) ( k )
(
)    

d
i1   

(k )
P ( k )
P ( k )


(k )
ng
df ( ) ( k )



P
(
)
  i 
d
i 1
Remove that Pi from the equations
26
Initial Pi (0) and  (0)
Pi 
 (1 B0i )  i  2  ji Bij Pj
Pi ( k ) 
 ( k 1) (1 B0i )  i  2 ( k 1) 
ng
P
ng
 PD   Pi Bij P
(k )
i1 j 1
P
(k )
 PD  P
(k )
L
 f ( )
P
P

(k )
ng
df ( ) ( k )



P
(
)
  i 
d
(k )
 ( k ) 
(k )
(k )
i 1
(k )
j
ng
  B0i Pi
ng
(k )
i 1
ng
 (1 B0i )  Bii i  2i 
 Pi 
    i
  
2(i   ( k 1) Bii ) 2
i1
 B00   Pi ( k )
i 1
(k )

(k )
Bij Pj( k 1)
2(i   ( k 1) Bii )
2(i   Bii )
(k )
j i

j i
Bij Pj( k )
P ( k )
 Pi 
 

 
i 1   
ng
(k )
 ( k )   ( k 1)   ( k )
Until |∆P(k)|<ε
27
Example 7.7
Solve the optimal dispatch of three thermal plants in a power system. The total
system load is 150MW. The base for per unit values is 100MVA.
C1  200  7.0 P1  0.008 P12 $ / h
C2  180  6.3P2  0.009 P22 $ / h
C3  140  6.8P3  0.007 P32 $ / h
10 MW  P1  85 MW
10 MW  P2  80 MW
10 MW  P3  70 MW
PL ( pu)  0.0218P1(2pu)  0.0228P2(2 pu)  0.0179 P3(2 pu)
(only Bii ≠0)

P 
P
P
PL  0.0218( 1 ) 2  0.0228( 2 ) 2  0.0179( 3 ) 2  100 MW

100
100
100 
 0.000218P12  0.000228P22  0.000179 P32 MW
28
Pi
(k )
 ( k 1)  i

2(i   ( k 1) Bii )
(k )
ng
 Pi 
i  Bii i
   

( k 1)
 
Bii ) 2
i 1 2(  i  
i 1   
ng

(k )

λ (0) = 8.0
8.0  7.0
 51.3136 MW
2(0.008  0.8  0.000218)
8.0  6.3

 78.5292 MW
2(0.008  0.8  0.000228)
8.0  6.8

 71.1575 MW
2(0.007  0.8  0.000179)
P1(1) 
(1)
2
P
P3(1)
PL(1)  0.000218(51.3136)2  0.000228(78.5292)2
 0.000179(71.1575)2  2.886
P (1)  150  2.8864
 (51.3136  78.5292  71.1575)
 48.1139
P
( i)

i 1 
3
 (1) 
10 MW  P1  85 MW
P ( k )
 Pi 


 
i 1   
ng
(k )
10 MW  P2  80 MW
10 MW  P3  70 MW
 (3)  7.6789
7.6789  7.0
 35.0907 MW
2(0.008  7.679  0.000218)
7.6789  6.3

 64.1317 MW
2(0.009  7.679  0.000228)
7.6789  6.8

 52.4767 MW
2(0.007  7.679  0.000179)
P1(4) 
P2(4)
P3(4)
PL(4)  0.000218(35.0907) 2  0.000228(64.1317) 2
 0.000179(52.4767) 2  1.699
P (4)  0.0001
(1)
 152.4924
48.1139
 0.31552
152.4924
Ct  1592.65 $/h
29
Download