Skip to content
Digital Control Math Analysis 2 Mathematical Methods Digital Signal Processing Systems Theory

The Z transform and discrete-time systems

Definition and region of convergence, delay and convolution, difference equations, FIR and IIR filters, stability in the z-plane, the link with Laplace and Fourier, inversion.

Digital systems do not work with continuous signals but with sequences of samples: x[0], x[1], x[2], \dots, taken at time intervals T. An audio filter in a DSP chip, a controller in a microcontroller, an equaliser in a modem compute each output from the latest samples. The Z transform does for these systems what the Laplace transform does for continuous ones: it turns difference equations into algebraic equations, defines the transfer function and ties stability to the position of the poles.

Definition

For a sequence x[n], zero for n \lt 0:

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

It is a power series in z^{-1}, so it converges outside a circle: for |z| \gt R, the region of convergence.

Examples.

  • Unit impulse \delta[n] (1 for n = 0, 0 elsewhere): X(z) = 1.
  • Step u[n] (1 for n \ge 0): \sum z^{-n} = \frac{1}{1 - z^{-1}} = \frac{z}{z - 1}, for |z| \gt 1.
  • Exponential a^n u[n]: \sum(az^{-1})^n = \frac{z}{z - a}, for |z| \gt |a|. It is the geometric series, and almost every other transform follows from it.

Properties

  • Linearity.
  • One-sample delay: \mathcal Z\{x[n - 1]\} = z^{-1}X(z). It is the key property: z^{-1} is a delay of one sample, and in digital filter block diagrams it is drawn precisely as the symbol z^{-1}, a memory register.
  • Advance: \mathcal Z\{x[n + 1]\} = zX(z) - zx[0], the counterpart of the derivative with its initial condition.
  • Convolution: \mathcal Z\{x * h\} = X(z)H(z), with (x * h)[n] = \sum_k x[k]h[n - k].
  • Final value: \lim_{n\to\infty}x[n] = \lim_{z\to 1}(z - 1)X(z), if the limit exists.

Difference equations and the transfer function

A discrete linear time-invariant system is described by a difference equation. Example: a filter taking the weighted average of the new sample and the previous output,

    \[ y[n] = a\,y[n - 1] + (1 - a)\,x[n],\qquad 0 \lt a \lt 1 \]

Transforming, with zero initial conditions: Y = az^{-1}Y + (1 - a)X, so

    \[ H(z) = \frac{Y(z)}{X(z)} = \frac{1 - a}{1 - az^{-1}} = \frac{(1 - a)z}{z - a} \]

It is the simplest digital low-pass (exponential moving average), the “filter” used in microcontrollers to clean up a sensor reading: with a = 0.9 each new reading weighs 10%. The step response is y[n] = 1 - a^{n+1}, which tends to 1.

The two big families of digital filters:

  • FIR (finite impulse response): y[n] = \sum_{k=0}^{M}b_k x[n - k]. H(z) is a polynomial in z^{-1}: it has poles only at the origin, so it is always stable, and it can have exactly linear phase.
  • IIR (infinite impulse response): they also contain terms y[n - k], that is feedback, like the example above. With few coefficients they achieve very selective filters, but they can become unstable.

The z-plane and stability

The z-plane with the unit circle, poles inside and outside and one zero
The circle of radius 1 is the stability boundary: poles inside (red) give responses that die away, poles outside (purple) responses that grow. Along the circle, the angle ωT represents frequency.

A pole p produces a term p^n in the response. If |p| \lt 1 the term dies away, if |p| \gt 1 it grows. Hence

a discrete system is stable if and only if every pole of its transfer function lies inside the unit circle.

In the example filter the pole is at z = a: stable for |a| \lt 1. With a = 1.05 the output would grow by 5% at every sample.

The link with Laplace and Fourier

Sampling a continuous signal with period T corresponds to the substitution

    \[ z = e^{sT} \]

The left half of the s plane (\operatorname{Re}s \lt 0) maps inside the unit circle (|z| \lt 1), the imaginary axis s = i\omega maps onto the circle z = e^{i\omega T}. That is why the stability rules correspond: “negative real part” becomes “modulus less than 1”.

Evaluating H(z) on the unit circle, z = e^{i\omega T}, gives the frequency response of the discrete system. One full turn of the circle corresponds to the sampling frequency: the frequency response of a digital system is periodic, which is another way of seeing aliasing. Useful frequencies run from 0 (at z = 1) to half the sampling frequency (at z = -1).

Example. A filter with a zero at z = -1, such as H(z) = \frac{1 + z^{-1}}{2} (the average of the last two samples), completely removes the Nyquist frequency: a signal alternating +1, -1, +1, \dots gives zero output. It is the simplest FIR low-pass.

Inversion

As with Laplace, partial fractions are used, but it pays to split \frac{X(z)}{z}, so that the terms become \frac{z}{z - p}, which correspond to p^n. For example

    \[ X(z) = \frac{z}{(z - 1)(z - 0.5)} \quad\Rightarrow\quad \frac{X(z)}{z} = \frac{2}{z - 1} - \frac{2}{z - 0.5} \quad\Rightarrow\quad x[n] = 2 - 2\cdot 0.5^n \]

Alternatively you can always divide the numerator by the denominator and read the samples as the coefficients of the series in z^{-1}: exactly what a processor does when it runs the difference equation sample after sample.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x