comm.SDRTxFMCOMMS5
Send data to FMCOMMS5 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.SDRTxFMCOMMS5
System object™ sends data to an FMCOMMS5 Zynq® radio hardware. To use this object, in the hardware setup, select the
Xilinx® ZC706 radio hardware with Analog Devices® FMCOMMS5 RF card.
You can use the comm.SDRTxFMCOMMS5
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.SDRTxFMCOMMS5
System object to send data to the radio hardware.
To send data to the FMCOMMS5 Zynq radio hardware:
Create the
comm.SDRTxFMCOMMS5
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.SDRTxFMCOMMS5
System object, use the sdrtx
function with input argument
'FMCOMMS5'
. For example:
tx = sdrtx('FMCOMMS5')
To create the object with properties set to specific values, call the function using one or more name-value arguments. For example:
tx = sdrtx('FMCOMMS5', ... 'IPAddress','192.168.3.2', ... 'CenterFrequency',2.2e9, ... 'BasebandSampleRate',800e3);
Properties
The comm.SDRTxFMCOMMS5
transmitter System object supports up to four channels to send data to the FMCOMMS5 Zynq radio hardware. Use the ChannelMapping
property to indicate whether to use a single channel or
multiple
channels. For each channel, you can set the Gain
property independently, or you can apply the same setting to
all
channels. If you select direct digital synthesis (DDS) transmission for the
DataSourceSelect
property, you can also set all DDS-based properties
independently. 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 input mapping
1
(default) | integer | [N
M]
| [1 2 3 4]
Channel input mapping, specified as one of these values:
Integer from 1 to 4 — The integer value indicates which single channel is in use.
[N M]
, where N and M are distinct integers from 1 to 4 — Channels N and M are in use.[1 2 3 4]
— All four channels are in use.
The RF chip of the radio hardware determines the number of channels you can use for sending data. For the FMCOMMS5, two AD9361 RF chips are used to provide support for four channels. The channels specified by 1 and 2 are situated on the first AD9361 chip. The channels specified by 3 and 4 are situated on the second AD9361 chip. Using multiple channels across the two chips has certain limitations. For more information, see Multiple Channel Synchronization for FMCOMMS5.
Supported Radio Hardware | RF Chip | Number of Channels | Supported RF Ports |
---|---|---|---|
ZC706 and FMCOMMS5 | 2 x AD9361 | 4 |
|
Gain
— Gain in dB
-10
(default) | numeric scalar | 1-by-2 or
1-by-4
numeric vector
Gain in dB, specified as a numeric scalar, a 1-by-2 or 1-by-4 numeric vector. The valid range for gain is from –89.75 dB to 0 dB. The resolution is 0.25 dB.
Set the gain based on the ChannelMapping
property.
For a single channel, specify the gain as a scalar.
For two or four channels that use the same gain value, specify the gain as a scalar. The object applies the gain by scalar expansion.
For two or four channels that use different gain values, specify the gain as a 1-by-2 or 1-by-4 vector, respectively. The
i
th element of the vector is applied to thei
th channel specified by theChannelMapping
property.
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.SDRTxFMCOMMS5
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
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.SDRTxFMCOMMS5
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.
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
DataSourceSelect
— Source of data
'Input Port'
(default) | 'DDS'
Source of data, 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 or 1-by-4 numeric vector
First DDS tone frequency in Hz, specified as one of these values:
Numeric scalar — Use this option for a single channel or to specify the same frequency for all channels in use. The object applies scalar expansion for each channel specified by the
ChannelMapping
property.1-by-2 or 1-by-4 numeric vector — Use this option to specify different frequencies for two or four channels, respectively. The
i
th element of the vector is applied to thei
th channel specified by theChannelMapping
property.
The valid range of DDSTone1Freq
is from 0 to
BasebandSampleRate
/ 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 or 1-by-4 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 all channels in use. The object applies scalar expansion for each channel specified by the
ChannelMapping
property.1-by-2 or 1-by-4 numeric vector — Use this option to specify different frequencies for two or four channels, respectively. The
i
th element of the vector is applied to thei
th channel specified by theChannelMapping
property.
The valid range of DDSTone2Freq
is 0 Hz to
BasebandSampleRate
/ 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 or 1-by-4 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 all channels in use. The object applies scalar expansion for each channel specified by the
ChannelMapping
property.1-by-2 or 1-by-4 numeric vector — Use this option to specify different scales for two or four channels, respectively. The
i
th element of the vector is applied to thei
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 or 1-by-4 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 all channels in use. The object applies scalar expansion for each channel specified by the
ChannelMapping
property.1-by-2 or 1-by-4 numeric vector — Use this option to specify different scales for two or four channels, respectively. The
i
th element of the vector is applied to thei
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
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
tx(
sends data to the radio hardware
associated with the data
)comm.SDRTxFMCOMMS5
transmitter System object
tx
.
tx()
enables DDS transmission. To use this syntax, set the
DataSourceSelect
property to 'DDS'
.
returns a logical value that indicates data discontinuity. If
underflow
= tx(data
)underflow
is true
, the input
data
does not represent contiguous data from the host to the
antenna. Use this information to determine whether the host sends valid data to the radio
hardware.
Note
Calling the object for the first time initializes the radio. Because this
initialization can result in an underflow, ignore the underflow
output value of the first call.
Input Arguments
data
— Input signal
complex matrix
Input signal sent to the radio hardware, specified 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 sent on one channel. In single-channel mode, the number of elements in a column
must be even.
The complex data type of the transmitted signal must be one of these data types:
16-bit signed integers — Since the AD9361 RF chip has a 12-bit DAC, only the 12 most significant bits of the I and Q samples are used.
Single-precision floating point — Complex values in the range of [–1, 1]. Since the AD9361 RF chip has a 12-bit DAC, numbers of magnitude less than 0.0625 are lost.
Double-precision floating point — Complex values in the range of [–1, 1]. Since the AD9361 RF chip has a 12-bit DAC, numbers of magnitude less than 0.0625 are lost.
Data Types: int16
| single
| double
Complex Number Support: Yes
Output Arguments
underflow
— Data discontinuity flag
logical scalar
Data discontinuity flag, returned as a logical scalar.
true
indicates the presence of underflow resulting in noncontiguous data.false
indicates no underflow.
You can use this value as a diagnostic tool to determine real-time execution of the object.
Data Types: logical
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.SDRTxFMCOMMS5
designCustomFilter | Design custom filter for Analog Devices AD9361/AD9364 RF chip |
info | Synchronize receiver or transmitter radio settings with radio hardware |
transmitRepeat | Download waveform signal to radio and repeatedly transmit it over the air |
Examples
Send Modulated Data to FMCOMMS5 Radio Hardware
Create a transmitter System object for the FMCOMMS5 radio hardware with the specified properties. Use two channels.
tx = sdrtx('FMCOMMS5', ... 'IPAddress','192.168.3.2', ... 'CenterFrequency',2.4e9, ... 'BasebandSampleRate',1e6, ... 'ChannelMapping',[1 2])
tx = comm.SDRTxFMCOMMS5 with properties: Main DeviceName: 'FMCOMMS5' IPAddress: '192.168.3.2' CenterFrequency: 2.4000e+09 Gain: -10 ChannelMapping: [1 2] BasebandSampleRate: 1000000 ShowAdvancedProperties: false Show all properties
Create a DPSK modulator System object.
mod = comm.DPSKModulator('BitInput',true);
Use modulated random data as the data source and transmit the data with the radio hardware. Because two channels are in use, use two instances of the modulated data to form a two-column matrix.
for counter = 1:20 data = randi([0 1],30,1); modSignal = mod(data); tx([modSignal modSignal]); end
## Establishing connection to hardware. This process can take several seconds.
Version History
Introduced in R2019a
See Also
Objects
Blocks
Topics
External Websites
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)