Part 1 Daniel Kirschen Economic d ispatch problem Several generating units serving the load What share of the load should each generating unit produce Consider the limits of the generating units ID: 179789
Download Presentation The PPT/PDF document "Introduction to Optimization" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Introduction to Optimization(Part 1)
Daniel KirschenSlide2
Economic dispatch problem
Several generating units serving the load
What share of the load should each generating unit produce?
Consider the limits of the generating unitsIgnore the limits of the network
A
B
C
L
© 2011 D. Kirschen and University of Washington
2Slide3
Characteristics of the generating units© 2011 D. Kirschen and University of Washington
3
Thermal generating units
Consider
the running costs only
Input / Output curveFuel vs. electric powerFuel consumption measured by its energy content
Upper and lower limit on output of the generating unit
B
T
G
(Input)
Electric Power
Fuel
(Output)
Output
P
min
P
max
Input
J/h
MWSlide4
Cost Curve
Multiply fuel input by fuel cost
No-load cost
Cost of keeping the unit running if it could produce zero MW
Output
P
min
P
max
Cost
$/
h
MW
No-load cost
© 2011 D. Kirschen and University of Washington
4Slide5
Incremental Cost CurveIncremental cost curve
Derivative of the cost curve
In
$/
MWhCost of the next MWh
© 2011 D. Kirschen and University of Washington
5
∆F
∆P
Cost
[$/
h]
MW
Incremental Cost
[$/
MWh]
MWSlide6
Mathematical formulation
Objective function
Constraints
Load / Generation balance:Unit Constraints:
© 2011 D. Kirschen and University of Washington
6
A
B
C
L
This is an
optimization
problemSlide7
Introduction to OptimizationSlide8
“An engineer can do with one dollar which any bungler can do with two”
A. M. Wellington (1847-1895)
© 2011 D. Kirschen and University of Washington
8Slide9
ObjectiveMost engineering activities have an objective:
Achieve
the best possible design
Achieve the most economical operating conditions
This objective is usually quantifiable
Examples:minimize cost of building a transformerminimize cost of supplying power
minimize losses in a power systemmaximize profit from a bidding strategy
© 2011 D. Kirschen and University of Washington
9Slide10
Decision VariablesThe value of the objective is a function of some decision variables:
Examples of decision variables:
Dimensions of the transformer
Output of generating units, position of tapsParameters of bids for selling electrical energy
© 2011 D. Kirschen and University of Washington
10Slide11
Optimization ProblemWhat value should the decision variables take so that
is
minimum or maximum?
© 2011 D. Kirschen and University of Washington
11Slide12
Example: function of one variable© 2011 D. Kirschen and University of Washington
12
x
f(x)
x
*
f(x
*
)
f(x) is maximum for x = x* Slide13
Minimization and Maximization
© 2011 D. Kirschen and University of Washington
13
x
f(x)
x
*
f(x
*
)
If x = x*
maximizes
f(x) then it
minimizes
- f(x)
-f(x)
-f(x
*
)Slide14
Minimization and Maximization
maximizing
f(x)
is thus the same thing as minimizing g(x) = -f(x)
Minimization and maximization problems are thus interchangeable
Depending on the problem, the optimum is either a maximum or a minimum© 2011 D. Kirschen and University of Washington
14Slide15
Necessary Condition for Optimality© 2011 D. Kirschen and University of Washington
15
x
f(x)
x
*
f(x
*
)Slide16
Necessary Condition for Optimality© 2011 D. Kirschen and University of Washington
16
x
f(x)
x
*Slide17
Example© 2011 D. Kirschen and University of Washington
17
x
f(x)
For what values of
x
is ?
In other words, for what values of
x
is the necessary condition for optimality satisfied?Slide18
Example
A, B, C, D are stationary points
A and D are maxima
B is a minimumC is an inflexion point
x
f(x)
A
B
C
D
© 2011 D. Kirschen and University of Washington
18Slide19
How can we distinguish minima and maxima?© 2011 D. Kirschen and University of Washington
19
x
f(x)
A
B
C
D
The objective function is
concave
around a maximumSlide20
How can we distinguish minima and maxima?
x
f(x)
A
B
C
D
The objective function is
convex
around a minimum
© 2011 D. Kirschen and University of Washington
20Slide21
How can we distinguish minima and maxima?© 2011 D. Kirschen and University of Washington
21
x
f(x)
A
B
C
D
The objective function is flat around an inflexion pointSlide22
Necessary and Sufficient Conditions of Optimality
Necessary condition:
Sufficient condition:
For a maximum:For a minimum:
© 2011 D. Kirschen and University of Washington
22Slide23
Isn’t all this obvious?
Can’t we tell all this by looking at the objective function?
Yes, for a simple, one-dimensional case when we know the shape of the objective function
For complex, multi-dimensional cases (i.e. with many decision variables) we can’t visualize the shape of the objective function
We must then rely on mathematical techniques
© 2011 D. Kirschen and University of Washington
23Slide24
Feasible SetThe values that the decision variables can take are usually limited
Examples:
Physical dimensions of a transformer must be positive
Active power output of a generator may be limited to a certain range (e.g. 200 MW to 500 MW)Reactive power output of a generator may be limited to a certain range (e.g. -100 MVAr to 150 MVAr)
© 2011 D. Kirschen and University of Washington
24Slide25
Feasible Set
x
f(x)
A
D
x
MAX
x
MIN
Feasible Set
The values of the objective function outside
the feasible set do not matter
© 2011 D. Kirschen and University of Washington
25Slide26
Interior and Boundary Solutions
A and D are interior maxima
B and E are interior minima
XMIN is a boundary minimum
XMAX
is a boundary maximum
x
f(x)
A
D
x
MAX
x
MIN
B
E
Do not satisfy
the
O
ptimality
conditions
!
© 2011 D. Kirschen and University of Washington
26Slide27
Two-Dimensional Case
x
1
x
2
f(x
1
,x
2
)
x
2
*
x
1
*
f(x
1
,x
2
) is minimum for x
1
*
, x
2
*
© 2011 D. Kirschen and University of Washington
27Slide28
Necessary Conditions for Optimality
x
1
x
2
f(x
1
,x
2
)
x
2
*
x
1
*
© 2011 D. Kirschen and University of Washington
28Slide29
Multi-Dimensional Case
At a maximum or minimum value of
we must have:
A point where these conditions are satisfied is called a
stationary point
© 2011 D. Kirschen and University of Washington
29Slide30
Sufficient Conditions for Optimality
x
1
x
2
f(x
1
,x
2
)
minimum
maximum
© 2011 D. Kirschen and University of Washington
30Slide31
Sufficient Conditions for Optimality
x
1
x
2
f(x
1
,x
2
)
Saddle point
© 2011 D. Kirschen and University of Washington
31Slide32
Sufficient Conditions for Optimality
Calculate the Hessian matrix at the stationary point:
© 2011 D. Kirschen and University of Washington
32Slide33
Sufficient Conditions for OptimalityCalculate the eigenvalues of the Hessian matrix at the stationary point
If all the eigenvalues are greater or equal to zero:
The matrix is positive semi-definite
The stationary point is a minimum
If all the eigenvalues are less or equal to zero:
The matrix is negative semi-definiteThe stationary point is a maximumIf some or the eigenvalues are positive and other are negative:The stationary point is a saddle point
© 2011 D. Kirschen and University of Washington
33Slide34
Contours
x
1
x
2
f(x
1
,x
2
)
F
1
F
2
F
2
F
1
© 2011 D. Kirschen and University of Washington
34Slide35
Contours
x
1
x
2
Minimum or maximum
A contour is the locus of all the point that give the same value
to the objective function
© 2011 D. Kirschen and University of Washington
35Slide36
Example 1
is a stationary
point
© 2011 D. Kirschen and University of Washington
36Slide37
Example 1
Sufficient conditions for optimality:
must be positive definite (i.e. all eigenvalues must be positive)
The stationary point
is a minimum
© 2011 D. Kirschen and University of Washington
37Slide38
Example 1© 2011 D. Kirschen and University of Washington
38
x
1
x
2
C=1
C=4
C=9
Minimum: C=0Slide39
Example 2
is a stationary
point
© 2011 D. Kirschen and University of Washington
39Slide40
Example 2
Sufficient conditions for optimality:
The stationary point
is a saddle point
© 2011 D. Kirschen and University of Washington
40Slide41
Example 2© 2011 D. Kirschen and University of Washington
41
x
1
x
2
C=1
C=4
C=9
C=1
C=4
C=9
C=-1
C=-4
C=-9
C=0
C=0
C=-9
C=-4
This stationary point is a saddle pointSlide42
Optimization with ConstraintsSlide43
Optimization with Equality Constraints
There are usually restrictions on the values that the decision variables can take
© 2011 D. Kirschen and University of Washington
43
Objective function
Equality constraintsSlide44
Number of ConstraintsN decision variables
M
equality constraints
If M > N, the problems is over-constrainedThere is usually no solutionIf M = N, the problem is determinedThere may be a solution
If M < N, the problem is under-constrainedThere is usually room for optimization
© 2011 D. Kirschen and University of Washington
44Slide45
Example 1
x
1
x
2
Minimum
© 2011 D. Kirschen and University of Washington
45Slide46
Example 2: Economic Dispatch
L
G
1
G
2
x
1
x
2
Cost of running unit 1
Cost of running unit 2
Total cost
Optimization
problem:
© 2011 D. Kirschen and University of Washington
46Slide47
Solution by substitution
Unconstrained
minimization
© 2011 D. Kirschen and University of Washington
47Slide48
Solution by substitution
Difficult
Usually impossible
when constraints are non-linearProvides little or no insight into solution
Solution using Lagrange multipliers
© 2011 D. Kirschen and University of Washington
48Slide49
Gradient
© 2011 D. Kirschen and University of Washington
49Slide50
Properties of the GradientEach component of the gradient vector indicates the rate of change of the function in that direction
The gradient indicates the direction in which a function of several variables increases most rapidly
The magnitude and direction of the gradient usually depend on the point considered
At each point, the gradient is perpendicular to the contour of the function
© 2011 D. Kirschen and University of Washington
50Slide51
Example 3
x
y
© 2011 D. Kirschen and University of Washington
51
A
B
C
DSlide52
Example 4
x
y
© 2011 D. Kirschen and University of Washington
52Slide53
Lagrange multipliers
© 2011 D. Kirschen and University of Washington
53Slide54
Lagrange multipliers
© 2011 D. Kirschen and University of Washington
54Slide55
Lagrange multipliers
© 2011 D. Kirschen and University of Washington
55Slide56
Lagrange multipliers
The
solution must be on the constraint
© 2011 D. Kirschen and University of Washington
56
A
B
To reduce the value of
f
, we must move
in
a direction opposite to the gradient
?Slide57
Lagrange multipliers
We stop when the gradient of the function
is perpendicular to the constraint because
moving further would increase the value
of the function
At the optimum, the gradient of the
function is parallel to the gradient
of the constraint
© 2011 D. Kirschen and University of Washington
57
A
B
CSlide58
Lagrange multipliers
At the optimum, we must have:
Which can be expressed as:
is called the
Lagrange multiplier
The constraint must also be satisfied:
In terms of the co-ordinates:
© 2011 D. Kirschen and University of Washington
58Slide59
Lagrangian function
To simplify the writing of the conditions for optimality,
it is useful to define the Lagrangian function:
The necessary conditions for optimality are then given
by the partial derivatives of the Lagrangian:
© 2011 D. Kirschen and University of Washington
59Slide60
Example
© 2011 D. Kirschen and University of Washington
60Slide61
Example
© 2011 D. Kirschen and University of Washington
61Slide62
Example
x
1
x
2
Minimum
4
1
© 2011 D. Kirschen and University of Washington
62Slide63
Important Note!
If the constraint is of the form:
It must be included in the Lagrangian as follows:
And not as follows:
© 2011 D. Kirschen and University of Washington
63Slide64
Application to Economic Dispatch
L
G
1
G
2
x
1
x
2
Equal incremental cost
solution
© 2011 D. Kirschen and University of Washington
64Slide65
Equal incremental cost solution
x
1
x
2
Cost curves:
x
1
x
2
Incremental
cost curves:
© 2011 D. Kirschen and University of Washington
65Slide66
Interpretation of this solution
x
1
x
2
L
+
-
-
If < 0, reduce
λ
If > 0, increase
λ
© 2011 D. Kirschen and University of Washington
66Slide67
Physical interpretation
x
x
The incremental cost is the cost of
one additional MW for one hour.
This cost depends on the output of
the generator.
© 2011 D. Kirschen and University of Washington
67Slide68
Physical interpretation
© 2011 D. Kirschen and University of Washington
68Slide69
Physical interpretation
It pays to increase the output of unit 2 and decrease the
output of unit 1 until we have:
The Lagrange multiplier
λ
is thus the cost of one more MW
at the optimal solution.
This is a very important result with many applications in
economics
.
© 2011 D. Kirschen and University of Washington
69Slide70
Generalization
Lagrangian:
One Lagrange multiplier for each constraint
n + m variables:
x
1
, …,
x
n
and
λ
1
, …,
λ
m
© 2011 D. Kirschen and University of Washington
70Slide71
Optimality conditions
n equations
m equations
n + m
equations in
n + m variables
© 2011 D. Kirschen and University of Washington
71