Professional Documents
Culture Documents
14 Subband Coding
Perfect Reconstruction Filterbanks
x[n ] = cx[n no ]
X ( z ) = cX ( z ) z no
Pass-Band Issues
Magnitude: For non-ideal filters the passbands are not perfectly flat and
will change the shape of the signals DTFT magnitude in the passband.
Phase: Because PR allows a delay and a delay corresponds to a linear
phase response (as a function of frequency) it seems natural to focus on
linear phase filters which puts our focus on FIR Filters.
Our Goal: Choose filters such that the aliasing & imaging
errors cancel out!!! (Fixes the stop-band issues)
Then make what is left combine to give the desired
composite passband to achieve the PR condition.
Start at input & work toward the output using z-transform methods:
Top Channel (Bottom Channel Similar):
Y1 ( z ) = H i ( z ) X ( z )
Filter
1
1
12
W1 ( z ) = Y1 ( z ) + Y1 ( z1 2 )
2
2
=
Down Sampling
1
H1 ( z1 2 ) X ( z1 2 ) + H1 ( z1 2 ) X ( z1 2 )
2
5
V1 ( z ) = W1 ( z 2 )
=
Up Sampling
1
[ H1 ( z ) X ( z ) + H1 ( z ) X ( z )]
2
U1 ( z ) = K1 ( z )V1 ( z )
Filter
1
= K1 ( z ) [ H1 ( z ) X ( z ) + H1 ( z ) X ( z )]
2
Now the output of the whole structure is:
X ( z ) = U1 ( z ) + U 2 ( z )
Summation
6
Substitute results for Ui(z) & Group X(z) terms & group X(-z) terms
1
1
X ( z ) = [ H1 ( z ) K1 ( z ) + H 2 ( z ) K 2 ( z ) ] X ( z ) + [ H1 ( z ) K1 ( z ) + H 2 ( z ) K 2 ( z )] X ( z )
2
2
= T ( z)
= S ( z)
X ( z ) = T ( z ) X ( z ) + S ( z ) X ( z )
Aliasing Term
Dont Want It!
j
X ( z ) = X (e z )
e j z
DTFT : z = e
z =e
Aliasing
X DTFT ( + )
= e j ( + )
H1 ( z ) K1 ( z ) + H 2 ( z ) K 2 ( z ) = 0
Can cancel aliasing term by choosing:
K1 ( z ) = H 2 ( z ) &
K 2 ( z ) = H1 ( z )
K1 () = H 2 ( + )
K 2 ( ) = H 1 ( + )
&
ACC
Aliasing
Cancellation
Condition
Doesnt constrain the filters but constrains the relationship between the Ks and Hs
Note: Since.
H1(z) is lowpass
&
H2(z) is highpass
we have:
K1(z) is lowpass
&
K2(z) is highpass.
K1() = H2( + )
H2()
- -/2
/2
K1() = H2( + )
- -/2
/2
K2() = H2( + )
1
[ H1 ( z ) H 2 ( z ) H1 ( z ) H 2 ( z )] X ( z )
2
[ H1 ( z ) H 2 ( z ) H1 ( z ) H 2 ( z )] = Cz n
Note:
()
Comment: For compression we not only want to cancel aliasing but we often
need to minimize it in each channel which requires all filters to have sharp
transition bands and low stop bands
Why do we need this? Because in compression we often throw away some
subbands (those having small energy) and that upsets the balance used to
cancel aliasing!
10
z z = e j = e j e j
= e j
H 2 ( z ) = H1 ( z )
QMF Condition
H 2 ( ) = H1 ( )
Note: Once H1(z) is designed then the QMF condition nails down H2(z) and
remember that K1(z) & K2(z) are also nailed down by the ACC
So enforcing QMF & ACC reduces the design problem to only designing H1(z)
11
QMF Facts
1.
2.
QMFs can only achieve PR if the h1[n] and h2[n] each have only 2 nonzero taps
E.g., h1[n] = [ 1 1]
3.
or
h1[n] = [ 1 0 1] or
h1[n] = [ 1 0 0 1] etc.
If H1(z) has linear phase then T(z) the analysis/synthesis total transfer
function also has linear phase.
Linear
Phase
T ( z ) = Cz no
T () = Ce jno
So for QMF (w/ # taps > 2) we cant get the amplitude part of PR:
jno
T () = C
(
)
e
N
Amplitude
Distortion
real-valued
& 0
Not PR!
Linear
Phase
12
K1 ( z ) = H 2 ( z ) &
K 2 ( z ) = H1 ( z )
ACC
1
T ( z ) = [ H1 ( z ) H 2 ( z ) H1 ( z ) H 2 ( z )]
2
2.
T () = C ()e jno
3.
H 2 ( z ) = H1 ( z )
QMF
1
2
2
T ( z ) = [ H1 ( z )] [ H1 ( z )]
2
T(z) now
depends only
on H1(z)!!
13
4.
See book
Numerical
Recipes in
C for details
on numerical
minimization
methods
J (h1 ) =
Vector of
Filter taps
4.
H1 ( ) d + (1 ) 1 T ( ) d
Stop-Band
Energy
H 2 ( z ) = H1 ( z )
QMF
K1 ( z ) = H 2 ( z ) = H1 ( z )
K 2 ( z ) = H1 ( z )
ACC
14
K1 ( z ) = H 2 ( z ) &
K 2 ( z ) = H1 ( z )
ACC
T ( z) =
1
[ H1 ( z ) H 2 ( z ) H1 ( z ) H 2 ( z )]
2
Error in Book
H 2 ( z ) = ( z ) N H1 ( z 1 )
CMF Z-D
h2 [n ] = ( 1) n h1 ( N n )
CMF T-D
h1[n ] :
h1[0]
h1[1]
h1 [2]
h2 [n ] : h1[ N ] h1[ N 1]
"
"
h1 [ N ]
h1[1] h1[0]
1 N
T ( z ) = z H1 ( z ) H1 ( z 1 ) + H1 ( z ) H1 ( z 1 )
2
= R( z )
=
1 N
z [ R( z ) + R( z )]
2
Want = constant for PR
16
R ( z ) [n ] = h1[n ]* h1 [ n ]
Note:
= h1 [k ]h1 [k + n ]
k =0
Cancel
Cancel
Cancel
n = 2,4,..., N 1
[n ] ( z n + z n )
C , n = 0
[n ] = 0, n even, n 0
Time-Domain
Requirement
for PR
18
=C
Dummy
Variable
F { [2n ]} =
= 2
(A)
1
2
R ( 2 ) + R (
2 )
2
1
R ( ) + R ( )
2
(B)
R () = H 1 ()
From (A) (C) we get:
(C)
2
H 1 () + H 1 ( ) = C
Freq-Domain
Requirement
for PR
19
|H1( )|2
|H1( )|2
|H1()|2
-/2
/2
20
21
22
K1(z)
2
K2(z)
K2(z)
x[n ]
K1(z)
2
K2(z)
K2(z)
23
z-k
K2(z)
x[n ]
z-k
K2(z)
What do the various channels in a cascaded analysis filter bank look like?
Can be shown that each channel has transfer function that looks like this (for
the 3-stage case):
H channel ( z ) = H i ( z ) H j ( z 2 ) H k ( z 4 )
1 or 2
(1st Stage)
Hchannel(z)
1 or 2
(2nd Stage)
1 or 2
(3rd Stage)
23
Book has
error uses
product
here instead
of add
25
Bit Allocation
Same ideas as for Bit Allocation for TC.
Each subband has its own quantizer and you want to allocate bits to
the quantizers
26