Main Content

Repeated Transmission of a QPSK Waveform Using USRP E3xx

This example shows how to use the Repeated Waveform Transmitter feature of the USRP™ Embedded Series Radio Support Package with Analog Devices AD9361/AD9364 to continuously transmit QPSK data. Transmitted data can be sourced from a provided QPSK signal or generated using the companion usrpe3xxQPSKTransmitRepeatRecordSL model. The transmitted data can then be received and decoded on the existing MATLAB® and Simulink® based QPSK receivers, all while using a single radio.

Refer to the Repeated Waveform Transmitter documentation for details on configuring your host computer to work with the Support Package for USRP Embedded Series Radio.


The Repeated Waveform Transmitter is a useful feature that allows recorded baseband data to be stored in hardware memory and repeatedly transmitted without gaps. The signal can then be received by the receiver on the same hardware. This example uses the transmitRepeat functionality to store and transmit pre-recorded QPSK data while using one of the MATLAB or Simulink QPSK receivers to capture and decode it on the same radio.


Before running the example, ensure you have performed the following steps:

1. Configure your host computer to work with the Support Package for USRP Embedded Series Radio. See Guided Host-Radio Hardware Setup for help.

2. The QPSK Receiver Using USRP E3xx Simulink example can be used to receive and decode the data.

Running the Example

You can run this example by executing the usrpe3xxQPSKTransmitRepeatML script.

Example Structure

This simple example shows how to use the transmitRepeat feature with recorded data to exercise a receiver algorithm:

  1. Loads the provided data.

  2. Creates the comm.SDRTxE3xx object, which is used to communicate with the SDR hardware.

  3. Uses the transmitRepeat method to store the QPSK data onto the hardware memory and continue transmitting until the release method is called.

Load Data into the Workspace

A dataset called 'usrpe3xxQPSKTransmitData.mat' has been provided, and can be loaded using the following command.

load('usrpe3xxQPSKTransmitData.mat'); % Comment out if using own data from workspace

Alternatively you can load the companion usrpe3xxQPSKTransmitRepeatRecordSL model and generate your own custom dataset. In this case the load line can be commented out. See Generating Custom Data for Transmission for more information on generating your own data.

Create the SDR Transmitter System Object

This example communicates with the radio hardware by using the comm.SDRTxE3xx System object. The Center Frequency and Baseband Sample Rate should match those used in the receiver.

tx = sdrtx('E3xx', ...
            'BasebandSampleRate',     520.841e3, ...
            'CenterFrequency',        2.4e9, ...
            'ChannelMapping',         1, ...
            'ShowAdvancedProperties', true, ...
            'BypassUserLogic',        true);

Begin Transmission

The transmitRepeat method transfers the baseband QPSK transmission to the SDR platform, and stores the signal samples in hardware memory. The example then transmits the waveform continuously over the air without gaps until the release method for the transmit object is called. Messages are displayed in the command window to confirm that transmission has started successfully.

transmitRepeat(tx, usrpe3xxQPSKTransmitData);
## Establishing connection to hardware. This process can take several seconds.
## Waveform transmission has started successfully and will repeat indefinitely. 
## Call the release method to stop the transmission.

To end the transmission, call the release method (release(tx)) from the MATLAB command window.

Receiving the Data

You can now run your receiver. QPSK modulated messages will be transmitted continuously from the radio and running a receiver will not affect the transmitted data. For best performance, attach antennas or a loopback cable between transmit and receive antennas.

Run the usrpe3xxQPSKRxSL receiver model after transmission has started and you should be able to see the decoded 'Hello World ###' messages.

Generating Custom Data for Transmission

An example of how to generate a custom dataset for transmission is provided in the usrpe3xxQPSKTransmitRepeatRecordSL model. The model is based on the usrpe3xxQPSKTxSL QPSK transmitter model, except now the data gets saved into a workspace variable rather than transmitted directly by the radio.

Note that in order for the recorded data to be successfully stored in the hardware buffer, the data you create cannot result in less than 4096 samples or exceed 8 million samples (4 million if using 2 channels).