1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| >> %filtre butterworth
Wp =0.1 ; Ws =0.2 ;
Rp = 1; Rs = 30;
[n1,Wn1] = buttord(Wp,Ws,Rp,Rs)
[b,a] = butter(n1,Wn1);
figure(1);
freqz(b,a)
title('n=6 Butterworth Bandpass Filter')
%filtre elliptique
Wp =0.1 ; Ws = 0.2;
Rp = 1; Rs = 30;
[n2,Wp] = ellipord(Wp,Ws,Rp,Rs)
[b,a] = ellip(n2,Rp,Rs,Wp);
figure(2);
freqz(b,a);
title('n=3 Elliptic Bandpass Filter')
%filtre chebychev type 1
Wp =0.1 ; Ws =0.2 ;
Rp = 1; Rs = 30;
[n3,Wp] = cheb1ord(Wp,Ws,Rp,Rs)
[b,a] = cheby1(n3,Rp,Wp);
figure(3);
freqz(b,a);
title('n=4 Chebyshev Type 1 Bandpass Filter') |
Partager