dsp.TransitionMetrics System object

Package: dsp

Transition metrics of bilevel waveforms

Description

The TransitionMetrics object extracts information such as duration, slew rate, and reference-level crossings for each transition found in the bilevel waveform. The TransitionMetrics object can additionally return preshoot, postshoot and settling metrics for the regions immediately before and after each transition.

To obtain transition metrics for a bilevel waveform:

  1. Define and set up your transition metrics. See Construction.

  2. Call step to calculate the transition metrics according to the properties of dsp.TransitionMetrics. The behavior of step is specific to each object in the toolbox.

Construction

H = dsp.TransitionMetrics creates a transition metrics System object™, H. The object computes the rise time, fall time and width of a pulse. TransitionMetrics additionally computes cycle metrics such as pulse separations, periods, and duty cycles.

H = dsp.TransitionMetrics('PropertyName',PropertyValue,...) returns a TransitionMetrics System object, H, with each specified property set to the specified value.

Properties

MaximumRecordLength

Maximum samples to preserve between calls to step. This property requires a positive integer that specifies the maximum number of samples to save between calls to the step method. When the number of samples to be saved exceeds this length, the oldest excess samples are discarded. This property applies when RunningMetrics is true and is tunable.

Default: 1000

PercentReferenceLevels

Lower-, middle-, and upper-percent reference levels. This property contains a 3-element numeric row vector that contains the lower-, middle-, and upper-percent reference levels. These reference levels are used as an offset between the low and high states of the waveform when computing the duration of each transition.

Default: [10 50 90]

PercentStateLevelTolerance

Tolerance of the state level (in percent). This property requires a scalar that specifies the maximum deviation from either the low or high state before it is considered to be outside that state. The tolerance is expressed as a percentage of the waveform amplitude.

Default: 2

PostshootOutputPort

Enable posttransition aberration metrics. If this property is set totrue, overshoot and undershoot metrics are reported for a region defined immediately after each transition. The posttransition aberration region is defined as the waveform interval that begins at the end of each transition and whose duration is the value of PostshootSeekFactor times the computed transition duration. If a complete subsequent transition is detected before the interval is over, the region is truncated at the start of the subsequent transition. The metrics are computed for each transition that has a complete posttransition aberration region.

Default: false

PostshootSeekFactor

Corresponds to the duration of time to search for the overshoot and undershoot metrics immediately following each transition. The duration is expressed as a factor of the duration of the transition. This property is enabled only when the PostshootOutputPort property is set to true and is tunable.

Default: 3

PreshootOutputPort

Enable pretransition aberration metrics. If the PreshootOutputPort property is set to true, overshoot and undershoot metrics are reported for a region defined immediately before each transition. The pretransition aberration region is defined as the waveform interval that ends at the start of each transition and whose duration is PreshootSeekFactor times the computed transition duration.

Default: false

PreshootSeekFactor

Corresponds to the duration of time to search for the overshoot and undershoot metrics immediately preceding each transition. The duration is expressed as a factor of the duration of the transition. This property is enabled only when the PreshootOutputPort property is set to true and is tunable.

Default: 3

RunningMetrics

Enable metrics over all calls to step. If RunningMetrics is set to false, metrics are computed for each call to step independently. If RunningMetrics is set to true, metrics are computed across subsequent calls to step. If there are not enough samples to compute metrics associated with the last transition, posttransition aberration region, or settling seek duration in the current record, the object defers reporting all transition, aberration, and settling metrics associated with the last transition until a subsequent call to step is made with enough data to compute all enabled metrics for that transition.

Default: false

SampleRate

Sampling rate of uniformly-sampled signal. Specify the sample rate in hertz as a positive scalar. This property is used to construct the internal time values that correspond to the input sample values. Time values start with zero. This property applies when the TimeInputPort property is set to false.

Default: 1

SettlingOutputPort

Enable settling metrics. If SettlingOutputPort is set to true, settling metrics are reported for each transition. The region used to compute the settling metrics starts at the midcrossing and lasts until the SettlingSeekDuration has elapsed. If an intervening transition occurs, or the signal has not settled within the PercentStateLevelTolerance of the final level, NaN is returned for each metric. If there are not enough samples after the last transition to complete the SettlingSeekDuration, no metrics are reported for the last transition. The metrics are reported for the transition the next time step is called if the RunningMetrics property is set to true.

Default: false

SettlingSeekDuration

Duration of time over which to search for settling. This property is a scalar that specifies the amount of time to inspect from the mid-reference level crossing (in seconds). If the transition has not yet settled, or a subsequent complete transition is detected within this duration, the TransitionMetrics object reports NaN for all settling metrics. This property is tunable and applies only when you set the SettlingOutputPort property to true.

Default: 0.02

StateLevels

Low- and high-state levels. This property is a 2-element numeric row vector that contains the low and high state levels respectively. These state levels correspond to the nominal logic low and high levels of the pulse waveform. This property is tunable.

Default: [0 2.3]

StateLevelsSource

Auto or manual state level computation. If the StateLevelsSource property is set to 'Auto', the first record sent to step is sent to dsp.StateLevels with the default settings to determine the state levels of the incoming waveform. If this property is set to 'Property', the object uses the values the user specifies in the StateLevels property.

Default: 'Property'

TimeInputPort

Add input to specify sample instants. Set TimeInputPort to true to enable an additional real input column vector to step to specify the sample instants that correspond to the sample values. If this property is false, the sample instants are built internally. The sample instants start at zero and increment by the reciprocal of the SampleRate property for subsequent samples. The sample instants continue to increment if the RunningMetrics property is set to true and no intervening calls to the reset or release methods are encountered.

Default: false

Methods

cloneClones the current instance of the transition metrics object
getNumInputsNumber of expected inputs to the step method
getNumOutputsNumber of outputs of the step method
isLockedLocked status (logical) for input attributes and nontunable properties
plotPlots signal and metrics computed in last call to step
resetReset the running transition metrics object
stepTransition metrics of bilevel waveform

Examples

expand all

Transition and Preshoot Information of a 2.3 V Step Waveform

Compute transition and preshoot information of a 2.3 V step waveform sampled at 4 MHz

Load the data.

 load('transitionex.mat', 'x');

Construct your transition metrics System object. Set the SampleRate property to 4 MHz, set the StateLevelsSource property to 'Auto' to estimate the state levels from the data, set the PreshootOutputPort property to true to output pretransition aberration metrics when you call step.

  htm1 = dsp.TransitionMetrics('SampleRate',4e6, ...
                                 'StateLevelsSource','Auto', ...
                                 'PreshootOutputPort',true)

Call step to compute the transition and preshoot information. Plot the result.

 [transition, preshoot] = step(htm1, x)
 plot(htm1)

Transition, Postshoot, and Settling Information of a 2.3 V Step Waveform

Compute transition, postshoot, and settling information of a 2.3 V step waveform sampled at 4 MHz.

Load the data along with the sampling instants.

 load('transitionex.mat', 'x', 't');

Construct your transition metrics object setting the TimeInputPort property to true and the StateLevels property to match waveform state levels. To output the postshoot information and settling information when you call step, set the PostShootOutputPort and SettlingOutputPort properties to true. Set the settling seek duration to 2 microseconds.

  htm2 = dsp.TransitionMetrics('TimeInputPort',true, ...
                                 'StateLevels',[0 2.3], ...
                                 'PostshootOutputPort',true, ...
                                 'SettlingOutputPort',true, ...
                                 'SettlingSeekDuration',2e-6)

Compute the transition, postshoot, and settling information with step and plot the result.

 [transition, postshoot, settling] = step(htm2,x,t)
 plot(htm2)

References

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

Was this topic helpful?