1
DSP
Chapter-9 : Filter Bank Design
Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven
[email protected] www.esat.kuleuven.be/stadius/
DSP 2016 / Chapter-9: Filter Bank Design 2 / 32
Filter Bank Preliminaries • Filter Bank Set-Up • Filter Bank Applications • Ideal Filter Bank Operation • Non-Ideal Filter Banks: Perfect Reconstruction Theory
Filter Bank Design • Non-Ideal Filter Banks: Perfect Reconstruction Theory
(continued) • Filter Bank Design Problem Statement • General Perfect Reconstruction Filter Bank Design • DFT-Modulated Filter Banks
Chapter-8
Chapter-9
Part-IV : Filter Banks & Subband Systems
2
DSP 2016 / Chapter-9: Filter Bank Design 3 / 32
G0(z) G1(z) G2(z) G3(z)
+ OUT
subband processing 3 H0(z) subband processing 3 H1(z) subband processing 3 H2(z)
3 3 3 3 subband processing 3 H3(z)
IN
N=4 D=3
Filter Bank Set-Up
So this is the picture to keep in mind...
synthesis bank (synthesis & interpolation)
upsampling/expansion
downsampling/decimation
analysis bank (analysis & anti-aliasing)
DSP 2016 / Chapter-9: Filter Bank Design 4 / 32
Perfect Reconstruction Theory (continued)
A simpler analysis results from a polyphase description : n-th row of E(z) has N-fold (=D-fold)
polyphase components of Hn(z) n-th column of R(z) has N-fold polyphase components of Fn(z)
4 4 4 4
+ u[k-3] 1−z
2−z
3−z
1
1−z2−z3−z
1u[k] 4
4 4
4 E(z4 ) )( 4zR
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−−−−
−
−)1(
1|10|1
1|00|0
1
0
:1
.
)(
)(...)(::
)(...)(
)(:)(
NNNN
NN
NN
N
N z
Nz
zEzE
zEzE
zH
zH!!!!! "!!!!! #$ E
!!!!! "!!!!! #$ )(
)(...)(::
)(...)(.
1:
)(:)(
1|11|0
0|10|0)1(
1
0
Nz
zRzR
zRzRz
zF
zF
NNN
NN
NN
NTNT
N
R
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−−
−−−
−
Do not continue until you understand how formulae correspond to block scheme!
D = N
N-by-N N-by-N
D=N=4
3
DSP 2016 / Chapter-9: Filter Bank Design 5 / 32
Perfect Reconstruction Theory
• With the `noble identities’, this is equivalent to: Necessary & sufficient conditions for i) alias cancellation ii) perfect reconstruction are then derived, based on the product
4 4 4 4
+ u[k-3] 1−z
2−z
3−z
1
1−z2−z3−z
1u[k] 4
4 4
4 )(zE )(zR
)().( zz ER
D=N=4
DSP 2016 / Chapter-9: Filter Bank Design 6 / 32
Perfect Reconstruction Theory
Necessary & sufficient condition for PR is then (proof omitted)…
In is nxn identity matrix, r is arbitrary Example (r=0) : for conciseness, will use this from now on !
4 4 4 4
+ u[k-3] 1−z
2−z
3−z
1
1−z2−z3−z
1u[k] 4
4 4
4 )(zE )(zR
10 ,0.
0)().( 1 −≤≤⎥
⎦
⎤⎢⎣
⎡=
−−−
−
NrIz
Izzz
r
rNδ
δ
ER
NIzzz δ−=)().( ER
Beautifully simple!!
D=N=4
4
DSP 2016 / Chapter-9: Filter Bank Design 7 / 32
Perfect Reconstruction Theory
A similar PR condition can be derived for oversampled FBs The polyphase description (compare to p.34) is then…
n-th row of E(z) has D-fold polyphase components of Hn(z)
n-th column of R(z) has D-fold polyphase components of Fn(z)
H0 (z):
HN−1(z)
"
#
$$$$
%
&
''''
=
E0|0 (zD ) ... E0|D−1(z
D ): :
EN−1|0 (zD ) ... EN−1|D−1(z
D )
"
#
$$$$
%
&
''''
E(zD )! "##### $#####
.1:
z−(D−1)
"
#
$$$
%
&
'''
F0 (z):
FN−1(z)
"
#
$$$$
%
&
''''
T
=z−(D−1)
:1
"
#
$$$
%
&
'''
T
.R0|0 (z
D ) ... RN−1|0 (zD )
: :R0|D−1(z
D ) ... RN−1|D−1(zD )
"
#
$$$$
%
&
''''
R(zD )! "##### $#####
Note that E is an N-by-D (‘tall-thin’) matrix, R is a D-by-N (‘short-fat’) matrix !
D < N
1−z2−z3−z
1u[k]
4 4 4 4
4 4 4
4
E(z4 ) + u[k-3]
1−z
2−z
3−z
1
R(z4 )4 4
4 4
N-by-D D-by-N
D=4 N=6
DSP 2016 / Chapter-9: Filter Bank Design 8 / 32
Perfect Reconstruction Theory
Simplified (cfr. r=0 on p.6) condition for PR is then… In the D=N case (p.6), the PR condition has a product of square matrices. PR-FB design will then involve matrix inversion, which is mostly problematic.
In the D<N case, the PR condition has a product of a ‘short-fat’ matrix and a ‘tall-thin’ matrix. This will lead to additional PR-FB design flexibility.
R(z).E(z) = z−δID
Again beautifully simple!!
DxD DxN
NxD
1−z2−z3−z
1u[k]
4 4 4 4
4 4 4
4
E(z4 ) + u[k-3]
1−z
2−z
3−z
1
R(z4 )4 4
4 4
N-by-D D-by-N
D=4 N=6
5
DSP 2016 / Chapter-9: Filter Bank Design 9 / 32
Filter Bank Design Problem Statement
Two design targets :
✪ Filter specifications, e.g. stopband attenuation, passband ripple, transition band, etc. (for each (analysis) filter!)
✪ Perfect reconstruction (PR) property.
Challenge will be in addressing two design targets at once (e.g. ‘PR only’ (without filter specs) is easy, see ex. Chapter-8)
PS: Can also do ‘Near-Perfect Reconstruction Filter Bank Design’, i.e. optimize filter specifications and at the same time minimize aliasing/distortion (=numerical optimization). Not covered here…
DSP 2016 / Chapter-9: Filter Bank Design 10 / 32
(= N-by-N matrices) • Design Procedure: 1. Design all analysis filters (see Part-II). 2. This determines E(z) (=polyphase matrix). 3. Assuming E(z) can be inverted (?), synthesis filters are (delta to make synthesis causal, see ex. p.7) • Will consider only FIR analysis filters, leading to simple polyphase
decompositions (see Chapter-2) • However, FIR E(z) then generally leads to IIR R(z), where stability is a
concern…
)(.)( 1 zzz −−= ER δ
NIzzz δ−=)().( ER
General PR-FB Design: Maximum Decimation (D=N)
6
DSP 2016 / Chapter-9: Filter Bank Design 11 / 32
General PR-FB Design: Maximum Decimation (D=N)
PS: Inversion of matrix transfer functions ?… – The inverse of a scalar (i.e. 1-by-1 matrix) FIR transfer function is
always IIR (except for contrived examples)
– …but the inverse of an N-by-N (N>1) FIR transfer function can be FIR
PS: Compare this to inversion of integers and integer matrices …but…
1))(det(212
2)()(
2221
)( 21
1
1
1
12
=
⎥⎥⎦
⎤
⎢⎢⎣
⎡
+−
−==⇒
⎥⎥
⎦
⎤
⎢⎢
⎣
⎡ += −−
−
−
−
−−
z
zzz
zzz
zzz
E
ERE
)2(1)()()2()( 1
11−
−−
−==⇒−=
zzzzz ERE
212 1 ==⇒= −ERE
1)det(5465
5465 1
=
⎥⎦
⎤⎢⎣
⎡
−
−==⇒⎥
⎦
⎤⎢⎣
⎡= −
E
ERE
DSP 2016 / Chapter-9: Filter Bank Design 12 / 32
Question: Can we build FIR E(z)’s (N-by-N)
that have an FIR inverse? Answer: YES, `unimodular’ E(z)’s, i.e. matrices with determinant=constant*zd e.g.
where the El’s are constant (= not a function of z) invertible matrices Design Procedure: Optimize El’s to meet filter specs (ripple, etc.) for all analysis filters (at once)
E(z) = EL.IN−1 0
0 z−1
"
#$$
%
&''.EL−1.
IN−1 0
0 z−1
"
#$$
%
&''...E1.
IN−1 0
0 z−1
"
#$$
%
&''.E0
R(z) = E0−1. z−1.IN−1 0
0 1
"
#$$
%
&''.E1
−1... z−1.IN−1 00 1
"
#$$
%
&''.EL−1
−1 . z−1.IN−1 00 1
"
#$$
%
&''.EL
−1
⇒ R(z).E(z) = z−L.IN
= not-so-easy but DOABLE !
General PR-FB Design: Maximum Decimation (D=N)
all E(z)’s
FIR E(z)’s
FIR unimodular E(z)’s
7
DSP 2016 / Chapter-9: Filter Bank Design 13 / 32
• Design Procedure: 1. Design all analysis filters (see Part-II). 2. This determines E(z) (=polyphase matrix). 3. Find R(z) such that PR condition is satisfied (how? read on…)
• Will consider only FIR analysis filters, leading to simple polyphase decompositions (see Chapter-2)
• It will turn out that when D<N an FIR R(z) can always be found (except in contrived cases)…
R(z).E(z) = z−δID
General PR-FB Design: Oversampled FBs (D<N)
DxD DxN
NxD
= easy if step-3 is doable…
DSP 2016 / Chapter-9: Filter Bank Design 14 / 32
• Given E(z) how can R(z) be computed?
– Assume every entry in E(z) is LE-th order FIR (i.e. LE +1 coefficients) – Assume every entry in R(z) is LR-th order FIR (i.e. LR +1 coefficients) – Hence number of unknown coefficients in R(z) is D.N.(LR +1) – Every entry in R(z).E(z) is (LE+LR)-th order FIR (i.e. LE+LR+1
coefficients) (cfr. polynomial multiplication / linear convolution) – Hence PR condition is equivalent to D.D.(LE+LR+1) linear equations
in the unknown coefficients (*) – Can be solved (except in contrived cases) if è
(*) Try to write down these equations!
R(z).E(z) = z−δID
General PR-FB Design: Oversampled FBs (D<N)
DxD DxN
NxD
D.N.(LR +1) ≥ D.D.(LE + LR +1)
LR ≥D
(N −D)LE −1
8
DSP 2016 / Chapter-9: Filter Bank Design 15 / 32
• Given E(z) how can R(z) be computed?
– (continued) …
– Can be solved (except in contrived cases) if è – If D<N, then LR can be made sufficiently large so that the
(underdetermined) set of equations can be solved, i.e. an R(z) can be found (!).
– Note that if D=N, then LR in general has to be infinitely large, i.e. R(z) in general has to be IIR
R(z).E(z) = z−δID
General PR-FB Design: Oversampled FBs (D<N)
DxD DxN
NxD
D.N.(LR +1) ≥ D.D.(LE + LR +1)
LR ≥D
(N −D)LE −1
DSP 2016 / Chapter-9: Filter Bank Design 16 / 32
DFT-Modulated FBs
- All design procedures so far involve monitoring of characteristics (passband ripple, stopband suppression,…) of all (analysis) filters, which may be tedious.
- Design complexity may be reduced through usage of `uniform’ and `modulated‘ filter banks.
• DFT-modulated FBs (read on..) • Cosine-modulated FBs (not covered, but interesting design!)
- Will consider - Maximally decimated DFT-modulated FBs - Oversampled DFT-modulated FBs
9
DSP 2016 / Chapter-9: Filter Bank Design 17 / 32
Uniform versus non-uniform (analysis) filter bank: • N-channel uniform FB:
i.e. frequency responses are uniformly shifted over the unit circle Ho(z)= `prototype’ filter (=one and only filter that has to be designed)
Time domain equivalent is: • Non-uniform = everything that is not uniform e.g. for speech & audio applications (cfr. human hearing)
H0(z) H1(z) H2(z) H3(z)
IN H0 H3 H2 H1
H0 H3 H2 H1 uniform
non-uniform
Hn (z) = H0 (z.e− j2πn/N ) n = 0,...,N −1
hn[k]= h0[k].ej2πk.n/N
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
DSP 2016 / Chapter-9: Filter Bank Design 18 / 32
Uniform filter banks can be realized cheaply based on polyphase decompositions + DFT(FFT) (hence name `DFT-modulated FB)
1. Analysis FB
If (N-fold polyphase decomposition)
then
H0 (z),H1(z),...,HN−1(z) with Hn (z) = H0 (z.e− j2πn/N )
Hn (z) = H0 (z.e− j2πn/N ) = z−n .e j2πnn /N .En (zN e− j2πnN /N
1 )
n=0
N−1
∑
= z−n .W −nn .En (zN )n=0
N−1
∑ , with W = e− j2π /N
H0 (z) = z−n .En (zN )n=0
N−1
∑
i.e.
H0(z) H1(z) H2(z) H3(z)
u[k]
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
10
DSP 2016 / Chapter-9: Filter Bank Design 19 / 32
where F is NxN DFT-matrix
This means that filtering with the Hn’s can be implemented by first filtering with the polyphase components and then applying an inverse DFT
PS: To simplify formulas the factor N in N.F-1 will be left out from now on (i.e. absorbed in the polyphase components)
H0 (z)H1(z)H2 (z)
:HN−1(z)
"
#
$$$$$$$
%
&
'''''''
.U(z) =
W 0 W 0 W 0 ... W 0
W 0 W −1 W −2 ... W −(N−1)
W 0 W −2 W −4 ... W −2(N−1)
: : : :W 0 W −(N−1) W −2(N−1) ... W −(N−1)2
"
#
$$$$$$$
%
&
'''''''
N.F−1! "####### $#######
.
E0 (zN )
z−1.E1(zN )
z−2.E2 (zN ):
z−N+1.EN−1(zN )
"
#
$$$$$$$$
%
&
''''''''
.U(z)
W = e− j2π /N
Maximally Decimated DFT-Modulated FBs (D=N)
i.e.
DSP 2016 / Chapter-9: Filter Bank Design 20 / 32
Conclusion: economy in… – Implementation complexity (for FIR filters): N filters for the price of 1, plus inverse DFT (=FFT) ! – Design complexity: Design `prototype’ Ho(z), then other Hn(z)’s are
automatically `co-designed’ (same passband ripple, etc…) !
i.e.
F−1
u[k] Δ
Δ
Δ
)( 40 zE
)( 41 zE
)( 42 zE
)( 43 zE
)(0 zH
)(1 zH
)(2 zH
)(3 zH
E(z4 )Maximally Decimated DFT-Modulated FBs (D=N)
N=4
11
DSP 2016 / Chapter-9: Filter Bank Design 21 / 32
• Special case: DFT-filter bank, if all En(z)=1
F−1
u[k] Δ
Δ
Δ
1 )(0 zH
)(1 zH
)(2 zH
)(3 zH
111
Ho(z) H1(z)
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
DSP 2016 / Chapter-9: Filter Bank Design 22 / 32
• DFT-modulated analysis FB + maximal decimation
F−1 444
4u[k]
Δ
Δ
Δ
)( 40 zE
)( 41 zE
)( 42 zE
)( 43 zE
444
4u[k]
Δ
Δ
Δ
F−1
)(0 zE
)(1 zE
)(2 zE
)(3 zE
= = efficient realization !
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
12
DSP 2016 / Chapter-9: Filter Bank Design 23 / 32
2. Synthesis FB
F0 (z),F1(z),...,FN−1(z) with Fn (z) = ej2πn/N .F0 (z.e− j2πn/N )
F0 (z) = z−n .Rn (zN )n=0
N−1
∑ Fn (z) = ... = z−n .Wn(N−1−n ).Rn (zN )n=0
N−1
∑
+
+
+
)(0 zF][0 ku
)(1 zF][1 ku
)(2 zF][2 ku
)(3 zF][3 ku y[k]
phase shift added for convenience
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
DSP 2016 / Chapter-9: Filter Bank Design 24 / 32
Similarly simple derivation then leads to…
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
y[k]
Δ
+ Δ
+ Δ
+ )( 40 zR
)( 41 zR
)( 42 zR
)( 43 zR][0 ku
][1 ku
][2 ku
][3 ku
F
R(z4 )
13
DSP 2016 / Chapter-9: Filter Bank Design 25 / 32
• Expansion + DFT-modulated synthesis FB :
y[k]
][0 ku
][1 ku
][2 ku
][3 ku
4444
Δ
+ Δ
+ Δ
+ )(0 zR
)(1 zR
)(2 zR
)(3 zR
Fy[k]
Δ
+ Δ
+ Δ
+
4444 )( 4
0 zR
)( 41 zR
)( 42 zR
)( 43 zR][0 ku
][1 ku
][2 ku
][3 ku
F
= = efficient realization !
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
DSP 2016 / Chapter-9: Filter Bank Design 26 / 32
How to achieve Perfect Reconstruction (PR) with maximally decimated DFT-modulated FBs?
Polyphase components of synthesis bank prototype filter are obtained by inverting polyphase components of analysis bank prototype filter
y[k]
4444
Δ
+ Δ
+ Δ
+ )(0 zR
)(1 zR
)(2 zR
)(3 zR
F444
4u[k] Δ
Δ
Δ
F−1)(0 zE
)(1 zE
)(2 zE
)(3 zE
Rn (z) = z−δ.EN−1−n
−1 (z)
E(z) = F−1.diag En (z)[ ] ⇒ R(z) = z−δ.E−1(z) = z−δ.diag En−1(z)#$ %&.FNIzzz δ−=)().( ER
Maximally Decimated DFT-Modulated FBs (D=N)
N=4
14
DSP 2016 / Chapter-9: Filter Bank Design 27 / 32
• Design Procedure: 1. Design prototype analysis filter Ho(z) (see Part-II). 2. This determines En(z) (=polyphase components). 3. Assuming all En(z)’s can be inverted (?), choose synthesis filters • Will consider only FIR prototype analysis filter, leading to simple
polyphase decomposition (Chapter-2). • However, FIR En(z)’s generally again lead to IIR Rn(z)’s, where stability
is a concern…
Rn (z) = z−δ.EN−1−n
−1 (z)
Maximally Decimated DFT-Modulated FBs (D=N)
y[k]
4444
Δ
+ Δ
+ Δ
+ )(0 zR
)(1 zR
)(2 zR
)(3 zR
F444
4u[k] Δ
Δ
Δ
)(0 zE
)(1 zE
)(2 zE
)(3 zE
F−1
N=4
DSP 2016 / Chapter-9: Filter Bank Design 28 / 32
This does not leave much design freedom… • FIR E(Z)? ..such that Rn(z) are also FIR
Only obtained when each En(z) is ‘unimodular’, i.e. En(z)=constant.zd
Simple example is , where wn’s are constants, which leads to `windowed’ IDFT/DFT bank,
a.k.a. `short-time Fourier transform’ (see Chapter-14)
Maximally Decimated DFT-Modulated FBs (D=N)
En (z) = wn ⇒ RN−1−n (z) = wn−1
all E(z)’s
FIR E(z)’s
FIR unimodular E(z)’s
E(z)=F-1.diag{..}
L
15
DSP 2016 / Chapter-9: Filter Bank Design 29 / 32
• Bad news: Not much design freedom for maximally decimated DFT-modulated FB’s…
• Good news: More design freedom with...
– Cosine-modulated FB’s
– Oversampled DFT-modulated FB’s
Maximally Decimated DFT-Modulated FBs (D=N)
L
DSP 2016 / Chapter-9: Filter Bank Design 30 / 32
• Procedure: Po(z) = prototype lowpass filter, cutoff at for N filters Then...
etc.. PS: Real-valued filter coefficients here!
• Details: See literature… • Maximally decimated & oversampled FB designs • Design software available (e.g.Matlab)
Cosine Modulated FBs
N2/π±
).(.).(.)()5.0(
0*0
)5.0(
000N
jN
jezPezPzH
ππ
αα+−
+=
P0
π2
π2
π2
N2/π
N/πH1
Ho ).(.).(.)(
)5.01(
0*1
)5.01(
011N
jN
jezPezPzH
ππ
αα++−
+=
16
DSP 2016 / Chapter-9: Filter Bank Design 31 / 32
• In maximally decimated DFT-modulated FB, we had (N-by-N matrices)
• In oversampled DFT-modulated FB, will have with B(z) (tall-thin) and C(z) (short-fat) structured/sparse matrices
constructed with poyphase components of prototype filters
Oversampled DFT-Modulated FBs (D<N)
1−z2−z3−z
1u[k]
4 4 4 4
4 4 4
4
E(z4 ) + u[k-3]
1−z
2−z
3−z
1
R(z4 )4 4
4 4
N-by-D D-by-N
D=4 N=6
E(z) = F−1.diag En (z)[ ]
E(z)N-by-D!
= F−1
N-by-N!.B(z)N-by-D!
R(z) = diag RN−1−n (z)[ ].F
R(z)D-by-N!
=C(z)D-by-N!
.FN-by-N!
DSP 2016 / Chapter-9: Filter Bank Design 32 / 32
• Details: see literature
• Design Examples: http://homes.esat.kuleuven.be/~dspuser/DSP-CIS/2016-2017/material.html
• Design software available (e.g.Matlab)
Oversampled DFT-Modulated FBs (D<N)
1−z2−z3−z
1u[k]
4 4 4 4
4 4 4
4
E(z4 ) + u[k-3]
1−z
2−z
3−z
1
R(z4 )4 4
4 4
N-by-D D-by-N
D=4 N=6