Clock Signal with Noise

Estimate State Levels

Use statelevels with no output argument to visualize the state levels. State levels are estimated via histogram.

statelevels(clock1)

ans =
0.0138 5.1848

The 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.

Use optional input arguments to specify the number of histogram bins, histogram bounds, and the state level estimation method.

Measure Rise Time, Fall Time and Slew Rate

Use risetime with no output argument to visualize the rise time of positive-going edges.

risetime(clock1,time1)

ans =
1.0e-04 *
0.5919
0.8344
0.7185
0.8970
0.6366

The default reference levels for computing rise time and fall time are set at 10% and 90% of the waveform amplitude.

Specify custom reference and state levels via optional input arguments as shown below for a fall time measurement.

Obtain measurements programmatically by calling functions with one or more output arguments. For uniformly sampled data, you can provide a sample rate in place of the time vector. Use slewrate 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

Now let's view data from a clock with significant overshoot and undershoot.

Underdamped clock signals have overshoots. Overshoots are expressed as a percentage of the difference between state levels. Overshoots can occur just after an edge, at the start of the post-transition aberration region. These are called postshoot overshoots. You can measure them by using the overshoot function.

overshoot(clock2(95:270),Fs)
legend('Location','NorthEast')

ans =
4.9451
2.5399

Overshoots may also occur just before an edge, at the end of the pre-transition aberration region. These are called preshoot overshoots. Similarly, you can measure undershoots in the pre and post-aberration regions. Undershoots are also expressed as a percentage of the difference between the state levels. Use optional input arguments to specify the regions in which to measure aberrations.