Uniform DFT Filter Bank

advertisement
11.10.1 Uniform DFT Filter Banks
1/27
Uniform DFT Filter Banks
We’ll look at 5 versions of DFT-based filter banks – all
but the last two have serious limitations and aren’t
practical. But… they give a nice transition to the last two
versions – which ARE useful and practical methods.
Version #1 Undecimated
(Not in P&M)
Version #2
Decimated
Decimated Non-Rect Window
(11.10.1)
Sliding DFT
Sliding DFT
(Filter Size = # Channels)
Decimated
(Not in P&M)
Version #5
Rect. Window
(Filter Size = # Channels)
(Not in P&M)
Version #4
Sliding DFT
(Filter Size = # Channels)
(Not in P&M)
Version #3
Rect. Window
Arbitrary Window Sliding DFT
(Filter Size Arbitrary)
Decimated
Polyphase Filter
DFT
(Filter Size Arbitrary)
Only Versions 4 & 5 are Practical Methods
2/27
Setting for Versions 1, 2, & 3
We will illustrate with a four channel case:
u0[n]
4 Channel
Filter
Bank
x[n]
u1[n]
u2[n]
u3[n]
|H0(θ) | |H1(θ) | |H2(θ) | |H3(θ) |
π/2
|H3(θ) |
-π
-π/2
π
3π/2 2π
θ
Equivalent
To…
|H0(θ) | |H1(θ) | |H2(θ) |
π/2
π
θ
3/27
Version #1: Sliding DFT Filter Bank
n=0
1
2
3
4
5
6
7
8
9
x[n]
Signal
Blocks
4 pt. CDFT
CDFT =
Conjugate
DFT
u3[1]
u2[2]
CDFT’s
Ti
m
e
u0[n] u1[n] u2[n] u3[n]
M=4 Example
Frequency
4/27
Different View of Version #1
x[n]
x[n]
D
D
u0[n]
M=4 Example
u0[n]
x[n – 1]
x[n – 2]
u1[n]
u1[n]
CDFT
u2[n]
u2[n]
D
u3[n]
x[n – 3]
u3[n]
Sequence of DFT’s
Math View
um [n ] =
M −1
im
x
[
n
−
i
]
W
∑
M
m = 0, 1, ... , M − 1
i =0
Fix n, Then
Compute
M-pt. CDFT
Note: Conjugate DFT Form
5/27
Math Shows this DOES give Filter Bank
Output of this structure is:
um [n ] =
M −1
∑ x[n − i ]WMim
i =0
= {x * g m }[n ]
where g m [n ] = WMnm
0 ≤ n ≤ M −1
Thus, the mth output signal is the linear convolution of
the input signal with the impulse response gm[n].
Q: What is the mth filter’s Transfer Function?
Gmz ( z ) =
=
M −1
nm − n
W
∑ Mz
n =0
1 − ( zWM− m ) − M
1 − ( zWM− m ) −1
Use Geom. Sum Result
N 2 −1
∑
n = N1
a N1 − a N 2
a =
1− a
n
6/27
Math Shows … (con.t)
Q: What is the mth filter’s Frequency Response?
Gmf (θ ) = Gmz ( z )
=
1− e
z = e jθ
− jM (θ − 2πm / M )
1 − e − j (θ −2πm / M )
sin[0.5M (θ − 2πm / M )] − j 0.5(θ − 2πm / M )( M −1)
e
=
sin[0.5(θ − 2πm / M )]
• Looks sort of like sinc function: Dirichlet Kernel
• Centered at θ = 2πm/M rad/sample
Note: The window determines the shape of the frequency response.
The rectangular window used here makes a poor filter!!!
7/27
Frequency Response of Version #1 Filterbank
Poor
Passband
M=12 Example
Poor Stopband
15
m=0
10
|G0(θ)|
5
0
-3
-2
-1
0
1
2
3
1
2
3
θ/π
15
m=0
10
|Gm(θ)|
m = –1
m=1
5
0
-3
-2
-1
0
θ/π
Region of Interest
–π ≤ θ ≤ π
Only shows 3 of
the 12 channels in
this example
8/27
Synthesis Bank for Version #1 Filterbank
x[n]
u0[n]
x[n]
v0[n]
D
D
D
D
u1[n]
x[n – 1]
x[n – 2]
CDFT
x[n – 3]
Analysis
u2[n]
u3[n]
+
v1[n]
CIDFT
v2[n]
D
+
D
v3[n]
y[n]
+
Synthesis
CIDFT: Includes 1/M term (not in book!)
9/27
Synthesis Bank for Version #1 (cont.)
Sequence of DFT’s
u0[n]
u1[n]
u2[n]
u3[n]
CIDFT
After Delays, Sum Up to Get Output…
x[0] x[1] x[2] x[3] x[4] x[5] x[6]
x[1] x[2] x[3] x[4] x[5] x[6] x[7]
…
x[2] x[3] x[4] x[5] x[6] x[7] x[8]
x[3] x[4] x[5] x[6] x[7] x[8] x[9]
Mx[3]Mx[4] Mx[5] Mx[6] …
10/27
Problems with Version #1 Filter Bank
z Total sample rate out of analysis bank is M times
input
– This is redundant and is detrimental in applications like
data compression
– Fixed by decimating (Version #2 – #5)
z Frequency Response is Very Poor
– DTFT of Rectangular Window
– Thus, stopband attenuation is very bad and passband
falls off
– Fixed by using non-rectangular window (Versions #3 –
#5)
z Filters MUST have same length as number of
channels
– Fixed in Versions #4 & #5
• Use DSP trick in Version #4
• Use Polyphase Structure in Version #5
11/27
Version #2: Decimate Output
Q: Can we decimate each channel’s output and still be able to
get back the original signal after synthesis?
A: Yes… overlapping of the DFT windows is excessive!!!
x[n]
n=0
1
2
3
4
5
6
7
8
Signal
Blocks
CDFT
• Can Decimate
• Decimation Factor
Equals # Channels
9
Ti
m
e
u0[n] u1[n] u2[n] u3[n]
Frequency
12/27
Different View of Version #2
x[n]
↓M
D
D
↓M
CDFT
↓M
D
↓M
u0[n]
v0[n]
u1[n]
v1[n]
u2[n]
v2[n]
u3[n]
↑M
↑M
D
+
↑M
D
+
↑M
D
+
CIDFT
v3[n]
Analysis
y[n]
Synthesis
Delayed and
Decimated
Versions of
Input Signal
3 4 5 6 7 8
9 10 11 12 13 14 15 16
2 3 4 5 6 7
8 9 10 11 12 13 14 15
1 2 3 4 5 6
7 8
9 10 11 12 13 14
(Only indices shown)
0 1 2 3 4 5
6 7
8 9 10 11 12 13
Blocks
Into
CDFT
13/27
Different View of Version #2 (cont.)
x[n]
↓M
D
↓M
CDFT
D
↓M
D
↓M
u0[n]
v0[n]
u1[n]
v1[n]
u2[n]
v2[n]
u3[n]
↑M
↑M
D
+
↑M
D
+
↑M
D
+
CIDFT
v3[n]
Analysis
y[n]
Synthesis
Up-shifted
and Delayed
Versions of
CIDFT Output
0 0 0 3 0 0 0 7 0 0
(Only indices shown)
0 11 0 0 0 15
0
0 0 2 0 0 0 6 0 0 0 10
0 0 0 14
0
0
0 1 0 0 0 5 0 0 0 9
0
0 0 13 0
0
0
0 0 0 0 4 0 0 0 8 0
0
0 12 0 0
0 16
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16
14/27
Version #3: Non-Rectangular Window
n=0
1
2
3
4
5
6
7
8
9
x[n]
Must Have
Window Length
||
# of Channels
||
Decimation Factor
• Window w[n] must be
non-zero over block
• Otherwise, ICDFT
will give back a zero
signal value and can’t
reconstruct
• After ICDFT, undo
window by dividing
by window values
CDFT
CDFT
Ti
m
e
u0[n] u1[n] u2[n] u3[n]
Frequency
15/27
Different View of Version #3
x[n]
D
D
↓M
↓M
u0[n]
w0
w1
CDFT
↓M
w2
D
↓M
w3
v0[n]
u1[n]
v1[n]
u2[n]
v2[n]
1/w0
1/w1
↑M
D
+
↑M
D
+
↑M
D
+
CIDFT
1/w2
u3[n]
↑M
v3[n]
1/w3
y[n]
Synthesis
Analysis
Window
Values Can’t
Be Zero!!!!
16/27
Ver. #4: Arbitrary Size Wind., Sliding DFT
• Version #3 Has Severe Limitation:
– Window size is set by number of channels desired
– May force a short window (filter) size
– But… long filters are often needed to get desired frequency response
• To see how to remove this limitation, back to the Math View:
Recall Math View of Version #1
M-Pt. DFT
um [n ] =
M −1
im
x
[
n
−
i
]
W
∑
M
m = 0, 1, ... , M − 1
i =0
Math View of Version #3
um [n ] =
M −1
∑
x[nM − i ] w[i ] e j 2πmi / M
M-Pt. DFT
m = 0, 1, ... , M − 1
i =0
Window Length = M (# Channels)
Dec. Factor = M (Non-Overlapped Blocks)
17/27
Version #4 (cont.)
Math View of Version #4
um [n ] =
L −1
− j 2πmi / M
x
[
nD
−
i
]
w
[
i
]
e
∑
m = 0, 1, ... , M − 1
NOT a DFT!!
(L-pt sum but..
M Freq. Pts)
i =0
D = Dec. Factor M = # Channels
L = Window Length
D≤M<L
n=0
1
2
3
4
5
6
7
8
9
x[n]
DFT
DFT
u0[n] u1[n] u2[n] u3[n]
18/27
If it is NOT a DFT, What IS it??!!
For each m = 0, 1, …, M–1
Complex Sinusoid w/
Frequency of 2πm/M
L Points
e –j2πmi/M
i
w[i]x[nD – i]
×
i
One Windowed
Signal Block
For Each n Value
Do for Each
m = 0, 1, …, M–1
To Get The Channels
Σ
OK, … But How To Compute This Efficiently ??!!
19/27
Here is How To Compute This Non-DFT Efficiently !!
A DSP TRICK!!!!
L Points
e
Must have
L = kM
w/ k Integer
–j2πnk/M
M Points
n
Same Inside Each
M-Point Block!!!
xw[n]
+
Σ
This IS an M-pt. DFT
… of the Sum of Blocks!!
n
+
+
Analogy: Arithmetic Distribution
a×d + b×d + c×d = (a + b + c)×d
20/27
Version #4: Summary
• Design of Filter Bank
Called “Overlap & Add
DFT-Based Filter Bank”
See copied
pages posted
on Blackboard
– Assume that # of Channels, M, has been specified
f Usually pick M as power of two to allow use of FFT
– Choose Window Shape and Window Length, L, to give desired
passband and stopband characteristics
f To enable good filter, pick L > M; also pick L as (integer)×M
– Choose Decimation Factor, D, as large as possible (D ≤ M) without
generating excessive inter-band aliasing
• Algorithm Implementation
–
–
–
–
Apply L-pt window to current signal block
Break windowed L-pt block into M-pt sub-blocks
Add all the M-pt sub-blocks together to get a single M-pt block
Compute the M-pt DFT (using FFT algorithm)
f Each DFT coefficient is the current output of a channel
– Move the L-pt window ahead D points
For Synthesis: Crochiere & Rabiner, Multirate Digital Signal Processing, Prentice Hall, 1983.
21/27
Ver. #5: Arb. Size Wind., Polyphase, DFT
Recall Math View of Version #4
u m [n ] =
L −1
j 2πmi / M
x
[
nM
−
i
]
g
[
i
]
e
, m = 0, 1, ... , M − 1
∑
0
i =0
Δ
g m [i ]
=
Minor Changes
w[n] → g0[n]
D→M
= {x * g m }( ↓ M ) [n ]
View: Each channel of FB consists of filter gm[n] that is a
frequency-shifted version of a prototype lowpass filter g0[n].
(All the uniform FBs we’ve looked at can be viewed this way.)
In the Frequency & Z Domains this is:
2πmn / M
g m [n ] = g 0 [n ] ej
Frequency
Shift
↔
Gmf (θ ) = G0f (θ − 2πm / M )
↔
Gmz ( z ) = G0z ( z WM− m )
WMmn
22/27
Ver. #5: Development
Approach:
1. Write the prototype LPF in its polyphase terms
2. Modulate result to get the channel filters
3. Use result to write pre-decimation channel output
4. Write post-decimation channel output
Step #2
Step #1
G0z ( z ) =
Gmz ( z ) = G0z ( zWM− m )
M −1
−i z M
z
∑ Pi ( z )
i =0
=
U
=
=
∑
i =0
WMim Piz ( z M
−i
=1
M −1
∑WMim z −i Piz ( z M )
i =0
U mz ( z ) = Gmz ( z ) X z ( z )
M −1
− mM
)
∑ ( zWM−m ) −i Piz ( z M WM
i =0
Step #3
U mz ( z )
M −1
z
) z X ( z)
view as input
apply decimation identity
Filter then Dec
Step #4
{
}
U mz ( z ) ( ↓ M )
=
M −1
{
}
−i z
im z
W
P
(
z
)
z
X ( z ) (↓ M )
∑ M i
i =0
Dec then Filter
23/27
Ver. #5: Interpret
U mz ( z ) =
M −1
{
}
im z
−i z
W
P
(
z
)
z
X ( z ) (↓M )
∑ M i
i =0
Delay by i
Decimate by M
Filter w/ ith Polyphase Filter
M-pt CDFT over Polyphase Branches
x[n]
D
D
↓M
P0z ( z )
↓M
P1z ( z )
u0[n]
u1[n]
CDFT
↓M
P2z ( z )
D
↓M
P3z ( z )
u2[n]
u3[n]
24/27
Ver. #5: Synthesis
x[n]
D
D
↓M
↓M
u0[n]
P0z ( z )
P1z ( z )
CDFT
↓M
P2z ( z )
↓M
P3z ( z )
D
v0[n]
u1[n]
v1[n]
u2[n]
v2[n]
u3[n]
v3[n]
Q0z ( z )
Q1z ( z )
↑M
↑M
D
+
↑M
D
+
↑M
D
+
CIDFT
Q2z ( z )
Q3z ( z )
y[n]
Cancel Each Other
Î Like Pi(z) connects to Qi(z)
Y ( z) =
z
∑ {{z
M −1
i =0
−i
}
}
X z ( z ) ( ↓ M ) Piz ( z ) Qiz ( z )
(↑M )
z −( M −1−i )
25/27
Ver. #5: Synthesis – Does it Work?
Here’s where we were on the last slide:
Y ( z) =
z
∑ {{z
M −1
−i
i =0
}
}
X z ( z ) ( ↓ M ) Piz ( z ) Qiz ( z )
(↑M )
z −( M −1−i )
Use Z-Domain result for ↓M operation:
Y ( z) =
z
M −1 ⎧
∑
i =0
⎪
⎨
⎪⎩
⎡1
⎢
⎢⎣ M
M −1
∑(z
m =0
1/ M
⎤
⎫
⎥⎦
⎪⎭( ↑ M )
⎪
WM− m ) −i X z ( z1 / M WM− m )⎥ Piz ( z ) Qiz ( z ) ⎬
z −( M −1−i )
Use Z-Domain result for ↑M operation:
Y ( z) =
z
M −1
∑
i =0
=z
⎡1
⎢
⎢⎣ M
−( M −1)
M −1
⎤
∑
( zWM− m ) −i X z ( zWM− m )⎥ Piz ( z M
⎥⎦
m =0
M −1
∑X
m =0
z
( zWM− m )
) Qiz ( z M ) z −( M −1−i )
⎡ 1 M −1 im z M z M ⎤
WM Pi ( z ) Qi ( z )⎥
⎢
∑
⎢⎣ M i =0
⎥
⎦
Requirement
for Perfect
Reconstruction
Want = cz − lδ [ m ]
... to get this = cz − l X z ( z )
This gives " Perfect Reconstruction"
26/27
Ver. #5: Perfect Recon Criteria
Look at what we saw on the last slide:
1 M −1 im z M z M
WM Pi ( z ) Qi ( z ) = cz −l δ [m]
∑
M 0
i =
IDFT of Piz ( z M ) Qiz ( z M )
Taking DFT of each side gives an Equivalent PR Criteria:
Piz ( z M ) Qiz ( z M ) = cz − l , 0 ≤ i ≤ M − 1
• General Filter Designs to Meet This are HARD!!!
(We Won’t Cover It)
– Special Cases:
f Version #2 is….
f Version #3 is….
Pi(z) = Qi(z) = 1, 0 ≤ i ≤ M–1
Pi(z) = w[i] & Qi(z) = 1/ w[i], 0 ≤ i ≤ M–1
27/27
Download