discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accuracy of rx_time in UHD API stream receive command?


From: Marcus D. Leech
Subject: Re: Accuracy of rx_time in UHD API stream receive command?
Date: Tue, 05 Jan 2021 01:03:52 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 01/05/2021 12:27 AM, Mike wrote:
Hello,

I apologize if this is covered in a document somewhere, but from exactly
where is the rx_time value in the UHD API stream receive command derived?

I'd like to determine how close that value is to the actual arrival time
of the signal at the antenna (in nanoseconds) and the variance I might
expect over time.  I'm using a B200 and UHD 3.15.0 under Ubuntu 20.04.
The intent is to use rx_time in a ranging application and I'd like to
work out the timing error budget.

Thanks!


In general, USRP devices have a time-of-day register(s) that "tick" based on the system clock. Time-stamps that appear in streams are
  based on this time-of-day register.

That register is initialized to zero on system start-up, but can be set to any value based on UHD API calls like
   o set_time_now()
   o set_time_next_pps()

The variance is utterly dependent on the quality of the system clock. Which is either derived from the on-board clock (on the B200, that's a TCXO with a roughly 2.5PPM accuracy), or derived from an external reference clock providing 10Mhz or the on-board GPSDO--either of which are typically much, much, better.

Now, in terms of latency, with respect to time measurements at the notional antenna plane, that's a bit harder to definitively answer, since it depends very much on the way you have things configured, such as:

    o What is the master clock rate setting?
o What is the delivered-to-host sample rate, and corresponding decimation value? o What is the effective fliter-length of the DDC decimator that results from all of the above?

Basically, there's a heckuva lot of "goo" between the antenna, and the point at which time-stamps are inserted into the sample-stream. Different UHD implementations will insert the timestamps at different points in the signal processing chain--different depending on underlying base hardware (B200, X3xx, N3xx, etc, etc), and which version of UHD you're running.

Probably the best thing to do is to characterize it for your particular configuration, and adjust accordingly.

This app-note may provide some insight into the considerations:

https://kb.ettus.com/Synchronization_and_MIMO_Capability_with_USRP_Devices#Synchronization_with_GPS_Disciplined_Oscillator

This might be of some use as well:

https://kb.ettus.com/Synchronizing_USRP_Events_Using_Timed_Commands_in_UHD

Also the overall generic UHD manual:

https://files.ettus.com/manual/

Manual for previous releases here:

https://files.ettus.com/manual_archive/

B2xx manual here:

https://files.ettus.com/manual/page_usrp_b200.html

GPSDO information for B2xx here:

https://kb.ettus.com/GPSDO#Product_Compatibility_3

Also look at the "sync_to_gps" example in the source code.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]