![]()
![]()
for
9.3.1 Introduction to
Filtering
In the field of signal processing the design
of digital signal filters involves the process of suppressing certain
frequencies and boosting others. A simplified filter model
is
(9-22)
,
where the input signal is
is modified to obtain the output signal
using the recursion formula
(9-23)
.
The implementation of (9-23) is
straightforward and only requires starting values, then
is obtained by simple iteration. Since the signals must
have a starting point, it is common to require
that
and
for
. We
emphasize this concept by making the following
definition.
Definition 9.3 (Causal
Sequence) Given the the input
and output
sequences. If
and
for
,
the sequence is said to be causal.
Given the causal sequence
,
it is easy to calculate the solution
to (9-23). Use the fact that
these sequences are causal:
(9-24)
.
Then compute
(9-25)
The general iterative step is
(9-26)
.
9.3.2 The Basic
Filters
The following three simplified basic filters
serve as illustrations.
(i) Zeroing Out
Filter
, (note
that
).
(ii) Boosting Up
Filter
, (note
that
).
(iii) Combination
Filter
.
The transfer
function
for these model filters has the
following general form
(9-27)
,
where the z-transforms of the input and output sequences are
and
,
respectively. In the previous section we mentioned
that the general solution to a homogeneous difference
equation
is
stable only if the zeros of the characteristic equation lie inside
the unit circle. Similarly, if a filter is stable then the
poles of the transfer function
must
all lie inside the unit circle.
Before developing the general theory, we
would like to investigate the amplitude
response
when the input signal is a linear combination
of
and
. The
amplitude response for the frequency
uses the complex unit signal
,
and is defined to be
(9-28)
.
The formula for
will be rigorously explained after a few introductory
examples.
Example 9.21. Given
the filter
.
9.21 (a). Show that it
is a zeroing out filter for the signals
and
and calculate the amplitude response
.
9.21 (b). Calculate
the amplitude responses
and investigate the the filtered signal for
.
9.21 (c). Calculate
the amplitude responses
and investigate the the filtered signal for
.
![[Graphics:Images/ZTransformFilterMod_gr_45.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_45.gif)
Figure 9.4. The
amplitude response
for
.
![[Graphics:Images/ZTransformFilterMod_gr_48.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_48.gif)
Figure 9.5. The
input
and
output
.
![[Graphics:Images/ZTransformFilterMod_gr_51.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_51.gif)
Figure 9.6. The
input
and output
.
Example 9.22. Given
the filter
.
9.22 (a). Show that
it is a boosting up filter for the signals
and
and calculate the amplitude response
.
9.22 (b). Calculate
the amplitude responses
and investigate the the filtered signal for
.
![[Graphics:Images/ZTransformFilterMod_gr_146.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_146.gif)
Figure 9.7. The
amplitude response
for
.
![[Graphics:Images/ZTransformFilterMod_gr_149.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_149.gif)
Figure 9.8. The
input
and
output
.
9.3.3 The
General Filter Equation
The general form of a
order filter difference equation
is
(9-29)
where
and
are constants. Note carefully that the terms involved are of
the form
and
where
and
,
which makes these terms time delayed. The
compact form of writing the difference equation is
(9-30)
,
where the input signal
is modified to obtain the output signal
using the recursion formula
(9-31)
.
The portion
will "zero out" signals and
will "boost up" signals.
Remark
9.14. Formula
(9-31) is
called the recursion equation and the recursion coefficients are
and
. It
explicitly shows that the present output
is
a function of the past values
, for
,
the present input
, and
the previous inputs
for
. The
sequences can be regarded as signals and they are zero for negative
indices. With this information we can now define the
general formula for the transfer function
. Using
the time delayed-shift property for causal sequences and taking the
z-transform of each term in (9-31), we
obtain
(9-32)
.
We can factor
out
of the summations and write this in an equivalent form
(9-33)
.
From equation (9-33) we obtain
which leads to the following important definition.
Definition 9.4
(Transfer Function) The
transfer function corresponding to the
order difference equation (8) is given by
(9-34)
.
Formula (9-34) is the transfer function
for an infinite impulse response filter (IIR
filter). In the special case when the denominator is
unity it becomes the transfer function for a finite impulse response
filter (FIR filter).
Definition 9.5 (Unit-Sample
Response) The sequence
corresponding to the transfer function
is called the unit-sample response.
Theorem 9.6 (Output
Response) The output
response
of
a the filter (10) given an input signal
is
given by the inverse z-transformation
(9-35)
,
and in convolution form it is given by
(9-36)
.
Another important use of the transfer
function is to study how a filter affects various
frequencies. In practice, a continuous time signal is
sampled at a frequency
that
is at least twice the highest input signal frequency to avoid
frequency fold-over, or aliasing. That is because the Fourier
transform of a sampled signal is periodic with
period
, though
we will not prove this here. Aliasing prevents accurate
recovery of the original signal from its samples.
Now it can be shown that the argument of the
Fourier transform maps onto the z-plane unit circle via the
formula
(9-37)
, where
is
called the normalized frequency.
Therefore the z-transform evaluated on the unit circle is also
periodic, except with period
.
Definition 9.6 (Amplitude
Response) The
amplitude response
is defined to be the magnitude of the transfer function evaluated at
the complex unit signal
. The
formula is
(9-38)
over the interval
.
The
fundamental theorem of algebra implies that the numerator has
roots (called zeros) and the denominator has
roots (called poles). The zeros
may be chosen in conjugate pairs on the unit circle and
for
. For
stability, all the poles
must inside the unit circle and
for
. Furthermore,
the poles are chosen to be real numbers and/or in conjugate
pairs. This will guarantee that the recursion
coefficients are all real numbers. IIR filters may
be all pole or zero-pole and stability is a concern; FIR filters and
all zero-filters are always stable.
9.3.4 Design
of Filters
In practice recursion formula (10) is used to
calculate the output signal. However, digital filter
design is based on the above theory. One starts by
selecting the location of zeros and poles corresponding to filter
design requirements and constructing the transfer
function
. Since
the coefficients in
are real, all zeros and poles having an imaginary component must
occur in conjugate pairs. Then the recursion
coefficients are identified in (13) and used in (10) to write
the recursive filter. Both the numerator and denominator
of
can be factored into quadratic factors with real coefficients and
possibly one or two linear factors with real
coefficients. The following principles are used to
construct
.
(i) Zeroing Out
Factors
To filter out the signals
and
,
use factors of the form
if
, and
if
,
in the numerator of
. They
will contribute to the term
(9-42)
.
(ii) Boosting Up
Factors
To amplify the signals
and
,
use factors of the form
if
and
, and
if
and
, and
if
and
,
in the denominator of
. They
will contribute to the term
(9-43)
.
(iii) Attenuating
Factors
To attenuate the signals
and
, use
factors of the form
if
and
, and
if
and
.
The factor
if
and
,
is a special case that attenuates low frequency
signals. These factors will contribute to the term
(9-42).
(iv) Combination of
Factors
The transfer function
could have a zero or pole at the origin, but this has no net effect
on the output signal. The other zeros and poles determine
the nature of the filter. A conjugate pair of zeros
of
on the unit circle will "zero-out" the signals
and
. If
the conjugate pair of zeros
of
will attenuate the signals
and
,
and the conjugate pair of poles
of
will amplify the signals
and
. It
is useful to plot the location of the zeros and poles and notice
their magnitude and argument. As a general rule, zeros are
used to attenuate signals and poles are used to amplify
signals. The primary goal of filter design is to
construct
so that the amplitude response
has a desired shape. The following examples have been
chosen to illustrate these concepts. Books on digital
signal filter design will explain the process in detail.
Example 9.23
(a). The filter
is
designed to zero out
.
9.23 (b). The
moving average filter
is
designed to zero out
.
![[Graphics:Images/ZTransformFilterMod_gr_331.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_331.gif)
Figure
9.9. Amplitude response
,
and zero-pole plot for
.
Example 9.24. The
moving average filter
is designed to zero out
.
![[Graphics:Images/ZTransformFilterMod_gr_396.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_396.gif)
Figure
9.10. Amplitude response
,
and zero-pole plot for
.
Example 9.25
(a). Design a filter with
poles ![]()
for
boosting up signals near
and
.
9.25
(b). Include the additional pole
at
to the filter design in (a) so that it also boosts up low frequency
signals.
![[Graphics:Images/ZTransformFilterMod_gr_448.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_448.gif)
Figure
9.11. Amplitude response
,
and zero-pole plot for
.
![[Graphics:Images/ZTransformFilterMod_gr_451.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_451.gif)
Figure
9.12. Amplitude response
,
and zero-pole plot for
.
Example
9.26. Design a combination filter using the
zeros
for zeroing out
and poles
boosting up some of the low frequencies.
![[Graphics:Images/ZTransformFilterMod_gr_530.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_530.gif)
Figure
9.13. Amplitude response
,
and zero-pole plot for
.
Low Frequency Filter
The previous examples emphasize high
frequency filters. To boost up high frequencies place the
poles near the higher frequencies. The following example is similar
to Example 9.25. The poles have been changed
from
to
.
Extra Example 1
(a). Design a filter with
poles
for
boosting up signals near
and
.
![[Graphics:Images/ZTransformFilterMod_gr_579.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_579.gif)
1
(b). Include the additional pole
at
to the filter design in (a) so that it also boosts up high frequency
signals.
![[Graphics:Images/ZTransformFilterMod_gr_581.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_581.gif)
Band Pass Filter
Poles can be placed near frequencies to boost
them up and zeros for attenuating the other frequencies.
Extra Example
2. Design a combination filter boosting up some
of the low frequencies where
and attenuating frequencies
and
.
![[Graphics:Images/ZTransformFilterMod_gr_621.gif]](ztransform/ZTransformFilterMod/Images/ZTransformFilterMod_gr_621.gif)
A signal processing engineer uses complex analysis to construct filters with the desired amplitude and phase response characteristics. Finite impulse response (FIR) filters have only zeros, whereas infinite impulse response (IIR) filters have poles and may have zeros as well. The area of filter design involves many types, such as: low pass, high pass, all pass, band pass and band stop. Special forms of such filters include, but are not limited to Bessel, Butterworth, Chebyshev, Gaussian, moving average, single pole, Remez, etc. More information about filter design can be found in books on digital signal processing.
Algorithm (Analysis of
Filters) The following subroutine will analyze
the transfer function for
. The
z-transform is
![]()
The functions
and
must
be defined.
Mathematica Subroutine (Analysis of Filters)
Download This Mathematica Notebook
The Next Module is
Return to the Complex Analysis Modules
Return to the Complex Analysis Project