Digital Design of Filters (FIR,IIR) -part1 اياد
Digital Design of Filters (FIR,IIR) -part1 اياد
Digital Design
of Filters
(FIR,IIR)
Part 1
Prepared by:
Ayad Saadi Ahmed Natheer Mutlag Mohammed
Supervised by:
Dr. Mohammed Younis
Introduction
• In the design of frequency-selective filters, the desired filter characteristics are
specified in the frequency domain in terms of the desired magnitude and phase
response of the filter.
• In the filter design process we determine the coefficients of a causal FIR or IIR
filter that closely approximates the desired frequency response specifications. The
issue of which type of filter to design, FIR or IIR, depends on the nature of the
problem and on the specifications of the desired frequency response.
• However, as a general rule, an IIR filter has lower sidelobes in the stopband than
an FIR filter having the same number of parameters. For this reason, if some phase
distortion is either tolerable or unimportant, an IIR filter is preferable, primarily
because its implementation involves fewer parameters, requires less memory and
has lower computational complexity.
2
Advantage of Digital filters
1) The performance of digital filter does not vary with environment (thermal variation)
3) Several input signals or channels can be filtered by one digital filter without the need to
change the hardware.
4) Both filtered and unfiltered data can be saved for further use.
3
Limitation of digital filter
1) Speed limitation: The maximum bandwidth of signals that digital filters
can handle, in real time, is much lower than for analog filters. Because of the
2) Digital filters are subject to ADC noise resulting from quantizing continuous signal.
3) Long design and development time are required to develop the hardware
4
Ideal Filters can be classified as :
Low Pass Filter : The low pass filter only allows low
frequency signals from 0 Hz to its cut-off frequency,
ƒc point to pass while blocking any higher frequency
signals.
High Pass Filter : The high pass filter only allows
high frequency signals from its cut-off frequency, ƒc LPF HPF
point and higher to infinity to pass through while
blocking those any lower.
Band Pass Filter : The band pass filter allows signals
falling within a certain frequency band set up
between two points to pass through while blocking
both the lower and higher frequencies either side of
this frequency band.
Band Stop Filter : The band stop filter blocks
signals falling within a certain frequency band set up
between two points while allowing both the lower
and higher frequencies either side of this frequency BPF BSF
band.
5
Characteristics of Practical Filters
• Ideal filters are non causal and
hence physically unrealizable for
real-time signal processing
applications.
• Causality implies that the
frequency response characteristic
H(w) of the filter cannot be zero,
except at a finite set of points in
the frequency range. In addition,
H(w) cannot have an infinitely
sharp cutoff from passband to
stopband, that is, H(w) cannot
drop from unity to zero abruptly.
6
Finite Impulse Response Filter (FIR)
• FIR can be described by the equation:
• Factoring out and divided by X(z), then the transfer function is:
7
1- Fourier Transform Design Method
8
Example FIR Filter Design
a. Design a 3-tap FIR LPF with cut-off frequency of 800 Hz and a sampling rate of 8,000 Hz using
the Fourier transform method.
b. Determine the transfer function and difference equation of the designed FIR system.
π π 3π
c. Compute and plot the magnitude frequency response for Ω = 0, 4 , 2 , and π radians.
4
Solution
Normalized cut-off frequency
Using symmetry
9 9
Delaying h(n) by
M = 1 sample
Inverse z-transform
10
c.
11
Frequency response calculations
12
2- Window Method
• The window method is developed to
remedy the undesirable oscillations
in the passband and stopband of the
designed FIR filter. Applying the
window sequence to the filter
coefficients gives:
ℎ𝑤 𝑛 = ℎ 𝑛 . 𝑤(𝑛)
13
Example
Solution
14
15
16
17
Example
Window Method
Design a 5-tap FIR band reject (band-stop) filter with a lower cut-off frequency of 2,000 Hz,
an upper cut-off frequency of 2,400 Hz, and a sampling rate of 8,000 Hz using the Hamming
window method. Determine the transfer function.
Solution
normalized cut-off
frequencies
𝑴=𝟐
5-tap FIR 2M + 1 = 5 then M=2
𝑆𝑦𝑚𝑚𝑒𝑡𝑟𝑦
18
Window Method –contd
Hamming
window
function 𝑆𝑦𝑚𝑚𝑒𝑡𝑟𝑦
Windowed
impulse
response
19