You are here : matlabSignal Processingsettlingtime

settlingtime() - Signal Processing

S = settlingtime(X,D) returns
the time, S, from the mid-reference level instant
to the time instant each transition enters and remains within a 2%
tolerance region of the final state over the duration, D. D is
a positive scalar. Because settlingtime uses
interpolation to determine the mid-reference level instant, S may
contain values that do not correspond to sampling instants. The length
of S is equal to the number of detected transitions
in the input signal, X. If for any transition,
the level of the waveform does not remain within the lower and upper
tolerance boundaries, the requested duration is not present, or an
intervening transition is detected, settlingtime marks
the corresponding element in S as NaN.
See Settle Seek Duration for cases
in which settlingtime returns a NaN.
To determine the transitions, settlingtime estimates
the state levels of the input waveform by a histogram method. settlingtime 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.S = settlingtime(X,FS,D) specifies
the sampling rate for the bilevel waveform, X in
hertz. The first sample instant in X is equal
to t = 0.  Because settlingtime uses
interpolation to determine the mid-reference level instant, S may
contain values that do not correspond to sampling instants. S = settlingtime(X,T,D) specifies
the sample instants, T, as a vector with the
same number of elements as X. [S,SLEV,SINST]
= settlingtime(...)  returns vectors, SLEV,
and  SINST, whose elements correspond to the
levels and sample instants of the settling points for each transition. [S,SLEV,SINST]
= settlingtime(...,Name,Value) returns
the settling times, levels, and corresponding sample instants with
additional options specified by one or more Name,Value pair
arguments.settlingtime(...)  plots the signal and
darkens the regions of each transition where settling time is computed.
The plot marks the location of the settling time of each transition,
the mid-crossings, and the associated reference levels. The plot also
displays the state levels with the corresponding lower and upper tolerance
boundaries.


Syntax

S = settlingtime(X,D)S = settlingtime(X,FS,D)S = settlingtime(X,T,D) [S,SLEV,SINST]
= settlingtime(...) [S,SLEV,SINST]
= settlingtime(...,Name,Value)settlingtime(...)


Example

Determine Settling Point and Settling LevelOpen This Example
Determine the settling point and corresponding waveform value for a bilevel waveform. Specify a settle-seek duration of 10 seconds.
load('transitionex.mat', 'x');
[s,slev,sinst] = settlingtime(x,10);
Plot the waveform and annotate the settling point.settlingtime(x,10);

Determine Settling Points of Three-Transition Bilevel WaveformOpen This Example
Determine the settling points for a three-transition bilevel waveform. The data are sampled at 4 MHz. Specify a settle-seek duration of one microsecond.
load('transitionex.mat','x')
y = [x; fliplr(x)];
fs = 4e6;
t = 0:1/fs:(length(y)*1/fs)-1/fs;

[s,slev,sinst] = settlingtime(y,fs,1e-6);
Plot the waveform and annotate the settling points.settlingtime(y,fs,1e-6);


Output / Return Value


Limitations


Alternatives / See Also


Reference