| Signal Processing Blockset™ | ![]() |
Signal Management / Buffers
dspbuff3
The Delay Line block buffers the input samples into a sequence of overlapping or underlapping matrix outputs. In the most typical use (sample-based inputs), each output differs from the preceding output by only one sample, as illustrated below for scalar input.

Note that the first output of the block in the example above is all zeros; this is because the Initial Conditions parameter is set to zero. Due to the latency of the Delay Line block, all outputs are delayed by one frame, the entries of which are defined by the Initial Conditions parameter.
In sample-based operation, the Delay Line block buffers a sequence of sample-based length-N vector inputs (1-D, row, or column) into a sequence of overlapping frame-based Mo-by-N matrix outputs, where Mo is specified by the Delay line size parameter (Mo>1). That is, each input vector becomes a row in the frame-based output matrix.
At each sample time the new input vector is added in the last row of the output, so each output overlaps the previous output by Mo-1 samples. Therefore, the output sample period and frame period is the same as the input sample period (Tso=Tsi, and Tfo=Tsi). When Mo=1, the input is simply passed through to the output and retains the same dimension, but becomes frame based. The latency of the block always causes an initial delay in the output; the value of the first output is specified by the Initial conditions parameter (see Initial Conditions). Sample-based full-dimension matrix inputs are not accepted.
The Delay Line block's sample-based operation is similar to that of a Buffer block with Buffer size equal to Mo and Buffer overlap equal to Mo-1, except that the Buffer block has a different latency.
In the following model, the block operates on a sample-based input with a Delay line size of 3.

The input vectors in the example above do not begin appearing at the output until the second row of the second matrix due to the block's latency (see Initial Conditions). The first output matrix (all zeros in this example) reflects the block's Initial conditions setting. As for any sample-based input, the output frame rate and output sample rate are both equal to the input sample rate.
In frame-based operation, the Delay Line block rebuffers a sequence of frame-based Mi-by-N matrix inputs into a sequence of frame-based Mo-by-N matrix outputs, where Mo is the output frame size specified by the Delay line size parameter. Depending on whether Mo is greater than, less than, or equal to the input frame size, Mi, the output frames can be underlapped or overlapped. Each of the N input channels is rebuffered independently.
When Mo > Mi, the output frame overlap is the difference between the output and input frame size, Mo-Mi. When Mo < Mi, the output is underlapped; the Delay Line block discards the first Mi-Mo samples of each input frame so that only the last Mo samples are buffered into the corresponding output frame. When Mo = Mi, the output data is identical to the input data, but is delayed by the latency of the block. Due to the block's latency, the outputs are always delayed by one frame, the entries of which are specified by the Initial conditions (see Initial Conditions).
The output frame period is equal to the input frame period (Tfo=Tfi). The output sample period, Tso, is therefore equal to Tfi/Mo, or equivalently, Tsi(Mi/Mo)
In the following model, the block rebuffers a two-channel frame-based input with a Delay line size of 3.

The first output frame in the example is a product of the latency of the Delay Line block; it is all zeros because the Initial conditions is set to be zero. Since the input frame size, 4, is larger than the output frame size, 3, only the last three samples in each input frame are propagated to the corresponding output frame. The frame periods of the input and output are the same, and the output sample period is Tsi(Mi/Mo), or 4/3 the input sample period.
The Delay Line block's buffer is initialized to the value specified by the Initial condition parameter. The block outputs this buffer at the first simulation step (t=0). When the block's output is a vector, the Initial condition can be a vector of the same size, or a scalar value to be repeated across all elements of the initial output. When the block's output is a matrix, the Initial condition can be a matrix of the same size, a vector (of length equal to the number of matrix rows) to be repeated across all columns of the initial output, or a scalar to be repeated across all elements of the initial output.

The number of rows in output matrix, Mo.
The value of the block's initial output, a scalar, vector, or matrix.
When you select this check box, the input data is not delayed by an extra frame before it is available at the output buffer. Instead, the input data is available immediately at the output port of the block.
When you select this check box, the En_Out port appears on the block icon. The block internally uses a circular buffer, even though the output is linear. This means, for valid output, data from the circular buffer has to be linearized.
The En_Out port determines whether or not a valid output needs to be computed based on the value of the Boolean input. If the input value to the En_Out port is 1, the block output is linearized, and thus is valid. Otherwise, the output is not linearized, and is invalid. This allows the block to be more efficient when the tapped Delay Line's output is not required at each sample time.
This parameter only appears and applies when the Show En_Out port for selectively enabling output parameter is selected. Use this parameter to specify the block output at those time steps when the internal state buffer is not being linearized to output valid data. If you select this parameter, the most recent valid value is held on the output port. If you do not select the parameter, the signal on the output port is invalid data.
| Port | Supported Data Types |
|---|---|
Input |
|
Output |
|
| Buffer | Signal Processing Blockset |
| Triggered Delay Line | Signal Processing Blockset |
![]() | Delay | Detrend | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |