FIR Filter Design
Objective
The objective of this experiment is to design all types of digital filters such Low pass, High Pass, Band Pass and Band Stop using different windows: Rectangular, Hamming, Hanning and Black Man. and To observe the effect of increasing the order of the filter.
Windows
First we study the various window functions by increasing the value of 'N'. Observe the change in the output response [Desired Response ]of the filter by running the code given below . The code uses hamming window [Study the code Properly]
1. Run the code as is and observe the output
2. Run the code by Changing the Value of N and Observe the change in Desired response
3. Use the Different Window function by keeping N as constant at 7 and 71
hann(N) for Hanning Window
hamming(N) for Hamming Window
blackman(N) for Blackman Window
ones(1,N) for Rectangular Window
*Note: Refer to the MATLAB Documentation for each of the above window functions in order to know more
Designing of FIR Filters using Windows
Having Observed the effect of changing the window size on the desired response, it is time to construct a FIR filter using an inbuilt functions and observe the frequency response for different values of N and for various windows.
Low Pass filter Design
Windows : Hamming, Hanning, Rectangular and Blackman Window
Order (N) : 11, 71
Cutoff Frequency : pi/2 [0.5 in MATLAB]
Read the code Carefully and try to understand each line of the code by exploring it. Refer the documentation to design HP, BP and BS filters. Keep N = 11, and N=71, use four windows for each values of N.