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.
首先查看来自噪声时钟信号的样本。
加载钟声CLOCK1.时间1FS.绘制(Time1,Clock1)XLabel('Time (seconds)'的)ylabel('电压'的)
采用statelevels
没有输出参数以可视化状态级别。直方图方法用于使用以下步骤估计状态级别:
Determine the minimum and maximum amplitudes of the data.
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.
Sort the data values into the histogram bins.
Identify the lowest and highest indexed histogram bins with nonzero counts.
将直方图分为两个亚次级部图。
Compute the state levels by determining the mode or mean of the upper and lower histograms.
statelevels(clock1)
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
没有输出参数来可视化积极的边缘的上升时间。然后,使用falltime
with 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)
ANS =.5×110.-4×0.5919 0.8344 0.7185 0.8970 0.8970 0.6366
秋季(Clock1,Time1,'percileferencelevels'那[20 80],'statelevels'那[0 5])
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
现在从带有显着的过冲和下冲的时钟查看数据。
加载钟声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'的)
在预过渡像差区域的末端,在边缘之前也可能发生过冲。这些称为Preshoot过度。
同样,您可以测量前后区域和后异常区域中的下冲。下海也表示为州水平之间的差异的百分比。使用可选的输入参数来指定测量像差的区域。
underhoot.(clock2(95:270),Fs,'地区'那'postshoot'的)
ANS =.2×13.8499 4.9451
传奇('Location'那'NorthEast'的)
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,'极性'那'积极的');
采用占空比
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
占空比
|falltime
|过冲
|PulsePeriod.
|脉宽
|risetime
|诽谤
|statelevels
|underhoot.