DSP Mod5@Azdocuments - in
DSP Mod5@Azdocuments - in
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-
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:
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.
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 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
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
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.
2. Take inverse Fourier transform of Hd( ) to get hd (n) or sample Hd( ) at finite number of points (N-points)
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.
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).
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:
Because of these characteristics, the triangular window is not usually a good choice.
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.
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
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
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.
expression. Thus,
Realization of FIR Systems
Structures of FIR Systems
The convolution of h(n) and x(n) for FIR systems can be written as
M-1
k) (1)
k=0
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
.is a second order section and it is realized by the direct form as shown in below
figure.
M-1
H(z k z-k (1)
k=0
Expanding the above terms we have
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
. 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
1 Introduction to Digital Signal Processing Jhonny R. Jhonson Pearson 1st Edition, 2016.
Reference Books:
2. Digital Signal Processing A.Nagoor Kani McGraw Hill 2nd Edition, 2012
5 Digital Signal Processing Tarun Kumar Rawat Oxford 1st Edition, 2015