Autocorrelation Function

Theoretical Introduction

Correlation Functions are useful mathematical tools adopted in many fields of science, from engineering to physics and chemistry. Cross-Correlation function is often defined as a sliding inner (dot) product and it represents the measure of similarity of two signals as a function of a shift applied to one of them:

(1)   \begin{equation*}  \left[ k\star  l \right] \left( \tau \right) \equiv \int _{ -\infty }^{ +\infty }{ { k }^{ * }\left( t \right) l\left( t+\tau \right) dt } \end{equation*}

where k and l are two general non-discrete functions without discontinuity, k^* is the complex conjugate of k and \tau is the lag (time delay for signal analysis). This representation is closely related to the convolution theorem by the following relationship:

(2)   \begin{equation*}  k\left( t \right) \star  l\left( t \right) \equiv { k }^{ * }\left( -t \right) \ast l\left( t \right) \end{equation*}

In our case the signal must be compared with itself to find periodic patterns or anomalous high “similarity” degree within a time interval. To fulfill our purpose we can use Autocorrelation Function (ACF) wich is a simply cross-correlation of a signal with it self (k\left( t \right) =l\left( t \right)). Next equation define ACF that results from a simple revaluation of equation number 1:

(3)   \begin{equation*}  \left[ k\star  k \right] \left( \tau \right) \equiv \int _{ -\infty }^{ +\infty }{ { k }^{ * }\left( t \right) k\left( t+\tau \right) dt } \end{equation*}

Within a discrete data set composed by Y(t) records we can easily calculate autocorrelation from:

(4)   \begin{equation*}  { \rho }_{ \tau }=\frac { \sum _{ i=1 }^{ N-\tau }{ \left( { Y }_{ i }-\bar { Y } \right) \left( { Y }_{ i+\tau }-\bar { Y } \right) } }{ \sum _{ i=1 }^{ N }{ { \left( { Y }_{ i }-\bar { Y } \right) }^{ 2 } } } \end{equation*}

where { Y }_{ i+\tau } is a lagged data by \tau of { Y }_{ i } and \bar { Y } is a average value of the original data set. Entire denominator is used to keep the normalization condition, indeed { \rho }_{ \tau } can assume a value between -1 (perfect anticorrelation) and +1 (perfect correlation). A complete correlation can be only achieved with a perfect overlap of the analyzed function with it self; the simple way to verify that is when \tau=0.


Example 1: STANAG 4285

The first example will be a NATO standard known as STANAG 4285. You can download a .wav sample from: HERE. We start to collect some informations about the structure of this signal: a good starting point is the official declassified NATO document dated 1989. The main frame structure can be found at Annex A-3/5 with a graphical view at Annex A-7, also reported below:

  • 1 x 80 bits of synchronisation pattern
  • 4 x 32 bits of data
  • 3 x 16 bits of reference

Therefore, a full sequence will be composed as the sum of all symbols reported above: 256 symbols recursively transmitted at the ratio of 2400 bauds means a redundancy of 106.66 ms.
To analyze an unknown signal I strongly recommend Signal Analyzer (SA). SA is actually one of the most valuable and priceless software available by Sergey Makarov (Макаров Сергей Михайлович, sadly passed away on 29 May 2012) and it used to perform several test on data sample coded as .wav or .mp3 file. The signal waterfall is reported below:


When an Autocorrelation function is applied on selected data frame (see above), the result shows a clear recursive pattern with a gap of 106.244 ms between every peak as expected. An ACF refinement can be done into WaveForm windows where we can also notice an identical structure as reported by the specifications:



1 – Synchronisation pattern is composed by 2400*33.013E-3=79.2 (80) symbols
2 – Data group contain 2400*13.348E-3=32.0 (32) symbols
3 – Reference sequence is formed by 2400*6.674E-3=16.02 (16) symbols

Leave a Reply

Your email address will not be published.