| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Communications Blockset |
| Contents | Index |
| Learn more about Communications Blockset |
PM, in Digital Baseband sublibrary of Modulation
The M-PSK Modulator Baseband block modulates using the M-ary phase shift keying method. The output is a baseband representation of the modulated signal. The M-ary number parameter, M, is the number of points in the signal constellation.
The input and output for this block are discrete-time signals. For integer inputs, the block can accept the data types int8, uint8, int16, uint16, int32, uint32, single, and double. For bit inputs, the block can accept int8, uint8, int16, uint16, int32, uint32, boolean, single, and double.
Alternative configurations of the block determine how the block interprets its input and arranges its output, as explained in the following sections.
If the Input type parameter is set to Bit and the M-ary number parameter has the form 2K for some positive integer K, the block accepts binary representations of integers between 0 and M-1. It modulates each group of K bits, called a binary word. The input can be either a vector of length K or a frame-based column vector whose length is an integer multiple of K. For more information, see Binary-Valued and Integer-Valued Signals in Communications BlocksetUser's Guide.
If the input is a frame-based column vector, the block processes several integers or several binary words in each time step. (If the Input type parameter is set to Bit, a binary word consists of log2(M) bits.)
For example, the following schematics illustrate how the block processes two 8-ary integers or binary words in one time step. The signals involved are all frame-based column vectors. In both cases, the Phase offset parameter is 0.

The M-PSK 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 Blockset 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 M-ary phase shift keying modulation with a phase offset of θ maps an integer m between 0 and M-1 to the complex value
exp(jθ + j2πm/M)
If set to Gray, the block uses a Gray-coded signal constellation; as a result, binary representations that differ in more than one bit cannot map to consecutive integers modulo M. The explicit mapping is described in Algorithm.
Selecting User-defined displays the field Constellation mapping, which allows for user-specified mapping.
This field appears when User-defined is selected in the drop-down list Constellation ordering.
This parameter is a row or column vector of size M and must have unique integer values in the range [0, M-1]. 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 -pi/M + Phase offset constellation point.
Indicates whether the input consists of integers or groups of bits.
If this parameter is set to Bit, the M-ary number parameter must be 2K for some positive integer K. K consecutive elements in each channel or column represent a symbol, where K = log2(M). The number of elements in each channel must be an integer multiple of K, and each element must be 0 or 1.
To use integers between 0 and M-1 as input values, set this to Integer. In this case, the input can be either a scalar or a frame-based column vector.
The output data type can be set to double, single, Fixed-point, User-defined, or Inherit via back propagation.
Setting this to Fixed-point or User-defined enables fields in which you can further specify details. Setting this to Inherit via back propagation, sets the output data type and scaling to match the following block.
Specify the word length, in bits, of the fixed-point output data type. This parameter is only visible when you select Fixed-point for the Output data type parameter.
Specify any signed built-in or signed fixed-point data type. You can specify fixed-point data types using the sfix, sint, sfrac, and fixdt functions from Simulink Fixed Point software. This parameter is only visible when you select User-defined for the Output data type parameter.
Specify the scaling of the fixed-point output by either of the following methods:
Choose Best precision to have the output scaling automatically set such that the output signal has the best possible precision.
Choose User-defined to specify the output scaling in the Output fraction length parameter.
This parameter is only visible when you select Fixed-point for the Output data type parameter or when you select User-defined and the specified output data type is a fixed-point data type.
For fixed-point output data types, specify the number of fractional bits, or bits to the right of the binary point. This parameter is only visible when you select Fixed-point or User-defined for the Output data type parameter and User-defined for the Set output fraction length to parameter.
If the Constellation ordering parameter is set to Gray, the block internally assigns the binary inputs to points of a predefined Gray-coded signal constellation. The block's predefined M-ary Gray-coded signal constellation assigns the binary representation
de2bi(bitxor(M,floor(M/2)), log2(M),'left-msb')
to the Mth phase. The zeroth phase in the constellation is the Phase offset parameter, and successive phases are counted in a counterclockwise direction.
Note This transformation might seem counterintuitive because it constitutes a Gray-to-binary 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 M-1 that satisfies
![]()
For example, if M = 8, the binary representations that correspond to the zeroth through seventh phases are as follows.
M = 8; m = [0:M-1]';
de2bi(bitxor(m,floor(m/2)), log2(M),'left-msb')
ans =
0 0 0
0 0 1
0 1 1
0 1 0
1 1 0
1 1 1
1 0 1
1 0 0The following diagram shows the 8-ary Gray-coded constellation that the block uses if the Phase offset parameter is π/8.

BPSK Modulator Baseband, QPSK Modulator Baseband, M-DPSK Modulator Baseband
![]() | M-PSK Demodulator Baseband | M-PSK Phase Recovery | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |