![Page 1: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/1.jpg)
UNIVERSIDAD NACIONAL
TECNOLÓGICA DEL CONO SUR DE LIMA
INGENIERÍA ELECTRÓNICA Y
TELECOMUNICACIONES
INFORME 01
DE
TELECOMUNICACIONES I
Alumno: Código:
Marvin Thomas Concha Sandoval 2009200023
2012 – II
![Page 2: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/2.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
2
GRAFICAR SERIES DE FOURIER
USANDO MATLAB
INTRODUCCIÓN.
MATLAB (abreviatura de MATrix LABoratory, "laboratorio de matrices") es un
software matemático que ofrece un entorno de desarrollo integrado (IDE) con un
lenguaje de programación propio (lenguaje M).
Entre sus prestaciones básicas se hallan: la manipulación de matrices, la
representación de datos y funciones, la implementación de algoritmos, la creación de
interfaces de usuario (GUI) y la comunicación con programas en otros lenguajes y con
otros dispositivos hardware.
![Page 3: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/3.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
3
Ejercicio 1.- Hallar la serie de Fourier de la señal rectangular:
( ) {
Solución. Sabemos que la función se expresa, según Fourier, por:
( ) ∑( )
Hallamos los términos:
∫ ( )
∫ ( )
{∫ ( )
∫ ( )
}
{ }
∫ ( )
∫ ( )
{ }
∫ ( )
∫ ( )
{ }
{
Finalmente la función queda:
( ) ∑(
)
Graficamos la función en MATLAB, usando un intervalo de [-2 , 2] con saltos de 0.01;
bv am u ar m ‘a ’ ‘a ’ p rqu ul y af a al algoritmo.
![Page 4: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/4.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
4
Código:
disp('Serie de Fourier'); N = [NUMERO DE ARMONICOS DESEADOS]; t = -2:0.01:2; sum = 0; for k = 1:2:N; b(k) = 4/(k*pi); sum = sum + b(k)*sin(k*pi*t/4); end; f = (t<0).*(-1) + (t>=0).*1; plot(t,f,'g',t,sum,'b'); grid title('Aproximacion por Series de Fourier');
Gráfica: N = 1
Gráfica: N = 5
![Page 5: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/5.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
5
Gráfica: N = 50
Gráfica: N = 100
Efecto Gibbs
![Page 6: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/6.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
6
I. REPRESENTACIÓN DE SEÑALES
1. SEÑAL SENO:
Algoritmo:
% Definimos el tiempo entre 0 y 0.25 segundos % Usamos saltos de 0.001 t = 0:0.001:0.25; y = 1*sin(5*2*pi*t); % Graficamos plot(t,y); hold on; plot(t,y,'*')
Gráfica:
2 SEÑAL ESCALÓN.
Algoritmo:
t = -10:0.01:10; f_escalon = [zeros(1,1000),ones(1,1001)];
![Page 7: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/7.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
7
plot(t,f_escalon);
Gráfica:
3. SEÑAL PULSO.
Algoritmo:
t = -10:0.01:10; f_pulso = [zeros(1,950),ones(1,101),zeros(1,950)]; plot(t,f_pulso);
Gráfica:
![Page 8: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/8.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
8
4. SEÑAL SAMPLING
Algoritmo:
t = -10:0.01:10; f_sampling = sin(t)./t; plot(t,f_sampling); f_sinc = sinc(t); plot(t,f_sinc);
Gráfica:
5. SEÑAL IMPULSO O DELTA DE DIRAC
Algoritmo:
t = -10:0.01:10; f_impulso = [zeros(1,1000),1,zeros(1,1000)]; plot(t,f_impulso);
![Page 9: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/9.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
9
Gráfica:
6. SEÑAL DIENTE DE SIERRA
Algoritmo:
t = -10:0.01:10; width = 0.10; f_sierra = sawtooth(2*pi*0.1*t,width); plot(t,f_sierra);
Gráfica:
![Page 10: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/10.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
10
7. SEÑAL TRIANGULAR
Algoritmo:
t = -10:0.01:10; f_triangular = sawtooth(2*pi*0.1*t,0.5); plot(t,f_triangular);
Gráfica:
8. SEÑAL EXPONENCIAL
Algoritmo:
t = -10:0.01:10; tau = 200e-2; f_expon = exp(-t/tau); plot(t,f_expon);
Gráfica:
![Page 11: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/11.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
11
9. SEÑAL CUADRADA
Algoritmo:
t = -10:0.01:10; duty = 50; f_cuadrada = square(2*pi*0.5*t,duty); plot(t,f_cuadrada);
Gráfica:
![Page 12: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/12.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
12
II. ANÁLISIS DE FOURIER
Ejercicio 2.- Escriba un fichero de MATLAB que proporcione los coeficientes de Fourier
de una señal cuadrada de período 0.2 s (frecuencia 5 Hz) y amplitud igual a 1 V.
Algoritmo:
clear; f = 5; T = 1/f; n = 1:10; t = 1:0.01:10; cn = 2*(cos(n*pi)-1)./(-2*j*n*pi); ct = 2*(cos(t*pi)-1)./(-2*j*t*pi); c0 = 1; subplot(2,2,1); stem(n,abs(cn)); ylabel('Magnitud de Cn'); subplot(2,2,2); plot(t,abs(ct)) ylabel('Envolvente de Cn') subplot(2,2,3); stem(n,angle(cn)); ylabel('Fase de Cn');
Gráfica: Espectro de Magnitud y su envolvente.
![Page 13: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/13.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
13
Gráfica: Espectro de fase
En base a lo anterior podemos reconstruir la función:
Algoritmo:
clear; N = 50; f = 5; T = 1/f; x = 0:0.001:0.2; c0 = 1; sum = 0; for n=1:1:N b(n) = abs((cos(n*pi)-1)./(-j*n*pi)); a(n) = angle((cos(n*pi)-1)./(-j*n*pi)); sum = sum + b(n)*cos(n*2*pi*f*x + a(n)); end plot(x,sum,'b'); title('Aproximacion por series de Fourier');
Gráfica: Para N = 5
![Page 14: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/14.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
14
Gráfica: Para N = 50
Gráfica: Para N = 200
![Page 15: Lab de tele 1 - Fourier using matlab - UNTECS](https://reader034.vdocuments.site/reader034/viewer/2022042602/5581ed8ad8b42a67508b4b01/html5/thumbnails/15.jpg)
INGENIERÍA ELECTRÓNICA Y TELECOMUNICACIONES INFORME 01 DE TELECOMUNICACIONES I (PRÁCTICA)
15
Ejercicio 3.- E r ba u f h r MATLAB para d bujar ‘ ’ armó d u a ñal
cuadrada de período 0.2 s y amplitud 1.
Algoritmo:
clear; f = 5; T = 1/f; n = 1:10; t = 0:0.01:1; for i=1:50 for k = 1:size(t,2) s(i,k) = (2*(1-cos(pi*i))/(pi*i))*sin(2*pi*i*f*t(k)); end end for k= 1:size(t,2) st(k) = sum(s(:,k)); end st(1)=st(1)+1; plot(t,st,'r'); hold on; f_cuadrada = square(2*pi*f*t,50); plot(t,f_cuadrada); xlabel('tiempo'); ylabel('amplitud');
Gráfica:
La señal roja es la aproximación mediante series de Fourier.