MFSK Modulator Baseband
Modulate using Mary frequency shift keying method
Library
FM, in Digital Baseband sublibrary of Modulation
Description
The MFSK Modulator Baseband block modulates using the Mary frequency shift keying method. The output is a baseband representation of the modulated signal. For information about the data types each block port supports, see Supported Data Types.
To prevent aliasing from occurring in the output signal, set the sampling frequency greater than the product of M and the Frequency separation parameter. Sampling frequency is Samples per symbol divided by the input symbol period (in seconds).
IntegerValued Signals and BinaryValued Signals
The input and output signals for this block are discretetime signals.
When you set the Input type parameter to Integer
,
the block accepts integer values between 0
and M1
. M represents
the Mary number block parameter.
When you set the Input type parameter to Bit
,
the block accepts binaryvalued inputs that represent integers. The
block collects binaryvalued signals into groups of K =
log_{2}(M) bits
where
K represents the number of bits per symbol.
The input vector length must be an integer multiple of K. In this configuration, the block accepts a group of K bits and maps that group onto a symbol at the block output. The block outputs one modulated symbol, oversampled by the Samples per symbol parameter value, for each group of K bits.
The Symbol set ordering parameter indicates
how the block maps a group of K input bits to a
corresponding symbol. When you set the parameter to Binary
,
the block maps [u(1) u(2) ... u(K)] to the
integer
$$\sum _{i=1}^{K}u(i){2}^{Ki}$$
and assumes that this integer is the input value. u(1) is the most significant bit.
If you set M = 8, Symbol set ordering to Binary
,
and the binary input word is [1 1 0],
the block converts [1 1 0] to the
integer 6. The block produces the same output when the input is 6
and the Input type parameter is Integer
.
When you set Symbol set ordering to Gray
, the
block uses a Graycoded arrangement and assigns binary inputs to points of a predefined
Graycoded signal constellation. The predefined Mary Graycoded signal constellation
assigns the binary representation.
M = 8; k = log2(M); P = [0:M1]; reshape(int2bit(bitxor(P,floor(P/2)),k),k,[])'
to the P
^{th} integer.
The following tables show the typical Binary to Gray mapping for M = 8.
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 
SingleRate Processing
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. In this mode, the input to the block can be multiple symbols.
When you set Input type to
Integer
, the input can be a column vector, the length of which is the number of input symbols.When you set Input type to
Bit
, the input width must be an integer multiple of K, the number of bits per symbol and the Mary number value must be a power of two.
The output width equals the product of the number of input symbols and the Samples per symbol parameter value.
Multirate Processing
In multirate processing mode, the input and output signals have different port sample times. In this mode, the input to the block must be one symbol.
When you set Input type to
Integer
, the input must be a scalar.When you set Input type to
Bit
, the input width must equal the number of bits per symbol and the Mary number value must be a power of two.
The output sample time equals the symbol period divided by the Samples per symbol parameter value.
To run the MFSK Modulator block in multirate mode, clear the Treat each discrete rate as a separate task checkbox (in Simulation > Configuration Parameters > Solver).
Parameters
 Mary number
Number of frequencies in the modulated signal, specified as a positive integer ≥ 2.
 Input type
Indicates whether the input consists of integers or groups of bits. If you set this parameter to
Bit
, then the Mary number parameter must be 2^{K} for some positive integer K. Symbol set ordering
Determines how the block maps each group of input bits to a corresponding integer.
Note
When you set Symbol set ordering to
Gray
, the Mary number value must be a power of two. Frequency separation (Hz)
The distance between successive frequencies in the modulated signal.
 Phase continuity
Determines whether the modulated signal changes phases in a continuous or discontinuous way.
If you set the Phase continuity parameter to
Continuous
, then the modulated signal maintains its phase even when it changes its frequency. If you set the Phase continuity parameter toDiscontinuous
, then the modulated signal comprises portions of M sinusoids of different frequencies. Thus, a change in the input value sometimes causes a change in the phase of the modulated signal. Samples per symbol
The number of output samples that the block produces for each integer or binary word in the input.
 Rate options
Select the rate processing option for the block.
Enforce singlerate processing
— When you select this option, 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 equals the product of the number of symbols and the Samples per symbol parameter value.Allow multirate processing
— When you select this option, the input and output signals have different port sample times. The output sample time equals the symbol period divided by the Samples per symbol parameter value.
 Output data type
You can specify the output type of the block as either a
double
or asingle
. By default, the block sets this value todouble
.
Supported Data Types
Port  Supported Data Types 

Input 

Output 

Pair Block
References
[1] Sklar, Bernard. Digital Communications: Fundamentals and Applications. Upper Saddle River, NJ: PrenticeHall, 2001.
Extended Capabilities
Version History
Introduced before R2006a