Buffer
Buffering the input sequence to a smaller or larger frame size.
blockType: Buffer
Path in the library:
|
Description
Block Buffer performs personnel processing. The block redistributes the data in each column of the input signal to produce an output signal with a different frame size.
Buffering the signal to a larger frame size results in an output signal with a lower frame rate than the input. An example for a scalar input is shown in the figure below:

Buffering the signal to a smaller frame size results in a higher frame rate at the output than at the input. An example for a scalar output is shown in the figure below:

Ports
Entrance
Port_1 — input signal
scalar | vector | the matrix
To buffer multi-channel signals, a vector string or matrix is introduced. To buffer single-channel signals, you must enter a scalar or column vector of the size on 1, where — the size of the input frame.
Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool
Support for complex numbers: Yes
Output
Port_1 — output signal
scalar | vector | the matrix
A buffered input signal returned as a scalar, vector, or matrix.
If the input signal is single-channel:
-
The scalar output signal is a vector of dimension on 1.
-
length vector — the output signal is a vector on 1.
where
-
— the size of the input frame
-
— the value of the output buffer size parameter, if — the output signal is a scalar
The period of the input frame is , where — the period of the input sample. The period of the output frame is , where — the value of the Buffer overlap parameter. When setting the Buffer overlap parameter to the period of the output frame is equal to the period of the input sample.
-
If a multi-channel signal is applied to the input:
-
matrix 1 on — the output signal is a matrix of dimension on .
-
the matrix on — the output signal is a matrix on .
where
-
— the number of channels in the signal
-
— the period of the input frame
-
— the value of the Output buffer size parameter, which can be larger or smaller than the size of the input frame . The block buffers each of the input channels are independent.
The period of the input frame is . The period of the output frame is , which is equal to the sampling period of the sequence when the Buffer overlap parameter is set to . Thus, the period of the output sample is related to the period of the input sample as follows:
-
The output data has the same type and complexity as the input data.
Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool
Support for complex numbers: Yes
Parameters
Output buffer size (per channel) — pass buffer size:q[<br>] 64 (default) | a positive integer
Specify the number of consecutive samples, , from each channel for buffering to the output frame.
Buffer overlap — buffer overlap
0 (default) | an integer
Specify the number of samples, , which determines the amount of overlap or incomplete overlap in each subsequent output frame.
To block the data in the buffer, specify the value in the range of , where — the value of the Output buffer size parameter.
The block takes samples (lines) from the current output frame and repeats them in the next output frame. In case of overlap, the block receives new input samples before distributing buffered data to the output.
When , the signal is buffered with incomplete overlap. The block discards input samples after filling the buffer and outputs a buffer with a period , which is more than in the case of zero overlap.
The period of the output frame is , which is equal to the sampling period of the input sequence when the value of the Buffer overlap parameter is .
Initial conditions — initial value of
0.0 (default) | scalar | vector | the matrix
Specify the value that initializes the block for cases of non-zero waiting time in the form of a scalar, vector, or matrix.
For all cases of single-task operations, the block Buffer it is initialized by the value(s) specified in the Initial conditions parameter. The block reads data from this buffer to generate the first output samples, where
The dimension of the Initial conditions parameter depends on the Buffer overlap, , and depends on whether the input is single-channel or multi-channel:
-
If , then the Initial conditions parameter must be a scalar.
-
If , then the Initial conditions parameter can be a scalar or a vector with one of these constraints:
-
For single-channel inputs, the initial condition parameter can be a length vector. if is equal to 1, or a vector of length if it is equal to 1.
-
For multi-channel inputs, the Initial conditions parameter can be a length vector. if is equal to 1, or a vector of length if it is equal to 1.
-
For general buffering between frames of arbitrary size, the Initial conditions parameter must be a scalar, which is then repeated over all elements of the initial output(s). But, in the special case, when the input signal is a vector of lines 1 on , and the output of the block is a matrix on , the initial conditions can be:
-
The matrix on .
-
Length vector , repeated across all columns of the original output(s).
-
A scalar repeated in all elements of the original output(s).
In the special case, when the output is a vector string 1 on , which is the result of the unbuffering of the matrix on , the initial conditions can be:
-
A vector containing samples for sequential output on each channel during the first samples.
-
A scalar that will be repeated for all elements of the initial output (outputs).
Additional Info
Zero delay
Zero delay means that the first input sample received at the moment , appears as the first output sample. In single-tasking mode, the block Buffer has zero latency for these cases.:
-
Scalar input and output ( ) with a zero or negative value of the Buffer overlap parameter ( ).
-
The size of the input frame is an integer multiple of the size of the output frame (when the Buffer overlap parameter is set to zero ( )).
where
-
- an integer.
Notable cases of this include:
-
Any input frame size with scalar output ( ) and the null value of the Buffer overlap parameter ( );
-
Equal sizes of the input and output frames ( ) with the zero value of the Buffer overlap parameter ( ).
-
-