Main Content

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.

  1. 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();
    

  2. 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;
    

  3. Send waveform to the radio and repeatedly transmit it.

    transmitRepeat(tx,txWaveform);

  4. 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.

  1. 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();
    

  2. 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;
    

  3. Send waveform to the radio and repeatedly transmit it.

    transmitRepeat(tx,txWaveform);

  4. 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;

  5. Send the new waveform and updated gain value to the radio and repeatedly transmit it.

    transmitRepeat(tx,txWaveformnew);

  6. 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:

  1. Generate data for transmitting (as shown in the previous section).

  2. Create a receiver design.

  3. 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.

  4. Call the transmitRepeat function of the transmitter System object.

  5. Set up antennas or loopback.

  6. 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 ConditionProbable Cause
  • The transmitter is currently busy sending a repeated waveform from the hardware memory.

  • Changing the value of a nontunable property is not allowed.

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.

See Also

Functions

Objects

Related Topics