FFT of tidal data - problems identifying Mf component in MATLAB
Show older comments
I am running an FFT in MATLAB of some tidal data. I successfully pick up most of the major tidal species, however I can't seem to be able to pick up the fortnightly component (Mf), even though it is apparent in the time domain. Please see the link to the image below. Does anyone have any suggestions as to why this is?

3 Comments
David Young
on 9 Feb 2015
Is it possible to attach the actual data, or a link to it?
Donald John
on 9 Feb 2015
Donald John
on 9 Feb 2015
Accepted Answer
More Answers (3)
Youssef Khmou
on 9 Feb 2015
Edited: Youssef Khmou
on 9 Feb 2015
From the result in the second figure; you can remark that there are two frequency components. which means that there are two wave forms with different magnitudes and infinitesimal difference of frequencies, without using the data, the following simulation produces the same pattern ;
Fs=20;t=0:1/Fs:40-1/Fs;
y=sin(2*pi*4*t)+0.2*sin(2*pi*4.2*t);
plot(t,y)
figure; plot((abs(fft(y))))
basic solution consists of making the region of interest smaller, in the given example it is :
axis([100 200 0 450]);
2 Comments
Donald John
on 9 Feb 2015
Youssef Khmou
on 9 Feb 2015
Edited: Youssef Khmou
on 9 Feb 2015
how do you recognize the fortnightly frequency in the first graph? try :
spectrogram(y);
which is short term transform,
Erik S.
on 9 Feb 2015
0 votes
Hi,
Have you tried to plot the power spectral density instead? If you provide the sampling frequency you can get better insight to which frequencies you have.
You get the following graph by pwelch( NH_tide_data-mean(NH_tide_data) );

1 Comment
David Young
on 9 Feb 2015
Yes, but it makes more sense if you give the x-axis the right units - cycles/day in this case. Also, it's not clear that the smoothing implicit in Welch's method is appropriate in the case where there are well-defined sinusoids in the data - the method trades off the frequency resolution against noise, and this may not be desirable here,
qj fan
on 26 Jun 2017
Dear David Young,
i have a question. There are some daily recorded series for temperature, and show evidently seasonal trend. how can i get the main frequency and get rid of the periodic trend by fft. one way is the following algorithm:
Smoothing Filter :
1. Let the power-law noise be represented by x and the sinusoidal trend by t. Therefore the noise with the trend is given by y = x + t; with Fourier transform F (f ).
2. Let the frequency in the Fourier transform corresponding to the periodic trend occur at f = fk.
3. Replace the power at the frequency fk by a smoothing filter
|F∗(fk)| = 0.5(|F(fk−1)| + |F(fk+1)|) |F∗(f)| = |F(f)| ,f ̸= fk
Assign random phases so as to satisfy the conjugacy constraints.
4. Determine the inverse Fourier transform to obtain the filtered data yf .
because fft need sample frequency, i don't know how to solve it.
would you like to give me some suggestion.
Categories
Find more on Vibration Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!