0% found this document useful (0 votes)
12 views

DSP Mod5@Azdocuments - in

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

DSP Mod5@Azdocuments - in

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

MODULE 5

DESIGN OF FIR DIGITAL FILTERS

Contents / Syllabus:
Design of FIR Digital Filters: Introduction, windowing, rectangular, modified rectangular. Hamming,

Hanning, Blackman window, design of FIR digital filters by use of windows, Design of FIR digital filters-

frequency sampling techniques.

Realization of FIR systems: direct form, cascade form, linear phase form

INTRODUCTION

A filter is a frequency selective system. Digital filters are classified as finite duration unit impulse response
(FIR) filters or infinite duration unit impulse response (IIR) filters, depending on the form of the unit impulse
response of the system. In the FIR system, the impulse response sequence is of finite duration, i.e., it has a
finite number of non-zero terms.
The IIR system has an infinite number of non-zero terms, i.e., its impulse response sequence is of infinite
duration. IIR filters are usually implemented using recursive structures (feedback-poles and zeros) and FIR
filters are usually implemented using non-recursive structures (no feedback-only zeros). The response of the
FIR filter depends only on the present and past input samples, whereas for the IIR filter, the present response
is a function of the present and past values of the excitation as well as past values of the response.

The following are the main advantages of FIR filters over IIR filters:

1. FIR filters are always stable.

2. FIR filters with exactly linear phase can easily be designed.

3. FIR filters can be realized in both recursive and non-recursive structures.

4. FIR filters are free of limit cycle oscillations, when implemented on a finite word length digital system.

5. Excellent design methods are available for various kinds of FIR filters.

The disadvantages of FIR filters are as follows:


1. The implementation of narrow transition band FIR filters is very costly, as it requires considerably more
arithmetic operations and hardware components such as multipliers, adders and delay elements.
2. Memory requirement and execution time are very high.

FIR filters are employed in filtering problems where linear phase characteristics within the pass band of the
filter is required. If this is not required, either an FIR or an IIR filter may be employed. An IIR filter has lesser
number of side lobes in the stop band than an FIR filter with the same number of parameters. For this reason if
some phase distortion is tolerable, an IIR filter is preferable. Also, the implementation of an IIR filter involves
fewer parameters, less memory requirements and lower computational complexity.

Frequency Response of Linear Phase FIR Filters


The frequency response of the filter is the Fourier transform of its impulse response. If h(n) is the impulse
response of the system, then the frequency response of the system is denoted by H(ej ) or H( ). H( ) is a
complex function of frequency _ and so it can be expressed as magnitude function H( ) and phase function
H( ).
Depending on the value of N (odd or even) and the type of symmetry of the filter impulse response sequence
(symmetric or anti symmetric), there are following four possible types of impulse response for linear phase
FIR filters.

1. Symmetrical impulse response when N is odd.


2. Symmetrical impulse response when N is even.
3. Antisymmetric impulse response when N is odd.
4. Antisymmetric impulse response when N is even.

Frequency Response of Linear Phase FIR Filters when Impulse Response is Symmetrical and N is Odd.
The above equation for H impulse response is
symmetrical and N is odd. The magnitude function of H

The phase function of H

Frequency Response of Linear Phase FIR Filters when Impulse Response is Symmetrical and N is Even.
The Frequency response of FIR filter, with impulse response h(n) of length N is:

This is the expression for frequency response of linear phase FIR filter when impulse response is symmetrical
and N is even. The magnitude function of H( ) is given by

The phase function of H is given by


DESIGN TECHNIQUES OF FIR FILTERS

The well-known methods of designing FIR filters are as follows:


1. Fourier series method
2. Window method
3. Frequency sampling method
4. Optimum filter design

In Fourier series method, the desired frequency response Hd ( ) is converted to a Fourier series
representation by replacing by 2 fT, where T is the sampling time. Then using this expression, the Fourier
coefficients are evaluated by taking inverse Fourier transform of Hd( ), which is the desired impulse response
of the filter hd(n). The Z-transform of hd(n) gives Hd(z) which is the transfer function of the desired filter.
The Hd(z) obtained from Hd(n) will be a transfer function of unrealizable non-causal digital filter of infinite
duration. A finite duration impulse response h(n) can be obtained by truncating the infinite duration impulse
response hd(n) to N-samples. Now, take Z-transform of h(n) to get H(z). This H(z) corresponds to a non-causal
(N 1)/2
filter. So multiply this H(z) by z to get the transfer function of realizable causal filter of finite duration.

In window method, we begin with the desired frequency response specification Hd( ) and determine
the corresponding unit sample response hd(n). The hd(n) is given by the inverse Fourier transform of Hd( ).
The unit sample response hd(n) will be an infinite sequence and must be truncated at some point, say, at n = N
1 to yield an FIR filter of length N. The truncation is achieved by multiplying hd(n) by a window sequence
w(n). The resultant sequence will be of length N and can be denoted by h(n). The Z-transform of h(n) will give
the filter transfer function H(z). There have been many windows proposed like Rectangular window,
Triangular window, Hanning window, Hamming window, Blackman wndow and Kaiser window that
approximate the desired characteristics.

In frequency sampling method of filter design, we begin with the desired frequency response specification
Hd( ), and it is sampled at N-points to generate a sequence vector H(k) which corresponds to the DFT
coefficients. The N-point IDFT of the sequence H(k) gives the impulse response of the filter h(n). The Z-
transform of h(n) gives the transfer function H(z) of the filter.
In optimum filter design method, the weighted approximation error between the desired frequency response
and the actual frequency response is spread evenly across the pass band and evenly across the stop band of the
filter. This results in the reduction of maximum error. The resulting filter have ripples in both the pass band
and the stop band. This concept of design is called optimum equiripple design criterion.

The various steps in designing FIR filters are as follows:

1. Choose an ideal (desired) frequency response, Hd( ).

2. Take inverse Fourier transform of Hd( ) to get hd (n) or sample Hd( ) at finite number of points (N-points)

to get vector H (k).

3. If hd (n) is determined, then convert the infinite duration hd(n) to a finite duration h(n) (usually h(n) is an N-

point sequence) or if H_ (k) is determined, then take N-point inverse DFT to get h(n).

4. Take Z-transform of h(n) to get H(z), where H(z) is the transfer function of the digital filter.

5. Choose a suitable structure and realize the filter.

DESIGN OF FIR FILTERS USING WINDOWS

The procedure for designing FIR filter using windows is:


1. Choose the desired frequency response of the filter Hd( ).
2. Take inverse Fourier transform of Hd( ) to obtain the desired impulse response hd(n).
3. Choose a window sequence w(n) and multiply hd(n) by w(n) to convert the infinite duration impulse
response to a finite duration impulse response h(n).
4. The transfer function H(z) of the filter is obtained by taking Z-transform of h(n).

RECTANGULAR WINDOW
The weighting function (window function) for an N-point rectangular window is given by
The spectrum (frequency response) of rectangular window WR( ) is given by the Fourier transform of wR(n).

Triangular window or Bartlett Window

The triangular window has been chosen such that it has tapered sequences from the middle on either side. The
window function WT (n) is defined as
In magnitude response of triangular window, the side lobe level is smaller than that of the rectangular window

being reduced from 13 dB to 25 dB. However, the main lobe width is now 8 /N or twice that of the

rectangular window.

The triangular window produces a smooth magnitude response in both pass band and stop band, but it has the

following disadvantages when compared to magnitude response obtained by using rectangular window:

1. The transition region is more.

2. The attenuation in stop band is less.

Because of these characteristics, the triangular window is not usually a good choice.

Hamming window or Raised Cosine Window

The raised cosine window multiplies the central Fourier coefficients by approximately unity and smoothly

truncates the Fourier coefficients toward the ends of the filter. The smoother ends and broader middle section

produces less distortion of hd(n) around n = 0. It is also called generalized Hamming window.

The window sequence is of the form:

Hanning window
The Hanning window function is given by
The width of main lobe is 8 /N, i.e., twice that of rectangular window which results in doubling of the

transition region of the filter. The peak of the first side lobe is 32 dB relative to the maximum value. This

results in smaller ripples in both pass band and stop band of the low-pass filter designed using Hanning

window. The minimum stop band attenuation of the filter is 44 dB. At higher frequencies the stop band

attenuation is even greater. When compared to triangular window, the main lobe width is same, but the

magnitude of the side lobe is reduced, hence the Hanning window is preferable to triangular window.

Hamming window

The Hamming window function is given by

In the magnitude response for N = 31, the magnitude of the first side lobe is down about 41 dB from the main

lobe peak, an improvement of 10 dB relative to the Hanning window. But this improvement is achieved at the

expense of the side lobe magnitudes at higher frequencies, which are almost constant with frequency. The

width of the main lobe is 8 /N.


In the magnitude response of low-pass filter designed using Hamming window, the first side lobe peak is 51
dB, which is 7 dB lesser with respect to the Hanning window filter.
However, at higher frequencies, the stop band attenuation is low when compared to that of Hanning window.
Because the Hamming window generates lesser oscillations in the side lobes than the Hanning window for the
same main lobe width, the Hamming window is generally preferred.
Blackman window

The Blackman window function is another type of cosine window and given by the equation

In the magnitude response, the width of the main lobe is 12 /N, which is highest among windows. The peak
of the first side lobe is at 58 dB and the side lobe magnitude decreases with frequency. This desirable feature
is achieved at the expense of increased main lobe width. However, the main lobe width can be reduced by
increasing the value of N. The side lobe attenuation of a low-pass filter using Blackman window is 78 dB.
Table 9.2 gives the important frequency domain characteristics of some window functions.
EXAMPLE 1. Design a given FIR filter by using Hamming window with N = 7.

Solution: For the given filter with

The filter coefficients are given by

expression. Thus,
Realization of FIR Systems
Structures of FIR Systems

FIR Systems are represented in four different ways


1. Direct Form Structures
2. Cascade Form Structure
3. Frequency-Sampling Structures
4. Lattice structures.

1. DIRECT FORM STRUCTURE OF FIR SYSTEM

The convolution of h(n) and x(n) for FIR systems can be written as
M-1
k) (1)
k=0

The above equation can be expanded as,


Y(n)= h(0) x(n) + h(1) x(n-1) + h(2) x(n- -1) x(n-M+1) (2)
Implementation of direct form structure of FIR filter is based upon the above equation.

There are M-1 unit delay blocks. One unit delay block requires one memory location. Hence
Direct form structure requires M-1 memory locations.

2) The multiplication of h(k) and x(n-k) is performed for 0 to M-1 terms. Hence M
Multiplications and M-1 additions are required.

3) Direct form structure is often called as transversal or tapped delay line filter.
2. CASCADE FORM STRUCTURE OF FIR SYSTEM

In cascade form, stages are cascaded (connected) in series. The output of one system is input to another.
Thus, total K number of stages are cascaded. The total system function 'H' is given by

H= H1(z) . H2 k(z) (1)


H= Y1(z)/X1(z). Y2(z)/X2 k(z) / Xk(z) (2)
k
H(z) = Hk(z) (3)
k=1

.is a second order section and it is realized by the direct form as shown in below
figure.

System function for FIR systems

M-1
H(z k z-k (1)
k=0
Expanding the above terms we have

H(z) = H1(z) . H2 ( k(z)

Where HK(z) = bk0 + bk1 z-1 + bk2 z-2 (2)


Thus direct form of second order system is shown as
STRUCTURES FOR IIR SYSTEMS

IIR Systems are represented in four different ways


1. Direct Form Structures Form I and Form II
2. Cascade Form Structure
3. Parallel Form Structure
4. Lattice and Lattice-Ladder structure.

IIR systems can be described by a generalized equation as


N M
y(n)=- k y(n k x(n k) (1)
k=1 k=0

Z transform is given as
M N
k k
k z kz (2)
K=0 k=1

M N
k k
zk zk
K=0 k=0

Overall IIR system can be realized as cascade of two function H1(z) and H2(z). Here H1(z) represents zeros
of H(z) and H2(z) represents all poles of H(z).
1. Direct form I realization of H(z) can be obtained by cascading the realization of H1(z)
which is all zero system first and then H2(z) which is all pole system.

2. There are M+N-1 unit delay blocks. One unit delay block requires one memory location. Hence
direct form structure requires M+N-1 memory locations.

3. Direct Form I realization requires M+N+1 number of multiplications and M+N number of additions
and M+N+1 number of memory locations.

Direct form realization of H(z) can be obtained by cascading the realization of H1(z)
which is all pole system and H2(z) which is all zero system.

2. Two delay elements of all pole and all zero system can be merged into single delay
element.

3. Direct Form II structure has reduced memory requirement compared to Direct form -I
structure. Hence it is called canonic form.

4. The direct form -II requires same number of multiplications (M+N+1) and additions (M+N) as
that of direct form I.
CASCADE FORM STRUCTURE FOR IIR SYSTEMS

In cascade form, stages are cascaded (connected) in series. The output of one system is input to another. Thus
total K number of stages are cascaded. The total system function 'H' is given by

H= H1(z) . H2 k(z) (1)


H= Y1(z)/X1(z). Y2(z)/X2 k(z)/Xk(z) (2)
k
H(z) = k(z) (3)
k=1

. is a second order section and it is realized by the direct form as shown in below
figure.
System function for IIR systems
M N
k k
kz kz (1)
K=0 k=1

Expanding the above terms we have

H(z)= H1(z) . H2(z) k(z)


where HK(z) = bk0 + bk1 z-1 + bk2 z-2 / 1 + ak1 z-1 + ak2 z-2 (2)

Thus Direct form of second order IIR system is shown as

PARALLEL FORM STRUCTURE FOR IIR SYSTEMS

System function for IIR systems is given as


M N
k k
k z kz (1)
K=0 k=1

= b0 + b1 z-1 + b2 z-2 M z-M / 1 + a1 z-1 + a2 z-2 N z-N (2)

The above system function can be expanded in partial fraction as follows

H(z) = C + H1(z) + H2 k(z) (3)


Where C is constant and Hk(z) is given as

Hk(z) = bk0 + bk1 z-1 / 1 + ak1 z-1 + ak2 z-2 (4)


Text Book:

1 Introduction to Digital Signal Processing Jhonny R. Jhonson Pearson 1st Edition, 2016.

Reference Books:

1. Digital Signal Processing Principles, Algorithms, and Applications

Jhon G. Proakis Dimitris G. Manolakis Pearson 4th Edition, 2007.

2. Digital Signal Processing A.Nagoor Kani McGraw Hill 2nd Edition, 2012

3 Digital Signal Processing Shaila D. Apte Wiley 2nd Edition, 2009

4 Digital Signal Processing Ashok Amberdar Cengage 1st Edition, 2007

5 Digital Signal Processing Tarun Kumar Rawat Oxford 1st Edition, 2015

You might also like