フィルターのクリア

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

11 ビュー (過去 30 日間)
Elyar Ghaffarian Dallali
Elyar Ghaffarian Dallali 2022 年 12 月 14 日
編集済み: Bora Eryilmaz 2022 年 12 月 20 日
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.

回答 (1 件)

Bora Eryilmaz
Bora Eryilmaz 2022 年 12 月 15 日
編集済み: Bora Eryilmaz 2022 年 12 月 20 日
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 件のコメント
Elyar Ghaffarian Dallali
Elyar Ghaffarian Dallali 2022 年 12 月 20 日
I sincerely appreciate your complete and useful response dear Bola.
It means a lot to me.
Thanks Million
Bora Eryilmaz
Bora Eryilmaz 2022 年 12 月 20 日
Please accept this as the Accepted Answer if it solved your problem so that others can locate the answer in the future.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by