Demodulate FSKmodulated data
FM, in Digital Baseband sublibrary of Modulation
The MFSK Demodulator Baseband block demodulates a signal that
was modulated using the Mary frequency shift keying method. The input
is a baseband representation of the modulated signal. The input and
output for this block are discretetime signals. This block accepts
a scalar value or column vector input signal of type single
or double
.
For information about the data types each block port supports, see Supported Data Types.
The Mary number parameter, M, is the number of frequencies in the modulated signal. The Frequency separation parameter is the distance, in Hz, between successive frequencies of the modulated signal.
The MFSK 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.
When you set the Output type parameter
to Integer
, the block outputs integer values
between 0
and M1
. M represents
the Mary number block parameter.
When you set the Output type parameter
to Bit
, the block outputs binaryvalued
signals that represent integers. The block represents each integer
using a group of K = log_{2}(M)
bits, where K represents the number of bits per
symbol. The output vector length must be an integer multiple of K.
The Symbol set ordering parameter indicates
how the block maps a symbol to a group of K output
bits. When you set the parameter to Binary
,
the block maps the integer, I, to [u(1) u(2) ... u(K)] bits,
where the individual u(i) are given by
$$I\text{\hspace{0.17em}}=\text{\hspace{0.17em}}{\displaystyle \sum _{i=1}^{K}u(i){2}^{Ki}}$$
u(1) is the most significant bit.
For example, if M = 8, you set Symbol
set ordering to Binary
, and
the demodulated integer symbol value is 6, then the binary output
word is [1 1 0].
When you set Symbol set ordering to Gray
,
the block assigns binary outputs from points of a predefined Graycoded
signal constellation. The predefined Mary Graycoded signal constellation
assigns the binary representation
M = 8; P = [0:M1]'; de2bi(bitxor(P,floor(P/2)), log2(M),'leftmsb')
to the P
^{th} integer.
The typical Binary to Gray mapping for M = 8 is shown in the following tables.
Binary to Gray Mapping for Bits
Binary Code  Gray Code 

000  000 
001  001 
010  011 
011  010 
100  110 
101  111 
110  101 
111  100 
Binary to Gray Mapping for Integers
Binary Code  Gray Code 

0  0 
1  1 
2  3 
3  2 
4  6 
5  7 
6  5 
7  4 
Whether the output is an integer or a binary representation of an integer, the block maps the highest frequency to the integer 0 and maps the lowest frequency to the integer M1. In baseband simulation, the lowest frequency is the negative frequency with the largest absolute value.
In singlerate processing mode, the input and output signals have the same port sample time. The block implicitly implements the rate change by making a size change at the output when compared to the input. The input width must be an integer multiple of the Samples per symbol parameter value, and the input can be a column vector.
When you set Output type to Bit
,
the output width is K times the number of input
symbols.
When you set Output type to Integer
,
the output width is the number of input symbols.
In multirate processing mode, the input and output signals have different port sample times. The input must be a scalar. The output symbol time is the product of the input sample time and the Samples per symbol parameter value.
When you set Output type to Bit
,
the output width equals the number of bits per symbol.
When you set Output type to Integer
,
the output is a scalar.
To run the MFSK Demodulator block in multirate mode, clear the Treat each discrete rate as a separate task checkbox (in Simulation > Configuration Parameters > Solver).
The number of frequencies in the modulated signal.
Determines whether the output consists of integers or groups
of bits. If this parameter is set to Bit
,
then the Mary number parameter must be 2^{K} for
some positive integer K.
Determines how the block maps each integer to a group of output bits.
The distance between successive frequencies in the modulated signal.
The number of input samples that represent each modulated symbol.
Select the rate processing method for the block.
Enforce singlerate processing
—
When you select this option, the input and output signals have the
same port sample times. 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
—
When you select this option, 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.
Note:
The option 
For more information, see SingleRate Processing and Multirate Processing in the Description section of this page.
The output type of the block can be specified here as boolean
, int8
, uint8
, int16
, uint16
, int32
, uint32
,
or double
. By default, the block sets this
to double
.
Port  Supported Data Types 

Input 

Output 
