LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

phase shift of a sine wave and a square wave

Hi,

 

I would like to simply compute the phase shift between a sinusoidal waveform and a square one. Between two sin-s I can compute, but I have no idea how to do that with a square waveform.

Thanks,

 

Ussr123

0 Kudos
Message 1 of 6
(4,612 Views)

Maybe getting the fundamental of the square wave? and computing phase shift between the initial sine wave and that one? I am not sure if this would help. But I still don t know how to filter out the fundamental.

I appreciate any help.

 

Ussr123 

0 Kudos
Message 2 of 6
(4,610 Views)

Hi there,

 

the easiest way is to use the ExpressVIs.

But you are only allowed to use the ExpressVI "Tone Measurements" if you have enough periods of the square wave, because it computes the phase with FFT.

 

An other possibility is to use the spectrum analyser VI as used in the attached exsample.

 


Greetz
Branni

0 Kudos
Message 3 of 6
(4,555 Views)

Hi,

 

unfortunately I cannot open it, I have another version of LV. Could you make a screenshot of it?

Thank U,

 

Ussr123

0 Kudos
Message 4 of 6
(4,551 Views)

Sure!

 

Sorry for the german ExpressVIs, but I think you could figure it out with the symbols. 😉

0 Kudos
Message 5 of 6
(4,547 Views)

If your signals are clean enough (large signal to noise ratio), just find the times of zero crossings. Then calculate the period and the phase shift from those times. Using Threshold 1D Array is a simple way to do this. If one or both of the signals does not cross zero, the threshold can be set to the midpoint between the maximum and minimum values in the array.

 

Lynn

0 Kudos
Message 6 of 6
(4,507 Views)