LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase calculation

I would like to know if there is a SubVi that calculates the angle phase between two analogical signals (or waveforms). If answer is negative, how could I do it in an efficient way?.

Thank you!.
0 Kudos
Message 1 of 4
(3,923 Views)
For the phase difference to make sense, your signals have to either be periodic and share a common fundamental frequency or at least be very "similar" with the one being more or less a delayed version of the other one (this would for example be the case if you only have a sub-period duration of your signals)

In the first case you can for example use the VI "Extract Single Tone Information.vi" located in your Analysis>Waveform Measurements palette. The VI will return the detected fundamental frequency (make sure you get "almost" the same result on both signals), and the start phase of that signal. Then simply subtract the two phase values to get your result.

If your signals are not periodic (that is do not show a common fundamental frequency), then you may
still be able to extract a good estimate of the time delay between them. Use the Cross Correlation function. The peak value position of your result with respect to the center is a good estimate of the delay. To get your result converted to a phase difference you still need a signal frequency (that you hopefully know from your system)
Message 2 of 4
(3,923 Views)
Thank you very much. My signals are periodic and have approximately the same frequency, so I have used your first sollution. Now I have a little problem about the precision of the calculation, but that is another story.

Thanks again.
0 Kudos
Message 3 of 4
(3,923 Views)

Hi,

 

Can u pls send a sample code for the method which u have suggested for phase caluculation.

I am using labview 8.5

0 Kudos
Message 4 of 4
(3,491 Views)