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.
|Port||Supported Data Types|
The output port supports these complex data types only:
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.
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 http://sdr.osmocom.org/trac/wiki/rtl-sdr#SupportedHardware and http://sdr.osmocom.org/trac/wiki/rtl-sdr#Specifications.
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|
|isLocked||Locked status (logical)|
|release||Allow property value and input characteristics changes|
|reset||Reset the internal states of the RTL-SDR radio System object|
|step||Receive 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.