Contents

dsp.VariableIntegerDelay System object

Package: dsp

Delay input by time-varying integer number of sample periods

Description

The VariableIntegerDelay object delays input by time-varying integer number of sample periods.

To delay the input by a time-varying integer number of sample periods:

  1. Define and set up your variable integer delay object. See Construction.

  2. Call step to delay the input according to the properties of dsp.VariableIntegerDelay. The behavior of step is specific to each object in the toolbox.

Construction

H = dsp.VariableIntegerDelay returns a variable integer delay System object™, H, that delays discrete-time input by a time-varying integer number of sample periods.

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

Properties

MaximumDelay

Maximum delay

Specify the maximum delay the object can produce for any sample. The maximum delay must be a positive scalar integer value. The object clips input delay values greater than the MaximumDelay to the MaximumDelay. The default is 100.

InitialConditions

Initial values in memory

Specify the values with which the object's memory is initialized. The dimensions of this property can vary depending on the setting of the FrameBasedProcessing property, and whether you want fixed or time-varying initial conditions. The default is 0.

When you set the FrameBasedProcessing property to false, the object supports N-D input arrays. For an M-by-N-by-P sample-based input array U, you can set the InitialConditions property as follows:

  • To specify fixed initial conditions, set the InitialConditions property to a scalar value. The object initializes every sample of every channel in memory using the value you specify.

  • To specify time-varying initial conditions, set the InitialConditions property to an array of dimension M-by-N-by-P-by-D. The object uses the values in this array to initialize memory samples U(2:D+1), where D is the value of the MaximumDelay property.

When you set the FrameBasedProcessing property to true, the object treats each of the N input columns as a frame containing M sequential time samples from an independent channel. For an M-by-N frame-based input matrix U, you can set the InitialConditions property as follows:

  • To specify fixed initial conditions, set the InitialConditions property to a scalar value. The object initializes every sample of every channel in memory using the value you specify.

  • To specify different time-varying initial conditions for each channel, set the InitialConditions property to an array of size 1-by-N-by-D, where D is the value of the MaximumDelay property.

DirectFeedthrough

Allow direct feedthrough

When you set this property to true, the object allows direct feedthrough. When you set this property to false, the object increases the minimum possible delay by one. The default is true.

FrameBasedProcessing

Treat input as frame based or sample based

Set this property to true to enable frame-based processing. When you do so, the object accepts M-by-N input matrices and treats each of the N input columns as a frame containing M sequential time samples from an independent channel. Set this property to false to enable sample-based processing. When you do so, the object supports N-D inputs and treats each element of the input as a separate channel. The default is true.

Methods

cloneCreate variable integer delay 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 variable integer delay object
stepDelay input by time-varying integer number of sample periods

Examples

Delay a signal by a varying integer number of sample periods:

h = dsp.VariableIntegerDelay;
x = 1:100;
ii = 0;
k = 0;
yout = [];

while(ii+10 <= 100)
     y = step(h, x(ii+1:ii+10)',k*ones(10,1));
     yout = [yout;y];
     ii = ii+10;
     k = k+1;
end

stem(x,'b');
hold on; stem(yout,'r');
legend('Original Signal', 'Variable Integer Delayed Signal')

Algorithms

This object implements the algorithm, inputs, and outputs described on the Variable Integer Delay block reference page. The object properties correspond to the block properties, except:

When you set the DirectFeedthrough property of the System object to true, the object allows direct feedthrough. This behavior is different from the way the block behaves when you select the corresponding Disable direct feedthrough by increasing minimum possible delay by one check box on the block dialog. When you enable this block parameter, the block does not allow direct feedthrough.

Both this object and its corresponding block let you specify whether to process inputs as individual samples or as frames of data. The object uses the FrameBasedProcessing property. The block uses the Input processing parameter. See Set the FrameBasedProcessing Property of a System object for more information.

Was this topic helpful?