Modulate using QPSK method


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

To modulate a signal using quadrature 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.


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.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


constellationCalculate or plot ideal signal constellation
stepModulate using QPSK method
Common to All System Objects

Allow System object property value changes


expand all

Create a QPSK modulator.

mod = comm.QPSKModulator;

Determine the reference constellation points.

refC = constellation(mod)
refC = 4×1 complex

   0.7071 + 0.7071i
  -0.7071 + 0.7071i
  -0.7071 - 0.7071i
   0.7071 - 0.7071i

Plot the constellation.


Create a PSK demodulator having 0 phase offset.

demod = comm.QPSKDemodulator('PhaseOffset',0);

Plot its reference constellation. The constellation method works for both modulator and demodulator objects.


Create a QPSK modulator object and a phase noise object.

qpskModulator = comm.QPSKModulator;
phNoise = comm.PhaseNoise('Level',-55,'FrequencyOffset',20,'SampleRate',1000);

Generate random QPSK data. Pass the signal through the phase noise object.

d = randi([0 3],1000,1);
x = qpskModulator(d);
y = phNoise(x);

Display the constellation diagram of the QPSK signal. The phase noise has introduced a rotational distortion on the constellation diagram.

constDiagram = comm.ConstellationDiagram;



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.

Extended Capabilities

Introduced in R2012a