comm.SDRRxAD936x
Receive data from AD936x-based Zynq radio hardware
Add-On Required: This feature requires the SoC Blockset Support Package for AMD FPGA and SoC Devices add-on.
Description
The comm.SDRRxAD936x
System object™ receives data from an AD936x-based Zynq® radio hardware.
To use this object, in the hardware setup, select one of these supported Xilinx® boards and add-on cards.
Analog Devices® RF SOM
Xilinx Zynq ZC706 Evaluation Kit with Analog Devices FMCOMMS2/3/4 RF card
ZedBoard™ with Analog Devices FMCOMMS2/3/4 RF card
Zynq UltraScale+™ MPSoC ZCU102 Evaluation Kit with Analog Devices FMCOMMS2/3/4 RF card
You can use the comm.SDRRxAD936x
System object to simulate and develop various software-defined radio (SDR) applications. This
diagram shows the conceptual overview of transmitting and receiving radio signals in
MATLAB® using the comm.SDRRxAD936x
receiver System object to receive data from the radio hardware.
To receive data from the AD936x-based Zynq radio hardware:
Create the
comm.SDRRxAD936x
object and set its properties.Call the object as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
Creation
To create a comm.SDRRxAD936x
System object, use the sdrrx
function with input argument
'AD936x'
. For example:
rx = sdrrx('AD936x')
To create the object with properties set to specific values, call the function using one or more name-value arguments. For example:
rx = sdrrx('AD936x', ... 'IPAddress','192.168.3.2', ... 'CenterFrequency',2.2e9, ... 'BasebandSampleRate',800e3)
Properties
The comm.SDRRxAD936x
receiver System object supports up to two channels to receive data from the AD936x-based Zynq radio hardware. Use the ChannelMapping
property to indicate whether to use a single channel or both
channels. For each channel, you can set the Gain
property independently, or you can apply the same setting to both channels. All other property
values are applied to each channel in use.
Unless otherwise indicated, properties are nontunable, which means you cannot change their
values after calling the object. Objects lock when you call them, and the
release
function unlocks them.
If a property is tunable, you can change its value at any time.
For more information on changing property values, see System Design in MATLAB Using System Objects.
Main PropertiesIPAddress
— IP address of radio hardware
'192.168.3.2'
(default) | dotted-quad character vector
IP address of the radio hardware, specified as a dotted-quad character vector.
This value must match the physical IP address of the radio hardware assigned during
hardware setup. For more information, see Set Up Xilinx Devices. If you configure the radio hardware with an IP address
other than the default, update IPAddress
accordingly.
Data Types: char
| string
CenterFrequency
— RF center frequency in Hz
2400000000
(default) | nonnegative finite scalar
RF center frequency in Hz, specified as a nonnegative finite scalar. The valid range for center frequency is 70 MHz to 6 GHz.
Tunable: Yes
Data Types: double
ChannelMapping
— Channel output mapping
1
(default) | 2
| [1 2]
This property is read-only.
Channel output mapping, specified as one of these values:
1
— Only channel 1 is in use.2
— Only channel 2 is in use.[1 2]
— Both channels are in use.
The RF chip of the radio hardware determines the number of channels you can use for receiving data.
Supported Radio Hardware | RF Chip | Number of Channels | Supported RF Ports |
---|---|---|---|
ADI RF SOM ZC706 and FMCOMMS2 or FMCOMMS3 ZedBoard and FMCOMMS2 or FMCOMMS3 ZCU102 and FMCOMMS2 or FMCOMMS3 | AD9361 | 2 | TX1A, RX1A, TX2A, RX2A |
ZC706 and FMCOMMS4 ZedBoard and FMCOMMS4 ZCU102 and FMCOMMS4 | AD9364 | 1 | TXA, RXA |
GainSource
— Source of gain
'AGC Slow
Attack'
(default) | 'AGC Fast Attack'
| 'Manual'
Source of gain, specified as one of these values:
'AGC Slow Attack'
— For signals with slowly changing power levels.'AGC Fast Attack'
— For signals with rapidly changing power levels.'Manual'
— Specify the gain by using theGain
property.
Data Types: char
| string
Gain
— Gain in dB
1
(default) | numeric scalar | 1-by-2 numeric vector
Gain in dB, specified as a numeric scalar or a 1-by-2 numeric vector. The valid gain range is from –10 dB to 73 dB and depends on the center frequency. An incompatible gain and center frequency combination returns an error from the radio hardware. For the acceptable minimum and maximum gain values per center frequency, check the manufacturer's specification.
Set the gain based on the ChannelMapping
property.
For a single channel, specify the gain as a scalar.
For two channels that use the same gain value, specify the gain as a scalar. The object applies the gain by scalar expansion.
For two channels that use different gain values, specify the gain as a 1-by-2 vector. The
i
th element of the vector is applied to thei
th channel specified by theChannelMapping
property.
Dependencies
To enable this property, set GainSource
to 'Manual'
.
Data Types: double
BasebandSampleRate
— Baseband sampling rate in Hz
1000000
(default) | positive scalar
Baseband sampling rate in Hz, specified as a positive scalar. The valid range of this property is 520.834 kHz to 61.44 MHz.
Note
To synchronize the comm.SDRRxAD936x
System object with the radio hardware, call the info
function on the object. If
the specified and actual rates have a small mismatch, verify that the computed rate
is close to the value you actually want.
Data Types: double
OutputDataType
— Complex data type of output signal
'int16'
(default) | 'single'
| 'double'
Complex data type of the output signal, specified as one of these values:
'int16'
— Integer values are the raw 16-bit I and Q samples from the board. The 12-bit value from the ADC of the AD9361/AD9364 RF chip is sign-extended to 16 bits.'single'
— Single-precision floating point values are scaled to the range of [–1, 1]. The object derives this value from the sign-extended 16 bits received from the board.'double'
— Double-precision floating point values are scaled to the range of [–1, 1]. The object derives this value from the sign-extended 16 bits received from the board.
SamplesPerFrame
— Number of samples per frame
20000
(default) | positive integer
Number of samples per frame, specified as a positive integer. In single-channel mode, the
number of samples per frame must be even. When streaming to the host, using large frame
sizes can give more efficient performance. To determine real-time execution of the
object, use the overflow
output argument.
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
NumFramesInBurst
property. For more information on how to use
this property, see
Burst Mode.
Data Types: logical
NumFramesInBurst
— Number of frames in contiguous burst
1
(default) | positive integer
Number of frames in a contiguous burst, specified as a positive integer.
Dependencies
To enable this property, set EnableBurstMode
to
true
.
Data Types: double
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. For example, if the gain or bandwidth characteristics of the default filter does not satisfy the requirements for your application, you can design a custom filter that meets your specific requirements. To design a custom filter, call thedesignCustomFilter
function.
Note
When applying a custom filter to a comm.SDRRxAD936x
System object, the UseCustomFilter
property is
automatically set to true
. To switch between the default and
your custom filter, set the UseCustomFilter
property to
false
or true
, respectively.
For more information, see Baseband Sampling Rate and Filter Chains.
Data Types: logical
ShowAdvancedProperties
— Enable advanced properties
false
(default) | true
Enable advanced properties, specified as false
or
true
.
When you set this property to true
, these advanced properties are
enabled.
Data Types: logical
BypassUserLogic
— Option for bypassing user logic
false
(default) | true
Option for bypassing user logic, specified as false
or
true
. When the property is true
, the radio
hardware data path bypasses the algorithm generated and programmed during FPGA targeting
or hardware-software co-design. For more information, see FPGA Targeting Workflow and Hardware-Software Co-Design Workflow.
Dependencies
To enable this property, set ShowAdvancedProperties
to true
.
Data Types: logical
EnableQuadratureCorrection
— Quadrature correction
true
(default) | false
Quadrature correction, specified as true
or false
. When this property is true
, the object applies in-phase and quadrature (IQ) imbalance compensation.
Dependencies
To enable this property, set ShowAdvancedProperties
to true
.
Data Types: logical
EnableRFDCCorrection
— RF DC correction
true
(default) | false
RF direct current (DC) correction, specified as true
or
false
. When this property is true
, the object
applies an RF DC blocking filter.
Dependencies
To enable this property, set ShowAdvancedProperties
to true
.
Data Types: logical
EnableBasebandDCCorrection
— Baseband DC correction
true
(default) | false
Baseband DC correction, specified as true
or false
. When
this property is true
, the object applies a baseband DC blocking
filter.
Dependencies
To enable this property, set ShowAdvancedProperties
to true
.
Data Types: logical
DataTimeout
— Timeout for I/O operations in seconds
Inf
(default) | nonnegative scalar
Timeout for I/O operations in seconds, specified as one of these options:
Inf
— The object waits indefinitely to complete I/O operations.Nonnegative scalar, N — The object waits N seconds to complete I/O operations. Zero seconds corresponds to a non-blocking setup.
Dependencies
To enable this property, set ShowAdvancedProperties
to
true
.
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 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 the transmit path.'Tone Inject Rx'
— Enable BIST signal injection to the 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, specified as '0'
, '-6'
,
'-12'
, or '-18'
.
Dependencies
To enable this property, set BISTSignalGen
to 'Tone'
.
Data Types: char
| string
Usage
Description
[
returns data received from the radio hardware associated with the
data
,validData
,overflow
]
= rx()comm.SDRRxAD936x
receiver System object
rx
. The output validData
indicates whether the
object has received data from the radio hardware. The output overflow
indicates data discontinuity. If overflow
is true
,
then data
does not represent contiguous data. The first valid data
frame can contain transient values, resulting in packets containing undefined data.
Output Arguments
data
— Output signal
complex matrix
Output signal received from the radio hardware, returned as a complex matrix. The
number of columns in the matrix depends on the number of channels in use, as specified
by the ChannelMapping
property. Each column corresponds to a channel of complex
data received on one channel.
The output signal supports complex values with these data types:
16-bit signed integers — Complex values are the raw 16-bit I and Q samples from the board. The 12-bit value from the ADC of the AD9361/AD9364 RF chip is sign-extended to 16 bits.
Single-precision floating point — Complex values are scaled to the range of [–1, 1]. The object derives this value from the sign-extended 16 bits received from the board.
Double-precision floating point — Complex values are scaled to the range of [–1, 1]. The object derives this value from the sign-extended 16 bits received from the board.
To specify the base type, use the OutputDataType
property.
Data Types: int16
| single
| double
Complex Number Support: Yes
validData
— Valid data indicator
logical scalar
Valid data indicator, returned as a logical scalar.
true
indicates thatrx
has received data from the radio hardware.false
indicates thatrx
has not received data from the radio hardware.
When the DataTimeout
property is set to Inf
, the
output validData
is always true
. In this case,
the object waits indefinitely until data reception. To qualify data validity, set
DataTimeout
to a value other than
Inf
.
overflow
— Data discontinuity flag
logical scalar
Data discontinuity flag, returned as a logical scalar.
true
indicates the presence of overflow resulting in noncontiguous data.false
indicates no overflow.
You can use this value as a diagnostic tool to determine real-time execution of the object.
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Specific to comm.SDRRxAD936x
capture | Capture contiguous RF data using Xilinx Zynq-based radio hardware |
designCustomFilter | Design custom filter for Analog Devices AD9361/AD9364 RF chip |
info | Synchronize receiver or transmitter radio settings with radio hardware |
Examples
Receive Data from AD936x-Based Radio Hardware
Create a receiver System object for the AD936x-based Zynq radio hardware with the specified properties. Use a single channel.
rx = sdrrx('AD936x', ... 'IPAddress','192.168.3.2', ... 'CenterFrequency',2.2e9, ... 'BasebandSampleRate',800e3, ... 'ChannelMapping',1)
rx = comm.SDRRxAD936x with properties: Main DeviceName: 'AD936x' IPAddress: '192.168.3.2' CenterFrequency: 2.2000e+09 GainSource: 'AGC Slow Attack' ChannelMapping: 1 BasebandSampleRate: 800000 OutputDataType: 'int16' SamplesPerFrame: 20000 EnableBurstMode: false ShowAdvancedProperties: false Show all properties
Create a log for recording data.
Log = dsp.SignalSink;
Receive and validate data by using the receiver System object. Save valid data using the log.
for counter = 1:20 [data,validData,overflow] = rx(); if validData == 1 if overflow ~=1 % contiguous data Log(data); end else disp('Not valid data.'); end end
## Establishing connection to hardware. This process can take several seconds.
Version History
Introduced in R2018b
See Also
Objects
Blocks
Topics
External Websites
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes 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)