How we can figure the Fast Fourier Transform of a district time history data?

8 visualizaciones (últimos 30 días)
Hello,
Actually, I have a discrite data set related to the acceleration time history response of a system for three consecutive harmonics. when I want to transform the data set from time doman to frequency domain using function of fft() in matlab, the amplitude of the each harmonics is really high since I have already tried this function for the simplest version below, however, the results are not true.
clc
close all
t = 0:0.01:10;
y = 10*sin(5*t);
plot(t,y)
f = [0:1:1000]/10;
plot(f, abs(fft(y)))
According to the form of the function 'f', the FFT graf should have an amplitude of 10, in the frequency of 5 Hz, however, the amplitude and the frequency of the graph extracted from FFT function is something different. Accordingly, when I want to transform my district data set to frequency domain, I encounter with the same issue.

Respuestas (1)

Bora Eryilmaz
Bora Eryilmaz el 15 de Dic. de 2022
Editada: Bora Eryilmaz el 20 de Dic. de 2022
Your sine function's frequency is not 5 Hz, it is 5 rad/sec. To get the frequency in Hz, multiply the argument to the sine function by 2*pi:
t = 0:0.01:10;
y = 10*sin(2*pi*5*t); % Note 2*pi.
plot(t,y)
To get the correct amplitude when using FFT, you need to scale the FFT values by N/2, where N is the number of frequency points and 2 is needed since a two-sided FFT halves the signal amplitude and distributes it at two locations:
f = [0:1:1000]/10;
N = numel(f); % Length of FFT.
plot(f, abs(fft(y))/N*2)
xlim([0 20])
  3 comentarios
Elyar Ghaffarian Dallali
Elyar Ghaffarian Dallali el 20 de Dic. de 2022
I sincerely appreciate your complete and useful response dear Bola.
It means a lot to me.
Thanks Million
Bora Eryilmaz
Bora Eryilmaz el 20 de Dic. de 2022
Please accept this as the Accepted Answer if it solved your problem so that others can locate the answer in the future.

Iniciar sesión para comentar.

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by