Main Content

constellation

Calculate or plot ideal signal constellation

Description

example

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

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

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. The axes with title Constellation: QPSK,Gray Mapping,PhaseOffset=0.7854rad contains 7 objects of type line, text.

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.

constellation(demod)

Figure contains an axes. The axes with title Constellation: QPSK,Gray Mapping,PhaseOffset=0rad contains 7 objects of type line, text.

Create a BPSK Modulator System object™ and calculate the reference constellation values.

Create a comm.BPSKModulator System object.

h = comm.BPSKModulator;

Calculate and display the reference constellation values by calling the constellation function.

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

   1.0000 + 0.0000i
  -1.0000 + 0.0000i

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. The axes with title Constellation: 8-PSK,Gray Mapping,PhaseOffset=0.3927rad contains 11 objects of type line, text.

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. The axes with title Constellation: 16-PSK,Gray Mapping,PhaseOffset=0.3927rad contains 19 objects of type line, text.

Create a BPSK Modulator System object™ and calculate the reference constellation values.

Create a comm.BPSKModulator System object.

h = comm.BPSKModulator;

Calculate and display the reference constellation values by calling the constellation function.

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

   1.0000 + 0.0000i
  -1.0000 + 0.0000i

Create a BPSK Modulator System object™ and plot the reference constellation.

Create a comm.BPSKModulator System object.

bpsk = comm.BPSKModulator;

Plot the reference constellation by calling the constellation function.

constellation(bpsk)

Figure contains an axes. The axes with title Constellation: BPSK,PhaseOffset=0rad contains 5 objects of type line, text.

Create a BPSK Demodulator System object™ and calculate its reference constellation.

h = comm.BPSKDemodulator;

Calculate and display the reference signal constellation by calling the constellation function.

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

   1.0000 + 0.0000i
  -1.0000 + 0.0000i

Create a BPSK Demodulator System object™ and then plot the reference signal constellation.

h = comm.BPSKDemodulator;

Plot the reference constellation by calling the constellation function.

constellation(h)

Figure contains an axes. The axes with title Constellation: BPSK,PhaseOffset=0rad contains 5 objects of type line, text.

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

Introduced in R2012a