MATLAB Program for IIR(Infinite Impulse Response) High Pass Filter using the Window function | IT1254 - DSP and Communications Systems Lab



AIM:
        To write a program for IIR(Infinite Impulse Response) high pass filter using the window function using MATLAB in IT1254 - DSP and Communications Systems Lab.

ALGORITHM:
Step 1: Start
Step 2: Read the pass band ripple
Step 3: Read the stop band ripple
Step 4: Read the pass band frequency
Step 5: Read the stop band frequency
Step 6: Read the sampling band frequency
Step 7: Perform high pass filter calculations
Step 8: Plot the output sequence
Step 9: Stop

PROGRAM:
clc;
clear all;
format long;
rp=input('Enter the passband ripple(rp):');
rs=input('Enter the
stopband ripple(rs):');
fp=input('Enter the passband frequency(fp):');
fs=input('Enter the stopband frequency(fs):');
f=input('Enter the sampling frequency(f):');
wp=2*fp/f;
ws=2*fs/f;
[n,wn]=buttord(wp,ws,rp,rs);
[b,a]=butter(n,wn,'high');
w=0:0.01:pi;
[h,o]=freqz(b,a,w);
m=20*log10(abs(h));
an=angle(h);
subplot(2,1,1);
plot(o/pi,m);
ylabel('Gain(db)->');
xlabel('(a)Normalised frequency->');
subplot(2,1,2);
plot(o/pi,an);
ylabel('Phase(radians)->');
xlabel('(b)Normalised frequency->');
OUTPUT:
Click to view full size image!

RESULT:
Thus the program for FIR Filter IIR high pass filter was performed using MATLAB and the output sequences were drawn.

Previous
Next Post »

Still not found what you are looking for? Try again here.