falltime

Fall time of negative-going bilevel waveform transitions

Description

F = falltime(X) returns a vector F containing the time each transition of the bilevel waveform X takes to cross from the 10% reference level to the 90% reference level (See Percent Reference Levels). To determine the transitions, falltime estimates the state levels of the input waveform using a histogram method. falltime identifies all regions that cross the lower-state boundary of the high state and the upper-state boundary of the low 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 falltime uses interpolation, F may contain values that do not correspond to sampling instants of the bilevel waveform X.

F = falltime(X,Fs) specifies the sample rate in hertz. The sample rate determines the sample instants corresponding to the elements in X. The first sample instant in X corresponds to t=0. Because falltime uses interpolation, F may contain values that do not correspond to sampling instants of the bilevel waveform X.

F = falltime(X,T) specifies the sample instants T as a vector with the same number of elements as X.

[F,LT,UT] = falltime(___) returns vectors LT and UT whose elements correspond to the time instants where X crosses the lower- and upper- percent reference levels. You can use this output syntax with any of the previous input syntaxes.

example

[F,LT,UT,LL,UL] = falltime(___) returns the levels LL and UL corresponding to the lower- and upper-percent reference levels.

example

[___] = falltime(___,Name,Value) returns the fall times with additional options specified by one or more Name,Value pair arguments.

example

falltime(___) plots the signal and darkens the regions of each transition where fall time is computed. The plot marks the lower and upper crossings and the associated reference levels. The state levels and the associated lower- and upper-state boundaries are also displayed.

Examples

collapse all

Determine the fall time in samples for a 2.3 V clock waveform.

Load the 2.3 V clock data. Determine the fall time in samples. Use the default 10% and 90% percent reference levels. Plot the waveform and annotate the fall time.

load('negtransitionex.mat','x')

falltime(x)

ans = 0.7200

Determine the fall time in a 2.3 V clock waveform sampled at 4 MHz. Compute the fall time using the 20% and 80% reference levels.

Load the 2.3 V clock data with sampling instants. Determine the fall time using 20% and 80% reference levels. Plot the waveform and annotate the fall time.

load('negtransitionex.mat','x','t')

falltime(x,'PercentReferenceLevels',[20 80])

ans = 0.5400

Determine the fall 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('negtransitionex.mat','x','t')

Determine the fall time, reference-level instants, and reference levels.

[f,lt,ut,ll,ul] = falltime(x,t);

Plot the waveform with the upper and lower reference levels and reference level instants. Show that the fall time is the difference between the lower- and upper-reference level instants.

plot(t,x)

xlabel('Seconds')
ylabel('Volts')

hold on
plot([lt ut],[ll ul],'ro')
hold off

fprintf('Rise time is %g seconds.',lt-ut)
Rise time is 1.8e-07 seconds.

Input Arguments

collapse all

Bilevel waveform, specified as a real-valued vector.

Sample rate, specified in as a positive real integer in Hz.

Sample instants, specified as a vector. The length of T must equal the length of the bilevel waveform X.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Reference levels as a percentage of the waveform amplitude, specified as the comma-separated pair consisting of 'PercentReferenceLevels'and a two-element positive row vector. The elements of the row vector correspond to the lower and upper percent reference levels. The high state level is defined to be 100 percent, and the low state level is defined to be 0 percent. See Percent Reference Levels for more details.

Low and high state levels, specified as the comma-separated pair consisting of 'StateLevels' and a two-element positive row vector. The first and second elements of the vector correspond to the low and high state levels.

Lower- and upper-state boundaries, specified as the comma-separated pair consisting of 'Tolerance' and a real positive scalar as a percentage value. See State-Level Tolerances for more information on this name-value pair.

Output Arguments

collapse all

Duration of negative-going transition, returned as a vector. If you specify the sample rate Fs or the sample instants T fall times are in seconds. If you do not specify a sample rate or sample instants, fall times are in samples.

Lower reference-level crossing instants, returned as a vector. The vector LT contains the time instants when the negative-going transition crosses the lower reference level. By default, the lower reference level is the 10% reference level. You can change the default reference levels by specifying the 'PercentReferenceLevels' name-value pair.

Upper reference-level crossing instants, returned as a vector. The vector UT contains the time instants when the negative-going transition crosses the upper reference level. By default, the lower reference level is the 90% reference level. You can change the default reference levels by specifying the 'PercentReferenceLevels' name-value pair.

Lower reference-level in waveform amplitude units, returned as a real numeric scalar. LL is a vector containing the waveform values corresponding to the lower reference level in each negative-going transition. By default, the lower reference level is the 10% reference level. You can change the default reference levels by specifying the 'PercentReferenceLevels' name-value pair.

Upper reference level in waveform amplitude units, returned as a real numeric scalar. UL is a vector containing the waveform values corresponding to the upper reference level in each negative-going transition. By default, the lower reference level is the 90% reference level. You can change the default reference levels by specifying the 'PercentReferenceLevels' name-value pair.

More About

collapse all

Negative-Going Transition

A negative-going transition in a bilevel waveform is a transition from the high-state level to the low-state level. If the waveform is differentiable in the neighborhood of the transition, an equivalent definition is a transition with a negative first derivative. This figure shows a negative-going transition.

In the preceding figure, the amplitude values of the waveform are not displayed because a negative-going transition does not depend on the actual waveform values. A negative-going transition is defined by the direction of the transition.

Percent Reference Levels

If S1 is the low state, S2 is the high state, and U is the upper-percent reference level. The waveform value corresponding to the upper percent reference level is

S1+U100(S2S1).

If L is the lower percent reference level, the waveform value corresponding to the lower percent reference level is

S1+L100(S2S1).

State-Level Tolerances

Each state level can have associated lower- and upper-state boundaries. These state boundaries are defined as the state level plus or minus a scalar multiple of the difference between the high state and the low state. To provide a useful tolerance region, the scalar is typically a small number such as 2/100 or 3/100. In general, the region for the low state is defined as

where is the low-state level and is the high-state level. Replace the first term in the equation with to obtain the tolerance region for the high state.

The following figure illustrates lower and upper 2% state boundaries (tolerance regions) for a positive-polarity bilevel waveform. The red dashed lines indicate the estimated state levels.

References

[1] IEEE® Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003, pp. 15–17.

Introduced in R2012a