Wednesday, July 13, 2011

MATLAB Programs 12:Design of an IIR Chebyschev type - I filter

Program for the design of the IIR filter is given below. The function cheb1ord() is used to find the filter order and center frequency and cheby1() is used to find the filter coefficients.A low pass filter is implimented.

% Program to design IIR Chebyschev type - I filter


clear all;
close all;


fp=input('Enter the pass band frequency fp   = ');
fs=input('Enter the stop band frequency fs   = ');
rp=input('Enter the pass band attenuation rp = ');
rs=input('Enter the stop band attenuation rs = ');
f=input ('Enter the sampling frequency f     = ');


wp=2*fp/f;
ws=2*fs/f;


[n,wn]=cheb1ord(wp,ws,rp,rs);


[b,a]=cheby1(n,rp,wn,'low');


freqz(b,a,500,f);
TITLE ('Magnitude and phase respose of the IIR Chebyschev type - I filter');


%output
%Enter the pass band frequency fp   = 1000
%Enter the stop band frequency fs   = 1200
%Enter the pass band attenuation rp = .2
%Enter the stop band attenuation rs = 45
%Enter the sampling frequency f     = 3000



4 comments:

Vee Eee Technologies said...

Excellent pieces. Keep posting such kind of information on your blog. I really impressed by your blog.
Vee Eee Technologies

Anonymous said...

good :)

kumar gaurav said...

can any bdy explain this program??plzz

Anonymous said...

y did v put a 500 in frequncy response

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes