Documentos de Académico
Documentos de Profesional
Documentos de Cultura
LAB. 07 - Transformada de Fourier
LAB. 07 - Transformada de Fourier
2019
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
EXPERIENCIA 7
TRANSFORMADA DE FOURIER
I. OBJETIVOS
a) Analizar y comprobar las diversas propiedades y aplicaciones de la transformad de Foruier.
Transformada de Fourier
La transformada de Fourier así definida goza de una serie de propiedades de continuidad que
garantizan que puede extenderse a espacios de funciones mayores e incluso a espacios
de funciones generalizadas.
Sus aplicaciones son muchas, en áreas de la ciencia e ingeniería como la física, la teoría de los
números, la combinatoria, el procesamiento de señales (electrónica), la teoría de la probabilidad,
la estadística, la óptica, la propagación de ondas y otras áreas. En procesamiento de señales la
transformada de Fourier suele considerarse como la descomposición de una señal en componentes
de frecuencias diferentes, es decir, corresponde al espectro de frecuencias de la señal .
Definición formal
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
Propiedades básicas
VI. PROCEDIMIENTO
DTFT
1. Analice el siguiente código y obtenga la transformada de Fourier de las tres señales.
subplot(313)
plot(w1, fftshift(angle(X)))
axis([min(w1) max(w1) 1.1*min(angle(X)) 1.1*max(angle(X))])
xlabel('\omega (radians)'); ylabel('<X(e^{j\omega})'); grid
OPCION 1
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
OPCION 2
OPCION 3
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
2. Preguntas
Defina una función discreta y no periódica y responda/obtenga lo solicitado a continuación (DTFT).
a. Espectro de magnitud
b. Espectro de fase (expresado en grados, no radianes)
c. Densidad espectral de potencia
d. Finalidad de fftshift
e. Finalidad de angle
S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t);
X = S + 2*randn(size(t));
subplot(411)
plot(1000*t(1:50),X(1:50))
title('Señal en el dominio del tiempo')
xlabel('t (ms)')
ylabel('X(t)')
Y = fft(X);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
subplot(412)
plot(f,P1)
title('Espectro de frecuencia de X(t)')
xlabel('f (Hz)')
ylabel('|P1(f)|')
subplot(413)
angulo=angle(Y);
plot(angulo)
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
axis([0 30 -5 5])
title('Espectro de fase ')
subplot(414)
PDS=Y.*conj(Y);
plot(PDS)
title('Densidad espectral de potencia')
axis([0 1500 0 500000])
t=0:32;
x=(-0.95).^t;
W = -3*pi:0.01:3*pi;
y=fft(x,1885);
magnitud=abs(y);
plot(W,magnitud,'k');
axis([-20 20 0 20])
xlabel('frecuencia w [rad/seg]');
ylabel('Magnitud');
title('Espectro de x[n]=(-0.95)^n')
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
t=0:32;
x=(0.95).^t;
W = -3*pi:0.01:3*pi;
y=fft(x,1885);
magnitud=abs(y);
plot(W,magnitud);
axis([-20 20 0 20])
xlabel('frecuencia w [rad/seg]');
ylabel('Magnitud');
title('Espectro de x[n]=(0.95)^n')
%parte 5
Puntos =200;
%Vector tiempo
t=0:1/Puntos:10-1/Puntos;
%señal
x=sin(2*pi*15*t)+sin(2*pi*40*t);
%trasformada discreta de Fourier
y=fft(x);
m=abs(y);
y(m<1e-6)=0;
%DETERMINANDO FASE
p=unwrap(angle(y));
f=(0:length(y)-1)*Puntos/length(y);
%GRAFICO DE MAGNITUD DE LA TRANSFORMADA
subplot(2,1,1)
plot(f-100,fftshift(m))
title('MAGNITUD')
%GRAFICO DE FASE DE LA TRANSFORMDA
subplot(212)
plot(f-100,fftshift(p*180/pi))
title('FASE')
Pregunta
Cuál es la máxima frecuencia qué pueden tener las componentes senoidales de la señal x. Sustente.
%PARTE 6
fs=450;
t=0:1/fs:1;
f=250;
x=sin(2*pi*t*f);
nfft=4996;
X=fft(x,nfft);
X=X(1:nfft/2);
mx=abs(X);
ff=(0:nfft/2-1)*fs/nfft;
subplot(211)
stem(t,x)
title('ONDA SENO')
xlabel('TIEMPO(s)')
ylabel('AMPLITUD')
subplot(212)
plot(ff,mx)
title('ESPECTRO DE POTENCIA DE LA ONDA SENO ')
xlabel('FRECUENCIA (Hz)')
ylabel('POTENCIA')
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
%PARTE 6
fs=450;
t=0:fs:100*fs;
f=250;
x=sin(2*pi*t*f);
nfft=4996;
X=fft(x,nfft);
X=X(1:nfft/2);
mx=abs(X);
ff=(0:nfft/2-1)*fs/nfft;
subplot(211)
stem(t,x)
title('ONDA SENO')
xlabel('TIEMPO(s)')
ylabel('AMPLITUD')
subplot(212)
plot(ff,mx)
title('ESPECTRO DE POTENCIA DE LA ONDA SENO ')
xlabel('FRECUENCIA (Hz)')
ylabel('POTENCIA')
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
%PARTE 7
%PULSO GAUSSIANO
%FRECUENCIA DE MUESTREO
Fs = 100;
%VECTOR TIEMPO
t = -0.5:1/Fs:0.5;
%LONGITUD DE LA SEÑAL
L = length(t);
%PULSO GAUSSIANO
X = 1/(4*sqrt(2*pi*0.01))*(exp(-t.^2/(2*0.01)));
subplot(211)
plot(t,X)
title('PULSO GAUSSIANO EN EL DOMINIO DEL TIEMPO')
xlabel('TIEMPO(s)')
ylabel('X(t)')
n = 2^nextpow2(L);
Y = fft(X,n);
f = Fs*(0:(n/2))/n;
P = abs(Y/n);
subplot(212)
plot(f,P(1:n/2+1))
title('PULSO GAUSSIANO EN EL DOMINIO DE LA FRECUENCIA')
xlabel('FRECUENCIA Hz')
ylabel('|P(f)|')
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
ft=subs(ft,a,1);
%GRAFICO DEL PULSO RECTANGULAR EN EL DOMINIO DEL TIEMPO
subplot(2,1,1)
ezplot(ft,[-2,2]);
ylim([-0.2 1.2])
xlabel('t');
ylabel('f(t)')
title('PULSO RECTANGULAR')
Fw=subs(Fw,a,1);
%GRAFICO DEL PULSO RECTANGULAR EN EL DOMINIO DE LA FRECUENCIA
subplot(2,1,2)
hg=ezplot(Fw,[-10,10]);
set(hg)
ylim([-1 2.2])
xlabel('\omega');
ylabel('F(\omega)')
title('TRANSFORMADA DE FOURIER ')
grid on
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
close all
t=-10:0.01:10;
duty=50;
% porcentaje del periodo en el que la señal es positiva
f_cuadrada=square(2*pi*0.5*t,duty);
%TRANSFORMADA DE FOURIER
y=fft(f_cuadrada);
ymag=abs(y);
subplot(211)
plot(t,f_cuadrada);
axis([0 10 0 1.5])
title('ONDA CUADRADA PERIODICA')
subplot(212)
plot(ymag)
axis([-200 2200 0 1800])
title('TRANFORMADA DE FOURIER ')
%PARTE7_IMPULSO UNITARIO
close all
t = (-1:0.01:1)';
impulse = t==0;
y=fft(impulse);
ymag=abs(y);
subplot(211)
LABORATORIO DE PROCESAMIENTO DIGITAL DE SEÑALES EXPERIENCIA 7
plot(t,[impulse])
title('IMPULSO EN EL DOMINIO DEL TIEMPO ')
subplot(212)
plot(ymag)
title('IMPULSO EN EL DOMINIO DE LA FRECUENCIA ')