Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Laboratorio No 5
Laboratorio No 5
1. DISEO DIRECTO
Disee un filtro digital Butterworth pasa-banda con las siguientes
especificaciones: banda de paso entre 1.500 y 2.500 Hz, banda stop entre
1.000 y 3.000 Hz, riple en la banda de paso de 1 dB y al menos 60 dB de
atenuacin en la banda stop. Comprelo con los algoritmos de diseo
Chebyshev I, Chebyshev II y elptico. Halle las funciones de transferencia y su
respuesta en frecuencia. Haga las comparaciones con las herramientas de
Matlab fdatool. Observe las respuestas en la fase de cada uno de los filtros.
Use frecuencia de muestreo de 10.000 Hz
clear all
>> %lab No 5%
%1. Diseo directo%
%butterworth%
Rp=1;
Rs=60;
wp=[1500 2500];
ws=[1000 3000];
fs=10000;
[n,wn]=buttord(wp/5000,ws/5000,Rp,Rs);
[b1,a1]=butter(n,wn);
fvtool(b1,a1)
Chevicheb I
Rp=1;
Rs=60;
wp=[1500 2500];
ws=[1000 3000];
fs=10000;
[n,wn]=cheb1ord(wp/5000,ws/5000,Rp,Rs);
[b2,a2]=cheby1(n,Rp,wn);
fvtool(b2,a2)
%chebyshev II%
Rp=1;
Rs=60;
wp=[1500 2500];
ws=[1000 3000];
fs=10000;
[n,wn]=cheb2ord(wp/5000,ws/5000,Rp,Rs);
[b3,a3]=cheby2(n,Rs,wn);
fvtool(b3,a3)
2. DISEO INDIRECTO
Usando el algoritmo de Butterworth (Serie de Taylor) disee el filtro anterior con el
mtodo indirecto, esto es,
Filtro prototipo anlogo pasa bajo
Transformacin de frecuencia a pasa banda
Discretizacin por transformacin bilineal e impulso invariante.
Haga el anlisis comparativo con al respuesta en frecuencia utilizando la
herramienta fvtool.
Rp=1;
Rs=60;
Wp=[1500/5000 2500/5000];
Ws=[1000/5000 3000/5000];
[n1,Wn1]=buttord(Wp,Ws,Rp,Rs)
W0=sqrt(0.2922*0.5098);
BW=0.5098-0.2922;
Rp=1;
Rs=60;
Wp=2500/5000;
Ws=3000/5000;
[n,Wn]=buttord(Wp,Ws,Rp,Rs);
[b,a]=butter(n,Wn)
[bt,at]=lp2bp(b,a,W0,BW) %hacemos la trasnformacion
Rp=1;
n1 =
11
Wn1 =
0.2922
0.5098
b=
1.0e-007 *
Columns 1 through 5
0
Columns 6 through 10
0
Columns 11 through 15
0
Columns 16 through 20
0
Columns 21 through 25
0.9618
a=
Columns 1 through 5
1.0000
Columns 6 through 10
233.5441 294.7646 314.0603 287.3439 228.4661
Columns 11 through 15
159.1656 97.6857 52.9785 25.4148 10.7736
Columns 16 through 20
4.0234
1.3165
0.3744
0.0914
0.0188
0.0000
0.0000
0.0000 -0.0000
0.0000
Columns 21 through 25
0.0032
0.0004
0.0000
bt =
1.0e-022 *
Columns 1 through 5
0.1221 -0.0000
Columns 6 through 10
-0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
Columns 11 through 15
0.0000
0.0000
0.0000
Columns 16 through 20
0.0000
0.0000
0.0000
Columns 21 through 25
0.0000
0.0000
0.0000
1.6970
5.0151
6.6265 11.1851
Columns 6 through 10
12.1820 15.1205 14.0491 14.0880 11.4211
Columns 11 through 15
9.7013
6.9695
5.1554
3.3185
2.1757
0.2088
0.1005
0.0038
0.0015
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
Columns 16 through 20
1.2648
0.7437
0.3927
Columns 21 through 25
0.0486
0.0214
0.0094
Columns 26 through 30
0.0006
0.0002
0.0001
Columns 31 through 35
0.0000
0.0000
0.0000
Columns 36 through 40
0.0000
0.0000
0.0000
Columns 41 through 45
0.0000
0.0000
0.0000
Columns 46 through 49
0.0000
0.0000
0.0000
0.0000