Vous êtes sur la page 1sur 8

ESCUELA SUPERIOR POLITECNICA DE CHIMBORAZO FACULTAD DE INFORMATICA Y ELECTRONICA ESCUELA DE INGENIERIA ELECTRONICA EN CONTROL Y REDES INDUSTRIALES Alumno: Semestre:

Materia: Docente: Pal Martnez 479 Cuarto A. Anlisis de Seales Ing. Hugo Vinueza.
GRFICA DE SERIES DE FOURIER EN MATLAB 1.- ONDA CUADRADA Cdigo fuente:
% el primer armnico o frecuencia fundamental de la seal cuadrada en azul figure(1) t=0:.1:10 y=4*sin(t)/pi; subplot(3,1,1) plot(t,y) title('Frecuencia Fundamental') hold on y=(4/pi)*[sin(3*t)/3]; hold on subplot(3,1,2) plot(t,y,'g') title('Segundo Armnico') y=(4/pi)*[sin(5*t)/5]; hold on subplot(3,1,3) plot(t,y,'+') title('Tercer Armnico') %la resultante en rojo,al sumar las armonicas, de la seal cuadrada. %siga sumando hasta 10 armonicos y observe que la resultante que se aparece mas %a la seal cuadrada figure(2) %la resultante en rojo,al sumar las armonicas, de la seal cuadrada. %siga sumando hasta 10 armonicos y observe que la resultante que se aparece mas %a la seal cuadrada y=(4/pi)*[sin(t)+sin(3*t)/3+sin(5*t)/5]; subplot(2,1,1) plot(t,y,'r') title('Seal Completa') subplot(2,1,2) t=0:.1:10 y=4*sin(t)/pi; plot(t,y) hold on %el segundo armonico en verde y=(4/pi)*[sin(3*t)/3]; hold on plot(t,y,'g')

%el tercer armonico en ++++ y=(4/pi)*[sin(5*t)/5]; hold on plot(t,y,'+') y=(4/pi)*[sin(t)+sin(3*t)/3+sin(5*t)/5]; plot(t,y,'r') title('Seal Completa y Armnicos')

Capturas:

2.- ONDA TRIANGULAR Cdigo fuente:


%SERIE DE FOURIER PARA SEAL TRIANGULAR figure(1) t=0:0.1:15; subplot(4,1,1)

y=1/2-sin(t)/pi; plot(t,y,'g') title('Frecuencia Fundamental') hold on subplot(4,1,2) y=1/2-sin(2*t)/(2*pi); plot(t,y,'b') title('Segundo Armnico') hold on subplot(4,1,3) y=1/2-sin(3*t)/(3*pi); plot(t,y,'r') title('Tercer Armnico') hold on subplot(4,1,4) y=1/2-sin(4*t)/(4*pi); plot(t,y,'g') title('Cuarto Armnico') hold on figure(2) subplot(2,1,1) y=1/2-sin(t)/pi-sin(2*t)/(2*pi)-sin(3*t)/(3*pi)-sin(4*t)/(4*pi); plot(t,y,'b') title('Seal Completa') hold on subplot(2,1,2) t=0:0.1:15; y=1/2-sin(t)/pi; plot(t,y,'g') hold on y=1/2-sin(2*t)/(2*pi); plot(t,y,'b') hold on y=1/2-sin(3*t)/(3*pi); plot(t,y,'r') hold on y=1/2-sin(4*t)/(4*pi); plot(t,y,'g') hold on y=1/2-sin(t)/pi-sin(2*t)/(2*pi)-sin(3*t)/(3*pi)-sin(4*t)/(4*pi); plot(t,y,'b') title('Seal completa y armnicos');

Capturas:

3.- Funcin elegida por el estudiante: ( ) Cdigo fuente:

figure(1) t=-4:0.1:4; subplot(4,1,1) y1=(3/4)-( 2/(pi^2))*cos((pi*t)/(2)) -(1/pi)*(sin(pi*t/2)); plot(t,y1,'g') title('Frecuencia Fundamental') hold on subplot(4,1,2) y2=3/4-( 2/(pi^2))*cos((pi*t)/(2)) -(1/pi)*(sin((pi*t)/2))(1/(2*pi))*(sin(pi*t)); plot(t,y2,'b') title('Segundo Armnico') hold on subplot(4,1,3) y3=3/4-( 2/(pi^2))*cos((pi*t)/(2)) -(1/pi)*(sin((pi*t)/2))(1/(2*pi))*(sin(pi*t))-( 2/(9*pi^2))*cos((3*pi*t)/(2))(1/(3*pi))*(sin((3*pi*t)/2)); plot(t,y3,'r') title('Tercer Armnico') hold on subplot(4,1,4) y4=3/4-( 2/(pi^2))*cos((pi*t)/(2)) -(1/pi)*(sin((pi*t)/2))(1/(2*pi))*(sin(pi*t))-( 2/(9*pi^2))*cos((3*pi*t)/(2))(1/(3*pi))*(sin((3*pi*t)/2))-(1/(4*pi))*(sin(2*pi*t)); plot(t,y4,'g') title('Cuarto Armnico') hold on figure(2) subplot(2,1,1) y=y1+y2+y3+y4; plot(t,y,'b') title('Seal Completa') hold on subplot(2,1,2) t=-4:0.1:4; plot(t,y1,'g') hold on plot(t,y2,'b')

hold on plot(t,y3,'r') hold on plot(t,y4,'g') hold on plot(t,y,'b') title('Seal completa y armnicos');

Capturas:

GRFICA DE SERIES DE FOURIER EN DERIVE FUNCIN #1 ONDA CUADRADA 1.- IF(-<t<0,-1,IF(0<t<,1)) #definimos la funcin 2.- Podemos observar la siguiente grfica:

3.- Definimos el comando #1, como si fuese una funcin:

4.- Una vez definida como funcin, procedemos a obtener su Serie de Fourier, mediante el comando FOURIER(f(t),t,-,,n) en donde n es el nmero de armnicos deseados. 5.- Observemos la grfica de la serie de Fourier con 5 armnicos:

6.- Observemos la grfica de la serie de Fourier, esta vez con 20 armnicos (grfica en lnea negra):

FUNCIN #2 PARBOLA (t^2-4) 1.- IF(-<t<0,-1,IF(0<t<,1)) # definimos la funcin 2.- Podemos observar la siguiente grfica:

3.- Definimos el comando #1, como si fuese una funcin:

4.- Una vez definida como funcin, procedemos a obtener su Serie de Fourier, mediante el comando FOURIER(f(t),t,-,,n) en donde n es el nmero de armnicos deseados. 5.- Observemos la grfica de la serie de Fourier con 5 armnicos:

6.- Observemos la grfica de la serie de Fourier, esta vez con 25 armnicos (grfica en lnea negra):

Vous aimerez peut-être aussi