Documentation

dsp.DelayLine System object

Package: dsp

Rebuffer sequence of inputs with one-sample shift

Description

The DelayLine object rebuffers a sequence of inputs with one-sample shift.

To rebuffer a sequence of inputs with one-sample shift:

  1. Define and set up your delay line object. See Construction.

  2. Call step to rebuffer the sequence of inputs according to the properties of dsp.DelayLine. The behavior of step is specific to each object in the toolbox.

Construction

H = dsp.DelayLine returns a delay line System object™, H, that buffers the input samples into a sequence of overlapping or underlapping matrix outputs.

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

H = dsp.DelayLine(DELAYSIZE,INITIAL,'PropertyName',PropertyValue,...) returns a delay line System object, H, with the Length property set to DELAYSIZE, InitialConditions property set to INITIAL and other specified properties set to the specified values.

Properties

Length

Number of rows in output matrix

Specify the number of rows in the output matrix as a scalar positive integer. The default is 64.

InitialConditions

Initial delay line output

Set the value of the object's initial output as one of | scalar | vector | matrix |.

For vector outputs, the following selections apply for the InitialConditions property:

  • A vector of the same size

  • A scalar value that you want repeated across all elements of the initial output

For matrix outputs, the following selections apply for the InitialConditions property:

  • A matrix of the same size

  • A vector (equal to the length of the number of matrix rows) that repeats across all columns of the initial output

  • A scalar that repeats across all elements of the initial output

The default is 0.

DirectFeedthrough

Enable passing input data to output without extra frame delay

When you set this property to true, there is no input data delay by an extra frame before it is available at the output buffer. Instead, the input data is available immediately at the output. When you set this property to false, there is one frame delay on the output. The default is false.

EnableOutputInputPort

Enable selective output linearization

The object internally uses a circular buffer, even though the output is linear. To obtain a valid output, the object must linearize the circular buffer. When this property is true, the object uses an additional Boolean input to determine if a valid output calculation is needed. If Boolean the input value is 1, the object's output is linearized and thus valid. If Boolean the input value is 0, the output is not linearized and is invalid. This allows the object to be more efficient when each step does not require the tapped delay line output. When you set this property to false, the output is always linearized and valid. The default is false.

HoldPreviousValue

Hold previous valid value for invalid output

If you set this property to true, the most recent, valid value is held on the output. If you set this property to false, the signal on the output is invalid data. This property applies only when you set the EnableOutputInputPort property to true. The default is false.

Methods

cloneCreate delay line object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs of step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset internal states of delay line object
stepDelayed version of input

Examples

Use a delay line object with a delay line size of 4 samples:

hdelayline = dsp.DelayLine( ...
   'Length', 4, ...
   'DirectFeedthrough', true, ...
   'InitialConditions', -2, ...
   'EnableOutputInputPort', true, ...
   'HoldPreviousValue', true);
en = logical([1 1 0 1 0]);
y = zeros(4,5);
for ii = 1:5
     y(:,ii) = step(hdelayline, ii, en(ii));
end

Algorithms

This object implements the algorithm, inputs, and outputs described on the Delay Line block reference page. The object properties correspond to the block properties, except as noted.

This object processes inputs as separate channels (frames). The corresponding block has a temporary Treat Mx1 and unoriented sample-based signals as parameter with a One channel option for frame-based behavior and an M channels option for sample-based behavior. See the Delay Line block reference page and Set the FrameBasedProcessing Property of a System object for more information.

See Also

Was this topic helpful?