Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Exercises

  1. Finite-horizon Riccati equation

    Consider

    A=[0100],B=[01],A= \begin{bmatrix} 0&1\\ 0&0 \end{bmatrix}, \qquad B= \begin{bmatrix} 0\\ 1 \end{bmatrix},

    with

    Q=[q100q2],R=r.Q= \begin{bmatrix} q_1&0\\ 0&q_2 \end{bmatrix}, \qquad R=r.

    Assume

    S(t)=[s11s12s12s22].S(t)= \begin{bmatrix} s_{11}&s_{12}\\ s_{12}&s_{22} \end{bmatrix}.

    (a) Derive the matrix Riccati differential equation.

    (b) Derive the three independent scalar Riccati equations.

    (c) State the terminal conditions.

  2. Scalar finite-horizon LQR

    Consider

    x˙=ax+bu,\dot{x}=ax+bu,

    with

    J=12x2(T)Sf+120T(qx2+ru2)dt.J= \frac12x^2(T)S_f + \frac12 \int_0^T (qx^2+ru^2)\,dt.

    Derive

    (a) the Hamiltonian,

    (b) the optimal control,

    (c) the Riccati equation,

    (d) the terminal condition,

    (e) the optimal feedback law.

  3. Costate decomposition

    Assume

    λ=Sx+β.\lambda=Sx+\beta.

    Starting from the state and costate equations,

    (a) derive the Riccati equation,

    (b) derive the differential equation for β\beta,

    (c) show that if

    β(T)=0,\beta(T)=0,

    then

    β(t)0.\beta(t)\equiv0.
  4. Infinite-horizon scalar LQR

    For

    x˙=ax+bu,\dot{x}=ax+bu,

    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.

  5. Hamiltonian matrix

    Consider

    F=[ab2/rqa].F= \begin{bmatrix} a&-b^2/r\\ -q&-a \end{bmatrix}.

    (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.

  6. Time-varying LQR

    Assume

    A(t),B(t),Q(t),R(t)A(t), \quad B(t), \quad Q(t), \quad R(t)

    are time dependent.

    Derive

    (a) the optimal control law,

    (b) the Riccati differential equation,

    (c) the terminal condition,

    (d) the closed-loop state equation.

  7. Hamiltonian conservation

    Starting from the canonical equations,

    derive

    dHdt=Ht.\frac{dH^*}{dt} = \frac{\partial H}{\partial t}.

    Then show that the optimal Hamiltonian is constant whenever the Hamiltonian has no explicit time dependence.

  8. Symmetry of the Riccati equation

    Assume

    Sf=SfT,Q=QT,R=RT.S_f=S_f^{\mathsf T}, \qquad Q=Q^{\mathsf T}, \qquad R=R^{\mathsf T}.

    Show that the Riccati differential equation preserves symmetry by proving that

    S(t)=ST(t)S(t)=S^{\mathsf T}(t)

    for all tt.

  9. Optimal feedback law

    For the double integrator,

    x˙1=x2,x˙2=u,\dot{x}_1=x_2, \qquad \dot{x}_2=u,

    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.

  10. 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

    λ˙+Qx+ATλ0,\dot{\lambda} + Qx + A^{\mathsf T}\lambda \approx0,
    Ru+BTλ0,Ru + B^{\mathsf T}\lambda \approx0,

    and

    λ(T)Sfx(T)0.\lambda(T)-S_fx(T) \approx0.

    Report the maximum residual in each equation.