Main Content

Signal Reception Using Software-Defined Radios

Since R2025a

This example shows how to tune software-defined radios (SDRs) to receive signals using the SDR Receiver app. In this example, you:

  1. Configure SDRs for continuous signal reception.

  2. Visualize the IQ samples, power spectrum, and constellation.

  3. Correct RF impairments.

  4. Export app configuration to MATLAB™ script.

Required Hardware and Software

To run this example, you need one of these radios and the corresponding software support package.

  • USRP™ N2xx series or B2xx series radio and Communications Toolbox Support Package for USRP Radio. For more information, see USRP Radio and Supported Hardware and Required Software.

  • USRP™ N3xx series, X series, or E320 radio and Wireless Testbench Support Package for NI USRP Radios. For more information, see Supported Radio Devices (Wireless Testbench) (Wireless Testbench).

  • ADALM-PLUTO radio and Communications Toolbox Support Package for Analog Devices® ADALM-PLUTO Radio. For more information, see ADALM-Pluto Radio.

  • RTL-SDR radio and the Communications Toolbox™ Support Package for RTL-SDR Radio. For more information, see RTL-SDR Radio.

Introduction

An SDR is a wireless device that consists of a configurable RF front end with an FPGA or programmable system-on-chip (SoC) to perform digital functions. Commercially available SDRs transmit and receive signals at different frequencies to implement wireless standards such as FM, LTE, WLAN, and 5G.

An SDR block which consists of an antenna, RF processing block, and digital processing block. The SDR block is connected to the host computer with MATLAB using an Ethernet cable or USB.

While using SDRs, you encounter these problems:

  • Obtaining correct gain values.

  • Identifying correct phase and frequency offset values.

The SDR Receiver app allows you to interactively tune the gain of the selected SDR and obtain phase, and both coarse and fine frequency offsets. The image shows a schematic of the workflow used in the SDR Receiver app.

Open SDR Receiver App

Run this command to open the SDR Receiver app.

app = SDRReceiver();

Screenshot of the SDR Receiver app window.

Configure SDR

Select SDR

SDR Type: Select the type of SDR. You can select USRP, RTL-SDR, or PLUTO. Each time you change the SDR Type, the app refreshes the list of available SDRs.

SDR Name: Select the SDR platform from the drop-down list.

SDR Address: Select the SDR address of the required radio form the drop-down list.

Refresh SDR List: If you are unable to see your radio in the list, click Refresh SDR List.

Configure Signal Parameters

Center Frequency (Hz): Specify Center Frequency as a nonnegative scalar. The valid range of Center Frequency values varies from SDR to SDR with the following considerations:

  • For USRP radios, the valid range of Center Frequency depends on the RF daughter card.

  • For PLUTO radio, the valid tuning range of Center Frequency is from 325 MHz to 3.8 GHz. Communications Toolbox Support Package for Analog Devices ADALM-Pluto Radio enables you to use the PLUTO radio outside the qualified tuning range by configuring the radio to operate using the AD9364 firmware. To extend the Center Frequency range, at the MATLAB command prompt, enter configurePlutoRadio('AD9364').

  • For RTL-SDR, list of tuner chips and their Center Frequency ranges, see [1].

Rx Gain (dB): Specify the SDR receiver gain in dB. The valid range of Rx Gain values varies from SDR to SDR with the following considerations:

  • For USRP radios, the valid range of Rx Gain depends on the RF daughter card. To get valid gain values, use the info() method of comm.SDRuReceiver.

  • For PLUTO radio, Rx Gain ranges from -4 to 71 dB.

  • For RTL-SDR, the valid range of Rx Gain values depends on the tuner chip. To get valid gain values, use the info() method of comm.SDRRTLReceiver.

Sample Rate (Hz): Specify the baseband sample rate of the radio front end in Hz as a positive numeric scalar with the following considerations:

  • For USRP radios, Sample Rate depends on the master clock rate (MCR) and decimation factor. For more information, see comm.SDRuReceiver.

  • For PLUTO radio, Sample Rate is the same value as the BasebandSampleRate property of comm.SDRRxPluto. It ranges from 65105 to 61.44e6 samples per second.

  • For RTL-SDR, the valid range of Sample Rate is [225, 300] kHz and [900, 3200] in kHz. If you set the Sample Rate greater than 2560 kHz, you might observe dropped samples. For more information about the maximum reliable sample rate, see [1].

Frame Size: Specify number of samples per frame of the output signal, specified as a positive integer with following considerations:

  • For USRP radios, Frame Size is the same value as the SamplesPerFrame property of comm.SDRuReceiver. For more information, see comm.SDRuReceiver.

  • For PLUTO radio, Frame Size is the same value as the SamplesPerFrame property of comm.SDRRxPluto. Specify Frame Size as an even positive integer from 2 to 16,777,216.

  • For RTL-SDR, Frame Size is the same value as the SamplesPerFrame property of comm.SDRRTLReceiver. For more information, see comm.SDRRTLReceiver.

For more information on the range of parameters, use info() method of the respective receiver System objects.

Receive Signal

Start/Pause: Click START to receive the signal. To pause the signal reception, click PAUSE. Once reception starts:

  • The app disables the Select SDR.

  • The app shows the status of reception as Receiving [Total Overruns = <Count of overruns>]. It resets overrun count to 0 before reception starts.

Apply RF Corrections

In radio frequency (RF) communication systems, RF corrections such as phase offset and frequency offset are essential for ensuring accurate signal transmission and reception. Phase offset refers to the discrepancy in phase between a received signal and a reference signal, which can affect the integrity of the transmitted data. Frequency offset denotes the difference between the expected carrier frequency and the actual received frequency, potentially leading to misalignment and degraded signal quality. Correcting these offsets is crucial for maintaining optimal performance and reliability in wireless communication systems.

The SDR Receiver app helps you to interactively estimate phase and frequency offsets using Phase Offset (deg), Coarse Frequency (Hz), and Fine Frequency (Hz) during simulation. Change these parameters to see how they impact the Constellation plot.

Visualize Received Signal

You can visualize the receiving signal using these three plots:

IQ Plot: Plots the real and imaginary parts of the receiving signal, where, X-axis is Samples and Y-axis is Amplitude.

Power Spectrum Plot: Plots the power spectrum of the received signal. The app generates these plots using SpectrumAnalyzer app. In the plot, the X-axis is Frequency in Hz and Y-axis is dBFS (decibels relative to full scale). For more information, see spectrumAnalyzer.

Constellation Plot: Plot the constellation of the received signal and to estimate phase and frequency offsets.

Stop Reception

Stop: Click STOP to stop the simulation. Once reception stops, the app enables the Select SDR controls, allowing you to change the radio.

When reception is complete, the app enables the SDR type, SDR name, SDR address drop-down options and Refresh SDR list button as shown on the left side. The right side of the image shows the deactivated Select SDR controls when the reception is in progress.

Export to MATLAB Script

Export To MATLAB Script: Click on Export To MATLAB Script button to generate MATLAB script for the current SDR Receiver app configuration.

Close the App

Close the opened SDR Receiver app by closing the window or by using this

app.delete();

Conclusion and Further Exploration

In this example, you tune your SDR and estimate phase and and frequency offsets based on your requirements. For more information about SDRs see these examples:

  • QPSK Transmitter with Software-Defined Radios.

  • QPSK Receiver with Software-Defined Radios.

  • Spectrum Analysis of Signals.

  • FM Broadcast Receiver.

References

[1] SDR (Software Defined Radio)

Helper Functions

  • SDRReceiver.m

  • helperUISDRRxWidgets.m

  • helperUISDRRxController.m