Sie sind auf Seite 1von 21

POWER SYSTEMS OPERATION

Part 1: Optimization

Alejandro Garcés

Universidad Tecnológica de Pereira


alejandro.garces@utp.edu.co

April 8, 2019
Learning outcomes

I To formulate optimization problems


I To identify different types of optimization problems and
the main features of each one of them
I To solve and analyze constrained problems using Lagrange
multipliers
I To solve linear programming models using the graphical
method

2
Unconstrained Optimization

3
Nomenclature

Optimization problem
Minimize f (x)
x

Example:

f (x) = (x − 5)2
min f (x) = 0
argminf (x) = 5

4
Some properties

argminf (x) = argminf (x) + C


argminf (x) = argmax − f (x)
min f (x) = max −f (x)

See for example f (x) = (x − 10)2 + 8

5
Continuous and discontinuous functions

Plot each one of these function and find the minimum


Example 1:

f (x) = x2 + 5
Example 2:  
 10 x<0 
f (x) = x2 0≤x≤5
x+1 x>5
 

6
Discrete/binary functions

Example 1

1 2
 
minf (x) = x −
x 2
x∈Z

Example 2

minf (x1 , x2 , x3 ) = 3x1 + 4x2 − 5x3


x
xi ∈ {0, 1}

7
Local and global optimum

Local optimum

global optimum

(a) (b)

8
What makes a problem difficult?

x1
x2

ΩA ΩB
x2 x1

Convex set

9
Continuous problems (derivative)

Consider f : R → R with x̃ a local minimum

f (x̃ ± t) ≥ f (x̃)
if t > 0, then

f (x̃ + t) − f (x̃)
f 0 (x̃) = lim ≥0
t→0+ t
if t < 0 then
f (x̃ + t) − f (x̃)
f 0 (x̃) = lim ≤0
t→0− t

consequently f 0 (x̃) = 0. The same applies for a maximum !

10
In several variables

Let us consider f : Rn → R with a local minimum in x̃, then,


for a small ∆x we define g(t) = f (x̃ + t∆x)

g(t) ≥ g(0)
f (x̃ + t∆x) ≥ f (x̃)

meaning that

f (x̃ + t∆x) − f (x̃)


g 0 (0) = lim = (∇f (x̃))T ∆x
t→0+ t

Then g 0 (0) is zero if ∇f (x̃) = 0

11
Min or Max ?
400

300

200 Max
f (x)

100

−100 Min

−200
1 2 3 4 5 6 7 8 9
x
12
Second derivative

Let us consider a Taylor expansion of f : Rn → R around x̃

1
f (x) = f (x̃) + ∇f (x̃)T (x − x̃) + (x − x̃)T Hf (x̃)(x − x̃)
2
If ∇f (x̃) = 0 and Hf (x̃)  0 then

1
f (x) = f (x̃) + (x − x̃)T Hf (x̃)(x − x̃)
2
f (x) ≥ f (x̃)

Meaning that x̃ is a local minimum !

13
Examples

f (x, y) = (x − 5)2 + (y − 8)2


f (x, y) = x − x2 + xy + y 2
f (x, y, z) = −8x2 − 10y 2 − 3z 4
f (x, y) = sin(x) + y + x

14
Minimum in a compact set

Example 1

min f (x) = x2
3 ≤ x ≤ 10

Example 2

min f (x, y) = x2 + y 2 − 2x − 4y
x≥0
y≥0
x≤y

The optimum is either in the interior or in the boundary

15
Lagrange multipliers

min f (x, y) = x + y
x2 + y 2 = 1

We define a Lagrangian function

L(x, y, λ) = x + y + λ(1 − x2 − y 2 )

16
Lagrange multipliers

min f (x, y, z) = x + y + z
x2 + y 2 + z 2 = 1
2x + 3y + z = 5

We define a Lagrangian function with two Lagrange multipliers

L(x, y, z, λ) = x+y+z +λ1 (1−x2 −y 2 −z 2 )+λ2 (2x+3y+z −5)

17
Geometrical interpretation

min f (x)
g(x) = a

Lagrangian
L(x, λ) = f (x) + λT g(x)
then
∇f (x̃) = −λT ∇g(x̃)
The gradient of f is parallel to the gradient of g

18
Economical interpretation
min f (x)
g(x) = a

The optimum x̃ is given by

∇f (x̃) + λT ∇g(x̃) = 0
g(x̃) = a

then
 
∂L T ∂x
= ∇f (x)
∂a ∂a
 T    
∂λ T T ∂x
+ (g(x) − a) + λ ∇g(x) −1
∂a ∂a
∂L(x̃)
= −λ
19
∂a
Have fun with Python

Find the minimum using the plot

max f (x) = 3x2 − 2x4 − 3x6 , −1 ≤ x ≤ 1


min f (x, y) = 100(y − x2 )2 + (1 − x)2

20
Bibliography

I Enrique Castillo, Antonio J. Conejo, Pablo Pedregal,


Ricardo Garcı́a, Natalia Alguacil; Formulación y
Resolución de Modelos de Programación Matemática en
Ingenierı́a y Ciencia.
I Antoion Conejo, Luis Baringo, Power System Operations
I https://www.cvxpy.org/index.html

21

Das könnte Ihnen auch gefallen