Documente Academic
Documente Profesional
Documente Cultură
PRACTICA N 2
TEMA 1: DESARROLLO DE LA SERIE DE FOURIER
I. OBJETIVO:
II. PROCEDIMIENTO:
, 0
() = {
, 2
SOLUCION
La funcin f(t) es una funcin impar cuya serie trigonomtrica de Fourier es:
4 1 1
() = ( ) [sin + ( ) sin 3 + ( ) sin 5 + ]
3 5
Programando para mostrar la grfica de la serie de Fourier:
Fs=1000;
t=(1:100)/Fs;
w=2*pi*10;
f=(8/pi)*(sin(w*t)+(1/3)
*sin(3*w*t)+(1/5)*sin(5*w*t)+(1/7)
*sin(7*w*t)+(1/9)*sin(9*w*t));
plot(t,f)
grid
Series de Fourier 2
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
, /2 /2
() = {
, /2 3/2
SOLUCION:
Dado que f(t) = funcin par cuya serie trigonomtrica de Fourier esta dada por:
4 1 1 1
() = ( ) [cos ( ) cos 3 + ( ) cos 5 ( ) cos 7 + (1/9)cos(9)]
3 5 7
Fs=1000;
t=(1:100)/Fs;
w=2*pi*10;
f=(8/pi)*(cos(w*t)-(1/3)*cos(3*w*t)+(1/5)*cos(5*w*t)-(1/7)*cos(7*w*t)+(1/9)*cos(9*w*t)-
(1/11)*cos(11*w*t)-(1/13)*cos(13*w*t));
plot(t,f)
grid
Series de Fourier 3
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
4 1
() = ( ) ( ) sin ( ) cos
2
Desarrolle mediante la instruccin de control de flujo FOR del Matlab:
SOLUCION:
Fs=100;
t=(-100:100)/Fs;
w=2*pi;
A=2;
f=0;
for n=1:1000;
f=f+(4*A/(n*pi))*(sin(n*0.5*pi))*cos(n*w*t);
end;
plot(t,f)
xlabel('t(seg)')
ylabel('AMPLITUD')
grid
Series de Fourier 4
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Dada la serie:
1
() = ( ) sin(0 ) . () = (0,1).
2
1 1
Fs=100;
t=(-100:100)/Fs;
w=2*pi;
A=1;
f=0;
for n=1:1000;
f=0.5-(f+(sin(n*w*pi)));
end;
plot(t,f)
2.5
1.5
AMPLITUD
0.5
-0.5
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t(seg)
Series de Fourier 5
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
0.4
0.3
0.2
0.1
AMPLITUD
-0.1
-0.2
-0.3
-0.4
-0.5
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t(seg)
Series de Fourier 6
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
fs=100;
t=(-100:100)/fs;
w=2*pi;
A=2;
f=0;
for n=0:1000;
f=f+((2*(n+1)*pi)^2)\(4*A)*cos(n*w*t);
end;
plot(t,f)
xlabel('t(seg)')
ylabel('AMPLITUD')
title('FUNCION TRIGONOMETRICA IMPAR')
grid
Series de Fourier 7
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
FUNCION EXPONENCIAL
8
4
AMPLITUD
-2
-4
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t(seg)
Series de Fourier 8
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
I. OBJETIVO:
II. PROCEDIMIENTO:
N=128; figure(2)
t=linspace(0,3,N); plot(W,abs(Fp),'+')
f=2*exp(-20*t); xlabel('frequency,Rad/s'),ylabel('|F(W)|')
figure(1)
plot(t,f)
xlabel('Time,seg'),ylabel('f(t)'),grid
Ts=(2)-t(1);
Ws=2*pi/Ts;
F=fft(f);
Fp=F(1:N/2+1)*Ts;
W=Ws*(0:N/2)/N;
Series de Fourier 9
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
N=128;
t=linspace(0,3,N);
Ts=t(2)-t(1);
Ws=2*pi/Ts;
W=Ws*(0:N/2)/N;
Fa=2./(20+j*W);
figure(3)
plot(W,abs(Fa))
xlabel('frequency,Rad/s'),ylabel('|F(W)|')
Series de Fourier 10
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
2
() = () ( ) = 0,1,2,3,
4
m=[0,1,2,3,4,5];
Xn=[1,2,3,4,5,6];
Xk=fft(Xn);
Xmag=abs(Xk);
Xphase=angle(Xk);
figure(1)
plot(m,Xmag),axis([0 5 0 23]);
figure(2)
Stem(m,Xmag)
figure(3)
Stem(m,Xphase)
Series de Fourier 11
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Series de Fourier 12
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
4. Para la suma de dos seales senoidales contaminado con ruido desarrolle la grafica en el dominio
del tiempo y su respectiva grafica de Fourier.
t=0:0.001:0.6;
x=sin(2*pi*50*t)-sin(2*pi*120*t);
y=x+2*randn(size(t));
figure(4)
plot(y(1:50))
Y=fft(y,512);
Pyy=Y.*conj(Y)/512;
f=1000*(0:255)/512;
figure(5)
plot(f,Pyy(1:256))
Series de Fourier 13
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Fs=100;
t=(1:100)/Fs;
s1=5*sin(2*pi*t*5);s2=10*sin(2*pi*t*15);s3=7*sin(2*pi*t*30)
s=s1+s2+s3;
figure(1)
plot(t,s);
S=fft(s,512);
w=(0:255)/256*(Fs/2);
figure(2)
plot(w,abs([S(1:256)]));
Series de Fourier 14
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Series de Fourier 15
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Series de Fourier 16
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
title('fplot of f(x)=5.sin(x)/x')
xlabel('x')
ylabel('f(x)')
Series de Fourier 17
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Series de Fourier 18
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
t=-0.25:0.001:0.25;
w=2*pi;
f=(exp(j*w*t)+exp(-j*w*t))/2;
figure(1)
plot(t,f)
Series de Fourier 19
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
N=128;
Ts=t(2)-t(1);
Ws=2*pi/Ts;
F=fft(f);
Fp=F(1:N/2+1)*Ts;
W=Ws*(0:N/2)/N;
>> figure(2)
>> plot(W,abs(Fp),'+')
>> xlabel('Frequency,Rad/s'),ylabel('|F(W)|')
Series de Fourier 20
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
a).function directa
>> N=128;
>> A=2;
>> w=2*pi;
>> f=A*sin(w*t);
>> figure(1)
>> plot(t,f)
>> xlabel('Time,seg'),ylabel('f(t)'),grid
Series de Fourier 21
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
b) Transformada de furrier
>> t=-0.25:0.001:0.25;
>> A=2;
w=2*pi;
f=A*sin(w*t);
subplot(2,1,1);
plot(t,f);
F=fft(f);
Fp=F(1:N/2+1)*Ts;
W=Ws*(0:N/2)/N;
figure(3)
plot(W,abs(Fp),'+')
xlabel('Frecueny,rad/s'),ylabel('|F(W)|')
Series de Fourier 22
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
m=[0,1,2,3];
Xm=[2,3,4,5];
Xk=fft(Xm);
Xmag=abs(Xk);
Xphase=angle(Xk);
figure(1)
plot(m,Xmag),axis([0 5 0 25]);
figure(2)
stem(m,Xmag)
figure(3)
stem(m,Xphase)
Series de Fourier 23
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Series de Fourier 24
LABORATORIO 2 INTRODUCCIN A LAS TELECOMUNICACIONES
Conclusiones:
Series de Fourier 25