Dexp 8
Dexp 8
THEORY - The design process of the FIR filter comprises two main phases:
1. The filter order is determined initially, followed by the computation of
coefficients.
2. Kaiser's approximate formula is utilized to estimate the filter order N.
Here are the steps delineated for developing MATLAB code to executethis
design:
1. Generate sampled sinusoids across a range of frequencies. Calculate
samples for a 4 - tone input signal.
2. Apply any windowing technique to design the FIR filter.
3. Visualize the frequency response, including both amplitude and phase.
Implement the designed filter onto the 4-tone test sequence.
IN LAB
wp=0.5*pi;
ws=0.6*pi;
delp=0.1;
dels=0.1;
fs=8000;
hn1=myFilter(wp,ws,delp,dels,0,0);
f1=figure;
freqz(hn1,1,1024,fs);
subtitle("LPF using rectangular window");
hn2=myFilter(wp,ws,delp,dels,0,1);
f2=figure;
freqz(hn2,1,1024,fs);
subtitle("HPF using rectangular window");
hn3=myFilter(wp,ws,delp,dels,1,0);
f3=figure;
freqz(hn3,1,1024,fs);
subtitle("LPF using Blackman window");
hn4=myFilter(wp,ws,delp,dels,1,1);
f4=figure;
freqz(hn4,1,1024,fs);
subtitle("HPF using Blackman window");
function hn = myFilter(wp, ws, delp, dels, wndow, hpf)
wc=(wp+ws)/2;
wt=abs(wp-ws);
del=min(delp,dels);
Result :FIR filter design was implemented in MATLAB using windowing technique.
Learning Outcomes: FIR filter design using windowing technique was implemented and studied in
MATLAB using various types of windows such as Rectangular, Blackmann, Kaiser, Hamming
windows.
MAHAK SALECHA 22102210 A7
MAHAK SALECHA 22102210 A7