Autocorrelation (short ACF, autocorrelation function) is a cross-correlation of a signal with itself. By correlating a signal with itself, repetitive patterns will stand out and make it much easier to see. The (discrete) autocorrelation of a signal x is defined by the following simple equation.

ac_formulaThe entire signal x is shifted by an offset j and then multiplied by the original signal. This is repeated for every sample in the discrete signal. R[0] is basically the energy of the signal and therefore the maximum of the ACF. R[1] is the correlation of the signal with itself shifted by one sample — you get the idea. If the signal has a significant enough self-similarity, the ACF will show this relation. In the case of a suspected periodicity the signal will repeat itself after each period. All we have to do now is run the autocorrelation and check for maxima in the result. If the maxima are within a certain delta of your suspected periodicity, you were right!

Advertisements