Introduction to Filtering


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)             [Graphics:Images/ZTransformFilterMod_gr_1.gif],

where the input signal is [Graphics:Images/ZTransformFilterMod_gr_2.gif] is modified to obtain the output signal [Graphics:Images/ZTransformFilterMod_gr_3.gif] using the recursion formula    

(9-23)             [Graphics:Images/ZTransformFilterMod_gr_4.gif].  

The implementation of (9-23) is straightforward and only requires starting values, then [Graphics:Images/ZTransformFilterMod_gr_5.gif] is obtained by simple iteration.  Since the signals must have a starting point, it is common to require that  [Graphics:Images/ZTransformFilterMod_gr_6.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_7.gif]  for  [Graphics:Images/ZTransformFilterMod_gr_8.gif].  We emphasize this concept by making the following definition.  


Definition 9.3 (Causal Sequence)  Given the the input [Graphics:Images/ZTransformFilterMod_gr_9.gif] and output [Graphics:Images/ZTransformFilterMod_gr_10.gif] sequences.  If  [Graphics:Images/ZTransformFilterMod_gr_11.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_12.gif]  for  [Graphics:Images/ZTransformFilterMod_gr_13.gif], the sequence is said to be causal.  


    Given the causal sequence [Graphics:Images/ZTransformFilterMod_gr_14.gif], it is easy to calculate the solution [Graphics:Images/ZTransformFilterMod_gr_15.gif] to (9-23).  Use the fact that these sequences are causal:

(9-24)            [Graphics:Images/ZTransformFilterMod_gr_16.gif].

Then compute  

(9-25)            [Graphics:Images/ZTransformFilterMod_gr_17.gif]  
The general iterative step is   

(9-26)            [Graphics:Images/ZTransformFilterMod_gr_18.gif].  


9.3.2  The Basic Filters

    The following three simplified basic filters serve as illustrations.  
(i) Zeroing Out Filter      [Graphics:Images/ZTransformFilterMod_gr_19.gif],     (note that  [Graphics:Images/ZTransformFilterMod_gr_20.gif]).  

(ii) Boosting Up Filter      [Graphics:Images/ZTransformFilterMod_gr_21.gif],     (note that  [Graphics:Images/ZTransformFilterMod_gr_22.gif]).  

(iii) Combination Filter     [Graphics:Images/ZTransformFilterMod_gr_23.gif].  

    The transfer function  [Graphics:Images/ZTransformFilterMod_gr_24.gif] for these model filters has the following general form

(9-27)            [Graphics:Images/ZTransformFilterMod_gr_25.gif],

where the z-transforms of the input and output sequences are [Graphics:Images/ZTransformFilterMod_gr_26.gif] and [Graphics:Images/ZTransformFilterMod_gr_27.gif], respectively.   In the previous section we mentioned that the general solution to a homogeneous difference equation  [Graphics:Images/ZTransformFilterMod_gr_28.gif]  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  [Graphics:Images/ZTransformFilterMod_gr_29.gif]  must all lie inside the unit circle.

    Before developing the general theory, we would like to investigate the amplitude response  [Graphics:Images/ZTransformFilterMod_gr_30.gif] when the input signal is a linear combination of  [Graphics:Images/ZTransformFilterMod_gr_31.gif] and [Graphics:Images/ZTransformFilterMod_gr_32.gif].   The amplitude response for the frequency [Graphics:Images/ZTransformFilterMod_gr_33.gif] uses the complex unit signal [Graphics:Images/ZTransformFilterMod_gr_34.gif], and is defined to be

(9-28)            [Graphics:Images/ZTransformFilterMod_gr_35.gif].

The formula for [Graphics:Images/ZTransformFilterMod_gr_36.gif] will be rigorously explained after a few introductory examples.  


Example 9.21.  Given the filter  [Graphics:Images/ZTransformFilterMod_gr_37.gif].

9.21 (a).  Show that it is a zeroing out filter for the signals [Graphics:Images/ZTransformFilterMod_gr_38.gif] and [Graphics:Images/ZTransformFilterMod_gr_39.gif] and calculate the amplitude response  [Graphics:Images/ZTransformFilterMod_gr_40.gif].

9.21 (b).  Calculate the amplitude responses [Graphics:Images/ZTransformFilterMod_gr_41.gif] and investigate the the filtered signal for  [Graphics:Images/ZTransformFilterMod_gr_42.gif].  

9.21 (c).  Calculate the amplitude responses [Graphics:Images/ZTransformFilterMod_gr_43.gif] and investigate the the filtered signal for  [Graphics:Images/ZTransformFilterMod_gr_44.gif].  


Figure 9.4.  The amplitude response [Graphics:Images/ZTransformFilterMod_gr_46.gif] for  [Graphics:Images/ZTransformFilterMod_gr_47.gif].


Figure 9.5.  The input  [Graphics:Images/ZTransformFilterMod_gr_49.gif]  and output  [Graphics:Images/ZTransformFilterMod_gr_50.gif].


Figure 9.6.  The input [Graphics:Images/ZTransformFilterMod_gr_52.gif] and output  [Graphics:Images/ZTransformFilterMod_gr_53.gif].

Solution 9.21.

Explore Solution 9.21.


Example 9.22.  Given the filter  [Graphics:Images/ZTransformFilterMod_gr_140.gif].

9.22 (a).  Show that it is a boosting up filter for the signals [Graphics:Images/ZTransformFilterMod_gr_141.gif] and [Graphics:Images/ZTransformFilterMod_gr_142.gif] and calculate the amplitude response  [Graphics:Images/ZTransformFilterMod_gr_143.gif].

9.22 (b).  Calculate the amplitude responses [Graphics:Images/ZTransformFilterMod_gr_144.gif] and investigate the the filtered signal for  [Graphics:Images/ZTransformFilterMod_gr_145.gif].  


Figure 9.7.  The amplitude response [Graphics:Images/ZTransformFilterMod_gr_147.gif] for  [Graphics:Images/ZTransformFilterMod_gr_148.gif].


Figure 9.8.  The input  [Graphics:Images/ZTransformFilterMod_gr_150.gif]  and output  [Graphics:Images/ZTransformFilterMod_gr_151.gif].

Solution 9.22.

Explore Solution 9.22.



9.3.3  The General Filter Equation

he general form of a [Graphics:Images/ZTransformFilterMod_gr_209.gif] order filter difference equation is  
(9-29)            [Graphics:Images/ZTransformFilterMod_gr_210.gif]

[Graphics:Images/ZTransformFilterMod_gr_211.gif] and [Graphics:Images/ZTransformFilterMod_gr_212.gif] are constants. Note carefully that the terms involved are of the form [Graphics:Images/ZTransformFilterMod_gr_213.gif] and [Graphics:Images/ZTransformFilterMod_gr_214.gif] where [Graphics:Images/ZTransformFilterMod_gr_215.gif] and [Graphics:Images/ZTransformFilterMod_gr_216.gif], which makes these terms time delayed. The compact form of writing the difference equation is

(9-30)            [Graphics:Images/ZTransformFilterMod_gr_217.gif],  
where the input signal [Graphics:Images/ZTransformFilterMod_gr_218.gif] is modified to obtain the output signal [Graphics:Images/ZTransformFilterMod_gr_219.gif] using the recursion formula    
(9-31)            [Graphics:Images/ZTransformFilterMod_gr_220.gif].  

The portion  [Graphics:Images/ZTransformFilterMod_gr_221.gif] will "zero out" signals and  [Graphics:Images/ZTransformFilterMod_gr_222.gif] will "boost up" signals.

Remark 9.14.  Formula (9-31) is called the recursion equation and the recursion coefficients are [Graphics:Images/ZTransformFilterMod_gr_223.gif] and [Graphics:Images/ZTransformFilterMod_gr_224.gif].  It explicitly shows that the present output  [Graphics:Images/ZTransformFilterMod_gr_225.gif]  is a function of the past values  [Graphics:Images/ZTransformFilterMod_gr_226.gif],  for [Graphics:Images/ZTransformFilterMod_gr_227.gif], the present input  [Graphics:Images/ZTransformFilterMod_gr_228.gif],  and the previous inputs  [Graphics:Images/ZTransformFilterMod_gr_229.gif]  for  [Graphics:Images/ZTransformFilterMod_gr_230.gif].  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  [Graphics:Images/ZTransformFilterMod_gr_231.gif].  Using the time delayed-shift property for causal sequences and taking the z-transform of each term in (9-31), we obtain  

(9-32)            [Graphics:Images/ZTransformFilterMod_gr_232.gif].

We can factor   [Graphics:Images/ZTransformFilterMod_gr_233.gif]  out of the summations and write this in an equivalent form

(9-33)            [Graphics:Images/ZTransformFilterMod_gr_234.gif].

From equation (9-33) we obtain

which leads to the following important definition.


Definition 9.4 (Transfer Function)  The transfer function corresponding to the [Graphics:Images/ZTransformFilterMod_gr_236.gif] order difference equation (8) is given by  

(9-34)            [Graphics:Images/ZTransformFilterMod_gr_237.gif].

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  [Graphics:Images/ZTransformFilterMod_gr_238.gif] corresponding to the transfer function  [Graphics:Images/ZTransformFilterMod_gr_239.gif] is called the unit-sample response.  


Theorem 9.6 (Output Response)  The output response  [Graphics:Images/ZTransformFilterMod_gr_240.gif]  of a the filter (10) given an input signal  [Graphics:Images/ZTransformFilterMod_gr_241.gif]  is given by the inverse z-transformation

(9-35)            [Graphics:Images/ZTransformFilterMod_gr_242.gif],   
and in convolution form it is given by  

(9-36)            [Graphics:Images/ZTransformFilterMod_gr_243.gif].  


    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  [Graphics:Images/ZTransformFilterMod_gr_244.gif]  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  [Graphics:Images/ZTransformFilterMod_gr_245.gif],  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)         [Graphics:Images/ZTransformFilterMod_gr_246.gif],    where  [Graphics:Images/ZTransformFilterMod_gr_247.gif]  is called the normalized frequency.  

Therefore the z-transform evaluated on the unit circle is also periodic, except with period [Graphics:Images/ZTransformFilterMod_gr_248.gif].


Definition 9.6 (Amplitude Response)      The amplitude response [Graphics:Images/ZTransformFilterMod_gr_249.gif] is defined to be the magnitude of the transfer function evaluated at the complex unit signal [Graphics:Images/ZTransformFilterMod_gr_250.gif].  The formula is   

(9-38)            [Graphics:Images/ZTransformFilterMod_gr_251.gif] over the interval [Graphics:Images/ZTransformFilterMod_gr_252.gif].  




    The fundamental theorem of algebra implies that the numerator has [Graphics:Images/ZTransformFilterMod_gr_267.gif] roots (called zeros) and the denominator has [Graphics:Images/ZTransformFilterMod_gr_268.gif] roots (called poles).  The zeros [Graphics:Images/ZTransformFilterMod_gr_269.gif] may be chosen in conjugate pairs on the unit circle and [Graphics:Images/ZTransformFilterMod_gr_270.gif] for  [Graphics:Images/ZTransformFilterMod_gr_271.gif].   For stability, all the poles [Graphics:Images/ZTransformFilterMod_gr_272.gif] must inside the unit circle and  [Graphics:Images/ZTransformFilterMod_gr_273.gif] for  [Graphics:Images/ZTransformFilterMod_gr_274.gif].   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  
[Graphics:Images/ZTransformFilterMod_gr_275.gif].  Since the coefficients in [Graphics:Images/ZTransformFilterMod_gr_276.gif] 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   [Graphics:Images/ZTransformFilterMod_gr_277.gif] 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  [Graphics:Images/ZTransformFilterMod_gr_278.gif].

(i) Zeroing Out Factors  

    To filter out the signals [Graphics:Images/ZTransformFilterMod_gr_279.gif] and [Graphics:Images/ZTransformFilterMod_gr_280.gif], use factors of the form

            [Graphics:Images/ZTransformFilterMod_gr_281.gif]   if   [Graphics:Images/ZTransformFilterMod_gr_282.gif],    and  

            [Graphics:Images/ZTransformFilterMod_gr_283.gif]   if   [Graphics:Images/ZTransformFilterMod_gr_284.gif],  

in the numerator of  [Graphics:Images/ZTransformFilterMod_gr_285.gif].  They will contribute to the term

(9-42)            [Graphics:Images/ZTransformFilterMod_gr_286.gif].  

(ii) Boosting Up Factors  

    To amplify the signals [Graphics:Images/ZTransformFilterMod_gr_287.gif] and [Graphics:Images/ZTransformFilterMod_gr_288.gif], use factors of the form

            [Graphics:Images/ZTransformFilterMod_gr_289.gif]     if  [Graphics:Images/ZTransformFilterMod_gr_290.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_291.gif],    and

            [Graphics:Images/ZTransformFilterMod_gr_292.gif]     if  [Graphics:Images/ZTransformFilterMod_gr_293.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_294.gif],    and  

            [Graphics:Images/ZTransformFilterMod_gr_295.gif]     if  [Graphics:Images/ZTransformFilterMod_gr_296.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_297.gif],  

in the denominator of  [Graphics:Images/ZTransformFilterMod_gr_298.gif].  They will contribute to the term

(9-43)            [Graphics:Images/ZTransformFilterMod_gr_299.gif].  

(iii) Attenuating Factors  

    To attenuate the signals [Graphics:Images/ZTransformFilterMod_gr_300.gif] and [Graphics:Images/ZTransformFilterMod_gr_301.gif],  use factors of the form

            [Graphics:Images/ZTransformFilterMod_gr_302.gif]     if  [Graphics:Images/ZTransformFilterMod_gr_303.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_304.gif],    and  

            [Graphics:Images/ZTransformFilterMod_gr_305.gif]     if  [Graphics:Images/ZTransformFilterMod_gr_306.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_307.gif].  
    The factor    
            [Graphics:Images/ZTransformFilterMod_gr_308.gif]     if  [Graphics:Images/ZTransformFilterMod_gr_309.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_310.gif],  
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 [Graphics:Images/ZTransformFilterMod_gr_311.gif] 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 [Graphics:Images/ZTransformFilterMod_gr_312.gif] of  [Graphics:Images/ZTransformFilterMod_gr_313.gif] on the unit circle will "zero-out" the signals [Graphics:Images/ZTransformFilterMod_gr_314.gif] and [Graphics:Images/ZTransformFilterMod_gr_315.gif].  If [Graphics:Images/ZTransformFilterMod_gr_316.gif] the conjugate pair of zeros [Graphics:Images/ZTransformFilterMod_gr_317.gif] of  [Graphics:Images/ZTransformFilterMod_gr_318.gif] will attenuate the signals [Graphics:Images/ZTransformFilterMod_gr_319.gif] and [Graphics:Images/ZTransformFilterMod_gr_320.gif], and the conjugate pair of poles [Graphics:Images/ZTransformFilterMod_gr_321.gif] of  [Graphics:Images/ZTransformFilterMod_gr_322.gif] will amplify the signals  [Graphics:Images/ZTransformFilterMod_gr_323.gif] and [Graphics:Images/ZTransformFilterMod_gr_324.gif].  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  [Graphics:Images/ZTransformFilterMod_gr_325.gif] so that the amplitude response [Graphics:Images/ZTransformFilterMod_gr_326.gif] 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  [Graphics:Images/ZTransformFilterMod_gr_327.gif]  is designed to zero out  [Graphics:Images/ZTransformFilterMod_gr_328.gif].  

9.23 (b).  The moving average filter   [Graphics:Images/ZTransformFilterMod_gr_329.gif]   is designed to zero out  [Graphics:Images/ZTransformFilterMod_gr_330.gif].


Figure 9.9.  Amplitude response [Graphics:Images/ZTransformFilterMod_gr_332.gif], and zero-pole plot for  [Graphics:Images/ZTransformFilterMod_gr_333.gif].

Solution 9.23.

Explore Solution 9.23.


Example 9.24.  The moving average filter   [Graphics:Images/ZTransformFilterMod_gr_394.gif]  
is designed to zero out  [Graphics:Images/ZTransformFilterMod_gr_395.gif].


Figure 9.10.  Amplitude response [Graphics:Images/ZTransformFilterMod_gr_397.gif], and zero-pole plot for  [Graphics:Images/ZTransformFilterMod_gr_398.gif].

Solution 9.24.

Explore Solution 9.24.


Example 9.25 (a).   Design a filter with poles  [Graphics:Images/ZTransformFilterMod_gr_443.gif][Graphics:Images/ZTransformFilterMod_gr_444.gif]  for boosting up signals near [Graphics:Images/ZTransformFilterMod_gr_445.gif] and [Graphics:Images/ZTransformFilterMod_gr_446.gif].

9.25 (b).   Include the additional pole at  [Graphics:Images/ZTransformFilterMod_gr_447.gif] to the filter design in (a) so that it also boosts up low frequency signals.


Figure 9.11.  Amplitude response [Graphics:Images/ZTransformFilterMod_gr_449.gif], and zero-pole plot for  [Graphics:Images/ZTransformFilterMod_gr_450.gif].


Figure 9.12.  Amplitude response [Graphics:Images/ZTransformFilterMod_gr_452.gif], and zero-pole plot for  [Graphics:Images/ZTransformFilterMod_gr_453.gif].

Solution 9.25.

Explore Solution 9.25.


Example 9.26.  Design a combination filter using the zeros [Graphics:Images/ZTransformFilterMod_gr_527.gif] for zeroing out [Graphics:Images/ZTransformFilterMod_gr_528.gif] and poles [Graphics:Images/ZTransformFilterMod_gr_529.gif] boosting up some of the low frequencies.


Figure 9.13.  Amplitude response [Graphics:Images/ZTransformFilterMod_gr_531.gif], and zero-pole plot for  [Graphics:Images/ZTransformFilterMod_gr_532.gif].

Solution 9.26.

Explore Solution 9.26.


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  [Graphics:Images/ZTransformFilterMod_gr_574.gif]  to [Graphics:Images/ZTransformFilterMod_gr_575.gif].  

Extra Example 1 (a).   Design a filter with poles  [Graphics:Images/ZTransformFilterMod_gr_576.gif]  for boosting up signals near [Graphics:Images/ZTransformFilterMod_gr_577.gif] and [Graphics:Images/ZTransformFilterMod_gr_578.gif].


1 (b).   Include the additional pole at  [Graphics:Images/ZTransformFilterMod_gr_580.gif] to the filter design in (a) so that it also boosts up high frequency signals.


Explore Extra Solution 1.


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 [Graphics:Images/ZTransformFilterMod_gr_618.gif] and attenuating frequencies [Graphics:Images/ZTransformFilterMod_gr_619.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_620.gif].


Explore Extra Solution 2.


    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  [Graphics:Images/ZTransformFilterMod_gr_646.gif].  The z-transform is


The functions  [Graphics:Images/ZTransformFilterMod_gr_648.gif]  and  [Graphics:Images/ZTransformFilterMod_gr_649.gif]  must be defined.


Mathematica Subroutine (Analysis of Filters)


Exercises for Section 9.3.  Digital Signal Filters


Library Research Experience for Undergraduates

The z-Transform





The Next Module is

Conformal Mapping



Return to the Complex Analysis Modules  



Return to the Complex Analysis Project


























This material is coordinated with our book Complex Analysis for Mathematics and Engineering.
























(c) 2012 John H. Mathews, Russell W. Howell