TactivergeLite

Lite / Textbooks / Feedback and Control / Chapter 6

6. Stability and poles

Version 1 · Technically checked (automated checks only) · 4 source lessons · Full interactive version

Introduction

A stable system, nudged, settles back; an unstable one runs away. For linear systems the verdict is written in the poles, the eigenvalues of the state matrix. Poles in the left half of the complex plane decay, poles in the right half grow, and an imaginary part means oscillation. The slowest pole dominates how long settling takes. And a computer sampling too slowly can turn a stable loop unstable.

Figure 6.1. Where the poles sit decides the fate (described in words)

Poles on the complex plane with the stable left half shaded: a pole at -2 decays with time constant 0.5 s; a pair at -0.5 ± 2j rings while decaying with time constant 2 s; a pole at +0.3 grows, doubling every 2.31 s.

Explanation

Built from 4 School lessons. Each part is the lesson's own explanation.

6.1 Stable means bounded

A pencil balanced on its tip and a pencil lying flat both sit still. Only one of them is stable. What test tells them apart?

BIBO stability

A system is BIBO stable if every bounded input produces a bounded output. For linear systems this is the same as every natural mode decaying. A response that grows without limit after a small push, however slowly, is unstable.

Poles tell you

Each pole p of a linear system contributes e^(pt) to the response. Write p = σ + jω. If σ < 0 the mode decays, if σ > 0 it grows, and ω ≠ 0 makes it oscillate. So the test is simple: every pole in the left half-plane means stable.

Marginal cases

A pole exactly on the imaginary axis (σ = 0) neither grows nor decays: an undamped spring oscillates forever; a pure integrator holds its value. These are marginally stable: a bounded input at the right frequency can still make the output grow, so engineers treat them as not good enough.

Common mix-ups

Open the Lite lesson: Stable means bounded

6.2 Eigenvalues: stability from the A matrix

You have the A matrix of a robot joint but no time to simulate it. Can two numbers tell you whether it will settle?

Eigenvalues of a 2×2

For A = [[a, b], [c, d]] the eigenvalues solve λ² − (trace)·λ + det = 0, with trace = a + d and det = ad − bc. So λ = trace/2 ± √(trace²/4 − det). Complex when det > trace²/4.

Reading the result

Real part negative: that mode decays like e^(Re λ·t). Positive: grows. Imaginary part ω: oscillation at ω rad/s. For a 2×2 system, both real parts are negative exactly when trace < 0 and det > 0: a two-second stability check.

Linking back to ζ and ωn

For a mass–spring–damper, det = k/m = ωn² and trace = −c/m = −2ζωn. So the eigenvalues are −ζωn ± ωn√(ζ² − 1): the same poles as before. State-space and second-order thinking are one idea seen two ways.

Common mix-ups

Open the Lite lesson: Eigenvalues: stability from the A matrix

6.3 When a computer makes a stable loop unstable

Proportional control of a heater can't go unstable on paper, however high the gain. Run it on a microcontroller and it oscillates wildly. Who is right?

Sample, compute, hold

A digital controller reads the sensor, computes a command and holds it until the next sample. Between samples the plant evolves open-loop. For a first-order plant this gives an exact recurrence: y[n+1] = a·y[n] + (1 − a)·K·u[n] with a = e^(−T/τ).

Overcorrection

With high gain, the held command pushes so hard that by the next sample the output has shot past the set point. The controller then pushes hard the other way. If each correction overshoots by more than the last error, the loop diverges. That is p = a − (1 − a)KKp < −1.

What helps

Sample faster (a → 1 and the limit grows), reduce the gain, or reduce delay. A common rule: sample 10–20 times per closed-loop time constant. The same mechanism explains why an Euler simulation with too big a step blows up (week 11).

Derivation: The gain limit of a sampled P loop
  1. Plant τ·dy/dt + y = K·u. The controller samples y[n] every T seconds and holds u[n] = Kp·(r − y[n]) until the next sample.

  2. With u constant over a period, the first-order solution gives exactly y[n+1] = a·y[n] + (1 − a)·K·u[n], with a = e^(−T/τ).

  3. Substitute u[n]: y[n+1] = (a − (1 − a)·K·Kp)·y[n] + (1 − a)·K·Kp·r. The error is multiplied by p = a − (1 − a)·K·Kp each sample.

  4. Stability needs |p| < 1. p < 1 always holds; p > −1 needs K·Kp < (1 + a)/(1 − a).

  5. Example: τ = 1 s, T = 0.5 s, K = 1: a = 0.607, so Kp < 1.607/0.393 = 4.08. Halve T to 0.25 s: a = 0.779, Kp < 8.05.

Common mix-ups

Open the Lite lesson: When a computer makes a stable loop unstable

6.4 From one second-order equation to two first-order ones

Computers can only take small steps forward. How do you step forward an equation that talks about acceleration?

Any order, first-order steps

An nth-order equation needs n initial conditions, so it has n states. Define x₁ = y, x₂ = ẏ, …, xₙ = y⁽ⁿ⁻¹⁾. Each state's derivative is the next state, except the last, which comes from the original equation.

The A and B matrices

For linear systems the right-hand sides are weighted sums, so they fit in matrices: dx/dt = A·x + B·u. A says how the states push on each other; B says how the input pushes on each state. The same code steps any system once you supply A and B.

Eigenvalues preview

Each eigenvalue λ of A gives a mode that behaves like e^(λt). Negative real part: decays. Positive: grows. Imaginary part: oscillates. You will use this in week 15; for now, notice that the phase-plane readout's eigenvalues change exactly when the picture changes shape.

Derivation: Mass–spring–damper in state-space form
  1. Start from Newton's second law for a mass on a spring with a damper: m·ẍ = F − c·ẋ − k·x.

  2. Choose states x₁ = x (position) and x₂ = ẋ (velocity). Then ẋ₁ = x₂ by definition.

  3. Divide Newton's law by m: ẋ₂ = ẍ = −(k/m)·x₁ − (c/m)·x₂ + F/m.

  4. Stack them: d/dt [x₁; x₂] = [[0, 1], [−k/m, −c/m]]·[x₁; x₂] + [0; 1/m]·F. That is dx/dt = A·x + B·u with u = F.

  5. The eigenvalues of A solve λ² + (c/m)·λ + k/m = 0, the same characteristic equation as the original ODE: λ = −ζωn ± ωn√(ζ² − 1).

Common mix-ups

Open the Lite lesson: From one second-order equation to two first-order ones

Worked examples

Stable means bounded: example 1

Poles at −2, −0.5 ± 4j. Stable? Which mode lasts longest?

Solution

All real parts are negative: stable. The pair at −0.5 decays slowest (envelope halves every ln 2/0.5 ≈ 1.4 s) and oscillates at 4 rad/s, so the response will ring for a few seconds.

Eigenvalues: stability from the A matrix: example 1

m = 1, c = 2, k = 5. Find the eigenvalues, ζ and ωn.

Solution

A = [[0, 1], [−5, −2]]: trace −2, det 5. λ = −1 ± 2j. ωn = √5 = 2.24 rad/s, ζ = 2/(2√5) = 0.447. Check: −ζωn = −1 ✓.

When a computer makes a stable loop unstable: example 1

A heater has τ = 120 s and K = 0.5 °C per %. The controller runs every 10 s. What is the largest stable Kp?

Solution

a = e^(−10/120) = 0.920. Limit KKp < 1.920/0.080 = 24.0, so Kp < 24.0/0.5 = 48 %/°C. Well above any sensible gain, so sampling every 10 s is fine here.

From one second-order equation to two first-order ones: example 1

Write L·di/dt + R·i + q/C = V(t) with q the capacitor charge (i = dq/dt) in state-space form.

Solution

States x₁ = q, x₂ = i. Then ẋ₁ = x₂ and ẋ₂ = (V − R·x₂ − x₁/C)/L. So A = [[0, 1], [−1/(LC), −R/L]], B = [0; 1/L]. It has the same shape as the mass–spring–damper with m ↔ L, c ↔ R, k ↔ 1/C.

Interactive figures, in words

Figure 6.2 from Stable means bounded

Move σ from −3 to +1 with ω = 3. Note the σ where the response stops dying away. Then set ω = 0 and repeat. Describe in one sentence what σ controls and what ω controls.

The pole locator shows an s-plane with the right half shaded as unstable and a plot of e^(σt)·cos(ωt). With σ negative the oscillation dies away; at σ = 0 it keeps a constant size; with σ positive it grows. Raising ω makes the oscillation faster without changing whether it grows.

Figure 6.3 from Eigenvalues: stability from the A matrix

Use the eigenvalue readout. Set k = 5 and c = 2 and confirm −1 ± 2j. Then find settings that give two different negative real eigenvalues, and settings that give a pure imaginary pair. Sketch the phase-plane shape for each.

The phase-plane sketcher shows the eigenvalues of the mass–spring–damper. With k = 5 and c = 2 they read −1 ± 2j and the path spirals inwards. With heavy damping both are negative real numbers and the path slides in without circling. With c = 0 they are purely imaginary and the path is a closed loop.

Figure 6.4 from When a computer makes a stable loop unstable

With T = 0.5 s, raise Kp until the samples start to grow, and compare with the readout's limit. Then halve T and find the new limit. What is the limit as T gets very small?

The sampled-loop diagram plots the output only at sample times. With a modest gain the samples rise to a level just below the set point. Past the computed gain limit they alternate above and below with growing size. Shortening the sample period raises the limit.

The interactive versions are in the full chapter.

Laboratory

These run in a browser on the full site (they need a faster connection). Simulations are simplified educational models.

Practice

Each question links to its Lite lesson, where your answer is checked on our server and a wrong answer gets a hint. Answers are never sent to your device.

  1. Which set of poles gives a stable system?
    Answer it in “Stable means bounded”
  2. Poles at −10 and −0.2. Which dominates the long-term response?
    Answer it in “Stable means bounded”
  3. An undamped mass on a spring is pushed at exactly its natural frequency. What happens?
    Answer it in “Stable means bounded”
  4. A has trace −3 and determinant 2. Stable?
    Answer it in “Eigenvalues: stability from the A matrix”
  5. A = [[0, 1], [−10, −2]]. What is the size of the imaginary part of its eigenvalues (rad/s)?
    Answer it in “Eigenvalues: stability from the A matrix”
  6. τ = 1 s, K = 1, sampling period T = 0.5 s. What is the largest stable Kp? (Two decimal places.)
    Answer it in “When a computer makes a stable loop unstable”
  7. Your digital P loop oscillates. Which change is most likely to fix it without slowing the response?
    Answer it in “When a computer makes a stable loop unstable”
  8. In A = [[0, 1], [−k/m, −c/m]], what does the entry −c/m in the bottom-right mean?
    Answer it in “From one second-order equation to two first-order ones”

Engineering applications

Self-balancing robots

An upright two-wheeled robot is unstable on its own: it has a pole in the right half-plane. Feedback moves that pole into the left half, which is why the robot falls the instant its controller stops.

Digital controllers

Every microcontroller loop adds delay. If the sample period is too long compared with the plant's dynamics, the loop that was stable on paper oscillates in hardware. Sampling well above the loop's bandwidth avoids this.

Watch (optional)

Streaming video uses a lot of data. Everything you need is in the text.

Summary

Glossary

Damping ratio
The damping ratio ζ describes how quickly oscillations die out in a second-order system: below 1 it oscillates, exactly 1 is critically damped, above 1 it creeps to the target without overshoot. Field Guide
First-order system and time constant
A first-order system responds to a step by approaching its new value exponentially; its time constant τ is the time to cover 63.2 % of the change. Field Guide
Matrix multiplication
Multiplying matrices combines rows of the first with columns of the second: each entry of the result is a dot product of a row and a column. Field Guide

Project: A stability map

For a mass–spring–damper written in state-space form, sweep the damping coefficient from negative to large positive values. Compute the eigenvalues at each step, plot them on the complex plane, and mark where the system changes from growing to ringing to creeping.

Deliverables

Write it up on paper or in your own notes. Lite never stores what you write.

References

← 5. Second-order response and damping7. PID control →