LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase difference from 2 signals(HELP!)

 Hi! I'm having trouble finding accurate phase difference between two signals.. one signal is from the input serial communication arduino and the second signal is a simulated signal. I want to find the phase difference between these two. I've googled a lot and found many similar threads of phase difference measurements, but it won't work.

 

The phase angle from the simulated signal is correct but the reading of the phase angle from the input signal keeps changing and I could not find an exact phase angle or phase difference.

 

 

What do you think I should do?

0 Kudos
Message 1 of 29
(5,338 Views)

Hi lamela,

 

cleaning up your BD still isn't on your priority list, isn't it? 😄

 

the reading of the phase angle from the input signal keeps changing

I guess the input signal also keeps changing?

 

What do you expect? What does the signal look like?

 

On your VI image:

Why do you need ExpressVIs to index a waveform from an waveform array? Why not use IndexArray? (Apart from other questionable items…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 29
(5,300 Views)

The signal and reading are stable and it is a continous sine wave. All the VI I've found won't work, the phase for the input signal will keep changing, this makes the phase difference ever changing so there is no definite value..

0 Kudos
Message 3 of 29
(5,204 Views)
You don't show how you are getting the signal from the arduino. One thing is certain that converting to dynamic data is probably a wasted effort. You have absolutely no timing information. Are you really getting multiple points that it comes as a 1D array or are you just making that up as well.
0 Kudos
Message 4 of 29
(5,178 Views)

Do both signals have the same frequency?

0 Kudos
Message 5 of 29
(5,150 Views)

Yes, both have the same frequency! The multiple points from the signal are correct too.

0 Kudos
Message 6 of 29
(5,125 Views)

@lamela wrote:

The multiple points from the signal are correct too.


Sorry, I have no idea what that means.

0 Kudos
Message 7 of 29
(5,111 Views)

I mean the multiple readings from the 1D array I plot from the signal. The signal and reading are stable but the phase keeps changing?

0 Kudos
Message 8 of 29
(5,103 Views)

Hi lamela,

 

yes, the phase keeps changing when you read just parts of your sine wave (aka no full periods of the sine wave).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 29
(5,069 Views)

GerdW wrote:

yes, the phase keeps changing when you read just parts of your sine wave (aka no full periods of the sine wave).


He's looking at the phase difference between two signals, though.

0 Kudos
Message 10 of 29
(5,044 Views)