x[n]1DELAY0GAIN×ay[n]–1import numpy as np2r, w = 0.9, np.pi/43a = [1, -2*r*np.cos(w), r*r]4p = np.roots(a)5print(abs(p) < 1)00000000
-2-1012-101Re zIm zZ-PLANE−0.80.811.2pole z = 0.8 · zero z = 0|pole| = 1: on the circle|pole| = 1.2: outside|pole| = 0.8: insidestable ⇔ every |pole| < 1|p| = 0.9 · angle ±π/40246810-1012345n (sample number)h[n]IMPULSE RESPONSEh[n] = 0.8ⁿΣ|h[n]| = 5h[n] = 1 foreverh[11] ≈ 7.43: off the toph[n] = (−0.8)ⁿrings every 8 · fades ×0.9
Coloured parts: what the current step is about; everything else rests in whiteBlocks: input cell x[n], the adder, output cell y[n], the delay box z⁻¹, the loop gain a and a Python code cardPlots: the z-plane with the unit circle and the pole (×), and the impulse response h[n] as stemsValue tokens carry one kick round the loop; the pole glides to each new loop gainOne kick into y[n] = a·y[n−1] + x[n] gives h[n] = aⁿ: it fades for |a| < 1, stays for a = 1 and grows for |a| > 1. The pole of H(z) = z/(z − a) is a. The rule "every pole inside the unit circle" is for causal systems, whose region of convergence lies outside the largest pole. In general a system is stable exactly when its region of convergence contains the unit circle (Oppenheim and Schafer, §3.1 and §5.2).

Feedback and echoes

  1. Our system: y[n] = a·y[n−1] + x[n]. The delay box remembers the last output, the gain block multiplies it by a, and the adder adds the new input. We kick it once: x[n] = 1, then zeros.

Poles and BIBO stability

Inside, on, outside

Complex poles in code

The working

# step 1/10 · loop

y[n] = a·y[n−1] + x[n]

delay z⁻¹   holds y[n−1], the last output
gain a      multiplies it by a
adder       adds the new input x[n]

input: the unit impulse δ[n]
  x[n] = 1, 0, 0, 0 ...
start at rest: y[−1] = 0

the output is the impulse response h[n]

The loop gains 0.8, 1, 1.2 and −0.8 and the pole pair 0.9·e^(±jπ/4) are chosen examples. Every value, stem and pole position in the figure is computed from this model by running the difference equation. With a pole on the unit circle some books say "marginally stable": the impulse response does not die out but does not grow either. It is still not BIBO stable, because a bounded input (here a constant) can drive the output without limit.