usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

LO phase alignment for multiple B200s

BN
Bach Nguyen
Mon, Dec 14, 2020 3:19 PM

Hi all,

I was using my 2 B200s to measure the magnitude and phase difference in
voltage gain of two signal chains on-site and I notice that there is a
random phase offset between the 2 inputs. I read the USRP Manual on Device
Synchronization and realize that I was tuning the 2 B200 asynchronously,
even though I had them start streaming synchronously using the external
PPS. There are several things that I would like to ask and clarify:

  1. Does the usrp->set_command_time(cmd_time) set all the subsequent
    command (before clear_command_time()) to start after cmd_time seconds or
    they will start at the exact cmd_time instant in the time registers?
  2. Once I retune the 2 B200s simultaneously to centre frequency f1, then
    the device is closed or re-tuned to other frequency, f2, if I re-tune it
    back to center frequency f1, would the phase offset between the 2 B200 RX
    streams be the same as original, when I firstly re-tuned it?
  3. Does the phase offset, after re-tuning, varies with different centre
    frequency (ie. offset at frequency f1 different from frequency f2)?
  4. My code was a modified version of the rx_samples_to_file.cpp, with
    the synchronization principle mentioned below. Would it be enough to make
    the 2 B200s synchronized with constant phase offset between LOs? Besides,
    the program was started for a week, then stopped completely, and re-started
    again after a few days (I regard this as "device is closed", and
    re-initialized) , would the phase offset between LO, in this case, remains
    constant as before the stop?

The program I used has 2 threads, each for 1 B200. The threads' tasks
(after adding the LO alignment part) are:

  • 1st thread: Call set_time_unknown_pps() on the 1st B200,once done,
    send sync_signal to 2nd B200. Then use the set_command_time(3.0),
    set_rx_freq(fc,0) and clear_command_time() for LO phase offset.
  • 2nd thread: Keep polling the sync_signal, once it receives, use
    set_time_next_pps(1.0) to synchronize the 2 B200. Once done, I use the
    set_command_time(3.0), set_rx_freq(fc,0) and clear_command_time() for LO
    phase offset.
  • After the above steps, both threads have a while loop to keep polling
    the value of time register for the last PPS, if it is 5 seconds then the
    stream command is issued in both threads. After that, I use the
    rx_stream->recv to record the samples from the 2 B200s.

Cheers,
Bach

Hi all, I was using my 2 B200s to measure the magnitude and phase difference in voltage gain of two signal chains on-site and I notice that there is a random phase offset between the 2 inputs. I read the USRP Manual on Device Synchronization and realize that I was tuning the 2 B200 asynchronously, even though I had them start streaming synchronously using the external PPS. There are several things that I would like to ask and clarify: 1. Does the usrp->set_command_time(cmd_time) set all the subsequent command (before clear_command_time()) to start after cmd_time seconds or they will start at the exact cmd_time instant in the time registers? 2. Once I retune the 2 B200s simultaneously to centre frequency f1, then the device is closed or re-tuned to other frequency, f2, if I re-tune it back to center frequency f1, would the phase offset between the 2 B200 RX streams be the same as original, when I firstly re-tuned it? 3. Does the phase offset, after re-tuning, varies with different centre frequency (ie. offset at frequency f1 different from frequency f2)? 4. My code was a modified version of the rx_samples_to_file.cpp, with the synchronization principle mentioned below. Would it be enough to make the 2 B200s synchronized with constant phase offset between LOs? Besides, the program was started for a week, then stopped completely, and re-started again after a few days (I regard this as "device is closed", and re-initialized) , would the phase offset between LO, in this case, remains constant as before the stop? The program I used has 2 threads, each for 1 B200. The threads' tasks (after adding the LO alignment part) are: - 1st thread: Call set_time_unknown_pps() on the 1st B200,once done, send sync_signal to 2nd B200. Then use the set_command_time(3.0), set_rx_freq(fc,0) and clear_command_time() for LO phase offset. - 2nd thread: Keep polling the sync_signal, once it receives, use set_time_next_pps(1.0) to synchronize the 2 B200. Once done, I use the set_command_time(3.0), set_rx_freq(fc,0) and clear_command_time() for LO phase offset. - After the above steps, both threads have a while loop to keep polling the value of time register for the last PPS, if it is 5 seconds then the stream command is issued in both threads. After that, I use the rx_stream->recv to record the samples from the 2 B200s. Cheers, Bach
MD
Marcus D. Leech
Mon, Dec 14, 2020 5:45 PM

On 12/14/2020 10:19 AM, Bach Nguyen via USRP-users wrote:

Hi all,

I was using my 2 B200s to measure the magnitude and phase difference
in voltage gain of two signal chains on-site and I notice that there
is a random phase offset between the 2 inputs. I read the USRP Manual
on Device Synchronization and realize that I was tuning the 2 B200
asynchronously, even though I had them start streaming synchronously
using the external PPS. There are several things that I would like to
ask and clarify:

  1. Does the usrp->set_command_time(cmd_time) set all the subsequent
    command (before clear_command_time()) to start after cmd_time
    seconds or they will start at the exact cmd_time instant in the
    time registers?

The timed commands trigger at the time instant in the on-board timestamp
registers.

  1. Once I retune the 2 B200s simultaneously to centre frequency f1,
    then the device is closed or re-tuned to other frequency, f2, if I
    re-tune it back to center frequency f1, would the phase offset
    between the 2 B200 RX streams be the same as original, when I
    firstly re-tuned it?

No.  Since the B200 DO NOT SUPPORT timed-tuning, and since there's no
hardware support for the necessary re-synch feature, you can't
get a predictable phase-offset between two B200s, even with shared
10Mhz reference, 1PPS, and the use of timed commands.

  1. Does the phase offset, after re-tuning, varies with different
    centre frequency (ie. offset at frequency f1 different from
    frequency f2)?

Yes.  That's just a property of PLL synthesizers without phase re-synch.

  1. My code was a modified version of the rx_samples_to_file.cpp, with
    the synchronization principle mentioned below. Would it be enough
    to make the 2 B200s synchronized with constant phase offset
    between LOs? Besides, the program was started for a week, then
    stopped completely, and re-started again after a few days (I
    regard this as "device is closed", and re-initialized) , would the
    phase offset between LO, in this case, remains constant as before
    the stop?

No.  See above.

The program I used has 2 threads, each for 1 B200. The threads' tasks
(after adding the LO alignment part) are:

  • 1st thread: Call set_time_unknown_pps() on the 1st B200,once done,
    send sync_signal to 2nd B200. Then use the set_command_time(3.0),
    set_rx_freq(fc,0) and clear_command_time() for LO phase offset.
  • 2nd thread: Keep polling the sync_signal, once it receives, use
    set_time_next_pps(1.0) to synchronize the 2 B200. Once done, I use
    the set_command_time(3.0), set_rx_freq(fc,0) and
    clear_command_time() for LO phase offset.
  • After the above steps, both threads have a while loop to keep
    polling the value of time register for the last PPS, if it is 5
    seconds then the stream command is issued in both threads. After
    that, I use the rx_stream->recv to record the samples from the 2
    B200s.

Cheers,
Bach


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

On 12/14/2020 10:19 AM, Bach Nguyen via USRP-users wrote: > Hi all, > > I was using my 2 B200s to measure the magnitude and phase difference > in voltage gain of two signal chains on-site and I notice that there > is a random phase offset between the 2 inputs. I read the USRP Manual > on Device Synchronization and realize that I was tuning the 2 B200 > asynchronously, even though I had them start streaming synchronously > using the external PPS. There are several things that I would like to > ask and clarify: > > 1. Does the usrp->set_command_time(cmd_time) set all the subsequent > command (before clear_command_time()) to start after cmd_time > seconds or they will start at the exact cmd_time instant in the > time registers? > The timed commands trigger at the time instant in the on-board timestamp registers. > > 1. Once I retune the 2 B200s simultaneously to centre frequency f1, > then the device is closed or re-tuned to other frequency, f2, if I > re-tune it back to center frequency f1, would the phase offset > between the 2 B200 RX streams be the same as original, when I > firstly re-tuned it? > No. Since the B200 DO NOT SUPPORT timed-tuning, and since there's no hardware support for the necessary re-synch feature, you can't get a predictable phase-offset between two B200s, even with shared 10Mhz reference, 1PPS, and the use of timed commands. > > 1. Does the phase offset, after re-tuning, varies with different > centre frequency (ie. offset at frequency f1 different from > frequency f2)? > Yes. That's just a property of PLL synthesizers without phase re-synch. > 1. My code was a modified version of the rx_samples_to_file.cpp, with > the synchronization principle mentioned below. Would it be enough > to make the 2 B200s synchronized with constant phase offset > between LOs? Besides, the program was started for a week, then > stopped completely, and re-started again after a few days (I > regard this as "device is closed", and re-initialized) , would the > phase offset between LO, in this case, remains constant as before > the stop? > No. See above. > The program I used has 2 threads, each for 1 B200. The threads' tasks > (after adding the LO alignment part) are: > > * 1st thread: Call set_time_unknown_pps() on the 1st B200,once done, > send sync_signal to 2nd B200. Then use the set_command_time(3.0), > set_rx_freq(fc,0) and clear_command_time() for LO phase offset. > * 2nd thread: Keep polling the sync_signal, once it receives, use > set_time_next_pps(1.0) to synchronize the 2 B200. Once done, I use > the set_command_time(3.0), set_rx_freq(fc,0) and > clear_command_time() for LO phase offset. > * After the above steps, both threads have a while loop to keep > polling the value of time register for the last PPS, if it is 5 > seconds then the stream command is issued in both threads. After > that, I use the rx_stream->recv to record the samples from the 2 > B200s. > > Cheers, > Bach > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com