How to implement Multiple USRPs for Synchronised Operation using wireless testbench
    13 views (last 30 days)
  
       Show older comments
    
    Ahmed Ansari
 on 8 May 2024
  
    
    
    
    
    Answered: Ben Cunningham
    
 on 21 Aug 2025
            I am currently using multiple USRPs connected through an octoclock and trying to synchronise the USRPs to implement simultaneous transmission.
 I am using Wireless testbench for this setup, but I have not been able to find an option with the testbench interface to configure the USRPs to use an external clock and PPS.
I would like to know if this is supported using wireless testbench or is there any other way I could achieve synchronisation without the loss of speed.
This is essentially the code I have used in MATLAB to for transmission from the USRP.
%% Define USRP Parameters
CenterFreq = 3e9; 
USRP_gain = 10;
Fs = 100e6;
%% Transmit waveform over the air
bbtx = basebandTransmitter("My USRP 2944r");
bbtx.CenterFrequency = CenterFreq;
bbtx.RadioGain = USRP_gain;
bbtx.SampleRate = Fs;
bbtx.Antennas = [ "RFA:TX/RX", "RFB:TX/RX" ];
bbtx1 = basebandTransmitter("My USRP 2944r 2");
bbtx1.CenterFrequency = CenterFreq;
bbtx1.RadioGain = USRP_gain;
bbtx1.SampleRate = Fs;
bbtx1.Antennas = [ "RFA:TX/RX", "RFB:TX/RX" ];
%% Transmit:
transmit(bbtx, waveform, "continuous");
fprintf("Transmission started for USRP 1 .\n")
transmit(bbtx1, waveform, "continuous");
fprintf("Transmission started for USRP 2 .\n")
%% Stop transmission:
pause;
stopTransmission(bbtx);
stopTransmission(bbtx1);
fprintf("Transmission stopped.\n")
0 Comments
Accepted Answer
  Ben Cunningham
    
 on 21 Aug 2025
        Hi Ahmed,
Good news, what you are looking for is now enabled as of MATLAB 2025a!
You can reference these documentation pages to see how you can achieve time synchronisation and precisely schedule transmit and capture operations:
0 Comments
More Answers (1)
  Martin Enderwitz
    
 on 9 May 2024
        
      Edited: Martin Enderwitz
    
 on 9 May 2024
  
      Hi Ahmed,
The basebandTransmitter does not currently support the use of multiple USRPs to transmit.
You can instead use the comm.SDRuTransmitter System Object to transmit with multiple USRPs. When you create an instance of the System Object, you can specify the IPAddress of each USRP device you want to use as a comma- or space-separated string. You can also use the ClockSource and PPSSource properties of the System Object.
The QPSK Transmitter with USRP Hardware example demonstrates how to use the System Object to transmit QPSK data with a single USRP, and can be adapted for your use case.
0 Comments
See Also
Categories
				Find more on Communications Toolbox in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

