ENع
←The Z-transform
Lesson 33 · The Z-transform

The Z-transform and its region of convergence

16 min10 steps5 questionsAdvanced
About this lesson

The Z-transform turns a whole list of samples into one function of a complex number z: X(z) = Σ x[n]·z⁻ⁿ. Follow the fading signal x[n] = 0.8ⁿ: at z = 2 its terms shrink and the sum settles at 1.667; at z = 0.5 they grow and the sum blows up. The values of z where the sum converges form the region of convergence (ROC), here |z| > 0.8, bounded by the pole at z = 0.8. The unit circle inside the ROC gives the DTFT, and a left-sided signal shows why a formula without its ROC is not enough. It builds on the lessons on the DTFT and on difference equations; the Laplace transform, its continuous-time cousin, 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 33 · Interactive
01 / 10

A signal that fades

Here is a signal that fades: x[n] = 0.8ⁿ for n ≥ 0, and 0 before n = 0. Each sample is 0.8 times the one before: 1, 0.8, 0.64, 0.512 ... It shrinks forever but never reaches 0.

x[n] = 0.8ⁿ · u[n]

u[n] = 1 for n ≥ 0, 0 for n < 0
(the unit step)

x[0] = 1      x[1] = 0.8
x[2] = 0.64   x[3] = 0.512
x[4] = 0.4096 ...

infinitely many samples, none of them 0
Loading figure…
or ← →
Read the lesson step by step
  1. A signal that fades

    Here is a signal that fades: x[n] = 0.8ⁿ for n ≥ 0, and 0 before n = 0. Each sample is 0.8 times the one before: 1, 0.8, 0.64, 0.512 ... It shrinks forever but never reaches 0.

    x[n] = 0.8ⁿ · u[n]
    
    u[n] = 1 for n ≥ 0, 0 for n < 0
    (the unit step)
    
    x[0] = 1      x[1] = 0.8
    x[2] = 0.64   x[3] = 0.512
    x[4] = 0.4096 ...
    
    infinitely many samples, none of them 0
  2. The Z-transform: weigh, then add

    The Z-transform turns the whole list into one function of a number z: X(z) = Σ x[n]·z⁻ⁿ. Multiply each sample by z⁻ⁿ, that is (1/z)ⁿ, then add every product. In general z is a complex number.

    X(z) = Σ x[n] · z⁻ⁿ     (n from −∞ to ∞)
    
    term n:  x[n] · z⁻ⁿ
      n = 0:  x[0] · 1
      n = 1:  x[1] / z
      n = 2:  x[2] / z²
    
    z = r·e^(jθ), a complex number
    (complex numbers: see the Maths lessons)
    z plays the part s plays in the Laplace
    transform (Circuits: Laplace analysis)
  3. Try z = 2: the sum settles

    Choose z = 2. The terms x[n]·2⁻ⁿ are 1, 0.4, 0.16, 0.064 ...: each is 0.4 times the last. The running sum goes 1, 1.4, 1.56, 1.624 ... and settles at 1.667. So X(2) = 1.667.

    z = 2:  x[n] · 2⁻ⁿ = 0.8ⁿ / 2ⁿ = 0.4ⁿ
    
    terms   1   0.4   0.16   0.064 ...
    sum     1   1.4   1.56   1.624   1.65 ...
    
    after 16 terms: 1.666666
    the limit:      1.666667
    
    X(2) = 1.667
  4. A geometric series gives a formula

    Each term is 0.8/z times the one before: a geometric series. When |0.8/z| < 1 it adds up to 1/(1 − 0.8/z) = z/(z − 0.8). Check: 2/(2 − 0.8) = 1.667, where the running sum settled.

    geometric series, ratio r:
      1 + r + r² + r³ + ... = 1 / (1 − r)
      only when |r| < 1
    
    here r = 0.8 / z = 0.8·z⁻¹
    
    X(z) = 1 / (1 − 0.8·z⁻¹)
         = z / (z − 0.8)
    
    z = 2:  2 / 1.2 = 1.667
  5. Try z = 0.5: the sum blows up

    Now choose z = 0.5. Each term is 0.8/0.5 = 1.6 times the last: 1, 1.6, 2.56, 4.1 ... The sum grows without limit. The formula says 0.5/(0.5 − 0.8) = −1.667, but the sum never gets there.

    z = 0.5:  ratio r = 0.8 / 0.5 = 1.6
    
    terms   1   1.6   2.56   4.1 ...
    sum     1.00   2.60   5.16   9.26 ...
    
    after 16 terms: about 3073
    
    |r| > 1: the series diverges
    z/(z − 0.8) = −1.667 means nothing here
  6. The region of convergence

    The sum converges only when |0.8/z| < 1, that is |z| > 0.8. Only the size of z matters, not its angle. Those z fill the z-plane outside a circle of radius 0.8: the region of convergence, or ROC.

    converges  <=>  Σ |x[n] · z⁻ⁿ| < ∞
               <=>  |0.8 / z| < 1
               <=>  |z| > 0.8
    
    |x[n]·z⁻ⁿ| = 0.8ⁿ / |z|ⁿ: the angle of z
    drops out, so the ROC is a ring shape:
    here everything outside |z| = 0.8
    
    ROC: |z| > 0.8
  7. A pole and a zero

    X(z) = z/(z − 0.8) is 0 at z = 0: a zero, drawn ○. At z = 0.8 it blows up: a pole, drawn ×. There every term is 1, so the sum diverges. The edge of the ROC runs through the pole.

    X(z) = z / (z − 0.8)
    
    zero: top = 0     ->  z = 0    (○)
    pole: bottom = 0  ->  z = 0.8  (×)
    
    at z = 0.8 every term is 0.8ⁿ/0.8ⁿ = 1:
    1 + 1 + 1 + ... diverges
    
    a right-sided signal: ROC lies
    outside its outermost pole
  8. The unit circle: the DTFT

    The unit circle |z| = 1 lies inside the ROC. On it z = e^jω and X(e^jω) is the DTFT, so this signal has a spectrum. At z = 1 the terms are 0.8ⁿ, adding up to 1/(1 − 0.8) = 5.

    unit circle: z = e^(jω), |z| = 1
    
    X(e^jω) = Σ x[n] · e^(−jωn)   (the DTFT)
            = 1 / (1 − 0.8·e^(−jω))
    
    ω = 0, z = 1:
      1 + 0.8 + 0.64 + ... = 1/0.2 = 5
    
    ROC contains |z| = 1  ->  the DTFT exists
    see "The DTFT: the spectrum of a sampled signal"
  9. Same formula, different ROC

    Now take x[n] = −0.8ⁿ for n ≤ −1, and 0 from n = 0 on. Its sum is also z/(z − 0.8), but only for |z| < 0.8. At z = 0.4 it adds up to −1. Same formula, different ROC, different signal.

    x₂[n] = −0.8ⁿ · u[−n−1]
      x₂[−1] = −1.25, x₂[−2] = −1.5625 ...
    
    X₂(z) = Σ −0.8ⁿ z⁻ⁿ  (n = −1, −2 ...)
          = −Σ (z/0.8)ᵐ  (m = 1, 2 ...)
          = z / (z − 0.8)   for |z| < 0.8
    
    z = 0.4: terms −0.5, −0.25, −0.125 ...
    sum -> 0.4 / (0.4 − 0.8) = −1
    
    formula + ROC together name the signal
  10. The Z-transform in Python

    In Python 3 with numpy, the sum is one line. 200 terms are plenty: 0.4²⁰⁰ is far too small to matter. It prints 1.666666666666667, matching z/(z − 0.8). Next: getting x[n] back from X(z).

    import numpy as np
    n = np.arange(200)
    x, z = 0.8**n, 2.0
    X = np.sum(x * z**-n)
    
    >>> X
    1.666666666666667
    >>> z / (z - 0.8)
    1.6666666666666667
    
    z is 2.0, not 2: numpy refuses an integer
    to a negative integer power
    (Python 3 with numpy)

Quiz Unlocks after the last step.