TExcelTAD
Home › Fourier Analysis & Signals › Poles, Zeros and Stability

Poles, Zeros and Stability

A rational transfer function is determined (up to a gain) by its zeros, where H(z)=0H(z) = 0, and its poles, where H(z)H(z) blows up. Plotting them in the complex plane tells you at a glance whether a filter is stable, what kind of filter it is, and roughly what its frequency response looks like. It is the main design tool for IIR filters.

Factoring the transfer function

H(z)=g (1−q1z−1)⋯(1−qMz−1)(1−p1z−1)⋯(1−pNz−1)H(z) = g\, \frac{(1 - q_1 z^{-1}) \cdots (1 - q_M z^{-1})}{(1 - p_1 z^{-1}) \cdots (1 - p_N z^{-1})}

with zeros qkq_k and poles pkp_k. For real coefficients they come in conjugate pairs.

Stability: a causal system is stable exactly when all poles lie strictly inside the unit circle. Each pole contributes a term rkpknr_k p_k^n to the impulse response, which decays only if ∣pk∣<1\lvert p_k \rvert < 1.

python · try it yourself
import numpy as np

def poles_zeros(b, a):
    return np.roots(b), np.roots(a)               # roots of polynomials in z (coefficients of z^0, z^-1, ...)

filters = {
    "one-pole low-pass": ([0.1], [1, -0.9]),
    "notch at 50 Hz/500 Hz": ([1, -2 * np.cos(0.2 * np.pi), 1], [1, -2 * 0.98 * np.cos(0.2 * np.pi), 0.98 ** 2]),
    "resonator r = 1.02": ([1], [1, -2 * 1.02 * np.cos(0.3), 1.02 ** 2]),
}
for name, (b, a) in filters.items():
    z, p = poles_zeros(b, a)
    print(f"{name}:")
    print("   zeros |q|:", (np.round(np.abs(z), 4)).tolist(), "  poles |p|:", np.round(np.abs(p), 4).tolist(),
          "  stable:", bool(np.all(np.abs(p) < 1)))
one-pole low-pass:
   zeros |q|: []   poles |p|: [0.9]   stable: True
notch at 50 Hz/500 Hz:
   zeros |q|: [1.0, 1.0]   poles |p|: [0.98, 0.98]   stable: True
resonator r = 1.02:
   zeros |q|: []   poles |p|: [1.02, 1.02]   stable: False

The resonator with poles at radius 1.02 is unstable: its impulse response grows by 2 % per sample.

Reading the frequency response geometrically

At frequency ω\omega, the point eiωe^{i\omega} moves around the unit circle. The gain ∣H∣\lvert H \rvert is gg times the product of distances to the zeros divided by the product of distances to the poles:

  • A zero on the circle makes the gain exactly 0 at that frequency (a notch).
  • A pole close to the circle makes the gain large near that frequency (a resonance), and the closer it is, the sharper the peak.
python · try it yourself
import numpy as np

for r in (0.5, 0.9, 0.99):
    theta = np.pi / 4                                  # resonance at a quarter of the sampling rate / 2
    a = [1, -2 * r * np.cos(theta), r * r]
    w = np.linspace(0, np.pi, 4001)
    z = np.exp(1j * w)
    H = 1 / (a[0] + a[1] / z + a[2] / z ** 2)
    G = np.abs(H) / np.abs(H).max()
    bw = (w[G >= 1 / np.sqrt(2)].max() - w[G >= 1 / np.sqrt(2)].min()) / np.pi
    print(f"pole radius {r}: peak at omega = {w[np.argmax(np.abs(H))] / np.pi:.3f} pi, peak gain {np.abs(H).max():8.2f}, -3 dB bandwidth {bw:.4f} pi")
pole radius 0.5: peak at omega = 0.155 pi, peak gain     1.89, -3 dB bandwidth 0.3848 pi
pole radius 0.9: peak at omega = 0.248 pi, peak gain     7.44, -3 dB bandwidth 0.0678 pi
pole radius 0.99: peak at omega = 0.250 pi, peak gain    71.07, -3 dB bandwidth 0.0060 pi

As the poles approach the circle, the peak sharpens: the bandwidth is about 2(1−r)2(1 - r) radians. This is how a single biquad makes a narrow band-pass or a resonant synthesizer filter.

Minimum phase and inverses

If all zeros are also inside the circle, the filter is minimum phase: its inverse 1/H1/H (which swaps poles and zeros) is stable too. Equalizers that undo a channel's response need this; a zero outside the circle cannot be inverted causally and stably.

In software

  • np.roots and scipy.signal.tf2zpk / zpk2tf convert between coefficients and poles/zeros; zpk2sos builds stable second-order sections.
  • Filter design by pole placement is the basis of resonant filters, formant synthesis of vowels and many control loops.

Exercises

Exercise 1: Stable?

Is H(z)=11−1.5z−1+0.56z−2H(z) = \frac{1}{1 - 1.5z^{-1} + 0.56z^{-2}} stable?

Answer

Yes: the poles are 0.8 and 0.7.

Solution

z2−1.5z+0.56=(z−0.8)(z−0.7)z^2 - 1.5z + 0.56 = (z - 0.8)(z - 0.7), both inside the unit circle.

Exercise 2: Place a notch

Where must the zeros go to block f=1f = 1 kHz at fs=8f_s = 8 kHz?

Answer

At e±iπ/4e^{\pm i\pi/4}.

Solution

ω0=2π⋅1000/8000=π/4\omega_0 = 2\pi \cdot 1000/8000 = \pi/4. Zeros at e±iπ/4e^{\pm i\pi/4} give the numerator 1−2cos⁡(π/4)z−1+z−2=1−2z−1+z−21 - 2\cos(\pi/4)z^{-1} + z^{-2} = 1 - \sqrt{2}z^{-1} + z^{-2}.

Exercise 3: Watch an unstable filter (code)

Run the impulse response of the resonator with r=1.02r = 1.02, θ=0.3\theta = 0.3 for 200 samples and report the largest magnitude in the first and last 20 samples.

Answer

It grows by a factor of roughly 1.02180≈351.02^{180} \approx 35 between them.

Solution
python · try it yourself
import numpy as np
r, th = 1.02, 0.3
a1, a2 = -2 * r * np.cos(th), r * r
y = np.zeros(200)
for n in range(200):
    y[n] = (1.0 if n == 0 else 0.0) - a1 * (y[n - 1] if n >= 1 else 0) - a2 * (y[n - 2] if n >= 2 else 0)
print(round(float(np.max(np.abs(y[:20]))), 2), round(float(np.max(np.abs(y[-20:]))), 2), round(1.02 ** 180, 1))
4.54 154.11 35.3

Test yourself

A causal LTI system is stable when…

  1. all zeros are inside the unit circle
  2. all poles are strictly inside the unit circle
  3. it has no poles
  4. the gain is below 1

A zero exactly on the unit circle at angle ω0\omega_0 causes…

  1. a resonance at ω0\omega_0
  2. zero gain at ω0\omega_0
  3. instability
  4. a delay

Moving a pole closer to the unit circle makes the resonance…

  1. wider
  2. sharper and taller
  3. disappear
  4. move to DC