Modulate using Mary phase shift keying method
PM, in Digital Baseband sublibrary of Modulation
The MPSK Modulator Baseband block modulates using the Mary phase shift keying method. The output is a baseband representation of the modulated signal. The Mary number parameter, M, is the number of points in the signal constellation.
The block accepts scalar or column vector input signals. For information about the data types each block port supports, see Supported Data Types.
Alternative configurations of the block determine how the block interprets its input and arranges its output, as explained in the following sections.
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 for each group of K bits.
For example, the following schematics illustrate how the block
processes two 8ary integers or binary words in one time step. The
block processes all input signals as frames. In both cases, the Phase
offset parameter is 0
.
The Constellation 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 behaves as if this integer were the input value. u(1) is the most significant bit.
For example, if you set M = 8, Constellation 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 Constellation 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
de2bi(bitxor(M,floor(M/2)), log2(M),'leftmsb')
to the M
^{th} phase.
The zeroth phase in the constellation is the Phase offset parameter.
Successive phases are in the counterclockwise direction.
Note This transformation seems counterintuitive because it constitutes a Graytobinary mapping. However, the block must use it to impose a Gray ordering on the signal constellation, which has a natural binary ordering. 
In other words, if the block input is the natural binary representation, u, of the integer U, the block output has phase
jθ + j2πm/M
where θ is the Phase offset parameter and m is an integer between 0 and M1 that satisfies
$$m\text{XOR}\lfloor m/2\rfloor =U$$
For example, if M = 8, the binary representations that correspond to the zeroth through seventh phases are as follows.
M = 8; m = [0:M1]'; de2bi(bitxor(m,floor(m/2)), log2(M),'leftmsb') ans = 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0 0
The following diagram shows the 8ary Graycoded constellation that the block uses if the Phase offset parameter is $$\frac{\Pi}{8}$$.
The MPSK Modulator Baseband block provides the capability to visualize a signal constellation from the block mask. This Constellation Visualization feature allows you to visualize a signal constellation for specific block parameters. For more information, see the Constellation Visualization section of the Communications System Toolbox™ User's Guide.
The number of points in the signal constellation.
The phase of the zeroth point of the signal constellation.
Determines how the block maps an integer or group of K input bits to the corresponding symbol.
If set to Binary
, baseband Mary phase shift
keying modulation with a phase offset of θ maps an integer m between
0 and M1 to the complex value
exp(jθ + j2πm/M)
If set to Gray
, the block uses a
Graycoded signal constellation. As a result, binary representations
that differ in more than one bit cannot map to consecutive integers
modulo M.
Selecting Userdefined
displays the Constellation
mapping parameter, which allows you to specify the mapping
technique for the block.
This field appears when you select Userdefined
from
the Constellation ordering dropdown list.
This parameter is a row or column vector of size M and must
have unique integer values in the range [0, M1]. The values must
be of data type double
.
The first element of this vector corresponds to the constellation point at 0 + Phase offset angle, with subsequent elements running counterclockwise. The last element corresponds to the 2π/M + Phase offset constellation point.
Indicates whether the input consists of integers or groups of bits.
To use integer values between 0
and M1
as inputs, set this parameter to Integer
.
If this parameter is set to Bit
,
the Mary number parameter must be 2^{K} for
some positive integer K. K consecutive
elements in the input represent a symbol, where K =
log2(M).
This block supports the following output data types: double
, single
, Fixedpoint
, Userdefined
,
or Inherit via back propagation
.
Set this property to Fixedpoint
or Userdefined
to
enable parameters in which you specify additional details. Set this
property to Inherit via back propagation
to match
the output data type and scaling to the following block in the model.
Specify the word length, in bits, of the fixedpoint output
data type. This parameter appears when you select Fixedpoint
for
the Output data type parameter.
Specify any signed builtin or signed fixedpoint data type.
You can specify fixedpoint data types using the sfix
, sint
, sfrac
, and fixdt
functions
from FixedPoint Designer™ software. This parameter appears when
you select Userdefined
for the Output
data type parameter.
Specify the scaling of the fixedpoint output by either of the following methods:
Select Best precision
to
automatically scale the output signal so that it has the best possible
precision.
Select Userdefined
to
specify the output scaling in the Output fraction length parameter.
This parameter appears when you select Fixedpoint
for
the Output data type parameter or when you select Userdefined
and
the specified output data type is a fixedpoint data type.
For fixedpoint output data types, specify the number of fractional
bits, or bits to the right of the binary point. This parameter appears
when you select Fixedpoint
or Userdefined
for
the Output data type parameter and Userdefined
for
the Set output fraction length to parameter.
Port  Supported Data Types 

Input 

Output 

This block supports HDL code generation using HDL Coder™. HDL Coder provides additional configuration options that affect HDL implementation and synthesized logic. For more information on implementations, properties, and restrictions for HDL code generation, see MPSK Modulator Baseband in the HDL Coder documentation.