comm.SDRRTLReceiver class

Package: comm

Receive data from RTL-SDR radio


The SDRRTLReceiver System object™ supports communication between MATLAB® and an RTL-SDR radio, by way of an RTL-SDR device attached to a USB port on the host computer, allowing simulation and development of various software-defined radio (SDR) applications. Although comm.SDRRTLReceiver receives data from an RTL-SDR radio, the object acts as a signal source that outputs a column vector signal of fixed length.

Supported Data Types

PortSupported Data Types


The output port supports these complex data types only:

  • Double-precision floating point

  • Single-precision floating point

  • 16-bit unsigned integers


H = comm.SDRRTLReceiver creates an RTL-SDR radio receiver System object, H, that receives data from the RTL-SDR radio.

H = comm.SDRRTLReceiver(Name,Value) creates an RTL-SDR radio receiver 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).

H = comm.SDRRTLReceiver(RadioAddress,Name,Value) creates an RTL-SDR radio receiver System object, H, where RadioAddress is a string containing a non-negative, scalar integer that refers to the USB ID of the RTL-SDR radio, and the other specified properties set to the specified values.



USB address of the RTL-SDR device

Specify the USB address of the radio you want to communicate with as a string. The default value is '0'. Use the sdrinfo function to discover which radios are connected to your computer.

    About USB port addresses   USB address are not assigned in a manner that it is intuitive. If a device is plugged into the first USB port, it is always at address 0. But if there is a device plugged into a second or third port, the address varies depending on whether there is a device in any of the previous ports. See the following illustrations for a visual explanation.

    This diagram illustrates how the USB port addresses are assigned when devices are added and then removed in FIFO order.

    This diagram illustrates how the USB port addresses are assigned when devices are added and then removed from port 0. Note that the radio address for the second RTL device changes based on whether or not the first port has a device in it. You must keep track of the plugged-in devices in order to access a radio with the correct radio address.


Desired center frequency in Hz

Specify the desired center frequency as a double precision, nonnegative scalar. The default value is 102.5 MHz. The valid range of this property depends on the tuner chip of the RTL-SDR radio. You can get a list of tuner chips and their frequency ranges at and


Turn the tuner automatic gain control (AGC) on (true) or off (false).

When set to true, this property will enable the tuner AGC to provide almost constant amplitude signals. The default value is true.


Desired tuner gain in dB

Specify the desired tuner gain as a double precision scalar. The default is 0 dB. The valid range of this property depends on the tuner chip of the RTL-SDR radio. Use the info method to get valid values. This property applies and appears only when EnableTunerAGC is set to false. This property is tunable.


Desired ADC sample rate in Hz

Specify the desired sample rate of the output samples of the step method, in Hertz, as a double-precision, positive, scalar value. The default is 250 KHz. The maximum ADC sample rate is 3.2 MHz.


Data type of output

Specify the output data type as one of double, single, or int16. When you select double or single data type, the complex values are scaled to the range of [-1,1]. When selecting int16, the complex values are the raw 16-bit I and Q samples from the board. The default value is int16.


Number of samples in a frame

Specify the number of samples in a frame for the step method to output. This value must be a positive, scalar integer that is an integer multiple of 256. The default value is 1024.


Frequency correction value in ppm

Specify the frequency correction value in ppm as an integer. The valid range is [-1e4 1e4] ppm. The default value is 0. This property value is used to correct for frequency shifts that occur as a result of local oscillator offsets or clock rate inaccuracies.


info Returns RTL-SDR radio settings
isLockedLocked status (logical)
releaseAllow property value and input characteristics changes
resetReset the internal states of the RTL-SDR radio System object
stepReceive data from RTL-SDR radio


See either of the following featured examples for some basic radio functionality with the RTL-SDR Radio support package:

  • FM Monophonic Receiver with RTL-SDR Hardware

  • FM Stereo Receiver with RTL-SDR Hardware

For more examples featuring the RTL-SDR radio receiver System object, enter sdrexamples at the MATLAB command prompt.

Was this topic helpful?