ENع
←Stability and the unit circle
Lesson 37 · The Z-transform

Stability and the unit circle

14 min10 steps5 questionsAdvanced
About this lesson

A digital filter with feedback can settle down, ring forever or blow up. Watch one feedback loop, y[n] = a·y[n−1] + x[n], take a single kick while its loop gain a moves from 0.8 to 1, 1.2 and −0.8. The loop gain is the pole of H(z), and whether the echoes die out depends only on how far that pole is from 0. You will meet BIBO stability (Σ|h[n]| < ∞), the rule "every pole strictly inside the unit circle" for causal systems, a ringing pair of complex poles, and the same test in Python with numpy. It builds on the lessons on transfer functions H(z) and poles and zeros; the continuous-time version (poles in the left half of the s-plane) is in the Circuits lesson on Laplace analysis.

You'll learn to

Tick what you feel confident about. These self-checks do not affect your lesson score.

Fig 37 · Interactive
01 / 10

A loop that feeds itself

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.

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]
Loading figure…
or ← →
Read the lesson step by step
  1. A loop that feeds itself

    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.

    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]
  2. a = 0.8: the echoes die out

    Set a = 0.8. The kick goes round the loop and is multiplied by 0.8 on every pass: 1, 0.8, 0.64, 0.51, 0.41 ... Each output is 0.8 times the last, so h[n] = 0.8ⁿ shrinks toward zero.

    n   y[n−1]  ×0.8   + x[n]   y[n]
    0   0       0      1        1
    1   1       0.8    0        0.8
    2   0.8     0.64   0        0.64
    3   0.64    0.512  0        0.51
    4   0.512   0.41   0        0.41
    
    h[n] = 0.8ⁿ  for n ≥ 0
    h[11] = 0.8¹¹ = 0.09
  3. The pole is the loop gain

    In the z-domain, H(z) = 1/(1 − 0.8z⁻¹) = z/(z − 0.8). It blows up at z = 0.8: the pole. The pole is exactly the loop gain a, and h[n] = (pole)ⁿ. Its distance from 0 sets how fast echoes fade.

    Z-transform both sides:
      Y(z) = a·z⁻¹·Y(z) + X(z)
      H(z) = Y(z)/X(z) = 1 / (1 − a·z⁻¹)
                      = z / (z − a)
    
    a = 0.8:
      pole  z = 0.8   (denominator = 0)
      zero  z = 0     (numerator = 0)
    
    inverse transform (ROC |z| > 0.8):
      h[n] = 0.8ⁿ·u[n] = (pole)ⁿ
  4. Stable: bounded in, bounded out

    A system is BIBO stable if every bounded input gives a bounded output. That holds exactly when Σ|h[n]| is finite. Here Σ0.8ⁿ = 1/(1 − 0.8) = 5: inputs never above 1 give outputs never above 5.

    BIBO: bounded input -> bounded output
    
    |y[n]| = |Σ h[k]·x[n−k]|
           ≤ Σ |h[k]| · max|x|
    
    stable  <=>  Σ |h[n]| < ∞
    
    a = 0.8:
      Σ 0.8ⁿ = 1 + 0.8 + 0.64 + ...
             = 1 / (1 − 0.8) = 5
      |x| ≤ 1  ->  |y| ≤ 5
      (x[n] = 1 for all n reaches it)
  5. a = 1: on the circle, it never dies

    Set a = 1. Now 1, 1, 1, 1 ... forever: the pole sits on the unit circle, |z| = 1. Σ|h[n]| grows without limit, and a steady input of 1 makes the output climb 1, 2, 3 ... with no ceiling. Not stable.

    a = 1:  y[n] = y[n−1] + x[n]
            (an accumulator, a running sum)
    
    h[n] = 1ⁿ = 1, 1, 1, 1 ...
    Σ |h[n]| = 1 + 1 + 1 + ... = ∞
    
    bounded input x[n] = 1 for n ≥ 0:
      y[n] = n + 1 = 1, 2, 3, 4 ...
      no bound -> not BIBO stable
    
    pole at z = 1, on the unit circle
  6. a = 1.2: outside, it explodes

    Set a = 1.2. Each pass multiplies by 1.2: 1, 1.2, 1.44, 1.73, 2.07 ... and h[11] ≈ 7.43. The pole at z = 1.2 is outside the unit circle, so the response grows without bound: unstable.

    a = 1.2:  h[n] = 1.2ⁿ
      1, 1.2, 1.44, 1.73, 2.07 ...
      h[11] = 1.2¹¹ ≈ 7.43
      h[50] = 1.2⁵⁰ ≈ 9100
    
    one bounded kick (x = 1 once)
    -> an unbounded output: unstable
    
    pole at z = 1.2:  |z| > 1, outside
    (the plot clips stems above 5)
  7. a = −0.8: only the size counts

    Set a = −0.8. The sign flips on every pass: 1, −0.8, 0.64, −0.51 ... but the size still shrinks, because |−0.8| = 0.8 < 1. A pole on the left is just as stable. Only its distance from 0 matters.

    a = −0.8:  h[n] = (−0.8)ⁿ
      1, −0.8, 0.64, −0.51, ...
    
    |h[n]| = 0.8ⁿ: the same sizes as a = 0.8
    Σ |h[n]| = 5  -> stable
    
    pole at z = −0.8:  |z| = 0.8 < 1
    a negative pole makes the output
    flip sign every sample
  8. The rule: every pole inside

    A causal system is stable if and only if every pole has |z| < 1: strictly inside the unit circle. Then the region of convergence, |z| > |pole|, contains the circle. On the circle is not stable; outside is unstable.

    causal:  h[n] = 0 for n < 0
      ROC = outside the largest pole
            |z| > max |pole|
    
    stable  <=>  ROC contains |z| = 1
            <=>  every |pole| < 1
    
    poles tried:
      0.8    inside   stable
      −0.8   inside   stable
      1      on       not stable
      1.2    outside  unstable
    
    zeros do not matter for stability
  9. Two poles: ring, then fade

    Two delays give two poles. Put them at 0.9·e^(±jπ/4). The response rings and fades: 1, 1.27, 0.81, 0, −0.66 ... The angle π/4 sets an 8-sample swing; the radius 0.9 < 1 sets the fade. Stable.

    poles p = 0.9·e^(±jπ/4) = 0.64 ± 0.64j
    
    H(z) = 1 / (1 − 2r·cosθ·z⁻¹ + r²·z⁻²)
    y[n] = 1.27·y[n−1] − 0.81·y[n−2] + x[n]
    
    h[n] = 0.9ⁿ · sin((n+1)·π/4) / sin(π/4)
         = 1, 1.27, 0.81, 0, −0.66 ...
    
    angle  π/4 -> one swing every 8 samples
    radius 0.9 -> shrinks ×0.9 per sample
  10. Check the poles in Python

    In Python 3 with numpy, np.roots finds the poles from the feedback coefficients. abs(p) gives each pole's distance from 0: both 0.9. abs(p) < 1 is True for both: every pole is inside, so the filter is stable.

    import numpy as np
    r, w = 0.9, np.pi/4
    a = [1, -2*r*np.cos(w), r*r]
    p = np.roots(a)
    print(abs(p) < 1)
    
    >>> p
    array([0.6363961+0.6363961j, 0.6363961-0.6363961j])
    >>> abs(p)
    array([0.9, 0.9])
    prints: [ True  True]
    
    np.roots wants z² − 2r·cosθ·z + r²:
    H(z)'s denominator times z²

Quiz Unlocks after the last step.