Constellation Visualization

Some linear modulator blocks provide the capability to visualize a signal constellation right from the block mask. This Constellation Visualization feature allows you to visualize a signal constellation for specific block parameters. The following blocks support constellation visualization:

    Note:   To display Fixed-Point settings, you need a Fixed-Point Designer™ user license.

Clicking View Constellation on a linear modulator block mask, plots the signal constellation using the block's mask parameters. If you set a modulator block to output single or fixed-point data types, clicking View Constellation generates two signal constellations plots overlaid on each other.

  • One plot provides a reference constellation using double precision data type

  • The other plot provides data whose data type selection is defined in the block mask

The title of the plot indicates the values of significant parameters. You can use the full array of MATLAB plot tools to manipulate plot figures. Selecting Inherit via back propagation for the Output Data Type generates a constellation plot with double as the Output data type.

Observe Modulator Design Affect Signal Constellation

In this tutorial, you will make changes to the modulator block. Without actually applying the changes to the model, you will observe how these changes effect the signal constellation.

  1. Open the constellation visualization tutorialconstellation visualization tutorial model by typing doc_CVTutorialModel at the MATLAB command line.

  2. Double-click the Rectangular QAM Modulator Baseband block.

  3. Next, click View Constellation

    The constellation plot shows that the constellation:

    • Uses a 16-QAM modulation scheme

    • Uses Binary constellation mapping

    • Has 0 degree phase offset

    • Has a minimum distance between two constellation points of 2

    The constellation plot also shows that the signal has a double precision data type. Because the Input type is integer, the constellation has integer symbol mapping.

  4. From the block mask, select Bit for the Input type parameter.

  5. Select Gray for the Constellation ordering parameter.

  6. Click View Constellation, and observe the results. Even though you did not click Apply, making these changes part of the model, the constellation plot still updates. The plot indicates gray constellation ordering using a bit representation of symbols.

  7. You can overlay and compare the effect that two different data type selections have on a signal constellation. For example, you can compare the effect of changing Output data type from double to Fixed-point on the signal constellation.

    To compare settings, perform the following tasks:

    • Click the Data Types tab.

    • Set the Output data type parameter to Fixed-point.

    • Set the Output word length parameter to 16.

    • Set the Set Output fraction length to parameter to Best precision.

  8. Click Main tab, and then click View Constellation.

    The plot overlays the fixed-point constellation on top of the double-precision constellation.

  9. You can specify a block parameter value using variables defined in the MATLAB workspace. To define a variable, type M=32 in the MATLAB workspace.

      Note:   The model workspace in Simulink® has priority over the base workspace in MATLAB®.

  10. In the block mask, click the Main tab, and then type M for the M-ary number parameter. This parameter allows the block to use the variable value you defined in MATLAB workspace.

  11. Click the Data Types tab and then select double for the Output data type parameter.

  12. Click the Main tab. Then, click the View Constellation button and observe the results.

  13. You can also use the Constellation Visualization feature while a simulation is running. Type M=16 in the MATLAB workspace, select Integer for the Input type and click Apply.

  14. Simulate the model by clicking Run in the Simulink model window.

  15. While the simulation is running, click View Constellation. Compare the signal constellation to the scatter plot generated in the previous step.

  16. End the simulation by clicking the Stop button in the Simulink model window.

    The Constellation Visualization feature provides full access to the MATLAB plotting capabilities, including: capturing a figure, saving a figure in multiple file formats, changing display settings, or saving files for archiving purposes. To capture a figure, select Edit > Copy Figure.

    Using this tutorial, you have generated numerous constellation plots. If you close the Simulink model or delete the modulator block from the model, all the plots will close.

      Tip   If you capture a figure you want to archive for future use, save the figure before closing the model.

  17. Close the Simulink model, and observe that all of the constellation figures also close.

Was this topic helpful?