CHEBYSHEV TYPE 2 LOW PASS FILTER MATLAB PROGRAM

CHEBYSHEV TYPE 2 LOW PASS FILTER


 

alphap=input('pass band attenuation in dB=');

alphas=input('stop band attenuation in dB=');

fp=input('pass band frequency in Hz=');

fs=input('stop band frequency in Hz=');

f=input('Sampling frequency in Hz=');

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

%To find cutoff frequency and order of the filter

[n,wn]=cheb2ord(wp,ws,alphap,alphas);

%system function of the filter

[b,a]=cheby2(n,alphas,wn);

w=0:.01:pi;

[h,ph]=freqz(b,a,w);

m=20*log(abs(h));

an=angle(h);

subplot(2,1,1);

plot(ph/pi,m);

grid;

ylabel('Gain in dB');

xlabel('Normalised frequency');

subplot(2,1,2);

plot(ph/pi,an);

grid;

ylabel('Phase in radians');

xlabel('Normalised frequency');


 


 


 


 


 


 


 

Observation:


 

pass band attenuation in dB=1

stop band attenuation in dB=30

pass band frequency in Hz=200

stop band frequency in Hz=600

Sampling frequency in Hz=2000


 


 


 

0 comments: