Chapter 2 - Z-Transform
Chapter 2 - Z-Transform
Chapter 2 - Z-Transform
For finite sequences, x [n], zero outside the range 0 ≤ n ≤ N , the Z-transform
is a polynomial of degree N in z −1 :
=n=m+k x [k] h [n − k] z −n
k n
That is, X (z) H (z) is the Z-transform of y [n], the convolution of x [n] with
h [n]. Of course, the above derivation is true for both finite and non-finite se-
quences, but starting with finite sequences has intuitive appeal, because you
are used to working with polynomials. In fact, the convolution principle just
derived is a property of polynomial multiplication. Specifically, when you mul-
tiply two polynomials in z together and collect terms, the term in z −n is found
1
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 2
by summing the products, x [k] h [n − k] over all k where the sum is non-zero.
You have done this yourself many times in High School.
We could arrive at the same result by recognizing that X (z) H (z) = Y (z) where
Y (z) is a polynomial of degree 3 in z −1 ,
Y (z) = y0 + y1 z −1 + y2 z −2 + y3 z −3
This yields
0
y0 = xk h0−k = x0 h0 = 1
k=0
1
1 1
y1 = xk h1−k = x0 h1 + x1 h0 = +
4 2
k=0
2
1
y2 = xk h2−k = x1 h1 + x2 h0 = +1
8
k=1
2
1
y3 = xk h3−k = x2 h1 =
4
k=2
The key point to observe from the above is that polynomial multiplication
is the same thing as convolution, where we identify the coefficients of the poly-
nomial with the elements of the sequences being convolved. Power series are
polynomials having an infinite number of terms and the Z-transform is nothing
other than an association of the samples in a sequence with the coefficients in
a formal power series.
Note that this association does not actually give any meaning to the pa-
rameter, z. In a formal power series, z is a formal parameter which is used
for manipulative purposes, but has no real meaning. In the example above,
for example, we did not need to give z any interpretation. We will find in the
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 3
next section that there is a useful interpretation which can be associated with
z, which derives from the close similarity between the Z-transform and Fourier
transform expressions. For now, however, we wish to make a clear distinction
between the Z-transform and the Fourier transform:
y [n] = x [n] + αy [n − 1]
where x [n] is the input to the system and y [n] is the output. Such systems are
said to be recursive, since the output at time n is dependent upon the output
produced at previous time instants. Thinking of sequences as vectors, as in your
first set of handouts, the above relationship may be written as
y = x + αy1
X (z)
Y (z) =
1 − αz −1
So the system impulse response, h [n], must have Z-transform,
1
H (z) =
1 − (αz −1 )
2 3
= 1 + αz −1 + αz −1 + αz −1 + ···
The power series expansion above allows us to deduce the impulse response im-
mediately as
αn n ≥ 0
h [n] =
0 n<0
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 4
= xr [n] e−jωn
n
= x̂r (ω)
That is, X (z) is identical to the DTFT of the modified sequence, x̂r (ω), formed
by applying the exponential decay term, r−n , to x [n].
Of course, this Fourier transform only exists so long as the sum above con-
verges, for which it is sufficient to know that the sequence, xr [n], is absolutely
summable, i.e.,
|xr [n]| = r−n x [n] < ∞
n n
If this is true for r = 1, then the Fourier transform of x [n] exists and we can
say that
x̂ (ω) = X(z)|z=ejω
Suppose that x [n] is a causal sequence (or one which extends only a finite
distance into the past). This is true of all filter impulse responses in which
we will be interested during this subject. It follows that xr [n] is absolutely
summable for all r > r0 where r0 is the magnitude of the largest pole in X (z).
r0 is called the radius of convergence (ROC).
Remark 2 So long as the ROC is strictly less than 1, x [n] is absolutely sum-
mable and its Fourier transform exists, with x̂ (ω) = X ejω .
x [n] = rn xr [n]
π
1
= rn X rejω ejω dω (2)
2π −π
Although this may seem perfectly clean at first sight, there are a number
of subtleties. Firstly, this inverse is not actually useful for practical purposes
if r > 1, since then the term rn grows rapidly without bound, amplifying the
effects of otherwise insignificant calculation errors to the point where the result
is useless. But if the ROC includes r = 1, we might as well just use the inverse
DTFT directly, getting
π
1
x [n] = X ejω ejω dω
2π −π
which is stable.
Secondly, although one can recover x [n] from X (z), one cannot start with
just any function, X (z), and recover a valid sequence, x [n] whose Z-transform
is X (z). In fact, the function X (z) must have the property that it is defined by
its values on any closed contour inside the ROC. This is clear, since we should
recover the same sequence, x [n], using any r > r0 in equation (2). Functions
with this property (amongst others) are said to be “Analytic functions”.
These observations reinforce the fact that the Z-transform is a tool for analy-
sis, not for numerically representing sequences as functions. By contrast, many
of the transforms which we encounter in signal processing are useful for signal
representation and for direct numerical computation.
where y [n] is the output sequence, x [n] the input sequence and M , N , {ak } and
{bk } are parameters, which we can select. This equation describes the discrete
LTI operators which may be implemented using a finite number of operations,
with a finite amount of memory. For this reason, the term “digital filter” is
generally used to refer to operators of this form.
The Z-transform is perfectly suited to representing and analyzing exactly
systems of the form given in equation (3). Using the property that a unit delay
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 6
and hence
Y (z) a0 + a1 z −1 + · · · + aM z −M
H (z) = =
X (Z) 1 + b1 z −1 + b2 z −2 + · · · + bN z −N
a0 z M + a1 z M−1 + · · · + aM zN
= M
· N N−1
z z + b1 z + · · · + bN
(z − z1 ) (z − z2 ) · · · (z − zM ) zN
= A M
· (4)
z (z − p1 ) (z − p2 ) · · · (z − pN )
Here, H (z) is the Z-transform of the system’s impulse response, h [n], and we see
that H (z) is a rational polynomial — an expression involving finite polynomials
in the numerator and denominator.
According to the Fundamental Theorem of Algebra, every finite polynomial
can be factored into simple monomials, as shown in equation (4), where {zk }
(zeros of H (z)) are the roots of the numerator polynomial and {pk } (poles of
H (z)) are the roots of the denomenator polynomial. Both the poles and the
zeros are complex-valued in general, but they must appear in complex-conjugate
pairs, so long as the filter coefficients, {ak } and {bk }, are real-valued.
It is instructive to represent H (z) as a cascade of simple segments, each
having real-valued coefficients. Specifically, equation (4) may be rearranged as
Mr e a l Mr e a l +Mc o n j
z − zk (z − zk ) (z − zk∗ )
H (z) = A
z z2
k=1 k=Mr e a l +1
Nr e a l Nr e a l +Nc o n j
z z2
×
z − pk (z − pk ) (z − p∗k )
k=1 k=Nr e a l +1
Mr e a l Mr e a l +Mc o n j
z − zk z 2 − 2zrk cos θk + rk2
= A
z z2
k=1 k=Mr e a l +1
Nr e a l Nr e a l +Nc o n j
z z2
×
z − pk z2 − 2zρk cos ω k + ρ2k
k=1 k=Nr e a l +1
where Mreal , Mconj , Nreal and Nconj denote the number of real-valued zeros, the
number of complex conjugate pairs of zeros, the number of real-valued poles
and the number of complex conjugate pairs of poles, complex-valued zeros are
expressed as
zk = rk ejθk
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 7
pk = ρk ejωk
z z2
and
z − pk z 2 − 2zρk cos ω k + ρ2k
Remark 3 The all-zero and all-pole first and second order sections used to
represent any system of the form given in equation (3) each have exactly the
same number of poles and zeros. The so-called “all-zero” sections have only
trivial poles at z = 0, while the “all-pole” sections have only trivial zeros at
z = 0.
t t=0
n
1 − ej2(n+1)ωk
= ρnk e−jnωk ej2tωk = ρnk e−jnωk u [n]
t=0
1 − ej2ωk
−j(n+1)ω k
e − ej(n+1)ωk sin (n + 1) ω k
= ρnk u [n] = ρnk u [n]
e−jωk − ejωk sin ω k
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 9
Exercise 1 Sketch the second order all-pole impulse response, h [n], given
above, assuming that ρk < 1. What are its main features? Evaluate h [0].
What is the peak response if ω k = π/6 and ρk ≈ 1? Can you think why it is that
the peak response might grow as ω k gets close to 0. Hint: sketch the locations
of the poles for various values of ω k with ρk close to 1.
ℑ(z )
unit circle e jω
v1
v2
0 z0 ℜ(z )
ℑ( z )
unit circle
ρ0
ω0
ℜ( z )
v1 v2
v3
e jω
sequence. To be more precise, let x [n] denote an input sequence, whose samples
are bounded according to
|x [n]| ≤ Bx , ∀n
where Bx is some bound. All practical signals which we will encounter are
bounded, because we must acquire them using physical circuits, which can-
not accept voltages (or currents) in excess of some implementation-dependent
bound. Let y [n] denote the output sequence produced by the system, so that
y = H (x). The operator, H (), is BIBO stable so long as there exists a finite
bound By , for every bound Bx , such that
|y [n]| ≤ By , ∀n
When the system under consideration is a filter, the output bound may be
found very easily from
∞
By = Bx |h [n]|
n=0
To see this, note that this By does indeed bound the magnitude of y [n], observe
that
∞
|y [n]| = h [k] x [n − k]
k=0
∞
≤ |h [k] x [n − k]|
k=0
∞
= |h [k]| · |x [n − k]|
k=0
≤ Bx · |h [k]| = By
To see that the bound, By , is tight, choose x [n] to be the causal sequence
The value of the left hand side in this expression is known as the filter’s BIBO
gain.
z z2
and
z − p0 z 2 − 2zρ0 cos ω 0 + ρ20
In Section 3.1, we found that the impulse response of the first order all-pole
filter is h [n] = pn0 , from which we immediately conclude that the filter is BIBO
stable if and only if |p0 | < 1.
In Section 3.2, we found that the impulse responses of the second order all-
pole filter has an envelope of the form ρn0 , from which we again conclude that
the filter is BIBO stable if and only if |ρ0 | = |p0 | < 1.
Summary 5 The first and second order all-pole filters are each BIBO stable if
and only if their poles lie strictly inside the unit circle (magnitude less than 1).
Since all filters may be composed of first and second order all-pole and all-zero
sections, a filter is BIBO stable if and only if all of its poles lie strictly inside
the unit circle.
If an LTI system has one or more poles on the unit circle, it is sometimes
called “conditionally stable”. As we shall see, this is a desirable condition in the
construction of digital oscillators. Note, however, that such a system cannot be
called BIBO stable, since it has an infinite BIBO gain.
z2
H (z) = (7)
z 2 + bz + c
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 13
c
1
complex poles
−2 real poles 2 b
−1
That is,
2 − |b| > |b|2 − 4c
which clearly requires |b| ≤ 2 and, squaring both sides,
∂θ (ω)
tg (ω) = −
∂ω
where θ (ω) = ĥ (ω) is the phase response of the filter.
where σ = tg is the constant group delay. Noting that ĥ (ω) is an even function
of ω, we may deduce that linear phase filters satisfy
Before concluding this section, we note that our treatment of linear phase
filters has focussed exclusively on filters for which H (z) = z −N H z −1 , or
in the continuous domain on filters for which h (t) = h (2σ − t). These are
filters whose impulse response is symmetric about the delay σ, which are then
delayed versions of zero phase filters. We have not discussed anti-symmetric
filters that are also usually considered under the linear phase category. Anti-
symmetric filters have H (z) = −z −n H z −1 or h (t) = −h (2σ − t); they do
not correspond to delayed zero phase filters, but the phase of ĥ (ω) still has
constant derivative −σ everywhere except at ω = 0 where the phase of ĥ (ω) is
discontinuous. Anti-symmetric filters of odd order N = 2K + 1, have an even
number of anti-symmetric coefficients:
a0 , a1 , . . . , aK , −aK , . . . , −a1 , −a0
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 17
ĥ (ω) = 1, ∀ω
H (z) H z −1 = 1
2
The mapping of ĥ (ω) to H (z) H z −1 is an extremely useful relationship
which we will have cause to use many times throughout this subject.
This means that every pole, pk , is matched by a reciprocal zero, zk = p1k , and
vice-versa. This, in turn, means that non-trivial all-pass filters must have both
poles and zeros, so they must have infinite impulse responses. The general form
of an all-pass filter is
1 1 1
z− p1 z− p2 ··· z − pN
H (z) =
(z − p1 ) (z − p2 ) · · · (z − pN )
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 18
where
ejω − zk
ĥk (ω) =
ejω − 0
Note that zk may be real or complex-valued.
The above exercises reveal the fact that filters whose zeros are inside the
unit circle have phases which start and end at 0, while filters with zeros outside
the unit circle have phases which decrease monotonically. This may be seen as
a consequence of the “Argument Principle”, according to which the total phase
change experienced as z follows a closed trajectory is equal to 2π (#Z − #P ),
where #Z and #P are the number of zeros and poles, respectively, enclosed by
the trajectory.
If |zk | < 1, it can be shown that the group delay, tg (ω), of the filter
z − zk
z
is always smaller than the group delay of the filter
1
z− zk
z
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 19
Both of these filters, however, have the same magnitude response (with recip-
rocal DC gains), which may be deduced easily from the fact that
z − zk
z − z1k
is an all-pass filter.
In general, given any FIR filter of the form in equation (10), one may con-
struct up to 2M different filters all having exactly the same magnitude response,
by selectively replacing zeros by their reciprocals. If the filter has complex zeros,
complex-conjugate pairs must be reciprocated together, so there may be only
2M/2 different filters with the same magnitude response, having real-valued co-
efficients. Amongst these different filters, the one with minimum delay is that
which has all of its zeros inside the unit circle. Such a filter is said to be “mini-
mum phase.”
Summary 7 A filter is said to be minimum phase if all of its zeros lie inside
the unit circle. Amongst all filters with the same magnitude response, only one
will have minimum phase and this will have the lowest group delay.
The above property extends from FIR filters to digital filters in general.
Minimum phase is a property only of the filter’s zeros, not its poles. An obvious
benefit of the minimum phase property is that signals are delayed as little as
possible as they travel through the filter. Another important benefit, however,
is that minimum phase filters can be inverted. Writing
A (z)
H (z) =
B (z)
where A (z) and B (z) are finite polynomials, the inverse filter is
1 B (z)
=
H (z) A (z)
Its poles are the zeros of H (z) and its zeros are the poles of H (z). The inverse
filter will be BIBO stable if and only if all of its poles lie inside the unit circle,
for which we require H (z) to be minimum phase.
6 Digital Oscillators
We conclude this chapter by considering digital oscillators. In Section 3.2, we
saw that an all-pole filter with a pair of complex-valued poles,
p1 , p2 = ρ0 e±jω0
Y (z) 1
H (z) = =
X (z) 1 − 2z cos ω 0 + z −2
−1
Since the impulse response in equation (11) is obtained with zero initial con-
ditions, y [n] = 0 for n < 0, setting x [n] = sin ω 0 · δ [n], the system may be
implemented as follows:
y [n] = cos (ω 0 n + θ0 )
where θ0 is a fixed phase offset of choice. For each output sample, this would
require the following computations:
Exercise 4 Show that it is possible to control the initial phase of the digital
oscillator by driving it with an input, x [n], having non-zero values at n = 0 and
n = −1, rather than just n = 0. In particular, find values of x [0] and x [−1]
such that the phase offset, θ0 , is 0. Show that this is equivalent to driving the
filter with an impulse at n = 0, but adopting non-zero initial conditions.