LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Delay between two triangular signals

Solved!
Go to solution

I will be having one triangular generated waveform, and after some time, I should receive the same signal but with some time delay (using USRP). Is there a way to find that time delay?

I have a very basic VI where I simulated the received signal by another signal generator but with a phase shift. 

I actually have another issue in the attached VI that the two signals do not appear together on the same chart although I suppose I did the right step by bundling them as I have read on the forum.

Thanks.

 

0 Kudos
Message 1 of 12
(3,558 Views)

Hi Hefny,

 

you might use a correlation function:

check.png

I also see both signals in the chart… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(3,513 Views)

Unless your two signals arrive within 100ms, you won't see anything interesting, because you are only taking 100 samples at a time (and only keeping one point (1% of the signal!) for the chart). try to not use dynamic data. It's too opaque.

 

Do you have a more reasonable simulation? Are these "signals" short pulses? Best would probably be to acquire both channels simultaneously, continuously, and hardware timed and keep a sufficient history in a buffer. Analyze the buffer once both signals have been received.

What are typical timings between the two signals? (nanoseconds? Minutes?)

0 Kudos
Message 3 of 12
(3,507 Views)

thanks for your reply.

I got your point why I am not seeing the two signals, but if not use dynamic data, what to use?

I actually want to transmit an FM modulating triangular pulse and receive it, then do some analysis.

I assume the delay will be in melli seconds. 

0 Kudos
Message 4 of 12
(3,504 Views)

Hi Hefny,

 

use waveforms or even plain arrays of samples…

The DDT wires hide too much information!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 12
(3,495 Views)

thanks a lot

If I have arrays (assume that the problem of displaying the signals is done), what do you suggest to get the phase difference between them (the methodology I mean)?

0 Kudos
Message 6 of 12
(3,490 Views)

Sorry. I saw your reply very late. 

It is very useful. Thanks a lot. 

Let me ask you to guide me for a way to make analysis on these two signals (ex: phase difference between them).

Thanks again.

0 Kudos
Message 7 of 12
(3,452 Views)

Hi Hefny,

 

I already suggested to use a correlation function.

Did you try it?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(3,439 Views)

I tried it. But I get a straight line with negative slope. I doubt that this is the correct result, because even when I changed the two signals to sinusoidal waves, I still get a straight line as a result of cross correlation (although the result should be sine).

 

0 Kudos
Message 9 of 12
(3,432 Views)

Hi Hefny,

 

the snippet I posted above doesn't result in "straight lines"…

 

When you have problems with YOUR VI you should attach it!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(3,428 Views)