This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

comm.gpu.PSKModulator System object

Package: comm

Modulate using M-ary PSK method with GPU


The GPU PSKModulator object modulates a signal using the M-ary phase shift keying method implemented on a graphics processing unit (GPU). The input is a baseband representation of the modulated signal. The input and output for this object are discrete-time signals. This object accepts a scalar-valued or column vector input signal.

    Note:   To use this object, you must install a Parallel Computing Toolbox™ license and have access to an appropriate GPU. For more about GPUs, see GPU Computing (Parallel Computing Toolbox) in the Parallel Computing Toolbox documentation.

A GPU-based System object™ accepts typical MATLAB® arrays or objects that you create using the gpuArray class as an input. GPU-based System objects support input signals with double- or single-precision data types. The output signal inherits its datatype from the input signal.

  • If the input signal is a MATLAB array, then the output signal is also a MATLAB array. In this case, the System object handles data transfer between the CPU and GPU.

  • If the input signal is a gpuArray, then the output signal is also a gpuArray. In this case, the data remains on the GPU. Therefore, when the object is given a gpuArray, calculations take place entirely on the GPU and no data transfer occurs. Passing gpuArray arguments provides increased performance by reducing simulation time. For more information, see Establish Arrays on a GPU (Parallel Computing Toolbox) in the Parallel Computing Toolbox documentation.

To modulate a signal using phase shift keying:

  1. Define and set up your PSK modulator object. See Construction.

  2. Call step to modulate the signal according to the properties of comm.gpu.PSKModulator. The behavior of step is specific to each object in the toolbox.

    Note:   Starting in R2016b, instead of using the step method to perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.


H = comm.gpu.PSKModulator returns a GPU-based demodulator System object, H. This object modulates the input signal using the M-ary phase shift keying (M-PSK) method with soft decision using the approximate log-likelihood ratio algorithm.

H = comm.gpu.PSKModulator(Name,Value) creates a GPU-based M-PSK modulator object, H, with the specified property Name set to the specified Value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN)

H = comm.gpu.PSKModulator(M,PHASE,Name,Value) creates a GPU-based M-PSK modulator object, H, with the ModulationOrder property set to M, the PhaseOffset property set to PHASE and other specified property Names set to the specified Values. M and PHASE are value-only arguments. To specify a value-only argument, you must also specify all preceding value-only arguments. You can specify name-value pair arguments in any order.



Number of points in signal constellation

Specify the number of points in the signal constellation as a positive, integer scalar. The default is 8.


Phase of zeroth point of constellation

Specify the phase offset of the zeroth point of the constellation, in radians, as a real scalar. The default is π/8.


Assume bit inputs

Specify whether the input is bits or integers. The default is false. When you set this property to true, the step method input must be a column vector of bit values whose length is an integer multiple of log2(ModulationOrder). This vector contains bit representations of integers between 0 and ModulationOrder-1. The input data type can be numeric or logical. When you set the BitInput property to false, the step method input must be a column vector of integer symbol values between 0 and ModulationOrder-1. The data type of the input must be numeric.


Constellation encoding

Specify how the object maps an integer or group of log2(ModulationOrder) bits to the corresponding symbol as one of Binary | Gray | Custom. The default is Gray. When you set this property to Gray, the object uses a Gray-encoded signal constellation. When you set this property to Binary, the integer m (0 ≤ m ≤ ModulationOrder-1) maps to the complex value exp(j*PhaseOffset + j*2*pi*m/ModulationOrder). When you set this property to Custom, the object uses the signal constellation defined in the CustomSymbolMapping property.


Custom constellation encoding

Specify a custom constellation symbol mapping vector. This property must be a row or column vector of size ModulationOrder with unique integer values in the range [0, ModulationOrder-1]. The values must be of data type double. The first element of this vector corresponds to the constellation point at an angle of 0 + PhaseOffset, with subsequent elements running counterclockwise. The last element corresponds to the constellation point at an angle of -π/ModulationOrder + PhaseOffset. This property applies when you set the SymbolMapping property to Custom. The default is 0:7.


Data type of output

Specify the output data type as one of double | single. The default is double.


constellationCalculate or plot ideal signal constellation
stepModulate using M-ary PSK method with GPU
Common to All System Objects

Create System object with same property values


Expected number of inputs to a System object


Expected number of outputs of a System object


Check locked states of a System object (logical)


Allow System object property value changes


The GPU PSK Modulator System object supports floating-point and integer input data types. This object uses the same algorithm as the comm.PSKModulator System object. See the Algorithms section of the comm.PSKModulator help page for details.


expand all

Create binary data for 100, 4-bit symbols

data = randi([0 1],400,1);

Create a 16-PSK modulator System object with bits as inputs and Gray-coded signal constellation. Change the phase offset to $\pi/16$.

gpuMod = comm.gpu.PSKModulator(16,'BitInput',true);
gpuMod.PhaseOffset = pi/16;

Modulate and plot the data

modData = gpuMod(data);

Introduced in R2012a

Was this topic helpful?