evaluate the variation in the power of a known periodicity
Show older comments
Consider the following example:
t = 1/24:1/24:365;
x = cos((2*pi)/12*t)+randn(size(t));
% if you have the signal processing toolbox
[Pxx,F] = periodogram(x,rectwin(length(x)),length(x),1);
plot(F,10*log10(Pxx)); xlabel('Cycles/hour');
ylabel('dB/(Cycles/hour');
This demonstrates the dominant periodicity in the data set. However, if I have a time series for one year worth of data, similar to that shown above, is it possible to look at how a specific frequency changes through time. For example, the time series above shows the hourly variation of a given variable throughout the year. Therefore if we knew that the dominant period was driven by a diurnal cycle (i.e. once per day) then we would know that the dominant periodicity would be 1/24. So, if we know the dominant periodicity to be 1/24, is it possible to see how the power of this specific periodicity changes in time (i.e. throughout the year)?
4 Comments
Walter Roberson
on 10 Aug 2012
Edited: Walter Roberson
on 10 Aug 2012
Related to http://www.mathworks.co.uk/matlabcentral/answers/45637-analyse-specific-frequencies-in-a-time-series (I'm not sure what the difference is?)
Star Strider
on 10 Aug 2012
Edited: Star Strider
on 10 Aug 2012
The power spectral density should give you the power of the circadian variation as well as that of the annual variation at the appropriate frequencies. The periodogram code you provided, when I used the data I calculated earlier, shows a peak at what in your plot is about 2.4 cycles/hour. One cycle/24 hours is 0.0417 cycles/hour. The predominant annual frequency would be 1.14E-4 cycles/hour.
And thank you, Walter.
Richard
on 13 Aug 2012
Star Strider
on 13 Aug 2012
Edited: Star Strider
on 13 Aug 2012
I'm sorry, but I still don't understand what you mean by ‘power of the frequency’. ‘Power’ (or energy) is generally considered to be the square of the amplitude, and this is conserved by the Fourier transform (periodogram or spectrogram) of the squared amplitude ( i.e. the power in a given period remains the same).
You are already (and appropriately with your data) assuming a circadian periodicity. If you want to know the maxima and minima on each day and when they occur, I thought I already provided that ability. You can get the amplitude and time variations from the DayMax and DayMin matrices, then do the requisite maths on them to get the information on the differences between the maxima and minima and the differences in the times they occur, if you want those data.
You can certainly do Fourier transforms on the individual columns of the DayT matrix (or their individual squared amplitudes if you prefer), but it's not obvious to me what information you would get from that. (Then again I'm not a hydrologist or a climatologist, so I'm quite likely missing something.) Those data are already rectangularly-windowed with a 24-hour window, so you shouldn't need to do anything else with them. (The rectangular window effect can produce relatively high-amplitude sidelobes due to the abrupt transitions, so bear that in mind when you interpret your data.)
Accepted Answer
More Answers (0)
Categories
Find more on Time-Frequency 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!