Main Content

eyeDiagramSI

Create eye diagram from time domain data

Since R2024a

Description

The eyeDiagramSI System object™ creates an eye diagram object by accumulating a 2D histogram from time domain eye diagram data, making it easier to perform large data sets and metric calculations.

To create the eye diagram object:

  1. Create the eyeDiagramSI object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

eye = eyeDiagramSI returns an eye diagram object that accumulates an eye diagram as 2D histograms.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Nominal center amplitude for each eye opening in the eye diagram, specified as a vector. This is a tunable property.

Note

if you do not define the SymbolThresholds property, the object automatically calculates the symbol thresholds based on the Modulation property.

Data Types: double

Elapsed time between the adjacent samples in the input data, specified as a scalar in seconds. This is a tunable property.

Data Types: double

Time span of one symbol, specified as a scalar in seconds. This is a tunable property.

Data Types: double

Edge detection threshold for waveform clock signals, specified as a scalar. This is a tunable property.

Data Types: double

Number of symbol levels in the eye diagram, specified as a scalar.

Note

if you do not define the Modulation property or it is set to 0, the object automatically sets it to ( number of eyes defined by the SymbolThresholds property+1).

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: double

Determine how to sample waveform clock signals:

  • Auto — Detects the clock input argument to automatically set the SampleOn property.

    If the clock signal is monotonically increasing, the System object considers it a time-based clock signal and sets SampleOn to Times.

    If the clock signal is non-monotonically increasing, the System object considers it a waveform and sets SampleOn to Rising.

  • Rising — Sample the data waveform at the rising edge of the clock waveform.

  • Falling — Sample the data waveform at the falling edge of the clock waveform.

  • Both — Sample the data waveform at both rising and falling edges of the clock waveform.

  • Times — Sample the data waveform at the time values specified by the clock signal.

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: char

Represent how data is captured by the recovered clock from the system perspective.

  • Auto — Detects the clock input argument to automatically set the ClockMode property.

    If you provide a clock signal, ClockMode is set to Clocked. Otherwise, ClockMode is set to Ideal.

  • Clocked — The data is captured using the clock input.

  • Ideal — The data and clock are captured using an ideal reference clock source.

  • Convolved — The eye diagram and clock PDF captured in the ideal mode are convolved together to present an eye diagram and clock pdf that look as though they are captured in the clocked mode.

For more information, see Clock Modes (Signal Integrity Toolbox).

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: char

Algorithm used for clock phase detector (CDR). For more information, see Phase Detectors: Baud-Rate Type-A versus Bang-Bang (SerDes Toolbox).

The phase detector algorithm used by the eyeDiagramSI System object are not full CDRs. They choose the best static phase to match the entire input data all at once, rather than adapting the phase to the data over time.

Data Types: char

Delay between the clock edge and the timing origin in seconds. This is a nontunable property, you must set it before reading in the eye diagram data.

Note

Phase offset delay must be causal.

Data Types: double

Unit for phase offset delay, specified as Seconds, Samples, or UI.

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: char

The width of the eye diagram in symbols, specified as a scalar.

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: double

Number of time bins in the eye diagram, specified as a scalar.

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: double

Number of amplitude bins in the eye diagram, specified as a scalar.

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: double

Minimum and maximum eye amplitudes contained in the eye diagram, specified as a 2-element vector.

This is a nontunable property, you must set it before reading in the eye diagram data.

Data Types: double

Stack of eye diagram calculated for each symbol in the data, specified as a vector. This property is automatically set from the data that you read in. This property is tunable.

Data Types: double

2D eye histogram spanning 1 or more UIs, specified as a vector, with time on the x-axis and amplitude on the y-axis. This property is automatically set from the data that you read in. This property is tunable.

Data Types: double

Histogram of clock edge times relative to the timing origin, specified as a vector. This property is automatically set from the data that you read in. This property is tunable.

Data Types: double

Usage

Description

example

eye = eyeDiagramSI(data) creates an eye diagram object eye from the time domain waveform data.

eye = eyeDiagramSI(data,clock,thresholds) creates an eye diagram object eye from the time domain waveform data, clock, and time-varying thresholds.

Input Arguments

expand all

Uniformly sampled waveform data which is used to create the eye diagram object, specified as a vector.

Sampling clock signal for input data, specified as a vector. Windows for the eye pattern are centered on the clock edges or clock times depending on the SampleOn property.

Symbol threshold(s), specified as a vector or a matrix. thresolds is used to separate symbols when building the eye diagram. If you provide this information, it increases the robustness of the PAMn metrics. By default, its values is set to the value of the SymbolThresholds property.

Output Arguments

expand all

Eye diagram object, created as an accumulation of 2D histograms from the eye diagram data.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

eyeLevelsMeasure symbol level statistics from eye diagram
eyeAmplitudeMeasure eye amplitude
eyeCrossingMeasure eye crossing points
eyeCenterMeasure eye center point
risetimeMeasure rise time from eye diagram
falltimeMeasure fall time from eye diagram
eyeHeightMeasure vertical eye opening
eyeWidthMeasure horizontal eye opening
eyeAreaMeasure eye area
vecMeasure vertical eye closure
comMeasure channel operating margin
eyeLinearityMeasure eye linearity
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

This example shows how to use eyeDiagramSI System object™ to measure properties of a sampled data signal originating from laboratory data and check eye opening compliance against an eye mask.

Save the waveform data in a Standard File Format, or a format for which a reader is available on the File Exchange.

Use readmatrix to read cells from the file into a matrix, starting at cell A5 to skip the metadata.

waveforms = readmatrix("pam5_waveforms.csv", "Range", "A5");

Our example data file contains multiple signals as different columns. Extract the third column as the signal to analyze.

pam5Wave = waveforms(:, 3);

Enter the waveform's characteristics if they weren't included with the file.

symbolTime = 66.67e-12;
samplesPerSymbol = 32;
modulation = 5;

Create an eyeDiagramSI System object.

eyeDiagram = eyeDiagramSI;
eyeDiagram.SymbolTime = symbolTime;
eyeDiagram.SampleInterval = symbolTime / samplesPerSymbol;
eyeDiagram.Modulation = modulation;

Feed the data into the eyeDiagramSI System object.

eyeDiagram(pam5Wave);

Visualize the resulting eye diagram.

plot(eyeDiagram);

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Amplitude contains an object of type image.

Plot time-axis bathtub curves for each eye opening. Eyes are ordered from lowest center amplitude to highest.

bathtub(eyeDiagram, "Time")
    Time

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Symbol Error Rate contains 4 objects of type line. These objects represent Eye 1, y = -0.23402, Eye 2, y = -0.080451, Eye 3, y = 0.05737, Eye 4, y = 0.22669.

Define a rectangular eyeMask object that is 0.2 Unit Intervals (UI) wide and 0.02 amplitude units tall. You can create an eyeMask directly using X and Y coordinate vectors to define vertices of the mask shape, or use the eyeMaskRectangle function with a width and height.

% mask = eyeMask([-0.1, -0.1, 0.1, 0.1], [-0.01, 0.01, 0.01, -0.01]);
mask = eyeMaskRectangle(0.2, 0.02);

Position the mask center 0.1 UI right of the timing origin.

mask.Position = [0.1, 0];

Measure the margin between the mask and the eye openings.

margins = margin(mask, eyeDiagram, "Plot", "on")

Figure contains an axes object. The axes object with xlabel UI, ylabel Amplitude contains 12 objects of type image, polygon, line, text. These objects represent Mask, Height Margin, Width Margin.

margins = 4×2

    0.0038    0.0233
   -0.0080   -0.0630
    0.0156    0.0595
    0.0077    0.0391

The second eye from the bottom of the diagram is not compliant with the mask; it has negative values for its minimum width and height margins.

This example show show to measure the signal properties of a sampled data signal such as eye height, eye width, and more using the eyeDiagramSI System object™.

Create a PAM3 signal using the serdes.Stimulus System object. The signal has a symbol time of 100e-12 and 16 samples per symbol that contains 1000 symbols of data.

symbols = 1000;
samplesPerSymbol = 16;
symbolTime = 100e-12;
sampleInterval = symbolTime / samplesPerSymbol;
modulation = 3;

stimulusGenerator = serdes.Stimulus;
stimulusGenerator.Modulation = modulation;
stimulusGenerator.SampleInterval = sampleInterval;
stimulusGenerator.SymbolTime = symbolTime;

Create a channel model with 2 dB loss using the serdes.ChannelLoss System object.

channelModel = serdes.ChannelLoss;
channelModel.dt = sampleInterval;
channelModel.Loss = 2;

Run the stimulus waveform through the channel model.

out = zeros(samplesPerSymbol * symbols, 1);
for i = 1:samplesPerSymbol * symbols
    out(i) = channelModel(stimulusGenerator());
end

Trim the beginning of the channel output to remove the influence of initial conditions.

outTrim = out(2001:end);

Create an eyeDiagramSI System object that has the same property values as the stimulus above.

eyeDiagram = eyeDiagramSI;
eyeDiagram.SampleInterval = sampleInterval;
eyeDiagram.SymbolTime = symbolTime;
eyeDiagram.Modulation = modulation;

Feed the channel output data into the eyeDiagramSI system object.

eyeDiagram(outTrim);

Visualize the resulting eye diagram plot.

plot(eyeDiagram);

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Amplitude contains an object of type image.

Measure the best eye height for each eye opening. Results are presented for each eye opening from the lowest to highest eye center amplitude.

[bestHeight, timeAtBestHeight] = eyeHeight(eyeDiagram)
bestHeight = 2×1

    0.1787
    0.1853

timeAtBestHeight = 2×1
10-11 ×

    0.7087
    0.6299

Measure the eye width at the symbol threshold levels for each eye opening.

width = eyeWidth(eyeDiagram, eyeDiagram.SymbolThresholds)
width = 2×1
10-10 ×

    0.3597
    0.3320

Measure the mean symbol levels at the center of the eye diagram (t = 0) and overlay the result on the eye diagram plot.

levels = eyeLevels(eyeDiagram, 0, "Plot", "on")

Figure contains an axes object. The axes object with xlabel Seconds, ylabel Amplitude contains 4 objects of type image, line. These objects represent -0.40599, 0.0027781, 0.41278.

levels = 3×1

   -0.4060
    0.0028
    0.4128

Version History

Introduced in R2024a