Repeated Waveform Transmitter
You can download any signal waveform to the hardware and transmit it repeatedly over the air using a transmitter System object™. This feature enables you to use the transmitter system object, and the hardware as an RF signal generator. You can create any arbitrary waveform at the baseband in MATLAB® and transmit it repeatedly from the hardware. You are not limited by the Ethernet link or the processing speed of the host computer for signal transmission over the air.
Use this feature to:
Transmit signals such as reference signals and radio beacons.
Provide waveforms that are continuously transmitted and do not rely on the host for further signal generation.
Transmit a fixed waveform at a specific rate until you explicitly stop it.
Repeatedly transmit a signal from the hardware using a targeted bitstream.
To call the repeated waveform transmitter, use the transmitRepeat
function of the transmitter System object.
Note
When you use transmitRepeat
in single channel mode, the number
of samples must be even.
Continuously Transmit 100 kHz Complex Tone
Perform these steps to send a complex tone of 100 kHz at a baseband sample rate of 2 MHz.
Generate a waveform.
fs = 2e6; sw = dsp.SineWave; sw.Amplitude = 0.5; sw.Frequency = 100e3; sw.ComplexOutput = true; sw.SampleRate = fs; sw.SamplesPerFrame = 20000; txWaveform = sw();
Create a transmitter System object for the USRP™ E3xx embedded series radio and set desired radio settings.
tx = sdrtx('E3xx'); tx.CenterFrequency = 2.415e9; tx.BasebandSampleRate = fs; tx.Gain = 0;
Send waveform to the radio and repeatedly transmit it.
transmitRepeat(tx,txWaveform);
Stop transmitting and release object.
release(tx);
Update Waveform or Tunable properties
You can update the waveform or tunable properties in real-time by calling the
transmitRepeat
function again.
Generate a waveform.
fs = 2e6; sw = dsp.SineWave; sw.Amplitude = 0.5; sw.Frequency = 100e3; sw.ComplexOutput = true; sw.SampleRate = fs; sw.SamplesPerFrame = 20000; txWaveform = sw();
Create a transmitter System object for the USRP E3xx embedded series radio and set desired radio settings.
tx = sdrtx('E3xx'); tx.CenterFrequency = 2.415e9; tx.BasebandSampleRate = fs; tx.Gain = 0;
Send waveform to the radio and repeatedly transmit it.
transmitRepeat(tx,txWaveform);
Create a new sinusoid with a different frequency and change the transmit gain.
sw.Amplitude = 0.5; sw.Frequency = 200e3; txWaveformNew = sw(); tx.Gain = -3;
Send the new waveform and updated gain value to the radio and repeatedly transmit it.
transmitRepeat(tx,txWaveformnew);
Stop transmitting and release object.
release(tx);
Transmit and Receive On Single Device
To transmit and receive waveform data using a single device, use the
transmitRepeat
function. Make sure the device is powered on,
configured correctly for use with the Communications Toolbox™ Support Package for USRP Embedded Series Radio, and able to send and receive signals.
The general workflow for this feature is:
Generate data for transmitting (as shown in the previous section).
Create a receiver design.
Create a transmitter System object.
Note
The baseband sample rate of the transmitter System object must be equal with the baseband sample rate of the receiver System object or block from the receiver design.
Call the
transmitRepeat
function of the transmitter System object.Set up antennas or loopback.
Call the receiver you created in Step 2.
Repeated Waveform Transmitter Troubleshooting
If you have trouble transmitting your waveform, consult this table for a possible solution.
Message or Condition | Probable Cause |
---|---|
| You tried to change a radio setting, or attempted to send a different
waveform, or called the System object while the waveform was being transmitted. For each of these
actions, you must call the release method first, and then
restart the transmission. |
Tunable properties have no effect during a repeated waveform transmission. | You tried to adjust a tunable property. You cannot do that during the repeated waveform transmission. |
The requested number of samples is greater than what is available in the hardware buffer. Either reduce the length of the waveform or the number of channels. | The radio cannot support repeated waveform transmission with the current values you have set. Further information on available samples and how the selected values exceed this limit appear below the error message. For example: The maximum samples per frame for the selected channel mapping is 16777216. |