Optimal control
Simplified case : Linear system, quadratic performance index, fixed horizon and final state
Contents
- Problem :
- Solution using Pontryagin’s minimum principle :
- Exercises
Problem :
Let us consider the linear system :
![]()
From a given initial state
, the objective is to bring back the state to 0 within a given time horizon
(
) while minimizing the quadratic performance index :

where
and
are given weighting matrices with
and
.
Solution using Pontryagin’s minimum principle :
- The Hamiltonian reads :
![]()
where
is the costate vector.
- the optimal control minimizes
:
![]()
- Costate dynamics :
![]()
- State-costate dynamics : (1), (2) and (3) leads to :
![\left\{\begin{array}{ccccc}\dot{\mathbf{x}} & = & \mathbf{A}\mathbf{x} &-& \mathbf{B}\mathbf{R}^{-1}\mathbf{B}^T\mathbf{\Psi}\\ \dot{\mathbf{\Psi}} & = & -\mathbf{Q} \mathbf{x}&-& \mathbf{A}^T\mathbf{\Psi}\end{array}\right.\Rightarrow \left[\begin{array}{c}\dot{\mathbf{x}} \\ \dot{\mathbf{\Psi}}\end{array}\right]= \mathbf{H}\left[\begin{array}{c}\mathbf{x} \\ \mathbf{\Psi}\end{array}\right] (4) \left\{\begin{array}{ccccc}\dot{\mathbf{x}} & = & \mathbf{A}\mathbf{x} &-& \mathbf{B}\mathbf{R}^{-1}\mathbf{B}^T\mathbf{\Psi}\\ \dot{\mathbf{\Psi}} & = & -\mathbf{Q} \mathbf{x}&-& \mathbf{A}^T\mathbf{\Psi}\end{array}\right.\Rightarrow \left[\begin{array}{c}\dot{\mathbf{x}} \\ \dot{\mathbf{\Psi}}\end{array}\right]= \mathbf{H}\left[\begin{array}{c}\mathbf{x} \\ \mathbf{\Psi}\end{array}\right] (4)](local/cache-vignettes/L456xH51/9936221dc638004632384ee2f5ca1cc0-0a7e3.png?1548148781)
with
![\mathbf{H}=\left[\begin{array}{cc} \mathbf{A} & -\mathbf{B}\mathbf{R}^{-1}\mathbf{B}^T\\ -\mathbf{Q} & -\mathbf{A}^T\end{array}\right]. \mathbf{H}=\left[\begin{array}{cc} \mathbf{A} & -\mathbf{B}\mathbf{R}^{-1}\mathbf{B}^T\\ -\mathbf{Q} & -\mathbf{A}^T\end{array}\right].](local/cache-vignettes/L232xH51/d54911fffef7f7a388869d0b7f5a0c87-c6832.png?1548148781)
is the
Hamiltonian matrix associated to such a control problem. (4) can be intregrated taken into account boundary conditions on the state-costate augmented vector
:
- initial conditions on
:
(5), - terminal conditions on
:
(6).
The set of equations (4), (5) and (6) is also called a two point boundary-value problem.
- Integration of the two point boundary-value problem :
![\left[\begin{array}{c}\mathbf{x}(t_f)=0 \\ \mathbf{\Psi}(t_f)\end{array}\right]=e^{\mathbf{H}t_f}\left[\begin{array}{c}\mathbf{x}(0)=\mathbf{x}_0 \\ \mathbf{\Psi}(0)\end{array}\right]=\left[\begin{array}{cc} e^{\mathbf{H}t_f}_{11} & e^{\mathbf{H}t_f}_{12} \\ e^{\mathbf{H}t_f}_{21} & e^{\mathbf{H}t_f}_{22}\end{array}\right]\left[\begin{array}{c}\mathbf{x}(0)=\mathbf{x}_0 \\ \mathbf{\Psi}(0)\end{array}\right] \left[\begin{array}{c}\mathbf{x}(t_f)=0 \\ \mathbf{\Psi}(t_f)\end{array}\right]=e^{\mathbf{H}t_f}\left[\begin{array}{c}\mathbf{x}(0)=\mathbf{x}_0 \\ \mathbf{\Psi}(0)\end{array}\right]=\left[\begin{array}{cc} e^{\mathbf{H}t_f}_{11} & e^{\mathbf{H}t_f}_{12} \\ e^{\mathbf{H}t_f}_{21} & e^{\mathbf{H}t_f}_{22}\end{array}\right]\left[\begin{array}{c}\mathbf{x}(0)=\mathbf{x}_0 \\ \mathbf{\Psi}(0)\end{array}\right]](local/cache-vignettes/L500xH63/ab6add51b4ee71f1b4ce03184c8f3589-9c15c.png?1548148781)
where
,
are the 4
submatrices partionning
(WARNING !! :
).
Then one can easily derive the initial value of the costate :
![]()
where
depends only on the problem data :
,
,
,
,
and not on
.
- Optimal control initial value : from equation (2) :
![]()
- Closed-loop optimal control at any time
: at time
, assuming that the current state
is known (using a measurement system), the objective is still to bring back the final state to
(
) but the time horizon is now
. The calculus of the current optimal control
is the same problem than the previous one, just changing
by
and
by
. Thus :
![]()
![]()
with :
![]()
the time-varying state feedback to be implemented in closed-loop according to the following Figure :

Remark :
is not defined since
and is not invertible.
- Optimal state trajectories : The integration of equation (4) between 0 and
(
) leads to (first
row) :
![]()
where :
![]()
is called the transition matrix.
- Optimal performance index :
For any
and a current state
one can define the cost-to-go function (or value-function)
as :

and the optimal cost-to-go function as :


From equation (4) : one can derive that :
![]()
![]()
Thus (after simplification) :

Thus :
![]()
From this last equation, on can find again the definition of the costate
used to solve the Hamilton–Jacobi–Bellman equation ; i.e. : the gradient of the optimal cost-to-go function w.r.t.
:
![]()
The optimal performance index is :
.
Exercises
- Exo #1 : show that
is the solution of the matrix Riccati differential equation :
![]()
also written as :
![]()
- Exo #2 : considering now that
, compute the time-variant state feedback gain
and the time-variant feedforward gain
of the optimal closed-loop control law to be implemented according to the following Figure.



L’excellence passionnément