# Determining the point in a temporal signal when a periodic behavior begins to occur

I'm a newcomer to digital signal processing, so I'm looking for some general advice and direction on this problem I have. I have a signal like that shown below. Starting around x=40000, you can see a signal which has a periodicity of about 1 day (you can't tell it's 1 day from the figure), although there is various noise and other behavior along with it. Before this point, this behavior does not really occur (the process giving rise to the prior behavior has not yet started). What I'd like to do is determine this starting point, not visually, but from a computational approach.

To look into this further, I computed the FFT of the above signal, and then computed its power spectrum as $FT(signal)*FT^{*}(signal)$. As you can see in the power spectrum below, the dominant contribution occurs at a frequency corresponding to 1 day. From this point I thought perhaps I could compute some measure of "purity" of this signal having this dominant mode, and by varying the starting point of the initial signal to process (by simply dropping the points at the beginning one by one and computing this "purity") that I might be able to detect when this periodic signal starts (the assumption being that once I trim off the part of the signal before this process begins that I will achieve maximal "purity").

However, there must be a better way of accomplishing this feat, and I also have not yet determined the best way to compute the power "purity" either. For those who know more on this topic, how would you approach it? Thanks in advance for any directions that you could point me.

• You probably want some kind of spectrogram: en.wikipedia.org/wiki/Time%E2%80%93frequency_representation. There is likely to be an implementation in your language of choice. Presumably you could set a threshold for the power at your target frequency and find the time at which the threshold is exceeded. Feb 26 '15 at 5:27
• Thanks for your suggestion. I'll try out looking at the spectrogram and see if it seems to tell me what I want. Feb 27 '15 at 23:06