You are on page 1of 1

Experiment 8

Aim: Design of FIR filter using Kaiser Window.


Activity: Design and plot the frequency response of an FIR linear phase LPF using Kaiser window to
have following specifications:0.98 |H (ejw)| 1.02;

for 0 |w| 0.3

|H (ejw)| 0.04;

for 0.45 |w|

clc;
clear all;
rp=.02;
rs=0.04;
r=min(rp,rs);
wp=.3*pi;
ws=0.45*pi;
wc=(wp+ws)/2;
dw=ws-wp;
As=-20*log10(r);
b=0.5842*((As21).^0.4)+0.07886*(As-21);
M=(As-8)/(2.285*dw);
n=0:M-1;
w=b*sqrt(1-(((2*n/M))-1).^2);
w1=besseli(0,w)./besseli(0,b);
a=(M-1)/2;
h=sin(wc*(n-a+eps))./(pi*(na+eps));
h1=w1.*h;
N=1024;
x=fft(h1,N);
x1=abs(x);
x2=max(x);
x3=x1/x2;
x4=20*log10(x3);
k=0:(N/2)-1;
f=k/N;
plot(f,x4(1:N/2));

You might also like