Main Content

M-FSK Demodulator Baseband

Demodulate FSK-modulated data

  • M-FSK Demodulator Baseband block

Libraries:
Communications Toolbox / Modulation / Digital Baseband Modulation / FM

Description

The M-FSK Demodulator Baseband block demodulates a signal that was modulated using the M-ary frequency shift keying (M-FSK) method. The input and output are discrete-time signals.

Examples

expand all

Pass a 2-FSK-modulated signal through an additive white Gaussian noise (AWGN) channel. Demodulate the received signal and calculate the symbol error rate (SER).

The cm_2fsk_mod_demod model 2-FSK-modulates a random binary signal, applies AWGN, and then 2-FSK-demodulates the signal. An Error Rate Calculation block computes the SER. In the Error Rate Calculation block, a setting of 1 for the Receive delay parameter accounts for a 1 sample delay.

model = 'cm_2fsk_mod_demod';
open_system(model);
chan = [model,'/AWGN Channel'];

Display the computed SER with Es/N0 set to 10. A Scope (Simulink) block plots the time domain input and demodulated signals, and a signal that indicates when the two signals are not equal.

set_param(chan,'esno','10');
sim(model);
fprintf('With EsN0 set to 10, SER = %7.6f\n',ErrorVec(1));
With EsN0 set to 10, SER = 0.004889

M-FSK-modulate and -demodulate input integer and binary data. Each integer or group of log2(M) bits corresponds to one symbol, where M represents the M-ary number parameter value. Compute the expected signal lengths for the input and output signals. Display the expected and resulting lengths for the input and output signals.

The cm_fsk_mod_demod_bin_int model has two parallel processing paths that modulate and demodulate the input data.

The modulator and demodulator pairs are configured for 8-ary modulation order, 100 Hz frequency separation, 21 samples per frame, and 10 samples per symbol. The model initializes the variables that configure the block parameters by using the PreLoadFcn callback function. For more information, see Model Callbacks (Simulink).

  • The upper path modulates data by using an 8-FSK Modulator block configured to accept integer data, and then demodulates the data and outputs binary and integer data from separate 8-FSK Demodulator blocks.

  • The lower path modulates data by using an 8-FSK Modulator block configured to accept binary data, and also demodulates the data and outputs binary and integer data from separate 8-FSK Demodulator blocks.

Run the model and compute the expected and resulting input and output signal lengths. Display the signal lengths to confirm that the results match the expected lengths.

Display the expected input and output lengths for a binary input signal.

Nbit  Nsym  Nbout  Niout 
 693   2310   693   231

Display the resulting input and output lengths for a binary input signal.

 bit   sym   bout   iout
 693   2310   693   231

Display the expected input and output lengths for an integer input signal.

Nint  Nsym  Nibout  Niiout 
 231   2310   693   231

Display the resulting input and output lengths for an integer input signal.

 bit   sym   bout   iout
 231   2310   693   231

Ports

Input

expand all

Input signal, specified as a scalar. The input is a baseband representation of the modulated signal.

This port is unnamed on the block.

Data Types: double

Output

expand all

Demodulated output signal, returned as a scalar or column vector. For more information, see Single-Rate Processing and Multirate Processing. The Output type parameter specifies whether the block outputs integers or groups of bits.

This port is unnamed on the block.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Number of frequencies in the modulated signal, specified as a positive integer ≥ 2.

Indicates whether the block outputs integers or groups of bits, specified as Integer or Bit.

If you set this parameter to Bit, then the M-ary number parameter must be 2K for some positive integer K.

Symbol mapping of output symbols, specified as Binary or Gray.

  • Set this parameter to Binary to map symbols using binary-coded ordering.

  • Set this parameter to Gray to map symbols using Gray-coded ordering. For Gray-coded ordering, the M-ary number value must be a power of two.

For more information, see Integer-Valued Signals and Binary-Valued Signals.

Frequency separation in Hz, specified as a positive scalar representing the distance between successive frequencies in the modulated signal.

Symbol sampling rate, specified as a positive integer indicating the number of input samples that represent each modulated symbol.

For more information, see Signal Upsampling and Rate Changes.

Block processing rate, specified as one of these options:

  • Enforce single-rate processing — The input and output signals have the same port sample time. The block implements the rate change by making a size change at the output when compared to the input. The output width is the number of symbols (which is given by dividing the input length by the Samples per symbol parameter value when the Output type parameter is set to Integer).

  • Allow multirate processing — The input and output signals have different port sample times. The output period is the same as the symbol period and equals the product of the input period and the Samples per symbol parameter value.

Output data type, specified as double, boolean, int8, uint8, int16, uint16, int32, or uint32.

Block Characteristics

Data Types

Boolean | double | integer | single

Multidimensional Signals

no

Variable-Size Signals

no

More About

expand all

Tips

  • The M-FSK Demodulator Baseband block implements a noncoherent energy detector. To obtain the same BER performance as that of coherent FSK demodulation, use the CPFSK Demodulator Baseband block.

Algorithms

Demodulation of M-FSK-modulated signals is performed by using noncoherent detection, which configures an energy detector that does not exploit phase measurements. The demodulator knows that M possible waveforms were transmitted and must decide which is received during each time duration T.

As described in Sklar [1], the general analytical expression for M-FSK modulation is

si(t)=2ETcos(ωit+ϕ)0tTi=1,...,M

  • E is the symbol energy.

  • T is the symbol time duration.

  • ωi is the frequency term that has M discrete values.

  • M is the modulation order and specifies the number of waveforms.

  • ϕ is the phase offset.

The noncoherent energy detector of the M-FSK demodulator selects decision regions for each ωi waveform based on which decision region yields the maximum output.

For more details, see the Noncoherent Detection of FSK section in Sklar, [1].

References

[1] Sklar, Bernard. Digital Communications: Fundamentals and Applications. 2nd ed. Upper Saddle River, NJ: Prentice-Hall PTR, 2001.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced before R2006a