Display constellation diagram for input signals
Communications Toolbox / Comm Sinks
Communications Toolbox HDL Support / Comm Sinks
The Constellation Diagram block displays real and complex-valued floating and fixed-point signals in the I/Q plane. Use this block to perform qualitative and quantitative analysis on modulated single-carrier signals.
In the constellation diagram window you can:
Input and plot multiple signals on a single constellation diagram. You can define one reference constellation for each input signal. For more information, see Reference constellation.
Choose which channels are displayed by selecting signals in the legend. Use the Show legend parameter to display the legend.
Display the EVM / MER Measurements panel, which displays calculated error vector magnitude (EVM) and modulation error ratio (MER) measurements. When a multichannel signal is input, use Trace Selection to choose the signal being measured.
Port_1
— Signal or signals to visualizeConnect to the signal or signals you want to visualize as an Nsym-by-1 column vector or Nsym-by-Nsig matrix. Nsym is the number of symbols and Nsig is the number of input signals.
You can specify up to 20 input signals. Specifically, the maximum number of channels through all the ports is 20. For example, if you create a two-channel signal for every input port, then you can define up 10 number of input ports.
Example: [-1 + 1i; -1 - 1i; 1 + 1i; 1 - 1i]
specifies a 4-symbol input signal.
From the Constellation Diagram window, select File to view the options available.
Open at Start of Simulation
— Open constellation diagram at start of simulationSelect to open constellation diagram window at start of simulation. Deselect to prevent constellation diagram window from opening at start of simulation.
Number of input ports
— Number of input ports on scope block1
(default) | positive integer in the range [1, 20]Specify the number of input ports on the Scope block, specified as an integer in the range [1, 20].
When multichannel input signals are specified, the maximum number of input ports is limited by the total number of input signals defined. The total number of input signal cannot exceed 20.
From the Constellation Diagram window, under Tools, select Axes Scaling Properties to open the Axes Scaling Properties: Constellation Diagram dialog box. In this dialog box, you can customize the graphical properties of the axes.
PropertiesAxes scaling
— Axes scaling optionsManual
(default) | Auto
| After N Updates
Axes scaling options, specified as:
Manual
— Applies the
x and y axes
limits specified in the Visuals – Constellation Properties:
Constellation Diagram dialog box.
Auto
— Scales the axes limits
as needed during and after simulation.
After N Updates
— Scales the
axes limits after the specified Number of
updates.
Tunable: Yes
Number of updates
— Number of updates after which to scale the axes10
(default) | positive integerNumber of updates after which to scale the axes, specified as a positive integer.
Tunable: Yes
This parameter appears when Axes scaling is
set to After N Updates
.
Scale axes limits at stop
— Option to scale axes at end of simulationoff
(default) | on
Select to scale axes at end of the simulation to the data range percentage limits specified by X-axis Data range (%) and Y-axis Data range (%).
X-axis Data range (%)
— Percentage of x-axis used to display data80
(default) | scalar from 1 to 100Percentage of x-axis used to display data.
Example: 100
scales the x-axis range to the maximum
value of the in-phase amplitude component of the input
signal.
Tunable: Yes
X-axis Align
— Align data along x-axisCenter
(default) | Left
| Right
Align data along x-axis, specified as
Center
, Left
,
or Right
.
Example: Right
aligns the maximum value of the
in-phase amplitude component of the input signal toward the upper x-axis
limit.
Tunable: Yes
Y-axis Data range (%)
— Percentage of y-axis used to display data80
(default) | scalar from 1 to 100Percentage of y-axis used to display data.
Example: 30
scales the y-axis range so that the
maximum value of the quadrature amplitude component of the signal
occupies 30% of the y-axis range.
Tunable: Yes
Y-axis Align
— Align data along y-axisCenter
(default) | Top
| Bottom
Align data along y-axis, specified as
Center
, Top
,
or Bottom
.
Example: Bottom
aligns the maximum value of the
quadrature amplitude component of the signal toward the lower y-axis
limit.
Tunable: Yes
From the Constellation Diagram window, under Tools, select Measurements for options to display the Trace Selection and Signal Quality panes. By default these panes are docked in the Constellation Diagram window when displayed.
The Signal Quality pane contains the Settings and EVM / MER subpanes. Both subpanes can be independently expanded or collapsed.
For more information about the signal quality measurements, see EVM / MER Measurements.
Trace Selection
— Signal trace used to compute measurementsSelect the signal trace used to compute measurements from the list of available signals. This parameter lists the signals input to the block.
Tunable: Yes
To set this parameter, the Trace Selection pane must be visible. The Trace Selection pane automatically appears when you plot multiple signals on the Constellation Diagram window. To hide or display the Trace Selection pane from the Constellation Diagram window, under Tools, select Measurements > Trace Selection to toggle the visibility of the traceback selection measurement.
Measurement interval
— Duration of EVM or MER measurementCurrent Display
(default) | All displays
| positive integerDuration of the EVM or MER measurement in symbols, specified as
Current Display
, All
displays
, or a positive integer. To specify a positive
integer, select and then replace
<user-defined>
with your desired
value. The value must be positive and less than or equal to
Symbols to display. The measurement is computed
after the number of input data samples exceeds the measurement interval.
Tunable: Yes
EVM normalization
— Normalization method used for EVM calculationAverage constellation
power
(default) | Peak constellation power
Normalization method used for EVM calculation, specified as
Average constellation power
or
Peak constellation power
. The comm.EVM
System object™ computes the EVM.
Tunable: Yes
Reference constellation
— Reference constellationQPSK
(default) | BPSK
| 8-PSK
| 16-QAM
| 64-QAM
| 256-QAM
| vectorReference constellation, specified as BPSK
,
QPSK
, 8-PSK
,
16-QAM
, 64-QAM
,
256-QAM
, or a <user-defined> vector. To specify a
custom value, select <user-defined>
, then in the
Custom value property replace the entry with your desired
value.
Each input port can have its own reference constellation. For a multichannel input signal, a single reference constellation is applied for all signals in that input port.
To obtain the EVM/MER measurements, you must set Reference constellation to a valid value corresponding to the modulation of the input signal.
Tunable: Yes
Custom value
— Input reference constellationInput the reference constellation, specified as a vector.
To enable this parameter, set Reference constellation to <user-defined>.
Data Types: double
Complex Number Support: Yes
Average reference power
— Average power of reference constellation 1
(default) | positive scalarAverage power of the reference constellation in watts, specified as a positive scalar and referenced to a one-ohm load.
Tunable: Yes
Reference phase offset (rad)
— Phase offset of reference constellationpi/4
(default) | scalarPhase offset of the reference constellation in radians, specified as a scalar.
Tunable: Yes
From the Constellation Diagram window, select View > Configuration Properties to open the Visuals – Constellation Properties: Constellation Diagram dialog box. In this dialog box, you can customize the graphical properties of the plotted signals.
MainNumber of input ports
— Number of input ports on scope blockSpecify the number of input ports on the Scope block, specified as an integer in the range [1, 20].
Samples per symbol
— Number of samples used to represent each symbol1
(default) | positive integerNumber of samples used to represent each symbol, specified as a positive integer. When Samples per symbol is greater than 1, the signal is downsampled before it is plotted.
Tunable: Yes
Offset (samples)
— Number of samples to skip before plotting points0
(default) | nonnegative integerNumber of samples to skip before plotting points, specified as a nonnegative integer less than Samples per symbol. This parameter specifies the number of samples to skip when downsampling the input signal.
Tunable: Yes
Symbols to display
— Maximum number of symbols to displayInput frame length
(default) | positive integerMaximum number of symbols to display, specified as Input
frame length
or a positive integer. To specify a
positive integer, select and then replace
<user-defined>
with your desired
value.
Use Symbols to display to limit the maximum number of symbols displayed when long signals are input. Symbols plotted are the most recent symbols received.
Tunable: Yes
Show grid
— Display plot grid lineson
(default) | off
Select to display plot grid lines.
Tunable: Yes
Show legend
— Display plot legendoff
(default) | on
Select to display plot legend. The names listed in the legend are the signal names from the model.
From the legend, you can control which signals are plotted. This control is equivalent to changing the visibility in the View > Style dialog box. In the scope legend, click a signal name to hide the signal in the scope. To show the signal, click the signal name again. To show only one signal and hide all other signals, right-click the signal name. To show all signals, press Esc.
Tunable: Yes
Show signal trajectory
— Display signal trajectoryoff
(default) | on
Select to display the trajectory between constellation points for the plotted signals.
Tunable: Yes
Color fading
— Option to add color fading effectoff
(default) | on
When you select Color fading, the points in the display fade as the interval of time after they are first plotted increases. Color fading is for animation that resembles an oscilloscope.
Tunable: Yes
X-limits (Minimum)
— Minimum x-axis value-1.375
(default) | scalarMinimum x-axis value, specified as a scalar.
Tunable: Yes
X-limits (Maximum)
— Maximum x-axis value1.375
(default) | scalarMaximum x-axis value, specified as a scalar.
Tunable: Yes
Y-limits (Minimum)
— Minimum y-axis value-1.375
(default) | scalarMinimum y-axis value, specified as a scalar.
Tunable: Yes
Y-limits (Maximum)
— Maximum y-axis value1.375
(default) | scalarMaximum y-axis value, specified as a scalar.
Tunable: Yes
Title
— Title on plotTitle on plot, specified as a character vector or string.
Tunable: Yes
X-axis label
— x-axis label'In-phase Amplitude'
(default) | character vector | stringx-axis label, specified as a character vector or string.
Tunable: Yes
Y-axis label
— y-axis label'Quadrature Amplitude'
(default) | character vector | stringy-axis label, specified as a character vector or string.
Tunable: Yes
Show reference constellation
— Select to display reference constellationSelect to display the reference constellation.
Tunable: Yes
Input
— Input port number1
(default) | integerSelect the input port number for which you want to view/change the reference constellation and the associated attributes.
To enable this parameter, set the Number of input ports parameter to a value greater than 1.
Reference constellation
— Reference constellationQPSK
(default) | BPSK
| 8-PSK
| 16-QAM
| 64-QAM
| 256-QAM
| vectorReference constellation, specified as BPSK
,
QPSK
, 8-PSK
,
16-QAM
,
64-QAM
, 256-QAM
,
or a <user-defined> vector. To specify the value, select and then
replace <user-defined>
with your desired
value. When defined by the user, the reference constellation values can
be specified as a vector.
Each input port can have its own reference constellation. For a multichannel input signal, a single reference constellation is applied for all signals in that input port.
To obtain the EVM/MER measurements, you must set Reference constellation to a valid value corresponding to the modulation of the input signal.
Tunable: Yes
Data Types: double
Complex Number Support: Yes
Average reference power
— Average power of reference constellation 1
(default) | positive scalarAverage power of the reference constellation in watts, specified as a positive scalar and referenced to a one-ohm load.
Tunable: Yes
Reference phase offset (rad)
— Phase offset of reference constellationpi/4
(default) | scalarPhase offset of the reference constellation in radians, specified as a scalar.
Tunable: Yes
From the Constellation Diagram window, select View > Style to open the Constellation Diagram - Style dialog box. In this dialog box, you can customize the graphical properties of the components in the Constellation Diagram window.
Figure color
— Select background colorSelect the background color within the Constellation Diagram window and outside the scope axes.
Axes colors
— Select colors of plot and measurement panesSelect colors of plot and measurement panes. The first color option specifies the background color of the plot figure and the measurement panes. The second option specifies the color of the plot figure axes (ticks, labels, and grid lines) and the text. For more a description of the measurement panes, see in the Tools > Measurements.
Tunable: Yes
Properties for channel
— View or change graphical properties of each channelChannel 1
(default)Select a channel to view or change its graphical properties.
Bring To Front
— Bring channel to frontBring the active channel, as indicated by Properties for channel, to the front.
Show signal and reference constellation
— Option to hide channelon
(default) | off
Clear to hide the active channel and its associated reference constellation. Use Properties for channel to select the active channel. The setting is synchronized with actions in the interactive legend, see Show legend.
Symbols
— Set properties of symbolsSet graphical properties of the symbols for the active channel. Adjust style, size, line width, and color of the marker. Use Properties for channel to select the active channel.
To set marker shape to none
, Show
signal trajectory must be selected.
Signal trajectory
— Select properties of signal trajectorySet graphical properties for the signal trajectory of the active channel. Adjust style, width, and color of the line. Use Properties for channel to select the active channel.
To adjust signal trajectory properties, Show signal
trajectory must be selected. When Show
signal trajectory is selected, the Signal
trajectory line style cannot be set to no
line
.
Input
— Input port number1
(default) | integerView or change the graphical properties for the symbol of the reference constellation for each port individually.
If none of the input are multichannel signals, then the graphical properties of the reference constellation can be adjusted by selecting the channel from the Properties for channel parameter.
To enable this parameter, set the Number of input ports parameter to a value greater than 1 and specify at least one multichannel input signal.
Properties
— Select properties of reference constellation symbolsSelect the graphical properties for the symbols of the reference constellation. Adjust the style, size, line width, and color of the marker.
To adjust reference constellation graphical properties, Show reference constellation must be selected.
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
The EVM / MER signal quality pane displays the measurement settings, and error vector magnitude (EVM) and modulation error ratio (MER) measurement calculation results for the specified trace selection.
EVM — An error vector is a vector in the IQ plane from the ideal constellation point to 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
either the Average constellation power
or
Peak constellation power
method as computed using
these algorithms.
EVM Normalization Method | Algorithm |
---|---|
Average constellation power | Average constellation power normalization: EVMRMS, in percent, for average constellation power normalization: |
Peak constellation power | Peak constellation power normalization EVMRMS, in percent, for peak constellation power normalization |
The EVM / MER pane shows the average and peak EVMRMS in both percent and decibels for the selected trace. The EVM reported in decibels is computed as EVM (dB) = 10‑log10(EVMMS) = 20‑log10(EVMRMS), where:
Ik is the in-phase value of the kth symbol in the input vector.
Qk is the quadrature phase value of the kth symbol in the input vector.
Ik and Qk represent ideal (reference) symbol values. and represent measured (received) symbol values.
N is the input vector length.
Pavg is the value for
Average constellation power
.
Pmax is the value for
Peak constellation power
.
The maximum EVM value in a vector is where k is the kth symbol in a vector of length N.
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 EVM / MER pane indicates average MER measurement result in decibels for the selected trace.
MER is a measure of the SNR in a modulated signal, calculated in dB. The MER over N symbols is
where:
Ik is the in-phase value of the kth symbol in the input vector.
Qk is the quadrature phase value of the kth symbol in the input vector.
Ik and Qk represent ideal (reference) values. and represent measured (received) symbols.
For more information, see comm.MER
.
You can programmatically configure the scope properties with callbacks or within scripts using a scope configuration object as, described in Control Scope Blocks Programmatically (Simulink).
This block is excluded from the generated code when code generation is performed on a system containing this block.
This block can be used for simulation visibility in subsystems that generate HDL code, but is not included in the hardware implementation.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
Select web siteYou can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.