User`s guide

3 Working with Signals
3-52
Example: Buffering Frame-Based Signals with Overlap. In the model below, a
two-channel frame-based signal with frame period 4 is rebuffered to a
frame-based signal with frame size 3 and frame period 2. Because of the
overlap, the input sample period is not conserved, and the output sample
period is 2/3.
To build the model, define the following variable in the MATLAB workspace.
A = [1 1;2 1;3 0;4 0;5 1;6 1;7 0;8 0];
Connect the Buffer block to a Signal From Workspace source and a To
Workspace sink with the following parameter settings:
In the Signal From Workspace block, set:
-
Signal = A
- Sample time = 1
- Samples per frame = 4
In the Buffer block, set:
-
Output buffer size (per channel) = 3
- Buffer overlap = 1
- Initial conditions = 0
Note that the inputs do not begin appearing at the output until the last row of
the third matrix. This is due to the block’s latency. See “Delay and Latency” on
page 3-85 for general information about algorithmic delay, and see “Buffering
Delay and Initial Conditions” on page 3-53 for instructions on how to calculate
buffering delay.
11
21
30
40
51
61
70
80
(M
o
=3, L=1)
first input
t=0t=4
Output frame period = (M
o
-L)T
si
ch2
ch1
ch2
ch1
Input frame period = 4T
si
11
21
30
51
61
70
30
40
51
first output
t=0t=10 t=2
ch2
ch1
ch2
ch1
ch2
ch1
00
00
11
00
00
00
00
00
00
ch2
ch1
ch2
ch1
ch2
ch1
t=4t=6t=8