LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating Phase Difference from 2-Channel Waveform

Fluktuation10111_0-1630603723462.png

Hello. I am a complete labview beginner and want to calculate the phase difference between two signals. I have a two channel waveform and use the "Extract Single Tone Information VI" to obtain the phase of each signal respectively. The phases i get are highly unstable and i notice both signals are ''scrolling" from side to side in the signal graphs. Is this the reason why the phases are so random? How can i fix this? 

The signals on channel 0 and 1 look like this

Fluktuation10111_1-1630604212541.png

 

0 Kudos
Message 1 of 7
(1,152 Views)

Are you measuring the two waveforms using a simultaneous sampling DAQ card?  If not, there will be a small delay between them introduced by the DAQ card as the single ADC measures each waveform.

0 Kudos
Message 2 of 7
(1,141 Views)

I am using an Ettus Research X300, which looks like this. Is this layout part of the problem?

Fluktuation10111_0-1630609728522.png

 

0 Kudos
Message 3 of 7
(1,093 Views)

Is there a dominant single tone that has the same frequency in both channels?

What is the purpose of the FOR loop?

0 Kudos
Message 4 of 7
(1,105 Views)

Yes, both channels have same frequency 

0 Kudos
Message 5 of 7
(1,079 Views)

You want the phase in the RF part or the pulse part?

second wfrm passed a high pass?

 

the DC part and groupdelay is tricky...

I would try : Both channels pass a high pass filter with same parameters (same delay) and use cross correlation to measure the groupdelay.

the phase of the RF in the pulse seems to be more than one periode (360°) of the groupdelay 😉

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 6 of 7
(1,075 Views)

@Fluktuation10111 wrote:

Yes, both channels have same frequency 


Do you know that frequency exactly?

 

Your graphs are useless to troubleshoot anything, because the resolution is insufficient. Obviously you have three square pulses of some high frequency signal. Are you interested in the phase difference of the high frequency signal for each of the square pulses? Is that phase shift constant across the entire trace (all three pulses)? Or are you interested in relative time shifts of the square pulses?

 

Can you attach a simple VI that contains some actual data? What result do you expect?

Message 7 of 7
(1,068 Views)