Re: Cross correlation in signal analysis
- From: kevinjmcgee@xxxxxxxxxxxx
- Date: Sun, 20 Apr 2008 00:27:06 -0700 (PDT)
On Apr 18, 3:16 pm, brob...@xxxxxxxxx wrote:
Hello,
I'm trying to gain understanding of cross correlation practical use.
My textbook (among others) define auto and cross correlation and
states they are both widely used in signal processing and detecting
signals with noise. So, I simply want to learn how to use it
effectively.
I made simple script in MATLAB:
t = 0:0.1:10; %time
x = 2*sin(t);
plot(x)
z = randn(1,length(t));
hold on;
plot(z,'r');
xcorrelation = xcorr(x,z);
figure(2)
plot(correlation,'g');
hold on
acorrelation = xcorr(x,x)
plot(acorrelation,'m');
I wanted to see how cross corelation look like when signal (sinusiod)
is correlated with itself and with noise.
If you execute this script, you'll see that auto correlation of
sinusoids has much higher amplitude then cross correlation (noise nad
sinusoide) as expected.
Now I'm trying to figure out how to make practical use of that? What
treshold to set in order to make a guess if signal is sinusoid ore
something else?
I simply don't know what to do further.
Can you explain a little bit more? I hope there are people here who
use correlation in practice and research and who can give one or two
useful advices.
Thank you
Auto correlation is used to determine if there is an ‘echo’ or time-
delayed version(s) of a signal in the data from one sensor. It’s
performed by taking the FFT of the sensor data, multiplying the
transform with its complex conjugate, inverse transforming, and then
using a peak detector on the output. The peak(s) in the output tell
you the time delay or delays, if there are multiple echoes.
Mathematically, auto correlation is similar to the convolution of a
signal with itself (F[k] below is the transform of the signal):
convolution: F[k] times F[k] then inverse transform
auto correlation: F[k] times F[k]* (* = conjugate) then
inverse transform
The reason for the conjugation operation has to do with the fact that
you don’t want that ‘time reversal’ thing that happens with
convolution.
As with convolution, you should zero-pad to avoid doing a circular
auto correlation.
Cross correlation is used to determine if there is a time delay
between a signal arriving at two spatially separate sensors. It’s
performed by taking the FFTs of data from each sensor, conjugating one
of them, multiplying them, point by point, and then inverse
transforming. Once again, you should zero-pad to avoid circular cross
correlation.
If there is a strong, unwanted sinusoid in your input, then the result
of the cross correlation will be based on the strong unwanted
sinusoid. You can minimize the effect of the unwanted component by
using a window function in the frequency domain prior to inverse
transforming. That is, FFT each sensor, conjugate one result,
multiply the transforms, multiply by the window, inverse transform,
then peak detect. But note that the window functions (there are
several, some much better than others) are NOT like the window
functions (e.g.: Hann, Hamming, etc.) used to minimize leakage and
picket fence effects.
Here’s 3 references that may help:
J. C. Hassab, R. E. Boucher, “Optimum Estimation of Time Delay by a
Generalized Correlator,” IEEE T-ASSP, vol. 27, no. 4, Aug. 1979, pp.
373-380.
J. C. Hassab, R. E. Boucher, “Performance of the Generalized Cross
Correlator in the Presence of a Strong Spectral Peak in the Signal,”
IEEE T-ASSP, vol. 29, no. 3, June 1981, pp. 549-555.
J. C. Hassab, R. E. Boucher, “An Experimental Comparison of Optimum
and Sub-Optimum Filters’ Effectiveness in the Generalized Correlator,”
J. Sound and Vibration, 1981, (12 pages total - I got this as a class
handout, and it doesn’t have the page numbers).
.
- Follow-Ups:
- Re: Cross correlation in signal analysis
- From: John E. Hadstate
- Re: Cross correlation in signal analysis
- From: brobigi
- Re: Cross correlation in signal analysis
- References:
- Cross correlation in signal analysis
- From: brobigi
- Cross correlation in signal analysis
- Prev by Date: Re: non-integer fractionally spaced equalizer?
- Next by Date: Re: Cross correlation in signal analysis
- Previous by thread: Re: Cross correlation in signal analysis
- Next by thread: Re: Cross correlation in signal analysis
- Index(es):
Relevant Pages
|