%Program for the
design of Chebyshev Type-1 Band pass digital filter
Rp=input('enter
the passband ripple');
Rs=input('enter
the stopband ripple');
Wp=input('enter
the passband frdeq');
Ws=input('enter
the stopband freq');
fs=input('enter
the sampling freq');
W1=2*Wp/fs;
W2=2*Ws/fs;
[N,Wn]=CHEB1ORD(W1,W2,Rp,Rs);
Wn=[W1 W2];
[b,a]=CHEBY1(N,Rp,Wn,'bandpass');
w=0:.01:pi;
[h,om]=freqz(b,a,w);
m=20*log10(abs(h));
an=angle(h);
subplot(2,1,1);
plot(om/pi,m);
ylabel('gain
in dB');
xlabel('(a) Normalised frequency');
subplot(2,1,2);
plot(om/pi,an);
xlabel('
(b) Normalised frequency');
ylabel('phase
in radians');
RESULT
enter
the passband ripple .4
enter
the stopband ripple 35
enter
the passband frdeq 2000
enter
the stopband freq 2500
enter the sampling freq 10000
No comments:
Post a Comment