Course 18.327 and 1.130 Wavelets and Filter Banks

advertisement
Course 18.327 and 1.130
Wavelets and Filter Banks
Modulation and Polyphase
Representations:
Noble Identities;
Block Toeplitz Matrices
and Block z-transforms;
Polyphase Examples
Modulation Matrix
Matrix form of PR conditions:
[F0 (z) F1 (z)] H0(z) H0(-z)
= [ 2z –l 0 ]
H1(z) H1(-z)
123
Modulation matrix, Hm(z)
So
[ F0(z) F1(z)] = [2z –l 0] Hm –1(z)
Hm–1(z) = 1?
H1(-z) -H0(-z)
-H1(z) H0(z)
? = H0(z) H1(-z) - H0 (-z) H1 (z) (must be non-zero)
2
1
2z-l H0(-z)
F1(z) = ?
678
1
2z-l H1(-z)
⇒ F0(z) =
?
Require these
to be FIR
Suppose we choose ? = 2z - l
Then
F1(z) = -H0(-z)
678
F0(z) = H1(-z)
3
Synthesis modulation matrix:
Complete the second row of matrix PR conditions
by replacing z with –z:
F0(z) F1(z)
H0(z)
z -l
H0(-z)
0
= 2
123
F0(-z) F1(-z)
H1(z)
H1(-z)
0
(-z) - l
Synthesis
modulation
matrix, Fm(z)
Note the transpose convention in Fm(z).
4
Noble Identities
1. Consider
x [n]
H(z2)
u[n]
↓2
y[n]
U(z) = H(z2)X(z)
Y(z) = ½ {U(z ½ ) + U( -z ½ )}
(downsampling)
= ½ { H (z) X (z ½ ) + H(z) X (-z½ )}
= H(z) • ½ {X (z ½) + X (-z ½ )} ⇒ can downsample
first
First Noble identity:
x [n]
y[n] x[n]
y[n]
2
≡
H(z)
↓2
H(z )
↓2
5
2. Consider
x[n]
H(z)
u[n]
U(z) = H(z) X(z)
Y(z) = U(z2)
= H(z2) X(z2)
↑2
y[n]
(upsampling)
⇒ can upsample first
Second Noble Identity:
x[n]
y[n]
x[n]
≡
H(z2)
↑2
H(z)
↑2
y[n]
6
Derivation of Polyphase Form
1. Filtering and downsampling:
x[n]
y[n]
H(z)
↓2
H(z) = Heven(z2) + z -1 Hodd(z2); heven[n] = h[2n]
hodd[n] = h[2n+1]
Heven(z2)
x[n]
+
z-1
↓2
y[n]
Hodd(z2)
7
Heven(z2)
↓2
x[n]
y[n]
+
z-1
Hodd(z2)
↓2
x[n]
xeven[n]
↓2
Heven(z)
+
z-1
↓2
xodd[n-1]
Hodd(z)
y[n]
Polyphase
Form
8
2. Upsampling and filtering
x[n]
↑2
F(z)
y[n]
F(z) = Feven(z2) + z-1 Fodd (z2)
x[n]
Feven(z2)
+
↑2
Fodd(z2)
y[n]
z-1
9
x[n]
↑2
Feven(z2)
+
↑2
x[n]
Feven(z)
Fodd(z2)
yeven[n]
z-1
↑2
+
Fodd(z)
yodd[n]
↑2
y[n]
y[n]
z-1
Polyphase
Form
10
Polyphase Matrix
Consider the matrix corresponding to the analysis
filter bank in interleaved form. This is a block
Toeplitz matrix:
M
L
L
0
0
0
0
h0[3] h0[2]
h1[3] h1[2]
0
0
0
0
h0[1] h0[0]
h1[1] h1[0]
L
L
L
L
L
Hb=
L h0[3] h0[2] h0[1] h0[0]
L h1[3] h1[2] h1[1] h1[0]
4-tap Example
11
Taking block z-transform we get:
Hp(z) =
=
=
h0[0] h0[1]
h1[0] h1[1]
+
h0[0] + z-1 h0[2]
h1[0] + z-1 h1[2]
H0,even (z)
H1,even (z)
z-1
h0[2] h0[3]
h1[2] h1[3]
h0[1] + z-1 h0[3]
h1[1] + z-1 h1[3]
H0,odd (z)
H1,odd (z)
This is the polyphase matrix for a 2-channel filter bank.
12
Similarly, for the synthesis filter bank:
M
Fb =
M
f0[0] f1[0]
f0[1] f1[1]
M
M
0
0
0
0
L f0[2] f1[2] f0[0] f1[0]
f0[3] f1[3] f0[1] f1[1]
0
0
0 f0[2] f1[2]
0 f0[3] f1[3]
M
M
M
L
M
13
Fp(z) =
=
f0[0] f1[0]
f0[1] f1[1]
+
z-1
F0,even [z] F1,even [z]
F0, odd [z] F1, odd [z]
f0[2] f1[2]
f0[3] f1[3]
Note transpose
convention for
synthesis
polyphase matrix
• Perfect reconstruction condition in polyphase domain:
Fp(z) Hp(z) = I (centered form)
This means that Hp(z) must be invertible for all z on the
unit circle, i.e.
det Hp(eiω) ≠ 0 for all frequencies ω.
14
• Given that the analysis filters are FIR, the
requirement for the synthesis filters to be also
FIR is:
det Hp(z) = z-l (simple delay)
because Hp-1(z) must be a polynomial.
• Condition for orthogonality: Fp(z) is the transpose
of Hp(z), i.e.
HpT(z-1) Hp(z) = I
i.e. Hp(z) should be paraunitary.
15
14243
Relationship between Modulation
and Polyphase Matrices
h0,even[n] = h0[2n]
H0(z) = H0,even(z2) + z-1 H0,odd(z2) ;
h0,odd[n] = h0[2n+1]
H1(z) = H1,even(z2) + z-1 H1,odd(z2)
Two more equations by replacing z with -z.
So in matrix form:
H0(z) H0(-z)
H 0,even(z2) H0,odd(z2) 1
=
H1(z) H1(-z)
H 1,even(z2) H1,odd(z2) z-1
123
123
1
-z-1
Hm(z)
Hp(z2)
Modulation matrix Polyphase matrix
16
But
1
1
z-1 -z-1
=
1
z-1
123
1 1
1 -1
123
D2(z)
F2
Delay Matrix 2-point DFT Matrix
FN =
-1
FN-1 =
1
1
1
.
.
.
1
1
N
1 1 … 1
w w2 … w N-1
2(N-1)
w2 w4 … w 2(N2π
i
; w=e N
.
.
.
.
.
.
2
N
1
2(N1)
(N1)
2(N
(N
w w
w
N-point DFT
Matrix
FN
Complex conjugate: replace w with w =
2π
i
e N
17
So, in general
Hm(z) F-N1
=
H p(zN) DN(z)
N = # of channels in filterbank
(N = 2 in our example)
18
Polyphase Matrix
Example: Daubechies 4-tap filter
1+√3
3 + √3
h0[0] =
h0[1] =
4 √2
4 √2
3 -√ 3
1 - √3
h0[3] =
h0[2] =
4 √2
4 √2
1
{(1 + √3 ) + (3 + √3 ) z-1 + (3 - √ 3) z-2 + (1 - √3) z-3}
H0(z) =
4√2
1
{(1 - √3) – (3 - √3) z-1 + (3 + √3)z-2 – (1 + √3)z-3}
H1(z) =
4√2
19
Time domain:
h0[0]2 + h0[1]2 + h0[2]2 + h0[3]2 =
h0[0] h0[2] + h0[1] h0[3] =
1
32
+ 2√3) + (12 + 6 √3) +
(12 – 6 √3) + (4 – 2 √3)}
=1
{(2√3) + (-2√3)}
1 {(4
32
=0
i.e. filter is orthogonal to its double shifts
20
Polyphase Domain:
1
{(1 + √3) + (3 - √3) z-1}
H0,even(z) =
4 √2
=
1
{(3 + √3) + (1 - √3) z-1}
4 √2
H1,even(z) =
1
{(1 - √3) + (3 + √3) z-1}
4 √2
H1,odd(z)
1
{ - (3 - √3) – (1 + √3) z-1}
4 √2
H0,odd(z)
1
Hp(z) =
4√2
=
1 + √3
1 - √3
3 + √3
-(3 - √3)
123
A
1
+
4√2
3 - √3
1 - √3
z-1
3 + √3
-(1 + √3)
123
B
21
Hp(z) = A + B z-1
HpT(z-1) Hp(z) = (AT + BT z)(A + Bz-1)
= (AT A + BTB) + ATBz-1 + BTAz
AT A
1 1 + √3 1 - √3
1
=
4√2 3 + √3 - (3 - √3) 4√2
1
=
32
=
1 + √3
1 - √3
3 + √3
-(3-√3)
(4 + 2√3) + (4 - 2√3) (6 + 4√3) - (6 - 4√3)
(6 + 4√3) - (6 - 4√3) (12 + 6√3) + (12 - 6√3)
¼
√3/4
√3/4
¾
22
BT B
1
3 - √3 3 + √3 1 3 - √3
1 - √3
=
4 √2 1 - √3 -(1 + √3) 4 √2 3 + √3 - (1 + √3)
=
=
(12 – 6√3) + (12 + 6√3) (6 - 4√3) - (6 + 4√3)
(4 - 2√3) + (4 + 2√3)
32 (6 - 4√3) – (6 + 4√3)
1
¾
- √3/4
- √3/4
¼
⇒ AT A + BTB = I
23
ATB
= 1
4 √2
1 + √ 3 1 -√ 3 1 3 - √ 3 1 -√ 3
3 + √3 -(3-√3) 4 √2 3 + √3 -(1+√3)
1
=
32
(2 √3) + (-2√3) (-2) – (-2)
(6) – (6)
( -2 √3) + (2 √3)
=
BT A =
0
(ATB)T = 0
So
HpT(z-1) Hp(z) = I
i.e. Hp(z) is a Paraunitary Matrix
24
Modulation domain:
1
H0(z)
= P(z) =
(-z3 + 9z + 16 + 9z-1 – z-3)
16
1
H0(-z) H0(-z-1) = P(-z) =
(z3 – 9z + 16 – 9z-1 + z-3)
16
H0(z-1)
So
H0(z) H0(z-1) + H 0(-z) H0(-z-1) = 2
i.e.
|H0(ω)|^2 + |H0(ω + π)|^2 = 2
25
Magnitude Response of Daubechies 4-tap filter.
Magnitude response of Daubechies 4-tap filter.
2.5
Frequency response phase
2
1.5
1
0.5
0
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
Angular frequency (normalized by π)
0.6
0.8
1
26
Phase response of Daubechies 4-tap filter.
Phase response of Daubechies 4-tap filter.
4
3
Frequency response phase
2
1
0
-1
-2
-3
-4
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
Angular frequency (normalized by π)
0.6
0.8
1
27
Download