0% found this document useful (0 votes)
46 views

Chebyshev Filter: All All 'Enter Passband Ripple' 'Enter Stopband Ripple'

This document defines and analyzes several Chebyshev filters using MATLAB code. It designs low-pass, high-pass, band-pass, and band-stop filters with specified passband and stopband ripple values. For each filter type, it plots the magnitude and phase response to show the frequency response characteristics.

Uploaded by

Fiery Vicky
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Chebyshev Filter: All All 'Enter Passband Ripple' 'Enter Stopband Ripple'

This document defines and analyzes several Chebyshev filters using MATLAB code. It designs low-pass, high-pass, band-pass, and band-stop filters with specified passband and stopband ripple values. For each filter type, it plots the magnitude and phase response to show the frequency response characteristics.

Uploaded by

Fiery Vicky
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

CHEBYSHEV FILTER

clc; clear all; close all; rp=input('Enter Passband Ripple'); rs=input('Enter Stopband Ripple'); %LPF chebyshev BILINEAR wp=0.3; ws=0.6; [n,wn]=cheb1ord(wp,ws,rp,rs); [num,den]=cheby1(n,rp,wn,'low'); disp(num); disp(den); w=0:0.01:pi; [h,w]=freqz(num,den,w); mag=20*log10(abs(h)); subplot(4,2,1); plot(w/pi,mag); grid on; title('IIR cheb mag rep lpf'); xlabel('normalised freq'); ylabel('gain in db'); an=angle(h); subplot(4,2,2); plot(w/pi,an); grid on; title('IIR cheb phase rep'); xlabel('normalised freq'); ylabel('angle in dp'); %hPF chebyshev BILINEAR ws=0.6; wp=0.3; [n,wn]=cheb1ord(wp,ws,rp,rs); [num,den]=cheby1(n,rp,wn,'high'); disp(num); disp(den); w=0:0.01:pi; [h,w]=freqz(num,den,w); mag=20*log10(abs(h)); subplot(4,2,3); plot(w/pi,mag); grid on; title('IIR cheb mag rep hpf'); xlabel('normalised freq');

ylabel('gain in db'); an=angle(h); subplot(4,2,4); plot(w/pi,an); grid on; title('IIR cheb phase rep'); xlabel('normalised freq'); ylabel('angle in dp'); %bPF chebyshev BILINEAR wp=[0.2,0.4]; ws=[0.1,0.5]; [n,wn]=cheb1ord(wp,ws,rp,rs); [num,den]=cheby1(n,rp,wn,'bandpass'); disp(num); disp(den); w=0:0.01:pi; [h,w]=freqz(num,den,w); mag=20*log10(abs(h)); subplot(4,2,5); plot(w/pi,mag); grid on; title('IIR cheb mag rep bpf'); xlabel('normalised freq'); ylabel('gain in db'); an=angle(h); subplot(4,2,6); plot(w/pi,an); grid on; title('IIR cheb phase rep'); xlabel('normalised freq'); ylabel('angle in db'); %BSF chebysher BILINEAR wp=[0.2,0.4]; ws=[0.1,0.5]; [n,wn]=cheb1ord(wp,ws,rp,rs); [num,den]=cheby1(n,rp,wn,'stop'); disp(num); disp(den); w=0:0.01:pi; [h,w]=freqz(num,den,w); mag=20*log10(abs(h)); subplot(4,2,7); plot(w/pi,mag); grid on;

title('IIR cheb mag rep bsf'); xlabel('normalised freq'); ylabel('gain in dB'); an=angle(h); subplot(4,2,8); plot(w/pi,an); grid on; title('IIR cheb phase rep'); xlabel('normalised freq'); ylabel('angle in dB');

OUTPUT: Enter Passband Ripple 0.3 Enter Stopband Ripple 0.4

You might also like