I'm trying to identify the frequencies in my time history samples, and I can see a frequency in the time history, but can't see it in its Fourier transform. Here it is :
the sample data:
dt = 0.01;(*0.01 second per sample*)
ls={7.18384,9.08503,7.13301,9.03243,7.23692,8.82911,7.48153,8.50053,7.8291,8.09453,8.22514,7.67123,8.60473,7.29656,8.90489,7.02926,9.07228,6.91356,9.07469,6.96968,8.90404,7.19156,8.58122,7.54573,8.15062,7.97689,7.67665,8.41549,7.23096,8.78898,6.88426,9.03305,6.69172,9.10231,6.68698,8.97821,6.87272,8.6724,7.22283,8.22643,7.68225,7.70488,8.17857,7.18711,8.62957,6.75303,8.9597,6.47266,9.10889,6.39174,9.04594,6.52704,8.77139,6.85901,8.32088,7.33824,7.7584,7.88776,7.16829,8.41967,6.64141,8.84366,6.2609,9.0868,6.08919,9.10045,6.15615,8.87392,6.45525,8.43236,6.94108,7.83828,7.53853,7.17843,8.15053,6.55427,8.67686,6.06288,9.02603,5.78403,9.13458,5.76455,8.97352,6.01177,8.55858,6.48966,7.94428,7.12458,7.22101,7.8152,6.49678,8.4485,5.88528,8.91739,5.48272,9.13786,5.35709,9.06375,5.53107,8.69409,5.98259,8.07629,6.64157,7.29757,7.40537,6.47512,8.14882,5.73434,8.74894,5.19349,9.09985,4.93916,9.13459,5.01757,8.83338,5.41929,8.23096,6.08644,7.41062,6.91285,6.49317,7.76769,5.61863,8.50777,4.92325,9.00806,4.51966,9.1747,4.47503,8.96814,4.80297,8.40434,5.455,7.55984,6.33198,6.55581,7.29271,5.54458,8.18165,4.6821,8.847,4.10633,9.17184,3.91187,9.08704,4.13559,8.59066,4.74753,7.74309,5.65489,6.66645,6.71462,5.51928,7.75486,4.47976,8.6024,3.70977,9.10911,3.33653,9.17844,3.42289,8.77952,3.96388,7.95795,4.87716,6.82561,6.02223,5.55073,7.21349,4.32513,8.25592,3.34263,8.96977,2.75835,9.22521,2.67336,8.96055,3.10556,8.19668,3.99626,7.03496,5.20525,5.6427,6.54315,4.23034,7.78851,3.01522,8.73391,2.19205,9.20894,1.89461,9.11841,2.17992,8.45091,3.00859,7.29079,4.25733,5.80068,5.727,4.20335,7.18224,2.74288,8.37806,1.64996,9.10926,1.10137,9.23383,1.19232,8.70843,1.91736,7.5871,3.1692,6.02681,4.75307,4.25335,6.41448,2.53923,7.8804,1.14864,8.89922,0.307694,9.28655,0.154088,8.95041,0.725381,7.91675,1.93765,6.31868,3.60713,4.38985,5.46625,2.41628,7.21338,0.707136,8.55287,-0.470752,9.2482,-0.919297,9.15831,-0.561298,8.26386,0.562301,6.67532,2.27715,4.61492,4.31759,2.39053,6.34975,0.340327,8.03907,-1.21045,9.08947,-2.01384,9.30485,-1.9283,8.61208,-0.958302,7.08603,0.756819,4.93354,2.94639,2.47094,5.26353,0.0706556,7.32281,-1.89254,8.77714,-3.10504,9.358,-3.36416,8.93794,-2.61487,7.53742,-0.963082,5.34406,1.33854,2.66827,3.9233,-0.0836731,6.37173,-2.49189,8.2693,-4.17005,9.28401,-4.84777,9.20861,-4.3986,8.01348,-2.88195,5.83756,-0.523299,2.99222,2.304,-0.10749,5.14496,-2.98081,7.52648,-5.18357,9.04878,-6.32959,9.4304,-6.18952,8.56459,-4.73628,6.56344,-2.13332,3.70414,1.31944,0.401559,5.19872,-2.85418,9.0291,-5.5357,12.3241,-7.17454,14.6869,-7.4465,15.8834,-6.29832,15.9227,-3.97558,15.044,-0.986409,13.6463,2.07958,12.1451,4.72194,10.8576,6.6742,9.93404,7.90659,9.37837,8.56294,9.10124,8.84598,8.99267,8.93815,8.96116,8.95636,8.95544,8.95677,8.95391,8.95455,8.95365,8.95341,8.95371,8.95173,8.95356,8.95088,8.95381,8.9499,8.95321,8.94933,8.95282,8.94887,8.9513,8.94838,8.95018,8.94857,8.94853};
Fourier transform function:
DFT[A_, ht_] := RotateRight[ht/Sqrt[2 \[Pi]]*Fourier[RotateLeft[A, Length[A]/2 - 1],
FourierParameters -> {1, 1}], Length[A]/2 - 1];
(*shift the zero frequency to the center*)
plot the time history:
ListPlot[ls, PlotRange -> All, Joined -> True, DataRange -> {0, dt*Length[ls]}, Axes -> False, Frame -> True]
We can see there are a fast frequency with period about 0.02s and a slow frequency with period about 1.5s, but in the Fourier transform we only see the fast frequency(except the zero frequency)
ListPlot[Abs[DFT[ls, dt]]^2, PlotRange -> All, Joined -> True, DataRange -> {- 1/dt/2, 1/dt/2}, Axes -> False, Frame -> True]
So where is the low frequency?
Update
As Simon and bill suggest, the slow oscillation is the beating of two close high frequencies. Since the Fourier transform resolution is 2Pi/(N*dt), where N is the number of sample points, so if I increase the resolution by increasing the number of sample points I should see two separated peaks. So I tried to increase the number of sample points, but I can only see one peak all the time. Here is how I did it:
w = 5.0; dt = 0.66125;
f[x_] := Sin[w x]
ls = Table[f[x], {x, dt, 200 dt, dt}];
we see beating in the plot
ListPlot[ls, PlotRange -> All, Joined -> True, DataRange -> {dt, 200 dt}]
but one on peak in the Fourier transform:
ListPlot[Abs[DFT[ls, dt]]^2, PlotRange -> All, Joined -> True, DataRange -> {-1/dt/2, 1/dt/2}, Axes -> False, Frame -> True]
If we increase the number of sample points, we still only see one peak:
ls2 = Table[f[x], {x, dt, 800 dt, dt}];
ListPlot[Abs[DFT[ls2, dt]]^2, PlotRange -> All, Joined -> True, DataRange -> {-1/dt/2, 1/dt/2}, Axes -> False, Frame -> True]
So where is the problem?
Periodogram[ls, SampleRate -> 100]
. The 0 Hz spike has distinct shoulders, but the 0.66 Hz signal cannot be disambiguated. This suggests some windowing is needed, but playing with it, I can't seem to pull it out, either. $\endgroup$ft = Fourier[ls]; ft[[;; 150]] *= 0; ft[[-150 ;;]] *= 0; ListLinePlot[Re[InverseFourier[ft]]]
$\endgroup$fbeat = 2(w/(2Pi)-1/(2dt)) = 0.079
$\endgroup$