sdrtx
Create transmitter System object for radio hardware
Add-On Required: This feature requires the Communications Toolbox Support Package for Analog Devices ADALM-Pluto Radio add-on.
Description
creates
a transmitter System object™, with default properties that transmits
data to the radio hardware specified by tx
= sdrtx(DeviceName
)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.
creates
a transmitter System object that overrides default values using
one or more tx
= sdrtx(DeviceName
,Name,Value
)Name,Value
pair arguments.
Examples
Create New Radio Transmitter System Object
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
DeviceName
— Name of radio hardware
character vector
Name of radio hardware, specified as a character vector. Currently, 'Pluto'
is
the only valid input in this support package.
Example: 'Pluto'
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'CenterFrequency',3.5e9,'Gain',-5
sets
the transmitter center RF frequency to 3.5
GHz
and gain to -5
dB.
RadioID
— Radio identification number
'usb:0'
(default) | character vector
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, respectivelyAn 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:
Clear all SDR objects.
Connect all radios.
Check to confirm that the connected radios are recognized by running this command:
findPlutoRadio
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');
CenterFrequency
— RF center frequency setting in Hz
2.4e9
(default) | scalar
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
— Gain
-10
(default) | scalar
Gain, specified as a scalar from -89.75
to 0
dB
with a resolution of 0.25
dB.
Tunable: Yes
Data Types: double
ChannelMapping
— Channel mapping
1
(default)
This property is read-only.
The channel mapping is always set to 1
.
BasebandSampleRate
— Baseband sampling rate
1.0e6
(default) | scalar
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
ShowAdvancedProperties
— Option to show advanced properties
false
(default) | true
Option to show advanced properties, specified as true
or false
.
Data Types: logical
UseCustomFilter
— Use custom filter
false
(default) | true
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 thedesignCustomFilter
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
FrequencyCorrection
— Frequency correction value in ppm
0
(default) | scalar
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 is0
, the factory-calibrated setting of the radio will be used.The
FrequencyCorrection
property changes the actual radio setting forBasebandSampleRate
andCenterFrequency
.
Tunable: Yes
Dependencies
To view this property, set ShowAdvancedProperties
to
true
.
Data Types: double
DataSourceSelect
— Select data source
'Input Port'
(default) | 'DDS'
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
DDSTone1Freq
— First DDS tone frequency in Hz
5000
(default) | numeric scalar | 1-by-2 numeric vector
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
N
th element of the vector is applied to theN
th channel specified by theChannelMapping
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
DDSTone2Freq
— Second DDS tone frequency in Hz
10000
(default) | numeric scalar | 1-by-2 numeric vector
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
N
th element of the vector is applied to theN
th channel specified by theChannelMapping
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
DDSTone1Scale
— First DDS tone scale
0.5000
(default) | numeric scalar | 1-by-2 numeric vector
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
N
th element of the vector is applied to theN
th channel specified by theChannelMapping
property.
The valid range of DDSTone1Scale
is from 0 to 1.
Dependencies
To enable this property, set DataSourceSelect
to 'DDS'
.
Data Types: double
DDSTone2Scale
— Second DDS tone scale
0.2500
(default) | numeric scalar | 1-by-2 numeric vector
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
N
th element of the vector is applied to theN
th channel specified by theChannelMapping
property.
The valid range of DDSTone2Scale
is from 0 to 1.
Dependencies
To enable this property, set DataSourceSelect
to 'DDS'
.
Data Types: double
BISTLoopbackMode
— Built-in self-test (BIST) loopback mode
'Disabled'
(default) | 'Digital Tx -> Digital Rx'
| 'RF Rx -> RF Tx'
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
BISTToneInject
— BIST signal injection mode
'Disabled'
(default) | 'Tone Inject Tx'
| 'Tone Inject Rx'
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
BISTSignalGen
— Source of BIST signal generation
'PRBS'
(default) | 'Tone'
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 theBISTToneFreq
andBISTToneLevel
properties, respectively.
Dependencies
To enable this property, set BISTToneInject
to 'Tone Inject Tx'
or 'Tone Inject Rx'
.
Data Types: char
| string
BISTToneFreq
— BIST tone frequency
'Fs/32'
(default) | 'Fs/16'
| 'Fs*3/32'
| 'Fs/8'
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
BISTToneLevel
— BIST tone level
'0'
(default) | '-6'
| '-12'
| '-18'
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
tx
— Transmitter System object
character vector
Name of the transmitter for the specified hardware, returned as a System object.
Version History
Introduced in R2017a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)