“Sample Based” and “Frame Based”

advertisement
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
Sample Based:
[M  N ]

M
time
They are MN distinct signals arranged in a matrix
Particular Case:
[ M 1]
x[n]
x1[n]
is like M distinct signals
xM [n]

“Sample Based” and “Frame Based” Signals
M
Frame Based:
x1[n]
[M  N ]

xN [n]
They are N distinct signals, each one represented
as a sequence of frames of length M
Particular Case:
[ M 1]
x[n]
one signal as a sequence of
M
frames of length M
Convert “to Sample” and “to Frame”
Example:
5

y0= 
y1= 
y2=y0= 
5


Frame based
Sample based
Frame based
Serial to Parallel (Buffer)
N
z 1
x[n]
xN 1[m]  x[(m  1) N  1]

N
x1[m]  x[mN  1]
N
x0 [m]  x[mN ]
z 1
Serial to Parallel in Simulink
Serial to Parallel is implemented by the “Buffer” Simulink block in
Signal Processing Blcokset > Signal Management > Buffers:
x[n]


S/P
N
xN 1[m]
x0[m]


[ N 1]
[1 1]
Sample based
Frame based
Buffer
Example of Downsampling
DF FIR
x1[m]
[2x1]
[2x1]
1
x[n]
H1(z)
1
x0[m]
Add
Buffer
y[m]
DF FIR
H0(z)
x1[m ]
2
H1 z 
2
H 0 z 
z 1
x[n]
x0 [ m ]
y[m]
Parallel to Serial (Unbuffer or Interlacer)
y0 [ n]
y[m]
N
z 1
N
z 1
yN 1[n]
N
Parallel to Serial in Simulink
Parallel to Serial is implemented by the “UnBuffer” Simulink block in
Signal Processing Blcokset > Signal Management > Buffers:
y0 [ n ]


yN 1[n]
y[ m ]
P/S
N
[ N 1]


[1 1]
Frame based
Sample based
Unbuffer
Example of Upsampling
DF FIR
y0[n]
1
x[n]
H0(z)
2
2
DF FIR
y1[n]
To
Frame
[2x1]
[2x1]
1
y[m]
Frame Conversion
Unbuffer
H1(z)
x[n]
H 0 z 
y0 [ n ]
y[m]
2
z 1
H1 z 
y1[n ]
2
Simulink Implementation
N channel to N channel IFFT:
Frame
Sample
Sample based
Sample based
Sample
M channel Parallel to Serial with Unbuffer:
M

y[m]
z 1
y[m]

M

M
z 1
z 1
UNBUFFER
Simulink Implementation
N channel to N channel FFT:
Everything sample based
M channel Serial to Parallel with Buffer:
M
z
1
M
z 1
z
1
M
BUFFER

Download