Borrar filtros
Borrar filtros

Calculating Fourier Series Coefficients

198 visualizaciones (últimos 30 días)
Jay Mayle
Jay Mayle el 6 de Mzo. de 2013
Respondida: Sikha ranjith kumar el 1 de Jun. de 2022
I am trying to compute the trigonometric fourier series coefficients of a periodic square wave time signal that has a value of 2 from time 0 to 3 and a value of -12 from time 3 to 6. It then repeats itself. I am trying to calculate in MATLAB the fourier series coefficients of this time signal and am having trouble on where to begin.
The equation is x(t) = a0 + sum(bk*cos(2*pi*f*k*t)+ck*sin(2*pi*f*k*t))
The sum is obviously from k=1 to k=infinity.
a0, bk, and ck are the coefficients I am trying to find. Thanks for the help.
  1 comentario
omar seraj
omar seraj el 1 de Nov. de 2021
How to plot in Fourier series given a time interval -1.5 to 2.5I need a step by step answer to this problem please

Iniciar sesión para comentar.

Respuestas (5)

Rick Rosson
Rick Rosson el 6 de Mzo. de 2013
Editada: Rick Rosson el 6 de Mzo. de 2013

Youssef  Khmou
Youssef Khmou el 6 de Mzo. de 2013
Editada: Youssef Khmou el 6 de Mzo. de 2013
hi Jay , computing a0 bk and ck is bout theory i think, anyway try :
You have first to construct the original signal "Square(t)" so as to compare it with Fourier approximation :
clear , close all;
Fs=60;
t=0:1/Fs:20-1/Fs;
y=square(t,50);
y(y>0)=2;
y(y<0)=-12;
figure, plot(t,y);
axis ([0 20 -20 10])
% Fourier Series
a0=0;
Fy=zeros(size(t));
N=10;
for n=1:2:N
Fy=Fy+(4/n*pi)*sin(2*pi*n*t/(2*pi));
end
hold on,
plot(t,Fy,'r')
legend(' Square ','Fourier Approx');
Try now to to compute an, and bn and increase the number of iterations N and conclude
You have also to adjust the amplitudes

Kamal Kaushal
Kamal Kaushal el 1 de Mzo. de 2020
clear , close all;
Fs=60;
t=0:1/Fs:20-1/Fs;
y=square(t,50);
y(y>0)=2;
y(y<0)=-12;
figure, plot(t,y);
axis ([0 20 -20 10])
% Fourier Series
a0=0;
Fy=zeros(size(t));
N=10;
for n=1:2:N
Fy=Fy+(4/n*pi)*sin(2*pi*n*t/(2*pi));
end
hold on,
plot(t,Fy,'r')
legend(' Square ','Fourier Approx');

Hemang Mehta
Hemang Mehta el 23 de Oct. de 2020
clear , close all;
Fs=60;
t=0:1/Fs:20-1/Fs;
y=square(t,50);
y(y>0)=2;
y(y<0)=-12;
figure, plot(t,y);
axis ([0 20 -20 10])
% Fourier Series
a0=0;
Fy=zeros(size(t));
N=10;
for n=1:2:N
Fy=Fy+(4/n*pi)*sin(2*pi*n*t/(2*pi));
end
hold on,
plot(t,Fy,'r')
legend(' Square ','Fourier Approx');
  2 comentarios
Aaron Vargas
Aaron Vargas el 9 de Dic. de 2020
hello , is there any chance that you can explain to me the variables and how it works ? im stuck in a homework for college
Rik
Rik el 31 de Mzo. de 2022
Comment posted as flag by Hariharan Hariharan:
need the flowof code for case study

Iniciar sesión para comentar.


Sikha ranjith kumar
Sikha ranjith kumar el 1 de Jun. de 2022
x(t)=cos(50t)

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by