risetime() - Signal Processing
R = risetime(X)
returns a vector, R, containing the time each
transition of the input bilevel waveform, X,
takes to cross from the 10% to 90% reference levels. To determine
the transitions, risetime estimates the state
levels of the input waveform by a histogram method. risetime identifies
all regions that cross the upper-state boundary of the low state and
the lower-state boundary of the high state. The low-state and high-state
boundaries are expressed as the state level plus or minus a multiple
of the difference between the state levels. See State-Level Tolerances. Because risetime uses
interpolation, R may contain values that do not
correspond to sampling instants of the bilevel waveform, X.R = risetime(X,FS) specifies
the sampling frequency in hertz. The sampling frequency determines
the sample instants corresponding to the elements in X.
The first sample instant in X corresponds to t=0.
Because risetime uses interpolation, R may
contain values that do not correspond to sampling instants of the
bilevel waveform, X.R = risetime(X,T) specifies
the sample instants, T, as a vector with the
same number of elements as X.[R,LT,UT]
= risetime(...) returns vectors, LT and UT,
whose elements correspond to the time instants where X crosses
the lower- and upper-percent reference levels. [R,LT,UT,LL,UL]
= risetime(...) returns the levels, LL and UL,
that correspond to the lower- and upper-percent reference levels.[...] = risetime(...,Name,Value) returns
the rise times with additional options specified by one or more Name,Value pair
arguments. risetime(...) plots the signal and darkens
the regions of each transition where rise time is computed. The plot
marks the lower and upper crossings and the associated reference levels.
The state levels and the corresponding associated lower- and upper-state
boundaries are also plotted.
Syntax
R = risetime(X)R = risetime(X,FS)R = risetime(X,T)[R,LT,UT]
= risetime(...)[R,LT,UT,LL,UL]
= risetime(...)[...] = risetime(...,Name,Value) risetime(...)
Example
Rise Time in Bilevel WaveformOpen This Example
Determine the rise time in samples for a 2.3 V clock waveform.
Load the 2.3 V clock data. Determine the rise time in samples. Use the default 10% and 90% percent reference levels.load('transitionex.mat','x');
R = risetime(x)
R =
0.7120
The rise time is less than 1, indicating that the transition occurred in a fraction of a sample. Plot the data and annotate the rise time.risetime(x);
Rise Time with 20% and 80% Reference LevelsOpen This Example
Determine the rise time in a 2.3 V clock waveform sampled at 4 MHz. Compute the rise time using the 20% and 80% reference levels.
Load the 2.3 V clock data with sampling instants. Determine the rise time using the 20% and 80% reference levels. Plot the annotated waveform.load('transitionex.mat','x','t');
risetime(x,'PercentReferenceLevels',[20 80])
ans =
0.5340
Rise Time, Reference-Level Instants, and Reference LevelsOpen This Example
Determine the rise time, reference-level instants, and reference levels in a 2.3 V clock waveform sampled at 4 MHz.
Load the 2.3 V clock waveform along with the sampling instants.load('transitionex.mat','x','t')
Determine the rise time, reference-level instants, and reference levels.[R,lt,ut,ll,ul] = risetime(x,t);
Plot the waveform with the lower- and upper-reference levels and reference-level instants. Show that the rise time is the difference between the upper- and lower-reference level instants.plot(t,x)
xlabel('seconds')
ylabel('Volts')
hold on
plot([lt ut],[ll ul],'o')
hold off
fprintf('Rise time is %g seconds.',ut-lt)
Rise time is 1.78e-07 seconds.
Output / Return Value
Limitations
Alternatives / See Also
Reference