LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

phase diffrence measurement

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.

0 Kudos
Message 1 of 14
(3,818 Views)

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?

0 Kudos
Message 2 of 14
(3,811 Views)

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.

0 Kudos
Message 3 of 14
(3,777 Views)

Where do yo define the frequency?

0 Kudos
Message 4 of 14
(3,770 Views)

Sorry Sir, I cant understand for what you are asking about.

0 Kudos
Message 5 of 14
(3,752 Views)

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.

 

 

0 Kudos
Message 6 of 14
(3,737 Views)

@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)

0 Kudos
Message 7 of 14
(3,725 Views)

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.

 

Phase VI

0 Kudos
Message 8 of 14
(3,677 Views)

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).

 

0 Kudos
Message 9 of 14
(3,659 Views)

Attached VI will calculate Power factor directly, give the instantaneous voltage and current waveform as an input to this VI.

 

0 Kudos
Message 10 of 14
(3,636 Views)