Sei sulla pagina 1di 36

Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal

Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Tutorial on Control and State Constrained Optimal
Control Problems
Part 2 : Mixed Control-State Constraints
Helmut Maurer
University of M unster, Germany
Institute of Computational and Applied Mathematics
SADCO Summer School
Imperial College London, September 5, 2011
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Outline
1 Optimal Control Problems with Control and State Constraints
2 Numrical Method: Discretize and Optimize
3 Theory of Optimal Control Problems with Mixed Control-State
Constraints
4 Example: Rayleigh Problem with Dierent Constraints and
Objectives
5 Example: Optimal Exploitation of Renewable Resources
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Control Problem
state x(t) R
n
, control u(t) R
m
.
Dynamics and Boundary Conditions
x(t) = f (t, x(t), u(t)), a.e. t [0, t
f
],
x(t) = x
0
, (x(t
f
)) = 0 ( : R
n
R
r
).
Control and State Constraints
c(x(t), u(t)) 0 , 0 t t
f
, ( c : R
n
R
m
R
k
)
s(x(t)) 0 , 0 t t
f
, ( s : R
n
R
l
)
Minimize
J(u, x) = g(x(t
f
)) +

t
f
0
f
0
(t, x(t), u(t)) dt
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Discretization
For simplicity consider a MAYERtype problem with cost functional
J(u, x) = g(x(t
f
)) .
This can achieved by considering the additional state variable x
0
with
x
0
= f
0
(x, u) , x
0
(0) = 0 .
Then we have
x
0
(t
f
) =

t
f
0
f
0
(t, x(t), u(t)) .
Choose an integer N N, a stepsize h and grid points t
i
:
h = t
f
/N , t
i
: = ih , (i = 0, 1, . . . , N) .
Approximation of control and state at grid points:
u(t
i
) u
i
R
m
, x(t
i
) x
i
R
n
(i = 0, . . . , N)
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Large-scale NLP using EULERs method
Minimize
J(u, x) = g(x
N
)
subject to
x
i +1
= x
i
+ h f (t
i
, x
i
, u
i
), i = 0, .., N 1,
x
0
= x
0
, (x
N
) = 0,
c(x
i
, u
i
) 0 , i = 0, .., N,
s(x
i
) 0 , i = 0, .., N,
Optimization variable for full discretization:
z := (u
0
, x
1
, u
1
, x
2
, ..., u
N1
, x
N
, u
N
) R
N(m+n)+m
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
NLP Solvers
AMPL : Programming language (Fourer, Gay, Kernighan)
IPOPT : Interior point method (Andreas Wachter)
LOQO : Interior point method (Vanderbei et al.)
Other NLP solvers embedded in AMPL : cf. NEOS server
NUDOCCCS : optimal control package (Christof B uskens)
WORHP : SQP solver (Christof B uskens, Matthias Gerdts)
Special feature: solvers provide LAGRANGE-multipliers as
approximations of the adjoint variables.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Control Problem with Control-State Constraints
State x(t) R
n
, Control u(t) R
m
.
All functions are assumed to be suciently smooth
Dynamics and Boundary Conditions
x(t) = f (x(t), u(t)), a.e. t [0, t
f
],
x(0) = x
0
R
n
, (x(t
f
)) = 0 R
k
,
( 0 = (x(0), x(t
f
)) mixed boundary conditions )
Mixed Control-State Constraints
c(x(t), u(t)) , t [0, t
f
], c : R
n
R
m
R
Control bounds u(t) are included by c(x, u) = u.
Minimize
J(u, x) = g(x(t
f
)) +

t
f
0
f
0
(x(t), u) dt
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Hamiltonian
Hamiltonian
H(x, , u) =
0
f (x, u) +f (x, u) R
n
(row vector)
Augmented Hamiltonian
H(x, , , u) = H(x, , u) +c(x, u)
=
0
f (x, u) +f (x, u) +c(x, u), R.
Let (u, x) L

([0, T], R
m
) W
1,
([0, T], R
n
) be a
locally optimal pair of functions.
Regularity assumption
c
u
(x(t), u(t)) = 0 t J
a
J
a
:= { t [0, t
f
] | c(x(t), u(t)) = or = }
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Minimum Principle of Pontryagin et al. and Hestenes
Let (u, x) L

([0, t
f
], R
m
) W
1,
([0, t
f
], R
n
) be a locally
optimal pair of functions that satises the regularity
assumption. Then there exist
an adjoint (costate) function W
1,
([0, t
f
], R
n
) and a
scalar
0
0 ,
a multiplier function L

([0, t
f
], R),
and a multiplier R
r
associated to the boundary
condition (x(t
f
)) = 0
that satisfy the following conditions for a.a. t [0, t
f
], where
the argument (t) denotes evaluation along the trajectory
(x(t), u(t), (t)) :
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Minimum Principle of Pontraygin et al. and Hestenes
(i) Adjoint ODE and transversality condition:

(t) = H
x
(t) = (
0
f
0
+f )
x
(t) (t) c
x
(t) ,
(t
f
) = (
0
g +)
x
(x(t
f
)) ,
(iia) Minimum Condition for Hamiltonian:
H(x(t), (t), u(t)) = min { H(x(t), (t), u) | c(x(t), u) }
(iib) Local Minimum Condition for Augmented Hamiltonian:
0 = H
u
(t) = (
0
f
0
+f )
u
(t) +(t) c
u
(t)
(iii) Sign of multiplier and complementarity condition:
(t) 0, if c(x(t), u(t)) = ; (t) 0, if c(x(t), u(t)) = ,
(t) = 0 , if < c(x(t), u(t)) < .
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Evaluation of the Minimum Principle: boundary arc
Boundary arc: Let [t
1
, t
2
] , 0 t
1
< t
2
< t
f
, be an interval with
c(x(t), u(t)) = or c(x(t), u(t)) = t
1
t t
2
.
For simplicity assume a scalar control, i.e., m = 1 .
Due to the regularity condition c
u
(x(t), u(t)) = 0 there exists a
smooth function u
b
(x) satisfying
c(x, u
b
(x)) ( ) x in a neighborhood of the trajectory.
The control u
b
(x) is called the boundary control and yields the
optimal control by the relation u(t) = u
b
(x(t)) .
It follows from the local minimum condition 0 = H
u
= H
u
+c
u
that the multiplier is given by
= (x, ) = H
u
(x, , u
b
(x)) / c
u
(x, u
b
(x)) .
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case I : Regular Hamiltonian, u is continuous
CASE I : Consider optimal control problems which satisfy the
Assumption: The Hamiltonian H(x, , u) is regular, i.e., it admits a
unique minimum u. The strict Legendre condition holds:
H
uu
(t) > 0 t [0, t
f
] .
(a) Then there exists a free control u = u
free
(x, ) satisfying
H
u
(x, , u
free
(x, )) 0 .
(b) The optimal control u(t) is continuous in [0, t
f
] .
Claim (b) follows from the continuity and regularity of H.
The continuity of the control implies junctions conditions at
junction points t
k
(k = 1, 2) with the boundary:
u
free
(x(t
k
), (t
k
)) = u
b
(x(t
k
)) , (t
k
) = 0 (k = 1, 2).
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Rayleigh Problem with Quadratic Control
The Rayleigh problem is a variant of the van der Pol Oszillator,
where x
1
denotes the electric current.
Control problem for the Rayleigh Equation
Minimize J(x, u) =
t
f

0
(u
2
+ x
2
1
) dt (t
f
= 4.5)
subject to
x
1
= x
2
, x
1
(0) = 5,
x
2
= x
1
+ x
2
(1.4 0.14x
2
2
) + 4u, x
2
(0) = 5.
Three types of constraints:
Case (a) : no control constraints.
Case (b) : control constraint 1 u(t) 1 .
Case (c) : mixed control-state constraint
u(t) + x
1
(t)/6 0, = 1, 2
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case I (a) : Rayleigh problem, no constraint
Normal Hamiltonian:
H(x, , u) = u
2
+ x
2
1
+
1
x
2
+
2
(x
1
+ x
2
(1.4 0.14x
2
2
) + 4u)
Adjoint Equations:

1
= H
x
1
= 2x
1
+
2

1
(t
f
) = 0,

2
= H
x
2
=
1

2
(1.4 0.42x
2
2
)
2
(t
f
) = 0,
Minimum condition:
0 = H
u
= 2u + 4
2
u = u
free
(x, ) = 2
2
.
Shooting method for solving the boundary value problem for (x, ):
Determine unknown shooting vector s = (0) R
2
that satises
the terminal condition (t
f
) = 0 : use Newtons method
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case I : Rayleigh problem without constraints
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x
1

,

x
2
state variables x
1
, x
2
-5
-4
-3
-2
-1
0
1
2
3
4
5
-6 -5 -4 -3 -2 -1 0 1
(
x
1
,
x
2
)
phaseportrait (x
1
,x
2
)
-2
-1
0
1
2
3
4
5
6
7
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u
optimal control u
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
l
a
m
b
d
a
1

,

l
a
m
b
d
a
2
adjoint variables lambda
1
, lambda
2
Note: Hamiltionian is regular, control u(t) is continuous (analytic).
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case I (b) : Rayleigh problem, constraint 1 u(t) 1
Hamiltonian H and adjoint equations are as in Case (a).
The free control is given by u
free
(x, ) = 2
2
.
Structure of optimal control:
u(t) =

1 for 0 t t
1
2
2
(t) for t
1
t t
2
1 for t
2
t t
3
2
2
(t) for t
3
t t
f

Junction conditions: Continuity of the control implies


u(t
k
) = 2
2
(t
k
) = 1 | 1 | 1 , k = 1, 2, 3 .
Shooting method for solving the boundary value problem for (x, ):
Determine shooting vector s = ((0), t
1
, t
2
, t
3
) R
2+3
that
satises 2 terminal conditions (t
f
) = 0 and 3 junction conditions.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Rayleigh problem with control constraint | u(t) | 1
-8
-6
-4
-2
0
2
4
6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x
1

,

x
2
state variables x
1
, x
2
-5
-4
-3
-2
-1
0
1
2
3
4
5
-7 -6 -5 -4 -3 -2 -1 0 1
(
x
1
,
x
2
)
phaseportrait (x
1
,x
2
)
-1
-0.5
0
0.5
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u
optimal control u
-14
-12
-10
-8
-6
-4
-2
0
2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
l
a
m
b
d
a
1

,

l
a
m
b
d
a
2
adjoint variables lambda
1
, lambda
2
Note: Hamiltonian is regular, control u(t) is continuous.
Junction conditions: 2
2
(t
k
) = 1 | 1 | 1 , k = 1, 2, 3
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case I (c) : Rayleigh problem, 1 u + x
1
/6 0
Augmented (normal) Hamiltonian:
H(x, , , u) = u
2
+ x
2
1
+
1
x
2
+
2
(x
1
+ x
2
(1.4 0.14x
2
2
) + 4u) +(u + x
1
/6)
Adjoint Equations:

1
= H
x
1
= 2x
1
+
2
/6 ,
1
(t
f
) = 0,

2
= H
x
2
=
1

2
(1.4 0.42x
2
2
)
2
(t
f
) = 0,
Free control : u
free
(x, ) = 2
2
.
Boundary control : u
b
(x) = x
1
/6 for {1, 0} .
Multiplier :
= (x, ) = H
u
(x, , u
b
(x)) / c
u
(x, u
b
(x)) = 2u
b
(x) + 4
2
.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case I (c) : Rayleigh problem, 1 u + x
1
/6 0
-1.5
-1
-0.5
0
0.5
1
1.5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u
optimal control u
-1
-0.8
-0.6
-0.4
-0.2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
C
(
x
,
u
)

=

u

+

x
1
/
6

mixed constraint -1 <= u + x
1
/6 <= 0
-8
-6
-4
-2
0
2
4
6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x
1

,

x
2
state variables x
1
, x
2
-30
-25
-20
-15
-10
-5
0
5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
m
u

multiplier for constraint -1 <= u + x
1
/6 <= 0
Hamiltonian is regular, control u(t) is continuous.
Junction conditions: 2(t
k
) = x
1
(t
k
)/6 , {0, 1}.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case I (c) : Rayleigh problem, structure of optimal control
for mixed constraint 1 u + x
1
/6 0
-1
-0.8
-0.6
-0.4
-0.2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
C
(
x
,
u
)

=

u

+

x
1
/
6

mixed constraint -1 <= u + x
1
/6 <= 0
u(t) =

x
1
/6 for 0 t t
1
2
2
(t) for t
1
t t
2
1 x
1
/6 for t
2
t t
3
2
2
(t) for t
3
t t
4
x
1
/6 for t
4
t t
5
2
2
(t) for t
5
t t
f

Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : control u appears linearly
CASE II : Control appears linearly in the cost functional, dynamics
and mixed control-state constraint. Let u be scalar.
Dynamics and Boundary Conditions
x(t) = f
1
(x(t)) + f
2
(x(t)) u(t), a.e. t [0, t
f
],
x(0) = x
0
R
n
, (x(t
f
)) = 0 R
k
,
Mixed Control-State Constraints
c
1
(x(t)) + c
2
(x(t)) u(t) t [0, t
f
]. c
1
, c
2
: R
n
R
Minimize
J(u, x) = g(x(t
f
)) +

t
f
0
( f
01
(x(t)) + f
02
(x(t) ) u(t) dt
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : Hamiltonian and switching function
Normal Hamiltonian
H(x, , u) = f
01
(x) +f
1
(x) + [ f
02
(x) +f
2
(x) ] u .
Augmented Hamiltonian
H(x, , , u) = H(x, , u) +(c
1
(x) + c
2
(x) u)
The optimal control u(t) solves the minimization problem
min{ H(x(t), (t), u) | c
1
(x(t)) + c
2
(x(t)) u }
Dene the switching function
(x, ) = H
u
(x, , u) = f
02
(x) +f
2
(x) , (t) = (x(t), (t)) .
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : Hamiltonian
The minimum condition is equivalent to the minimization problem
min{ (t) u) | c
1
(x(t)) + c
2
(x(t)) u }
We deduce the control law
c
1
(x(t))+c
2
(x(t))u(t) =

, if (t) c
2
(x(t)) > 0
, if (t) c
2
(x(t)) < 0
undetermined if (t) 0

The control u is called bang-bang in an interval I [0, t


f
], if
(t) c
2
(x(t)) = 0 for all t I . The control u is called singular in
an interval I
sing
[0, t
f
], if (t) c
2
(x(t)) 0 for all t I
sing
.
For the control constraint u(t) with c
1
(x) = 0, c
2
(x) = 1
we get the classical control law
u(t) =

, if (t) > 0
, if (t) < 0
undetermined , if (t) 0

Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Bang-Bang and Singular Controls
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : Rayleigh problem with 1 u(t) 1
Rayleigh problem with control appearing linearly
Minimize J(x, u) =
t
f

0
(x
2
1
+ x
2
2
) dt (t
f
= 4.5)
subject to
x
1
= x
2
, x
1
(0) = 5 ,
x
2
= x
1
+ x
2
(1.4 0.14x
2
2
) + 4u , x
2
(0) = 5,
1 u(t) 1 .
Adjoint Equations:

1
= H
x
1
= 2x
1
+
2
,
1
(t
f
) = 0,

2
= H
x
2
= 2x
2

2
(1.4 0.42x
2
2
) ,
2
(t
f
) = 0,
The switching function (t) = H
u
(t) = 4
2
(t) gives the
control law
u(t) = sign (
2
(t))
.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : Rayleigh problem, 1 u(t) 1
-1
-0.5
0
0.5
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u
optimal control u
-8
-6
-4
-2
0
2
4
6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x
1

,

x
2
state variables x
1
, x
2
-1
-0.5
0
0.5
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u

,

l
a
m
b
d
a
2
/
1
0
control u and (scaled) switching function
-18
-16
-14
-12
-10
-8
-6
-4
-2
0
2
4
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
l
a
m
b
d
a
1

,

l
a
m
b
d
a
2
adjoint variables lambda
1
, lambda
2
Control u(t) is bang-bang-singular.
Switching conditions: (t
1
) = 0 ,
2
(t) 0 t [t
2
, t
f
].
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : Rayleigh problem, u + x
1
/6 0
Minimize J(x, u) =
t
f

0
(x
2
1
+ x
2
2
) dt (t
f
= 4.5)
subject to
x
1
= x
2
, x
1
(0) = 5 ,
x
2
= x
1
+ x
2
(1.4 0.14x
2
2
) + 4u , x
2
(0) = 5,
and the mixed control-state constraint
u(t) + x
1
(t)/6 0 0 t t
f
.
Adjoint Equations:

1
= H
x
1
= 2x
1
+
2
/6 ,
1
(t
f
) = 0,

2
= H
x
2
= 2x
2

2
(1.4 0.42x
2
2
) ,
2
(t
f
) = 0,
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Control law for u + x
1
/6 0
The switching function is (t) = H
u
(t) = 4
2
(t) .
In view of c
2
(x) 1 we have the control law
u + x
1
/6 =

< 0 , if
2
(t) > 0
0 , if
2
(t) < 0
undetermined , if
2
(t) 0

Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : Rayleigh problem, 1 u + x
1
/6 0
-1.5
-1
-0.5
0
0.5
1
1.5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u
optimal control u
-8
-6
-4
-2
0
2
4
6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x
1

,

x
2
state variables x
1
, x
2
-2
-1.5
-1
-0.5
0
0.5
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u

,

l
a
m
b
d
a
2
/
1
0
C(x,u) and (scaled) switching function
-40
-30
-20
-10
0
10
20
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
m
u

multiplier for constraint -1 <= u + x
1
/6 <= 0
Note: constraint u(t) + x
1
(t)/6 is bang-bang.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Case II : Rayleigh problem, 2 u + x
1
/6 0
-2
-1.5
-1
-0.5
0
0.5
1
1.5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
u
optimal control u
-8
-6
-4
-2
0
2
4
6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x
1

,

x
2
state variables x
1
, x
2
-2
-1.5
-1
-0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
c
(
x
,
u
)

,

l
a
m
b
d
a
2
/
1
0
c(x,u) and (scaled) switching function
-40
-35
-30
-25
-20
-15
-10
-5
0
5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
m
u

multiplier for constraint -1 <= u + x
1
/6 <= 0
Note: constraint u(t) + x
1
(t)/6 is bang-singular-bang-singular.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Fishing, Clark, Clarke, Munro
Colin W. Clark, Frank H. Clarke, Gordon R. Munro:
The optimal exploutation of renewable resource stock: problem of
irreversible investment, Econometric 47, pp. 2547 (1979).
State variables and control variables:
x(t) : population biomass at time t [0, t
f
] ,
renewable resource, e.g., sh,
K(t) : amount of capital invested in the shery,
e.g., number of standardized shing vessels available,
E(t) : shing eort (control), h(t) = E(t)x(t) is harvest rate ,
I (t) : investment rate (control),
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Fishing: optimal control model
Dynamics in [0, t
f
] ( here: a = 1, b = 5, = 0 )
x(t) = a x(t) (1 x(t)/b) E(t) x(t) , x(0) = x
0
,

K(t) = I (t) K(t) , K(0) = K


0
.
Mixed Control-State Constraint and Control Constraint
0 E(t) K(t) , 0 I (t) I
max
, t [0, t
f
],
Maximize benet ( parameters: r = 0.05, c
E
= 2, c
I
= 1.1 )
J(u, x) =

t
f
0
exp(r t)( p E(t) x(t) c
E
E(t) c
I
I (t) ) dt
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Fishing: x
0
= 0.5, K
0
= 0.2, I
max
= 0.5
0
0.5
1
1.5
2
0 2 4 6 8 10
controls E, I and state variables 0.5*x , K
"E.dat"
"I.dat"
"K.dat"
"x-scal.dat"
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Fishing: x
0
= 0.5, K
0
= 0.6, I
max
= 0.5
0
0.5
1
1.5
2
0 2 4 6 8 10
controls E, I and state variables 0.5*x , K
"E.dat"
"I.dat"
"K.dat"
"x-scal.dat"
Fishing rate : E(t) = 0, E(t) = singular, E(t) = K(t).
Investment rate : I (t) = 0, I (t) = I
max
, I (t) = 0.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Fishing: x
0
= 0.2, K
0
= 0.1, I
max
= 0.1
0
0.5
1
1.5
2
0 2 4 6 8 10
controls E, I and state variables 0.5*x , K
"E.dat"
"I.dat"
"K.dat"
"x-scal.dat"
Fishing rate : E(t) = 0, E(t) = K(t), E(t) singular, E(t) = K(t).
Investment rate : 2 arcs with I (t) = I
max
.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1
Optimal Control Problems with Control and State Constraints Numrical Method: Discretize and Optimize Theory of Optimal Control Problems with Mixed Control-State Constraints Example: Rayleigh Problem with Dierent Constraints and Objectives Example: Optimal Exploitation of Renewable Resources
Optimal Fishing: x
0
= 1.0, K
0
= 0.5, I
max
= 3
0
0.5
1
1.5
2
2.5
3
3.5
4
0 2 4 6 8 10
controls E, I and state variables 0.5*x , K
"E.dat"
"I.dat"
"K.dat"
"x-scal.dat"
Fishing rate : E(t) = 0, E(t) singular E(t) = K(t),
Investment rate : 1 impulse with I (t) = I
max
.
Helmut Maurer University of M unster, Germany Institute of Computational and Applied Mathematics Tutorial on Control and State Constrained Optimal Control Problems [0.5mm] Part 2 : Mixed Control-State Constraints
i
n
r
i
a
-
0
0
6
2
9
5
1
8
,

v
e
r
s
i
o
n

1

-

6

O
c
t

2
0
1
1

Potrebbero piacerti anche