0% found this document useful (0 votes)
39 views14 pages

Lab 2

This document discusses Fourier series representations of various signal types including step signals, pulse signals, sampling signals, impulse signals, sawtooth signals, triangle signals, square signals, and exponential signals. For each signal type, the document provides MATLAB code to generate plots showing the signal approximation using 1, 2, 3, or more harmonics in the Fourier series. The plots generated by the code are not included.

Uploaded by

Aarom Rojas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views14 pages

Lab 2

This document discusses Fourier series representations of various signal types including step signals, pulse signals, sampling signals, impulse signals, sawtooth signals, triangle signals, square signals, and exponential signals. For each signal type, the document provides MATLAB code to generate plots showing the signal approximation using 1, 2, 3, or more harmonics in the Fourier series. The plots generated by the code are not included.

Uploaded by

Aarom Rojas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

UNIVERSIDAD NACIONAL DEL CALLAO

Facultad de Ingeniería Eléctrica y Electrónica


Escuela Profesional de Ingeniería Electrónica

Telecomunicaciones I 91G
LABORATORIO N°2
Integrantes:

- Enriquez Caballero Edwin Miler


- Rojas Arroyo Kalib Aarom
- Soto Contreras Chamascota Ines
- Taboada Gambini William Abel

Docente: Hinojosa Sánchez Raúl Sixto

CALLAO, PERÚ
2019 – B
SERIES DE FOURIER PARA SEÑALES ESPECIALES

1. SEÑAL ESCALÓN
MATLAB:
% Ejemplo de señal escalon
clear all, clf, clc;
t=-1:0.01:1;
y=(1/2)+(2/pi)*sin(pi*t);
subplot(2,2,1);
plot(t,y);
title('Aprox 1 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y1=(1/2)+(2/pi)*sin(pi*t)+(2/(3*pi))*sin(3*pi*t);
subplot(2,2,2);
plot(t,y1);
title('Aprox 2 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y2=y1+(2/(5*pi))*sin(5*pi*t);
subplot(2,2,3);
plot(t,y2);
title('Aprox 3 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y3=y2+(2/(7*pi))*sin(7*pi*t);
subplot(2,2,4);
plot(t,y3);
title('Aprox 3 armónica');
ylabel('f(t)');
xlabel('t');
grid on;
2. SEÑAL PULSO
MATLAB:
% Ejemplo de señal pulso
clear all, clf, clc;
t=-1:0.01:1;
y=(1/2)+(2/pi)*cos(pi*t);
subplot(2,2,1);
plot(t,y);
title('Aprox 1 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y1=y-(2/(3*pi))*cos(3*pi*t);
subplot(2,2,2);
plot(t,y1);
title('Aprox 2 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y2=y1+(2/(5*pi))*cos(5*pi*t);
subplot(2,2,3);
plot(t,y2);
title('Aprox 3 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y3=y2-(2/(7*pi))*cos(7*pi*t);
subplot(2,2,4);
plot(t,y3);
title('Aprox 4 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

3. SEÑAL SAMPLING
MATLAB:
% Ejemplo de señal sampling
clear all, clf, clc;
t=-1:0.01:1;
y=(1/2)+cos(pi*t);
subplot(2,2,1);
plot(t,y);
title('Aprox 1 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y1=y+cos(2*pi*t);
subplot(2,2,2);
plot(t,y1);
title('Aprox 2 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y2=y1+cos(3*pi*t);
subplot(2,2,3);
plot(t,y2);
title('Aprox 3 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y3=y2+cos(4*pi*t);
subplot(2,2,4);
plot(t,y3);
title('Aprox 4 armónica');
ylabel('f(t)');
xlabel('t');
grid on;
4. SEÑAL IMPULSO
MATLAB:
% Ejemplo de señal impulso
clear all, clf, clc;
t=-1:0.01:1;
y=(1/2)+cos(20*pi*t);
subplot(3,3,1);
plot(t,y);
title('Aprox 1 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y1=y+cos(40*pi*t);
subplot(3,3,2);
plot(t,y1);
title('Aprox 2 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y2=y1+cos(60*pi*t);
subplot(3,3,3);
plot(t,y2);
title('Aprox 3 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y3=y2+cos(80*pi*t);
subplot(3,3,4);
plot(t,y3);
title('Aprox 4 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y4=y3+cos(100*pi*t);
subplot(3,3,5);
plot(t,y4);
title('Aprox 4 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y5=y4+cos(120*pi*t);
subplot(3,3,5);
plot(t,y5);
title('Aprox 5 armónica');
ylabel('f(t)');
xlabel('t');
grid on;
y6=y5+cos(140*pi*t);
subplot(3,3,6);
plot(t,y6);
title('Aprox 6 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y7=y6+cos(160*pi*t);
subplot(3,3,7);
plot(t,y7);
title('Aprox 7 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y8=y7+cos(180*pi*t);
subplot(3,3,8);
plot(t,y8);
title('Aprox 8 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y9=y8+cos(200*pi*t);
subplot(3,3,9);
plot(t,y9);
title('Aprox 9 armónica');
ylabel('f(t)');
xlabel('t');
grid on;
5. SEÑAL DIENTE SIERRA
MATLAB:
function [ D_sierra ] = sierra( n )
D_sierra=0;
t=0:pi/99:10;

for i = 1:n
k = (2*((-1)^i))/i ;
D_sierra = D_sierra + k*(sin(i*t));

end

plot(t,D_sierra)
grid on

end

Armónica 1:

Armónica 2:
Armónica 3:

Armónica 4:

Armónica 20:
6. SEÑAL TRIÁNGULO
MATLAB
function [ S_triangulo ] = triangulo( n )
S_triangulo=0;
t=0:pi/99:10;

for i = 1:n
k = (2*i)-1 ;
S_triangulo = S_triangulo + ((4/pi)*((cos(k*t)))/(k^2));

end
S_triangulo = (pi/2)- S_triangulo;
plot(t,S_triangulo)
grid on

end

Armónica 1:

Armónica 2:
Armónica 3:

Armónica 4:

7.- SEÑAL CUADRADA


MATLAB.
% Ejemplo de señal cuadrada
clear all, clf, clc;
t=0:pi/99:2*pi;
y=(4/pi)*(sin(t));
subplot(2,2,1);
plot(t,y);
title('Aprox 1 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y1=y+(4/pi)*((1/3)*sin(3*t));
subplot(2,2,2);
plot(t,y1);
title('Aprox 2 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y2=y1+(4/pi)*((1/5)*sin(5*t));
subplot(2,2,3);
plot(t,y2);
title('Aprox 3 armónica');
ylabel('f(t)');
xlabel('t');
grid on;

y3=y2+(4/pi)*((1/7)*sin(7*t));
subplot(2,2,4);
plot(t,y3);
title('Aprox 4 armónica');
ylabel('f(t)');
xlabel('t');
grid on;
8. - SEÑAL EXPONENCIAL:
MATLAB
t=-0:pi/99:pi;
x=exp(-2*t).*sin(2*pi*3*t);
figure(1);
plot(t,x);
title('x(t)=exp(-2t)*sin(2*pi*200*t)');
xlabel('tiempo(t)');
ylabel('x(t)');
Xt=fft(x);
X=fftshift(Xt);
Xm=abs(X);
Xf=unwrap(angle(X))*180/pi;
delta_t=t(2)-t(1);
f=((1:length(t))-
ceil(length(t)/2))/length(t)/delta_t;
figure(2);
subplot(2,1,1);
plot(f,Xm,'r');
zoom;
title('Modulo de transformada de fourier');
xlabel('frecuencia(Hz)');
ylabel('X(jw)');
subplot(2,1,2);
plot(f,Xf,'r');
zoom;
title('fasede la transformada de Fourierde x(t)');
xlabel('frecuecia(Hz)');
ylabel('faseX(jw)');
xrec=ifft(Xt);
figure(3);
plot(t,xrec);
title('Transformada inversa')
xlabel('tiempo(t)');
ylabel('xrec(t)');
Graficas:

You might also like