Time sync issue in USRP x410 with basebandTransmitter & basebandReceiver

28 visualizaciones (últimos 30 días)
Varun
Varun el 6 de Nov. de 2025
Editada: Jieming Xu el 4 de Dic. de 2025 a las 13:43
Hello,
I have successfully established communication with usrp in loopback mode,
But when I connected two individual usrp's and tried to transmit and capture i was getting a mismatch between both radios time,
Tried using clock source and time source as internal and also GPSDO.
This is my code:
clc;
clearvars -except tx rx
radio1="Radio_1";
if ~exist('tx', 'var') || ~isvalid(tx)
tx=basebandTransmitter(radio1,"TransmitDataType","double","Antennas","DB0:RF1:TX/RX0","Preload",true,"RadioGain",20,"CenterFrequency",512e6,"SampleRate",2e6);
end
radio2="Radio_2";
if ~exist('rx', 'var') || ~isvalid(rx)
rx=basebandReceiver(radio2,"Antennas","DB0:RF1:RX1","CaptureDataType","double","Preload",true,"RadioGain",20,"CenterFrequency",512e6,"SampleRate",2e6);
end
setTimeNextPPS(radioConfigurations("Radio_1"), 0);
setTimeNextPPS(radioConfigurations("Radio_2"), 0);
t1 = getRadioTime(r1);
t2 = getRadioTime(r2);
fprintf('\nRadio 1 time: %.9f \n', t1);
fprintf('Radio 2 time: %.9f \n', t2);
fprintf('Time difference: %.9f ms\n', (t1 - t2));
Output:
Radio 1 time: 8.289583870
Radio 2 time: 8.291099585
Time difference: -0.001515715 secs
My issues:
  1. I was manually setting both radios time to zero by setting the next PPS, Even then time mistamatch issue is there in between two radios.
  2. Is there any way that i can set radio 1 as master and radio 2 as slave, And import clock and time source from radio 1 to radio 2.
  3. Or is there any way that i can configure trig in/out port of one usrp to output PPS signal for other radio.
  4. Even when both radio's are connected and locked to GPSDO, there is mismatch in both radios time.
  1 comentario
Jieming Xu
Jieming Xu el 4 de Dic. de 2025 a las 13:17
Editada: Jieming Xu el 4 de Dic. de 2025 a las 13:43
Hello Varun,
Thank you for using the Wireless Testbench Toolbox and for your inquiry.
Issue 1: Yes, this behavior is expected. Since getRadioTime(r1) and getRadioTime(r2) are executed consecutively, the time gap between these two function calls is the difference you observe. To achieve your desired result, I suggest using the function getTimeLastPPS. This will return the device time at the last PPS signal. Please note that you need a PPS box connected to both devices.
Issue 2: You can synchronize device 2 using the clock from device 1.
Issue 3: No, this feature is not supported in the current MATLAB version.
Issue 4: Yes, it is supportted. Please pay attention, the GPSDO need longer time to take effect than PPS. Please allow longer time for GPSDO to work.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Communications Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2025b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by