MATLAB Examples

FM Broadcast Receiver with ADALM-PLUTO Radio

This example shows how to build an FM mono or stereo receiver using Communications System Toolbox™ and Communications System Toolbox Support Package for Analog Devices ADALM-PLUTO Radio. To run this example and receive FM signals in real time, you need a PlutoSDR.

For a full list of Communications System Toolbox supported SDR platforms, refer to Supported Hardware section of Software Defined Radio (SDR) discovery page.



FM broadcasting uses frequency modulation (FM) to provide high-fidelity sound transmission over broadcast radio channels. Pre-emphasis and de-emphasis filters are used to reduce the effect of noise on high audio frequencies. Stereo encoding enables simultaneous transmission of both left and right audio channels over the same FM channel [ 1 ].

Run the Example

Type plutoradioFMReceiverExample in the MATLAB Command Window or click the link to run the example. You need to enter the following information when you run the example:

  1. Reception duration in seconds
  2. FM channel frequency

The example plays the received audio over your computer's speakers.

NOTE: This example utilizes a center frequency that is outside the default tuning range. Click configurePlutoRadio('AD9364') to use your radio outside the qualified tuning range.

Receiver Structure

The FM Broadcast Demodulator object converts the sampling rate of 600 kHz to 48 kHz, a native sampling rate for your host computer's audio device. According to the FM broadcast standard in the United States, the de-emphasis lowpass filter time constant is set to 75 microseconds. This example processes received mono signals. The demodulator can also process stereo signals.

To perform stereo decoding, the FM Broadcast Demodulator object uses a peaking filter which picks out the 19 kHz pilot tone from which the 38 kHz carrier is created. Using the obtained carrier signal, the object downconverts the L-R signal, centered at 38 kHz, to baseband. Afterwards, the L-R and L+R signals pass through a 75 microsecond de-emphasis filter. The object separates the L and R signals and converts them to the 48 kHz audio signal.

Example Code

The receiver asks for user input and initializes variables. Then, it calls the PlutoSDR and FM broadcast receiver in a loop. The loop also keeps track of the radio time using the frame duration.

% Request user input from the command-line for application parameters
userInput = helperPlutoFMUserInput;

% Calculate FM system parameters
fmRxParams = helperGetFMConfig;

% Configure a PlutoSDR receiver object
plutoRadio = comm.SDRRxPluto( ...
  'CenterFrequency',    userInput.CenterFrequency,...
  'BasebandSampleRate', fmRxParams.FrontEndSampleRate,...
  'OutputDataType',     'single', ...
  'SamplesPerFrame',    fmRxParams.FrontEndSamplesPerFrame);

% Configure a FM broadcast receiver object
fmBroadcastDemod = comm.FMBroadcastDemodulator(...
    'SampleRate',         fmRxParams.FrontEndSampleRate, ...
    'FrequencyDeviation', fmRxParams.FrequencyDeviation, ...
    'FilterTimeConstant', fmRxParams.FilterTimeConstant, ...
    'AudioSampleRate',    fmRxParams.AudioSampleRate, ...
    'Stereo',             false);

% Create an audio player object
player = audioDeviceWriter('SampleRate', fmRxParams.AudioSampleRate);

% Main loop
if ~isempty(findPlutoRadio)
    % Initialize radio time
    radioTime = 0;

    while radioTime < userInput.Duration % duration
        % Receive baseband samples from PlutoSDR
        rcv = plutoRadio();

        % Demodulate FM broadcast signals and play the decoded audio
        audioSig = fmBroadcastDemod(rcv);

        % Update radio time
        radioTime = radioTime + fmRxParams.FrontEndFrameTime;

    % Release the radio and the audio

Further Exploration

To further explore the example, you can vary the center frequency of the PlutoSDR and listen to other radio stations.

You can set the Stereo property of the FM demodulator object to true to process the signals in stereo fashion and compare the sound quality.

You can explore following function for details of the system parameters:

Selected Bibliography