sdrtx

Create transmitter System object for radio hardware

Description

example

tx = sdrtx(DeviceName) creates a transmitter System object™, with default properties that transmits data to the radio hardware specified by DeviceName. The object transmits data over a USB communication connection.

A transmitter System object connects to the radio hardware when you call the object. After creating a transmitter radio object, use the info object function of comm.SDRTxPluto to verify host-hardware communication. The object stays connected until you call the release method.

Note

Instead of using the step method to perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

tx = sdrtx(DeviceName,Name,Value) creates a transmitter System object that overrides default values using one or more Name,Value pair arguments.

Examples

collapse all

Create a transmitter System object for an ADALM-PLUTO radio.

tx = sdrtx('Pluto')
tx = 

  comm.SDRTxPluto with properties:

            DeviceName: 'Pluto'
               RadioID: 'usb:0'
       CenterFrequency: 2.4000e+09
                  Gain: -10
        ChannelMapping: 1
    BasebandSampleRate: 1000000

Input Arguments

collapse all

Name of radio hardware, specified as a character vector. Currently, 'Pluto' is the only valid input in this support package.

Example: 'Pluto'

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'CenterFrequency',3.5e9,'Gain',-5 sets the transmitter center RF frequency to 3.5 GHz and gain to -5 dB.

Main Properties

collapse all

Radio identification number, specified as one of the following character vectors:

  • (recommended) A device-independent index, with the prefix usb:, such as 'usb:0', 'usb:1', 'usb:2', …, indicating the first, second, third, ..., attached ADALM-PLUTO radio, respectively

  • An IP address, with the prefix ip:, such as 'ip:192.168.2.1'

  • A serial number, represented by a hexadecimal string with the prefix sn:, such as'sn:100000235523730700230031090216eaeb'

Note

When working with multiple radios, if devices are inserted or removed, the host computer assignment of USB addresses might change. Any time an SDR device is inserted or removed from a USB port, the host computer polls all USB ports and assigns or reassigns the radio addresses associated with connected devices.

When operating on Windows® keep these considerations in mind.

  • When running multiple radios on the same host in separate MATLAB® sessions, for each MATLAB session the first radio is assigned usb:0, and the ID number increments by one for subsequent radios.

  • Radios that are being used by one MATLAB are not seen by other MATLAB sessions. Use findPlutoRadio and check the reported serial number to identify the radios seen in a particular MATLAB session.

To ensure that all assigned radio identities remain static, do not connect or disconnect radios after SDR objects have been created. The best practice is to connect radios and create SDR objects in this order:

  1. Clear all SDR objects.

  2. Connect all radios.

  3. Check to confirm that the connected radios are recognized by running this command:

    findPlutoRadio

  4. Create SDR objects.

To interface with the radio hardware, the RadioID property of the radio object must match the radio ID of the radio hardware. Update the RadioID property, if necessary.

When running multiple radios on the same host, the host assigns each radio a different radio ID. When identifying the radio by USB ID, the first radio is assigned usb:0, and the ID number increments by one for subsequent radios. For example, to assign IDs to two radios connected on the same host computer, at the MATLAB command prompt, enter:

rx = sdrrx('Pluto','RadioID','usb:0'); 
tx = sdrtx('Pluto','RadioID','usb:1');

RF center frequency setting in Hz, specified as a scalar from 70.0e6 to 6.0e9.

Note

Analog Devices® qualifies the PLUTO radio over a tuning range of 325 MHz to 3.8 GHz. This support package enables you to use the PLUTO radio outside the qualified tuning range by configuring the radio to operate using the AD9364 firmware. To extend the frequency range, at the MATLAB command prompt, enter configurePlutoRadio('AD9364').

Tunable: Yes

Data Types: double

Gain, specified as a scalar from -89.75 to 0 dB with a resolution of 0.25 dB.

Tunable: Yes

Data Types: double

This property is read-only.

The channel mapping is always set to 1.

Baseband sampling rate in Hz, specified as a scalar from 65105 to 61.44e6 samples per second.

Note

The actual computed value and your specified setting can have a small mismatch. To confirm that the actual computed value is close enough to your specified setting, call the info object function on the radio object.

Data Types: double

Advance Properties

collapse all

Option to show advanced properties, specified as true or false.

Use custom filter, specified as one of these values.

  • false — The filter chain uses the default filter design.

  • true — The filter chain uses a custom filter design. To design a custom filter, call the designCustomFilter function.

Note

When applying a custom filter to a sdrtx System object, the UseCustomFilter property is automatically set to true. To switch between the default and your custom filter, set UseCustomFilter property to false or true, respectively.

For more information, see Baseband Sampling Rate and Filter Chains.

Data Types: logical

Frequency correction value in ppm, specified as a scalar from -200 to 200. This property value corrects frequency shifts in data due to local oscillator frequency offset or clock rate inaccuracy.

Note

  • When the FrequencyCorrection setting is 0, the factory-calibrated setting of the radio will be used.

  • The FrequencyCorrection property changes the actual radio setting for BasebandSampleRate and CenterFrequency.

Tunable: Yes

Dependencies

To view this property, set ShowAdvancedProperties to true.

Data Types: double

Select data source, specified as 'Input Port' or 'DDS'.

When you select direct digital synthesis ('DDS') as the source of data, the object enables two additive tones for each channel. To set the tone frequency and tone scale of these tones, use the DDSTone1Freq, DDSTone2Freq, DDSTone1Scale, and DDSTone2Scale properties. The DDS signals are generated on the FPGA.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: char | string

First DDS tone frequency in Hz, specified as one of these options:

  • Numeric scalar — Use this option for a single channel or to specify the same frequency for two channels. The object applies scalar expansion for each channel specified by the ChannelMapping property.

  • 1-by-2 numeric vector — Use this option to specify different frequencies for two channels. The Nth element of the vector is applied to the Nth channel specified by the ChannelMapping property.

The valid range of DDSTone1Freq is from 0 to BasebandSampleRate divided by 2.

Dependencies

To enable this property, set DataSourceSelect to 'DDS'.

Data Types: double

Second DDS tone frequency in Hz, specified as one of these options:

  • Numeric scalar — Use this option for a single channel or to specify the same frequency for two channels. The object applies scalar expansion for each channel specified by the ChannelMapping property.

  • 1-by-2 numeric vector — Use this option to specify different frequencies for two channels. The Nth element of the vector is applied to the Nth channel specified by the ChannelMapping property.

The valid range of DDSTone2Freq is 0 Hz to BasebandSampleRate divided by 2.

Dependencies

To enable this property, set DataSourceSelect to 'DDS'.

Data Types: double

First DDS tone scale in millionths of full scale, specified as one of these options:

  • Numeric scalar — Use this option for a single channel or to specify the same scale for two channels. The object applies scalar expansion for each channel specified by the ChannelMapping property.

  • 1-by-2 numeric vector — Use this option to specify different scales for two channels. The Nth element of the vector is applied to the Nth channel specified by the ChannelMapping property.

The valid range of DDSTone1Scale is from 0 to 1.

Dependencies

To enable this property, set DataSourceSelect to 'DDS'.

Data Types: double

Second DDS tone scale in millionths of full scale, specified as one of these options:

  • Numeric scalar — Use this option for a single channel or to specify the same scale for two channels. The object applies scalar expansion for each channel specified by the ChannelMapping property.

  • 1-by-2 numeric vector — Use this option to specify different scales for two channels. The Nth element of the vector is applied to the Nth channel specified by the ChannelMapping property.

The valid range of DDSTone2Scale is from 0 to 1.

Dependencies

To enable this property, set DataSourceSelect to 'DDS'.

Data Types: double

Built-in self-test loopback mode, specified as one of these options:

  • 'Disabled' — Disable BIST loopback.

  • 'Digital Tx -> Digital Rx' — Enable digital signals to loop back within the AD936x device. The signals bypass the RF stage.

  • 'RF Rx -> RF Tx' — Enable incoming receiver RF signals to loop back to the RF transmitter port. The signals bypass the FPGA.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: char | string

BIST signal injection mode, specified as one of these options:

  • 'Disabled' — Disable BIST signal injection.

  • 'Tone Inject Tx' — Enable BIST signal injection to transmit path.

  • 'Tone Inject Rx' — Enable BIST signal injection to receive path.

When you enable BIST signal injection, you can set the source of BIST signal generation with the BISTSignalGen property.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: char | string

Source of BIST signal generation, specified as one of these options:

  • 'PRBS' — Use the pseudo random binary sequence (PRBS) generator of the board.

  • 'Tone' — Use the tone generator of the board. To set the tone frequency and tone level, use the BISTToneFreq and BISTToneLevel properties, respectively.

Dependencies

To enable this property, set BISTToneInject to 'Tone Inject Tx' or 'Tone Inject Rx'.

Data Types: char | string

BIST tone frequency, specified as 'Fs/32', 'Fs/16', 'Fs*3/32', or 'Fs/8'.

Dependencies

To enable this property, set BISTSignalGen to 'Tone'.

Data Types: char | string

BIST tone level in dB, specified as '0', '-6', '-12', or '-18' .

Dependencies

To enable this property, set BISTSignalGen to 'Tone'.

Data Types: char | string

Output Arguments

collapse all

Name of the transmitter for the specified hardware, returned as a System object.

See Also

Functions

System Objects

Blocks

Introduced in R2017a