From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure phase difference between two acquired periodic signal

Solved!
Go to solution

Hi,

 

I'm not sure how to explain my problem, but I'll give it my best shot. I am acquiring two signals from voltage sensors. The two periodic signals have the same frequency but a different amplitude. Normally they have a phase difference of either 0 or 180 degrees. The thing I need to let labview check for is if the signals are completely in phase or completely out of phase (180 degrees). I'm performing the acquisition using the DAQ assistant in a while loop. Does anyone have an idea how I can do this?

 

To summarize: the two things I need to know are

- the amplitude (can be just to max peak to min peak distance)

- whether the two signals move in the same direction (when both the signals are in phase) or if they move in opposite direction (counter phase) - the exact phase angle value is not that important

 

Thx

Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7
0 Kudos
Message 1 of 3
(3,814 Views)

LabVIEW has some built-in analysis VIs to measure things like amplitude and phase. Have you looked through them? Check the Signal Processing sub-palette. You can also perform a search for a function by clicking on the "Search" button in the palette popup or in the toolbar (for newer versions of LabVIEW). If a specific method is not providing you the answer you seek then please post your VI with some saved data so that others can look at the signals and try to help you analyze them.

0 Kudos
Message 2 of 3
(3,797 Views)
Solution
Accepted by topic author GiovanniV

Thx for the reply. After a night of thinking about the problem, I came up with a home-made solution. I used the point by point max and min vi to calculate the peak to peak distance of my signals. Next I used the point by point time derivative to calculate the change in signal of both signals. If the signals are in phase (both are increasing or decreasing simultaneously with each other) then both derivatives have the same sign (accept at the peaks, which I excluded from the comparison). If the signals are out of phase (when one is increasing, the other is decreasing and vice versa) then both derivatives are opposite in sign. Depending on this, I can get every information I need. If someone should know a better way to get the same result, please tell, but for know it seems to be working.

Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7
0 Kudos
Message 3 of 3
(3,776 Views)