CPM Demodulator Baseband
Demodulate signal using CPM method and Viterbi algorithm
Libraries:
Communications Toolbox /
Modulation /
Digital Baseband Modulation /
CPM
Description
The CPM Demodulator Baseband block demodulates an input signal that was modulated using the continuous phase modulation (CPM) method.
CPM is a modulation method with memory. The block processing includes a correlator followed by a maximumlikelihood 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.
Ports
Input
In — Input signal
scalar  column vector
Input 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 IntegerValued and BinaryValued Output Signals.
Data Types: double
 single
Output
Out — Output signal
scalar  column vector
Output signal, returned as a scalar or column vector. For more information, see IntegerValued and BinaryValued Output Signals.
Supported Data Types
Doubleprecision floating point
Boolean (when Output type is set to
Bit
)8, 16, and 32bit signed integers (when Output type is set to
Integer
)
Data Types: double
 Boolean
 int8
 int16
 int32
For more information on the processing rates, see SingleRate Processing, and Multirate Processing.
Parameters
Mary number — Modulation order
4
(default)  positive integer
Modulation order indicating the alphabet size, specified as a positive integer that is a nonzero power of two. M must have the form 2^{K} 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 bits
Integer
(default)  Bit
Determines whether the output consists of integers or groups of bits, specified as
Integer
or Bit
.
Symbol set ordering — Bit mapping
Binary
(default)  Gray
Bit mapping, specified as Binary
or
Gray
.
Set this parameter to
Binary
to map symbols using natural binarycoded ordering.Set this parameter to
Gray
to map symbols using Graycoded ordering.
For more information, see IntegerValued and BinaryValued Output Signals.
Dependencies
To enable this parameter, set Output type to
Bit
.
Modulation index — Modulation index {h_{i}}
0.5
(default)  nonnegative scalar  column vector
Modulation index {h_{i}}, 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 shaping
Rectangular
(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) — Main lobe duration
1
(default)  positive integer
Main lobe duration of the largest lobe in the spectral raised cosine pulse, specified as a positive integer representing the number of symbol intervals used by the demodulator to pulseshape the modulated signal.
Dependencies
To enable this parameter, set Frequency pulse shape to
Spectral Raised Cosine
.
Rolloff — Rolloff factor of spectral raised cosine pulse shape
0.2
(default)  scalar in the range [0, 1]
Rolloff factor of the spectral raised cosine pulse, specified as a scalar in the range [0, 1].
Dependencies
To enable this parameter, set Frequency pulse shape to
Spectral Raised Cosine
.
BT product — Product of bandwidth and symbol time of Gaussian pulse
0.3
(default)  positive scalar
Product of the bandwidth and symbol time of the Gaussian pulse shape, specified as a positive scalar. Use BT product to reduce the bandwidth, at the expense of increased intersymbol interference.
Dependencies
To enable this parameter, set Frequency pulse shape to
Gaussian
.
Pulse length (symbol intervals) — Length of frequency pulse shape
1
(default)  positive integer
Frequency pulse shape length, specified as a positive scalar. For more information on the frequency pulse length, refer to LT in Pulse Shape Filtering.
Symbol prehistory — Data symbols used before the start of simulation
1
(default)  scalar  vector
Data symbols used before the start of simulation, specified as scalar or vector with odd integer elements in the range [– (M – 1), (M – 1)]. M represents the modulation order, which is specified by the Mary number parameter. The Symbol prehistory parameter defines the data symbols used by the modulator prior to the first call of the block, in reverse chronological order.
A scalar value expands to a vector of length L_{P} – 1. L_{P} represents the pulse length, which is specified by the Pulse length (symbol intervals) parameter.
For a vector, the length must be L_{P} – 1.
Phase offset (rad) — Initial phase offset
0
(default)  scalar
Initial phase offset in radians of the modulated waveform, specified as a scalar.
Samples per symbol — Symbol sampling rate
8
(default)  positive scalar
Symbol 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 Signal Upsampling and Rate Changes.
Rate options — Block processing rate
Enforce singlerate processing
(default)  Allow multirate processing
Block processing rate, specified as one of these options:
Enforce singlerate 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 toInteger
).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 — Traceback depth for Viterbi algorithm
16
(default)  positive integer
Traceback depth for the Viterbi algorithm, specified as a positive integer representing the number of trellis branches that the Viterbi algorithm uses to construct each traceback path. The value of this parameter is also the output delay and the number of zero symbols that precede the first meaningful demodulated symbol in the output. For more information, see Traceback Depth and Output Delays.
Output data type — Output data type
double
(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
.
Block Characteristics
Data Types 

Multidimensional Signals 

VariableSize Signals 

More About
CPM Demodulation
The CPM demodulation method process consists of a correlator followed by a maximumlikelihood 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), a finite number of phase states exist in the symbol. The implementation uses the Viterbi algorithm to perform MLSD.
{h_{i}} is a sequence of modulation indices that moves cyclically through a set of indices {h_{0}, h_{1}, h_{2}, …,h_{H1}}.
h_{i} = m_{i} / p_{i} is the modulation index in proper rational form.
m_{i} is the numerator of the modulation index.
p_{i} is the denominator of the modulation index.
m_{i} and p_{i} are relatively prime positive numbers.
The least common multiple (LCM) of {p_{0}, p_{1}, p_{2}, …,p_{H1}} is denoted as p.
h_{i}= m'_{i} / p.
{h_{i}} determines the number of phase states,
$$numPhaseStates=\left\{\begin{array}{l}p,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{for}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{all}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{even}\text{\hspace{0.17em}}\text{\hspace{0.17em}}m{\text{'}}_{i}\\ 2p,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{for}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{any}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{odd}\text{\hspace{0.17em}}\text{\hspace{0.17em}}m{\text{'}}_{i}\end{array}\right\}\text{,}$$
and affects the number of trellis states,
numStates = numPhaseStates×M^{(L1)},
L is the pulse length.
M is the modulation order.
CPM Method
The input to the demodulator is a baseband representation of the modulated signal:
$$\begin{array}{l}s(t)\text{\hspace{0.17em}}=\text{\hspace{0.17em}}\mathrm{exp}\left[j\text{\hspace{0.17em}}2\pi \text{\hspace{0.17em}}{\displaystyle \sum _{i\text{\hspace{0.17em}}=\text{\hspace{0.17em}}0}^{n}{\alpha}_{i}{h}_{i}q(tiT)}\right],\text{and}\\ nT\text{\hspace{0.17em}}t(n+1)T.\end{array}$$
where:
{α_{i}} is a sequence of Mary data symbols selected from the alphabet ±1, ±3, ±(M–1).
M must have the form 2^{k} for some positive integer k, where M is the modulation order and specifies the size of the symbol alphabet.
{h_{i}} is a sequence of modulation indices. h_{i} moves cyclically through a set of indices {h_{0}, h_{1}, h_{2}, ..., h_{H1}}. When H=1, only one modulation index exists, h_{0}, which is denoted as h.
Pulse Shape Filtering
The CPM method 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: $$q(t)={\displaystyle {\int}_{\text{\hspace{0.17em}}\infty}^{t}g(t)dt}$$.
The specified frequency pulse shape corresponds to these pulse shape expressions for g(t).
Pulse Shape  Expression 

Rectangular  $$g(t)=\{\begin{array}{cc}\frac{1}{2LT},& 0\le t\le LT\\ 0& \text{otherwise}\end{array}$$ 
Raised cosine  $$g(t)=\{\begin{array}{cc}\frac{1}{2LT}\left[1\mathrm{cos}\left(\frac{2\pi t}{LT}\right)\right],& 0\le t\le LT\\ 0& \text{otherwise}\end{array}$$ 
Spectral raised cosine  $$g(t)=\frac{1}{{L}_{\text{main}}T}\frac{\mathrm{sin}\left(\frac{2\pi t}{{L}_{\text{main}}T}\right)}{\frac{2\pi t}{{L}_{\text{main}}T}}\frac{\mathrm{cos}\left(\beta \frac{2\pi t}{{L}_{\text{main}}T}\right)}{1{\left(\frac{4\beta}{{L}_{\text{main}}T}t\right)}^{2}},\text{\hspace{1em}}0\le \beta \le 1$$ 
Gaussian  $$\begin{array}{c}g(t)=\frac{1}{2T}\left\{Q\left[2\pi {B}_{b}\frac{t{\scriptscriptstyle \frac{T}{2}}}{\sqrt{\mathrm{ln}2}}\right]Q\left[2\pi {B}_{b}\frac{t+{\scriptscriptstyle \frac{T}{2}}}{\sqrt{\mathrm{ln}2}}\right]\right\},\text{\hspace{0.17em}}\text{where}\\ Q(t)={\displaystyle {\int}_{t}^{\infty}\frac{1}{\sqrt{2\pi}}{e}^{{\tau}^{2}/2}d\tau}\end{array}$$ 
Tamed FM (tamed frequency modulation)  $$\begin{array}{l}g(t)={\scriptscriptstyle \frac{1}{8}}\left[{g}_{0}(tT)+2{g}_{0}(t)+{g}_{0}(t+T)\right],\text{\hspace{0.17em}}\text{where}\\ {\text{g}}_{0}(t)\approx \frac{1}{T}\left[\frac{\mathrm{sin}({\scriptscriptstyle \frac{\pi t}{T}})}{{\scriptscriptstyle \frac{\pi t}{T}}}\frac{{\pi}^{2}}{24}\frac{2\mathrm{sin}\left({\scriptscriptstyle \frac{\pi t}{T}}\right){\scriptscriptstyle \frac{2\pi t}{T}}\mathrm{cos}\left({\scriptscriptstyle \frac{\pi t}{T}}\right){\left({\scriptscriptstyle \frac{\pi t}{T}}\right)}^{2}\mathrm{sin}\left({\scriptscriptstyle \frac{\pi t}{T}}\right)}{{\left({\scriptscriptstyle \frac{\pi t}{T}}\right)}^{3}}\right]\end{array}$$ 
L_{main} is the main lobe pulse duration in symbol intervals.
β is the rolloff factor of the spectral raised cosine.
B_{b} is 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.
T is the symbol durations.
Q(t) is the complementary cumulative distribution function.
For more information on pulse shape filtering, see [1]
IntegerValued and BinaryValued Output Signals
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 Mary 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 klength binary words. The binary word mapping options are natural binarycoded ordering or Graycoded ordering.
The Output datatype can only be
double
orboolean
.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 L to the nonnegative integer (L+M–1)/2.
Maps each nonnegative integer to a binary word, using
Binary
orGray
mapping, as specified by the Symbol set ordering parameter.
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. 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.
Multirate Processing
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.
Traceback Depth and Output Delays
The traceback depth is the number of trellis branches used to construct each traceback path. Traceback depth influences the output delay, which is the number of zero symbols that precede the first meaningful demodulated value in the output.
The optimal traceback depth setting depends on minimum squared Euclidean distance calculations. Alternatively, you can choose a typical value, dependent on the number of states, using the fivetimestheconstraintlength rule, which corresponds to 5log_{2}(numStates).
For a binary raised cosine pulse shape with a pulse length of 3 and h=2/3, applying this rule (5log_{2}(3×2^{2}) = 18 gives a result that is close to the optimum value of 20.
When the Rate options parameter is set to
Allow multirate processing
, and the model uses a variablestep solver or a fixedstep solver with the Tasking Mode parameter set toSingleTasking
, then the delay vector consists of (Traceback depth+1) zerovalue symbols.When the Rate options parameter is set to
Enforce singlerate processing
, the delay vector consists of Traceback depth zerovalue symbols.
Pair Block
CPM Modulator Baseband — Modulates data using continuous phase modulation.
References
[1] Anderson, John B., Tor Aulin, and CarlErik Sundberg. Digital Phase Modulation. New York: Plenum Press, 1986.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced before R2006a
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
 América Latina (Español)
 Canada (English)
 United States (English)
Europe
 Belgium (English)
 Denmark (English)
 Deutschland (Deutsch)
 España (Español)
 Finland (English)
 France (Français)
 Ireland (English)
 Italia (Italiano)
 Luxembourg (English)
 Netherlands (English)
 Norway (English)
 Österreich (Deutsch)
 Portugal (English)
 Sweden (English)
 Switzerland
 United Kingdom (English)