DSP Blockset    
Integer Delay

Delay an input by an integer number of sample periods.

Library

Signal Operations

Description

The Integer Delay block delays a discrete-time input by the number of sample intervals specified in the Delay parameter. Noninteger delay values are rounded to the nearest integer, and negative delays are clipped at 0.

Sample-Based Operation

When the input is a sample-based M-by-N matrix, the block treats each of the M*N matrix elements as an independent channel. The Delay parameter, v, can be an M-by-N matrix of positive integers that specifies the number of sample intervals to delay each channel of the input, or a scalar integer by which to equally delay all channels.

For example, if the input is M-by-1 and v is the matrix [v(1) v(2) ... v(M)]', the first channel is delayed by v(1) sample intervals, the second channel is delayed by v(2) sample intervals, and so on. Note that when a channel is delayed for sample-time units, the output sample at time is the input sample at time . If is negative, then the output is the corresponding value specified by the Initial conditions parameter.

A 1-D vector of length M is treated as an M-by-1 matrix, and the output is 1-D.

The Initial conditions parameter specifies the output of the block during the initial delay in each channel. The initial delay for a particular channel is the time elapsed from the start of the simulation until the first input in that channel is propagated to the output. Both fixed and time-varying initial conditions can be specified in a variety of ways to suit the dimensions of the input.

Fixed Initial Conditions.   A fixed initial condition in sample-based mode can be specified as one of the following:

Initial conditions cannot be specified by full matrices.

Time-Varying Initial Conditions.   A time-varying initial condition in sample-based mode can be specified in one of the following ways:

Initial conditions cannot be specified by full matrices.

Frame-Based Operation

When the input is a frame-based M-by-N matrix, the block treats each of the N columns as an independent channel, and delays each channel as specified by the Delay parameter.

For frame-based inputs, the Delay parameter can be a scalar integer by which to equally delay all channels. It can also be a 1-by-N row vector, each element of which serves as the delay for the corresponding channel of the N-channel input. Likewise, it can also be an M-by-1 column vector, each element of which serves as the delay for one of the corresponding M samples for each channel. The Delay parameter can be an M-by-N matrix of positive integers as well; in this case, each element of each channel is delayed by the corresponding element in the delay matrix. For instance, if the fifth element of the third column of the delay matrix was 3, then the fifth element of the third channel of the input matrix is always delayed by three sample-time units.

When a channel is delayed for sample-time units, the output sample at time is the input sample at time . If is negative, then the output is the corresponding value specified in the Initial conditions parameter.

The Initial conditions parameter specifies the output during the initial delay. Both fixed and time-varying initial conditions can be specified. The initial delay for a particular channel is the time elapsed from the start of the simulation until the first input in that channel is propagated to the output.

Fixed Initial Conditions.   The settings shown below specify fixed initial conditions. The value entered in the Initial conditions parameter is repeated at the output for each sample time of the initial delay. A fixed initial condition in frame-based mode can be one of the following:

Initial conditions cannot be specified by full matrices.

Time-Varying Initial Conditions.   The following settings specify time-varying initial conditions. For time-varying initial conditions, the values specified in the Initial conditions parameter are output in sequence during the initial delay. A time-varying initial condition in frame-based mode can be specified in the following ways:

Initial conditions cannot be specified by full matrices.

Resetting the Delay

The block resets the delay whenever it detects a reset event at the optional Rst port. The reset signal rate must be a positive integer multiple of the rate of the data signal input.

The reset event is specified by the Reset port parameter, and can be one of the following:

Examples

The dspafxr demo illustrates an audio reverberation system built around the Integer Delay block.

Dialog Box

Delay
The number of sample periods to delay the input signal.
Initial conditions
The value of the block's output during the initial delay.
Reset port
Determines the reset event that causes the block to reset the delay. For more information, see Resetting the Delay.

Supported Data Types

To learn how to convert to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.

See Also

Unit Delay
Simulink
Variable Fractional Delay
DSP Blockset
Variable Integer Delay
DSP Blockset

Also see Signal Operations for a list of all the blocks in the Signal Operations library.


  Inherit Complexity Interpolation