Professional Documents
Culture Documents
Introduction To Optimization and Application To Economic Dispatch and Unit Commitment
Introduction To Optimization and Application To Economic Dispatch and Unit Commitment
Daniel Kirschen
Perspective
• Conventional PS economics problems:
– Economic Dispatch (ED)
– Unit Commitment (UC)
– Optimal Power Flow (OPF)
• Assume monopoly, vertically integrated utility
• Why?
– Conceptually simpler
– Variants for competitive electricity markets
– Comparison with “benevolent monopolist”
L
A B C
- =
actual load – uncontrolled renewable generation
= net load
= controllable generation
We’ll assume that the uncontrollable renewable generation
is known and dispatch the controllable generation to meet
the net load
© 2018 D. Kirschen and University of Washington 8
Hydro-thermal coordination
Input
Fuel Electric Power
(Input) (Output) MW
Pmin Pmax
• Thermal generating units Output
• Consider the running costs only
• Input / Output curve
– Fuel vs. electric power
• Fuel consumption measured by its energy content
• Upper and lower limit on output of the generating unit
$/h
Cost
No-load cost
MW
Pmin Pmax
© 2018 D. Kirschen and University of Washington
Output 11
Incremental Cost Curve
• Incremental cost curve Cost [$/h]
∆F
∆P
• Derivative of the cost curve MW
• In $/MWh
• Cost of the next MWh Incremental Cost
[$/MWh]
MW
© 2018 D. Kirschen and University of Washington 12
Mathematical formulation
• Objective: Minimize
L
A B C
• Constraints
– Load / Generation balance:
– Unit Constraints:
x* x
x* x
-f(x)
-f(x*)
x* x
x* x
x
For what values of x is ?
f(x)
A B C D x
• A, B, C, D are stationary points
• A and D are maxima
• B is a minimum
• C is an inflexion point
f(x)
A B C D x
f(x)
A B C D x
f(x)
A B C D x
• Necessary condition:
• Sufficient condition:
– For a maximum:
– For a minimum:
f(x)
xMIN A xMAX D x
Feasible Set
The values of the objective function outside
the feasible set do not matter
© 2018 D. Kirschen and University of Washington 31
Two-Dimensional Case
f(x1,x2)
x1*
x1
x2*
x1*
x1
x2*
x2
© 2018 D. Kirschen and University of Washington 33
Multi-Dimensional Case
At a maximum or minimum value of
we must have:
x1
x2
© 2018 D. Kirschen and University of Washington 35
Sufficient Conditions for Optimality
f(x1,x2)
Saddle point
x1
x2
© 2018 D. Kirschen and University of Washington 36
Sufficient Conditions for Optimality
Calculate the Hessian matrix at the stationary point:
d et ( λ 𝐼 − 𝐴 ) =0
( )
1 0 0
Where I is the identity matrix: 0 1 0
0 0 1
F2
F1
x1
F1 F2
x2
© 2018 D. Kirschen and University of Washington 40
Contours
A contour is the locus of all the point that give the same value
to the objective function
x2
x1
© 2018 D. Kirschen and University of Washington
Minimum or maximum 41
Example 1
is a stationary
point
x2
C=9
C=4
C=1
x1
Minimum: C=0
is a stationary
point
C=9
C=4
C=1
x1
C=1
C=4
C=9
Objective function
Equality constraints
x2
Minimum
x1
© 2018 D. Kirschen and University of Washington 52
Example 2: Economic Dispatch
x1 x2
L
G1 G2
Optimization problem:
Unconstrained minimization
• Difficult
• Usually impossible when constraints are non-
linear
• Provides little or no insight into solution
x2
Minimum
1
4 x1
© 2018 D. Kirschen and University of Washington 69
Important Note!
If the constraint is of the form:
Cost curves:
x1 x2
Incremental
cost curves:
x1 x2
© 2018 D. Kirschen and University of Washington 72
Interpretation of this solution
x1 x2
-
L -
+
If < 0, reduce λ
If > 0, increase λ
© 2018 D. Kirschen and University of Washington 73
Physical interpretation
Lagrangian:
n equations
m equations
n + m equations in
n + m variables
© 2018 D. Kirschen and University of Washington 78
Optimization with inequality constraints
Objective function
Equality constraints
Inequality constraints
x1 x2
L
G1 G2
Equality constraints
Inequality constraints
x2max
A
x2min
x1max x1
x1min
© 2018 D. Kirschen and University of Washington 81
Example: Economic Dispatch
What is the solution for a larger load?
x2max
A B
x2min
x1min x1max x1
© 2018 D. Kirschen and University of Washington 82
Example: Economic Dispatch
C is the solution because it is the point on
the equality constraint that satisfies the
x2 inequality constraints at minimum cost
x2max
A B
x2min
x1min x1max x1
© 2018 D. Kirschen and University of Washington 83
Binding Inequality Constraints
• A binding inequality constraint is an inequality constraint that is
satisfied exactly
• Example:
– If we must have x1 ≤ x1max
– And at the solution we have x1 = x1max
– Then the constraint x1 ≤ x1max is said to be binding
• ALL of the inequality constraints must be satisfied
• Only a FEW will be binding (or active) at any given time
• But we don’t know ahead of time which inequality constraints
will be binding!
• All equality constraints are always binding
Lagrangian function:
OR
x1
Solution of problem
with inequality constraint
Solution of problem
without inequality
constraint
x1
Solution of problem
without constraints
KKT Conditions:
=0 =0
(1)
(2)
(3)
(4)
© 2018 D. Kirschen and University of Washington 106
Example: Optimality Conditions
Set the partial derivatives of the Lagrangian with respect to the
μ’s to zero:
Let us try:
First trial:
Third trial:
PA PB PC
PA PB
PAMAX PBMAX
PA PB
PAMAX PBMAX
PA PB
PAMAX PBMAX
PA PB
PAMAX PBMAX
PA PB
PAMAX PBMAX
PA PB
PAMAX PBMAX
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
PA PB
0.7
0.5
0.3
30 80 120 150 PA
f(x)
A D x
138
Which one is the real optimum?
x2
A D
x1
B
C
139
Local and Global Optima
• The optimality conditions are local conditions
• They do not compare separate optima
• If I find an optimum can I be sure that it is the
global optimum?
• In general, to find the global optimum, we
must find and compare all the optima
• In large problems, this can be very difficult and
time consuming
x1 x1
x2
x1 x1
x1min x1max
© 2015 Daniel Kirschen and University of Washington
142
Example of Non-Convex Feasible Sets
x2 x2
x1 x1
x2
x1
x1 x1
x1 a x1 b x1 c x1 d
© 2015 Daniel Kirschen and University of
Washington
143
Example of Convex Feasible Sets
A set is convex if, for any two points belonging to the set, all the
points on the straight line joining these two points belong to the set
x2 x2
x1 x1
x2
x1 x1
x1 min
x1 max
x2 x2
x1 x1
x2
x1
x1 x1
x1 a
x1 b
x1 x1
c d
f(x)
146
Example of Convex Function
x2
x1
f(x)
A D
x1
B
C
f(y)
xa y xb x
A convex function is a function such that, for any two points x a and xb
belonging to the feasible set and any k such that 0 ≤ k ≤1, we have:
f(x)
A B C L
Example borrowed from Wood and Wollenberg’s Power Generation, Operation and Control 158
Observations on the example:
Example borrowed from Wood and Wollenberg’s Power Generation, Operation and Control 161
Optimal combination for each hour
Example borrowed from Wood and Wollenberg’s Power Generation, Operation and Control 162
Matching the combinations to the load
Load
Unit 3
Unit 2
Unit 1
0 12 24
Time
6 18
αi + β i
αi
tiOFF
• Discrete variables
– There is no gradient
– Can only take a finite number of values
– Problem is not convex
– Must try combinations of discrete values
111
• Examples
110
010
001 states
000
• Optimization over a
time horizon divided
into intervals
• A solution is a path
linking one combination
at each interval
• How many such paths
are there?
T= 1 2 3 4 5 6
• Need to be smart
• Try only a small subset of all combinations
• Can’t guarantee optimality of the solution
• Try to get as close as possible within a
reasonable amount of time
195
Unit Data
C 10 50 1 1 0 20 100 OFF
C(p)
C B A
Combinations 1 2 3
Pmin Pmax
A B C 150 300 200
1 1 1 210 400
1 1 0 200 350
1 0 1 160 300
1 0 0 150 250
0 1 1 60 150
0 1 0 50 100
0 0 1 10 50
0 0 0 0 0
1 2 3
A B C
1 1 1
1 1 0
1 0 1
1 0 0 Initial State
0 1 1
1 2 3
A B C
1 1 1
1 1 0
1 0 1
1 0 0 Initial State
0 1 1
TD TU
A 3 3
B 1 2
C 1 1
1 2 3
A B C
1 1 1
1 1 0
1 0 1
1 0 0 Initial State
0 1 1
TD TU
A 3 3
B 1 2
C 1 1
1 2 3
A B C
1 1 1
1 1 0
1 0 1
1 0 0 Initial State
0 1 1
1 1 1 4
1 1 0 3 7
1 0 1
2 6
1 0 0 1
5
1 1 1 4
$3200
1 1 0 3 7
$3100 $2100
1 0 1 2 6
$3500 $2100
1 0 0 1 5
$1500 $2000
1 1 1 4
$3200
$0
1 1 0 $700 3 $0 7
$3100 $600 $2100
$600
1 0 1 2 $0 6
$100 $3500 $2100
$0
1 0 0 $0 1 5
$1500 $2000
Unit Start-up cost
A 1000
B 600
C 100
$5400
1 1 1 4
$3200
$0
1 1 0 $5200 $7300
$700 3 $0 7
$3100 $600 $2100
$600 $5100 $7200
1 0 1 2 $0 6
$100 $3500 $0
$2100
1 0 0 $1500 $7100
$0 1 5
$1500 $2000
1 1 1 4
1 1 0 $7300
3 7
$7200
1 0 1 2 6
1 0 0 $7100
1 5
1 1 1
1 1 0
1 0 1 2
$7100
1 0 0 1 5
212
Motivation
• Many optimization problems are linear
– Linear objective function
– All constraints are linear
• Non-linear problems can be linearized:
– Piecewise linear cost curves
– DC power flow
• Efficient and robust method to solve such
problems
PA
n
minimize Σ cj x j
j =1
n
subject to: Σ aij xj ≤ bi, i = 1, 2, . . ., m
j =1
n
Σ hij xj = di, i = 1, 2, . . ., p
j =1
Decision variables: xj
y
Maximize x + y 4
0 x
0 1 2 3
Maximize x + y
y
Subject to: x ≥ 0; y≥0 4
x≤3
3
y≤4
x+2y≥2
2
0 x
0 1 2 3
x+y=0
Example 1
Maximize x + y
y
Subject to: x ≥ 0; y≥0 4
x≤3
3
y≤4
x+2y≥2
2 Feasible
Solution
1
0 x
0 1 2 3
x+y=1
Example 1
Maximize x + y
y
Subject to: x ≥ 0; y≥0 4
x≤3
3
y≤4
x+2y≥2
2
1
Feasible
Solution
0 x
0 1 2 3
x+y=2
Example 1
Maximize x + y
y
Subject to: x ≥ 0; y≥0 4
x≤3
3
y≤4
x+2y≥2
2
0 x
0 1 2 3
x+y=3
Example 1
Maximize x + y Optimal
y Solution
Subject to: x ≥ 0; y≥0 4
x≤3
x+y=7
3
y≤4
x+2y≥2
2
0 x
0 1 2 3
Solving a LP problem (1)
• Constraints define a polyhedron in n
dimensions
• If a solution exists, it will be at an extreme
point (vertex) of this polyhedron
• Starting from any feasible solution, we can
find the optimal solution by following the
edges of the polyhedron
• Simplex algorithm determines which edge
should be followed next
© 2011 Daniel Kirschen and University of Washington
222
Which direction?
Maximize x + y Optimal
y Solution
Subject to: x ≥ 0; y≥0 4
x≤3
x+y=7
3
y≤4
x+2y≥2
2
0 x
0 1 2 3
3D Polyhedron
Extreme points
(vertices)
Constraints
(edges)
A B C L
PA=x1
PAMAX
PB=x2
PBMAX
PC=x3
PCMAX
PA=x1
PAMIN PAMAX
PB=x2
PBMIN PBMAX
PC=x3
PCMIN PCMAX
PA=x1
PAMIN PAMAX
PB=x2
PBMIN PBMAX
PC=x3
PCMIN PCMAX
PA=x1
PAMIN PAMAX
PB=x2
PBMIN PBMAX
Except for the fact that the variables are integer, this
looks very much like a linear programming problem.
x
2
-cT
x1
LP solution
IP solution
The optimal integer solution can be far away from the LP solution
Problem 0
Problem 1 Problem 2
Problem 1 Problem 2
Solution of
Problem 1 Solution of Problem 2
Problem 1
Problem 3 Problem 4
Problem 1 Problem 2
Problem 4
x2 = 2
x2 = 1
Problem 3
Problem 1 Problem 2
Solution of
Problem 4 Problem 4
x2 = 2
x2 = 1
Problem 3
No solution!
No solution
No integer solution yet
Optimal solution
Solution of relaxed
Can’t go any problem 4 is bounded
further in this by solution of problem
No solution
direction 2. No point in going
further