sndr
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
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
plotAveragingResults | Plot waveform averaging process results |
plotDataPattern | Plot data pattern |
plotLPFR | Plot linear pulse fit response results |
plotMPFR4 | Plot multiple pulse fit response PAM4 results |
plotMPFROddEven | Plot multiple pulse fit response odd/even results |
plotSigmaNoise | Plot sigma noise value against pattern repetition |
plotVLik | Plot voltages sampled from resampled wave used for noise estimation |
plotWaveResampled | Plot resampled waveform |
report | Report calculated SNDR and RLM for specified standard |
Examples
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)

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]);

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]);

The VLik samples are displayed, and distribution analyzed to determine the symbol voltage standard deviations and total combined noise standard deviation, , used in the SNDR calculation.
h4 = figure(); plotSigmaNoise(sndrObj) set(h4,'Units','normalized','Position',[0 0 1 1]);

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]);

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]);

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]);

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]);

Version History
Introduced in R2025a
See Also
plotAveragingResults | plotDataPattern | plotLPFR | plotMPFR4 | plotMPFROddEven | plotSigmaNoise | plotVLik | plotWaveResampled | report
Topics
External Websites
MATLAB Command
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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)