Main Content

sndr

Signal to noise and distortion ratio for serial link standards

Since R2025a

Description

Use sndr to calculate signal to noise and distortion ratio (SNDR) and Level Mismatch Ratio (RLM) for serial link standards such as PCIe, IEEE, and CEI.

Creation

Description

sndr = sndr(PropertyName=Value) creates an sndr object from the specified name-value pair arguments. You can then use the sndr object to calculate the SNDR and RLM metrics.

Properties

expand all

Required Input Properties

Data pattern symbols, specified as a vector with elements in the range [0, Modulation-1].

Data Types: double

Time of a single symbol duration, specified as a real scalar in seconds.

Data Types: double

Interval at which the object samples the input waveform, specified as a real scalar in seconds.

Data Types: double

Full input waveform, specified as a vector. It contains many repetition of the data pattern sampled at InputSampleInterval.

Note

You must specify the input waveform using the Wave property or by defining both the WaveAverageInput and SigmaNoiseInput properties.

Data Types: double

Single repetition of the data pattern in the input waveform sampled at InputSampleInterval, specified as a vector with elements in the range [0, Modulation-1].

Note

You must specify the input waveform using the Wave property or by defining both the WaveAverageInput and SigmaNoiseInput properties.

Data Types: double

User-defined sigma noise derived from the full input waveform, specified as a scalar.

Note

You must specify the input waveform using the Wave property or by defining both the WaveAverageInput and SigmaNoiseInput properties.

Data Types: double

Optional Input Properties

Waveform resampling method, specified as spline or linear.

Data Types: double

Oversampling ratio used for resampling, specified as a positive real scalar.

Data Types: double

Fitted pulse response delay in symbols, specified as a positive real scalar. This represents the number of symbols by which the object shifts the pulse cursor. This is typically specified by the standard.

Data Types: double

Fitted pulse response length in symbols, specified as a positive real scalar. This is typically specified by the standard.

Data Types: double

Standard specific methods to calculate sigma noise, effective pulse maximum (Pmax), and SNDR, specified as PCIe, IEEE, CEI, or Custom.

Data Types: double

Output Properties

Signal to noise distortion ratio, returned as a scalar in dB.

A high SNDR is essential to distinguish the signal from noise and distortion, thereby minimizing errors and ensuring data integrity during high-speed transmission.

Data Types: double

Level mismatch ratio, returned as a scalar.

RLM is a measure of the irregularity of the various eye openings in a PAMn signal. It is calculated by the PCIe7 methodology as a ratio of the pulses derived from the multiple pulse fit response process. RLM is crucial for assessing the balance and symmetry of the transmitted signal levels, which is important for accurate signal interpretation and reducing error rates.

Data Types: double

Calculated noise standard deviation, returned as a scalar in V.

Data Types: double

Sample interval of the resampled waveform, returned as a scalar in seconds.

Data Types: double

Effective pulse maximum, returned as a scalar in V.

Data Types: double

Number of complete repetition of the data patten in the full waveform defined by Wave property, returned as a scalar.

Data Types: double

Fitted pulse response for odd/even fitting, returned as a matrix.

Data Types: double

Fitted pulse response error for odd/even fitting, returned as a column matrix.

Data Types: double

Fitted pulse response error standard deviation for odd/even fitting, returned as a scalar.

Data Types: double

Fitted pulse response for PAM4 multiple pulse fit response, returned as a matrix.

Data Types: double

Unnormalized fitted pulse response for PAM4 multiple pulse fit response, returned as a matrix.

Data Types: double

Symbol voltages for PAM4 multiple pulse fit response, returned as a vector. They are used in the RLM calculation.

Data Types: double

Fitted pulse response for linear pulse estimation, returned as a column matrix.

Data Types: double

Fitted pulse response error for linear pulse estimation, returned as a column matrix.

Data Types: double

Fitted pulse response error standard deviation for linear pulse estimation, returned as a scalar.

Data Types: double

Object Functions

plotAveragingResultsPlot waveform averaging process results
plotDataPatternPlot data pattern
plotLPFRPlot linear pulse fit response results
plotMPFR4Plot multiple pulse fit response PAM4 results
plotMPFROddEvenPlot multiple pulse fit response odd/even results
plotSigmaNoisePlot sigma noise value against pattern repetition
plotVLikPlot voltages sampled from resampled wave used for noise estimation
plotWaveResampledPlot resampled waveform
reportReport calculated SNDR and RLM for specified standard

Examples

collapse all

Load the input waveforms defined in the sndrInputs.mat file attached with this example.

load('sndrInputs.mat');

Create the sndr object.

sndrObj = sndr('Wave',wave,...
    'InputSampleInterval',dt,...
    'DataPattern',DataPattern,...    
    'Standard','PCIe',...            
    'SymbolTime',SymbolTime);

Generate the report containing the standard name, SNDR, RLM and other metrics..

report(sndrObj)
For Standard=pcie
SNDR = 35.1892 dB
	Pmax (Effective) = 282.166 mV
	SigmaNoise = 3.51934 mV
	SigmaError = 3.42317 mV
RLM = 0.945555
	V0 = -257.083 mV
	V1 = -85.6275 mV
	V2 = +81.0286 mV
	V3 = +257.083 mV

For PCIe6 and PCIe7, the SNDR needs to be better than 34 dB and the RLM better than 0.95 for compliance.

You can plot various internal calculations required for calculating SNDR and RLM for deeper understanding.

Visualize the PCIe6/7 compliance data pattern and see that each symbol level has a run of 64 UI by observing the all black, white, red and blue columns.

plotDataPattern(sndrObj)

Figure contains an axes object. The axes object with title Read data pattern column-wise from top left corner contains an object of type image.

The waveform averaging process combines the many repetitions of the data pattern into a single waveform. This averaging reduces the random noise which can lead to a better pulse fit.

h2 = figure();
plotAveragingResults(sndrObj)
set(h2,'Units','normalized','Position',[ 0 0 1 1]);

Figure contains 2 axes objects. Axes object 1 with title Averaged Wave, xlabel s, ylabel V contains an object of type line. Axes object 2 with title All of the 4 complete waveforms segments, xlabel s, ylabel V contains 4 objects of type line.

The input waveform is resampled to sndrObj.OverSampleRatio samples per symbol (32 in this case) and analyzed to find the symbol runs of 64 UI. The 61st UI of the run is sampled to obtain VLik, which is used to determine the standard deviation of each symbol voltage and the total noise standard deviation used in the SNDR calculation. This plot identifies the VLik samples in the context of the resampled waveform.

h3 = figure();
plotWaveResampled(sndrObj)
set(h3,'Units','normalized','Position',[ 0 0 1 1]);

Figure contains an axes object. The axes object with xlabel s, ylabel V contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent WaveResampled, V_{L,i,k}.

The VLik samples are displayed, and distribution analyzed to determine the symbol voltage standard deviations and total combined noise standard deviation, σn, used in the SNDR calculation.

h4 = figure();
plotSigmaNoise(sndrObj)
set(h4,'Units','normalized','Position',[0 0 1 1]);

Figure contains 2 axes objects. Axes object 1 with title Symbol voltage versus repetition of pattern (V indexOf L,i,k baseline ), xlabel Pattern Repetition, ylabel V contains 32 objects of type line. One or more of the lines displays its values using only markers Axes object 2 with title sigma indexOf n baseline blank = blank 3 . 51934 mV, xlabel count contains an object of type histogram.

Double check that the VLik samples are indeed extracted from the 61st UI in the run of 64 UI of each repetition of the compliance pattern as specified by PCIe7. The plot below overlays the repeated data pattern waveforms, as aligned by the 8 samples VLik. The optional second input to plotVLik specifies how many UI before and after the VLik samples to include in the plot.

h5 = figure();
plotVLik(sndrObj,4)
set(h5,'Units','normalized','Position',[0 0 1 1]);

Figure contains 4 axes objects. Axes object 1 with title PAM4 Symbol 0, xlabel UI, ylabel V contains 8 objects of type line. One or more of the lines displays its values using only markers Axes object 2 with title PAM4 Symbol 1, xlabel UI, ylabel V contains 8 objects of type line. One or more of the lines displays its values using only markers Axes object 3 with title PAM4 Symbol 2, xlabel UI, ylabel V contains 8 objects of type line. One or more of the lines displays its values using only markers Axes object 4 with title PAM4 Symbol 3, xlabel UI, ylabel V contains 8 objects of type line. One or more of the lines displays its values using only markers

Observe the linear pulse fit response results. While the linear pulse fit is not directly used for the PCIe6 and PCIe7 SNDR calculation, the basic concept is utilized for the multiple pulse fit response (MPFR) which is used to determine the effective pulse maximum and the fit distortion noise terms of the SNDR calculation.

h6 = figure();
plotLPFR(sndrObj)
set(h6,'Units','normalized','Position',[ 0 0 1 1]);

Figure contains 3 axes objects. Axes object 1 with title Linear Pulse Fit Response Pmax = 256.474 mV, xlabel UI, ylabel V contains an object of type line. Axes object 2 with title sigma indexOf e baseline blank = blank 11 . 2674 mV, xlabel UI, ylabel V contains an object of type line. This object represents Error=P*X_1-Y. Axes object 3 with xlabel UI, ylabel V contains 2 objects of type line. These objects represent Input Waveform (Y), Reconstruction (P*X_1).

The fitted odd and even pulse responses are used to determine the effective pulse maximum and the standard deviation of the fit error (the distortion term) that goes into the SNDR calculation.

h7 = figure();
plotMPFROddEven(sndrObj)
set(h7,'Units','normalized','Position',[ 0 0 1 1]);

Figure contains 3 axes objects. Axes object 1 with title Multiple Pulse Fit Response: Odd/Even Effective Pmax = 282.166 mV, xlabel UI, ylabel V contains 2 objects of type line. These objects represent odd, even. Axes object 2 with title sigma indexOf e baseline blank = blank 3 . 42317 mV, xlabel UI contains an object of type line. These objects represent Error=P_{EO}*X_{EO} - Y, IsRandom Flag. Axes object 3 with xlabel UI, ylabel V contains 2 objects of type line. These objects represent Input Waveform (Y), Reconstruction (P_{EO}*X_{EO}).

To determine the RLM, the PAM4 pulse responses are extracted from the fit. The maximum of each pulse is used in the RLM calculation. The fit error of PAM4 MPFR is not used in any calculations but included here as it may be the basis of future PAMn SNDR calculations.

h8 = figure();
plotMPFR4(sndrObj)
set(h8,'Units','normalized','Position',[ 0 0 1 1]);

Figure contains 4 axes objects. Axes object 1 with title Normalized Multiple Pulse Fit Response: PAM4 Effective Pmax = 279.067 mV, xlabel UI, ylabel V contains 4 objects of type line. These objects represent Symbol 0, Symbol 1, Symbol 2, Symbol 3. Axes object 2 with title Un-normalized Multiple Pulse Fit Response: PAM4 Effective Pmax = 279.067 mV, xlabel UI, ylabel V contains 4 objects of type line. These objects represent Symbol 0, V0=-257.1 mV, Symbol 1, V1=-85.6 mV, Symbol 2, V2=81.0 mV, Symbol 3, V3=257.1 mV. Axes object 3 with title sigma indexOf e baseline blank = blank 10 . 1685 mV, xlabel UI contains an object of type line. These objects represent Error=P_{sym}*X_{sym} - Y, IsRandom Flag. Axes object 4 with xlabel UI, ylabel V contains 2 objects of type line. These objects represent Input Waveform (Y), Reconstruction (P_{sym}*X_{sym}).

Version History

Introduced in R2025a