Main Content

basebandTransmitter

Configure SDR as baseband transmitter

Description

Use the basebandTransmitter object to configure the specified software-defined radio (SDR) as a baseband transmitter to transmit IQ waveforms to the air.

This diagram shows the conceptual overview of transmitting radio signals in Wireless Testbench™ using a radio that you configure with this object. The onboard data buffering ensures contiguous data transmit. The transmission controller enables you to specify continuous or single-shot transmissions.

Arrows appoint the path of the transmit data. The transmit data path consists of MATLAB, onboard memory, transmission controller, and radio antenna.

Creation

Description

example

bbtx = basebandTransmitter(radio) creates a baseband transmitter object for the specified radio radio.

Note

The object requires exclusive access to radio hardware resources. Before creating this object, clear any existing Wireless Testbench object associated with the specified radio from the workspace.

bbtx = basebandTransmitter(radio,Name=Value) sets properties using one or more name-value arguments. For example, CenterFrequency=2.2e9 sets the center frequency to 2.2 GHz.

Input Arguments

expand all

Radio setup configuration, specified as a string scalar. To create a radio setup configuration, set up your radio and save your radio setup configuration using the Radio Setup wizard. Call the radioConfigurations function to list all saved radio setup configurations. For more information, see Connect and Set Up NI USRP Radios.

Example: "MyRadio" indicates that you saved a radio setup configuration under the name MyRadio in the Radio Setup wizard.

Properties

expand all

Radio center frequency in Hz, specified as one of these options.

  • Positive numeric scalar — The object applies this value by scalar expansion to each antenna in the Antennas property.

  • Numeric array — The object applies the ith array element value to the ith antenna in the Antennas property.

The valid center frequency range depends on the radio device.

Radio DeviceCenter Frequency

USRP™ N310

1 MHz to 6 GHz

USRP N320

1 MHz to 6 GHz

USRP N321

1 MHz to 6 GHz

Note

When setting this property for multiple antennas on the USRP N310 radio, consider these hardware characteristics.

  • The antenna ports on the RF0 and RF1 radio channels use the same center frequency. Therefore, set identical center frequency values for the antennas specified as "RF0:TX/RX" and "RF1:TX/RX".

  • The antenna ports on the RF2 and RF3 radio channels use the same center frequency. Therefore, set identical center frequency values for the antennas specified as "RF2:TX/RX" and "RF3:TX/RX".

Data Types: double

Transmit radio antennas, specified as one of these options.

  • String scalar — Specify use of single antenna.

  • String array — Specify use of multiple antennas.

Use this table to identify a supported radio antenna port on the radio device and the corresponding string constant that you can specify for this property.

Radio DeviceSupported Antenna PortValid String Scalar

USRP N310

RF0 channel: TX/RX port"RF0:TX/RX" (default)
RF1 channel: TX/RX port"RF1:TX/RX"
RF2 channel: TX/RX port"RF2:TX/RX"
RF3 channel: TX/RX port"RF3:TX/RX"

USRP N320

RF0 channel: TX/RX port"RF0:TX/RX" (default)
RF1 channel: TX/RX port"RF1:TX/RX"

USRP N321

RF0 channel: TX/RX port"RF0:TX/RX" (default)
RF1 channel: TX/RX port"RF1:TX/RX"

Note

When you update this property, the execution time of the next object function call increases by a few seconds.

Data Types: string

Transmit radio gain in dB, specified as one of these options.

  • Positive numeric scalar — The object applies this value by scalar expansion to each antenna that you specify in the Antennas property.

  • Numeric array — The object applies the ith array element value to the ith antenna in the Antennas property.

The valid gain range depends on the radio device.

Radio DeviceTransmit Radio Gain

USRP N310

0 dB to 65 dB

USRP N320

0 dB to 60 dB

USRP N321

0 dB to 60 dB

Data Types: double

Baseband sample rate in Hz, specified as positive numeric scalar. The object automatically selects the master clock rate available for the radio based on the specified sample rate. Therefore, the valid range for the sample rate depends on the master clock rate available on the radio. The sample rate must be less than or equal to MCR/2 or equal to MCR, where MCR is the master clock rate that the object selects. For more information, see Baseband Sample Rate in NI USRP Radios.

Radio DeviceSample RateMaster Clock Rate

USRP N310

120,471 Hz to 153.6 MHz

153.6e6 (default)

122.88 MHz

125.00 MHz

153.60 MHz

USRP N320

196,078 Hz to 250 MHz

250e6 (default)

200.00 MHz

245.76 MHz

250.00 MHz

USRP N321

196,078 Hz to 250 MHz

250e6 (default)

200.00 MHz

245.76 MHz

250.00 MHz

Note

To update this property, you must stop any ongoing transmission by calling the stopTransmission function on the object. When you update this property, the execution time of the next object function call increases by a few seconds.

Data Types: double

Object Functions

transmitTransmit waveform using baseband transmitter or transceiver
stopTransmissionStop transmission from baseband transmitter or transceiver

Examples

collapse all

Create a baseband transmitter object, specifying a radio setup configuration previously saved in the Radio Setup wizard.

bbtx = basebandTransmitter("MyRadio")
bbtx = 
  basebandTransmitter with properties:

          RadioGain: 10
    CenterFrequency: 2.4000e+09
         SampleRate: 250000000
           Antennas: "RF0:TX/RX"

Set the baseband sample rate and center frequency.

bbtx.SampleRate = 122.88e6;
bbtx.CenterFrequency = 2.2e9;

Generate random transmit waveform.

txWaveform = complex(randn(1000,1),randn(1000,1));

Transmit the generated waveform continuously with the radio associated with the baseband transmitter object using the default antenna.

transmit(bbtx,txWaveform,"continuous");

Stop the continuous transmission after 5 seconds.

pause(5);
stopTransmission(bbtx);

Version History

Introduced in R2022a