View Constellation of Modulator Block
This example shows how to visualize constellations by clicking the View Constellation button on the mask of linear modulator block. These linear modulator blocks provide the capability to visualize a signal constellation from the block mask.
For these linear modulator blocks, clicking View Constellation on the block mask plots the signal constellation using the applied block settings. Use the
cm_view_modulator_constellation model to create constellation figures by clicking View Constellation. This model uses the Rectangular QAM Modulator Baseband block with the modulation order set to the workspace variable
M. The value for
M is specified in the
PreLoadFcn callback function. To view the callback, select MODELING, SETUP, Model Settings, and then Model Properties. In the Model Properties window, select Callbacks, and then
Modulator Configuration and Signal Constellation
When you click View Constellation on the modulator block mask, the constellation diagram opens in a MATLAB®
figure window. The title of the plot indicates the values of significant parameters.
This constellation plot figure shows the default signal constellation for the Rectangular QAM Modulator Baseband block:
16-QAM modulation scheme
Gray constellation mapping
0-degree phase offset
Minimum distance of 2 between two constellation points
Double precision data type signal
Integer symbol representation
From the block mask, set the Input type parameter to
Bit, and the Constellation ordering parameter to
Binary. To view the constellation for the updated configuration, click Apply before clicking View Constellation. The updated plot indicates binary constellation mapping and displays the bit representation for the symbols.
Since the modulation order setting of the Rectangular QAM Modulator Baseband block is
M, the value can be updated by using the variable
M defined in the MATLAB workspace. Set
M = 32 in the MATLAB workspace. The modulation order setting updates the model workspace in Simulink®. Click View Constellation to show the 32-QAM constellation.
To capture a figure for future use, save the figure before closing the model. When you close the Simulink model, all of the constellation figures closes as well.
- BPSK Modulator Baseband | QPSK Modulator Baseband | M-PSK Modulator Baseband | M-PAM Modulator Baseband | Rectangular QAM Modulator Baseband | General QAM Modulator Baseband