School/✦ Research Engineer/Week 4
Stability of x[k+1] = A·x[k]
A digital controller updates its state 1000 times a second. One number decides whether that state settles or explodes. Which one?
About 45 min · 3 goals · Checked by automated tests
1.Why should I care?
Sampled controllers, population models, Markov chains and every explicit numerical integrator are iterations x[k+1] = A·x[k]. Eigenvalues tell you, before running anything, whether the iteration settles, oscillates or blows up.
- ◇ Show that x[k] = c₁λ₁ᵏv₁ + c₂λ₂ᵏv₂ for a diagonalisable 2×2 A.
- ◇ Decide stability of x[k+1] = A·x[k] from the spectral radius max|λᵢ|.
- ◇ Interpret eigenvalues as modes of vibration and of decay.
2.Predict
A has eigenvalues 0.9 and −1.05. Starting from a generic x[0], what does x[k] do?
Guess first. Being wrong here is how the surprise works.
3.Discover
Choose the 'stable' and 'unstable' matrices. Step through and watch the unnormalised size ‖Aᵏx₀‖ in the table. Compare with the eigenvalues reported in the readout.
Loading the interactive…
Can't use the interactive? Read a description instead
The power-iteration diagram plots the normalised iterate on the unit circle and lists, in a table, the eigenvalue estimate and the unnormalised size of A to the power k times x0. The readout states whether the size shrinks (stable) or grows (unstable) and gives the true eigenvalues.
4.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
Eigenvalues 0.5 and 0.99. Stable?
5.Watch
→ Watch for the trace and determinant checks, and for the matrices whose eigenvalues are complex.
A university lecture on det(A − λI) = 0, trace and determinant checks, and matrices whose eigenvalues are complex.
Length: see YouTube · captions on YouTube · source
Nothing loads from YouTube until you press play.
The video is optional: everything you need is also in the lesson text and the interactive.
6.Understand
Modes
Each eigenpair (λ, v) is a mode: start along v and you stay along v, scaled by λ each step. A general start is a mix of modes, and over time the mode with the largest |λ| dominates. That dominance is what power iteration (week 5) exploits.
Continuous versus discrete
For x′ = Ax (continuous time) the test is Re(λ) < 0. For x[k+1] = Ax[k] (discrete) it is |λ| < 1. They are linked: sampling x′ = Ax every h seconds gives a discrete matrix with eigenvalues e^{λh}, and |e^{λh}| < 1 exactly when Re(λ) < 0. Explicit Euler instead gives 1 + hλ, which is why it can go unstable (week 7).
Vibration meaning
Complex eigenvalues of an iteration or ODE mean oscillation. Their imaginary part sets frequency, and their real part (or modulus) sets decay. Lightly damped modes, with eigenvalues close to the stability boundary, ring for a long time and are the ones engineers watch.
Explain it another way
Each mode is a ball rolling in its own groove. If any groove tilts outwards (|λ| > 1), that ball rolls away, and the whole system with it.
x[k+1] = Ax[k] is asymptotically stable iff ρ(A) < 1. For defective A, terms like kλᵏ appear, but they still decay when |λ| < 1.
For a 2×2 real A, the Jury conditions give stability iff |det A| < 1 and |tr A| < 1 + det A.
A discrete PID loop can be stable at one sample rate and unstable at another, because the closed-loop matrix's eigenvalues move with the sample time.
Derivation: Why the spectral radius decides
Suppose A has independent eigenvectors v₁, v₂. Write x[0] = c₁v₁ + c₂v₂.
Then x[1] = A x[0] = c₁λ₁v₁ + c₂λ₂v₂, and by induction x[k] = c₁λ₁ᵏv₁ + c₂λ₂ᵏv₂.
If every |λᵢ| < 1, every term goes to zero: the iteration is asymptotically stable.
If some |λᵢ| > 1 and its cᵢ ≠ 0, that term grows without bound: unstable.
So stability depends on the spectral radius ρ(A) = max |λᵢ| < 1. Complex λ = re^{iφ} give rotation by φ per step with size rᵏ.
Worked example 1
Is x[k+1] = [[0.5, 0.4], [0.1, 0.6]]·x[k] stable?
tr = 1.1, det = 0.30 − 0.04 = 0.26. λ = (1.1 ± √(1.21 − 1.04))/2 = (1.1 ± 0.412)/2 ≈ 0.756 and 0.344. Both have |λ| < 1: stable. Jury check: |0.26| < 1 and 1.1 < 1.26 ✓.
Common mix-ups
- For any linear system, |λ| < 1 means stable.
✓ That is the discrete-time test. For x′ = Ax, use Re(λ) < 0. - If most eigenvalues are stable, the system is stable.
✓ One unstable mode makes the whole system unstable (unless it is never excited, which noise will eventually do).
7.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 2 · a fresh version every time
A = [[-11, -8], [16, 13]]. Find its smaller eigenvalue.
Practice 3
A mode has λ = 0.9. About how many steps until it falls to half its size? (Round to the nearest step.)
Practice 4
Eigenvalues 0.6 ± 0.9i. Stable?
Practice 5
x′ = Ax has eigenvalues −2 and −0.1. Is it stable?
8.Apply it
Take x′ = [[0, 1], [−4, −0.4]]x (a lightly damped oscillator) and Euler-discretise it: A_h = I + hA. Find the largest h for which ρ(A_h) < 1, and check it in the Code Lab.
9.Reflect
Concepts: Eigenvalues and the stability of dynamic systems · Stability, overshoot and delay