X(z)1/(1−0.75z⁻¹+0.125z⁻²)pole 0.5A/(1−0.5z⁻¹)pole 0.25B/(1−0.25z⁻¹)x[0]–x[1]–x[2]–x[3]–x[4]–1from scipy import signal2b, a = [1], [1, -0.75, 0.125]3r, p, k = signal.residuez(b, a)4d = [1, 0, 0, 0, 0]5x = signal.lfilter(b, a, d)aⁿ·u[n] ↔ 1/(1−a·z⁻¹) ROC |z| > |a|: right-sided−aⁿ·u[−n−1] ↔ 1/(1−a·z⁻¹) ROC |z| < |a|: left-sided000
-2-1012-101Re zIm zZ-PLANE|z| = 120.5poles 0.5, 0.25 · zero 0 (×2)ROC |z| > 0.5: outside both polespoles 0.5, 0.25 · ROC |z| > 0.502468-1012n (sample number)valueSAMPLES2(0.5)ⁿ−(0.25)ⁿx[n]each piece shrinks by its polex[n] = 2(0.5)ⁿ − (0.25)ⁿrecursion: the same x[n]lfilter: the same x[n]
Coloured parts: what the current step is about; everything else rests in whiteBlocks: X(z), its two one-pole pieces, an adder, the cells x[0] to x[4], a pair table and a Python cardPlots: the z-plane (poles, zeros, ROC) and the stems of both pieces and their sumTokens carry each piece's sample to the adder and the sum into its cellX(z) = 1/(1 − 0.75z⁻¹ + 0.125z⁻²), ROC |z| > 0.5, splits into 2/(1 − 0.5z⁻¹) − 1/(1 − 0.25z⁻¹), so x[n] = 2(0.5)ⁿu[n] − (0.25)ⁿu[n]. Repeated poles need extra terms such as 1/(1 − az⁻¹)², and complex poles come in conjugate pairs; the method is the same. The ROC and the forward transform are in the Z-transform lesson; poles and stability get their own lessons next.

The problem

  1. The Z-transform turned a list of samples into a function of z. Now go back. Here X(z) = 1/(1 − 0.75z⁻¹ + 0.125z⁻²) with ROC |z| > 0.5. Which samples x[n] made it? Finding them is the inverse Z-transform.

Partial fractions

Back to time

Check it

The working

# step 1/10 · goal

given   X(z) = 1 / (1 − 0.75z⁻¹ + 0.125z⁻²)
        ROC (region of convergence): |z| > 0.5
wanted  x[n] for every n

three ways back:
  partial fractions + a pair table   <- this lesson
  long division (a power series in z⁻¹)
  a contour integral (residues)

z⁻¹ = "one sample later"

The example X(z) = 1/(1 − 0.75z⁻¹ + 0.125z⁻²) with ROC |z| > 0.5 is a standard textbook case; every number in the figure is computed from this model and checked against the recursion. The memory cells round to 4 decimals (x[3] = 0.234375 shows as 0.2344); the working shows the exact values.