ECE-S352-701 Introduction to Digital Signal Processing Lecture 3C Properties of Autocorrelation and Correlation Assuming we have two sequences x(n) and y(n) from which we form a linear combination: c(n) = ax(n) + by(n-l) a, b are arbitrary constants, l is some arbitrary shift Recall that the energy of a signal is: E x(n) 2 finite or infinite value n = - if 0 < E < then x(n) is an energy signal E x is the energy of signal x(n) Computing the energy of c(n) in expansion form yields: E c(n) 2 = [ax(n) + by(n-l) ] 2 = n = - n = - a 2 x 2 (n) + n = - b 2 y 2 (n-l) + n = - 2ab x(n)y(n-l) n = - the first two terms are easily identified as: a 2 r xx (0) and b 2 r yy (0) from the definition (repeated below), with l = 0. r xx (l) = x(n)x(n-l) l = 0, ±1, ±2, n= - Thus r xx (0) = E x and r yy (0) = E y the energies of x(n) and y(n) respectively. ECE-S352-701 DSP 1 of 6 July 9, 2001
Now the complete expression: E c = a 2 r xx (0) + b 2 r yy (0) + 2abr xy (l) must be greater than or equal to zero. a 2 r xx (0) + b 2 r yy (0) + 2abr xy (l) 0 With the assumption that b 0 we may write: (a/b) 2 r xx (0) + r yy (0) + 2(a/b)r xy (l) 0 Now viewing this as a quadratic in the variable (a/b), in order for a nonnegative answer the discriminant must be non-positive which yields the following relationships: r xy (l) [r xx (0) r yy (0)] 1/2 = [E x E y ] 1/2 This places an upper bound on cross correlation in terms of the energy of the two signals for the case where y(n) = x(n) r xx (l) r xx (0) = E x we see that the value l=0 corresponds to the maximum value of the autocorrelation function (which makes perfect sense) Normalizing correlation Scaling does not change the shape of the autocorrelation or crosscorrelation sequences hence we may normalize them producing values in the closed interval [-1, 1] as follows: ρ xx (l) = r xx (l) / r xx (0) ρ xy (l) = r xy (l) / [r xx (0)r yy (0)] 1/2 normalized autocorrelation normalized crosscorrelation Convolution Relationship r xy (l) = x(n) * y(-n) where n = l ECE-S352 DSP 2 of 6
Fold and symmetry relationship r xy (l) = r yx (-l) previously shown For the case of autocorrelation: r xx (l) = r xx (-l) which shows that autocorrelation is an even function and we only need to compute r xx (l) for l>=0 Periodic sequences If x(n) and y(n) are two power signals each with period N, the averages over the infinite interval are the same as over a single period and one may write: N-1 r xy (l) =1/N x(n)y(n-l) think of 1/N as a normalization factor N-1 r xx (l) =1/N x(n)x(n-l) Here the correlation sequences are also periodic with period N. One of the main uses of cross correlation is to identify periodicities in an observer signal generally corrupted by noise. where y(n) = x(n) + w(n) y(n) is the observed signal x(n) is the actual signal and has unknown period N w(n) is a random additive noise or interference. We observe M samples of y(n) with the constraints M>>N 0<=n<= ECE-S352 DSP 3 of 6
The autocorrelation of y(n) is: r yy (l) = 1/M y(n)y(n-l) r yy (l) = 1/M [x(n)+w(n)][x(n-l)+w(n-l)] = 1/M [x(n)x(n-l)] + ECE-S352 DSP 4 of 6 1/M [x(n)w(n-l) + w(n)x(n-l)] + 1/M [w(n)w(n-l)] Or more compactly: r yy (l) = r xx (l) + r xw (l) + r wx (l) + r ww (l) The cross correlations between the signal x(n) and the interference w(n) are expected to be small since x(n) and w(n) should be unrelated. The autocorrelation of the noise w(n) will have a peak at zero but should rapidly decay to zero. Hence we are left with r yy (l) looking like the autocorrelation of x(n) which should show peaks at 0, N, 2N etc. The caveats here are: (1) that the peak at zero for r yy (l) will be larger due to the autocorrelation of w(n); and (2)since we are using a finite amount of data (M) the values of the peaks will reduce as we move further from 0 due to the inclusion of zeros in the product terms. However we should clearly be able to determine the unknown period N. Look at example 2.6.3 in the text for a good example with different SNR.
Input-Output Correlation Sequences x(n) h(n) y(n) For the above system r xx (l) is known as well as the impulse response h(n) and the corresponding output y(n). r yx (l) is given as: y(n) = h(n)*x(n) = x(n)* h(n) r yx (l) = y(l)*x(-l) from conv/corr definition r yx (l) = [h(l)*x(l)]*x(-l) = h(l)*[x(l)*x(-l)] r yx (l) =h(l) * r xx (l) The cross correlation between the input and output is the convolution of the impulse response with the autocorrelation of the input sequence! (Note this approach is used in network and modal analyzers to find transfer functions!!!) Alternatively r xx (l) h(n) we may think of the cross correlation to be the output of a LTI system when the input is the autocorrelation of x(n). Now let use consider the ac of the output: r yy (l) = y(l) * y(-l) r yy (l) = [h(l)*x(l)] * [h(-l)*x(-l)] r yy (l) = [h(l)*h(-l)] * [x(l)*x(-l)] r yy (l) = r hh (l) * r xx (l) ECE-S352 DSP 5 of 6 r yx (l)
r hh (l) exists if the system is stable, and this means that the type of signal which the input signal is (power or energy) does not change in the output. Finally r yy (0) = r hh (k)r xx (k) n = - which is the energy or power of the output signal in terms of autocorrelations. ECE-S352 DSP 6 of 6