sdrrx
Create receiver 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 receiver System object™ with default properties that receives
data from the radio hardware specified by rx
= sdrrx(DeviceName
)DeviceName
.
The object receives data over a USB communication connection.
The receiver System object connects to the radio hardware when you call the object. After
creating a receiver radio object, use the info
object function of comm.SDRRxPluto
to verify
host-hardware communication. The object stays connected until you call the
release
method.
specifies
additional properties using one or more rx
= sdrrx(DeviceName
,Name,Value
)Name,Value
pair
arguments. Unspecified properties take default values.
Examples
Create New Radio Receiver System Object
Create a receiver System object for a ADALM-PLUTO radio.
rx = sdrrx('Pluto')
rx = comm.SDRRxPluto with properties: Main DeviceName: 'Pluto' RadioID: 'usb:0' CenterFrequency: 2.4000e+09 GainSource: 'AGC Slow Attack' ChannelMapping: 1 BasebandSampleRate: 1000000 OutputDataType: 'int16' SamplesPerFrame: 20000 EnableBurstMode: false ShowAdvancedProperties: false Show all properties
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: GainSource','Manual','Gain',20
sets
the receiver gain to 20 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
ChannelMapping
— Channel mapping
1
(default)
This property is read-only.
The channel mapping is always set to 1
.
GainSource
— Gain source
'AGC Slow Attack'
(default) | 'AGC Fast Attack'
| 'Manual'
Gain source, specified as one of the following:
'AGC Slow Attack'
— For signals with slowly changing power levels'AGC Fast Attack'
— For signals with rapidly changing power levels'Manual'
— For setting the gain manually with theGain
property
Data Types: char
| string
Gain
— Radio receiver gain
10
(default) | scalar
Radio receiver gain in dB, specified as a scalar from -4
to 71
.
Note
The acceptable minimum and maximum gain setting depends on the center frequency. An incompatible gain and center frequency combination returns an error.
Tunable: Yes
Dependencies
To enable this property, set GainSource
to
'Manual'
.
Data Types: double
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
OutputDataType
— Output signal data type
'int16'
(default) | 'single'
| 'double'
Output signal data type, specified as one of the following:
int16
— 16-bit signed integersdouble
— Double-precision floating pointsingle
— Single-precision floating point
SamplesPerFrame
— Number of samples per frame
20,000
(default) | positive integer
Number of samples per frame, specified as an even positive integer from 2 to 16,777,216. Using values less than 3660 can yield poor performance.
Data Types: double
EnableBurstMode
— Option for burst mode
false
(default) | true
Option for burst mode, specified as false
or true
.
When set to true
, this property produces a set of contiguous samples without
overflow. This setting can help simulate models that cannot run in real time. When you enable
burst mode, specify the amount of contiguous data using the property. For more information on
how to use this property, see Burst Mode.
Data Types: logical
NumFramesInBurst
— Number of frames in a contiguous burst
1
(default) | strictly positive integer
Number of frames in a contiguous burst, specified as a strictly positive integer.
Dependencies
To enable this property, set EnableBurstMode
to
true
.
Data Types: double
Output Arguments
rx
— Receiver System object
character vector
Receiver for the specified hardware, returned as a System object.
Version History
Introduced in R2017a
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
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)