comm.QPSKModulator System object

Package: comm

Modulate using QPSK method


The QPSKModulator object modulates using the quaternary phase shift keying method. The output is a baseband representation of the modulated signal.

To modulate a signal using quaternary phase shift keying:

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

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


H = comm.QPSKModulator creates a modulator System object™, H. This object modulates the input signal using the quadrature phase shift keying (QPSK) method.

H = comm.QPSKModulator(Name,Value) creates a QPSK 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.QPSKModulator(PHASE,Name,Value) creates a QPSK modulator object, H. This object has the PhaseOffset property set to PHASE and the other specified properties set to the specified values.



Phase of zeroth point in constellation

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


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. This vector must have a length that is an integer multiple of 2. This vector contains bit representations of integers between 0 and 3. When you set this property to false, the step method input must be a column vector of integer symbol values between 0 and 3.


Constellation encoding

Specify how the object maps an integer or a group of two input bits to the corresponding symbol as one of Binary | Gray. 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 input integer m, between 0m3, maps to the complex value exp(j×PhaseOffset + j×2×π×m4).


Data type of output

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

 Fixed-Point Properties


cloneCreate QPSK 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 QPSK method


Modulate data using QPSK, and visualize the data in a scatter plot.

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


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

Introduced in R2012a

Was this topic helpful?