# Autocorrelation technique

Jump to: navigation, search

The autocorrelation technique is a method for estimating the dominating frequency in a complex signal, as well as its variance. Specifically, it calculates the first two moments of the power spectrum, namely the mean and variance. It is also known as the pulse-pair algorithm in radar theory.

The algorithm is both computationally faster and significantly more accurate compared to the Fourier transform, since the resolution is not limited by the number of samples used.

## Derivation

The autocorrelation of lag 1 can be expressed using the inverse Fourier transform of the power spectrum ${\displaystyle S(\omega )}$:

${\displaystyle R(1)={\frac {1}{2\pi }}\int _{-\pi }^{\pi }S(\omega )e^{i\,\omega }d\omega .}$

If we model the power spectrum as a single frequency ${\displaystyle S(\omega )\ {\stackrel {\mathrm {def} }{=}}\ \delta (\omega -\omega _{0})}$, this becomes:

${\displaystyle R(1)={\frac {1}{2\pi }}\int _{-\pi }^{\pi }\delta (\omega -\omega _{0})e^{i\,\omega }d\omega }$
${\displaystyle R(1)={\frac {1}{2\pi }}e^{i\,\omega _{0}}}$

where it is apparent that the phase of ${\displaystyle R(1)}$ equals the signal frequency.

## Implementation

The mean frequency is calculated based on the autocorrelation with lag one, evaluated over a signal consisting of N samples:

${\displaystyle \omega =\angle R_{N}(1)=\tan ^{-1}{\frac {im\{R_{N}(1)\}}{re\{R_{N}(1)\}}}.}$

The spectral variance is calculated as follows:

${\displaystyle var\{\omega \}={\frac {2}{N}}\left(1-{\frac {|R_{N}(1)|}{R_{N}(0)}}\right).}$