Demodulate CPM-modulated data
Communications Toolbox / Modulation / Digital Baseband Modulation / CPM
The CPM Demodulator Baseband block demodulates a signal that was modulated using continuous phase modulation (CPM).
CPM is a modulation method with memory. The block processing includes a correlator followed by a maximum-likelihood sequence detector (MLSD) that searches the paths through the state trellis for the minimum Euclidean distance path. The block uses the Viterbi algorithm to perform MLSD.
For more information about this demodulation and the filtering applied, see CPM Demodulation and Pulse Shape Filtering.
In
— Input signalInput signal, specified as a scalar or column vector. The length of the input signal must be an integer multiple of the number of samples per symbol specified in the Samples per symbol parameter. For more information, see Integer-Valued and Binary-Valued Output Signals.
Data Types: double
| single
Out
— Output signalOutput signal, returned as a scalar or column vector. For more information, see Integer-Valued and Binary-Valued Output Signals.
Double-precision floating point
Boolean (when Output type is set to
Bit
)
8-, 16-, and 32-bit signed integers (when Output type is set to
Integer
)
Data Types: double
| Boolean
| int8
| int16
| int32
For more information on the processing rates, see Single-Rate Processing, and Multirate Processing.
M-ary number
— Modulation order4
(default) | positive integerModulation order indicating the alphabet size, specified as a positive integer that is a nonzero power of two. M must have the form 2K for some positive integer K, where K is the number of bits per symbol.
Output type
— Determines whether output consists of integers or groups of bitsInteger
(default) | Bit
Determines whether the output consists of integers or groups of bits, specified as
Integer
or Bit
.
Symbol set ordering
— Bit mappingBinary
(default) | Gray
Bit mapping, specified as Binary
or
Gray
.
This parameter determines how the block maps each integer to a group of output bits. For more information, see Integer-Valued and Binary-Valued Output Signals.
To enable this parameter, set Output type to
Bit
.
Modulation index
— Modulation index {hi}0.5
(default) | nonnegative scalar | column vector Modulation index {hi}, specified as a nonnegative scalar or column vector.
{h} represents a sequence of modulation indices. For more information, see CPM Demodulation.
Frequency pulse shape
— Type of pulse shapingRectangular
(default) | Raised Cosine
| Spectral Raised Cosine
| Gaussian
| Tamed FM
Type of pulse shaping used to smooth the phase transitions of the modulated signal,
specified as Rectangular
, Raised Cosine
,
Spectral Raised Cosine
, Gaussian
, or
Tamed FM
. For more information on the filtering options, see Pulse Shape Filtering.
Main lobe pulse duration (symbol intervals)
— Number of symbol intervals of largest lobe of the spectral raised cosine pulse1
(default) | positive scalarNumber of symbol intervals of the largest lobe of the spectral raised cosine pulse, specified as a positive scalar.
To enable this parameter, set Frequency pulse shape to
Spectral Raised Cosine
.
Rolloff
— Rolloff factor of spectral raised cosine pulse shape0.2
(default) | nonnegative scalarRolloff factor of the spectral raised cosine pulse shape, specified as a scalar from 0 to 1.
To enable this parameter, set Frequency pulse shape to
Spectral Raised Cosine
.
BT product
— Product of bandwidth and time0.3
(default) | nonnegative scalarProduct of bandwidth and time, specified as a nonnegative scalar. Use BT product to reduce the bandwidth, at the expense of increased intersymbol interference.
To enable this parameter, set Frequency pulse shape to
Gaussian
.
Pulse length (symbol intervals)
— Frequency pulse length1
(default) | positive scalarFrequency pulse shape length, specified as a positive scalar. Refer to LT in Pulse Shape Filtering for more information on the frequency pulse length.
Symbol prehistory
— Data symbols used before the start of simulation1
(default) | scalar | vectorData symbols used before the start of simulation in reverse chronological order. If Symbol prehistory is a vector, then its length must be one less than the Pulse length parameter value.
Phase offset (rad)
— Initial phase offset0
(default) | scalarInitial phase offset of output in radians, specified as a scalar.
Samples per symbol
— Symbol sampling rate8
(default) | positive scalarSymbol sampling rate, specified as a positive scalar. This parameter represents the number of samples output for each integer or binary word input. For all nonbinary schemes, as defined by the pulse shapes, this value must be greater than 1.
For more information, see Upsample Signals and Rate Changes.
Rate options
— Block processing rateEnforce single-rate processing
(default) | Allow multirate processing
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.
Traceback depth
— Number of trellis branches16
(default) | positive integerNumber of trellis branches used to construct each traceback path, specified as a positive integer. For more information, see Traceback Depth and Output Delays.
Output data type
— Output data typedouble
(default) | boolean
| int8
| int16
| int32
Output data type, specified as double
,
boolean
, int8
,
int16
, or int32
. For more information,
see Supported Data Types in Out
.
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
The CPM demodulation processing consists of a correlator followed by a maximum-likelihood sequence detector (MLSD) that searches the paths through the state trellis for the minimum Euclidean distance path. When the modulation index is rational (h = m/p), there are a finite number of phase states in the symbol. The block uses the Viterbi algorithm to perform MLSD.
{hi} represents a sequence of modulation indices that moves cyclically through a set of indices {h0, h1, h2, …,hH-1}.
hi = mi/pi represents the modulation index in proper rational form.
mi represents the numerator of the modulation index.
pi represents the denominator of the modulation index.
mi and pi are relatively prime positive numbers.
The least common multiple (LCM) of {p0, p1, p2, …,pH-1} is denoted as p.
hi = m'i / p
{hi} determines the number of phase states:
and affects the number of trellis states:
numStates = numPhaseStates*M(L-1)
L represents the Pulse length.
M represents the M-ary number.
The input to the demodulator is a baseband representation of the modulated signal:
where:
{αi} represents a sequence of M-ary data symbols selected from the alphabet ±1, ±3, ±(M–1).
M must have the form 2K for some positive integer K, where M is the modulation order and specifies the size of the symbol alphabet.
{hi} represents a sequence of modulation indices and hi moves cyclically through a set of indices {h0, h1, h2, ..., hH-1}. When H=1, there is only one modulation index, h0, which is denoted as h.
Continuous phase modulation uses pulse shaping to smooth the phase transitions of the modulated signal. The function q(t) is the phase response obtained from the frequency pulse, g(t), through this relation:
The specified frequency pulse shape corresponds to these pulse shape expressions, g(t).
Pulse Shape | Expression |
---|---|
Rectangular | |
Raised Cosine | |
Spectral Raised Cosine | ![]() |
Gaussian | |
Tamed FM (tamed frequency modulation) |
Lmain is the main lobe pulse duration in symbol intervals.
β is the rolloff factor of the spectral raised cosine.
Bbis the product of the bandwidth and the Gaussian pulse.
The duration of the pulse, LT, is the pulse length in symbol intervals. As defined by the expressions, the Spectral Raised Cosine
, Gaussian
, and Tamed FM
pulse shapes have infinite length. For all practical purposes, LT specifies the truncated finite length.
For more information on pulse shape filtering, see [1]
When the Output type parameter is set to
Integer
:
The block produces odd integers between –(M–1) and M–1. The modulation order, M, is specified by the M-ary number parameter.
The Output datatype parameter cannot be set to
boolean
.
When the Output type parameter is set to
Bit
:
The block produces groupings of K bits. Each grouping is called a binary word.
The Output datatype can only be double
or boolean
.
In binary output mode, the block processing follows this procedure:
Maps each input symbol to an intermediate value, as in the integer output mode.
Maps the odd integer k to the nonnegative integer (k+M–1)/2.
Maps each nonnegative integer to a binary word, using
Binary
or Gray
mapping, as
specified by the Symbol set ordering parameter.
In single-rate 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.
The Traceback depth parameter, D, is the number of trellis branches used to construct each traceback path. D influences the output delay, which is the number of zero symbols that precede the first meaningful demodulated value in the output.
When the Rate options parameter is set to Allow
multirate processing
, and the model uses a variable-step solver or a fixed-step
solver with the Tasking Mode parameter set to
SingleTasking
, then the delay vector consists of
D+1 zero-value symbols.
When the Rate options parameter is set to Enforce
single-rate processing
, the delay vector consists of D
zero-value symbols.
The optimal Traceback depth parameter value depends on minimum squared Euclidean distance calculations. Alternatively, a typical value, dependent on the number of states, can be chosen using the five-times-the-constraint-length rule, which corresponds to .
For a binary raised cosine pulse shape with a pulse length of 3 and h=2/3, applying this rule gives a result that is close to the optimum value of 20.
CPM Modulator Baseband — Modulates data using continuous phase modulation.
[1] Anderson, John B., Tor Aulin, and Carl-Erik Sundberg. Digital Phase Modulation. New York: Plenum Press, 1986.