Log inStart free
LESSON 20.07 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

LQR

Watch LQR turn a cost into four fixed gains that balance the cart-pole.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 20.07 · CONTROL BAYNO FORCE · FALLS AT 0.38 S · MAX |λ| 1.079
01
Stage 1 of 6 · Falls alone
With no force, the pole falls at 0.38 s. One eigenvalue of A is 1.079, so the plant is not stable.
Explain it simply

Here nothing pushes the cart, and the tilted pole falls in 0.38 seconds. In the panel, each dot is one eigenvalue of the linear model. The red dot is outside the circle, so its motion grows about 46 times each second. The dot at 1 counts twice: it is the cart, which rolls on and never comes back.

With no force the pole falls at 0.38 s. The eigenvalues of A are 1.0794, 1.0000, 1.0000, 0.9206. Only 1.0794 is outside the unit circle.

cart, measured runforces, gains, limittap, fall, growing modeeigenvalues with feedback, rankstwin cart (grey)
−2.4 m2.4 m−12012angle θ (°)−2.402.4cart x (m)−10010force F (N)0 s1 s2 s3 s4 stapfalls at 0.38 seigenvalues λ of A (zoomed)0.80.91.0real partimaginary part|λ| < 1: shrinksgrows|λ| = 11.0791 (×2)0.921|λ| 1.0794 → ×45.7 per s: grows|λ| 1.0000 → ×1.00 per s: stays (×2, the cart)|λ| 0.9206 → ×0.016 per s: shrinksno force−2.4 m2.4 m−12012angle θ (°)−2.402.4cart x (m)−10010force F (N)0 s1 s2 s3 s4 stapfalls at 0.38 seigenvalues λ of A (zoomed)0.80.91.0real partimaginary part|λ| < 1: shrinksgrows|λ| = 11.0791 (×2)0.921|λ| 1.0794 → ×45.7 per s: grows|λ| 1.0000 → ×1.00 per s: stays (×2, the cart)|λ| 0.9206 → ×0.016 per s: shrinksno force
Toy: the 20.C1 cart-pole, 4 s at 50 steps per second
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
sk+1=A sk,stable if all ∣λ(A)∣<1\sy{s}{data}{s}_{k+1} = A\,\sy{s}{data}{s}_k,\quad \text{stable if all } |\sy{lam}{out}{\lambda}(A)| < 1
∣λmax⁡∣=1.0794>1, 1.079450=45.7 per s|\lambda_{\max}| = 1.0794 > 1,\ 1.0794^{50} = 45.7\text{ per s}

A motion shrinks only if its eigenvalue has a size under 1.

Common mix-ups

MYTHControllable means the 10 N force can do it.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With R = 1 instead of 0.01, does the cart wander further?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.