Linear-Quadratic Regulation & Riccati Equations
A complete continuous- and discrete-time LQR derivation: quadratic HJB ansatz, optimal feedback, differential and algebraic Riccati equations, stabilizing-solution conditions, value function, weight scaling, and actuator-limit boundaries.
The linear-quadratic regulator (LQR) is the rare optimal-control problem whose nonlinear HJB equation closes into a matrix differential equation. Linear dynamics preserve quadratic value functions, and a positive-definite quadratic input penalty makes the pointwise minimizer unique. The result is linear state feedback, but its validity depends on the model, weights, horizon, and absence of hard constraints.
Finite-horizon problem #
Let
and minimize
with
The factor simplifies derivatives and does not change the minimizer. Positive definiteness of makes control effort strictly convex and ensures exists.
Quadratic HJB ansatz #
The terminal value is quadratic, and the dynamics are linear, so try
Then
The HJB equation becomes
Only two terms depend on :
Differentiate with respect to :
Therefore
Completing the square makes global pointwise optimality explicit:
Differential Riccati equation #
Substitute the minimizing control into HJB and use
Because the resulting quadratic form must vanish for every ,
This is the continuous-time Riccati differential equation (RDE). Its boundary condition is at , so is integrated backward. The state has its boundary condition at and is integrated forward under
The optimal cost from is
Direct PMP cross-check #
Using the maximum-convention Hamiltonian
maximization gives
Because this convention has , set
Then
and substituting into the costate equation recovers the same RDE. This is a useful sign audit: if PMP produces positive feedback for the regulator, the Hamiltonian/costate convention has been mixed.
Infinite horizon and the algebraic Riccati equation #
For constant , consider
If the finite-horizon stabilizing solution converges to a constant , then and
This is the continuous algebraic Riccati equation (CARE). The feedback and closed-loop matrix are
An algebraic equation can have multiple symmetric solutions. LQR uses the stabilizing solution: the one for which is Hurwitz.
A standard sufficient set of conditions is:
- is stabilizable: every uncontrollable mode is already stable;
- is detectable: every mode invisible to the state penalty is stable;
- and .
Full controllability and are stronger than necessary. Conversely, a numerical CARE routine returning a matrix does not by itself prove that the chosen branch is stabilizing; inspect , its definiteness, the residual, and the eigenvalues of .
Scalar CARE worked completely #
Take
Here . The CARE is
or
The two algebraic roots are
The feedback is , so the closed-loop pole is
For , the pole is and the system is unstable. For
the pole is . The stabilizing requirement selects the correct Riccati root.
Discrete-time LQR #
For
and
assume . Minimizing the one-step Bellman expression gives
and the backward discrete Riccati recursion
with . The continuous formula must not be pasted into a sampled system; the term is a real consequence of one-step state propagation.
Choosing state and input weights #
Bryson's rule is an initial normalization, not an optimizer of design intent. For acceptable magnitudes and ,
Each normalized variable contributes roughly one when it reaches its declared scale. The inverse square is essential: a larger acceptable excursion receives a smaller weight. The KPI lecture's opposite proportionality is corrected here using the NASA-sponsored Stanford report's explicit statement of the rule.
Then iterate using physical outcomes:
- transient state peaks and settling;
- actuator magnitude, rate, and thermal load;
- closed-loop poles and dominant eigenvectors;
- sensitivity to model uncertainty and sensor noise;
- units and coordinate scaling.
Multiplying both and by the same positive scalar leaves unchanged, because only their relative tradeoff matters.
What unconstrained LQR does not solve #
The derivation minimizes over all . If the actuator saturates, clipping
creates a nonlinear closed loop that is not the solution of the constrained LQR problem. Stability and performance must be re-evaluated, and an observer or integrator can wind up.
Likewise, LQR does not enforce:
- state constraints;
- input rate or slew limits;
- a prescribed sparse or low-order feedback architecture;
- robustness to an uncertainty set;
- estimation from partial measurements.
Use observers for state reconstruction, constrained optimal control or MPC for hard limits, and fixed-structure optimization when the controller architecture itself is restricted.