I have been struggling with this issue for months now, trying to understand which one to pick: FFT or cross correlation.

I am given a sine wave (with phase, amplitude, frequency and time vector known), and I have to extract the phase shift between that sine wave and another signal. The new signal has the same frequency and the same time vector as the sine wave, however the amplitude and the phase are unknowns. What would you guys suggest? I am at a loss.

Thank you.

  • Can you tell us what is your criteria for choosing? Are you looking for the lowest complexity algorithm, or the easiest to implement, or something else? Your problem can be solved with either method. – MBaz Oct 13 '14 at 18:44
  • @MBaz: criteria is mainly the complexity and the amount of work that would go into it. I am a grad student and finding the correct phase is a tiny part of my research so being stuck has been really frustrating. Any tips? – user11266 Oct 14 '14 at 15:02
up vote 0 down vote accepted

I don't see it as one or the other. You can use the FFT to more efficiently compute a cross-correlation (versus computing the cross-correlation in the time-domain).

There is lots of good information on this thread, about computing the "phase shift", from the offset of the peak in the cross-correlation function.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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