Date post: | 25-Dec-2015 |
Category: |
Documents |
Upload: | darren-bryant |
View: | 213 times |
Download: | 0 times |
N][nx
zH
][my
We compute here … and throw away most of them here!!!!
N
Inefficient Implementation of Downsampling
N][nx
zH
][my
Most terms here are zero … and waste time to process them here!!!!
N zH
][my
$$$$
Inefficient Implementation of Upsampling
2
6422 2.15.15.10.2 zzzzH
2zH
2
321 2.15.15.10.2 zzzzH
zH
][nx
][nx
][my
][my
Example…
][nh
)(...]4[]2[]0[][)( 242 zHzhzhhnhzHn
odd for 0][ nnh
21
120 zHzzHzH
In general: Polyphase Decomposition.
Take N=2:
...]5[]3[]1[
...]4[]2[]0[521
42
zhzhhz
zhzhhzH
General Filter: Polyphase Decomposition
m
m
m
m
zmhzH
zmhzH
221
220
]12[)(
]2[)(with Polyphase
Components
][nx zH
][my
NOBLE IDENTITY
][nx
20 zH
21 zH
1z][my
POLYPHASE
2
2
][nx zH0
zH1
1z
2][my
2
Downsampling using Polyphase Decomposition
][nx1z
2
2
This is a Serial to Parallel (a Buffer):
][nx S/P
2 ][0 mx
][1 mx
0 0 0 1 2 3 4 5 6 7 0 2 4 6
0 1 3 5
0n
1[ ] [2 1]x m x m
0[ ] [2 ]x m x m
0m
Serial to Parallel (Buffer)
][nx zH
][my
][nx zH0
zH1
1z
2 ][my
2
NOBLE IDENTITY2
][nx 20 zH
21 zH
1z
][my2
POLYPHASE
NOBLE IDENTITY
Upsampling using Polyphase Decomposition
1z
2 [ ]y m
2
][0 ny
][1 ny
This is a Parallel to Serial (an Unbuffer):
[ ]y mP/S
2
0[ ]y n
1[ ]y n0 2 4 6
0 1 3 5
0n
0 0 0 1 2 3 4 5 6 7
0m
Parallel to Serial (Unbuffer or Interlacer)
1
0
][][N
k
Nk
n
n zkNhzznhzH
Given any integer N:
NN
NNN zHzzHzzHzH 1)1(
11
0 ...)(
Nk zH
Example: take N=3
7654321 7.02.04.16.02.43.5.1.2)( zzzzzzzzH
6330 2.02.41.2)( zzzH
6331 7.06.05.)( zzzH
332 4.13.)( zzH
General Polyphase Decomposition
][nx1z
N1z
N
N
][nx S/P
N ][0 mx
1[ ]Nx m
0n0m
0[ ] [ ]x m x mN
1[ ] [ 1]x m x mN
1[ ] [( 1) 1]Nx m x m N
n N
1 2 3 4 5
1
26
3
4
5
6
Serial to Parallel (Buffer):
Serial to Parallel (Buffer)
1z
N [ ]y m
N
][0 ny
1[ ]Ny n
This is a Parallel to Serial (an Unbuffer):
[ ]y mP/S
N
0[ ]y n
1[ ]Ny n
0n
1
2
3
4
5
6
0m m N
1 2 3 4 5 6
1n
Parallel to Serial (Unbuffer or Interlacer)
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
][ NM
Sample Based:
time
M
N
They are MN distinct signals arranged in a matrix
Particular Case:
[ 1]M
is like M distinct signals ][nx
1[ ]x n
[ ]Mx n
“Sample Based” and “Frame Based” Signals
][ NM
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
][nx
1[ ]x n
[ ]Nx n
M
M
Serial to Parallel in Simulink
Serial to Parallel is implemented by the “Buffer” Simulink block in
Signal Processing Blcokset > Signal Management > Buffers:
Buffer
]11[ [ 1]N
][nx S/P
N ][0 mx
1[ ]Nx 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]
][nx zH 0
zH1
1z
2 ][my
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]
][nx zH 0
zH1
1z
2 ][my
2
0[ ]x m
1[ ]x m
Example of Downsampling
Parallel to Serial in Simulink
Parallel to Serial is implemented by the “UnBuffer” Simulink block in
Signal Processing Blcokset > Signal Management > Buffers:
]11[ [ 1]N
Frame based Sample based
[ ]y mP/S
N
0[ ]y n
1[ ]Ny n
Unbuffer
][nx zH0
zH1
1z
2 ][my
2
][0 ny
1[ ]y n
y0[n]
y1[n]
1
y[m]
UnbufferDF FIR
H1(z)
DF FIR
H0(z) ToFrame
Frame Conversion
1
x[n] 2
2
[2x1]
[2x1]
][nx zH0
zH1
1z
2 ][my
2
][0 ny
1[ ]y n
y0[n]
y1[n]
1
y[m]
UnbufferDF FIR
H1(z)
DF FIR
H0(z) ToFrame
Frame Conversion
1
x[n] 2
2
[2x1]
[2x1]
Example of Upsampling