Exercises
Finite-horizon Riccati equation
Consider
with
Assume
(a) Derive the matrix Riccati differential equation.
(b) Derive the three independent scalar Riccati equations.
(c) State the terminal conditions.
Scalar finite-horizon LQR
Consider
with
Derive
(a) the Hamiltonian,
(b) the optimal control,
(c) the Riccati equation,
(d) the terminal condition,
(e) the optimal feedback law.
Costate decomposition
Assume
Starting from the state and costate equations,
(a) derive the Riccati equation,
(b) derive the differential equation for ,
(c) show that if
then
Infinite-horizon scalar LQR
For
derive the algebraic Riccati equation.
(a) Solve analytically for both roots.
(b) Determine which solution gives a stabilizing controller.
(c) Compute the optimal feedback gain.
Hamiltonian matrix
Consider
(a) Derive the characteristic polynomial.
(b) Compute the eigenvalues.
(c) Determine when they are real or imaginary.
(d) Explain the implication for closed-loop stability.
Time-varying LQR
Assume
are time dependent.
Derive
(a) the optimal control law,
(b) the Riccati differential equation,
(c) the terminal condition,
(d) the closed-loop state equation.
Hamiltonian conservation
Starting from the canonical equations,
derive
Then show that the optimal Hamiltonian is constant whenever the Hamiltonian has no explicit time dependence.
Symmetry of the Riccati equation
Assume
Show that the Riccati differential equation preserves symmetry by proving that
for all .
Optimal feedback law
For the double integrator,
with quadratic performance index,
(a) derive the optimal feedback law,
(b) write the closed-loop dynamics,
(c) express the gain matrix in terms of the Riccati solution,
(d) explain why the resulting controller is time varying over a finite horizon.
Backward–forward verification
Implement the finite-horizon LQR algorithm for any controllable second-order system.
(a) Integrate the Riccati equation backward.
(b) Simulate the closed-loop system forward.
(c) Verify numerically that
and
Report the maximum residual in each equation.