This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

comm.SDRTxE310

Send data to USRP® E310 or USRP® E312 radio hardware

Description

The comm.SDRTxE310 System object™ sends data to 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.SDRTxE310 System object to send signals to the radio hardware.

To send data to the radio hardware:

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

  2. Call the object with arguments, as if it were a function.

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

Channel Input

The comm.SDRTxE310 transmitter System object supports up to two channels to send data to 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 receives 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

Syntax

tx = sdrtx('E310')
tx = sdrtx('E310',Name,Value)

Description

tx = sdrtx('E310') creates a transmitter System object with default properties that you can use to send data to the USRP® E310 or USRP® E312 radio hardware.

example

tx = sdrtx('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:

tx = sdrtx('E310', ...
           'IPAddress','192.168.30.2', ...
           'CenterFrequency',2.4e9, ...
           '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. See Guided Host-Radio Hardware Setup. If you configure the radio hardware with an IP address other than the default, update IPAddress accordingly.

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 input 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.

Gain in dB, specified as a scalar or a 1-by-2 vector. The valid range for gain is –89.75 dB to 0 dB. The resolution is 0.25 dB.

Set the gain value 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 Nth element of the vector is applied to the Nth channel specified by the ChannelMapping property.

Tunable: Yes

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.SDRTxE310 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

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:

  • DataSourceSelect

  • BypassUserLogic

Data Types: logical

Data source, specified as one of the following:

  • 'Host' — Specify the host as the source of the data.

  • 'DDS' — Specify the DDS on the radio hardware as the source of the data. In this case, each channel has two additive tones.

Dependencies

To enable this property, set ShowAdvancedProperties to 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 the FPGA Targeting Workflow or the Hardware-Software Co-Design Workflow.

Dependencies

To enable this property, set ShowAdvancedProperties to true.

Data Types: logical

DDS tone frequency in Hz, specified as a 2-by-2 matrix of double values. Each channel has two additive tones. Channel one is configured in the first row, and channel two is configured in the second row. For each tone, the valid range is 0 Hz to BasebandSampleRate divided by 2.

Dependencies

To enable this property, set DataSourceSelect to 'DDS'.

Data Types: double

DDS tone phase, specified as 2-by-2 matrix of double values. Each channel has two additive tones. Channel one is configured in the first row, and channel two is configured in the second row. The valid value range is 0 to 359,999. Values are relative to the maximum tone phase shift of 360 degrees, where 0 is zero degrees and 359999 is 359.999 degrees.

Dependencies

To enable this property, set DataSourceSelect to 'DDS'.

Data Types: double

DDS tone scale, specified as a 2-by-2 matrix of double values in millionths of full scale. Each channel has two additive tones. Channel one is configured in the first row, and channel two is configured in the second row. The valid range is –1e6 to 1e6. The values are relative to the DAC output amplitude, where 0 is zero amplitude and 1e6 is the maximum DAC output amplitude.

Dependencies

To enable this property, set DataSourceSelect to 'DDS'.

Data Types: double

Usage

Syntax

tx(signalIn)
lost = tx(signalIn)

Description

tx(signalIn) sends a signal to the radio hardware associated with the specified tx transmitter System object.

lost = tx(signalIn) returns a logical value, lost, indicating data discontinuity, either overflow or underflow.

When you call the object, the host might not send valid data to the radio hardware. To determine whether data is valid, check the values of lost.

Input Arguments

expand all

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 via one channel.

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 are scaled to the range of [–1, 1].

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

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

Output Arguments

expand all

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
transmitRepeatDownload waveform signal to radio and repeatedly transmit it over the air
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 transmit at 2.4 GHz with a baseband rate of 1 MHz.

tx = sdrtx('E310', ...
           'IPAddress','192.168.3.2', ...
           'CenterFrequency',2.4e9, ...
           'BasebandSampleRate',1e6, ...
           'ChannelMapping',1); 

Use a DPSK modulator as the data source to transmit the data with the radio hardware.

Mod = comm.DPSKModulator('BitInput',true);
for counter = 1:20
   data = randi([0 1], 30, 1);
   modSignal = Mod(data);
   tx(modSignal);
end

Introduced in R2016b


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