필터 지우기
필터 지우기

How to use FFT for time series data

조회 수: 68 (최근 30일)
Matt Thomas
Matt Thomas 2023년 8월 14일
댓글: Matt Thomas 2023년 8월 15일
Thank you all who helped to answer my first question. Now im on to my second question:
using an open source software called openFAST, i have calculated loads over 300 seconds in Kn. The graph below is what it looks like. i use the following code to produce the image
%% Run this command first
%% Read a binary output file
% Read file
outbfile = '5MW_Land_DLL_WTurb.outb';
[Channels, ChanName, ChanUnit, FileID, DescStr] = ReadFASTbinary(outbfile);
time = Channels(:,1);
%%CHange the plot number to reflect the parameter in channel names matrix generated from above command.
% Plot Channel 34
iChan=29
figure()
plot(time, Channels(:,iChan))
xlabel('Time (s)')
ylabel([ChanName(iChan) ChanUnit(iChan)])
I have very little to know knowledge of programming. The above code is example code i found in a user guide.
What i would like to do now is FFT so that i can find the peak frequency of this data. However, i do not know how to do that in matlab or the correct syntax.
thanks for all the help and continued help.
  댓글 수: 2
KSSV
KSSV 2023년 8월 14일
REad the documentation of fft. It is clearly explained.
Matt Thomas
Matt Thomas 2023년 8월 14일
i have read some of it but that is with basic varible name and stuff. the matlab thing i am using is not basic. I have tried
y=FFT((time, Channels(:,iChan)))
and i get errors back.
i have tried y=fft(iChan) and it gives me the number 29 which is the channel name of the time series im looking at.
i do not know anything about syntax or programming to know hwo to setup the syntax at all. Im trying, but its becomming a failure every step of the way to say the least haha.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2023년 8월 14일
if you have regular times, then
y = fft(Channels(:,iChan));
and see the first example for fft() for code that can calculate appropriate frequency bins.
If you do not have the frequency information but you do have regular time slots then frequency is Fs = 1/mean(diff(time))
If you do not have regular times then see nufft
  댓글 수: 4
Walter Roberson
Walter Roberson 2023년 8월 14일
편집: Walter Roberson 2023년 8월 14일
Your plot lots like it might end at time 300 and you have 48000 samples. If so then
format long g
300/48000
ans =
0.00625
format short
ans
ans = 0.0063
So perhaps your real sample time is 0.00625 but the displaying round it off to 0.0063 ?
Yes, you have 160 samples per second. That does not mean that the wave shape is the same frequency.
Imagine that you had a 40 Hz sine wave, but you sampled it 4 times during each cycle, then the sampling rate would be 160 Hz even though the wave is only 40 Hz.
In the field of signal transmission, if you can sample a wave much faster than the nominal signal frequency, then you have the opportunity to overlay modifications to the basic wave, and so get multiple bits per "symbol". This is an important signalling mechanism in practice.
Matt Thomas
Matt Thomas 2023년 8월 15일
thanks for this information. i am actualyl writing anpother post on FFT specifically so i dont keep using this area haha. I think i understand more now than i did earlier haha. I know of FFT but have never used it. i have used laplace alot for linear systems but not FFT

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vibration Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by