Experiment VII
Experiment VII
PREPARED BY:
FIR filters are digital filters with finite impulse response. They are also known as
non-recursive digital filters as they do not have the feedback.
1
FIR FILTER DESIGN
An FIR filter is designed by finding the coefficients and filter order that meet
certain specifications, which can be in the time-domain (e.g., a matched filter) and/or the
frequency domain (most common). Matched filters perform a cross-correlation between
the input signal and a known pulse-shape. The FIR convolution is a cross-correlation
between the input signal and a time-reversed copy of the impulse-response. Therefore,
the matched-filter's impulse response is "designed" by sampling the known pulse-shape
and using those samples in reverse order as the coefficients of the filter.
When a particular frequency response is desired, several different design methods are
common:
1. Window design method
2. Frequency Sampling method
3. Weighted least squares design
2
Algorithm of the implementation of LP FIR filter for a given sequence:
Step I: Enter the pass band frequency (fp) and stop band frequency (fq).
Step II: Get the sampling frequency (fs), length of window (n).
Step VII: Plot the magnitude response and phase response of the filter.
Homework:
Design LP FIR filter using Bartlett and hamming window.
1. Define filter.
2. What are the different types of filters?
3. Why are FIR filters generally preferred over IIR filters in multirate (decimating and
interpolating) systems
4. Difference between IIR and FIR filters?
5. Differentiate ideal filter and practical filter responses.
6. What is the filter specifications required to design the analog filters?
7. What is meant by frequency response of filter?
8. What is meant by magnitude response?
9. What is meant by phase response?
10. Difference between FIR low pass filter and high pass filter.
3
Algorithm of the implementation of HP FIR filter for a given sequence:
Step I: Enter the pass band frequency (fp) and stop band frequency (fq).
Step II: Get the sampling frequency (fs), length of window (n).
Step VII: Plot the magnitude response and phase response of the filter.
Homework:
Design HP FIR filter using Rectangular and hanning Window.
1. What is a filter?
2. Differentiate analog filter and digital filter.
3. Define FIR filter.
4. What are the differences between recursive and non-recursive systems?
5. List a few Applications of FIR filters.
6. Explain advantages of FIR filters over IIR filters.
7. Explain limitations of FIR filters.
8. What are the different methods to design FIR filters?
9. Explain different window functions.
10. Differentiate rectangular, triangular and Kaiser Windows.
4
Part II: Low-pass and High-pass Infinite Impulse-Response Filters
IIR filters are digital filters with infinite impulse response. Unlike FIR filters, they
have the feedback (a recursive part of a filter) and are known as recursive digital filters
therefore.
For this reason, IIR filters have much better frequency response than FIR filters of
the same order. Unlike FIR filters, their phase characteristic is not linear which can cause
a problem to the systems which need phase linearity. For this reason, it is not preferable
to use IIR filters in digital signal processing when the phase is of the essence. Otherwise,
when the linear phase characteristic is not important, the use of IIR filters is an excellent
solution.
There is one problem known as a potential instability that is typical of IIR filters only.
FIR filters do not have such a problem as they do not have the feedback. For this reason,
it is always necessary to check after the design process whether the resulting IIR filter is
stable or not.
Step I: Enter the pass band ripple (rp) and stop band ripple (rs).
Step II: Enter the pass band frequency (wp) and stop band frequency
(ws).
Step VI: Design an nth order digital low pass Butterworth or Chebyshev
filter using the following statements. Butterworth filter [b, a]=butter (n,
wn) Chebyshev filter [b,a]=cheby1 (n, 0.5, wn)
5
Step VII: Find the digital frequency response of the filter by using ‘freqz( )’ function
Step VIII: Calculate the magnitude of the frequency response in decibels (dB) mag=20*log10
(abs (H))
Step XI : Plot the phase response [phase in radians Vs normalized frequency (Hz)].
INPUT:
Enter the IIR filter design specifications
Enter the passband ripple 15
Enter the stopband ripple 60
Enter the passband frequency 1500
Enter the stopband frequency 3000
Enter the sampling frequency 7000
Homework:
6
Algorithm of the implementation of HP IIR filter for a given sequence:
Step I: Enter the pass band ripple (rp) and stop band ripple (rs).
Step II: the pass band frequency (wp) and stop band frequency (ws).
Step VII: Find the digital frequency response of the filter by using ‘freqz( )’ function
Step VIII: Calculate the magnitude of the frequency response in decibels (dB) mag=20*log10
(abs (H))
Step XI: Plot the phase response [phase in radians Vs normalized frequency (Hz)].
INPUT:
Enter the IIR filter design specifications
Enter the passband ripple 15
Enter the stopband ripple 60
Enter the passband frequency 1500
Enter the stopband frequency 3000
Enter the sampling frequency 7000
7
Homework:
1. What are the filter specifications required to design the analog filters?
2. What is meant by frequency response of filter?
3. What is meant by magnitude response?
4. What is meant by phase response?
5. Differentiate ideal filter and practical filter responses.
6. What are the different types of analog filter approximations?
7. Define order of the filter and explain important role it plays in designing of a filter.
8. Explain advantages and disadvantages of Butterworth filter
9. Explain advantages and disadvantages of Chebyshev filter 1
10. Why Chebyshev is better than Butterworth filter?