comm.SDRADIFMCOMMSTransmitter class

Package: comm

Transmit data to Analog Devices FMCOMMS board

Description

The SDRADIFMCOMMSTransmitter System object™ transmits data to a Xilinx® FPGA-based radio, allowing simulation and development for various software-defined radio applications. The SDRADIFMCOMMSTransmitter object enables communication with a FPGA board on the same Ethernet subnetwork.

The SDRADIFMCOMMSTransmitter System object is a signal source that transmits data to an FPGA board.

The diagram shows how MATLAB®, the SDRADIFMCOMMSReceiver System object, and Xilinx FPGA hardware interface.

Data Path

The following diagram illustrates the data path for radio signal transmission (when the interpolation filter and IF tuner are in use):

Supported Data Types

PortSupported Data Types

Input

The input port supports the following complex and real data types:

  • Double-precision floating point

  • Single-precision floating point

  • 16-bit signed integers

All input must be frame based.

When you select a double or single data type, the complex values are in the range of [-1,1] and converted to int16. When you select int16, the complex values are 16-bit I and Q samples that are then sent to the radio.

Construction

H=comm.SDRADIFMCOMMSTransmitter creates an SDR transmitter System object, H, that transmits data to an FPGA development motherboard with an Analog Devices FMCOMMS daughterboard installed. The System object enables communication with an SDR board on the same gigabit Ethernet subnetwork as the host.

H=comm.SDRADIFMCOMMSTransmitter(Name,Value) creates an SDR transmitter object, H, with the specified property Name set to the specified Value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

An SDRADIFMCOMMSTransmitter System object connects to a device when you call the step method, and stays connected until you call the release method.

Properties

IPAddress

IP address of the radio

Specify the logical network location of the radio as a string. The default is 192.168.2.2 for ADI radios.

    Note:   If you are attaching two radios to the same host, note that each radio must be located at a different IP address. Using the IPAddress property for each System object, set the IP address for each radio to a unique value, as shown here for a pair of SDRADIFMCOMMSReceiver and SDRADIFMCOMMSTransmitter System objects (values shown are default for ADI FMCOMMS radios):

    >> rx = comm.SDRADIFMCOMMSReceiver('IPAddress','192.168.2.2'); 
    >> tx = comm.SDRADIFMCOMMSTransmitter('IPAddress','192.168.20.2');

See also Check Radio Connection.

CenterFrequencySource

Source of RF center frequency

Specify the source of the center frequency as Property or Input port. The default is Property. Set CenterFrequencySource to Input port to specify the center frequency value using an input to the step method. Set CenterFrequencySource to Property to specify the center frequency value using the CenterFrequency property.

CenterFrequency

RF center frequency in Hz

Specify the desired center frequency as a double-precision, nonnegative, finite scalar. This property applies when you set CenterFrequencySource to Property.

The default is 2.4 GHz. The valid range of values for this property is 400 MHz to 4 GHz.

ActualCenterFrequency

Actual RF center frequency in Hz

Reports the actual center frequency of the daughterboard. Desired and actual center frequency can differ slightly due to quantization. The value is NaN when the actual value is unknown. Use synchronize to update the actual value. This property is read only.

IntermediateFrequencySource

Source of RF intermediate frequency

Specify the source of the intermediate frequency as Property or Input port. The default is Property. Set IntermediateFrequencySource to Input port to specify the intermediate frequency value using an input to the step method. Set IntermediateFrequencySource to Property to specify the intermediate frequency value using the IntermediateFrequency property.

IntermediateFrequency

Desired intermediate frequency in Hz.

The intermediate frequency (IF) tuner allows you to account for the error in tuning between target center frequency and actual center frequency and avoid unwanted interference by shifting it out of the pass band of interest. Specify the desired intermediate frequency as a double-precision, finite scalar. The default value is 0 Hz. The valid range of values for this parameter is to , where is the digital-analog converter (DAC) rate.

See also Set Intermediate Frequency Tuning.

ActualIntermediateFrequency

Actual intermediate frequency in Hz

Reports the actual intermediate frequency. Desired and actual intermediate frequency can be slightly different due to quantization. The value is NaN when the actual value is unknown. Use the synchronize method to update the actual value. This property is read-only.

DACRate

Desired DAC sampling rate in Hz

Specify the desired codec rate as a double-precision nonnegative scalar. The default is 98 MHz. The valid range of this property is 39–100 MHz. This property applies when you set DACRateSource to Property.

ActualDACRate

Actual DAC sampling rate in Hz

Reports the actual sampling rate of the RF signal. Desired and actual sampling rate can differ slightly due to quantization. The value is NaN when the actual value is unknown. Use synchronize to update the actual value. This property is read only.

InterpolationFactor

Desired interpolation factor

Specify the desired interpolation factor as a double-precision, nonnegative scalar. The default is 512. The baseband rate is DACRate / InterpolationFactor.

See also Apply Interpolation Factors.

ActualInterpolationFactor

Actual interpolation factor

Reports the actual interpolation factor of the daughterboard. Desired and actual interpolation factor can differ slightly due to quantization. The value is NaN when the actual value is unknown. Use the method synchronize to update the actual value. This property is read only.

LostSamplesOutputPort

Output flag to indicate dropped samples

Set this property to true so that the step method outputs the number of lost samples during host-hardware data transfers.

  • Zero indicates no data loss.

  • A positive number indicates that overruns or underruns occurred.

The default value for LostSamplesOutputPort is false, which means that the port is not enabled and no information about dropped packets is displayed.

This port is useful for determining real-time operation of the System object. If your design is not running in real time, increase the decimation factor to approach or achieve real-time performance.

See also Detect Underruns and Overruns.

EnableBurstMode

Ensure a set of frames without overrun or underrun

When set to true, this property produces a set of contiguous frames without an overrun or underrun to the radio. This setting can help simulate models that cannot run in real time. When you enable this property, specify the desired amount of contiguous data using the NumFramesInBurst property. The default value is false.

See also Burst-Mode Buffering

NumFramesInBurst

Number of frames in contiguous burst

This property is valid when EnableBurstMode property is set to true. The default number of frames in a burst is 20.

BypassUserLogic

Bypass user logic from target workflow

When you enable this property, the FPGA data path bypasses the algorithm generated and programmed during the SDR workflow. This bypass can help with debugging system bringup. The default value is false, or not enabled.

Desired vs. Actual System Object Property Values

When you set property values for center frequency, intermediate frequency, DAC, and interpolation, the System object initially performs some rudimentary checks that the values are scalar and real. If your values pass those checks, you can still provide values that are out of range for the FPGA-based radio. In that case, the hardware makes a best effort to set the requested value, and reports the actual value in the property that begins with Actual (see table).

Parameter to SetActual Value
CenterFrequencyActualCenterFrequency
IntermediateFrequencyActualIntermediateFrequency
DACRateActualDACRate
InterpolationFactorActualInterpolationFactor

Methods

disconnectAllow other host software to communicate with SDR board
info Obtain SDR board information
isLockedLocked status (logical)
releaseAllow property value and input characteristics changes
stepTransmit data to SDR board
synchronize Configure SDR board

Examples

Configure an SDR board with an IP address of 192.168.2.2 to transmit at 2.4 GHz with a codec rate of 100 MHz and a baseband rate of 1 MHz. Use a DPSK modulator as the data source.

hSDR = comm.SDRADIFMCOMMSTransmitter( ...
                'IPAddress',            '192.168.2.2', ...
                'CenterFrequency',      2.4e9, ...
                'DACRate',              100e6, ...
                'InterpolationFactor',  100);

hMod = comm.DPSKModulator('BitInput',true);
    for counter = 1:20
      data = randi([0 1], 30, 1);
      modSignal = step(hMod, data);
      step(hSDR, modSignal);
    end
Was this topic helpful?