Z-Transform
The Z-transform is the Laplace transform for discrete-time systems. Learn the definition and ROC, common pairs, the delay property z⁻¹, difference equations and transfer functions H(z), poles and zeros in the z-plane, stability (|p| < 1), frequency response on the unit circle, and mapping s to z (bilinear transform).
Digital filters and controllers are difference equations running on processors. The Z-transform turns them into polynomial ratios, revealing stability, frequency response and how to design them from analog prototypes.
An analogy
z⁻¹ is a one-sample memory cell: every z⁻¹ in a formula means 'use the value from one tick ago'.
From difference equations
Replace each delay by z⁻¹ and solve for Y(z)/X(z). The transfer function is a ratio of polynomials — FIR filters have only zeros; IIR filters have poles (feedback).
Stability
A causal system is stable if all poles lie inside the unit circle |z| < 1. Poles near the circle give sharp resonances and slow decay; poles outside grow without bound.
Frequency response
Evaluate H(z) on the unit circle z = e^(jω). Zeros near the circle create notches; poles near it create peaks. ω = π corresponds to f_s/2 (Nyquist).
Design mappings
Bilinear transform maps the entire analog frequency axis onto the unit circle (with pre-warping); impulse invariance matches impulse responses. Fixed-point implementations must manage coefficient quantisation and limit cycles.
Formulas
- Definition:
X(z) = Σ x[n] z^(−n) - Delay:
x[n − k] ↔ z^(−k) X(z) - First-order IIR:
y[n] = a y[n−1] + b x[n] ↔ H(z) = b/(1 − a z⁻¹) - Frequency response:
H(e^(jω)), ω = 2πf/f_s - Bilinear transform:
s = (2/T)(1 − z⁻¹)/(1 + z⁻¹)
Worked example: Transfer function
Given: y[n] = 0.9y[n − 1] + 0.1x[n]
Find: H(z), pole, DC gain.
- H(z) = 0.1/(1 − 0.9z⁻¹)
- Pole at z = 0.9 (stable)
- DC (z = 1): 0.1/0.1 = 1
Answer: Stable low-pass with unity DC gain
Worked example: Cut-off frequency
Given: Same filter, f_s = 1 kHz
Find: −3 dB frequency.
- |H|² = 0.01/(1.81 − 1.8 cos ω) = 0.5 → cos ω = 0.9944
- ω = 0.1055 → f = 16.8 Hz
Answer: ≈ 16.8 Hz
Common mistakes
- Wrong: Using s-plane stability rules in z. — Right: In z, stable means inside the unit circle.
- Wrong: Ignoring coefficient quantisation. — Right: Poles near |z| = 1 are sensitive in fixed point.
Applications
- Digital filters: IIR biquads in audio and sensors.
- Digital control: Discrete PID and compensators.
- Sensor smoothing: Exponential moving averages.
Key takeaways
- Delays → z⁻¹; H(z) = B(z)/A(z).
- Stable if |poles| < 1.
- Frequency response on unit circle.
- Bilinear transform from analog designs.
Going further
- Pre-warping: Match critical frequencies in bilinear designs.
- Limit cycles: Fixed-point oscillations in IIR.
- Lattice structures: Robust filter implementations.