You are on page 1of 14

Processing Data by Blocks

In most efficient implementations we process data by blocks, rather than one sample
at a time.
Real Time simulation and design software such as Simulink are designed to take
advantages of block processing for two purposes:
efficient computations, thus faster simulations;
efficient design.
Sample Based and Frame Based Signals
] [ N M
Sample Based:
time

M
N
They are MN distinct signals arranged in a matrix
Particular Case:
[ 1] M
is like M distinct signals

] [n x
1
[ ] x n
[ ]
M
x n
Sample Based and Frame Based Signals
] [ N M
Frame Based:
They are N distinct signals, each one represented
as a sequence of frames of length M
Particular Case:
[ 1] M
one signal as a sequence of
frames of length M
] [n x
1
[ ] x n
[ ]
N
x n

M
M
5


y0= Frame based


y1= Sample based 5
y2=y0=


Frame based
Convert to Sample and to Frame
Example:
] [n x
1
z
N
1
z
N
N
0
[ ] [ ] x m x mN =
1
[ ] [ 1] x m x mN =
1
[ ] [( 1) 1]
N
x m x m N

= +

Serial to Parallel (Buffer)


Serial to Parallel in Simulink
Serial to Parallel is implemented by the Buffer Simulink block in
Signal Processing Blcokset > Signal Management > Buffers:
Buffer
] 1 1 [
[ 1] N



] [n x
S/P
N
] [
0
m x
1
[ ]
N
x m

Sample based
Frame based
x0[m]
x1[m]
1
y[m]
DF FIR
H1(z)
DF FIR
H0(z)
Buffer
Add
1
x[n]
[2x1]
[2x1]
] [n x
( ) z H
0
( ) z H
1
1
z
2
] [m y
2
0
[ ] x m
1
[ ] x m
x0[m]
x1[m]
1
y[m]
DF FIR
H1(z)
DF FIR
H0(z)
Buffer
Add
1
x[n]
[2x1]
[2x1]
] [n x
( ) z H
0
( ) z H
1
1
z
2
] [m y
2
0
[ ] x m
1
[ ] x m
Example of Downsampling
Parallel to Serial (Unbuffer or Interlacer)
1
z
] [m y
1
z
N
N
N
] [
0
n y
1
[ ]
N
y n

Parallel to Serial in Simulink


Parallel to Serial is implemented by the UnBuffer Simulink block in
Signal Processing Blcokset > Signal Management > Buffers:
] 1 1 [
[ 1] N


Frame based
Sample based
[ ] y m
P/S
N
0
[ ] y n
1
[ ]
N
y n

Unbuffer
] [n x ( ) z H
0
( ) z H
1
1
z
2
] [m y
2
] [
0
n y
1
[ ] y n
y0[n]
y1[n]
1
y[m]
Unbuffer DF FIR
H1(z)
DF FIR
H0(z)
To
Frame
Frame Conversi on
1
x[n]
2
2
[2x1]
[2x1]
] [n x ( ) z H
0
( ) z H
1
1
z
2
] [m y
2
] [
0
n y
1
[ ] y n
y0[n]
y1[n]
1
y[m]
Unbuffer DF FIR
H1(z)
DF FIR
H0(z)
To
Frame
Frame Conversi on
1
x[n]
2
2
[2x1]
[2x1]
Example of Upsampling
Simulink Implementation N channel to N channel IFFT:
Sample based Sample based
Frame
Sample
Sample
M channel Parallel to Serial with Unbuffer:
M |
M |
M |
1
z
1
z
1
z

] [m y
UNBUFFER
] [m y

Everything sample based


Simulink Implementation N channel to N channel FFT:
M channel Serial to Parallel with Buffer:
M +
M +
M +
1
z
1
z
1
z
BUFFER

You might also like