Transmit data to Analog Devices FMCOMMS board
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.
The following diagram illustrates the data path for radio signal transmission (when the interpolation filter and IF tuner are in use):
|Port||Supported Data Types|
The input port supports the following complex and real data types:
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.
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.
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.
See also Check Radio Connection.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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 Set||Actual Value|
|disconnect||Allow other host software to communicate with SDR board|
|info||Obtain SDR board information|
|isLocked||Locked status (logical)|
|release||Allow property value and input characteristics changes|
|step||Transmit data to SDR board|
|synchronize||Configure SDR board|
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