In Communication Toolbox Support Package for USRP Radio, how to synchronize Tx and Rx time stamps to achieve true full-duplex?
Show older comments
As I use MATLAB to process data associated with my USRP radio project, it would be easier for me to use MATLAB/Simulink to directly control USRP. I want to achieve real full-duplex operation, meaning that the Tx and Rx of the same USRP channel can operate simultaneously. To achieve this, I will need to control the time stamps of both the Tx and Rx.
For example, as a simple project, I have a USRP B200mini, which has one channel with a Tx and a Rx port. I connect a cable directly from the Tx port and the Rx port, and both Tx and Rx are configured at the same carrier frequency. This is a wired channel so there is no channel fading, so I am supposed to get very clear transmitted baseband samples at the Rx. However, without precise Tx-Rx time-stamp synchronization, this cannot be achieved. This is because no matter you write a MATLAB script (using SDRu Tx and SDRu Rx System Objects) or construct a Simulink model (using SDRu Tx and SDRu Rx blocks), the Tx and Rx won't work simultaneously. MATLAB script execute in sequence, and Simulink blocks also have a predefined execution order (it won't help changing the Simulink block execution priority or using a triggered subsystem).
I can do this conveniently in LabVIEW, because it has the "StartTrigger" VI and "SetTime" VI that allows me to specify the time both Tx and Rx start working, to millisecond precision. However, I haven't yet seen this utility in MATLAB/Simulink.
I have checked the link here: https://www.mathworks.com/help/supportpkg/usrpradio/ug/family-radio-service-frs-full-duplex-transceiver-with-usrp-r-hardware.html. Unfortunately it doesn't work for the above-described B200mini project.
Can anyone help me with this, or offer some workaround? Greatly appreciated.
5 Comments
Guoyi Xu
on 4 Jan 2023
Edited: Walter Roberson
on 4 Jan 2023
yusho nakawaki
on 28 Feb 2023
I am also trying to transmit and receive data synchronization with B210. To solve it, I think parpool is necessary. But I faced some error cased by parpool. Do you consider using parpool?
Krishna
on 9 Aug 2023
Hi Guoyi Xu,
I understand the you are trying to acheive precise Tx-Rx timestamp synchronization with a B-series USRP radio.
Please know that trigger time based transmission and reception capability is not yet supported in the current MATLAB version.
In this case, to simulataneously use the transmitter and receiver, you need to use two different MATLAB sessions. But for Simulink based transmission and reception, this is not required.
Additionally, you can refer to this synchronization example in the following MathWorks documentation link to know how simultaneous transmission and reception works:
I hope this resolves your issue.
Guoyi Xu
on 9 Aug 2023
Guoyi Xu
on 9 Aug 2023
Answers (1)
Karunya Choppara
on 20 Sep 2023
Edited: Karunya Choppara
on 20 Sep 2023
0 votes
Trigger time based transmit and receive is supported with MATLAB in R2023b. To get the latest version of MATLAB check the page https://in.mathworks.com/downloads/
Use the properties 'EnableTimeTrigger' and 'TriggerTime' in comm.SDRuReceiver and comm.SDRuTransmitter system objects in MATLAB to use trigger based receive and transmit respectively.
This functionality is also available with SImulink blocks.
Thanks
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!