Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Examen de Pds
Examen de Pds
F=580
A=2
Fs=7500
Ds=3pi/4
Programamos:
close
f=580; % cambiar la frecuencia
Fs = 7500; %Frecuencia de muestreo
Ts = 1/Fs; %periodo de muestreo
A = 2; % amplitud
df=3*pi/4; %desfasaje
t = 0:0.0001:0.5;
t1 = 0:Ts:0.5;
y = A*sin(2*pi*f*t + df);
y1 = A*sin(2*pi*f*t1+df);
subplot(2,1,1)
plot(t,y,'r')
title('Funcion seno analogico');
axis([0 0.5 -2.2 2.2])
xlabel('tiempo (segundos)');
ylabel('f(t)');
subplot(2,1,2)
stem(t1,y1,'b')
axis([0 0.5 -2.2 2.2])
title('Funcion seno digital');
xlabel('tiempo (segundos)');
ylabel('f(t)');
f(t)
0.5
0
-0.5
-1
-1.5
-2
0
0.05
0.1
0.15
0.2
0.25
tiempo (segundos)
0.3
0.35
0.4
0.45
0.5
0.3
0.35
0.4
0.45
0.5
f(t)
0.5
0
-0.5
-1
-1.5
-2
0
0.05
0.1
0.15
0.2
0.25
tiempo (segundos)
y = A*cos(2*pi*f*t + df);
y1 = A*cos(2*pi*f*t1+df);
subplot(2,1,1)
plot(t,y,'r')
title('Funcion coseno analogico');
axis([0 0.3 -2.2 2.2])
xlabel('tiempo (segundos)');
ylabel('f(t)');
subplot(2,1,2)
stem(t1,y1,'b')
axis([0 0.3 -2.2 2.2])
title('Funcion coseno digital');
xlabel('tiempo (segundos)');
ylabel('f(t)');
f(t)
0.5
0
-0.5
-1
-1.5
-2
0
0.05
0.1
0.15
tiempo (segundos)
0.2
0.25
0.3
0.2
0.25
0.3
f(t)
0.5
0
-0.5
-1
-1.5
-2
0
0.05
0.1
0.15
tiempo (segundos)
0.2
0.15
0.1
0.05
-0.05
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
2
4
x 10
frecuencia =580
amplitud=12
fsim=30000;
Rp=0.5;
Rs=40;
Wp=2*8000/fsim;
Ws=2*4000/fsim;
[N,Wn]=buttord(Wp,Ws,Rp,Rs);
[b,a]=butter(N,Wn,'high');
f=0:1:12000;
H=freqz(b,a,f,fsim);
plot(f,abs(H),'b');grid on;
Hold on
[N,Wn]=cheb1ord(Wp,Ws,Rp,Rs);
[b,a]=cheby1(N,Rp,Wn,'high');
f=0:1:12000;
H=freqz(b,a,f,fsim);
plot(f,abs(H),'r');grid on;
Hold on
[N,Wn]=cheb2ord(Wp,Ws,Rp,Rs);
[b,a]=cheby2(N,Rs,Wn,'high');
f=0:1:12000;
H=freqz(b,a,f,fsim);
plot(f,abs(H),'g');grid on;
Hold on
[N,Wn]=ellipord(Wp,Ws,Rp,Rs);
[b,a]=ellip(N,Rp,Rs,Wn,'high');
f=0:1:12000;
H=freqz(b,a,f,fsim);
plot(f,abs(H),'m');grid on;
title('G R A F I C O
P A S A
A L T O');
h = legend('butterworth','Chebychev I','Chebychev II','Cauer',2);
set(h,'Interpreter','none')
GRAFICO PASA
A LTO
1
butterworth
Chebychev I
Chebychev II
Cauer
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
2000
4000
6000
8000
10000
12000