Está en la página 1de 6

UNIVERSIDAD NACIONAL

PEDRO RUIZ GALLO


INGENIERIA ELECTRONICA
TELECOMUNICACIONES I

PRACTICA - ALIASING

Docente:
SEGURA ALTAMIRANO, FRANCISCO

Integrantes:
ZAMORA VENTURA, JHOSSEP JOSSIMAR

Lambayeque, Mayo 2014

CODIGO:
%Colocamos los parametros iniciales de la seal
Fs=44100;
t=0:1/Fs:3-1/Fs;
f=linspace(-Fs/2,Fs/2,length(t));
%Grabamos el audio
y=wavrecord(3*Fs,Fs);
figure(1)
subplot(311);
plot(f,y,'g');
title('VOZ');
Y=fft(y)/length(y);
ytemp=fftshift(Y);
subplot(312);
plot(f,fftshift(abs(fft(y))));
title('fftshift(abs(fft(y)))');
subplot(313);
plot(f,fft(y));
title('fft(y)');
fs1=3400*2;
a=(f>fs1);
a1=find(a,1);
length(f/2+1);
ceros=zeros(1,a1-length(f)/2);
figure(2)
ydp=[ceros';ytemp(1:length(y)-(a1-length(y)/2))];
length(ydp);
length(y);
subplot(313);
plot(f,abs(ydp),'r');
title('UNION DE ESPECTROS');
hold on
ydn=[ytemp((a1-length(y)/2):(length(f)-1));ceros'];
plot(f,abs(ydn),'y');
subplot(311);
plot(f,abs(ydp),'r');
title('ESPECTROS DESPLAZADOS');
subplot(312);
plot(f,abs(ydn),'y');
ytotal=ytemp+ydp+ydn;
figure(3);
subplot(311);
plot(f,abs(ytotal));
title('ESPECTRO - AQUI NO SE PUEDE DIFERENCIAR LA INTERFERENCIA DEL
ALIASING');
subplot(312);

plot(f,abs(ydp),'g',f,abs(ydn),'y',f,(abs(ytemp)),'r');
title('ESPECTRO - AQUI SE PUEDE VER LA INTERSECCION DEL ALIASING');
ytemp1=fftshift(ytotal);
subplot(313);
plot(f,abs(ytemp1),'y');
title('fftshift(ytotal)');

GRAFICAS

POR MODULACION:
CODIGO:
fs=44100;
t=0:1/fs:3-1/fs;
Fc=3400;
Wn=(Fc/Fs/2);
f=linspace(-fs/2,fs/2,length(t));
y=wavrecord(3*fs,fs);
Y=fft(y)/length(y);
ytemp=fftshift(Y);
fs1=3400*2;
a=(f>fs1);
yrec=ifft(ytemp)*length(y);

[b a]=butter(4,Wn);
yfil=filter(b,a,yrec)
figure(1);
yfil=filter(b,a,real(yrec));
plot(yfil);
%mosulacion
fpor=6800;
fpor2=13600;
por1=2*cos(2*pi*fpor*t);
por2=2*cos(2*pi*fpor2*t);
ytotal=y+y.*por1'+y.*por2';
figure(1);
subplot(211);
plot(t,y,'r');
title('VOZ');
subplot(212);
plot(f,abs(fftshift(fft(ytotal))),'m');
title('ESPECTROS - NO SE OBSERVA MUY BIEN EL ALIASING ENTRE ELLAS');
figure(2);
plot(f,abs(fftshift(fft(y))),'g',f,abs(fftshift(fft(y.*por1'))),'y',f,
abs(fftshift(fft(y.*por2'))),'r');
title('ESPECTROS - SE OBSERVA MUY BIEN EL ALIASING ENTRE ELLAS');

IMGENES:

También podría gustarte