DSP Blockset
  Go to block:
    Search    Help Desk 

Working with Buffers

The buffering blocks in the Buffering library (in General DSP) are the key to converting between sample-based and frame-based signals, and between different frame sizes. The blocks provide three general classes of buffering operations:

Buffering.    Buffering transforms a sample-based sequence of data into a frame-based sequence of data. Each input to a buffering operation is a sample vector, a collection of scalar data points from multiple channels. The three-channel sample-based sequence below provides an example of such a signal.

In the simplest (nonoverlapping) case, the buffering operation collects Mo successive vector inputs (each containing N independent samples), and outputs the buffered sequence as an Mo-by-N matrix. This process is repeated continuously to generate a matrix output with a frame period Mo times longer than the input period. The sample period of the sequence, Ts, is not altered by a nonoverlapping buffering operation.

The figure below illustrates a one-channel buffering operation for Mo=3.

Rebuffering.    Rebuffering converts a signal from one frame size to another, which is a common operation in frame-based models. The input to the rebuffering operation is the standard frame-based Mi-by-N matrix, which contains Mi samples from each of N independent channels. The samples contained in the input matrix are rebuffered to a frame size of Mo, resulting in an Mo-by-N output matrix. In a rebuffering operation with no overlap, the frame period of the output may be longer or shorter than the input, but the sample period of the sequence, Ts, always remains the same.

Unbuffering.    Unbuffering is the inverse of the sample-to-frame buffering process, and generates a sample-based output from a frame-based input. The sample-based output signal has a sample rate Mi times higher than the frame-based input, where Mi is the input frame size. The figure below shows the one-channel unbuffering operation for Mi=3.

The blocks listed below are the primary buffering blocks in the DSP Blockset.

Block
Library
Buffer
Buffers, in General DSP
Partial Unbuffer
Buffers, in General DSP
Rebuffer
Buffers, in General DSP
Shift Register
Buffers, in General DSP
Unbuffer
Buffers, in General DSP
Variable Selector
Elementary Functions, in Math Functions
Zero Pad
Signal Operations, in General DSP

In addition, a number of blocks, including the buffered scopes and spectral estimation blocks, perform internal buffering of inputs, and provide some of the same parameters as the buffering blocks discussed in the next sections.

Note
In this book, the terms length and width are used interchangeably to refer to the number of elements in a buffer, frame, or vector.



[ Previous | Help Desk | Next ]