Part I — Foundations

Chapter 7: The Z-Transform

The Z-transform is the discrete-time counterpart of the Laplace transform. It converts difference equations into algebraic equations, enables transfer-function analysis of digital systems, and provides a clean algebraic framework for studying stability, causality, and frequency response through the geometry of poles and zeros in the complex plane.

7.1 Definition of the Z-Transform

Given a discrete-time signal $x[n]$, its Z-transform is defined as a power series in the complex variable $z$.

The Bilateral Z-Transform

For a sequence $x[n]$, the bilateral (two-sided) Z-transform is

$$X(z) = \mathcal{Z}\{x[n]\} = \sum_{n=-\infty}^{\infty} x[n]\, z^{-n}$$

where $z \in \mathbb{C}$ is a complex variable. The transform exists for those values of $z$ for which the sum converges absolutely.

The Unilateral Z-Transform

For causal signals and system analysis the unilateral (one-sided) Z-transform is often preferred:

$$X(z) = \sum_{n=0}^{\infty} x[n]\, z^{-n}$$

The complex variable $z$ can be written in polar form as $z = r\, e^{j\omega}$, where $r = |z|$ is the radius and $\omega$ is the angle. This polar representation is the key to understanding the connection between the Z-transform and the frequency domain.

Region of Convergence (ROC)

The Region of Convergence is the set of all $z$ for which $X(z)$ converges:

$$\text{ROC} = \left\{ z \in \mathbb{C} : \sum_{n=-\infty}^{\infty} |x[n]|\,|z|^{-n} < \infty \right\}$$

The ROC is always an annular region of the form $r_1 < |z| < r_2$. For a causal signal the ROC is the exterior of a circle ($|z| > r_1$); for an anti-causal signal it is the interior ($|z| < r_2$).

Why the ROC matters: Two different sequences can have the same algebraic expression for $X(z)$ but different ROCs. Without specifying the ROC the inverse Z-transform is ambiguous. For example, $X(z) = z/(z-a)$ corresponds to $a^n u[n]$ if $|z|>|a|$, but to $-a^n u[-n-1]$ if $|z|<|a|$.

Example: Z-Transform of a^n u[n]

Let $x[n] = a^n u[n]$ where $|a| < 1$. Then:

$$X(z) = \sum_{n=0}^{\infty} a^n z^{-n} = \sum_{n=0}^{\infty} \left(\frac{a}{z}\right)^n = \frac{1}{1 - az^{-1}} = \frac{z}{z - a}, \quad |z| > |a|$$

The ROC is the exterior of a circle of radius $|a|$, which for $|a| < 1$ includes the unit circle — confirming that the DTFT also exists.

7.2 Relationship to the DTFT and Laplace Transform

The Z-transform unifies the discrete-time Fourier transform and the Laplace transform under one algebraic roof.

Z-Transform on the Unit Circle = DTFT

When we evaluate $X(z)$ on the unit circle $z = e^{j\omega}$, we recover the DTFT:

$$X(e^{j\omega}) = \sum_{n=-\infty}^{\infty} x[n]\, e^{-j\omega n} = X_{\text{DTFT}}(\omega)$$

This is valid only when the ROC of $X(z)$ includes the unit circle.

Connection to the Laplace Transform

If a continuous-time signal $x_c(t)$ is sampled with period $T_s$ to produce $x[n] = x_c(nT_s)$, then the Z-transform variable is related to the Laplace variable by:

$$z = e^{sT_s}$$

This mapping transforms the left half of the $s$-plane ($\operatorname{Re}(s) < 0$) to the interior of the unit circle ($|z| < 1$), and the $j\omega$ axis to the unit circle itself. It is a many-to-one mapping due to the periodicity of the exponential in $j\omega$.

Mapping summary: In the $s$-plane, stability requires poles in the left half-plane ($\operatorname{Re}(s)<0$). Via $z = e^{sT_s}$, this maps to $|z|<1$, i.e., poles inside the unit circle. The imaginary axis $s = j\omega$ maps to the unit circle $|z|=1$, which is where we evaluate the frequency response.

7.3 Key Properties of the Z-Transform

The Z-transform inherits many of the algebraic conveniences of the Laplace transform. The following table summarises the most important properties.

PropertyTime DomainZ-Domain
Linearity$a\, x_1[n] + b\, x_2[n]$$a\, X_1(z) + b\, X_2(z)$
Time Delay$x[n - k]$$z^{-k}\, X(z)$
Time Advance$x[n + k]$$z^{k}\, X(z)$
Convolution$x[n] * h[n]$$X(z)\, H(z)$
Scaling$a^n\, x[n]$$X(z/a)$
Differentiation in z$n\, x[n]$$-z \,\frac{dX(z)}{dz}$
Accumulation$\displaystyle\sum_{k=-\infty}^{n} x[k]$$\frac{X(z)}{1 - z^{-1}}$
Initial Value$x[0]$$\displaystyle\lim_{z \to \infty} X(z)$
Final Value$\displaystyle\lim_{n \to \infty} x[n]$$\displaystyle\lim_{z \to 1} (1 - z^{-1})\, X(z)$

Convolution Theorem

If $y[n] = x[n] * h[n]$, then

$$Y(z) = X(z) \cdot H(z)$$

with $\text{ROC}_Y \supseteq \text{ROC}_X \cap \text{ROC}_H$. This is the fundamental reason that the Z-transform is so useful: convolution in the time domain becomes multiplication in the Z-domain.

Example: Time Delay Property

Consider a unit delay system: $y[n] = x[n-1]$. Taking the Z-transform of both sides:

$$Y(z) = z^{-1} X(z)$$

Thus the transfer function of a single-sample delay is simply $H(z) = z^{-1}$. A cascade of $k$ delays gives $H(z) = z^{-k}$.

7.4 Common Z-Transform Pairs

The following table collects the most frequently encountered Z-transform pairs. Memorising these accelerates both analysis and design work.

Signal $x[n]$Z-Transform $X(z)$ROC
$\delta[n]$$1$All $z$
$u[n]$$\dfrac{z}{z - 1}$$|z| > 1$
$a^n u[n]$$\dfrac{z}{z - a}$$|z| > |a|$
$n\, a^n u[n]$$\dfrac{az}{(z - a)^2}$$|z| > |a|$
$\cos(\omega_0 n)\, u[n]$$\dfrac{z(z - \cos\omega_0)}{z^2 - 2z\cos\omega_0 + 1}$$|z| > 1$
$\sin(\omega_0 n)\, u[n]$$\dfrac{z\sin\omega_0}{z^2 - 2z\cos\omega_0 + 1}$$|z| > 1$
$r^n \cos(\omega_0 n)\, u[n]$$\dfrac{z(z - r\cos\omega_0)}{z^2 - 2rz\cos\omega_0 + r^2}$$|z| > r$
$r^n \sin(\omega_0 n)\, u[n]$$\dfrac{rz\sin\omega_0}{z^2 - 2rz\cos\omega_0 + r^2}$$|z| > r$

Pattern to notice: Every causal exponential $a^n u[n]$ has ROC $|z|>|a|$. The damped sinusoids ($r^n \cos$, $r^n \sin$) have poles at $z = r\, e^{\pm j\omega_0}$ and ROC $|z| > r$. When $r < 1$ the ROC includes the unit circle, so the DTFT exists and the system is stable.

7.5 Transfer Function of Discrete Systems

A causal, linear, time-invariant discrete system is characterised by a constant-coefficient difference equation:

$$\sum_{k=0}^{N} a_k\, y[n-k] = \sum_{k=0}^{M} b_k\, x[n-k]$$

Taking the Z-transform of both sides (assuming zero initial conditions) and using the time-delay property:

$$\left(\sum_{k=0}^{N} a_k\, z^{-k}\right) Y(z) = \left(\sum_{k=0}^{M} b_k\, z^{-k}\right) X(z)$$

Transfer Function H(z)

The transfer function is the ratio of the output to input Z-transforms:

$$H(z) = \frac{Y(z)}{X(z)} = \frac{\displaystyle\sum_{k=0}^{M} b_k\, z^{-k}}{\displaystyle\sum_{k=0}^{N} a_k\, z^{-k}} = \frac{b_0 + b_1 z^{-1} + \cdots + b_M z^{-M}}{a_0 + a_1 z^{-1} + \cdots + a_N z^{-N}}$$

Multiplying numerator and denominator by $z^{\max(M,N)}$ gives the equivalent polynomial form in positive powers of $z$.

Example: First-Order IIR Filter

The difference equation $y[n] = x[n] + 0.8\, y[n-1]$ has transfer function:

$$H(z) = \frac{1}{1 - 0.8\, z^{-1}} = \frac{z}{z - 0.8}$$

This system has a single pole at $z = 0.8$ and a single zero at $z = 0$. Since $|0.8| < 1$, the system is stable.

Example: Second-Order System

Consider $y[n] - 1.2\, y[n-1] + 0.81\, y[n-2] = x[n] - 0.5\, x[n-1]$:

$$H(z) = \frac{1 - 0.5\, z^{-1}}{1 - 1.2\, z^{-1} + 0.81\, z^{-2}} = \frac{z(z - 0.5)}{z^2 - 1.2z + 0.81}$$

The poles are at $z = 0.6 \pm 0.6j$ with magnitude $|p| = \sqrt{0.36 + 0.36} \approx 0.849 < 1$, so the system is stable. The zero at $z = 0.5$ shapes the frequency response.

7.6 Stability: The Unit Circle Criterion

For a causal LTI system with rational transfer function $H(z)$, stability is determined entirely by the locations of the poles.

BIBO Stability Criterion

A causal discrete-time LTI system is bounded-input bounded-output (BIBO) stable if and only if all poles of $H(z)$ lie strictly inside the unit circle:

$$|p_i| < 1 \quad \text{for all poles } p_i$$

Equivalently, a causal system is BIBO stable if and only if its impulse response is absolutely summable: $\sum_{n=0}^{\infty} |h[n]| < \infty$.

The stability criterion connects directly to the ROC:

ROC and Stability Connection

For a causal system, the ROC is $|z| > r_{\max}$, where $r_{\max}$ is the magnitude of the outermost pole. The system is stable if and only if the ROC includes the unit circle, which requires $r_{\max} < 1$.

For DTFT analysis we need to evaluate $H(z)$ on $|z| = 1$. If a pole sits on or outside the unit circle, the frequency response either diverges or the system is unstable.

Stability Classification

  • Stable: All poles satisfy $|p_i| < 1$. Impulse response decays to zero.
  • Marginally stable: At least one pole on the unit circle ($|p_i| = 1$), none outside. Impulse response neither grows nor decays (e.g., pure oscillation).
  • Unstable: At least one pole outside the unit circle ($|p_i| > 1$). Impulse response grows without bound.

Continuous vs. discrete stability: In the Laplace domain stability requires poles in the left half-plane ($\operatorname{Re}(s) < 0$). The mapping $z = e^{sT}$ transforms the left half-plane to the interior of the unit circle, so the Z-domain criterion $|z| < 1$ is the discrete-time analogue of the continuous-time condition.

7.7 Inverse Z-Transform

Recovering $x[n]$ from $X(z)$ is called the inverse Z-transform. There are three principal methods.

Formal Inversion Formula

The inverse Z-transform is given by the contour integral:

$$x[n] = \frac{1}{2\pi j} \oint_C X(z)\, z^{n-1}\, dz$$

where $C$ is a closed contour in the ROC encircling the origin counterclockwise. In practice, we rarely evaluate this integral directly.

Method 1: Partial Fraction Expansion

The most common approach. We decompose $X(z)/z$ (or $X(z)$ directly) into partial fractions, then use the known transform pairs from the table.

Example: Partial Fractions

Given $X(z) = \dfrac{2z^2 - 1.5z}{z^2 - 1.5z + 0.5}$ with ROC $|z| > 1$:

Factor the denominator: $(z-1)(z-0.5)$. Compute $X(z)/z$:

$$\frac{X(z)}{z} = \frac{2z - 1.5}{(z-1)(z-0.5)} = \frac{A}{z-1} + \frac{B}{z-0.5}$$

Solving: $A = 1$, $B = 1$. Therefore $X(z) = \dfrac{z}{z-1} + \dfrac{z}{z-0.5}$, giving:

$$x[n] = u[n] + (0.5)^n u[n] = \left(1 + 0.5^n\right) u[n]$$

Method 2: Long Division (Power Series Expansion)

Perform polynomial long division of the numerator by the denominator to obtain a power series in $z^{-1}$. The coefficients are the signal values: $X(z) = \sum_n x[n] z^{-n}$, so the coefficient of $z^{-n}$ is $x[n]$.

When to use each method: Partial fractions give a closed-form expression and are preferred for rational transforms. Long division is useful when you need only the first few values of $x[n]$ or when the partial fraction decomposition is unwieldy. Contour integration is mostly of theoretical interest.

Method 3: Contour Integration (Residue Method)

By the residue theorem, the inversion integral evaluates to:

$$x[n] = \sum_{k} \operatorname{Res}\left[ X(z)\, z^{n-1},\, z = z_k \right]$$

where the sum is over all poles $z_k$ of $X(z)\, z^{n-1}$ inside the contour $C$. For a simple pole at $z = z_k$:

$$\operatorname{Res}[X(z)\, z^{n-1}, z_k] = \lim_{z \to z_k} (z - z_k)\, X(z)\, z^{n-1}$$

7.8 Pole-Zero Analysis

A rational transfer function can always be factored as:

$$H(z) = G \cdot \frac{\displaystyle\prod_{k=1}^{M}(z - z_k)}{\displaystyle\prod_{k=1}^{N}(z - p_k)}$$

where $z_k$ are the zeros and $p_k$ are the poles. The pole-zero plot is the most compact representation of an LTI system.

Geometric Interpretation of Frequency Response

On the unit circle ($z = e^{j\omega}$), the magnitude response is:

$$|H(e^{j\omega})| = |G| \cdot \frac{\displaystyle\prod_{k=1}^{M} |e^{j\omega} - z_k|}{\displaystyle\prod_{k=1}^{N} |e^{j\omega} - p_k|}$$

Each factor $|e^{j\omega} - z_k|$ or $|e^{j\omega} - p_k|$ is the Euclidean distance from the point $e^{j\omega}$ on the unit circle to the zero or pole in the complex plane. When $e^{j\omega}$ passes near a pole, the denominator term becomes small and $|H|$ peaks; when it passes near a zero, $|H|$ dips.

This geometric interpretation is extraordinarily useful for intuitive filter design:

  • Poles near the unit circle create peaks (resonances) in the magnitude response at the corresponding frequency.
  • Zeros on the unit circle create nulls (perfect rejection) at that frequency.
  • Poles and zeros far from the unit circle have a mild, broadband effect on the response.
  • A notch filter places zeros on the unit circle at the frequency to be rejected and nearby poles just inside the circle to keep the rest of the response flat.
  • A resonator places poles close to the unit circle at the desired frequency, creating a sharp peak.

Example: Designing a Simple Notch Filter

To reject frequency $\omega_0 = \pi/4$, place zeros at $z = e^{\pm j\pi/4}$ and poles at $z = r\, e^{\pm j\pi/4}$ with $r = 0.9$ (close to 1 for a narrow notch):

$$H(z) = \frac{(z - e^{j\pi/4})(z - e^{-j\pi/4})}{(z - 0.9e^{j\pi/4})(z - 0.9e^{-j\pi/4})} = \frac{z^2 - \sqrt{2}\,z + 1}{z^2 - 0.9\sqrt{2}\,z + 0.81}$$

At $\omega = \pi/4$, the numerator vanishes (the zero is on the unit circle), giving $|H| = 0$. The nearby poles keep the response close to unity at other frequencies.

Python Lab: Pole-Zero Map and Frequency Response

We analyse a second-order system $H(z) = \frac{1 - 0.5z^{-1}}{1 - 1.2z^{-1} + 0.81z^{-2}}$ by computing its poles, zeros, and frequency response. The pole-zero map gives immediate geometric insight into the shape of the magnitude and phase responses.

Click Run to execute the Python code

First run will download Python environment (~15MB)

Python Lab: Impulse Response from Pole Locations

The character of a system's impulse response is dictated by its pole locations. We compare three systems: a stable first-order system with $|p| = 0.8$, a marginally stable system with $|p| = 1$, and a resonant system with complex conjugate poles.

Click Run to execute the Python code

First run will download Python environment (~15MB)

Python Lab: Geometric Interpretation of Frequency Response

The frequency response at any angle $\omega$ is determined by the distances from the point $e^{j\omega}$ on the unit circle to each pole and zero. When the evaluation point passes close to a pole, the denominator distance shrinks and the magnitude peaks. This visualisation makes the connection concrete.

Click Run to execute the Python code

First run will download Python environment (~15MB)

Chapter Summary

  • The Z-transform maps a discrete-time sequence $x[n]$ to a function of a complex variable: $X(z) = \sum x[n]\, z^{-n}$.
  • The Region of Convergence (ROC) determines which sequence corresponds to a given algebraic expression. For causal signals the ROC is $|z| > r$.
  • Evaluating $X(z)$ on the unit circle $z = e^{j\omega}$ recovers the DTFT. The relationship $z = e^{sT}$ connects to the Laplace transform.
  • Key properties — linearity, time delay ($z^{-k}$), convolution ($X \cdot H$), scaling, accumulation — turn difference equations into algebraic equations.
  • The transfer function $H(z) = Y(z)/X(z)$ is a rational function whose poles and zeros determine all system behaviour.
  • A causal system is BIBO stable if and only if all poles lie strictly inside the unit circle ($|p_i| < 1$).
  • The inverse Z-transform can be found via partial fractions, long division, or contour integration.
  • Pole-zero analysis provides a geometric interpretation: poles near the unit circle create magnitude peaks; zeros create nulls.