| DSP Blockset | Search  Help Desk |
| Integer Delay | See Also |
Delay an input by an integer number of sample periods.
Library
Signal Operations, in General DSPDescription
The Integer Delay block delays a discrete-time input by the number of sample intervals specified in the Delay in samples parameter. This can be a scalar value by which to equally delay all N input channels, or a vector containing one delay value for each input channel,[D(1) D(2) ... D(N)]. All the samples in channel 1 are uniformly delayed by D(1) sample intervals, all the samples in channel 2 are uniformly delayed by D(2) sample intervals, and so on. Noninteger delay values are rounded to the nearest integer.

The Frame-based inputs check box allows you to choose between sample-based and frame-based operation.
Sample-Based Operation
When the check box is not selected (default), the block assumes that the input is a 1-by-N sample vector or M-by-N sample matrix. Each of the N vector elements (or M*N matrix elements) is treated as an independent channel, and the block delays each channel as specified by the Delay in samples parameter. The Initial conditions parameter specifies the output of the block during the initial delay. Both fixed and time-varying initial conditions can be specified in a variety of ways to suit the dimensions of the input. 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. For a fixed initial condition, 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 sample-based mode can be specified in one of the following ways:

the block outputs a sequence of five M-by-N zero-matrices at the start of the simulation. A scalar initial condition can be used with inputs of any dimension.
ic, is reshaped columnwise to match the input matrix dimensions.
y = reshape(ic,M,N) % equivalent MATLAB code
For a 2-by-3 input, and the parameters below,

the block outputs the matrix
for the first five sample times. An initial condition of length M*N can be used with inputs of any dimension, and can be specified as either a row or column vector.

the block outputs the matrix
for the first five sample times. For cases where M=N=1 or M=1, the initial condition setting reduces to a scalar or a vector, described above.

the block outputs values -1, -1, -1, 0, 1 in sequence over the first five sample times. A length-D vector initial condition can only be used with scalar inputs.

the block outputs the sequence [1 -1 0], [2 -2 0], [3 -3 0], etc., for the first 5 sample times. A matrix initial condition can only be used with vector inputs.

the block outputs the matrix sequence
at the start of the simulation. An array initial condition can only be used with matrix inputs.
Frame-Based Operation
When the Frame-based inputs check box is selected, the block assumes that the input is an M-by-N frame matrix. Each of the N frames in the matrix contains M sequential time samples from an independent channel. The illustration below shows a 6-by-4 matrix input:
The Number of channels parameter specifies the number of independent channels (columns), N, in the matrix, and the block delays each channel as specified by the Delay in samples parameter. Frame-based operation provides substantial increases in throughput rates at the expense of greater model latency.
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:

the first five samples in each of the N channels are zero. Note that if the frame size is larger than the delay, all of these zeros are all included in the first output from the block.
[1:100 1:100]) with a frame size of 4 and the parameter settings below,

the block outputs the following sequence of matrices at the start of the simulation.
(Note that the first five output samples of channel 1 are zero, and the first five output samples of channel 2 are -1, as specified.) If the input frame size is 1, then this operation equivalent to the sample-based operation described above.
For a two-channel ramp input ([1:100 1:100]) with a frame size of 4 and the parameter settings below,

the block outputs the following sequence of frames at the start of the simulation.
(Note that the first five output samples of channel 1 are zero, and the first five output samples of channel 2 is the sequence -1, -2, -3, -4, -5, as specified.) If the input frame size is 1, then this operation equivalent to the sample-based operation described above.
Dialog Box

See Also
Unit Delay (Simulink)