How to match 2 same analog waveforms with time delay?

Apr 26, 2009 5 Replies

Dear all,



I want to use MCU to calculate the delay between 2 almost same analog waveforms from op amps. The delay is within 0.1s to 1 second. Do anyone know whether there is algorithm or method to do that?



Thanks!


Look up 'correlation'.

[mail]: Chuck F (cbfalconer at maineline dot net) [page]: Try the download section.

Questions ========== What is the waeform frequency? What is the waveform amplitude? What is the waveform shape? Sine, Square , Triangle etc. Does the waveform cross the zero access?

Suggestion ======== If it does cross the zero access then you could try using a zero crossing detector circuit to detect the differnce between the zero crossing

Another term you might search for is "phase detector".

Joe

Sorry the last question should read

Does the waveform cross the zero axis?

Joe

formatting link

Looks a bit more complicate than it is in reality.

If calculation time is a problem, it can be solved faster with the help of fft-algorithms.

Best regards

Stefan DF9BI

The best way to do this is to use a cross correlation function. You will need to band-limit your analog waveforms and then digitize them at greater than twice their bandwidth. Your time resolution will be equal to the sampling period. The correlation can be computed in the time domain or more efficiently in the frequency domain by using a fast Fourier transform. The duration and bandwidth of the waveforms will determine the MCU capacity needed. Also, do you need to calculate the delay continuously or just a single snapshot?

Regards, Steve

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required