Discrete-Time Eye Diagram Scope

Display multiple traces of modulated signal

Library

Comm Sinks

Description

The Discrete-Time Eye Diagram Scope block displays multiple traces of a modulated signal to produce an eye diagram. You can use the block to reveal the modulation characteristics of the signal, such as pulse shaping or channel distortions.

The Discrete-Time Eye Diagram Scope block has one input port. This block accepts a scalar-valued or column vector input signal. The block accepts a signal with the following data types: double, single, boolean, base integer, and fixed-point data types for input, but casts as double prior to displaying the results.

Marker and Line Styles

The Marker, Line style, and Line color parameters, on the Rendering Properties panel, control the appearance of the signal trajectory. The Marker parameter specifies the marker style for points in the eye diagram. The following table lists some of the available line markers.

Marker StyleParameter SymbolAppearance
Plus +

Circle o

Asterisk *

Point .

Cross x

The Line style parameter specifies the style for lines in the eye diagram. The following lists some of the available line styles.

Line StyleAppearance
Solid

Dashed

Dotted

Dash-dot

The Line color parameter specifies the color of the eye diagram. These settings plot the signal channels in the following colors (8-bit RGB equivalents are shown in the center column).

ColorRGB EquivalentAppearance
Black (0,0,0)

Blue (0,0,255)

Red (255,0,0)

Green (0,255,0)

Dark purple (192,0,192)

See the line function in the MATLAB documentation for more information about the available markers, colors, and line styles.

Recommended Settings

The following table summarizes the recommended parameter settings for the Discrete-Time Eye Diagram Scope.

ParameterRecommended Setting
Samples per symbolSame as the Samples per symbol setting in the modulator block, or the Interpolation factor setting in the interpolation block
Offset (samples)0 to view the open part of the eye

(Samples per symbol)/2 to view the closed part of the eye

Symbols per traceAn integer between 1 and 4
Traces displayed10 times the alphabet size of the modulator, M
New traces per displaySame as Traces displayed for greater speed

A small positive integer for best animation

MarkerNone or a point (.) to see where the samples are plotted
Line styleSolid dash (-)
Line colorBlue (b)
Duplicate points at trace boundary

Check Duplicate points at trace boundary for modulations such as PSK and QAM.

Clear to display the phase trees for MSK, CPFSK, GFSK, GMSK, and other continuous phase modulations.

Color fading

Check Color fading for animation that resembles an oscilloscope.

Clear for greater speed and animation that resembles a plot.

High quality rendering

Check High quality rendering for better animation.

Clear for greater speed.

Eye diagram to display

Select In-phase and Quadrature to view real and imaginary components.

Select In-phase Only to view real component only and for greater speed.

When the input is real and you choose In-phase and Quadrature, the quadrature component of the eye diagram is zero.

Open at start of simulation

Check Open at start of simulation to view the signal at the start of simulation.

Clear to view the signal after convergence to steady state and for greater initial speed.

Y-axis minimumApproximately 10% less than the expected minimum value of the signal
Y-axis maximumApproximately 10% greater than the expected maximum value of the signal

For Rapid Accelerator or External mode, set the scope up for single rate mode. To guarantee the satisfactory behavior of single rate mode, the subsystem below the block mask for this block must operate as a single-rate entity, which means the following conditions are true:

sps * ( (td * (spt-1)) + ntpd) = Sf 

where:

  • sps = Samples per symbol

  • td = Traces displayed

  • spt = Symbols per trace

  • ntpd = New traces per display

  • Sf = Input frame size, in samples

This equation guarantees that the subsystem below the mask for this block operates as a single rate entity.

    Warning   If you want to use Rapid Accelerator or External mode, set this block up to run as a single rate entity because the block does not support multi-rate in these modes.

    Note:   Before running a model that contains a Discrete-Time Eye Diagram Scope block in Accelerator, Rapid Accelerator, or External mode, you must select Open scope at start of simulation. If you do not select this check box before running your model for the first time, the scope will not display your simulation data

Scope Options

The scope title (in the window title bar) is the same as the block title. You can set the axis scaling by setting the y-axis minimum and y-axis maximum parameters on the Axes Properties panel.

In addition to the standard MATLAB figure window menus (File, Edit, Window, Help), the Vector Scope window has an Axes and a Channels menu.

The properties listed in the Axes menu apply to all channels. Many of the parameters in this menu are also accessible through the block parameter dialog box. These are Autoscale, Show grid, Frame #, and Save Position. Below are descriptions of the other parameters listed in the Axes menu:

  • Autoscale resizes the y-axis to best fit the vertical range of the data. The numerical limits selected by the autoscale feature are displayed in the Minimum Y-limit and Maximum Y-limit parameters in the parameter dialog box. You can change them by editing those values.

  • Show grid - When selected, the scope displays a grid according to tick marks on the x- and y-axes.

  • Frame # - When selected, the scope displays the current frame number at the bottom of the scope window.

  • Save Position automatically updates the Scope position parameter in the Figure properties panel to reflect the scope window's current position and size. To make the scope window open at a particular location on the screen when the simulation runs, simply drag the window to the desired location, resize it as needed, and select Save Position.

The properties listed in the Channels menu apply to a particular channel. The parameters listed in this menu are Style, Marker, and Color. They correspond to the parameters Line style, Marker, and Line color, respectively.

You can also access many of these options by right-clicking with the mouse anywhere on the scope display. The menu that pops up contains a combination of the options available in both the Axes and Channels menus.

Behavior in Enabled Subsystems

You can use the Discrete-Time Eye Diagram Scope block inside an enabled subsystem. However, you cannot use the scope block inside an enabled subsystem when the model is in a multirate multitasking environment.

When you use the scope in a multirate singletasking environment, it may generate unexpected results inside enabled subsystems. To workaround this issue, configure the scope for single-rate mode. See Recommended Settings for the parameter settings that enable single-rate mode.

Dialog Box

Samples per symbol

Number of samples per symbol. Use with Symbols per trace to determine the number of samples per trace.

Offset (samples)

Nonnegative integer less than the product of Samples per symbol and Symbols per trace, specifying the number of samples to omit before plotting the first point. Tunable.

Symbols per trace

Positive integer specifying the number of symbols plotted per trace.

Traces displayed

Number of traces plotted.

New traces per display

Positive integer less than Traces displayed, specifying the number of new traces that appear in each display.

Markers

The marker for points in the eye diagram. Tunable.

Line style

The line style in the eye diagram. Tunable.

Line color

The line color in the eye diagram. Tunable.

Duplicate points at trace boundary

Check to enable duplicate points at the trace boundary. Clear to disable.

Color fading

When selected, the points in the eye diagram fade as the interval of time after they are first plotted increases. Tunable.

High quality rendering

When selected, the block renders a slow, higher-quality picture with overwrite raster operations. When cleared, the block renders a fast, lower-quality picture with XOR raster operations. Tunable.

Show grid

Toggles the scope grid on and off. Tunable.

Y-axis minimum

Minimum signal value the scope displays. Tunable.

Y-axis maximum

Maximum signal value the scope displays. Tunable.

In-phase Y-axis label

Label for y-axis of the in-phase diagram. Tunable.

Quadrature Y-axis label

Label for y-axis of the quadrature diagram. Tunable.

Open scope at start of simulation

When selected, the scope opens at the start of simulation. When cleared, you must double-click the block after the start of simulation to open the scope. Tunable.

    Note:   Before running a model that contains a Discrete-Time Eye Diagram Scope block in Accelerator, Rapid Accelerator, or External mode, you must select Open scope at start of simulation. If you do not select this check box before running your model for the first time, the scope will not display your simulation data

Eye diagram to display

Type of eye diagram to display. Choose In-phase and Quadrature to display real and complex components, or In-phase Only to display only the real component. Tunable.

Trace number

Displays the number of the current trace in the input sequenced. Tunable.

Scope position

A four-element vector of the form [left bottom width height] specifying the position of the scope window. (0,0) is the lower left corner of the display. Tunable.

Title

Title of eye diagram figure window. Tunable.

Examples

For documentation examples that use this block, see View a Sinusoid and View a Modulated Signal.

Also, the following Communications System Toolbox™ demos illustrate how to use the Discrete-Time Eye Diagram Scope block:

  • CPM Phase Tree Example

  • Filtered Offset QPSK vs. Filtered QPSK

  • Rayleigh Fading Channel

  • QPSK vs. MSK

Was this topic helpful?