The correlation function shows how similar two signals are, and for how long they remain similar when one is shifted with respect to the other.
Correlating a signal with itself is called autocorrelation. Different sorts of signal have distinctly different autocorrelation functions. We can use these differences to tell signals apart.
The diagram shows three different types of signal:
- Random noise is defined to be uncorrelated - this means it is only similar to itself with no shift at all. Even a shift of one sample either way means there is no correlation at all, so the correlation function of random noise with itself is a single sharp spike at shift zero.
- Periodic signals go in and out of phase as one is shifted with respect to the other. So they will show strong correlation at any shift where the peaks coincide. The autocorrelation function of a periodic signal is itself a periodic signal, with a period the same as that of the original signal.
- Short signals can only be similar to themselves for small values of shift, so their autocorrelation functions are short.
The three types of signal have easily recognisable autocorrelation functions.