Main Content

测量脉冲和过渡特性

This example shows how to analyze pulses and transitions and compute metrics including rise time, fall time, slew rate, overshoot, undershoot, pulse width, duty cycle, and pulse period.

Clock Signal with Noise

首先查看来自噪声时钟信号的样本。

加载钟声CLOCK1.时间1FS.绘制(Time1,Clock1)XLabel('Time (seconds)'的)ylabel('电压'的)

图包含轴对象。轴对象包含类型线的对象。

Estimate State Levels

采用statelevels没有输出参数以可视化状态级别。直方图方法用于使用以下步骤估计状态级别:

  1. Determine the minimum and maximum amplitudes of the data.

  2. For the specified number of histogram bins, determine the bin width, which is the ratio of the amplitude range to the number of bins. Use optional input arguments to specify the number of histogram bins and histogram bounds.

  3. Sort the data values into the histogram bins.

  4. Identify the lowest and highest indexed histogram bins with nonzero counts.

  5. 将直方图分为两个亚次级部图。

  6. Compute the state levels by determining the mode or mean of the upper and lower histograms.

statelevels(clock1)

Figure State Level Information contains 2 axes objects. Axes object 1 with title Histogram of signal levels (100 bins) contains an object of type line. Axes object 2 with title Signal contains 3 objects of type line.

ANS =.1×20.。0.138 5.1848

这computed histogram is divided into two equal sized regions between the first and last bin. The mode of each region of the histogram is returned as an estimated state level value in the command window.

测量上升时间,下降时间和转换率

上升时间是每个脉冲的上升转换从较低参考水平的瞬间之间的持续时间。Fall时间是从较低参考水平的每个脉冲的下降转换的瞬间之间的持续时间。计算上升时间和下降时间的默认参考电平设定为波形幅度的10%和90%。

采用risetime没有输出参数来可视化积极的边缘的上升时间。然后,使用falltimewith no output argument to visualize the fall time of negative-going edges. Specify reference levels as [20.80] and state levels as [0.5.].

提升时间(Clock1,Time1)

Figure Rise Time Plot contains an axes object. The axes object contains 12 objects of type patch, line. These objects represent rise time, signal, upper cross, lower cross, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

ANS =.5×110.-4×0.5919 0.8344 0.7185 0.8970 0.8970 0.6366
秋季(Clock1,Time1,'percileferencelevels'那[20 80],'statelevels'那[0 5])

图秋季时间图包含轴对象。这axes object contains 12 objects of type patch, line. These objects represent fall time, signal, upper cross, lower cross, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

ANS =.4×110.-4×0.。4294 0.5727 0.5032 0.4762

通过使用一个或多个输出参数调用函数来以编程方式获得测量值。对于统一采样的数据,您可以提供采样率代替时间向量。采用诽谤to measure the slope of each positive-going or negative-going edge.

sr = slewrate(clock1(1:100),Fs)
sr = 7.0840e+04

Analyze Overshoot and Undershoot

现在从带有显着的过冲和下冲的时钟查看数据。

加载钟声Clock2.时间2FS.绘图(Time2,Clock2)XLabel('Time (seconds)'的)ylabel('电压'的)

图秋季时间图包含轴对象。轴对象包含类型线的对象。

被泄漏的时钟信号过冲。过冲被表示为国家级之间差异的百分比。在后转换后像差区域的开始,在边缘之后可能发生过冲。使用过冲function to measure these postshoot overshoots.

过冲(Clock2(95:270),FS)
ANS =.2×14.9451 2.5399
传奇('Location''NorthEast'的)

Figure Overshoot Plot contains an axes object. The axes object contains 12 objects of type line. These objects represent signal, upper cross, lower cross, post-overshoot, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

在预过渡像差区域的末端,在边缘之前也可能发生过冲。这些称为Preshoot过度。

同样,您可以测量前后区域和后异常区域中的下冲。下海也表示为州水平之间的差异的百分比。使用可选的输入参数来指定测量像差的区域。

underhoot.(clock2(95:270),Fs,'地区''postshoot'的)
ANS =.2×13.8499 4.9451
传奇('Location''NorthEast'的)

数字下划线绘图包含轴对象。轴对象包含12个类型的类型。这些对象代表信号,上交字十字,下十字,下发后冲,上边界,上部,下边界,上限,较低的参考,较低状态。

测量脉冲宽度和占空比

Widthis the duration between the mid-reference level crossings of the first and second transitions of each pulse. Use脉宽with no output argument to plot highlighted pulse widths. Specify a positive polarity.

脉冲宽度(Clock2,Time2,'极性''积极的');

数字脉冲宽度情节包含一个坐标轴对象。这axes object contains 10 objects of type patch, line. These objects represent pulse width, signal, mid cross, upper boundary, upper state, lower boundary, mid reference, lower state.

采用占空比to compute the ratio of the pulse width to the pulse period for each negative-polarity pulse.

d = dutycycle(clock2,time2,'极性''negative'的)
d =3×10.4979 0.5000 0.5000.

采用PulsePeriod.获得波形的每个周期的时段。这时期is the duration between the first transition of the current pulse and the first transition of the next pulse. Use this information to compute other metrics like the average frequency of the waveform or the total observed jitter.

pp = pulseperiod(clock2,time2);avgfreq = 1./mean(pp)
avgFreq = 1.2500e+03
TotalJitter = STD(PP)
TotalJitter = 1.9866E-06

也可以看看

||||||||