comm.SDRRxAD936x

Receive data from AD936x-based Zynq radio hardware

Description

The comm.SDRRxAD936x System object™ receives data from an AD936x-based Zynq® radio hardware. The object supports the following radio hardware devices:

  • ADI RF SOM

  • Xilinx® ZC706 with Analog Devices® FMCOMMS2/3/4 RF card

  • ZedBoard™ with Analog Devices FMCOMMS2/3/4 RF card

  • Xilinx ZCU102 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. The following diagram shows the conceptual overview of transmitting and receiving radio signals with this support package. MATLAB® interacts with the comm.SDRRxAD936x receiver System object to receive data from the radio hardware.

To receive data from the radio hardware:

  1. Create the comm.SDRRxAD936x object and set its properties.

  2. Call the object as if it were a function.

To learn more about how System objects work, see What Are System Objects? (MATLAB).

Creation

Syntax

rx = sdrrx('AD936x')
rx = sdrrx('AD936x',Name,Value)

Description

rx = sdrrx('AD936x') creates an AD936x receiver System object with default properties. Use this object to receive data from the AD936x-based radio hardware.

example

rx = sdrrx('AD936x',Name,Value) creates the object with properties set by using one or more name-value pair arguments. Enclose the property name inside quotes, followed by the specified value. Unspecified properties take default values.

For example, create a receiver with an IP address of 192.168.3.2. Configure the receiver to receive data at 2.2 GHz, with baseband sample rate of 800 kHz:

rx = sdrrx('AD936x', ...
           'IPAddress','192.168.3.2', ...
           'CenterFrequency',2.2e9, ...
           'BasebandSampleRate',800e3);

Properties

expand all

The comm.SDRRxAD936x receiver System object supports up to two channels to receive data from the 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 (MATLAB).

Main Properties

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. See Guided Host-Radio Hardware Setup. If you configure the radio hardware with an IP address other than the default, update IPAddress accordingly.

Data Types: char | string

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

Channel output mapping, specified as a scalar or a 1-by-2 vector:

  • 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 HardwareRF ChipNumber of ChannelsSupported RF Ports

ADI RF SOM

ZC706 and FMCOMMS2 or FMCOMMS3

ZedBoard and FMCOMMS2 or FMCOMMS3

ZCU102 and FMCOMMS2 or FMCOMMS3

AD93612

TX1A, RX1A, TX2A, RX2A

ZC706 and FMCOMMS4

ZedBoard and FMCOMMS4

ZCU102 and FMCOMMS4

AD93641

TXA, RXA

Source of gain, specified as one of the following:

  • 'AGC Slow Attack' — Use for signals with slowly changing power levels.

  • 'AGC Fast Attack' — Use for signals with rapidly changing power levels.

  • 'Manual' — For setting the gain manually with the Gain property.

Data Types: char | string

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.

Set the value of 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 values as a 1-by-2 vector. The i-th element of the vector is applied to the i-th channel specified by the ChannelMapping property

Dependencies

To enable this property, set GainSource to 'Manual'.

Data Types: double

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 enough to what you actually want.

Data Types: double

Complex data type of the output signal, specified as one of the following:

  • 'int16' — Indicates that the 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' — Indicates single-precision floating point values scaled to the range of [–1, 1].

  • 'double' — Indicates double-precision floating point values scaled to the range of [–1, 1].

Number of samples per frame, specified as a strictly positive integer. In single-channel mode, the number of samples per frame must be even. When streaming to the host, using larger frame sizes can give more efficient performance. To determine real-time execution of the object, use the overflow output argument.

Data Types: double

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

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

Filter

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 comm.SDRRxAD936x 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

Advanced Properties

Enable advanced properties, specified as false or true.

When you set this property to true, the following advanced properties are enabled.

Data Types: logical

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

RF direct current (DC) correction, specified as true or false. When the property is true, the object applies an RF DC blocking filter.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: logical

Baseband DC correction, specified as true or false. When the property is true, the object applies a baseband DC blocking filter.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: logical

Timeout for I/O operations in seconds, specified as one of these options:

  • Inf — The object waits indefinitely to complete I/O operations.

  • N (nonnegative scalar) — 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

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

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, specified as '0', '-6', '-12', or '-18' .

Dependencies

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

Data Types: char | string

Usage

Syntax

[data,validData,overflow] = rx()

Description

[data,validData,overflow] = rx() returns data received from the radio hardware associated with the 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

expand all

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 the following data types:

  • 16-bit signed integers — The 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 — The complex values are scaled to the range of [–1, 1].

  • Double-precision floating point — The complex values are scaled to the range of [–1, 1].

To specify the base type, use the OutputDataType property.

Data Types: int16 | single | double
Complex Number Support: Yes

Valid data indicator, returned as a logical scalar.

  • true indicates that rx has received data from the radio hardware.

  • false indicates that rx has not received data from the radio hardware.

Note that 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.

Data discontinuity flag, returned as a logical scalar.

  • true indicates the presence of overflow resulting in non-contiguous data.

  • false indicates no overflow.

This value is a useful 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)

expand all

designCustomFilterDesign custom filter for Analog Devices AD9361/AD9364 RF chip
infoSynchronize receiver or transmitter radio settings with radio hardware
stepRun System object algorithm
isLockedDetermine if System object is in use
releaseRelease resources and allow changes to System object property values and input characteristics

Examples

expand all

Create a receiver with an IP address of 192.168.3.2. Configure the receiver to receive data at 2.2 GHz, with baseband sample rate of 800 kHz, and on a single channel:

rx = sdrrx('AD936x', ...
           'IPAddress','192.168.3.2', ...
           'CenterFrequency',2.2e9, ...
           'BasebandSampleRate',800e3, ...
           'DataTimeout',0, ...
           'ChannelMapping',1);

Receive, validate, and save valid data using a log.

Log = dsp.SignalSink;
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 

Introduced in R2018b