3.5.35 · D3Guidance, Navigation & Control (GNC)

Worked examples — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains

3,307 words15 min readBack to topic

Before we start, we rebuild — from the general Riccati equation, right here on this page — the scalar formula we lean on repeatedly, so nothing below depends on remembering the parent note.


The scenario matrix

Every LQR problem lives in one of these cells. Each column is a knob; each row is a value that knob can take. The worked examples below each stamp which cell(s) they land in.

Cell Plant sign / structure Weight regime What it stress-tests
A Scalar, stable () balanced baseline, positive root
B Scalar, unstable () balanced control must create stability
C Scalar, marginal () balanced the integrator edge case
D Scalar cheap control limiting: gain blows up
E Scalar expensive control limiting: gain fades, must rely on plant
F 2-state double integrator vary LQR = PD, pole placement
G 2-state degenerate (rank-deficient) observability of needed
H Any huge vs aggressiveness / ratio-only rule
I Uncontrollable plant any recipe fails — must recognize it
J Word problem (satellite) design task pick for a spec

We now cover A–J.


Worked examples

Example 1 — Cell A: stable scalar plant, balanced weights

Forecast: the plant is already stable (). Do you think LQR still pulls the pole further left, or leaves it alone? Guess before reading.

  1. Write the scalar Riccati. Why this step? We derived in the box above; we just substituted .

  2. Solve the quadratic, keep the positive root. Rewrite as , so . Why the positive root? is a cost and must be , forcing ; the other root is negative and rejected.

  3. Compute the gain. .

  4. Closed-loop pole. .

Verify: the open-loop pole was ; the closed loop is , further into the left half-plane. So LQR does push an already-stable plant a bit harder — it trades a little control for a little less error. Sanity: , stable. ✔


Example 2 — Cell B: unstable scalar plant

Forecast: an unstable plant runs away on its own. Will one fixed gain tame it, and how far left does the pole end up?

  1. Riccati with numbers. . To put it in standard quadratic form (positive leading coefficient), multiply both sides by : , then divide by : . Why this manipulation? Multiplying by makes the coefficient positive so the quadratic formula reads cleanly; dividing by the common factor shrinks the numbers. Neither operation changes the roots (multiplying an equation "" by a nonzero constant leaves its solutions untouched).

  2. Positive root. . Why positive root? Cost non-negativity again; , the other root is rejected.

  3. Gain. .

  4. Closed loop. .

Verify: started at (blowing up), ended at (decaying). The controller flipped the sign of the pole — exactly the promise that LQR stabilizes any controllable plant. ✔


Example 3 — Cell C: marginal plant (the integrator)

Forecast: with the plant neither grows nor decays — it just holds. Does the formula still give a clean answer?

  1. Riccati. . Why this step? The term vanishes because ; the quadratic collapses to a pure square.

  2. Positive root. has roots and ; we keep . Why reject ? Exactly the same reason as every scalar case: is the cost-to-go and can never be negative, so we need . The root would make for any , which is meaningless, so it is discarded.

  3. Gain. .

  4. Closed loop. .

Verify: with the Riccati reads , so (taking here). Numerically , matching step 2. ✔ Clean edge case, stable.


Example 4 — Cell D & E: the two limiting regimes (cheap vs expensive control)

Forecast: if control is nearly free (), should the gain be huge or tiny? If control is nearly forbidden (), what pole are we stuck with?

  1. Get the general root from our box. The re-derived scalar formula was obtained above by applying the quadratic formula to . Substituting : Why this step? It expresses (hence ) as an explicit function of the single knob , so we can take limits directly instead of re-solving a quadratic for each .

  2. Gain as a function of . . Why write it this way? Dividing by (and pulling inside the root: ) isolates the term whose limit we can read off directly.

  3. Cheap control, . , so . Why? Control is almost free, so the optimizer spends unlimited effort → infinite gain → the pole (instant correction). This is the D-cell limit.

  4. Expensive control, . , so ; pole . Why not ? Because is unstable — you can never fully stop spending, or the state runs away. The controller settles at the cheapest gain that still stabilizes, mirroring the plant's own rate. This mirror-image pole () is a famous LQR fact (cheap-vs-expensive limit).

  5. Figure.

    Figure — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains
    The horizontal axis is the control weight (from to ); the vertical axis is the optimal gain . The lavender curve dives from on the left down to the mint dashed asymptote at on the right; the coral dot marks the value .

Verify: at , — matches the parent note's worked number exactly. ✔ The two asymptotes ( and ) bracket it correctly.


Example 5 — Cell H: only the ratio matters (aggressiveness)

Forecast: scaling both penalties by the same factor — does the controller get more aggressive, less, or unchanged?

  1. General gain in terms of the ratio. With the positive root (from the box) is , so Why this step? Factor out of the square root: . After dividing by , only the ratio survives — no standalone or remains.

  2. Case : , so .

  3. Case : again, so . Identical.

Verify: the two gains are numerically equal because depends only on . This confirms the parent-note mistake #1: only the ratio sets aggressiveness, scaling both is a no-op. ✔


Example 6 — Cell F: double integrator, LQR = PD controller

Forecast: LQR here becomes a PD controller. What damping ratio should we expect?

  1. Expand the CARE entry by entry (done here, not assumed). With and , so , the three scalar equations are:

    • : ,
    • : ,
    • : . Why this step? A symmetric matrix equation gives exactly three independent scalar equations — one per distinct entry — which we solve in order.
  2. Solve them. From : . From : . From : . With : .

  3. Gain. . So (position/spring), (velocity/damper). Why is this PD? — the textbook PD form (see PID Controllers, Pole Placement).

  4. Closed-loop matrix. . Characteristic poly: . Why? .

  5. Poles. .

  6. Figure.

    Figure — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains
    The axes are the complex -plane: horizontal = real part , vertical = imaginary part . The two lavender crosses are the closed-loop poles at ; they sit on the coral unit circle () at into the left half-plane — damping ratio .

Verify: , and — the "critically nice" GNC damping. ✔


Example 7 — Cell F (twist): expensive control on the double integrator

Forecast: more expensive control should mean smaller gains and a slower (lower-frequency) response. By what factor?

  1. Plug into the general entries from Example 6. , . Why? .

  2. Gain. .

  3. Natural frequency. For LQR on this plant, . Why? Closed-loop poly is , so .

Verify: compared to Example 6 (), grew by and dropped by (from to ). Slower and gentler, exactly as "expensive control" predicts. Damping check: — same damping ratio (a scale-invariance of this problem). ✔


Example 8 — Cell G: degenerate that is still OK

Forecast: has a zero eigenvalue, so we penalize nothing about velocity directly. Does the solution still stabilize both states?

  1. State the requirement. A stabilizing exists iff controllable and observable (Controllability and Observability). Why this step? A degenerate is fine as long as the penalized quantity "sees" every unstable mode through the dynamics.

  2. Pick . As defined above, , i.e. output (position).

  3. Observability of . , rank 2 = full. Why does this rescue us? Even though we don't penalize velocity directly, velocity is observable from position through (position's rate reveals velocity). So the cost still "feels" a runaway velocity.

  4. Consequence. The Example-6 solution is valid and stabilizing despite the degenerate .

Verify: the observability matrix is the identity, determinant ⇒ full rank ⇒ LQR well-posed. ✔ (Contrast this with Cell I next, where the plant itself fails a condition.)


Example 9 — Cell I: when the recipe refuses to work

Forecast: the control enters only the first row. The unstable mode is . Can any gain touch it?

  1. Build the controllability matrix. . . So . Why this step? controllable ⇔ has full rank (Controllability and Observability).

  2. Rank. , rank . Uncontrollable.

  3. Diagnose which mode. The uncontrollable mode is , whose eigenvalue is (unstable). An unstable and uncontrollable mode cannot be moved by any . Why does this kill LQR? No feedback gain can push a pole the control cannot reach. The Riccati equation will not yield a stabilizing .

  4. Conclusion. LQR has no stabilizing solution here; you must redesign the actuator () so it couples into .

Verify: ⇒ rank-deficient ⇒ uncontrollable. The recipe correctly fails. ✔ This is the boundary case every LQR user must recognize.


Example 10 — Cell J: satellite design word problem

Forecast: we found . To slow down to , do we make big or small?

  1. Invert the frequency relation. From Example 7, , so . Why this step? We derived ; solving for gives the required control weight. A large (expensive control) ⇒ slow response — matching the forecast.

  2. Compute the gain (reuse Example 7). .

  3. Engineering reading. (torque per radian) = the restoring "spring"; (torque per rad/s) = the damping. Damping ratio → about overshoot, a smooth slew. Why is this good for a satellite? Low ⇒ gentle wheel torques ⇒ less power and less structural stress, at the cost of a slower settle. See LQG Control for when the state must be estimated first.

Verify: ✔; ✔ (identical to Example 7, as it must be — same ).


Recall Coverage checklist (did we hit every cell?)

A ✔ (Ex 1) · B ✔ (Ex 2) · C ✔ (Ex 3) · D & E ✔ (Ex 4) · H ✔ (Ex 5) · F ✔ (Ex 6, 7) · G ✔ (Ex 8) · I ✔ (Ex 9) · J ✔ (Ex 10). Stable/unstable/marginal scalars, cheap/expensive limits, ratio-invariance, matrix PD case, degenerate-but-OK , and the uncontrollable failure — all shown.

Active Recall