05-10-2014 03:44 PM
I am beginer to Labview. I want two measure phase difference between two sinusoidal waveforms. These waveforms are acquired from current and voltage sensors. I am using NI USB 6008. I want to measure the accurate and constant phase difference between two waves to measure the power factor. By using builtin Dual Channel Spectrum pallet in LabVIEW 2010 I am having a continously changing phase. How can I have the constant and accurate phase of these waves. My VI is attached. Kindly help me regarding this problem.
05-10-2014 03:55 PM
A picture of mostly express VIs is way to opaque to tell anything. Are you measuring the phase difference for the dominant frequency component (max magnitude) or something else?
05-10-2014 11:20 PM
No I am doing it for a fixed frequency of 50 hz for both waveforms. Every time I run my VI I get a new phase and it varies abruptly to a totally different value.
05-11-2014 12:17 AM
Where do yo define the frequency?
05-11-2014 03:17 AM
Sorry Sir, I cant understand for what you are asking about.
05-11-2014 09:58 AM
First question is what is your sampling rate?
Second for accurate phase measurement you will need to use simultaneous sampling card instead of multiplexed one.
The VI uses FFT (Fast fourier transform) of Auto Correlation and Cross Correlation stimulus and response signals to find the Amplitude and Phase response. This VI is most apt for finding the FRA (Frequency Response Analysis) of system or to find the Bode Plot.
I guess you should have a direct Phase difference measurement VI in Sound and Vibration Suit Toolkits; I do not have the one installed to guide you right now.
05-11-2014 11:24 AM - edited 05-11-2014 11:27 AM
@321hanan wrote:
Sorry Sir, I cant understand for what you are asking about.
You get an array of amplitudes and phases, but you treat it as a scalar, so all you get is the amplitude and phase of the first frequency component (or maybe even the DC component). Since this is far removed from your 50Hz, all you'll get is noise. You need to get the phase difference at the element corresponding to 50Hz. You can calculate the position of this element from your acquisition parameters, or you can guess the position from the maximum in the magnitude data.
What prevents you from attaching the actual VI? As I said, your use of express VIs makes it impossible to troubleshoot further, because we cannot see how they are configured.
(Yes, there is also the simultanous sampling issue that will give you a small error, but at 50Hz it is probably OK)
05-12-2014 12:57 PM
Dear Sir,
Here is the following information:
(N samples by defualt)
Samples to read: 1k
Rate: 1k (Hz)
How can I calculate the position of this element from acquisition parameters?
(I tried to upload the actual VI first but there was an error in uploading.)
I am giving a link from where you can get the VI file.
I shall be thankful to you for you assistance.
05-12-2014 02:34 PM - edited 05-12-2014 03:19 PM
Since I don't have your hardware, I simulate two 50Hz sines. You can interactively change their phases and pipe them through the algorithm. The results seems reasonable.
(Since there are no other frequencies, only the 50Hz component is stable over time. All other frequencies have random phases, of course)
See if this helps (LabVIEW 2010).
05-13-2014 12:20 AM
Attached VI will calculate Power factor directly, give the instantaneous voltage and current waveform as an input to this VI.
altenbach VI works fine you can use that as well as long as you know the signal frequency.