Main Content

info

Information about FM broadcast modulator or demodulator

Description

fmbInfo = info(fmb) returns a structure containing information for the comm.FMBroadcastModulator or comm.FMBroadcastDemodulator System object™

Note

  • The modulator input sequence length for the audio input must be a multiple of AudioDecimationFactor.

  • The modulator input sequence length for the RDS/RBDS input must be a multiple of RBDSDecimationFactor.

  • When RBDS is true, the demodulator input sequence length must be a multiple of AudioDecimationFactor and RBDSDecimationFactor.

  • When RBDS is false, the demodulator input sequence length must be a multiple of AudioDecimationFactor.

.

example

Examples

collapse all

Modulate and demodulate an audio signal with the FM broadcast modulator and demodulator System objects. Plot the frequency responses to compare the input and demodulated audio signals.

Load the audio file guitartune.wav by using an audio file reader System object™. Set the samples per frame to 44,100, which is large enough to include the entire audio file.

audiofilereader = dsp.AudioFileReader("guitartune.wav", ...
    SamplesPerFrame=44100);
x = audiofilereader();

Create spectrum analyzer System objects to plot the spectra of the modulated and demodulated signals.

saFM = spectrumAnalyzer( ...
    SampleRate=152e3, ...
    Title="FM Broadcast Signal");
saAudio = spectrumAnalyzer( ...
    SampleRate=44100, ...
    ShowLegend=true, ...
    Title="Audio Signal", ...
    ChannelNames=["Input signal" "Demodulated signal"]);

Create FM broadcast modulator and demodulator objects. Set the sample rate of the output audio signal to match the sample rate of the input audio signal. Configure the demodulator to match the specified modulator.

fmbMod = comm.FMBroadcastModulator( ...
    AudioSampleRate=audiofilereader.SampleRate, ...
    SampleRate=200e3);
fmbDemod = comm.FMBroadcastDemodulator(fmbMod)
fmbDemod = 
  comm.FMBroadcastDemodulator with properties:

            SampleRate: 200000
    FrequencyDeviation: 75000
    FilterTimeConstant: 7.5000e-05
       AudioSampleRate: 44100
             PlaySound: false
                Stereo: false
                  RBDS: false

The length of the sequence input to the object must be an integer multiple of the decimation factor. To determine the audio decimation factor of the filter in the modulator and demodulator, use the info object function.

info(fmbMod)
ans = struct with fields:
       AudioDecimationFactor: 441
    AudioInterpolationFactor: 2000
        RBDSDecimationFactor: 19
     RBDSInterpolationFactor: 320

info(fmbDemod)
ans = struct with fields:
       AudioDecimationFactor: 50
    AudioInterpolationFactor: 57
        RBDSDecimationFactor: 50
     RBDSInterpolationFactor: 57

The audio decimation factor of the modulator is a multiple of the audio frame length of 44,100. The audio decimation factor of the demodulator is an integer multiple of the 200,000 samples data sequence length of the modulator output.

Modulate the audio signal and plot the spectrum of the modulated signal.

y = fmbMod(x);
saFM(y)

Demodulate the modulated audio signal and plot the resultant spectrum. Compare the input signal spectrum with the demodulated signal spectrum. The spectra are similar except that the demodulated signal has smaller high-frequency components.

z = fmbDemod(y);
saAudio([x z])

Input Arguments

collapse all

FM broadcast object, specified as one of these System objects.

Output Arguments

collapse all

FM broadcast object information, returned as a structure containing these fields.

FieldDescription

AudioDecimationFactor

Decimation factor of the audio modulator or demodulator filter.

AudioInterpolationFactor

Interpolation factor of the audio modulator or demodulator filter.

RBDSDecimationFactor

Decimation factor of the RDS/RBDS modulator or demodulator filter.

RBDSInterpolationFactor

Interpolation factor of the RDS/RBDS modulator or demodulator filter.

Version History

Introduced in R2015a