# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# Constellation Diagram

Display constellation diagram for input signals

Comm Sinks

## Description

The Constellation Diagram block plots constellation diagrams, signal trajectory, and provides the ability to perform EVM and MER measurements.

The symbols that the Constellation Diagram scope displays are always the most recently available symbols from the time buffer.

## Dialog Box

To change the signal display settings, select View > Configuration Properties to bring up the Visuals—Constellation Properties dialog box. Then, modify the values for the Samples per symbol, Offset and Symbols to display parameters on the Main tab. You can modify the reference constellation parameters on the Reference constellation tab.

## Visuals — Constellation Properties

### Main Pane

#### Samples per symbol

Number of samples used to represent a symbol. This value must be a positive number.

#### Offset (samples)

Number of samples to skip before plotting points. The offset must be a nonnegative integer value less than the value of the samples per symbol.

#### Symbols to display

The maximum number of symbols that can be displayed. Must be a positive integer value.

### Display Pane

#### Show grid

Select this check box to turn on the grid.

#### Show legend

Select this check box to display a legend for the graph.

#### Show signal trajectory

Select this check box to display the trajectory of a modulated signal by plotting its in-phase component versus its quadrature component.

When you set select this check box, the points in the display fade as the interval of time after they are first plotted increases. The default value of this property is `false`. This property is tunable.

#### X-limits (Minimum)

Specify the minimum value of the x-axis.

#### X-limits (Maximum)

Specify the maximum value of the x-axis.

#### Y-limits (Minimum)

Specify the minimum value of the y-axis.

#### Y-limits (Maximum)

Specify the maximum value of the y-axis.

#### Title

Specify a label that appears above the constellation diagram plot. By default, there is no title.

#### X-axis label

Specify the text the scope displays along the x-axis

#### Y-axis label

Specify the text the scope displays along the y-axis

### Reference Constellation Pane

#### Show reference constellation

Select the check box to display the reference constellation.

#### Reference constellation

Select the reference constellation from `BPSK` | `QPSK` | `8-PSK` | `16-QAM` | `64-QAM` | `256-QAM` | `<user-defined>`. If not selected, the reference constellation is specified in the variable `refConst`.

#### Constellation normalization

Select the type of constellation normalization as ```Minimum distance```, `Average power`, or `Peak power`.

#### Reference minimum distance

Specify the minimum distance between symbols in the reference constellation as a positive real scalar. This parameter is available when Constellation normalization is set to ```Minimum distance```.

#### Average reference power

Specify the average power of the reference constellation as a positive real scalar. This parameter is available when Constellation normalization is set to `Average power`.

#### Peak reference power

Specify the peak power of the reference constellation as a positive real scalar. This parameter is available when Constellation normalization is set to `Peak power`.

Specify the phase offset of the reference constellation in radians as a real scalar.

## Measurement Panels

### Measurements Panel Buttons

Each of the Measurements panels contains the following buttons that enable you to modify the appearance of the current panel.

ButtonDescription

Move the current panel to the top. When you are displaying more than one panel, this action moves the current panel above all the other panels.

Collapse the current panel. When you first enable a panel, by default, it displays one or more of its panes. Click this button to hide all of its panes to conserve space. After you click this button, it becomes the expand button .

Expand the current panel. This button appears after you click the collapse button to hide the panes in the current panel. Click this button to display the panes in the current panel and show measurements again. After you click this button, it becomes the collapse button again.

Undock the current panel. This button lets you move the current panel into a separate window that can be relocated anywhere on your screen. After you click this button, it becomes the dock button in the new window.

Dock the current panel. This button appears only after you click the undock button. Click this button to put the current panel back into the right side of the Scope window. After you click this button, it becomes the undock button again.

Close the current panel. This button lets you remove the current panel from the right side of the Scope window.

Some panels have their measurements separated by category into a number of panes. Click the pane expand button to show each pane that is hidden in the current panel. Click the pane collapse button to hide each pane that is shown in the current panel.

### Signal Quality Panel

The Signal Quality panel controls the Settings and Signal Quality panes. Both panels can be independently expanded or collapsed.

You can choose to hide or display the Signal Quality panel. In the Scope menu, select Tools > Measurements > Signal Quality.

### Settings Pane

The Settings pane enables you to define the measurement interval and normalization method the scope uses when obtaining signal measurements.

• Measurement interval — The duration of the EVM or MER measurement, specified as ```'Current Display'```, `'All displays'`, or as a postive integer. The value of this property must be greater than one and less than or equal to the setting for the number of symbols to display. The measurement is computed after number of input data samples is greater than the measurement interval.

• EVM normalization — For the EVM calculations, you may use one of two normalization methods: ```Average constellation power``` or `Peak constellation power`. The scope performs EVM calculations using the `comm.EVM` System object™. For more information, see `comm.EVM`.

• Reference constellation — Select the reference constellation as `BPSK` | `QPSK` | `8-PSK` | `16-QAM` | `64-QAM` | `256-QAM` | `<user-defined>`.

• Constellation normalization — Select the type of constellation normalization as `Minimum distance`, ```Average power```, or `Peak power`.

• Minimum distance — Specify the minimum distance between symbols in the reference constellation as a positive real scalar. This parameter is available when Constellation normalization is set to `Minimum distance`.

• Average reference power — Specify the average power of the reference constellation as a positive real scalar. This parameter is available when Constellation normalization is set to `Average power`.

• Peak reference power — Specify the peak power of the reference constellation as a positive real scalar. This parameter is available when Constellation normalization is set to `Peak power`.

• Reference phase offset — Specify the phase offset of the reference constellation in radians as a real scalar.

### Signal Quality Pane

The Signal Quality pane displays the calculation results.

• EVM — An error vector is a vector in the I-Q plane between the ideal constellation point and the actual point at the receiver. The root mean square error vector magnitude, EVMRMS, is measured for the average and peak constellation power.

On the constellation diagram, you can display the EVMRMS measurements normalized by the `Average constellation power` or ```Peak constellation power``` as computed using these algorithms.

EVM Normalization MethodAlgorithm
`Average constellation power`

EVMRMS in percent for average constellation power normalization

`$EV{M}_{RMS}\left(percent\right)=\sqrt{\frac{\frac{1}{N}\sum _{k=1}^{N}\left({e}_{k}\right)}{{P}_{avg}}}*100$`

`Peak constellation power`

EVMRMS in percent for peak constellation power normalization

`$EV{M}_{RMS}\left(percent\right)=\sqrt{\frac{\frac{1}{N}\sum _{k=1}^{N}\left({e}_{k}\right)}{{P}_{\mathrm{max}}}}*\text{​}100$`

The display shows the average and peak EVMRMS in percent and in decibels. The EVM reported in decibels is computed as EVM (dB) = 10*log10(EVMMS) = 20*log10(EVMRMS)

Where:

• ek = ${\left({I}_{k}-\stackrel{~}{{I}_{k}}\right)}^{2}+{\left({Q}_{k}-{\stackrel{~}{Q}}_{k}\right)}^{2}$

• Ik = In-phase measurement of the kth symbol in the burst

• Qk = Quadrature phase measurement of the kth symbol in the burst

• N = Input vector length

• Pavg = The value for Average constellation power

• Pmax = The value for Peak constellation power

• Ik and Qk represent ideal (reference) values. ${\stackrel{~}{I}}_{k}$ and ${\stackrel{~}{Q}}_{k}$ represent measured (received) symbols.

• EVMRMS = sqrt(EVMMS)

The max EVM is the maximum EVM value in a frame or $EV{M}_{\mathrm{max}}=\underset{k\in \left[1,...,N\right]}{\mathrm{max}}\left\{EV{M}_{k}\right\}\text{\hspace{0.17em}},$ where k is the kth symbol in a burst of length N.

EVM NormalizationAlgorithm
`Average constellation power`

Average constellation power normalization

`$EV{M}_{k}=\sqrt{\frac{{e}_{k}}{{P}_{avg}}}*100$`

`Peak constellation power`

Peak constellation power normalization

`$EV{M}_{k}=\sqrt{\frac{{e}_{k}}{{P}_{\mathrm{max}}}}*\text{​}100$`

For more information, see `comm.EVM`.

• MER — MER is the ratio of the average power of the transmitted signal to the average power of the error vector. The scope indicates the measurement result in decibels.

MER is a measure of the SNR in a modulated signal calculated in dB. The MER over N symbols is

`$MER=10*\text{​}{\mathrm{log}}_{10}\left(\frac{\sum _{n=1}^{N}\left({I}_{k}^{2}+{Q}_{k}^{2}\right)}{\sum _{n=1}^{N}\left({e}_{k}\right)}\right)\text{\hspace{0.17em}}\text{dB}\text{.}$`

where:

• ek = ${\left({I}_{k}-\stackrel{~}{{I}_{k}}\right)}^{2}+{\left({Q}_{k}-{\stackrel{~}{Q}}_{k}\right)}^{2}$

• Ik = In-phase measurement of the kth symbol in the burst

• Qk = Quadrature phase measurement of the kth symbol in the burst

• Ik and Qk represent ideal (reference) values. ${\stackrel{~}{I}}_{k}$ and ${\stackrel{~}{Q}}_{k}$ represent measured (received) symbols.

For more information, see `comm.MER`.

## Style Dialog Box

In the Style dialog box, you can customize the style of displays. You are able to change the color of the figure containing the displays, the background and foreground colors of display axes, and properties of lines in a display. From the scope menu, select View > Style to open this dialog box.

### Properties

The Style dialog box allows you to modify the following elements of the scope figure:

#### Figure color

Specify the color that you want to apply to the background of the scope figure. By default, the figure color is gray.

#### Axes colors

Specify the color that you want to apply to the background of the axes for the active display. Using a second drop down, you can also specify the color of the ticks, labels, and grid lines.

Specify the marker shape, marker size, marker line width, and color for the signal on the active display. The marker shape cannot be set to `none` unless the `ShowTrajectory` property is `true`.

#### Signal trajectory

Specify the line type, width, and color for the signal trajectory plot. The line type can only be set to something other than `no line` when the `ShowTrajectory` property is `true`. Conversely, the line type must be `no line` when the `ShowTrajectory` property is `false`.

#### Reference constellation

Specify the marker shape, marker size, marker line width, and color for the reference constellation shown on the active display. These settings are only applicable when the `ShowReferenceConstellation` property is `true`.

#### Marker symbols

Specify the markers for the selected signal and the reference constellation on the active display. This parameter is similar to the `Marker` property for the MATLAB® Handle Graphics® plot objects.

SpecifierMarker Type
noneNo marker
Circle
Square
Cross
Point (default)
Plus sign
Asterisk
Diamond
Downward-pointing triangle
Upward-pointing triangle
Left-pointing triangle
Right-pointing triangle
Five-pointed star (pentagram)
Six-pointed star (hexagram)

### Properties

The Tools—Axes Scaling Properties dialog box appears as follows.

#### Axes scaling

Specify when the scope automatically scales the axes. You can select one of the following options:

• `Manual` — When you select this option, the scope does not automatically scale the axes. You can manually scale the axes in any of the following ways:

• Select Tools > Axes Scaling Properties.

• Press one of the Scale Axis Limits toolbar buttons.

• When the scope figure is the active window, press and simultaneously.

• `Auto` — When you select this option, the scope scales the axes as needed, both during and after simulation. Selecting this option shows the Do not allow Y-axis limits to shrink check box.

• `After N Updates` — Selecting this option causes the scope to scale the axes after a specified number of updates. This option is useful and more efficient when your scope display starts with one axis scale, but quickly reaches a different steady state axis scale. Selecting this option shows the Number of updates edit box.

By default, this property is set to `Auto`. This property is Tunable (Simulink).

#### Do not allow Y-axis limits to shrink

When you select this property, the y-axis is allowed only to grow during axes scaling operations. If you clear this check box, the y-axis or color limits may shrink during axes scaling operations.

This property appears only when you select `Auto` for the Axis scaling property. When you set the Axes scaling property to `Manual` or ```After N Updates```, the y-axis or color limits are allowed to shrink. Tunable (Simulink).

Specify as a positive integer the number of updates after which to scale the axes. This property appears only when you select ```After N Updates``` for the Axes scaling property. Tunable (Simulink).

#### Scale axes limits at stop

Select this check box to scale the axes when the simulation stops. The y-axis is always scaled. The x-axis limits are only scaled if you also select the Scale X-axis limits check box.

#### Y-axis Data range (%)

Set the percentage of the y-axis that the scope uses to display the data when scaling the axes. Valid values are from 1 through 100. For example, if you set this property to `100`, the Scope scales the y-axis limits such that your data uses the entire y-axis range. If you then set this property to `30`, the scope increases the y-axis range such that your data uses only 30% of the y-axis range. Tunable (Simulink).

#### Y-axis Align

Specify where the scope aligns your data along the y-axis when it scales the axes. You can select `Top`, `Center`, or `Bottom`. Tunable (Simulink).

#### Autoscale X-axis limits

Check this box to allow the scope to scale the x-axis limits when it scales the axes. If Axes scaling is set to `Auto`, checking Autoscale X-axis limits only scales the data currently within the axes, not the entire signal in the data buffer. If Autoscale X-axis limits is on and the resulting axis is greater than the span of the scope, trigger position markers will not be displayed. Triggers are controlled using the Trigger Measurements panel. Tunable (Simulink).

#### X-axis Data range (%)

Set the percentage of the x-axis that the scope uses to display the data when scaling the axes. Valid values are from 1 through 100. For example, if you set this property to `100`, the scope scales the x-axis limits such that your data uses the entirex-axis range. If you then set this property to `30`, the scope increases the x-axis range such that your data uses only 30% of the x-axis range. Use the x-axis Align property to specify data placement along the x-axis.

This property appears only when you select the Scale X-axis limits check box. Tunable (Simulink).

#### X-axis Align

Specify how the scope aligns your data along the x-axis: `Left`, `Center`, or `Right`. This property appears only when you select the Scale X-axis limits check box. Tunable (Simulink).

## Examples

### View Constellation Diagram

This example shows how to use the Constellation Diagram block to visualize the constellation or scatter plot of a modulated signal.

Open the model, doc_constellation_diagram_example, from the MATLAB command prompt.

`doc_constellation_diagram_example`

The model includes:

Run the model and observe the 8-PSK constellation. The received data points are shown in yellow while the red ‘+’ symbols represent the ideal constellation locations.

Click on the button to display the signal trajectory of the modulated signal. Observe that the constellation diagram icon in the model has changed to reflect that the diagram is now displaying a trajectory and the constellation diagram now shows the signal trajectory.