LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase Measurement

How can one measure phase difference (phase shift) using LabVIEW VI's. Can anyone suggest the method and the appropriate VI's. Both my I/P & O/P signals are AC Sine waveforms. I have just started learning LabVIEW and kinda of have no clue abt this issue. Any pointers/ideas will certainly be appreciated. Thanks!
0 Kudos
Message 1 of 65
(5,856 Views)

In my application I needed to determine if two sine waves were in phase. For this I used the "Inverse Tangent (2 Input)", each input was the sine array received from a TDS3034 oscilloscope, I then took the result (output) of the "Inverse Tangent (2 Input)" function and performed a SUM array. To determine if the sine waves were in phase I looked at the sign value of the sum result (+ or -). If the result is negitive the waves are in phase, if the result is positive the waves are out of phase. In my case the two inputs could only be in phase or 180 degrees out of phase.

See picture:

Message Edited by AndrewAlford on 11-23-2005 10:54 AM

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 2 of 65
(5,826 Views)
Try the attached.  It should do the job.  Its in LV7.1
Randall Pursley
Message 3 of 65
(5,822 Views)
Very good vi Randall.  I've been looking for a way to do this.  Thanx, and you get the stars.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 65
(5,803 Views)
Randall,
Thanks for the Phase Measurement VI. Tried it out it really did work. I have a couple of questions:
(1) The Y axis (scale)  in my XY Graph (front panel) is hidden. I have set all the necessary properties, and for reasons unknown to me this scale is never seen.
(2) How can I integrate your Phase Measurement VI into my block diagram. The problem here is that I am not sure where exactly I can pick the real time signals (I/P & O/P) in my block diagram and connect them to the Phase Measurement VI.
 
Would appreciate replies. Thanks!
Download All
0 Kudos
Message 5 of 65
(5,725 Views)
1.  I am not sure what you did to eliminate the Y-axis.  I would suggest just replacing the XY graph with a new one.  Maybe you scaled up the graph area (black area) and pushed the Y-scale too far away.

2.  To measure the phase you have to have both input (reference) and output (measured) available.  If you do not generate the input (reference) signal in software, then you will need to acquire it from whatever source generates it.  I couldn't tell from the images where the input (reference) signal is generated.





Randall Pursley
0 Kudos
Message 6 of 65
(5,707 Views)

Randall,

How does one convert from Cluster (pink) waveform data type to Dynamic Data type "or" a 1-D array of Double? I have 2 signals (Sine, AC) in the cluster which are from the digitizer card and I have to somehow separate these 2 signals (I/P & O/P) which will enable me to measure the phase difference between them. Any help will be appreciated. Thanks!

0 Kudos
Message 7 of 65
(5,655 Views)
If the data is in a cluster, you can use the Unbundle function to get the data in a 1D Array format.  However, a true waveform data type is not a cluster with a pink wire, it is like a cluster but it has a brown wire.  See attached picture.  In this case you can use the Get Waveform Components function to extract the 1D Array, pretty much the same as unbundle.

Message Edited by tbob on 12-01-2005 12:04 PM

- tbob

Inventor of the WORM Global
0 Kudos
Message 8 of 65
(5,654 Views)
Thanks for your reply. The cluster (1-D array of cluster) in question has two elements each of which are a 1-D array of double. Take a look at the attached Phase.jpg and the cluster of interest is marked "Phase?". This cluster contains both the I/P & O/P signals. I couldn't correlate my question with your previous reply...as I just started learning LabVIEW a little over a month ago. Once I get these 2 signals I will need to use them as input(s) to Phase Measurement.jpg (attached picture). So these signals either need to be in the Dynamic Data type or 1-D array of double format. Will look forward to your reply. Thanks!
Download All
0 Kudos
Message 9 of 65
(5,642 Views)
After the word "Phase"

It appears that you take the first element of the cluster of arrays and then you unbundle it and process the second of the two arrays that are unbundled.  Does that mean the first array that is unbundled is the reference signal?


Randall Pursley
0 Kudos
Message 10 of 65
(5,637 Views)