Documente Academic
Documente Profesional
Documente Cultură
INTRODUCCIN A LAS
TELECOMUNICACIONES
Docente: ING. ROBERTO UNSIHUAY TOVAR
Informe: FINAL 1, 2 y 3
Alumnos:
JUNCO RENTERA, VICTOR JUAN 14190126
QUIROZ TENORIO, ITALO FERNANDO 14190143
I. OBJETIVOS
MATLAB nos permite analizar seales analgicas. Esto se debe a que la forma natural
de representar una seal en MATLAB es definir una secuencia finita de valores mediante
un vector fila. Por tanto, siendo estrictos, en MATLAB toda seal es discreta en tiempo,
mientras que en amplitud puede ser discreta (cuantizada) o contina (aunque limitada por
la precisin de los tipos numricos). No obstante, si los intervalos temporales entre
valores son suficientemente pequeos y el rango temporal en el que se define la seal es
suficientemente amplio, la secuencia de valores empleada para representar la seal y las
operaciones realizadas para su anlisis proporcionan una buena aproximacin a los
resultados tericos. En el caso ms simple y frecuente, los valores se toman en instantes
equiespaciados, intervalo que no debe confundirse con el periodo de muestreo.
A partir de la serie de Fourier, es posible reconstruir una seal peridica. Cuanto mayor
sea el nmero de armnicos utilizado en el desarrollo en serie, mejor ser la
reconstruccin. Un parmetro importante en la reconstruccin de seales es la velocidad
de convergencia, o lo que es lo mismo, la velocidad con la que los coeficientes de Fourier
tienden a 0.
MATLAB est equipado con funciones especiales que nos van a permitir realizar un
anlisis de Fourier de funciones definidas por un conjunto de valores discretos. Por
ejemplo, el comando fft() nos permite obtener la transformada rpida de Fourier (fast
Fourier Transform) de una secuencia de nmeros definida por el vector x.
2
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
Por ejemplo:
>> X=fft(x);
>> X=fft(x,N);
>> X=fftshift(X);
>> x=ifft(X)
IV. PROCEDIMIENTO
3
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
4
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
FUNCIONES POLINOMICAS
x=linspace(-1,3);
>> v=polyval(p,x);
>> plot(x,v),title('x^3+4x^2-7x-10'),xlabel('x')
c=conv(a,b)
c=
1 6 20 50 75 84 64
>> [q,r]=deconv(c,b)
q=
1 2 3 4
r=
0 0 0 0 0 0 0
>> h=polyder(q)
h=
3 4 3
5
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
x=linspace(0.4*pi,60);
>> y=sin(x);
>> plot(x,y)
z=cos(x);
>> plot(x,z,x,y)
6
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
plot(x,y,x,y,'*')
plot(y,z)
plot(x,y,x,2*y.*z,'--')
7
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
plot(x,y,x,y,'*')
>> plot(y,z)
>> plot(x,y,x,2*y.*z,'--')
>> grid
>> title('2sen(x)cos(x)sen(2x)')
>> plot3(y,z,x),grid
8
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
x=linspace(0,16,100);
>> y=sin(x);
>> z=(y>=0).*y;
>> z=z+0.5*(y<0);
>> z=(x<=14).*z;
>> plot(x,z)
MANIPULACION DE GRAFICOS
x=linspace(0.6*pi,60);
>> y=sin(x);
>> z=cos(x);
>> plot(x,y)
>> hold on
>> plot(x,z,'m')
9
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
10
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
V. CUESTIONARIO
>> y=cos(x);
>> figure(1)
>> plot(x,y)
>> figure(3)
>> plot(x,y,x,y,'*')
11
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
>> figure(4) b)
>> y=tan(x);
>> figure(1)
>> plot(x,y)
>> figure(5)
>> plot(x,y,x,2*y.*z,'--')
>> z=acos(x);
>> figure(2)
>> plot(x,z,x,y)
>> grid
>> title('2sen(x)cos(x)sen(2x)')
12
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
>> figure(4)
a)
>> x=linspace(0,20,200);
>> y=cos(x);
>> z=(y>=0).*y;
>> z=z+0.6*(y<0);
>> z=(x<=20).*z;
>> plot(x,z)
>> figure(5)
>> plot(x,y,x,2*y.*z,'--')
>> xlabel('x'),ylabel('z=f(x)')
>> grid
b)
>> xlabel('variable independiente x')
>> x=linspace(0,10,150);
>> ylabel('variable dependiente')
>> y=sin(x);
>> title('2sen(x)cos(x)sen(2x)')
>> z=(y>=1).*y;
>> figure(6)
>> z=z+0.3*(y<1);
>> plot3(y,z,x),grid
>> z=(x<=15).*z;
>> plot(x,z)
13
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
b)
x=linspace(0,8*pi,75);
>> y=sin(x);
>> z=cos(x);
>> plot(x,y)
>> hold on
>> plot(x,z,'m')
>> xlabel('x'),ylabel('z=f(x)')
MANIPULACIN DE GRFICOS:
a)
>> x=linspace(0,7*pi,70);
>> y=cos(x);
>> plot(x,z,'m')
SUBDIVISIN DE VENTANA DE
GRAFICAS (M,N,P)
a)
>> X=linspace(0,5*pi,70);
>> y=sin(x);
>> z=cos(x);
>> a=2*sin(x).*cos(x);
>> b=sin(x)./(cos(x)+eps);
14
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
>> subplot(2,2,4)
>> subplot(2,2,2)
>> subplot(2,2,3)
b)
>> X=linspace(0,9*pi,90);
>> y=sin(x);
>> plot(x,a),axis([0 4*pi -1
1]),title('2sin(x)cos(x)') >> z=cos(x);
>> a=2*sin(x).*cos(x);
>> b=sin(x)./(cos(x)+eps);
>> subplot(2,2,1)
15
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
>> subplot(2,2,4)
>> subplot(2,2,2)
>> subplot(2,2,3)
16
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
VI. CONCLUSIONES
Hemos comprendido que en matlab podemos trabajar con nmeros reales, as como
tambin se puede trabajar en funcin de nmeros complejos lo que es un gran
beneficio, ya que las seales reales se aproximan a valores con nmeros complejos
en gran parte.
17
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
I. OBJETIVOS
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
18
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
, /2 /2
() = {
, /2 3/2
SOLUCION:
Dado que f(t) = funcin par cuya serie trigonomtrica de Fourier est 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
19
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
4 1
() = ( ) ( ) sin ( ) cos
2
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')
title('FUNCION PAR ONDA CUADRADA')
grid
20
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
Dada la serie:
1
() = ( ) sin(0 ) . () = (0,1).
2
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)
21
LAB. 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)
4
f(t)= cos(nWt) ; n=impar d ela onda triangular.
()
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
22
LAB. 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)
23
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
I. OBJETIVOS
II. PROCEDIMIENTO
N=128;
t=linspace(0,3,N);
f=2*exp(-20*t);
figure(1)
plot(t,f)
xlabel('Time,seg'),ylabel('f(t)'),grid
axis([0 0.3 0 2]);
Ts=(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)|')
24
LAB. 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)|')
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)
25
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
26
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
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))
27
LAB. 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)]));
28
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
29
LAB. 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)
30
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
N=128;
axis([0 0.2 0 2]);
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)|')
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
31
LAB. 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)|')
32
LAB. 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)
33
LAB. INTRODUCCIN A LAS TELECOMUNICACIONES
IV. Conclusions
Hemos sincronizada las diferentes funciones a travs del tiempo, teniendo en cuenta
seales peridicas que se generan a travs del Matlab.
34