Main Content

constellation

Calculate or plot ideal signal constellation

Description

symbols = constellation(obj) returns the numerical values of the constellation.

example

constellation(obj) generates a constellation plot for the object.

Note

For OQPSK, the constellation that displays does not depict the IQ delay introduced by the OQPSK modulator.

Examples

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

constellation(mod)

Figure contains an axes object. The axes object with title Constellation: QPSK,Gray Mapping,PhaseOffset=0.7854rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 7 objects of type line, text. One or more of the lines displays its values using only markers

Reconfigure the object for bit input and plot the constellation to show the binary values of the Gray-encoded mapping.

release(mod)
mod.BitInput = true; 
constellation(mod)

Figure contains an axes object. The axes object with title Constellation: QPSK,Gray Mapping,PhaseOffset=0.7854rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 7 objects of type line, text. One or more of the lines displays its values using only markers

Create a QPSK demodulator having phase offset set to 0.

demod = comm.QPSKDemodulator(0);

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

constellation(demod)

Figure contains an axes object. The axes object with title Constellation: QPSK,Gray Mapping,PhaseOffset=0rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 7 objects of type line, text. One or more of the lines displays its values using only markers

Create a PSK modulator.

mod = comm.PSKModulator;

Determine the reference constellation points.

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

   0.9239 + 0.3827i
   0.3827 + 0.9239i
  -0.3827 + 0.9239i
  -0.9239 + 0.3827i
  -0.9239 - 0.3827i
  -0.3827 - 0.9239i
   0.3827 - 0.9239i
   0.9239 - 0.3827i

Plot the constellation.

constellation(mod)

Figure contains an axes object. The axes object with title Constellation: 8-PSK,Gray Mapping,PhaseOffset=0.3927rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 11 objects of type line, text. One or more of the lines displays its values using only markers

Create a PSK demodulator having modulation order 16.

demod = comm.PSKDemodulator(16);

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

constellation(demod)

Figure contains an axes object. The axes object with title Constellation: 16-PSK,Gray Mapping,PhaseOffset=0.3927rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 19 objects of type line, text. One or more of the lines displays its values using only markers

Create a BPSK modulator.

mod = comm.BPSKModulator;

Determine the reference constellation points.

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

   1.0000 + 0.0000i
  -1.0000 + 0.0000i

Plot the constellation.

constellation(mod)

Figure contains an axes object. The axes object with title Constellation: BPSK,PhaseOffset=0rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 5 objects of type line, text. One or more of the lines displays its values using only markers

Create a BPSK demodulator having phase offset set to π2.

demod = comm.BPSKDemodulator(pi/2);

Determine the reference constellation points.

refC = constellation(demod)
refC = 2×1 complex

   0.0000 + 1.0000i
  -0.0000 - 1.0000i

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

constellation(demod)

Figure contains an axes object. The axes object with title Constellation: BPSK,PhaseOffset=1.5708rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 5 objects of type line, text. One or more of the lines displays its values using only markers

Create a OQPSK modulator.

mod = comm.OQPSKModulator;

Determine the reference constellation points. The constellation that displays does not depict the IQ delay introduced by the OQPSK modulator.

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.

constellation(mod)

Figure contains an axes object. The axes object with title Constellation: OQPSK,Gray Mapping,PhaseOffset=0rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 7 objects of type line, text. One or more of the lines displays its values using only markers

Change the phase offset for the modulated symbols. Plot the constellation to show the rotated constellation points.

release(mod)
mod.PhaseOffset = 45*pi/180; 
constellation(mod)

Figure contains an axes object. The axes object with title Constellation: OQPSK,Gray Mapping,PhaseOffset=0.7854rad, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 7 objects of type line, text. One or more of the lines displays its values using only markers

Create comm.PAMModulator and comm.PAMDemodulator System objects, and then calculate their ideal signal constellations.

Create modulator and demodulator objects.

mod = comm.PAMModulator;
demod = comm.PAMModulator;

Calculate the constellation points.

refMod = constellation(mod)
refMod = 4×1

    -3
    -1
     1
     3

refDemod = constellation(demod)
refDemod = 4×1

    -3
    -1
     1
     3

Verify that both objects produce the same points.

isequal(refMod,refDemod)
ans = logical
   1

Display the ideal signal constellation.

constellation(mod)

Figure contains an axes object. The axes object with title Constellation: 4-PAM,Gray Mapping,Min.Dist=2, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 7 objects of type line, text. One or more of the lines displays its values using only markers

Input Arguments

collapse all

System object to return constellation for, specified as a modulator System object.

Data Types: object

Output Arguments

collapse all

Constellation points, returned as a complex vector.

Data Types: double | single
Complex Number Support: Yes

Version History

Introduced in R2012a