Optimal Control Lecture 1 Solmaz S. Kia Mechanical and Aerospace Engineering Dept. University of California Irvine [email protected] 1 / 13
Optimal Control
Lecture 1
Solmaz S. Kia
Mechanical and Aerospace Engineering Dept.
University of California Irvine
1 / 13
Objective of control theory
Control theory is a branch of applied mathematics that involves basic principles
underlying the analysis and design of (control) systems/processes.
The objective in control theory
stabilization, regulation, tracking
Impose performance on system behavior.
2 / 13
Objective of control theory
Control theory is a branch of applied mathematics that involves basic principles
underlying the analysis and design of (control) systems/processes.
The objective in control theory
stabilization, regulation, tracking
Impose performance on system behavior.
2 / 13
Objective of control theory
Control theory is a branch of applied mathematics that involves basic principles
underlying the analysis and design of (control) systems/processes.
The objective in control theory
stabilization, regulation, tracking
Impose performance on system behavior.
2 / 13
Objective of control theory
Control theory is a branch of applied mathematics that involves basic principles
underlying the analysis and design of (control) systems/processes.
The objective in control theory
stabilization, regulation, tracking
Impose performance on system behavior.
2 / 13
Optimal control
I Performance measures considering step or ramp response:
• rise-time (tr)
• settling time (ts)
• peak overshoot (MP)
• gain and phase margin and
bandwidth
• steady state error
mostly for SISO systems
I In this course:
• more complex performance measures, perhaps more closely related to the
physical aspects of the system
minimum fuelminimum control effortminimum time
• satisfy some constraints on control and states of the system while optimizing
performance measure
3 / 13
Optimal control
I Performance measures considering step or ramp response:
• rise-time (tr)
• settling time (ts)
• peak overshoot (MP)
• gain and phase margin and
bandwidth
• steady state error
mostly for SISO systems
I In this course:
• more complex performance measures, perhaps more closely related to the
physical aspects of the system
minimum fuelminimum control effortminimum time
• satisfy some constraints on control and states of the system while optimizing
performance measure
3 / 13
Optimal control
I Performance measures considering step or ramp response:
• rise-time (tr)
• settling time (ts)
• peak overshoot (MP)
• gain and phase margin and
bandwidth
• steady state error
mostly for SISO systems
I In this course:
• more complex performance measures, perhaps more closely related to the
physical aspects of the system
minimum fuelminimum control effortminimum time
• satisfy some constraints on control and states of the system while optimizing
performance measure
3 / 13
Optimal control
The objective of optimal control is to determine the control signals that will
cause a process to satisfy the physical constraints and at the same time minimize
(or maximize) some performance criterion.
The following three elements constitute the optimal control formulation|:
model (a mathematical description) of the process/system to be controlled
mathematical description of the (physical) constraints of the system
a performance measure and its mathematical description
4 / 13
Performance measures
Minimum-time problem: To transfer a system from arbitrary initial state
x(t0) = x0 to a specified target set S in minimum time
J = tf - t0 =
Ztf
t0
dt, (1)
where tf is the first instant of time when x(t) and S intersect.
For discrete-time systems, minimum-time performance can be cast as
J =N =XN-1
k=01.
5 / 13
Performance measures
Minimum-time problem: To transfer a system from arbitrary initial state
x(t0) = x0 to a specified target set S in minimum time
J = tf - t0 =
Ztf
t0
dt, (1)
where tf is the first instant of time when x(t) and S intersect.
For discrete-time systems, minimum-time performance can be cast as
J =N =XN-1
k=01.
5 / 13
Performance measures
Terminal control problem: to minimize the deviation of the final state of a system
from its desired value r(tf) 2 Rn
J =Xn
i=1(xi(tf)- ri(tf))
2 = (x(tf)- r(tf)>(x(tf)- r(tf)) = kx(tf)- r(tf)k2.
Both positive and negative deviations are undesirable.
Given the system model and the constrains, x(tf) = r(tf) may not be
accomplished.
A ballistic missile aimed at target S.
In this case, we may wish to put more weight or penalty on the deviation of
certain state more than others.
J = (x(tf)- r(tf))>H (x(tf)- r(tf)) = kx(tf)- r(tf)k2H, H > 0,
6 / 13
Performance measures
Terminal control problem: to minimize the deviation of the final state of a system
from its desired value r(tf) 2 Rn
J =Xn
i=1(xi(tf)- ri(tf))
2 = (x(tf)- r(tf)>(x(tf)- r(tf)) = kx(tf)- r(tf)k2.
Both positive and negative deviations are undesirable.
Given the system model and the constrains, x(tf) = r(tf) may not be
accomplished.
A ballistic missile aimed at target S.
In this case, we may wish to put more weight or penalty on the deviation of
certain state more than others.
J = (x(tf)- r(tf))>H (x(tf)- r(tf)) = kx(tf)- r(tf)k2H, H > 0,
6 / 13
Performance measures
Terminal control problem: to minimize the deviation of the final state of a system
from its desired value r(tf) 2 Rn
J =Xn
i=1(xi(tf)- ri(tf))
2 = (x(tf)- r(tf)>(x(tf)- r(tf)) = kx(tf)- r(tf)k2.
Both positive and negative deviations are undesirable.
Given the system model and the constrains, x(tf) = r(tf) may not be
accomplished.
A ballistic missile aimed at target S.
In this case, we may wish to put more weight or penalty on the deviation of
certain state more than others.
J = (x(tf)- r(tf))>H (x(tf)- r(tf)) = kx(tf)- r(tf)k2H, H > 0,
6 / 13
Performance measures
Terminal control problem: to minimize the deviation of the final state of a system
from its desired value r(tf) 2 Rn
J =Xn
i=1(xi(tf)- ri(tf))
2 = (x(tf)- r(tf)>(x(tf)- r(tf)) = kx(tf)- r(tf)k2.
Both positive and negative deviations are undesirable.
Given the system model and the constrains, x(tf) = r(tf) may not be
accomplished.
A ballistic missile aimed at target S.
In this case, we may wish to put more weight or penalty on the deviation of
certain state more than others.
J = (x(tf)- r(tf))>H (x(tf)- r(tf)) = kx(tf)- r(tf)k2H, H > 0,
6 / 13
Performance measures
Terminal control problem: to minimize the deviation of the final state of a system
from its desired value r(tf) 2 Rn
J =Xn
i=1(xi(tf)- ri(tf))
2 = (x(tf)- r(tf)>(x(tf)- r(tf)) = kx(tf)- r(tf)k2.
Both positive and negative deviations are undesirable.
Given the system model and the constrains, x(tf) = r(tf) may not be
accomplished.
A ballistic missile aimed at target S.
In this case, we may wish to put more weight or penalty on the deviation of
certain state more than others.
J = (x(tf)- r(tf))>H (x(tf)- r(tf)) = kx(tf)- r(tf)k2H, H > 0,
6 / 13
Performance measures
Terminal control problem: to minimize the deviation of the final state of a system
from its desired value r(tf) 2 Rn
J =Xn
i=1(xi(tf)- ri(tf))
2 = (x(tf)- r(tf)>(x(tf)- r(tf)) = kx(tf)- r(tf)k2.
Both positive and negative deviations are undesirable.
Given the system model and the constrains, x(tf) = r(tf) may not be
accomplished.
A ballistic missile aimed at target S.
In this case, we may wish to put more weight or penalty on the deviation of
certain state more than others.
J = (x(tf)- r(tf))>H (x(tf)- r(tf)) = kx(tf)- r(tf)k2H, H > 0,
6 / 13
Performance measures
Minimum-control-effort problems: to transfer a sys. from an arbitrary initial state
x(t0) = x0 to a specified target S, with a minimum expenditure of control effort.
Form of “ minimum control effort” cost depends on physical application:
For a space craft (u(t): thrust of the engine), the minimum-control-effort
J =
Ztf
t0
|u(t)| dt.
For a discrete-time system
J =XN-1
k=0|uk|.
For an electric network without energy storage element (u(t): voltage source)
J =
Ztf
t0
u2(t) dt.
For several control inputs, we can write the cost function as
J =
Ztf
t0
u>(t)Ru(t) dt =
Ztf
t0
ku(t)k2R
dt, R >
For a discrete-time system:
J =1
2
XN-1
k=0u>kRuk.
7 / 13
Performance measures
Minimum-control-effort problems: to transfer a sys. from an arbitrary initial state
x(t0) = x0 to a specified target S, with a minimum expenditure of control effort.
Form of “ minimum control effort” cost depends on physical application:
For a space craft (u(t): thrust of the engine), the minimum-control-effort
J =
Ztf
t0
|u(t)| dt.
For a discrete-time system
J =XN-1
k=0|uk|.
For an electric network without energy storage element (u(t): voltage source)
J =
Ztf
t0
u2(t) dt.
For several control inputs, we can write the cost function as
J =
Ztf
t0
u>(t)Ru(t) dt =
Ztf
t0
ku(t)k2R
dt, R >
For a discrete-time system:
J =1
2
XN-1
k=0u>kRuk.
7 / 13
Performance measures
Minimum-control-effort problems: to transfer a sys. from an arbitrary initial state
x(t0) = x0 to a specified target S, with a minimum expenditure of control effort.
Form of “ minimum control effort” cost depends on physical application:
For a space craft (u(t): thrust of the engine), the minimum-control-effort
J =
Ztf
t0
|u(t)| dt.
For a discrete-time system
J =XN-1
k=0|uk|.
For an electric network without energy storage element (u(t): voltage source)
J =
Ztf
t0
u2(t) dt.
For several control inputs, we can write the cost function as
J =
Ztf
t0
u>(t)Ru(t) dt =
Ztf
t0
ku(t)k2R
dt, R >
For a discrete-time system:
J =1
2
XN-1
k=0u>kRuk.
7 / 13
Performance measures
Minimum-control-effort problems: to transfer a sys. from an arbitrary initial state
x(t0) = x0 to a specified target S, with a minimum expenditure of control effort.
Form of “ minimum control effort” cost depends on physical application:
For a space craft (u(t): thrust of the engine), the minimum-control-effort
J =
Ztf
t0
|u(t)| dt.
For a discrete-time system
J =XN-1
k=0|uk|.
For an electric network without energy storage element (u(t): voltage source)
J =
Ztf
t0
u2(t) dt.
For several control inputs, we can write the cost function as
J =
Ztf
t0
u>(t)Ru(t) dt =
Ztf
t0
ku(t)k2R
dt, R >
For a discrete-time system:
J =1
2
XN-1
k=0u>kRuk.
7 / 13
Performance measures
Minimum-control-effort problems: to transfer a sys. from an arbitrary initial state
x(t0) = x0 to a specified target S, with a minimum expenditure of control effort.
Form of “ minimum control effort” cost depends on physical application:
For a space craft (u(t): thrust of the engine), the minimum-control-effort
J =
Ztf
t0
|u(t)| dt.
For a discrete-time system
J =XN-1
k=0|uk|.
For an electric network without energy storage element (u(t): voltage source)
J =
Ztf
t0
u2(t) dt.
For several control inputs, we can write the cost function as
J =
Ztf
t0
u>(t)Ru(t) dt =
Ztf
t0
ku(t)k2R
dt, R >
For a discrete-time system:
J =1
2
XN-1
k=0u>kRuk.
7 / 13
Performance measures
Minimum-control-effort problems: to transfer a sys. from an arbitrary initial state
x(t0) = x0 to a specified target S, with a minimum expenditure of control effort.
Form of “ minimum control effort” cost depends on physical application:
For a space craft (u(t): thrust of the engine), the minimum-control-effort
J =
Ztf
t0
|u(t)| dt.
For a discrete-time system
J =XN-1
k=0|uk|.
For an electric network without energy storage element (u(t): voltage source)
J =
Ztf
t0
u2(t) dt.
For several control inputs, we can write the cost function as
J =
Ztf
t0
u>(t)Ru(t) dt =
Ztf
t0
ku(t)k2R
dt, R >
For a discrete-time system:
J =1
2
XN-1
k=0u>kRuk.
7 / 13
Performance measures
Minimum-control-effort problems: to transfer a sys. from an arbitrary initial state
x(t0) = x0 to a specified target S, with a minimum expenditure of control effort.
Form of “ minimum control effort” cost depends on physical application:
For a space craft (u(t): thrust of the engine), the minimum-control-effort
J =
Ztf
t0
|u(t)| dt.
For a discrete-time system
J =XN-1
k=0|uk|.
For an electric network without energy storage element (u(t): voltage source)
J =
Ztf
t0
u2(t) dt.
For several control inputs, we can write the cost function as
J =
Ztf
t0
u>(t)Ru(t) dt =
Ztf
t0
ku(t)k2R
dt, R >
For a discrete-time system:
J =1
2
XN-1
k=0u>kRuk.
7 / 13
Performance measures
Tracking problem: to maintain the system state x(t) as close as possible to the
desired state r(t) in the interval [t0, tf]:
J =
Ztf
t0
(x(t)- r(t))>(t)Q(x(t)- r(t)) dt =
Ztf
t0
kx(t)- r(t)k2Q
dt, Q > 0
8 / 13
Performance measures
Tracking problem: to maintain the system state x(t) as close as possible to the
desired state r(t) in the interval [t0, tf]:
J =
Ztf
t0
(x(t)- r(t))>(t)Q(x(t)- r(t)) dt =
Ztf
t0
kx(t)- r(t)k2Q
dt, Q > 0
| {z }8><
>:
reasonable if constraints includes |ui(t)| 6 1, i 2 {1, . . . ,m}
Otherwise may result in impulses in control and its derivatives
8 / 13
Performance measures
Tracking problem: to maintain the system state x(t) as close as possible to the
desired state r(t) in the interval [t0, tf]:
J =
Ztf
t0
(x(t)- r(t))>(t)Q(x(t)- r(t)) dt =
Ztf
t0
kx(t)- r(t)k2Q
dt, Q > 0
| {z }8><
>:
reasonable if constraints includes |ui(t)| 6 1, i 2 {1, . . . ,m}
Otherwise may result in impulses in control and its derivatives
J =
Ztf
t0
(kx(t)- r(t)k2Q(t) + ku(t)k2
R(t)) dt,
| {z }remove the hard control bounds from problem formulation or conserve energy while maintaining tracking
8 / 13
Performance measures
Tracking problem: to maintain the system state x(t) as close as possible to the
desired state r(t) in the interval [t0, tf]:
J =
Ztf
t0
(x(t)- r(t))>(t)Q(x(t)- r(t)) dt =
Ztf
t0
kx(t)- r(t)k2Q
dt, Q > 0
| {z }8><
>:
reasonable if constraints includes |ui(t)| 6 1, i 2 {1, . . . ,m}
Otherwise may result in impulses in control and its derivatives
J =
Ztf
t0
(kx(t)- r(t)k2Q(t) + ku(t)k2
R(t)) dt,
| {z }remove the hard control bounds from problem formulation or conserve energy while maintaining tracking
J = kx(tf)- r(tf)k2H| {z }states be close to their desired value at final time
+
Ztf
t0
(kx(t)- r(t)k2Q(t) + ku(t)k2
R(t)) dt.
8 / 13
Performance measures
Tracking problem: to maintain the system state x(t) as close as possible to the
desired state r(t) in the interval [t0, tf]:
J =
Ztf
t0
(x(t)- r(t))>(t)Q(x(t)- r(t)) dt =
Ztf
t0
kx(t)- r(t)k2Q
dt, Q > 0
| {z }8><
>:
reasonable if constraints includes |ui(t)| 6 1, i 2 {1, . . . ,m}
Otherwise may result in impulses in control and its derivatives
J =
Ztf
t0
(kx(t)- r(t)k2Q(t) + ku(t)k2
R(t)) dt,
| {z }remove the hard control bounds from problem formulation or conserve energy while maintaining tracking
J = kx(tf)- r(tf)k2H| {z }states be close to their desired value at final time
+
Ztf
t0
(kx(t)- r(t)k2Q(t) + ku(t)k2
R(t)) dt.
J =1
2x>NHxN +
1
2
XN-1
k=0((xk - rk)
>Q(xk - rk) + u
>kRuk)
| {z }for a discrete-time system
.
8 / 13
Performance measures
Tracking problem: to maintain the system state x(t) as close as possible to the
desired state r(t) in the interval [t0, tf]:
J =
Ztf
t0
(x(t)- r(t))>(t)Q(x(t)- r(t)) dt =
Ztf
t0
kx(t)- r(t)k2Q
dt, Q > 0
| {z }8><
>:
reasonable if constraints includes |ui(t)| 6 1, i 2 {1, . . . ,m}
Otherwise may result in impulses in control and its derivatives
J =
Ztf
t0
(kx(t)- r(t)k2Q(t) + ku(t)k2
R(t)) dt,
| {z }remove the hard control bounds from problem formulation or conserve energy while maintaining tracking
J = kx(tf)- r(tf)k2H| {z }states be close to their desired value at final time
+
Ztf
t0
(kx(t)- r(t)k2Q(t) + ku(t)k2
R(t)) dt.
J =1
2x>NHxN +
1
2
XN-1
k=0((xk - rk)
>Q(xk - rk) + u
>kRuk)
| {z }for a discrete-time system
.
Regulation problem: r(t) = 0 for all t 2 [t0, tf]8 / 13
Performance measures
All the performance measures discussed above are special cases of the general form
Continuous-time
J = h(x(tf), tf)| {z }terminal cost
+
Ztf
t0
g(x(t),u(t), t)dt
| {z }running cost
.
Discrete-time
J = �(xN,N)| {z }terminal cost
+XN-1
k=0Lk(xk,uk)dt
| {z }running cost
.
9 / 13
Optimal Control Problem
Find admissible u?
which cause x = f(x(t),u(t), t) to follow admissible x?
that minimize
J = h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt.
- u?: optimal control x
?: optimal trajectory
J? = h(x?(tf), tf) +
Ztf
t0
g(x?(t),u?(t), t)dt
6 h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt, u 2 U, x 2 X.
We are looking for global minimum
Find all local minimum, and pick the smallest as global minimum
Solution is not unique
con: complicates computational procedures
pro: choose among multiple possibilities accounting for other measures
10 / 13
Optimal Control Problem
Find admissible u?
which cause x = f(x(t),u(t), t) to follow admissible x?
that minimize
J = h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt.
- u?: optimal control x
?: optimal trajectory
J? = h(x?(tf), tf) +
Ztf
t0
g(x?(t),u?(t), t)dt
6 h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt, u 2 U, x 2 X.
We are looking for global minimum
Find all local minimum, and pick the smallest as global minimum
Solution is not unique
con: complicates computational procedures
pro: choose among multiple possibilities accounting for other measures
10 / 13
Optimal Control Problem
Find admissible u?
which cause x = f(x(t),u(t), t) to follow admissible x?
that minimize
J = h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt.
- u?: optimal control x
?: optimal trajectory
J? = h(x?(tf), tf) +
Ztf
t0
g(x?(t),u?(t), t)dt
6 h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt, u 2 U, x 2 X.
We are looking for global minimum
Find all local minimum, and pick the smallest as global minimum
Solution is not unique
con: complicates computational procedures
pro: choose among multiple possibilities accounting for other measures
10 / 13
Optimal Control Problem
Find admissible u?
which cause x = f(x(t),u(t), t) to follow admissible x?
that minimize
J = h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt.
- u?: optimal control x
?: optimal trajectory
J? = h(x?(tf), tf) +
Ztf
t0
g(x?(t),u?(t), t)dt
6 h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt, u 2 U, x 2 X.
We are looking for global minimum
Find all local minimum, and pick the smallest as global minimum
Solution is not unique
con: complicates computational procedures
pro: choose among multiple possibilities accounting for other measures
10 / 13
Optimal Control Problem
Find admissible u?
which cause x = f(x(t),u(t), t) to follow admissible x?
that minimize
J = h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt.
- u?: optimal control x
?: optimal trajectory
J? = h(x?(tf), tf) +
Ztf
t0
g(x?(t),u?(t), t)dt
6 h(x(tf), tf) +
Ztf
t0
g(x(t),u(t), t)dt, u 2 U, x 2 X.
We are looking for global minimum
Find all local minimum, and pick the smallest as global minimum
Solution is not unique
con: complicates computational procedures
pro: choose among multiple possibilities accounting for other measures
10 / 13
Parameter static optimization: when time is not a parameter in the problem
Unconstrained optimization
Constrained optimization
11 / 13
Unconstrained optimization
u? = argmin
u2Rm
F(u),
where F : Rm ! R is differentiable
Local (weak) minimum point: A point u? 2 Rm
is said to be a (weak) localminimum point of F over Rm
if
9✏ > 0 s.t. F(u?) 6 F(u) 8u 2 Rm, ku- u?k < ✏
Local (strong) minimum point:
9✏ > 0 s.t. F(u?) < F(u) 8u 2 Rm, ku- u?k < ✏
(a) strong minimum, (b) weak minimum
12 / 13
Unconstrained optimization
u? = argmin
u2Rm
F(u),
where F : Rm ! R is differentiable
Local (weak) minimum point: A point u? 2 Rm
is said to be a (weak) localminimum point of F over Rm
if
9✏ > 0 s.t. F(u?) 6 F(u) 8u 2 Rm, ku- u?k < ✏
Local (strong) minimum point:
9✏ > 0 s.t. F(u?) < F(u) 8u 2 Rm, ku- u?k < ✏
(a) strong minimum, (b) weak minimum
12 / 13
Unconstrained optimization
u? = argmin
u2Rm
F(u),
where F : Rm ! R is differentiable
Local (weak) minimum point: A point u? 2 Rm
is said to be a (weak) localminimum point of F over Rm
if
9✏ > 0 s.t. F(u?) 6 F(u) 8u 2 Rm, ku- u?k < ✏
Local (strong) minimum point:
9✏ > 0 s.t. F(u?) < F(u) 8u 2 Rm, ku- u?k < ✏
(a) strong minimum, (b) weak minimum
12 / 13
Unconstrained optimization
u? = argmin
u2Rm
F(u),
where F : Rm ! R is differentiable
Local (weak) minimum point: A point u? 2 Rm
is said to be a (weak) localminimum point of F over Rm
if
9✏ > 0 s.t. F(u?) 6 F(u) 8u 2 Rm, ku- u?k < ✏
Local (strong) minimum point:
9✏ > 0 s.t. F(u?) < F(u) 8u 2 Rm, ku- u?k < ✏
(a) strong minimum, (b) weak minimum12 / 13
Unconstrained optimization
u? = argmin
u2RmF(u),
where F : Rm ! R is differentiable
A point u? 2 Rm
is said to be a Local (weak) minimum point of F over Rmif
9✏ > 0 s.t. F(u?) 6 F(u) 8u 2 Rm, ku- u?k < ✏
Local (strong) minimum point: 9✏ > 0 s.t. F(u?) < F(u) 8u 2 Rm, ku- u?k < ✏
Global minimum: (weak) F(u?) 6 F(u) 8,u 2 Rm, (strong) F(u?) < F(u) 8,u 2 Rm
f(x) = 2+ cos(x) + 0.5 cos(2 x- 0.5) has multiple local and global minimizer.
13 / 13
Unconstrained optimization
u? = argmin
u2RmF(u),
where F : Rm ! R is differentiable
A point u? 2 Rm
is said to be a Local (weak) minimum point of F over Rmif
9✏ > 0 s.t. F(u?) 6 F(u) 8u 2 Rm, ku- u?k < ✏
Local (strong) minimum point: 9✏ > 0 s.t. F(u?) < F(u) 8u 2 Rm, ku- u?k < ✏
Global minimum: (weak) F(u?) 6 F(u) 8,u 2 Rm, (strong) F(u?) < F(u) 8,u 2 Rm
x-10 -5 0 5 10
f(x)
1
1.5
2
2.5
3
3.5
X: -1.93Y: 1.476
X: -4.02Y: 1.045
f(x) = 2+ cos(x) + 0.5 cos(2 x- 0.5) has multiple local and global minimizer. 13 / 13