Chapter 2 - Z-Transform

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Elec4621:

Advanced Digital Signal Processing


Chapter 2: Z-Transforms, Filters and
Oscillators
Dr. D. S. Taubman
March 16, 2015

1 Introduction to the Z-Transform


The Z-transform of a sequence, x [n], is a formal power series, defined by

X (z) = x [n] z −n (1)
n=−∞

For finite sequences, x [n], zero outside the range 0 ≤ n ≤ N , the Z-transform
is a polynomial of degree N in z −1 :

X (z) = x [0] + x [1] z −1 + · · · + x [N ] z −N


Now let x [n] and h [n] be two finite sequences with lengths N + 1 and M + 1,
respectively. The product of their Z-transform polynomials is a polynomial of
degree N + M in z −1 :
X (z) H (z) = x [0] + x[1]z −1 + · · · + x [N ] z −N × h [0] + h[1]z −1 + · · · + h [M ] z −M
= x [k] h [m] z −(k+m)
k m

=n=m+k x [k] h [n − k] z −n
k n

= y[n]z −n ; where y[n] = x [k] h [n − k]


n k

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.

Example 1 Consider the polynomials X (z) = 1 + 12 z −1 + z −2 and H (z) =


1 + 14 z −1 . Multiplying these polynomials gives
1
X (z) H (z) = X (z) + z −1 X (z)
4
1 −1 1 1 1
= 1 + z + z −2 + z −1 + z −2 + z −3
2 4 8 4
1 1 −1 1 1
= 1+ + z + 1+ z + z −3
−2
2 4 8 4

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

where the coefficients are given by


min{2,n}
yn = xk hn−k
k=max{0,n−1}

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:

Remark 1 The Fourier transform gives an invertible relationship between se-


quences of finite energy and functions defined on the interval ω ∈ (−π, π). By
contrast, the Z-transform is best understood as a formal assocation between the
samples in a sequence (not necessarily with finite energy) and the coefficients of
a power series (generalized polynomial) for manipulative purposes.

The manipulative power of the Z-transform representation of sequences be-


comes particularly apparent when we consider recursive systems, as suggested
by the following example.

Example 2 Consider the discrete linear time invariant system described by

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

where y1 denotes the sequence, y, delayed by 1. Applying the readily verified


identity
Y (z) = z −1 Y1 (z)
we find that
Y (z) = X (z) + αz −1 Y (z)
which we manipulate in a trivial way to obtain

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

2 Z-Transforms and the Fourier Transform


Up to this point we have not given any interpretation to z whatsoever, regarding
it as a formal parameter. It is useful, however, to consider what happens if we
substitute
z = rejω
into the Z-transform expression of equation (1). We obtain

X (z) = x [n] r−n e−jωn


n
xr [n]

= 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ω .

2.1 Z-Transform Inversion


We may use the relationship with the Fourier transform to find an inversion
procedure for the Z-transform. As we shall see, however, some caution should
be exercised here when using the term “inversion.”
Let X (z) be the Z-transform of some sequence, x [n], and let r > r0 where r0
is the ROC (radius of convergence). In particular, X (z) is finite for all complex
z with magnitude |z| ≥ r. Then xr [n] is absolutely summable and its Fourier
transform (DTFT) exists and is equal to X rejω . We can use the inverse
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 5

DTFT relationship to write

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.

3 Pole-Zero Representation of Filters


Although the word “filter” may be applied to any linear time-invariant (LTI)
operator which is stable, not all such operators can be implemented in prac-
tice. The family of discrete LTI operators which can be implemented may be
described by the following general equation
M N
y [n] = ak x [n − k] − bk y [n − k] (3)
k=0 k=1

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

is equivalent to multiplication by z −1 in the Z-transform domain, we may rewrite


equation (3) as
M N
Y (z) = ak z −k X (z) − bk z −k Y (z)
k=0 k=1

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

while complex-valued poles are expressed as

pk = ρk ejωk

The overall filter may thus be understood (and implemented, if desired) as a


cascade of first and second order sections and its properties may be understood
in terms of the properties of those simple sections.
A filter having no non-trivial poles is composed of first and second order
sections of the form
z − zk z 2 − 2zrk cos θk + rk2
and
z z2
Such a filter is sometimes called an “all-zero” filter, but more commonly it is
identified as an FIR (Finite Impulse Response) filter, because its imple-
mentation involves no feedback — N = 0 in equation (3).
A filter having no non-trivial zeros, has sections of the form

z z2
and
z − pk z 2 − 2zρk cos ω k + ρ2k

Such a filter is sometimes called an “all-pole” filter.


The term “recursive filter” is used to describe filters having one or more
non-trivial poles, possibly in addition to one or more zeros. The term derives
from the presence of feedback terms, bk , in equation (3). Recursive filters are
also called IIR (Infinite Impulse Response) filters since the presence of feedback
implies that their impulse responses extend indefinitely, unless poles and zeros
cancel perfectly.

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.

3.1 First Order Impulse Responses


The first order, all-zero section,
z − zk
= 1 − zk z −1
z
represents an FIR filter having two non-zero samples (also called filter taps),

h [0] = 1, h [1] = −zk

The first order, all-pole section,


z 1
= = 1 + pk z −1 + p2k z −2 + · · · + pnk z −n + · · ·
z − pk 1 − pk z −1
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 8

represents an IIR filter having the exponentially decaying impulse response


pnk n≥0
h [n] = = pnk u [n]
0 n<0
where u [n] is the unit step sequence. As an alternative to the power series
manipulation above, we can recognize that this section arises in connection
with a recursive system of the form
y [n] = x [n] + pk · y [n − 1]
To find the impulse response of this system, let x [n] = δ [n] and y [n] = 0 for all
n < 0. Then, identifying y [n] with the impulse response, h [n], we find that
h [0] = x [0] = 1
h [1] = pk h [0] = pk
h [2] = pk h [1] = p2k
..
.
h [n] = pk h [n − 1] = pnk
..
.
exactly as before.

3.2 Second Order Impulse Responses


The second order, all-zero section,
z 2 − 2zrk cos θk + rk2
= 1 − 2rk cos θk z −1 + rk2 z −2
z2
represents an FIR filter having three filter taps,
h [0] = 1, h [1] = −2rk cos θk , h [2] = rk2
The second order, all-pole section,
z2 z z
= · (5)
z2 − 2zρk cos ω k + ρ2k z − ρk ejωk z − ρk e−jωk
represents an IIR filter with impulse response, h [n], equal to the convolution of
h1 [n] = ρnk ejnωk u [n] and h2 [n] = ρnk e−jnωk u [n]. That is,
n
h [n] = h1 [t] h2 [n − t] = ρtk ejtωk ρn−t
k e
−j(n−t)ω k

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.

3.3 Frequency Responses


Ignoring the gain factor, A, every realizable digital filter is completely described
by its poles and zeros, of which there are a finite number. The frequency re-
sponse, ĥ (ω), may be readily calculated by substituting ejω for z, and we may
deduce many useful properties concerning this frequency response by examining
the structure of the poles and zeros. Some of the more interesting properties
are examined in the next two sections.
Example 3 Consider the first order all-zero filter,
z − z0
H (z) =
z
The frequency response at frequency ω is given by
ejω − z0 v1 (ω)
ĥ (ω) = H ejω = =
ejω − 0 v2 (ω)
where v1 (ω) and v2 (ω) are the two phasors shown in Figure 1. Thus, the
magnitude response, ĥ (ω) = |v1 (ω)| / |v2 (ω)|, is the ratio of the distance from
z0 to ejω and the distance from 0 to ejω . Similarly, the phase response, ĥ (ω) =
v1 (ω) − v2 (ω), is the difference between the angle of the phasor from z0 to
ejω and the angle of the phasor from 0 to ejω .
Example 4 Consider the second order all-pole filter,
z2 z2
H (z) = 2 =
z2 − 2ρ0 z cos ω 0 + ρ0 (z − ρ0 e ) (z − ρ0 e−jω0 )
jω 0

The pole-zero plot is shown in Figure 2. The frequency response is given by


2
ejω − 0 v12 (ω)
ĥ (ω) = jω =
(e − ρ0 ejω0 ) (ejω − ρ0 e−jω0 ) v2 (ω) v3 (ω)
where v1 , v2 and v3 are the phasors shown in the figure.

4 Stability of Recursive Filters


4.1 BIBO Stability
We say that a system is BIBO (Bounded Input, Bounded Output) stable if
it produces a bounded output sequence, in response to every bounded input
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 10

ℑ(z )

unit circle e jω

v1
v2

0 z0 ℜ(z )

Figure 1: Pole-zero plot for a first order all-zero filter.

ℑ( z )

unit circle

ρ0
ω0
ℜ( z )
v1 v2

v3

e jω

Figure 2: Pole-zero plot of a second order all-pole filter.


c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 11

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

x [n] = Bx sign (h [N − n]) u [n]

where N is any positive integer. The output at location N is then given by


N
y [N ] = h [k] x [N − k]
k=0
N
= h [k] sign (h [k]) Bx
k=0
N
= Bx |h [k]| −→N →∞ By
k=0

Since N is arbitrary, it is always possible to find a causal sequence, x [n], which


will produce at least one output, y [N ], which approaches By arbitrarily closely.
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 12

Summary 4 We conclude that a filter is BIBO stable if and only if



|h [n]| < ∞ (6)
n=0

The value of the left hand side in this expression is known as the filter’s BIBO
gain.

4.2 Pole Placement


FIR filters are inherently stable because only finitely many terms contribute
to the sum in equation (6). Recursive filters, however, may be unstable. Now
recall that a filter may be decomposed into a finite cascade of first and second
order filters. The entire filter will be stable if and only if each element in this
cascade is stable. To see this, simply observe that the BIBO gain of a cascade
of stable operators cannot be larger than the product of their individual BIBO
gains. It is thus sufficient for us to consider the stability of first and second
order all-pole filters, having transfer functions

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.

4.3 The Stability Triangle


Consider a two pole system with transfer function

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

Figure 3: Stability triangle.

where b and c are coefficients. The system has two poles,



b b2 − 4c
p1 , p2 = − ±
2 2
The system is BIBO stable if the poles both lie inside the unit circle. We may
consider two cases:

Complex Poles (|b| < 2 c): Comparing equation (7) with equation (5), we
may immediately identify c with ρ, the magnitude of the poles. So the
system is stable only if c < 1.

Real Poles (|b| ≥ 2 c): The system is stable if and only if

b b2 − 4c
+ <1
2 2

That is,
2 − |b| > |b|2 − 4c
which clearly requires |b| ≤ 2 and, squaring both sides,

4 − 4 |b| + |b|2 > |b|2 − 4c


=⇒ |b| − c < 1

These conditions may be conveniently represented in the stability diagram


shown in Figure 3. Evidently, a stable second order system must have (b, c)
lying inside the triangle
√ having vertices at (−2, 1), (2, 1) and (0, −1). Points on
the parabola, |b| = 2 c, result in identical real-valued poles, while points above
the parabola result in complex conjugate poles.
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 14

Exercise 2 Determine by inspection, whether or not each of the following sys-


tems is stable.
z2 1 + 4z 2
2
,
z + 2z + 3 (3z 2 − 1)

5 Useful Properties of Filters


5.1 Group Delay
Causal filters inevitably involve some kind of delay, since the system response
extends from the point of excitation out into the future (not the past). However,
not all signals will experience the same delay passing through the filter.
Consider a real-valued signal, x ≡ x (t). Delaying this signal by an amount,
σ, yields xσ = x (t − σ), where the Fourier transforms of x and xσ are related
by
x̂σ (ω) = e−jσω x̂ (ω)
So a pure delay by any amount σ is equivalent to filtering x (t) by a filter having
the transfer function, ĥ (ω) = e−jσω . Such a filter is said to have a linear phase
response, since the phase, ĥ (ω) = −σω, is a linear function of ω. The pure
delay filter also has unit magnitude.
Now recall that discrete filtering of sampled signals is equivalent to filtering
the underlying continuous-time signals which they represent, so long as the
continuous-time signal is Nyquist bandlimited. Thus, a digital filter having the
transfer function ĥ (ω) = e−jσω implements a perfect delay by σ, regardless of
whether σ is an integer or not.
More generally, the effect of a digital filter on narrowband signals, with
frequencies in the neighbourhood of ω, may be described in terms of two quan-
tities: gain; and delay. The gain is given by ĥ (ω) , while the delay (known as
the “group delay”) is given by

∂θ (ω)
tg (ω) = −
∂ω
where θ (ω) = ĥ (ω) is the phase response of the filter.

5.2 Linear Phase


A linear phase filter is one for which the group delay is constant. If we regard an
input signal as a sum of narrowband components, the fact that the group delay
is constant means each of the constituent components is delayed by exactly the
same amount. Linear phase is important for applications which are sensitive
to the relative arrival times of different frequency components. Broad band
communications systems (e.g., CDMA systems) are a good example in this
regard.
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 15

The transfer function of a linear phase filter may be given as

ĥ (ω) = ĥ (ω) e−jσω

where σ = tg is the constant group delay. Noting that ĥ (ω) is an even function
of ω, we may deduce that linear phase filters satisfy

ĥ (−ω) = ĥ (ω) ejσω = ĥ (ω) ej2σω

Now ĥ (ω) = H (z)|z=ejω , so ĥ (−ω) = H z −1 z=ejω


. Thus, writing the above
equation in the Z-transform domain yields
H z −1 = H (z) z 2σ (8)
For a linear phase digital filter to be realizable, z 2σ must be an integer power
of z, meaning that the group delay, σ, must be an integer multiple of 12 . In
particular, letting 2σ = N , equation (8) becomes
H z −1 = z N H (z) (9)
We may draw the following conclusions:
1. The non-trivial zeros and poles of a linear phase filter must appear in
reciprocal pairs. That is, for each zero at zk = 0, there must be another
zero at z1k and for each pole at pk = 0, there must be another pole at p1k .
2. Realizable linear phase filters may not have any non-trivial poles — i.e.,
they must be FIR. The reason for this is that any non-trivial pole inside
the unit circle must be matched by a reciprocal pole which is necessarily
outside the unit circle, rendering the filter unstable.
3. Linear phase filters must be symmetric. To see this, observe that since
realizable linear phase filters are FIR, their transfer function can be written
as
H (z) = a0 + a1 z −1 + · · · + aM z −M
Combining this with equation (9), we get
H (z) = z −N H z −1 = a0 z −N + a1 z 1−N + · · · + aM z M−N
Don’t get bogged down in the equations here; all we have done is flip
H (z) around and then delay it by N . By assumption, aM = 0, so the
term aM z M −N must be non-zero and correspond to one of the terms in
the causal H (z). It follows that we must have M ≤ N . If a0 = 0 then
the term a0 z −N must also be one of the terms found in H (z) so N ≤ M ,
which means that N = M and an = aN −n for all n. More generally, one
can have some number of leading terms a0 throuh aL from H (z) equal to
0. In this case, we must have N = M + L = 2σ, where L is the number
of leading zeroes in H (z). We will not normally bother considering this
special case, since a filter with L leading zeros is just a delayed version
(delayed by L) of a filter with no leading zeroes.
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 16

4. The transfer function of a linear phase filter can be written as


H (z) = A (z) A z −1 U (z)
where A (z) contains all zeroes that lie inside the unit circle, as well as one
zero from each pair of complex conjugate zeroes that lie on the unit circle.
A z −1 accounts for all zeroes that lie outside the unit circle, along with
the reciprocal pairs of each zero in A (z) that lies on the unit circle. The
term U (z) serves to account for zeroes that 1 and −1, which are their own
reciprocals.
5. If N = 2K is even, U (z) has an even order and so can be empty. Such
filters can have non-zero gain everywhere on the unit circle — i.e., non-zero
ĥ (ω) for all ω. The filter must have 2K + 1 coefficients, symmetrically
arranged as follows:
a0 , a1 , . . . , aK−1 , aK , aK−1 , . . . , a1 , a0

6. If N = 2K + 1 is odd, the group delay is an odd multiple of 12 , and U (z)


is an odd degree polynomial that cannot be empty. That is, U (z) must
be zero at least at z = 1 or z = −1, so that ĥ (ω) must be 0 at DC or at
the Nyquist frequency ω = π. In fact, H (z) must have a zero at −1 (zero
gain at the Nyquist frequency). To see this, note that FIR linear phase
filters with odd order have an even number of coefficients:
a0 , a1 , . . . , aK , aK , . . . , a1 , a0
It follows that
K K
H (−1) = ak (−1)k + ak (−1)N−k
k=0 k=0
K
N
= 1 + (−1) · ak = 0
k=0
0, since N odd

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

and so must have DC gain of 0. Anti-symmetric filters of even order have an


odd number of anti-symmetric coefficients, whose central coefficient must be 0:

a0 , a1 , . . . , aK−1 , 0, −aK−1 , . . . , −a1 , −a0

It follows that these also have DC gain of 0. Thus ĥ (ω) must be 0 at ω = 0,


which is where the phase of ĥ (ω) changes discontinuously. We will not have
much cause to consider anti-symmetric filters in this course.

5.3 All Pass


An “all-pass” filter is one whose magnitude response is unity, i.e.,

ĥ (ω) = 1, ∀ω

To understand all-pass filters in the Z-transform domain, we begin by observing


that
2
1 = ĥ (ω) = ĥ (ω) ĥ∗ (ω)

where ∗ denotes complex conjugation, as usual. But real-valued signals have


Fourier transforms which satisfy

ĥ∗ (ω) = ĥ (−ω)

from which we get


1 = ĥ (ω) ĥ (−ω)
and in the Z-transform domain, this becomes

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.

Summary 6 An all-pass filter satisfies the following relationship


1
H (z) =
H (z −1 )

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

5.4 Minimum Phase


A particularly useful class of filter are the so-called “minimum phase” filters.
We will begin by restricting our attention to FIR filters. The general form of a
causal linear phase FIR filter’s transfer function is
z − z1 z − z2 z − zM
H (z) = · · ··· · (10)
z z z
and the phase response of such a filter may be found as the sum of the phase
responses from each first order section,

ĥ (ω) = ĥ1 (ω) + ĥ2 (ω) + · · · + ĥM (ω)

where
ejω − zk
ĥk (ω) =
ejω − 0
Note that zk may be real or complex-valued.

Exercise 3 Assuming that zk is real-valued, in the range 0 < zk < 1, convince


yourself by drawing pictures or otherwise that as ω travels from 0 to π, the phase
of ĥk (ω) is always non-negative, increasing from 0 to a maximum value, and
then decreasing again back to 0. Sketch the phase as a function of ω.
Now letting −1 < zk < 0, convince yourself that as ω travels from 0 to π,
the phase of ĥk (ω) is non-positive, decreasing from 0 to a minimum value, and
then returning to 0. Sketch the phase as a function of ω.
Now letting zk > 1, convince yourself that the phase starts at π and decreases
monotonically to 0. Sketch the phase as a function of ω.
Finally, letting zk < −1, convince yourself that the phase starts at 0, de-
creasing monotonically to −π. Sketch the phase as a function of ω.

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

has transfer function,


z2
H (z) =
z 2 − 2zρ0 cos ω 0 + ρ20
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 20

and impulse response


1
h [n] = u [n] ρn sin (nω 0 + ω 0 )
sin ω 0 0
This impulse response has the form of an exponentially decaying sinusoidal
waveform, with frequency f = ω2π0 cycles per sampling interval.
If we move the poles onto the unit circle so that ρn0 = 1 and p1 , p2 = e±jω0 ,
a single impulse of amplitude sin ω 0 at time n = 0 will excite the system to
produce an oscillatory output waveform,

y [n] = u [n] sin (nω 0 + ω 0 ) (11)


π
= u [n] cos nω 0 + ω 0 −
2
which has frequency ω2π0 and a phase offset of θ0 = ω 0 − π2 .
The recursive system may be found by writing

Y (z) 1
H (z) = =
X (z) 1 − 2z cos ω 0 + z −2
−1

=⇒ Y (z) = X (z) + 2 cos ω 0 · z −1 Y (z) − z −2 Y (z)


=⇒ y [n] = x [n] + 2 cos ω 0 · y [n − 1] − y [n − 2]

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:

• Set y [0] = sin ω 0


• For each n > 0, find y [n] from the previously calculated values according
to
y [n] = (2 cos ω 0 ) · y [n − 1] − y [n − 2] (12)

The complexity of the digital oscillator is one multiplication by 2 cos ω 0 (a


constant, determined by the frequency), and one subtraction, per output sample.
For reference, we should consider the most naive method of constructing a digital
oscillator. Namely, we could simply set

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:

• computation of ω 0 n, which can be done by adding ω 0 to the previously


calculated value, ω 0 (n − 1);
• restrict the resulting phase to a practically useful range, say 0 to 2π, which
requires a comparison operation and an optional subtraction of 2π;
c Taubman, 2003 ELEC4621: Z-transforms, Filters, Oscillators Page 21

• either direct evaluation of the trigonometric function, cos (), or (more


practically), quantize ω 0 n and use it to address a lookup table.

For hardware implementations, the cost of implementing a sizeable lookup


table can be much higher than that of a multiplication. If high accuracy is
required, the cost of numerically evaluating a trigonometric function is vastly
higher than that of performing a single multiplication. For these reasons, equa-
tion (12) can be a very attractive means of implementing a digital oscillator.

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.

Digital oscillators are key elements in the implementation of communication


systems. Digital oscillators are also widely used in the construction of frequency
synthesizers, which use a digital circuit operating with a fixed clock frequency
to synthesize a new analog or digital clock reference whose frequency can be
controlled arbitrarily.

You might also like