cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Determing phase shift between two waveforms

I have a system that I am interested in determing the phase shift between two sine waveform(s). I would be acquiring the waveforms via two seperate AI channels and then through code determing the phase shift and amplitude of the waveforms. Is there a SubVI or other code that would accomplish this?
Thanks.
 
Mike
Mar-Test, Inc.
CLAD
0 kudos
Mensaje 1 de 5
4.233 Vistas

Hi Mike,

You can use the "Extract Single Tone Information .vi" with the output "detected phase" to determine the phase (deg) for each sine wave and then subtract the two values.  Checkout the attached sample VI.

Tunde

Mensaje 2 de 5
4.200 Vistas

Tunde,

I will try this. Thanks a lot!

Mike

0 kudos
Mensaje 3 de 5
4.187 Vistas
If you are having trouble with accuracy using the above method, you can tweak it by doing a time domain analysis.  Using the data you have from the single tone, find the first zero crossing on each waveform (Newton Raphson or Ridders zero finder VI), then subtract to find the time difference and phase is a simple calculation away.  There is a VI which finds all the zeroes of a waveform, and you could use this directly with a simple linear fit to get phase difference information.  The result is often more accurate than FFT based methods, but depends on the noise level of your signal.

There are many variants, but FFT and level crossing are the main methods.  Good luck.  Let us know if you need more help.
Mensaje 4 de 5
4.170 Vistas
Don't forget that if you are using a DAQ board with non-simultaneous sampling (most of them are this type), you will also need to apply a correction factor. This factor is a function of the inter-channel delay and the channel separation in the scan list. It is a constant time shift, which results in a frequency dependent phase shift. Since the shift is DAQ board clock based, it is generally quite stable and accurate to use a pre-calculated value.
Regards,
Doug Wilson
Mensaje 5 de 5
4.141 Vistas