Post on 01-Sep-2018
transcript
Optimal Control
Lecture
Prof. Daniela Iacoviello
Department of Computer, Control, and Management Engineering Antonio Ruberti
Sapienza University of Rome
12/10/2016 Controllo nei sistemi biologici
Lecture 1
Pagina 2
Prof. Daniela Iacoviello
Department of computer, control and management
Engineering Antonio Ruberti
Office: A219 Via Ariosto 25
http://www.dis.uniroma1.it/~iacoviel
Prof.Daniela Iacoviello- Optimal Control 2
Grading
Project + oral exam
3
Grading
Project+ oral exam
Example of project (1-3 Students):
- Read a paper on an optimal control problem
- Study: background, motivations, model, optimal control, solution,
results
- Simulations
- Conclusions,
- References
You must give me, before the date of the exam:
- A .doc document
- A power point presentation
- Matlab simulation files
Oral exam: Discussion of the project AND on the topics of the lectures
4
Some projects studied in 2014-15 and 2015-16 1
Application Of Optimal Control To Malaria: Strategies And Simulations
Performance Compare Between Lqr And Pid Control Of Dc Motor
Optimal Low-thrust Leo (Low-earth Orbit) To Geo (Geosynchronous-earth Orbit)
Circular Orbit Transfer
Controllo Ottimo Di Una Turbina Eolica A Velocità Variabile Attraverso Il Metodo
dell'inseguimento Ottimo A Regime Permanente
Optimalcontrol In Dielectrophoresis
On The Design Of P.I.D. Controllers Using Optimal Linear Regulator Theory
Rocket Railroad Car
Optimal Control Of Quadrotor Altitude Using Linear Quadratic Regulator
Optimal Control Of An Inverted Pendulum
Glucose Optimal Control System In Diabetes Treatment
………
5
Some projects studied in 2014-15 and 2015-16 2
Optimal Control Of Shell And Tube Heat Exchanger
Optimal Control Analysis Of A Mathematical Model For Unemployment
Time optimal control of an automatic Cableway
Glucose Optimal Control System In Diabetes Treatment
Optimal Control Of Shell And Tube Heat Exchanger
Optimal Control Analysis Of A Mathematical Model For Unemployment
Time Optimal Control Of An Automatic Cableway
Optimal Control Project On Arduino Managed Module For Automatic Ventilation Of
Vehicle Interiors
Optimal Control For A Suspension Of A Quarter Car Model
………
6
THESE SLIDES ARE NOT SUFFICIENT
FOR THE EXAM: YOU MUST STUDY ON THE BOOKS
Prof.Daniela Iacoviello- Optimal Control
Part of the slides has been taken from the References indicated below
7
References B.D.O.Anderson, J.B.Moore, Optimal control, Prentice Hall, 1989 C.Bruni, G. Di Pillo, Metodi Variazionali per il controllo ottimo, Masson , 1993 L. Evans, An introduction to mathematical optimal control theory, 1983 H.Kwakernaak , R.Sivan, Linear Optimal Control Systems, Wiley Interscience, 1972 D. E. Kirk, "Optimal Control Theory: An Introduction, New York, NY: Dover, 2004 D. Liberzon, "Calculus of Variations and Optimal Control Theory: A Concise Introduction", Princeton University Press, 2011 How, Jonathan, Principles of optimal control, Spring 2008. (MIT OpenCourseWare: Massachusetts Institute of Technology). License: Creative Commons BY-NC-SA.
Prof.Daniela Iacoviello- Optimal Control 8
Course outline
• Introduction to optimal control
• Nonlinear optimization
• Dynamic programming
• Calculus of variations
• Calculus of variations and optimal control
• LQ problem
• Minimum time problem
Prof.Daniela Iacoviello- Optimal Control 9
Course outline
• Introduction to optimal control
• Nonlinear optimization
• Dynamic programming
• Calculus of variations
• Calculus of variations and optimal control
• LQ problem
• Minimum time problem
Prof.Daniela Iacoviello- Optimal Control 10
First course on linear systems
(free evolution, transition matrix, gramian
matrix,…)
Background
Prof.Daniela Iacoviello- Optimal Control 11
Notations
nRtx )( State variable
pRtu )( Control variable
RRRRf pn ::
Function (function with second derivative continuous a.e.)
2C
Prof.Daniela Iacoviello- Optimal Control 12
Introduction
Optimal control is one particular branch of modern control that sets out to provide analytical designs of a special appealing type.
The system, that is the end result of an optimal design, is supposed to be the best possible system of a particular type
A cost index is introduced Prof.Daniela Iacoviello- Optimal Control 13
Introduction
Linear optimal control is a special sort of optimal control:
the plant that is controlled is assumed linear
the controller is constrained to be linear
Linear controllers are achieved by working with quadratic cost indices
Prof.Daniela Iacoviello- Optimal Control 14
Introduction
Advantages of linear optimal control
Linear optimal control may be applied to nonlinear systems
Nearly all linear optimal control problems have computational solutions
The computational procedures required for linear optimal design may often be carried over to nonlinear optimal problems
Prof.Daniela Iacoviello- Optimal Control 15
History
Prof.Daniela Iacoviello- Optimal Control 16
History
In 1696 Bernoulli posed the
Brachistochrone problem to his
contemporaries: “it seems to be the
first problem which explicitely dealt
with optimally controlling the path or or the behaviour of a dynamical
system”.
Prof.Daniela Iacoviello- Optimal Control 17
History
Suppose a particle of mass M moves
from A to B under the influence of
gravity.
What is the shape of the wire from
which the time to get from A to B
is minimized?
Prof.Daniela Iacoviello- Optimal Control 18
Motivations
Example 1 (Evans 1983)
Reproductive strategies in social insects
Let us consider the model describing how social insects
(for example bees) interact:
represents the number of workers at time t
represents the number of queens
represents the fraction of colony effort
devoted to increasing work force
lenght of the season
)(tw
)(tq
)(tu
TProf.Daniela Iacoviello- Optimal Control 19
0)0(
)()()()()(
ww
twtutsbtwtw
Evolution of the worker population
Death rate Known rate at which each worker contributes to the bee economy
0)0(
)()()(1)()(
twtstuctqtq
Evolution of the Population of queens
Constraint for the control: 1)(0 tu
Prof.Daniela Iacoviello- Optimal Control 20
The bees goal is to find the control that maximizes the number of queens at time T: The solution is a bang- bang control
)()( TqtuJ
Prof.Daniela Iacoviello- Optimal Control 21
Motivations Example 2 (Evans 1983…and everywhere!)
A moon lander
Aim: bring a spacecraft to a soft landing on the lunar surface, using the least amount of fuel
represents the height at time t
represents the velocity =
represents the mass of spacecraft
represents thrust at time t
We assume
)(th
)(tv
)(tm
Prof.Daniela Iacoviello- Optimal Control
)(th
)(tu
1)(0 tu
22
Considere the Newton’s law:
We want to minimize the amount of fuel
that is maximize the amount remaining once we have
landed
where
is the first time
Prof.Daniela Iacoviello- Optimal Control
ugmthm )(
0)(0)()()(
)()(
)(
)()(
tmthtkutm
tvth
tm
tugtv
)())(( muJ
0)(0)( vh
23
Analysis of linear control systems
Essential components of a control system
The plant
One or more sensors
The controller
Controller Plant
Sensor
Prof.Daniela Iacoviello- Optimal Control 24
Analysis of linear control systems
Feedback: the actual operation of the control system is compared to the desired operation and the input to the plant is adjusted on the basis of this comparison.
Feedback control systems are able to operate satisfactorily despite adverse conditions, such as disturbances and variations in plant properties
Prof.Daniela Iacoviello- Optimal Control 25
Course outline
• Introduction to optimal control
• Nonlinear optimization
• Dynamic programming
• Calculus of variations
• Calculus of variations and optimal control
Prof.Daniela Iacoviello- Optimal Control 26
Definitions
Consider a function
And
denotes the Eucledian norm
A point is a local minimum of over
If
Prof.Daniela Iacoviello- Optimal Control
RRf n ::
nRD
Dx *f
nRD
)()(
0
*
*
xfxf
xxsatisfyingDxallforthatsuch
27
Definitions
Consider a function
And
denotes the Eucledian norm
A point is a strict local minimum of over
If
Prof.Daniela Iacoviello- Optimal Control
RRf n ::
nRD
Dx * fnRD
**
*
),()(
0
xxxfxf
xxsatisfyingDxallforthatsuch
28
Definitions
Consider a function
And
denotes the Eucledian norm
A point is a global minimum of over
If
Prof.Daniela Iacoviello- Optimal Control
RRf n ::
nRD
Dx * f nRD
)()( * xfxf
Dxallfor
29
Definitions
The notions of a local/strict/global maximum are defined
similarly
If a point is either a maximum or a minimum
is called an extremum
Prof.Daniela Iacoviello- Optimal Control 30
Unconstrained optimization - first order necessary conditions
All points sufficiently near in are in
Assume and its local minimum. Let an arbitrary vector.
Being in the unconstrained case:
Let’s consider:
0 is a minimum of g
Prof.Daniela Iacoviello- Optimal Control
x
nR
DnR
1Cf *x
)(:)( * xfg
0* toenoughcloseRDx
*x
31
First order Taylor expansion of g around
Prof.Daniela Iacoviello- Optimal Control
0
0)(
lim),()0(')0()(0
ooggg
0)0(' g
Unconstrained optimization - first order necessary conditions
32
Proof: assume
For these values of
If we restrict to have the opposite sign to
Contraddiction
Prof.Daniela Iacoviello- Optimal Control
0)0(' g
)0(')(
0
gofor
thatsoenoughsmall
)0(')0(')0()( gggg
Unconstrained optimization - first order necessary conditions
33
)0('g
)0(')0(')0()( gggg 0)0()( gg
d was arbitrary
First order necessary condition for
optimality
Prof.Daniela Iacoviello- Optimal Control
fofgradienttheisfffwherexfgT
xx n
1:)()(' *
0)()0(' * xfg
0)( * xf
Unconstrained optimization - first order necessary conditions
34
A point satisfying this condition is a stationary point
Prof.Daniela Iacoviello- Optimal Control
*x
Unconstrained optimization - first order necessary conditions
35
Unconstrained optimization- second order conditions
Assume and its local minimum. Let an
arbitrary vector.
Second order Taylor expansion of g around
Since
Prof.Daniela Iacoviello- Optimal Control
nR2Cf *x
0
0)(
lim),()0(''2
1)0(')0()(
2
2
0
2
oogggg
0)0(' g
0)0('' g
36
Unconstrained optimization- second order conditions
Proof: suppose
For these values of
contraddiction
Prof.Daniela Iacoviello- Optimal Control
0)0('' g
22 )0(''2
1)(
0
gofor
thatsoenoughsmall
37
0)0()( gg
Unconstrained optimization- second order conditions
By differentiating both sides with respect to
Second order necessary condition for optimality
Prof.Daniela Iacoviello- Optimal Control
n
i
ix xfgi
1
* )()('
)()()0(''
)()(''
*2
1,
*
1,
*
xfxfg
xfg
Tj
n
ji
ixx
j
n
ji
ixx
ji
ji
nnn
n
xxxx
xxxx
ff
ff
f
1
111
2
Hessian matrix
38
0)( *2 xf
Unconstrained optimization- second order conditions
Remark:
The second order condition distinguishes minima from
maxima:
At a local maximum the Hessian must be negative
semidefinite
At a local minimum the Hessian must be positive
semidefinite
Prof.Daniela Iacoviello- Optimal Control 39
Unconstrained optimization- second order conditions
Let and
is a strict local minimum of f
Prof.Daniela Iacoviello- Optimal Control
0)( * xf2Cf 0)( *2 xf
*x
40
Global minimum
Weierstrass Theorem
Let f be a continuous function and D a compact set
there exist a global minimum of f over D
Prof.Daniela Iacoviello- Optimal Control 41
Constrained optimization
Let
Equality constraints
Inequality constraints
Regularity condition:
Lagrangian function
If the stationary point is called normal and we can assume .
Prof.Daniela Iacoviello- Optimal Control
1, CfRD n 1,:,0)( ChRRhxh p
1,:,0)( CgRRgxg q
a
a
a
x
a
qg
ofconstrainactivethearegwhere
qpx
ghrank
dimensionwith
,
*
)()()(,,, 00 xgxhxfxL TT
*x00
10
42
From now on and therefore the Lagrangian is
If there are only equality constraints the are called
Lagrange multipliers
The inequality multipliers are called Kuhn – Tucker
multipliers
Prof.Daniela Iacoviello- Optimal Control
Constrained optimization
i
10
)()()(,, xgxhxfxL TT
43
Constrained optimization
First order necessary conditions for constrained optimality:
Let and
The necessary conditions for to be a constrained local
minimum are
If the functions f and g are convex and the functions h are
linear these conditions are necessary and sufficient!!!
Prof.Daniela Iacoviello- Optimal Control
i
ixg
x
L
i
ii
T
T
x
0
,0)(
0
*
*
Dx * 1,, Cghf
*x
44
Constrained optimization
Second order sufficient conditions for constrained optimality:
Let and and assume the conditions
is a strict constrained local minimum if
Prof.Daniela Iacoviello- Optimal Control
ixgx
Liii
T
T
x
0,0)(0 *
*
Dx * 2,, Cghf
*x
pidx
xdhthatsuch
x
L
x
i
x
T ,...,1,0)(
0**
2
2
45
Function spaces
Functional
Vector space V,
is a local minimum of J over A if there exists an
Prof.Daniela Iacoviello- Optimal Control
RVJ :
VA
Az *
)()(
0
*
*
zJzJ
zzsatisfyingAzallforthatsuch
46
Consider function in V of the form
The first variation of J at z is the linear function
such that
First order necessary condition for optimality:
For all admissible perturbation we must have:
Prof.Daniela Iacoviello- Optimal Control
RVz ,,
RVJz
:
and
)()()()( oJzJzJ z
0)(* z
J
Function spaces
47
A quadratic form is the second variation
of J at z if
we have:
second order necessary condition for optimality:
If is a local minimum of J over
for all admissible perturbation we must have:
Prof.Daniela Iacoviello- Optimal Control
RVJz
:2
and
)()()()()( 222 oJJzJzJ zz
0)(*
2 z
J
Az * VA
Function spaces
48
The Weierstrass Theorem is still valid
If J is a convex functional and is a convex set
A local minimum is automatically a global one and the first
order condition are necessary and sufficient condition for
a minimum
Prof.Daniela Iacoviello- Optimal Control
VA
Function spaces
49