필터 지우기
필터 지우기

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

조회 수: 11 (최근 30일)
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 CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by