DSP Blockset
  Go to block:
    Search    Help Desk 

Buffering Sample-Based Signals

The Buffer block is the primary block for buffering scalars and sample vectors into frame vectors and frame matrices. The block lets you specify the Buffer size, the number of Buffer overlap points, and the block's initial output (Initial condition).

The sample-based input to the block can be a single channel signal (scalar sequence) or a multichannel signal (vector sequence). In both cases, the Buffer block performs the following operations:

   1.
Acquire the number of new inputs specified by the difference between the Buffer size (Mo) and Buffer overlap (L). Each new sample enters at the bottom of the buffer, and is pushed upwards as later samples enter. Single channel (scalar) inputs enter a vector buffer, while multichannel (vector) inputs enter a matrix buffer as rows.
   2.
Propagate the buffered data to the output as a vector or matrix with a longer period (the input sample period multiplied by the number of new samples in the buffer). The first element or row in the output corresponds to the earliest input sample.
The output frame period, Tfo, is related to the input sample period, Tsi, by

As a result, the new output sample period, Tso, is

This is equal to the input sample period only when the Buffer overlap, L, is zero.

The figure below illustrates overlapping buffering of a four-channel signal. The Buffer size is 3 and the Buffer overlap is 1. Each signal channel is represented by a column of the output frame matrix. The input sample period (Tsi) is 1, so the output frame period (Tfo) is 2, and the output sample period (Tso) is 2/3.

See "Using Overlapping Buffers" for a more thorough discussion of this type of buffering.



[ Previous | Help Desk | Next ]