Documentation Center

  • Trial Software
  • Product Updates

Contents

comm.PSKModulator System object

Package: comm

Modulate using M-ary PSK method

Description

The PSKModulator object 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.

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.PSKModulator. The behavior of step is specific to each object in the toolbox.

Construction

H = comm.PSKModulator creates a modulator System object™, H. This object modulates the input signal using the M-ary phase shift keying (M-PSK) method.

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

H = comm.PSKModulator(M,PHASE,Name,Value) creates an M-PSK modulator object, H. This object has the ModulationOrder property set to M, the PhaseOffset property set to PHASE, and the other specified properties set to the specified values.

Properties

ModulationOrder

Number of points in signal constellation

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

PhaseOffset

Phase of zeroth point of constellation

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

BitInput

Assume bit inputs

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

SymbolMapping

Constellation encoding

Specify how the object maps an integer or group of log2(ModulationOrder) input 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, between 0 ModulationOrder1) maps to the complex value exp(j PhaseOffset + j 2 m/ModulationOrder). When you set this property to Custom, the object uses the signal constellation defined in the CustomSymbolMapping property.

CustomSymbolMapping

Custom constellation encoding

Specify a custom constellation symbol mapping vector. This property requires a row or column vector of size ModulationOrder and must have unique integer values in the range [0, ModulationOrder1]. 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.

OutputDataType

Data type of output

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

 Fixed-Point Properties

Methods

cloneCreate PSK modulator object with same property values
constellationCalculate or plot ideal signal constellation
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
stepModulate using M-ary PSK method

Examples

Modulate data using 16-PSK modulation, and visualize the data in a scatter plot.

 % Create binary data for 24, 4-bit symbols 
    data = randi([0 1],96,1);
 % Create a 16-PSK modulator System object with bits as inputs and Gray-coded signal constellation
    hModulator = comm.PSKModulator(16,'BitInput',true);
 % Change the phase offset to pi/16 
    hModulator.PhaseOffset = pi/16; 
 % Modulate and plot the data
    modData = step(hModulator, data); 
    constellation(hModulator)

Algorithms

This object implements the algorithm, inputs, and outputs described on the M-PSK Modulator Baseband block reference page. The object properties correspond to the block parameters.

See Also

|

Was this topic helpful?