How to match 2 same analog waveforms with time delay?

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!

Reply to
cell
Loading thread data ...

Look up 'correlation'.

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

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

Reply to
Joe G (Home)

Sorry the last question should read

Does the waveform cross the zero axis?

Joe

Reply to
Joe G (Home)

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

Reply to
Stefan Brröring

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

Reply to
kenyonscs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.