comm.SDRRxE310

(To be removed) Receive data from USRP® E310 or USRP® E312 radio hardware

The comm.SDRRxE310 System object™ will be removed in a future release. Use the comm.SDRRxE3xx System object instead. For more information, see Compatibility Considerations.

Description

The comm.SDRRxE310 System object receives data from USRP®[1] E310 or USRP® E312 radio hardware. This connection enables you to simulate and develop various software-defined radio applications.

The following diagram shows the conceptual overview of transmitting and receiving radio signals with this support package. MATLAB® interacts with the comm.SDRRxE310 System object to receive signals from the radio hardware.

To receive data from the radio hardware:

  1. Create the comm.SDRRxE310 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).

Channel Output

The comm.SDRRxE310 receiver System object supports up to two channels to receive data from the USRP® E310 or USRP® E312 radio hardware. Use the ChannelMapping property to indicate whether to use a single channel or both channels. The object returns a matrix signal, where each column corresponds to one fixed-length channel of data. 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 both channels.

Creation

Description

rx = sdrrx('E310') creates a receiver System object with default properties that you can use to receive data from the USRP® E310 or USRP® E312 radio hardware.

example

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

For example:

rx = sdrrx('E310', ...
           'IPAddress','192.168.30.2', ...
           'CenterFrequency',2.5e9, ...
           'BasebandSampleRate',1e6, ...
           'ChannelMapping',1);

Properties

expand all

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

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 the Gain property.

Data Types: char | string

Gain in dB, specified as a scalar or a 1-by-2 vector. The valid gain range is –10 dB to 77 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 ith element of the vector is applied to the ith channel specified by the ChannelMapping property.

Tunable: Yes

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.841 kHz to 30.72 MHz.

Note

To synchronize the comm.SDRRxE310 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 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 RF chip is sign-extended to 16 bits.

  • 'single' — Single-precision floating point values are scaled to the range of [–0.0625, 0.0625]. 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 [–0.0625, 0.0625]. The object derives this value from the sign-extended 16 bits received from the board.

Number of samples per frame, specified as a strictly positive integer. Using values less than 3660 can yield poor performance.

Data Types: double

Option for burst mode, specified as false or true. When set to true, this property produces a set of contiguous frames. 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

Advanced Properties

Option for advanced properties, specified as false or true.

When ShowAdvancedProperties is true, you can set the following advanced properties:

  • EnableQuadratureTracking

  • EnableRFDCTracking

  • EnableBasebandDCTracking

  • BypassUserLogic

Data Types: logical

Option for quadrature tracking, specified as true or false. When this property is true, the object applies IQ imbalance compensation.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: logical

Option for RF DC tracking, 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

Option for baseband DC tracking, 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

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 the FPGA Targeting Workflow or the Hardware-Software Co-Design Workflow.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: logical

Usage

Description

[signalOut,len] = rx() returns the output signal received from the radio hardware associated with the specified rx receiver System object. In addition, rx returns the actual data length, len, indicating when valid data is present.

[signalOut,len,lost] = rx() returns a logical value, lost, indicating data discontinuity, either overflow or underflow.

When you call the object, the host might not receive any data from the radio hardware. To determine whether data is valid, check the values of len and lost. 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 — Complex values are the raw 16-bit I and Q samples from the board. The 12-bit value from the ADC of the AD9361 RF chip is sign-extended to 16 bits.

  • Single-precision floating point — Complex values are scaled to the range of [–0.0625, 0.0625]. 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 [–0.0625, 0.0625]. 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

Actual length of the data received from the radio hardware, returned as a nonnegative integer. When len is 0, no data has been received. When len > 0, you can use the data length to qualify code execution.

Data Types: double

Data discontinuity flag, returned as a logical scalar.

  • 0 indicates no overflow or underflow.

  • 1 indicates the presence of overflow or underflow.

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

expand all

designCustomFilterDesign custom filter for Analog Devices AD9361 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

Configure the radio hardware with an IP address of 192.168.3.2. Set the radio to receive at 2.5 GHz with a baseband rate of 1 MHz.

rx = sdrrx('E310', ...
           'IPAddress','192.168.3.2', ...
           'CenterFrequency',2.5e9, ...
           'BasebandSampleRate', 1e6, ...
           'ChannelMapping',1); 
 

Save the data using a log.

Log = dsp.SignalSink;
for counter = 1:20
    [data,dataLength,lostSample] = rx();
    if lostSample ~= 1 % no dropped samples
        if dataLength == rx.SamplesPerFrame % received desired data
             Log(data);
        end
    else
        disp('lostSamp=1,data lost');
    end
end 

Compatibility Considerations

expand all

Warns starting in R2019b

Introduced in R2016b


[1] USRP, USRP2, UHD, and Ettus Research are trademarks of National Instruments Corp.