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.
You can run this example by executing the usrpe3xxQPSKTransmitRepeatML script.
This simple example shows how to use the transmitRepeat feature with recorded data to exercise a receiver algorithm:
Loads the provided data.
comm.SDRTxE3xx object, which is used to communicate with the SDR hardware.
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, load the companion model usrpe3xxQPSKTransmitRepeatRecordSL model and generate your own custom dataset. In this case, comment out the load line above to use your own data from the workspace. 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
BasebandSampleRate properties of the transmitter System object must match the corresponding parameters of the receiver block in the Simulink model.
tx = sdrtx('E3xx', ... 'BasebandSampleRate', 520.841e3, ... 'CenterFrequency', 2.4e9, ... 'ChannelMapping', 1, ... 'ShowAdvancedProperties', true, ... 'BypassUserLogic', true);
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.
## 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.
You can now run the Simulink model containing the SDR receiver. QPSK modulated messages are transmitted continuously from the radio and running the model does not affect the transmitted data. For best performance, attach antennas or a loopback cable between the transmit and receive antennas.
After the transmission has started, run the usrpe3xxQPSKRxSL receiver model. The model diagnostic viewer displays decoded 'Hello World ###' messages.
To generate a custom dataset for transmission, use the usrpe3xxQPSKTransmitRepeatRecordSL model. The model saves the generated dataset into a workspace variable.
To be able to store the generated data in the hardware buffer, the size of the data must not be less than 4096 samples or exceed 8 million samples (4 million if using 2 channels).
USRP® is a trademark of National Instruments Corp.