# Cross correlation

In signal analysis , the cross-correlation function is used to describe the correlation between two signals and when there are different time shifts between the two signals. Cross stands for the case of the function: ${\ displaystyle R_ {xy} (\ tau)}$ ${\ displaystyle x (t)}$ ${\ displaystyle y (t)}$ ${\ displaystyle \ tau}$ ${\ displaystyle x \ neq y}$ ${\ displaystyle R_ {xy} (t_ {1}, t_ {2}) = E \ {{\ textbf {X}} (t_ {1}) \ cdot {\ textbf {Y}} (t_ {2}) \}}$ If it is a weakly stationary process , the correlation function is no longer on the choice of the times is and , but only on their difference dependent. ${\ displaystyle t_ {1}}$ ${\ displaystyle t_ {2}}$ ${\ displaystyle \ tau = t_ {2} -t_ {1}}$ ## definition

The following applies to energy signals :

${\ displaystyle R_ {xy} (\ tau) = (x \ star y) (\ tau) = (x ^ {*} (- t) * y (t)) (\ tau) = \ int _ {- \ infty} ^ {\ infty} x ^ {*} (t) \, y (t + \ tau) \, \ mathrm {d} t}$ and for power signals :

${\ displaystyle R_ {xy} (\ tau) = (x \ star y) (\ tau) = (x ^ {*} (- t) * y (t)) (\ tau) = \ lim _ {T \ to \ infty} {\ frac {1} {2T}} \ int _ {- T} ^ {T} x ^ {*} (t) \, y (t + \ tau) \, \ mathrm {d} t}$ with as the complex conjugate function of , the operator symbol as the shorthand notation of the cross-correlation and as that of the convolution operation . ${\ displaystyle x ^ {*}}$ ${\ displaystyle x}$ ${\ displaystyle \ star}$ ${\ displaystyle *}$ Analogously, the discrete cross-correlation, which plays an essential role in the field of discrete signal processing, with the sequence and a shift is defined as: ${\ displaystyle [m]}$ ${\ displaystyle n}$ ${\ displaystyle R_ {xy} [n]}$ = (Energy signals)${\ displaystyle (x \ star y) [n] = \ sum _ {m = - \ infty} ^ {\ infty} x ^ {*} [m] \ y [m + n]}$ ${\ displaystyle R_ {xy} [n]}$ = (Power signals)${\ displaystyle (x \ star y) [n] = \ lim _ {M \ to \ infty} {\ frac {1} {2M + 1}} \ sum _ {m = -M} ^ {M} x ^ {*} [m] \ y [m + n]}$ In digital signal processing, on the other hand, finite averaging with arguments starting at index 0 is required due to the architecture of computer registers, of which there is a pre-stressed and a non-pre-stressed version:

${\ displaystyle R_ {xy} [m]: = {\ begin {cases} \ \; \, {\ frac {1} {N- | m |}} \ sum _ {n = 0} ^ {Nmn} x [n] y [n + m] & {\ text {for}} m \ geq 0 \\\ \; \, {\ frac {1} {N- | m |}} \ sum _ {n = -m } ^ {N-1} x [n] y [n + m] & {\ text {for}} m <0 \ end {cases}}}$ (Opening version)
${\ displaystyle R_ {xy} [m]: = {\ begin {cases} \ \; \, {\ frac {1} {N}} \ sum _ {n = 0} ^ {Nmn} x [n] y [n + m] & {\ text {for}} m \ geq 0 \\\ \; \, {\ frac {1} {N}} \ sum _ {n = -m} ^ {N-1} x [n] y [n + m] & {\ text {for}} m <0 \ end {cases}}}$ (untensioned version)

Cross -correlation is closely related to cross- covariance .

## properties

For all true ${\ displaystyle \ tau}$ ${\ displaystyle R_ {xy} (\ tau) = R_ {yx} (- \ tau)}$ such as

${\ displaystyle \ left | R_ {xy} (\ tau) \ right | \ leq {\ sqrt {R_ {xx} (0) R_ {yy} (0)}} \ leq {\ frac {1} {2} } (R_ {xx} (0) + R_ {yy} (0))}$ and

${\ displaystyle \ lim \ limits _ {\ tau \ to \ pm \ infty} R_ {xy} (\ tau) = 0}$ with the autocorrelation functions and . ${\ displaystyle R_ {xx} (\ tau)}$ ${\ displaystyle R_ {yy} (\ tau)}$ She shows z. B. peaks in time shifts that correspond to the signal transit time from the measurement location of the signal to the measurement location of the signal . Differences in transit time from a signal source to both measurement locations can also be determined in this way. The cross-correlation function is therefore particularly suitable for determining transmission paths and locating sources. ${\ displaystyle x (t)}$ ${\ displaystyle y (t)}$ In terms of computation, the cross-correlation function is usually determined using the inverse Fourier transformation of the cross-power spectrum : ${\ displaystyle S_ {XY} (f)}$ ${\ displaystyle R_ {xy} (\ tau) = \ int _ {- \ infty} ^ {\ infty} S_ {XY} (f) \, e ^ {\ mathrm {i} 2 \ pi f \ tau} \ , \ mathrm {d} f}$ ### Connection with the cross covariance

Is one of the signals or zero symmetrical, i. H. their mean value over the signal is zero or , the cross-correlation is identical to the cross-covariance. Well-known representatives of the zero-symmetric functions are, for example, the sine and cosine functions. ${\ displaystyle x (t)}$ ${\ displaystyle y (t)}$ ${\ displaystyle ({\ bar {x}} (t) = 0}$ ${\ displaystyle {\ bar {y}} (t) = 0)}$ ## literature

• Bernd Girod, Rudolf Rabenstein, Alexander Stenger: Introduction to systems theory . 4th edition. Teubner, Wiesbaden 2007, ISBN 978-3-8351-0176-0 .
• Rüdiger Hoffmann: Signal analysis and recognition . Springer, ISBN 3-540-63443-6 .