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.
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.
Forecast: the plant is already stable (a=−2<0). Do you think LQR still pulls the pole further left, or leaves it alone? Guess before reading.
Write the scalar Riccati.2ap−rb2p2+q=0⇒−4p−p2+1=0.Why this step? We derived 2ap−rb2p2+q=0 in the box above; we just substituted a=−2,b=1,q=1,r=1.
Solve the quadratic, keep the positive root.
Rewrite as p2+4p−1=0, so p=2−4+16+4=−2+5≈0.236.
Why the positive root?V=px2 is a cost and must be ≥0, forcing p>0; the other root −2−5≈−4.24 is negative and rejected.
Compute the gain.K=rbp=p≈0.236.
Closed-loop pole.a−bK=−2−0.236=−2.236.
Verify: the open-loop pole was −2; the closed loop is −2.236, 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: a−bK<0, stable. ✔
Forecast: an unstable plant runs away on its own. Will one fixed gain K tame it, and how far left does the pole end up?
Riccati with numbers.2ap−rb2p2+q=6p−4p2+4=0.
To put it in standard quadratic form (positive leading coefficient), multiply both sides by −1: 4p2−6p−4=0, then divide by 2: 2p2−3p−2=0.
Why this manipulation? Multiplying by −1 makes the p2 coefficient positive so the quadratic formula reads cleanly; dividing by the common factor 2 shrinks the numbers. Neither operation changes the roots (multiplying an equation "=0" by a nonzero constant leaves its solutions untouched).
Positive root.p=43+9+16=43+5=2.
Why positive root? Cost non-negativity again; p=2>0, the other root −21 is rejected.
Gain.K=rbp=2⋅2=4.
Closed loop.a−bK=3−2⋅4=3−8=−5<0.
Verify: started at +3 (blowing up), ended at −5 (decaying). The controller flipped the sign of the pole — exactly the promise that LQR stabilizes any controllable plant. ✔
Forecast: with a=0 the plant neither grows nor decays — it just holds. Does the formula still give a clean answer?
Riccati.2(0)p−41p2+1=0⇒−41p2+1=0⇒p2=4.
Why this step? The 2ap term vanishes because a=0; the quadratic collapses to a pure square.
Positive root.p2=4 has roots p=+2 and p=−2; we keep p=2.
Why reject p=−2? Exactly the same reason as every scalar case: V=px2 is the cost-to-go and can never be negative, so we need p≥0. The root −2 would make V<0 for any x=0, which is meaningless, so it is discarded.
Gain.K=rbp=41⋅2=0.5.
Closed loop.a−bK=0−0.5=−0.5<0.
Verify: with a=0 the Riccati reads rb2p2=q, so p=qr/b (taking b>0 here). Numerically p=1⋅4/1=2, matching step 2. ✔ Clean edge case, stable.
Forecast: if control is nearly free (r→0), should the gain be huge or tiny? If control is nearly forbidden (r→∞), what pole are we stuck with?
Get the general root from our box. The re-derived scalar formula
p(r)=b2ar+a2r2+qrb2
was obtained above by applying the quadratic formula to 2ap−rb2p2+q=0. Substituting a=b=q=1:
p(r)=r+r2+r.Why this step? It expresses p (hence K) as an explicit function of the single knob r, so we can take limits directly instead of re-solving a quadratic for each r.
Gain as a function of r.K(r)=rbp=rr+r2+r=1+1+r1.
Why write it this way? Dividing by r (and pulling r inside the root: r2+r/r=1+1/r) isolates the r1 term whose limit we can read off directly.
Cheap control, r→0+.r1→∞, so K→∞.
Why? Control is almost free, so the optimizer spends unlimited effort → infinite gain → the pole a−bK→−∞ (instant correction). This is the D-cell limit.
Expensive control, r→∞.r1→0, so K→1+1=2; pole a−bK→1−2=−1.
Why not K→0? Because a=1 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 (−∣a∣) is a famous LQR fact (cheap-vs-expensive limit).
Figure. The horizontal axis is the control weight r (from 0 to 8); the vertical axis is the optimal gain K. The lavender curve K(r)=1+1+1/r dives from +∞ on the left down to the mint dashed asymptote at K=2 on the right; the coral dot marks the value K(1)≈2.414.
Verify: at r=1, K=1+2≈2.414 — matches the parent note's worked number exactly. ✔ The two asymptotes (K→∞ and K→2) bracket it correctly.
Forecast: scaling both penalties by the same factor — does the controller get more aggressive, less, or unchanged?
General gain in terms of the ratio. With a=b=1 the positive root (from the box) is p=r+r2+qr, so
K=rp=1+1+rq.Why this step? Factor r out of the square root: r2+qr=r1+q/r. After dividing by r, only the ratioq/r survives — no standalone q or r remains.
Case (1,1):q/r=1, so K=1+2≈2.414.
Case (100,100):q/r=1 again, so K=1+2≈2.414. Identical.
Verify: the two gains are numerically equal because K depends only on q/r. This confirms the parent-note mistake #1: only the ratio sets aggressiveness, scaling both is a no-op. ✔
Forecast: LQR here becomes a PD controller. What damping ratio should we expect?
Expand the CARE entry by entry (done here, not assumed). With A⊤P+PA−PBR−1B⊤P+Q=0 and B⊤P=[p2,p3], so PBR−1B⊤P=ρ1[p22p2p3p2p3p32], the three scalar equations are:
(1,1): 1−p22/ρ=0,
(1,2): p1−p2p3/ρ=0,
(2,2): 2p2−p32/ρ=0.
Why this step? A symmetric 2×2 matrix equation gives exactly three independent scalar equations — one per distinct entry — which we solve in order.
Solve them. From (1,1): p2=ρ. From (2,2): p3=2ρp2=2ρ3/4. From (1,2): p1=p2p3/ρ. With ρ=1: p2=1,p3=2,p1=2.
Gain.K=ρ1[p2,p3]=[1,2]. So kp=1 (position/spring), kd=2 (velocity/damper).
Why is this PD?u=−kpx1−kdx2=−(spring)x1−(damper)x2 — the textbook PD form (see PID Controllers, Pole Placement).
Figure. The axes are the complex s-plane: horizontal = real part Re(s), vertical = imaginary part Im(s). The two lavender crosses are the closed-loop poles at −1/2±j/2; they sit on the coral unit circle (∣s∣=1) at 45∘ into the left half-plane — damping ratio ζ=cos45∘=1/2.
Verify:ωn=∣s∣=(1/2)2+(1/2)2=1, and ζ=1/2≈0.707 — the "critically nice" GNC damping. ✔
Natural frequency. For LQR on this plant, ωn=kp=1/ρ=ρ−1/4=16−1/4=0.5.
Why? Closed-loop poly is s2+kds+kp, so ωn=kp=0.25=0.5.
Verify: compared to Example 6 (ωn=1), ρ grew by 16× and ωn dropped by 161/4=2× (from 1 to 0.5). Slower and gentler, exactly as "expensive control" predicts. Damping check: ζ=kd/(2ωn)=0.7071/(2⋅0.5)=0.7071=1/2 — same damping ratio (a scale-invariance of this problem). ✔
Forecast:Q has a zero eigenvalue, so we penalize nothing about velocity directly. Does the solution still stabilize both states?
State the requirement. A stabilizing P⪰0 exists iff (A,B) controllable and(A,Q) observable (Controllability and Observability).
Why this step? A degenerate Q is fine as long as the penalized quantity "sees" every unstable mode through the dynamics.
Pick Q. As defined above, Q=C=[1000], i.e. output =x1 (position).
Observability of (A,C).O=[CCA]=[1001], rank 2 = full.
Why does this rescue us? Even though we don't penalize velocity directly, velocity is observable from position through CA (position's rate reveals velocity). So the cost still "feels" a runaway velocity.
Consequence. The Example-6 solution K=[1,2] is valid and stabilizing despite the degenerate Q.
Verify: the observability matrix is the 2×2 identity, determinant =1=0 ⇒ full rank ⇒ LQR well-posed. ✔ (Contrast this with Cell I next, where the plant itself fails a condition.)
Forecast: the control u enters only the first row. The unstable mode is x2. Can any gain touch it?
Build the controllability matrix.C=[B,AB]. AB=[0001][10]=[00].
So C=[1000].
Why this step?(A,B) controllable ⇔ C has full rank n=2 (Controllability and Observability).
Rank.detC=0, rank =1<2. Uncontrollable.
Diagnose which mode. The uncontrollable mode is x2, whose eigenvalue is +1 (unstable). An unstable and uncontrollable mode cannot be moved by any u=−Kx.
Why does this kill LQR? No feedback gain can push a pole the control cannot reach. The Riccati equation will not yield a stabilizing P⪰0.
Conclusion. LQR has no stabilizing solution here; you must redesign the actuator (B) so it couples into x2.
Verify:detC=1⋅0−0⋅0=0 ⇒ rank-deficient ⇒ uncontrollable. The recipe correctly fails. ✔ This is the boundary case every LQR user must recognize.
Forecast: we found ωn=ρ−1/4. To slow down to 0.5, do we make ρ big or small?
Invert the frequency relation. From Example 7, ωn=ρ−1/4, so ρ=ωn−4=(0.5)−4=16.
Why this step? We derived ωn=ρ−1/4; solving for ρ gives the required control weight. A large ρ (expensive control) ⇒ slow response — matching the forecast.
Compute the gain (reuse Example 7).K=[0.25,0.7071].
Engineering reading.kp=0.25 (torque per radian) = the restoring "spring"; kd=0.707 (torque per rad/s) = the damping. Damping ratio ζ=1/2≈0.707 → about 5% overshoot, a smooth slew.
Why is this good for a satellite? Low ωn ⇒ 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:ρ=16⇒ωn=16−1/4=0.5 ✔; K=[0.25,0.7071] ✔ (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 Q, and the uncontrollable failure — all shown.