---
title: Higher-order equations and stability
heading: When three poles are one too many
eyebrow: A8 · Lesson 48 · Higher-order equations
xp: 40
---

::: hook
An amplifier with one internal time constant, wrapped in negative feedback, is stable at any gain. With two, it rings but stays stable. With three, turn the gain up far enough and it breaks into oscillation all by itself. Each time constant adds an order to the differential equation and a root to its characteristic polynomial, and with three roots, feedback can push a pair of them across into the right half of the complex plane. Checking whether that has happened, without finding the roots, is a classic engineering skill.
:::

::: play
- Three identical first-order stages in a feedback loop give the characteristic equation $(s + 1)^3 + K = 0$. The × marks are the roots for $K = 0$; the curves show where the roots move as the loop gain $K$ grows.
- Slide $K$. At what gain do two roots cross the imaginary axis?
- Past that point the loop oscillates on its own.
:::
:::

```sim plot
view: splane
x: sigma = -4..2 rad/s
y: omega = -3..3 rad/s
slider: K = 0..12 step 0.1 = 2
den: (s + 1)^3
locus: K = 0..12
readout: loop gain = K | digits: 3
readout: oscillates above = 8 | digits: 3
```

::: predict
## A cubic characteristic equation has all positive coefficients. Is the system necessarily stable?

- [ ] Yes: positive coefficients mean negative roots
- [x] No: two complex roots can still have positive real parts
- [ ] Only if the leading coefficient is 1
- [ ] It can't be decided without solving

::: reveal
No. Positive coefficients are necessary for stability but not enough beyond second order. $s^3 + s^2 + s + 2$ has all positive coefficients, yet a pair of its roots has positive real part. For a cubic $s^3 + a_2s^2 + a_1s + a_0$, stability needs one more condition: $a_2a_1 > a_0$.
:::
:::

::: nameit
## The characteristic polynomial

An $n$th-order equation $y^{(n)} + a_{n-1}y^{(n-1)} + \cdots + a_0y = 0$ has characteristic polynomial $s^n + a_{n-1}s^{n-1} + \cdots + a_0$ and $n$ roots. Each root $r$ of multiplicity $m$ gives $e^{rt}, te^{rt}, \ldots, t^{m-1}e^{rt}$; complex pairs give $e^{\sigma t}\cos\omega t$ and $e^{\sigma t}\sin\omega t$. In state form it's an $n \times n$ system whose eigenvalues are these roots.

The system is **stable** exactly when every root has negative real part.

## Testing without finding roots (Routh-Hurwitz)

| Order | Stable exactly when |
|---|---|
| 2: $s^2 + a_1s + a_0$ | $a_1 > 0$, $a_0 > 0$ |
| 3: $s^3 + a_2s^2 + a_1s + a_0$ | all $a_i > 0$ and $a_2a_1 > a_0$ |

At the boundary $a_2a_1 = a_0$, two roots sit on the imaginary axis at $\pm j\sqrt{a_1}$, and the system oscillates at that frequency. The general test (the Routh array) extends this to any order; S9 develops it.

## Three stages in a loop

For $(s + 1)^3 + K = s^3 + 3s^2 + 3s + (1 + K)$, the test is $3 \times 3 > 1 + K$, so the loop is stable for $K < 8$ and oscillates at $\omega = \sqrt 3$ when $K = 8$. That's how a ring of three inverting stages, or an RC phase-shift oscillator, starts oscillating.

## Butterworth filters

Higher-order filters are designed by placing roots. A third-order Butterworth low-pass has $s^3 + 2s^2 + 2s + 1 = (s + 1)(s^2 + s + 1)$, with roots evenly spaced on a semicircle: $-1$ and $-\frac{1}{2} \pm j\frac{\sqrt 3}{2}$.
:::

::: example
## Is $s^3 + 2s^2 + 3s + 5$ stable?

::: solution
1. **Signs.** All coefficients are positive.
2. **Routh-Hurwitz test.**
   $$\begin{aligned} a_2a_1 &= 2 \times 3 \\ &= 6 \end{aligned}$$
   which is greater than $a_0 = 5$.
3. **Margin.** It's stable, though with little margin: raise $a_0$ past 6 and it oscillates.

**Answer:** yes, it's stable, though only just: raising $a_0$ past 6 would make it oscillate.
:::
:::

::: example
## Find the roots of the third-order Butterworth polynomial $s^3 + 2s^2 + 2s + 1$.

::: solution
1. **Find one root.** Try $s = -1$:
   $$-1 + 2 - 2 + 1 = 0$$
2. **Divide it out.** Dividing out $(s + 1)$ leaves $s^2 + s + 1$, with roots
   $$s = \frac{-1 \pm j\sqrt 3}{2}$$
3. **Where they lie.** All three roots lie on the unit circle, at $180°$ and $\pm 120°$.

**Answer:** $s = -1$ and $s = (-1 \pm j\sqrt3)/2$, all on the unit circle, at 180° and ±120°.
:::
:::

::: example
## For which $K$ is $s^3 + 3s^2 + 3s + K$ stable?

::: solution
1. **The cubic test.** For a cubic $s^3 + a_2s^2 + a_1s + a_0$, Routh-Hurwitz requires all coefficients positive and $a_2a_1 > a_0$.
2. **Apply it.** Here that's $K > 0$ and $3 \times 3 > K$, so
   $$0 < K < 9$$
3. **At the edge.** At $K = 9$ the polynomial factors as
   $$(s + 3)(s^2 + 3)$$
   A pair of roots sits on the imaginary axis at $\pm j\sqrt3$, and the system oscillates at $\sqrt3$ rad/s without growing or decaying.
4. **What the polynomial is.** This polynomial is three identical first-order stages in a loop with gain $K$.

**Answer:** it's stable for $0 < K < 9$.
:::
:::

::: check
given: a2 = 2 | 3 | 4; a1 = 3 | 5
answer: a2*a1

## $s^3 + \given{a2}s^2 + \given{a1}s + a_0$ is stable for $a_0$ between 0 and what value?

::: right
Right. It needs $a_2a_1 > a_0$: $a_0 <$ {answer}.
:::

::: misses
- [a2 + a1] The condition is a product, $a_2a_1$.
- [a1] Multiply by $a_2$.
- [any] Not yet. Use the cubic's Routh-Hurwitz condition.
:::
:::

::: check
given: a1 = 3 | 4 | 9
answer: sqrt(a1)
tolerance: 0.5%

## A cubic $s^3 + a_2s^2 + \given{a1}s + a_0$ is exactly on the stability boundary ($a_2a_1 = a_0$). At what angular frequency does it oscillate?

::: right
Right. The roots on the axis are $\pm j\sqrt{a_1}$ = {answer} rad/s.
:::

::: misses
- [a1] Take the square root.
- [any] Not yet. Substitute $s = j\omega$; the imaginary part gives $\omega^2 = a_1$.
:::
:::

::: check
given: n = 2..9 int
answer: n

## How many independent solutions does an equation of order {n} have?

::: right
Right. One per root of its degree-{n} characteristic polynomial, counting multiplicity: {answer}.
:::

::: misses
- [n - 1] The polynomial has degree {n}.
- [any] Not yet. Count the roots.
:::
:::

::: check
given: K = 2 | 5 | 7
answer: 8 - K

## Three stages in a loop give $(s + 1)^3 + K = 0$. With $K$ = {K}, how much more gain could the loop take before oscillating?

::: right
Right. The limit is $K = 8$, so the margin is {answer}.
:::

::: misses
- [3 - K] The condition is $3 \times 3 > 1 + K$, so $K < 8$.
- [any] Not yet. Expand and apply $a_2a_1 > a_0$.
:::
:::

::: check
given: c = 2 | 4; t = 0.5 | 2
answer: t^2*exp(-c*t)
tolerance: 0.5%

## $(s + \given{c})^3$ has a triple root. One of its solutions is $t^2e^{-\given{c}t}$. What is it at $t$ = {t}?

::: right
Right. {answer}: a triple root brings $e^{rt}$, $te^{rt}$ and $t^2e^{rt}$.
:::

::: misses
- [t*exp(-c*t)] That's the second solution; the third has $t^2$.
- [any] Not yet. Evaluate $t^2e^{-ct}$.
:::
:::

::: check
kind: choice

## Which cubic is stable?

- [x] $s^3 + 4s^2 + 5s + 2$
- [ ] $s^3 + s^2 + s + 2$
- [ ] $s^3 + 3s^2 - s + 1$
- [ ] $s^3 + 2s^2 + 3s + 7$

::: right
Right. All positive and $4 \times 5 = 20 > 2$. (It's $(s + 1)^2(s + 2)$.)
:::

::: misses
- [2] $1 \times 1 = 1 < 2$: unstable despite positive coefficients.
- [3] A negative coefficient means instability.
- [4] $2 \times 3 = 6 < 7$.
- [any] Check every coefficient is positive and $a_2a_1 > a_0$.
:::
:::

::: check
kind: parts
given: a = 2 | 3 | 4; b = 3 | 5

## Consider $s^3 + \given{a}s^2 + \given{b}s + K$.

::: part
answer: a*b
tolerance: 0.5%

### What is the largest $K$ for stability?

::: misses
- [a + b] Routh-Hurwitz needs $a_2a_1 > a_0$.
- [any] $ab > K$.
:::
:::

::: part
answer: sqrt(b)
unit: rad/s
tolerance: 0.5%

### At that $K$, at what frequency does it oscillate?

::: misses
- [any] It factors as $(s + a)(s^2 + b)$.
:::
:::
:::

::: check
kind: derivation
vars: w = 0.5..3

## The third-order Butterworth polynomial scaled to corner $w$ is $s^3 + 2ws^2 + 2w^2s + w^3$.

::: step
answer: -w

### It has one real root. What is it?
:::

::: step
answer: w^2

### The other two roots satisfy $s^2 + ws + w^2 = 0$. What is their product?
:::

::: right
Right. All three roots lie on a circle of radius $w$, as Butterworth roots do.
:::
:::

::: explain
## Why can feedback make a three-stage amplifier oscillate when it can't make a one-stage amplifier oscillate?

::: model
Each first-order stage delays the signal's phase by up to 90° as frequency rises. One stage can never reach the 180° needed to turn negative feedback into positive feedback, and two only approach it. Three stages pass 180° at some frequency ($\sqrt 3$ rad/s for three identical unit stages). If the loop gain at that frequency is at least 1 ($K \ge 8$ here), a signal goes around the loop and comes back in phase and no smaller, so it sustains itself. In the polynomial, two roots have crossed into the right half-plane.
:::
:::

::: practice

::: check
given: a2 = 5 | 6; a1 = 2 | 4; a0 = 7 | 30
answer: step(a2*a1 - a0)

## Enter 1 if $s^3 + \given{a2}s^2 + \given{a1}s + \given{a0}$ is stable, 0 if not.

::: misses
- [any] Check $a_2a_1 > a_0$.
:::
:::

::: check
given: K = 1..12 int
answer: 1 + K

## Expanding $(s + 1)^3 + \given{K}$, what is the constant term?

::: misses
- [K] $(s + 1)^3$ contributes 1.
- [any] $1 + K$.
:::
:::

::: check
given: w = 0.5 | 1 | 2 | 5 | 10 | 100
answer: w
unit: rad/s

## A Butterworth filter's roots lie on a circle of radius {w} rad/s. What is its cutoff frequency, in rad/s?

::: misses
- [any] The radius of the circle is the cutoff.
:::
:::
:::
