Z-Transform
The z-transform converts a sequence of numbers, such as the samples from an analog-to-digital converter, into a function of a complex variable, z. It does for discrete-time systems what the Laplace transform does for continuous-time circuits: difference equations become algebraic equations, the transfer function H(z) summarizes a system by its poles and zeros, and one geometric test on those poles decides stability.
The parallel is close but not exact. A one-sample delay becomes multiplication by z−1, the stability boundary moves from the imaginary axis to the unit circle, and frequency response, read around that circle, repeats at every multiple of the sampling frequency. This article follows the Laplace Transform article and notes each continuous-time counterpart briefly rather than deriving it again.
Mathematically, the z-transform is a form of generating function, a power series whose coefficients encode a sequence; the first book of Pierre-Simon Laplace's Théorie analytique des probabilités (1812) studies generating functions. The engineering method grew out of wartime radar, whose tracking servos received target data as pulses. Witold Hurewicz analyzed such systems in "Filters and Servo Systems with Pulsed Data," a chapter of Theory of Servomechanisms (1947), volume 25 of the MIT Radiation Laboratory Series, and John R. Ragazzini and Lotfi A. Zadeh of Columbia University named the z-transform in "The Analysis of Sampled-Data Systems," published in Part II of the Transactions of the American Institute of Electrical Engineers in November 1952.
Sampled Signals and Sequences
From Waveforms to Sequences
Sampling a continuous signal x(t) every T seconds produces the sequence x[n] = x(nT), where n is an integer and fs = 1/T is the sampling frequency in hertz. Square brackets mark a function of an integer index. The sequence does not record T, and the transform applies equally to sequences computed in software. It treats each sample as an exact real number; quantization, rounding, and overflow are nonlinear effects outside the transform, treated in Fixed-Point Implementation and Quantization Effects.
Basic Sequences
- The unit sample δ[n] equals 1 at n = 0 and 0 elsewhere. Unlike the continuous impulse δ(t), it is an ordinary function.
- The unit step u[n] equals 1 for n ≥ 0 and 0 for n < 0, and δ[n] = u[n] − u[n − 1].
- The exponential anu[n] decays when |a| < 1, grows when |a| > 1, and alternates in sign when a is negative.
- The sinusoid cos(Ω0n + φ) has a digital frequency Ω0 in radians per sample.
Sampling a sinusoid of f hertz, or ω radians per second, gives Ω = ωT = 2πf/fs. Because n is an integer, digital frequencies that differ by 2π produce identical sequences: sampled at 1 kHz, cosines at 100 Hz, 900 Hz, and 1.1 kHz give the same samples. This is aliasing, and it is why an anti-aliasing filter precedes a converter. Distinct frequencies fill the range −π < Ω ≤ π, and the highest, Ω = π or fs/2, gives the alternating sequence (−1)n.
Linear Time-Invariant Systems
Every sequence is a sum of scaled, shifted unit samples, so a linear time-invariant system with impulse response h[n] responds to any input with the convolution sum
y[n] = ∑k=−∞∞ x[k] h[n − k] = (x * h)[n]
The system is causal when h[n] = 0 for n < 0. A filter running in real time must be causal; a filter applied to a stored record need not be.
Definition and the Region of Convergence
Bilateral and Unilateral Definitions
The bilateral z-transform of a sequence x[n] is
X(z) = ∑n=−∞∞ x[n] z−n
and the unilateral z-transform starts the sum at n = 0:
X(z) = ∑n=0∞ x[n] z−n
The operation is written Z{x[n]} = X(z), with inverse Z−1{X(z)} = x[n]; textbooks usually set the operator as a script capital Z. The two definitions agree for any sequence that is zero for n < 0. Signal processing texts usually start from the bilateral form, and control texts from the unilateral form, which handles initial conditions.
With z = rejΩ, the kernel z−n = r−ne−jΩn is a geometrically weighted sinusoid, the discrete counterpart of e−st. It is dimensionless, so X(z) carries the units of x[n]: volts rather than the volt-seconds of a Laplace transform. The definition is also a power series whose coefficients are the samples, so the sequence 3, 1, 4 at n = 0, 1, 2 has the transform 3 + z−1 + 4z−2. That is why z−1 acts as a one-sample delay and why long division recovers samples. No lower-limit convention like 0− is needed, because a sequence has a definite value x[0], and the state before the start appears as the separate samples x[−1], x[−2], and so on.
The Region of Convergence
For x[n] = anu[n], the defining sum is a geometric series:
X(z) = ∑n=0∞ (az−1)n = 1/(1 − az−1) = z/(z − a), for |z| > |a|
The left-sided sequence −anu[−n − 1], nonzero only for n ≤ −1, sums to the same expression but only for |z| < |a|. The expression alone therefore does not identify the sequence, and the region of convergence (ROC) must accompany it. The ROC obeys a few rules:
- It is a ring centered on the origin, which may reach inward to the origin or outward to infinity, because convergence depends only on |z|.
- It contains no poles, so the poles of a rational X(z) mark its edges.
- A sequence of finite length converges everywhere except possibly at z = 0 and z = ∞.
- A right-sided sequence converges outside its outermost pole, and the ROC includes z = ∞ exactly when the sequence is causal.
- A left-sided sequence converges inside its innermost pole, and a two-sided sequence converges in a ring between poles or nowhere.
The sequence (0.5)|n| has a right half that converges for |z| > 0.5 and a left half that converges for |z| < 2, so
X(z) = 0.75/[(1 − 0.5z−1)(1 − 0.5z)], for 0.5 < |z| < 2
The constant sequence x[n] = 1 for all n has no bilateral transform, because its right half needs |z| > 1 and its left half needs |z| < 1. The unilateral transform treats every sequence as zero before n = 0, so its ROC always lies outside a circle, and unilateral tables often omit it.
Common Transform Pairs
Most pairs come from geometric series. The sinusoid entries follow from Euler's formula, because cos Ω0n = (ejΩ0n + e−jΩ0n)/2 is a sum of two geometric sequences, and the entries with a factor n follow from the properties in the next section. In the table, a is a real or complex constant, r is positive, Ω0 is real, and k and N are positive integers. Transforms appear in powers of z−1, the usual form in signal processing, and where compact also in powers of z, the usual form in control.
| Sequence x[n] | Transform X(z) | Region of convergence |
|---|---|---|
| Unit sample δ[n] | 1 | All z |
| Delayed unit sample δ[n − k] | z−k | |z| > 0 |
| Unit step u[n] | 1/(1 − z−1) = z/(z − 1) | |z| > 1 |
| Ramp n u[n] | z−1/(1 − z−1)2 = z/(z − 1)2 | |z| > 1 |
| anu[n] | 1/(1 − az−1) = z/(z − a) | |z| > |a| |
| an−1u[n − 1] | z−1/(1 − az−1) = 1/(z − a) | |z| > |a| |
| n anu[n] | az−1/(1 − az−1)2 = az/(z − a)2 | |z| > |a| |
| (n + 1)anu[n] | 1/(1 − az−1)2 = z2/(z − a)2 | |z| > |a| |
| Left-sided −anu[−n − 1] | 1/(1 − az−1) = z/(z − a) | |z| < |a| |
| cos(Ω0n) u[n] | [1 − (cos Ω0)z−1]/[1 − (2 cos Ω0)z−1 + z−2] | |z| > 1 |
| sin(Ω0n) u[n] | (sin Ω0)z−1/[1 − (2 cos Ω0)z−1 + z−2] | |z| > 1 |
| rncos(Ω0n) u[n] | [1 − (r cos Ω0)z−1]/[1 − (2r cos Ω0)z−1 + r2z−2] | |z| > r |
| rnsin(Ω0n) u[n] | (r sin Ω0)z−1/[1 − (2r cos Ω0)z−1 + r2z−2] | |z| > r |
| Rectangular pulse u[n] − u[n − N] | (1 − z−N)/(1 − z−1) | |z| > 0 |
The denominators follow the pattern of the Laplace table. A factor 1 − az−1 goes with an, as s + α goes with e−αt; a quadratic factor with complex roots goes with a sampled sinusoid; and a squared factor brings a multiplying n. Sampling e−αt every T seconds gives (e−αT)n, so the Laplace pole at s = −α becomes a z-plane pole at z = e−αT, an instance of the mapping z = esT described later.
Properties of the Transform
Each property follows from the defining sum. Below, x[n] and w[n] have transforms X(z) and W(z). Linearity, Z{ax[n] + bw[n]} = aX(z) + bW(z), holds with an ROC that includes the intersection of the two regions.
Time Shift and the Unit Delay
For the bilateral transform, a delay of k samples multiplies the transform by z−k, so Z{x[n − k]} = z−kX(z). Block diagrams therefore label a one-sample delay z−1, and because z−1 is rational where the Laplace delay e−sT is not, any network of delays, adders, and constant multipliers has a rational transfer function. The unilateral transform keeps track of the samples that a shift moves across n = 0:
Z{x[n − 1]} = z−1X(z) + x[−1]
Z{x[n − 2]} = z−2X(z) + z−1x[−1] + x[−2]
Z{x[n + 1]} = zX(z) − zx[0]
These rules play the part of the Laplace derivative rule, sF(s) − f(0−), and bring initial conditions into the solution of a difference equation.
Scaling, Multiplication by n, and Accumulation
Multiplying by an rescales the variable, Z{anx[n]} = X(z/a). A pole or zero at p moves to ap, so a real a between 0 and 1 draws every pole toward the origin, the counterpart of the Laplace frequency shift that moves poles to the left. Multiplying by n differentiates the transform, Z{n x[n]} = −z dX(z)/dz, which turns z/(z − a) into az/(z − a)2 and explains why a repeated pole brings a polynomial factor in n. The running sum of a sequence that starts at n = 0 has the transform X(z)/(1 − z−1), which adds a pole at z = 1 as integration adds a pole at s = 0, and the first difference adds a zero at z = 1.
Convolution
The transform of a convolution is the product of the transforms, Z{(x * w)[n]} = X(z)W(z). The output of a linear time-invariant system is therefore Y(z) = H(z)X(z), and cascaded stages multiply their transfer functions. As with the Laplace transform, the converse fails: the transform of a product x[n]w[n] is not X(z)W(z).
Summary of Properties
Time reversal, listed below, has no unilateral form, and it inverts the ROC, so a region |z| > r becomes |z| < 1/r.
| Property | Sequence | Transform |
|---|---|---|
| Linearity | ax[n] + bw[n] | aX(z) + bW(z) |
| Delay by k, bilateral | x[n − k] | z−kX(z) |
| Delay by one, unilateral | x[n − 1] | z−1X(z) + x[−1] |
| Delay by two, unilateral | x[n − 2] | z−2X(z) + z−1x[−1] + x[−2] |
| Advance by one, unilateral | x[n + 1] | zX(z) − zx[0] |
| Exponential scaling | anx[n] | X(z/a) |
| Multiplication by n | n x[n] | −z dX(z)/dz |
| Accumulation, x[n] = 0 for n < 0 | ∑k=0n x[k] | X(z)/(1 − z−1) |
| First difference, unilateral | x[n] − x[n − 1] | (1 − z−1)X(z) − x[−1] |
| Time reversal, bilateral | x[−n] | X(1/z) |
| Convolution | (x * w)[n] | X(z)W(z) |
Initial- and Final-Value Theorems
Two limit theorems read the first sample and the settled value of a sequence directly from its transform.
Initial Value
For a sequence that is zero for n < 0, or for any unilateral transform,
x[0] = limz→∞ X(z)
because every other term of the defining sum contains a negative power of z. Repeating the argument gives x[1] = limz→∞ z[X(z) − x[0]]. For X(z) = 1/[(1 − 0.5z−1)(1 − 0.25z−1)], these limits give x[0] = 1 and x[1] = 0.75. Unlike its Laplace counterpart, the theorem needs no condition about impulses, since a unit sample at n = 0 is just a finite x[0]. For a bilateral transform the premise matters: if the ROC does not extend to z = ∞, as happens whenever a rational X(z) has a higher degree in z in its numerator than in its denominator, the sequence has samples before n = 0 and the limit does not give x[0].
Final Value
For a sequence that is zero for n < 0, or for any unilateral transform, the final-value theorem is
limn→∞ x[n] = limz→1 (z − 1)X(z)
and it holds only when x[n] actually settles. For a rational X(z), the condition is that every pole of (z − 1)X(z) lie strictly inside the unit circle; equivalently, X(z) may have one simple pole at z = 1, and every other pole must lie inside the circle. Some texts write (1 − z−1)X(z), which gives the same limit. Ignoring the condition gives wrong answers without warning: (z − 1)X(z) tends to 0 as z approaches 1 both for (−1)nu[n], which alternates forever because of its pole at z = −1, and for 2nu[n], which grows without bound because of its pole at z = 2.
The step response of a causal, stable system H(z) has the transform zH(z)/(z − 1), so it settles at H(1), the DC gain, which also equals the sum of the impulse-response samples. For H(z) = 1/(1 − 0.75z−1 + 0.125z−2), H(1) = 1/0.375 = 8/3.
Inverse Z-Transform
Returning from X(z) to x[n] needs both the expression and its ROC. The formal inverse is a contour integral, x[n] = [1/(2πj)] ∫C X(z) zn−1 dz, taken counterclockwise around a closed path C that lies inside the ROC and encircles the origin. For rational transforms, partial fractions and long division do the same work with far less effort.
Partial Fractions in Powers of z−1
A rational X(z) written in powers of z−1, with a numerator of lower degree than its denominator and distinct poles p1 through pN, expands as
X(z) = K1/(1 − p1z−1) + … + KN/(1 − pNz−1)
where Ki is (1 − piz−1)X(z), with the common factor canceled, evaluated at z = pi. For X(z) = 1/[(1 − 0.5z−1)(1 − 0.25z−1)] with ROC |z| > 0.5:
- At z = 0.5, cover the first factor: K1 = 1/(1 − 0.25/0.5) = 2.
- At z = 0.25, cover the second factor: K2 = 1/(1 − 0.5/0.25) = −1.
- Invert each term with the table: x[n] = [2(0.5)n − (0.25)n]u[n], the sequence 1, 0.75, 0.4375, 0.234375, and so on.
Control engineers often expand X(z)/z instead, which produces terms Kz/(z − p) that match the z-form entries of the table and gives the same sequence.
The Region of Convergence Decides
Each term inverts to a right-sided sequence when the ROC lies outside its pole and to a left-sided sequence when the ROC lies inside, so the same expansion yields three different sequences:
- For |z| > 0.5: [2(0.5)n − (0.25)n]u[n], which is causal and absolutely summable.
- For 0.25 < |z| < 0.5: −2(0.5)nu[−n − 1] − (0.25)nu[n], which is two-sided and grows without bound as n decreases.
- For |z| < 0.25: [−2(0.5)n + (0.25)n]u[−n − 1], which is zero for n ≥ 0 and also grows as n decreases.
Only the first region contains the unit circle. A table lookup that ignores the ROC silently picks the causal answer.
Repeated and Complex Poles
A double pole at p contributes A1/(1 − pz−1) + A2/(1 − pz−1)2, and the second term inverts through the pair (n + 1)pnu[n]. For example, z−1/(1 − 0.5z−1)2 inverts to 2n(0.5)nu[n], the sequence 0, 1, 1, 0.75, 0.5, and so on.
Real coefficients make complex poles arrive in conjugate pairs, re±jΩ0. Matching the denominator to 1 − (2r cos Ω0)z−1 + r2z−2 lets the numerator be split between the cosine and sine entries of the table. For X(z) = 1/(1 − z−1 + 0.5z−2), r2 = 0.5 and 2r cos Ω0 = 1, so r = 1/√2 and Ω0 = π/4, with poles at 0.5 ± j0.5. Because r cos Ω0 and r sin Ω0 both equal 0.5, writing the numerator as (1 − 0.5z−1) + 0.5z−1 gives one cosine entry plus one sine entry:
x[n] = (1/√2)n[cos(πn/4) + sin(πn/4)]u[n] = 2(1−n)/2cos[π(n − 1)/4]u[n]
which is the sequence 1, 1, 0.5, 0, −0.25, −0.25, −0.125, 0. The radius sets how fast the envelope shrinks, and the angle sets the frequency of oscillation in radians per sample.
Improper Transforms and Long Division
When the numerator degree in z−1 is not lower than the denominator degree, divide first; the quotient inverts to unit samples at the start of the sequence. Thus (2 − 0.5z−1)/(1 − 0.5z−1) = 1 + 1/(1 − 0.5z−1), so x[n] = δ[n] + (0.5)nu[n], the sequence 2, 0.5, 0.25, and so on.
Continuing the division indefinitely produces the samples themselves. Dividing 1 by 1 − 0.75z−1 + 0.125z−2, the earlier example multiplied out, gives the quotient 1 + 0.75z−1 + 0.4375z−2 + …, in agreement with the partial-fraction result. Division needs no factoring and mirrors the recursion a filter performs, but it yields numbers rather than a closed form. Division in powers of z−1 gives a right-sided sequence; a left-sided ROC calls for division in powers of z instead. In software, MATLAB's residuez and SciPy's scipy.signal.residuez expand in powers of z−1, while MATLAB's filter and SciPy's scipy.signal.lfilter run the recursion. Numerical expansion becomes ill-conditioned when poles are repeated or closely spaced, so hand results remain a useful check.
Difference Equations
A linear constant-coefficient difference equation,
y[n] + a1y[n − 1] + … + aNy[n − N] = b0x[n] + b1x[n − 1] + … + bMx[n − M]
is also an algorithm: solved for y[n], it computes each output from present and past inputs and past outputs. The z-transform predicts what that recursion will do without running it.
From Difference Equation to Transfer Function
With every initial condition zero, the delay property turns each y[n − k] into z−kY(z) and each x[n − k] into z−kX(z), so
H(z) = Y(z)/X(z) = (b0 + b1z−1 + … + bMz−M)/(1 + a1z−1 + … + aNz−N)
The feedforward coefficients b and the feedback coefficients a pass into H(z) unchanged and in order. When every ak is zero, the system has no feedback and a finite impulse response.
The sign of the feedback coefficients is a common source of error. MATLAB and SciPy write the denominator as above, so their recursion subtracts the a terms, but some libraries add them. Arm's CMSIS-DSP documentation, for example, defines its biquad as y[n] = b0x[n] + b1x[n − 1] + b2x[n − 2] + a1y[n − 1] + a2y[n − 2] and warns that coefficients from design tools using the subtracting form must be negated. The mistake moves the poles: negating both feedback coefficients of the stable section 1 − 1.8z−1 + 0.9z−2, whose poles lie at 0.9 ± j0.3, produces a pole at about −2.21, outside the unit circle.
Solving with Initial Conditions
Take y[n] − 0.75y[n − 1] + 0.125y[n − 2] = x[n], with x[n] = u[n], y[−1] = 1, and y[−2] = 0.
- Transform with the unilateral delay rules: Y(z) − 0.75[z−1Y(z) + 1] + 0.125[z−2Y(z) + z−1] = 1/(1 − z−1).
- Collect terms: (1 − 0.75z−1 + 0.125z−2)Y(z) = 1/(1 − z−1) + 0.75 − 0.125z−1.
- Factor the left side as (1 − 0.5z−1)(1 − 0.25z−1) and divide, which splits Y(z) into 1/[(1 − z−1)(1 − 0.5z−1)(1 − 0.25z−1)] and (0.75 − 0.125z−1)/[(1 − 0.5z−1)(1 − 0.25z−1)].
- Expand by the cover-up rule. The first term gives 8/3, −2, and 1/3 at z = 1, 0.5, and 0.25; the second gives 1 and −0.25 at z = 0.5 and 0.25.
- Collect and invert: y[n] = 8/3 − (0.5)n + (1/12)(0.25)n, for n ≥ 0.
Running the recursion confirms the result: y[0] = 1 + 0.75 × 1 = 1.75 and y[1] = 1 + 0.75 × 1.75 − 0.125 × 1 = 2.1875, both of which the formula reproduces. The output settles at 8/3, the DC gain found above.
Zero-Input and Zero-State Responses
The first term of Y(z) is the zero-state response, 8/3 − 2(0.5)n + (1/3)(0.25)n, produced by the input with the system at rest. The second is the zero-input response, (0.5)n − 0.25(0.25)n, produced by the initial conditions alone. Both contain the natural modes (0.5)n and (0.25)n, whose bases are the roots of the characteristic polynomial z2 − 0.75z + 0.125, while the input's pole at z = 1 supplies the forced response, the constant 8/3. Initial conditions change how strongly each mode is excited but never the modes themselves.
Transfer Functions, Poles, and Zeros
For a linear time-invariant system, the transfer function H(z) = Y(z)/X(z), taken with every initial condition zero, is also the transform of the impulse response h[n], because Z{δ[n]} = 1.
Rational Form
A rational H(z) factors as
H(z) = b0(1 − z1z−1)…(1 − zMz−1)/[(1 − p1z−1)…(1 − pNz−1)]
with zeros z1 through zM and poles p1 through pN. Rewritten in powers of z, the same function has N − M additional zeros at the origin when N > M, or M − N additional poles there when M > N; these only shift the response in time. Real coefficients force complex poles and zeros into conjugate pairs, and pole-zero plots mark poles with crosses and zeros with circles, with the unit circle drawn for reference.
What Poles and Zeros Do
Each simple pole p contributes a mode proportional to pn to the response of a causal system. Zeros create no modes of their own; they set how strongly each mode is excited, and a zero on the unit circle at ejΩ0 blocks a sinusoid of frequency Ω0 completely. A zero outside the circle makes a system nonminimum phase, like a right-half-plane zero in continuous time. A system with every pole and zero inside the circle is minimum phase, and its inverse, 1/H(z), is also causal and stable. A pole canceled by a zero vanishes from H(z) but not from the system, and arithmetic with finite word lengths rarely makes the cancellation exact.
The z-Plane and Stability
Plotted in the z-plane, pole locations map the behavior of a system's modes, with the unit circle, |z| = 1, in place of the imaginary axis of the s-plane.
| Pole location | Term in h[n] | Behavior |
|---|---|---|
| Positive real axis inside the circle, z = a | an | Decays geometrically without oscillating |
| Negative real axis inside the circle, z = −a | (−a)n | Decays while alternating in sign, an oscillation at fs/2 |
| z = 1 | Constant | Neither decays nor grows |
| z = −1 | (−1)n | Alternates with constant amplitude |
| Complex pair inside the circle, z = re±jΩ0 | rncos(Ω0n + θ) | Oscillates at Ω0 radians per sample inside a shrinking envelope |
| Complex pair on the circle, z = e±jΩ0 | cos(Ω0n + θ) | Oscillates with constant amplitude |
| Outside the circle, |p| > 1 | pn | Grows geometrically |
| Origin, z = 0 | Unit samples such as δ[n − 1] | Delay only; the term ends after a finite number of samples |
| Pole of multiplicity k at p | nk−1pn | As for a simple pole at p, with a polynomial factor; grows if |p| = 1 |
In the table, 0 < a < 1 and 0 < r < 1. A mode rn falls to 1/e of its starting value after −1/ln r samples, about 1/(1 − r) when r is close to 1, so a pole at r = 0.9 has a time constant of about 9.5 samples and decays to 1 percent after about 44. The angle sets the frequency, Ω0fs/(2π) hertz. Poles close to the circle ring longest and dominate the response.
Bounded-Input, Bounded-Output Stability
A system is bounded-input, bounded-output (BIBO) stable when every bounded input produces a bounded output. For a linear time-invariant system this holds exactly when the impulse response is absolutely summable, ∑|h[n]| < ∞, which is the same as requiring the ROC of H(z) to include the unit circle. A causal system has an ROC outside its outermost pole, so a causal system with a rational transfer function is stable exactly when every pole lies strictly inside the unit circle, |p| < 1. Zeros may lie anywhere.
A simple pole on the circle gives marginal stability: the impulse response stays bounded but never decays, and some bounded input still produces an unbounded output. The accumulator y[n] = y[n − 1] + x[n], with H(z) = 1/(1 − z−1), turns a constant input into a ramp, and a resonator with poles at e±jΩ0 builds up without limit when driven at Ω0.
Testing Without Finding Roots
A second-order denominator 1 + a1z−1 + a2z−2 has both poles strictly inside the unit circle exactly when |a2| < 1 and |a1| < 1 + a2, a region of the coefficient plane called the stability triangle. The section 1 − 1.8z−1 + 0.9z−2 passes, since 0.9 < 1 and 1.8 < 1.9, while its sign-reversed form fails, since 1.8 is not less than 1 − 0.9 = 0.1. Higher orders call for the Jury or Schur-Cohn tests, which work from the coefficients as the Routh-Hurwitz criterion does in continuous time. Quantizing coefficients can still push poles across the circle, which is why high-order filters are built from second-order sections, as IIR Filter Structures explains.
Frequency Response on the Unit Circle
Evaluating H(z) at z = ejΩ
If the complex exponential z0n has been applied to a linear time-invariant system since the distant past, the output is
y[n] = ∑k h[k] z0n−k = H(z0) z0n
provided z0 lies in the ROC. The exponential passes through unchanged in form, scaled by H(z0). Setting z0 = ejΩ gives the frequency response, H(ejΩ) = ∑ h[n]e−jΩn, and a stable system with real coefficients, driven by cos Ωn, settles to |H(ejΩ)| cos(Ωn + φ), where φ is the angle of H(ejΩ).
With Ω = 2πf/fs, the point z = 1 corresponds to DC, z = j to fs/4, and z = −1 to fs/2, the Nyquist frequency. One turn around the circle spans one sampling frequency, so H(ejΩ) is periodic with period 2π, and a digital filter's response repeats at every multiple of fs. With real coefficients the magnitude is an even function of Ω, so plots usually show only 0 ≤ Ω ≤ π.
Relationship to the Discrete-Time Fourier Transform
The sum ∑ x[n]e−jΩn is the discrete-time Fourier transform (DTFT), so the DTFT is the z-transform evaluated on the unit circle whenever the ROC includes the circle. For (0.5)|n|, substitution gives 0.75/(1.25 − cos Ω), a real and positive spectrum, as expected for a sequence symmetric about n = 0. The unit step, whose ROC |z| > 1 excludes the circle, has a DTFT only in a generalized sense, with impulses at Ω = 0, ±2π, and so on. The discrete Fourier transform, which FFT algorithms compute, samples the DTFT of a finite record at N equally spaced points around the circle.
Reading the Response from Poles and Zeros
With H(z) written as b0zN−M(z − z1)…(z − zM)/[(z − p1)…(z − pN)], the magnitude |H(ejΩ)| equals |b0| times the product of the distances from the zeros to the point ejΩ, divided by the product of the distances from the poles. The response peaks where that point passes close to a pole and falls to zero where it crosses a zero on the circle.
A notch filter uses the geometry directly, with zeros on the circle at e±jΩ0 and poles just inside at re±jΩ0:
H(z) = [1 − (2 cos Ω0)z−1 + z−2]/[1 − (2r cos Ω0)z−1 + r2z−2]
To remove 60 Hz interference from a signal sampled at 1 kHz, Ω0 = 2π × 60/1000 = 0.377 radians per sample, and with r = 0.95 the coefficients are 2 cos Ω0 = 1.8596, 2r cos Ω0 = 1.7666, and r2 = 0.9025. The response is exactly zero at 60 Hz, within 0.44 dB of unity at both DC and 500 Hz, and more than 3 dB down only between about 52.6 Hz and 67.4 Hz. Moving the poles closer to the circle narrows the notch, at the cost of longer ringing after a disturbance.
Relationship to the Laplace Transform
Impulse Sampling and z = esT
Represent the samples of x(t), taken every T seconds, as impulses whose areas are the sample values, xs(t) = ∑n=0∞ x(nT)δ(t − nT). The time-delay property of the Laplace transform gives
Xs(s) = ∑n=0∞ x(nT) e−snT
and setting z = esT, with T in seconds and s in reciprocal seconds so that sT is dimensionless, turns this sum into ∑ x[n]z−n, the z-transform of x[n] = x(nT), and turns the one-sample delay e−sT into z−1.
Mapping the s-Plane into the z-Plane
With s = σ + jω and T in seconds, |z| = eσT and the angle of z is ωT radians, the relation Ω = ωT introduced earlier. The imaginary axis therefore maps onto the unit circle, the left half-plane inside it, and the right half-plane outside it, so the two stability boundaries correspond. The mapping is many-to-one: frequencies that differ by a multiple of the sampling frequency, ωs = 2π/T radians per second, land on the same point, which is aliasing expressed geometrically.
With T = 50 µs, the poles of the series RLC example in the Laplace Transform article, s = −6000 ± j8000 s−1, map to z = e−0.3e±j0.4, a pair at radius 0.741 and angles of ±0.4 radians, about ±22.9°. Poles higher in frequency by exactly ωs, 125,664 radians per second, would land on the same two points.
Impulse Invariance
Sampling an analog filter's impulse response gives a digital filter. An RC low-pass filter with time constant τ has h(t) = (1/τ)e−t/τ, and taking h[n] = T h(nT) gives
H(z) = (T/τ)/(1 − e−T/τz−1)
with its pole at z = e−T/τ, where z = esT places s = −1/τ. This impulse-invariant method preserves the shape of the impulse response, but sampling folds any response above fs/2 back into the band, so it suits only filters whose response is already small there. Its gain is also approximate: the DC gain of this H(z), (T/τ)/(1 − e−T/τ), is 1.054 when T = 1 ms and τ = 9.49 ms. Zeros do not follow the mapping, so a general filter is first expanded in partial fractions and each first-order term is mapped separately.
Laplace and z-Transform Counterparts
| Concept | Laplace transform | z-transform |
|---|---|---|
| Transform variable | s, in reciprocal seconds | z = esT, dimensionless |
| Delay | e−sT, not rational | z−1, rational |
| Exponential | e−αt → 1/(s + α) | an → 1/(1 − az−1) |
| Initial conditions enter through | df/dt → sF(s) − f(0−) | x[n − 1] → z−1X(z) + x[−1] |
| Integration or accumulation | F(s)/s | X(z)/(1 − z−1) |
| Initial value | f(0+) = lims→∞ sF(s) | x[0] = limz→∞ X(z) |
| Final value, if the signal settles | lims→0 sF(s) | limz→1 (z − 1)X(z) |
| Stability of a causal system | Every pole has Re(p) < 0 | Every pole has |p| < 1 |
| Frequency response | H(jω), on the imaginary axis | H(ejΩ), on the unit circle, periodic in Ω |
The Bilinear Transform
Substituting s = (1/T) ln z, the inverse of z = esT, would turn a rational H(s) into an irrational H(z). The bilinear transform uses a rational approximation instead:
s = (2/T)(z − 1)/(z + 1), or equivalently z = (1 + sT/2)/(1 − sT/2)
where T is the sampling period in seconds. It replaces the integrator 1/s with (T/2)(1 + z−1)/(1 − z−1), the trapezoidal integration rule, and control engineers call it Tustin's method.
The substitution maps the imaginary axis onto the unit circle exactly once and the left half-plane inside it, so a stable rational analog filter becomes a stable rational digital filter of the same order, with no aliasing. The price is frequency warping. Setting z = ejΩ gives (z − 1)/(z + 1) = j tan(Ω/2), so an analog frequency ωa and the digital frequency ωd to which it maps, both in radians per second, satisfy
ωa = (2/T) tan(ωdT/2)
Near DC the two are nearly equal, but the entire analog frequency axis is squeezed below fs/2. At fs = 1 kHz, an analog cutoff at 100 Hz lands at 96.9 Hz, a digital 250 Hz comes from an analog 318 Hz, and a digital 400 Hz comes from an analog 980 Hz, while infinite analog frequency lands at 500 Hz. Prewarping compensates by designing the analog prototype at the frequency that the warping relation assigns, so that one chosen frequency, usually the cutoff, lands exactly where it is wanted.
FIR and IIR Filters in the z-Domain
Digital filters divide into two families according to whether H(z) has poles away from the origin. FIR Filter Structures and IIR Filter Structures describe the networks that realize each family; this section describes the families in the z-plane.
Finite Impulse Response Filters
A finite impulse response (FIR) filter of length L computes y[n] = ∑k=0L−1 h[k]x[n − k], so H(z) = h[0] + h[1]z−1 + … + h[L − 1]z−(L−1), a polynomial whose coefficients are the impulse response. In powers of z it has L − 1 poles, all at the origin, and L − 1 zeros. The poles cannot leave the circle, so an FIR filter is stable for any coefficients, and the zeros alone shape the response. A symmetric impulse response, h[n] = h[L − 1 − n], gives exactly linear phase, a constant delay of (L − 1)/2 samples, and forces each zero z0 off the unit circle to appear together with its reciprocal, 1/z0. With only zeros to work with, a sharp transition band needs many coefficients, often dozens or hundreds.
Infinite Impulse Response Filters
An infinite impulse response (IIR) filter feeds past outputs back, so it has poles away from the origin, and poles near the unit circle produce resonances and steep transitions with a small fraction of the coefficients an FIR filter would need. The poles also bring costs: stability must be checked and then preserved through coefficient quantization, a causal and stable IIR filter cannot have exactly linear phase, and rounding inside the feedback loop can sustain small oscillations called limit cycles. Many IIR designs start from a Butterworth, Chebyshev, or elliptic analog prototype, move into the z-plane through the bilinear transform, and are built as second-order sections that the stability triangle can test one at a time.
Worked Examples
Two small filters running at fs = 1 kHz, so that T = 1 ms, show the method at work: a moving average, the simplest FIR low-pass filter, and a first-order recursive low-pass filter, the simplest IIR one.
Moving-Average Filter
An M-point moving average outputs the mean of the latest M inputs, so its transfer function is a finite geometric series:
H(z) = (1/M)(1 + z−1 + … + z−(M−1)) = (1/M)(1 − z−M)/(1 − z−1)
The numerator has M zeros spaced evenly around the unit circle at z = ej2πk/M. The zero at z = 1 cancels the apparent pole there, leaving M − 1 zeros on the circle and M − 1 poles at the origin. For M = 4, H(z) = 0.25(1 + z−1)(1 + z−2), with zeros at z = −1, j, and −j, which null 500 Hz and 250 Hz exactly, and the DC gain is H(1) = 1.
On the unit circle the series sums to
H(ejΩ) = e−jΩ(M−1)/2 sin(MΩ/2)/[M sin(Ω/2)]
The exponential factor is a pure delay of (M − 1)/2 samples, 1.5 ms for M = 4, so the phase is exactly linear, as the symmetric coefficients require. For M = 4 the magnitude passes −3 dB near 114 Hz, falls to 0.653, or −3.70 dB, at 125 Hz, and rises between the nulls to a peak of 0.272, or −11.3 dB, near 366 Hz, so its stopband attenuation is poor. The step response is a straight ramp, 0.25, 0.5, 0.75, and 1, that settles completely after M samples.
The nulls make the moving average useful against interference at a known frequency. A 20-point average at 1 kHz spans exactly one 20 ms cycle of 50 Hz mains and places zeros at every multiple of 50 Hz up to 500 Hz, so it removes hum and those harmonics exactly, provided the mains frequency matches. The price is a −3 dB bandwidth of only about 22 Hz, close to the value 0.443fs/M that large M approaches, and a lag of 9.5 ms. The recursive form y[n] = y[n − 1] + (x[n] − x[n − M])/M computes the same H(z) with one addition and one subtraction per sample, but its pole at z = 1 cancels the zero there only in exact arithmetic, which is why cascaded integrator-comb (CIC) decimation filters use integer arithmetic.
First-Order IIR Low-Pass Filter
The exponential moving average moves its output a fraction α of the way toward each new input, y[n] = y[n − 1] + α(x[n] − y[n − 1]), with 0 < α ≤ 1. With a = 1 − α, its transfer function is
H(z) = (1 − a)/(1 − az−1) = (1 − a)z/(z − a)
with a pole at z = a, inside the unit circle for 0 ≤ a < 1, a zero at the origin, and unity gain at DC, H(1) = 1. Take a = 0.9:
- Impulse response: from the table, h[n] = 0.1(0.9)nu[n], a geometric decay whose samples sum to 1.
- Step response: the transform 0.1/[(1 − 0.9z−1)(1 − z−1)] expands to 1/(1 − z−1) − 0.9/(1 − 0.9z−1), so s[n] = 1 − 0.9n+1, the sequence 0.1, 0.19, 0.271, and so on. It first exceeds 90 percent at n = 21, 21 ms after the step.
- Time constant: the mode 0.9n equals e−nT/τ with τ = −T/ln 0.9 = 9.49 ms.
- Cutoff: |H(ejΩ)|2 = (1 − a)2/(1 − 2a cos Ω + a2) equals ½ when cos Ω = 1 − (1 − a)2/(2a) = 0.99444, so Ω = 0.1055 radians per sample, and the −3 dB frequency is 16.78 Hz, where the phase is −42.1°.
- Highest frequency: at fs/2, z = −1 and |H| = (1 − a)/(1 + a) = 0.0526, or −25.6 dB, the deepest attenuation the filter reaches.
An analog RC filter with the same 9.49 ms time constant has its −3 dB frequency at 1/(2πτ) = 16.77 Hz, and at 100 Hz the two responses differ by only 0.14 dB. They part company near fs/2, where the RC filter reaches −29.5 dB and keeps falling while the digital response bottoms out and then repeats around every multiple of fs. Apart from its gain factor, 1 − a, the filter is the impulse-invariant version of the RC filter, because its pole, a = e−T/τ, lies exactly where z = esT places s = −1/τ.
Choosing α as a power of two makes the filter cheap in fixed-point hardware. With α = 1/16, the update needs only a subtraction, an arithmetic shift right by four bits, and an addition. The pole then sits at a = 0.9375, which gives a time constant of 15.5 samples and a −3 dB frequency of 10.3 Hz at 1 kHz. The truncating shift leaves a small steady-state error unless extra fractional bits are carried, a word-length effect outside the transform.
Summary
The z-transform turns a sequence into a function of z, and the region of convergence completes the description. Geometric-series pairs, the delay rule, partial fractions, and long division handle most practical problems, and the unilateral transform solves difference equations together with their initial conditions. The poles of H(z) set the natural modes and must lie strictly inside the unit circle for a causal system to be stable, and H(z) evaluated on the unit circle gives a frequency response that repeats at every multiple of the sampling frequency. The mapping z = esT ties the z-plane to the s-plane, impulse invariance and the bilinear transform carry analog designs across, and FIR and IIR filters differ in whether H(z) has poles away from the origin. The transform assumes exact arithmetic, so quantization and overflow need separate analysis.