Principles of Optimal Control
AUTOMATIC CONTROL AND SYSTEM THEORY
PRINCIPLES of OPTIMAL CONTROL
Gianluca Palli
Dipartimento di Ingegneria dellEnergia Elettrica e dellInformazione (DEI)
Universit di Bologna
Email:
[email protected] G. Palli (DEI) Automatic Control & System Theory 1
Principles of Optimal Control
Control Systems Design
Classic techniques based on:
Time-domain specifications (rise time, overshoot, steady-state error,
)
Frequency-domain specifications (phase and/or amplitude margin)
Iterative process which (non univocal) solution is often
determined by trial and error
Drawbacks:
Cannot be easily extended to MIMO systems
The control energy is not explicitely considered
The optimal solution cannot be determined
Cannot be applied to non-stationary (time-variant) systems
If the specifications are not satisfied, it is not possible to determine
because of the limits of the optimization technique or because
specifications incompatibility
G. Palli (DEI) Automatic Control & System Theory 2
Principles of Optimal Control
Control Systems Design
Modern techniques Based on the definition of a performance index (or
objective functional) that must be minimized, for example:
The performance of the system are the defined as optimal with respect to the
performance index.
In general, different requirements (sometimes confligting) are considered in
the definition of the performance index obtaining in this way compromise
solutions.
Similar optimization problems can be found in operative research.
G. Palli (DEI) Automatic Control & System Theory 3
Principles of Optimal Control
Control Systems Design
Control law
design
Open-loop Closed-loop
control control
State State
estimation feedback
Deterministic Stochastic
case case
Optimization
problems
G. Palli (DEI) Automatic Control & System Theory 4
Principles of Optimal Control
Optimal Control
Given the dynamic system
(1)
(2)
Constraints on the final state
A general expression for the performance index can be:
(3)
Cost of the final state Cost of the state trajectory in [t0, tf]
or running cost
Optimal control problem: computing uo(t) in [t0, tf] that minimize the
performance index J.
G. Palli (DEI) Automatic Control & System Theory 5
Principles of Optimal Control
Optimal Control
The equation (2) (algebraic and vectorial, with q n relations) is not
strictly required in the problem statement, and it represents the set of
admissible states at the final time tf.
A solution exists if at least one of the elements [x(tf), tf] is reachable
from x0.
In general, the final time tf is free, but some optimization problem can be
defined over a desired final time.
G. Palli (DEI) Automatic Control & System Theory 6
Principles of Optimal Control
Optimal Control
To derive necessary conditions for the optimum, we will perform the
calculus of variations on the cost function (3) subject to the
constraints eq. (1) and (2).
To this end, we define the modified cost function using the Lagrange
multipliers (t) Rn and Rq
Let us define the Hamiltonian as:
Performance index System dynamics
(Lagrangian function) Costate (or adjoined) variables
of dimension n (the same as x)
G. Palli (DEI) Automatic Control & System Theory 7
Principles of Optimal Control
Optimal Control
The variation of is given by assuming independent variations of
u(t), x(t), (t), and tf:
Integrating by parts for yields
G. Palli (DEI) Automatic Control & System Theory 8
Principles of Optimal Control
Optimal Control
An extremum of is achieved when for all independent
variations u, x, , and tf.
It follows that necessary condition for the problem (1)-(3) to have an optimal
solution uo(t) are
Description Equation Variation
Final state constraint
State equation
Costate equation
Input stationarity
Boundary conditions
G. Palli (DEI) Automatic Control & System Theory 9
Principles of Optimal Control
Optimal Control
Conditions for the solution to work:
The control function must be piecewise continuous (some jumps and/or
discountinuities are admissible);
The state variables must be continuous and piecewise differentiable;
f(.) and f0(.) first-order differentiable w.r.t. the state variable and t, but
not necessarily w.r.t. the control variable u.
Finite initial conditions for the state variables are given.
If no finite terminal value for state variable at t=tf is given, then (t0) = 0.
G. Palli (DEI) Automatic Control & System Theory 10
Principles of Optimal Control
Optimal Control
The following are defined Euler-Lagrange equations:
The first equation is called adjoined system, since it defines the costate (or adjoined
variable) dynamics.
The second equation is called stationarity condition.
If the final time tf is not specified, the following relation holds
NOTE: initial conditions on x (x(t0) = x0) and final condizions on ((tf)) are given,
that is in two different time instants (two-point boundary problem). This issue
makes the integration of these equations difficult to be solved.
G. Palli (DEI) Automatic Control & System Theory 11
Principles of Optimal Control
Optimal Control
In the stationary case the previous condition becomes
Moreover, from the definition of the Hamiltonian
but:
H is constant over
the optimal trajectory
G. Palli (DEI) Automatic Control & System Theory 12
Principles of Optimal Control
Optimal Control
There are some interesting cases for the optimal control:
1) No constraint on the final state x(tf) are given
2) The constraints are independent algebraic functions of the state variables
3) The performance index is given by T = tf - t0 (minimum-time control)
4) LQ (Linear Quadratic) problem
G. Palli (DEI) Automatic Control & System Theory 13
Principles of Optimal Control
Optimal Control without Final Constraints
The set of the admissible state at t=tf is the whole state space, that is the equation
(2) is not present in the problem definition.
The Euler-Lagrange equations (and the boundery conditions) can be semplified as:
If the final time tf is not specified, the following relation holds:
G. Palli (DEI) Automatic Control & System Theory 14
Principles of Optimal Control
Optimal Control without Final Constraints
Example: Let us consider a mass m in rectilinear motion and a force f applied to
m in the direction of the motion. At the initial time t0 the position x(t0) = x10 and the
velocity x20 are known.
m
f
x
We want to computed the force f(t) in [t0, tf] with tf = 10 s, such that at the final
time tf the mass m is:
Close enough to the origin;
Limiting the control action.
with u(t) = f(t)/m
G. Palli (DEI) Automatic Control & System Theory 15
Principles of Optimal Control
Optimal Control without Final Constraints
On the basis of the specifications, the performance can be defined as:
where c1 and c2 are suitable constants defined to quantify the specifications.
We assume c1 = c2 = 1 and x10 = 1 m, x20 = 1 m/s.
A possible control law u(t) could be given by solving the differential equation of
the system. By imposing x(tf) = 0 and a constant input u, the integration of the
differential functions provides:
G. Palli (DEI) Automatic Control & System Theory 16
Principles of Optimal Control
Optimal Control without Final Constraints
In this case we are not considering the cost of the control action (this control law
could be optimal if c2 =0)
Then, we may suppose that different values of u give a smaller cost J. For
example:
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
-0.24 -0.235 -0.23 -0.225 -0.22 -0.215 -0.21 -0.205 -0.2 -0.195
G. Palli (DEI) Automatic Control & System Theory 17
Principles of Optimal Control
Optimal Control without Final Constraints
From the Hamiltonian function it follows
with c1 = c2 = 1
and
G. Palli (DEI) Automatic Control & System Theory 18
Principles of Optimal Control
Optimal Control without Final Constraints
The final state can be computed by integrating the system equations:
Therefore, the optimal control law is
It follows that:
G. Palli (DEI) Automatic Control & System Theory 19
Principles of Optimal Control
Optimal Control with Final-Time Constraints
In some cases, the constraints on the final state given by eq. (2) can be
expressed as independent constraints on the single state variables
(separated constraints). Then, it follows:
The boundary conditions for t = tf in the Euler-Lagrange equations are
i are suitable coefficients to be determined
G. Palli (DEI) Automatic Control & System Theory 20
Principles of Optimal Control
Optimal Control with Final-Time Constraints
Example: Let us consider again the mass m as before, in which the velocity
at the final time tf is assigned x2(tf) = x2f
Therefore, the optimal control problem is:
The performace index is defined as:
tf is assigned
Only this term is used
G. Palli (DEI) Automatic Control & System Theory 21
Principles of Optimal Control
Optimal Control with Final-Time Constraints
From the Euler-Lagrange equations we obtain:
By integration of the differential equations
is constant
G. Palli (DEI) Automatic Control & System Theory 22
Principles of Optimal Control
Minimum-Time Optimal Control
An optimal control problem is said to be a minimum time problem if the
performance index is given by the duration of the time interval [t0 tf] during which
the control is applied.
The problem can be then written as
(1)
(2)
and the performance index is simply:
It is important to note that, in general, in this problem the final state is defined
(through the constraint eq. (2)) since otherwise the final condition to be reached is
not defined and the problem admits the trivial solution tf = t0, xf = x0.
G. Palli (DEI) Automatic Control & System Theory 23
Principles of Optimal Control
Minimum-Time Optimal Control
The Hamiltonian becomes
and the Euler-Lagrange equations
when tf is not specified, the following condition must be satisfied
G. Palli (DEI) Automatic Control & System Theory 24