2
$\begingroup$

If I ave 2 otherwise identical 1D signals that are phase shifted from each other then cross-correlation is a perfect way to identify the time lag between the 2 signals.

Now supposing I double the speed of one of those signals (eg sampled at every other sample). The cross correlation will fail miserably at this point.

However, in image we can account for this kind of scaling (or even rotation) by converting the images to log polar coordinates and then performing the [phase] correlation. This has the added advantage of being able to identify the angle of rotation and amount of scaling, I believe.

Is there a similar, simple transform for 1D signals to allow for identification of the time lag as well as identifying the amount of time compression of the signal?

I guess you could use log polar coordinates directly on the 1D signal but it would, instantly, square the memory requirements. Any other thoughts?

$\endgroup$
3
$\begingroup$

With known time scaling, you can resample to a common rate and then cross-correlate. It is natural to think you might need to go to the higher of the two rates, but that does not increase information beyond the lower rate, it only interpolates the information. This is analogous to zero-padding an FFT to interpolate the resolution of a peak.

To determine unknown time scaling, cepstral processing may provide some insights. I'm afraid it is not my area, but it sounds related to what you are describing.

Essentially, you've got two dimensions of uncertainty (start time, rate) across which you'd like to search to find the best correlation.

You can reduce it to one dimension by considering the magnitude of the two signals' spectral data. The lower rate data should then look like a stretched version of the higher rate data.

$\endgroup$
  • $\begingroup$ I appreciate its not your area but are you suggesting doing cross correlation of the cepstra? Will need to ruminate on that ... can't think whether it would work or not right now ... $\endgroup$ – Goz Jan 24 '14 at 14:34
  • $\begingroup$ Not entirely. I will edit my answer to try to clarify my thoughts. $\endgroup$ – Mark Borgerding Jan 24 '14 at 16:08
  • $\begingroup$ Not sure I follow you. What do you mean by 'magnitude' of the spectral data? I can't see how that removes a dimension at all ... $\endgroup$ – Goz Jan 25 '14 at 6:27
  • $\begingroup$ The phase of a Fourier representation of data encodes the timing offset. Ignore the phase, ignore the timing. (Assuming you have enough overlap between the signals that they are substantially in the same buffer) $\endgroup$ – Mark Borgerding Jan 28 '14 at 12:59
  • $\begingroup$ So that would only be able to match as long as the offset is within a specific "window" (The FFT size)? $\endgroup$ – Goz Jan 28 '14 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.