Filter banks T

Filter banks T
Filter banks
Separately, the lowpass and highpass filters are not invertible.
T0 removes the highest frequency   1/ 2 and T1
removes the lowest frequency
  0.
Together these filters separate the signal into low-frequency
and high-frequency subsequences and T1 x is the
complement of T0 x.
It is said that these filters form a filter bank.
It can be shown that there exists an inverse filter bank or in
other words the transform which splits signal into lowfrequency and high-frequency components is invertible.
Decimation
The problem connected with filter banks is :
The signal length has doubled since each component has
the length equal to the length of the input sequence.
The solution is to downsample (or decimate).
Decimation means removing all odd-numbered components
of the filtered sequence:
 y (0)   y (0) 

 

 y (1)   y (2) 
 2 y(2)    y(4) 
 y (3)   y (6) 
 ...   ... 

 

Decimation
Decimation is not invertible. The odd-numbered
components are lost.
Normally the even-numbered components of both (lowfrequency and high-frequency ) decimated signal parts will
be needed to recover all components of the original vector.
For band-limited signals we can recover the odd-numbered
components from the even-numbered components.
Two steps, filtering and decimation can be done with new
matrices L and B.
Filter banks






L







1
2
0
0
0
1
1
2
2
0
0
1
0
0
1
0
0
0
0
0
0
0
0
...
...
...
...
...
2
2


... 

 . 


... 



...  B  



1 



2

... 




1
0
2
0

0
1
2
1
2

0
0
0
0
1
1
0
0
0
0
0
0
0
0
...
...
...
...
...
2
2
Removing half of the rows leaves the matrices with a doubleshift. To compensate losing half of the components we
multiply the surviving components by 2 .

... 


... 

... 

1 


2
... 


Filter banks
Filtering extends the length of the output signal compared to
the length of the input signal. If the input vector x has
size N then the output vector y has size N  l  1 ,where l
denotes the length of the impulse response.
Thus the corresponding matrices T0 , T1 are matrices of size
N  ( N  l  1). To avoid such extension we use the so-
called circular extension of the input signal. In this case the
n
n
convolution
y ( n )   h ( k ) x ( n  k )   h( n  k ) x ( k )
k 0
k 0
can be considered as a circular convolution and T0 , T1
become of size N  N . We will consider matrices
corresponding to the circular convolution.
Filter banks
The rectangular L and B fit into a square matrix which
represents the whole analysis filter bank:
1


L
1  ...
 B 
2 1
 


 ...

1
...
.
1
1 ...
...
...
... ...
1
...
 1 1 ...
...
...
... ...




..



... 
It executes the lowpass channel and the highpass channel
(both decimated). The combined square matrix is invertible.
Filter banks
The inverse is the transpose:
L
B
 
1

 LT
BT

The second matrix LT

. 1
1

. 1
. 1
1
1  1 .

1
2 1 .

.


.

BT
.

.
.

.
. 
. 
 is the synthesis filter bank.
This is an orthogonal filter bank, because inverse=transpose.
Filter banks
It is evident that:
L
T

 L
B    LT L  B T B  I .
 B
T
The synthesis bank is the transpose of the analysis bank.
When one follows the other we have perfect reconstruction.
The analysis bank had two steps: filtering and
downsampling. The synthesis bank also can be organized
to have two steps: upsampling and filtering.
The first step is to reconstruct full-length vectors. The
odd-numbered components are returned as zeros by
upsampling. Upsampling is denoted by ( 2).
Filter banks
Applied to a half-length vector y it inserts zeros:
 y (0) 


 y (0)   0 

 

 y (1)   y (1) 
~
y   2  y (2)    0 

 

 ...   y (2) 
 ...   0 




 ... 
The second step in the synthesis bank is filtering. The lowpass
filtering is equivalent to multiplying the extended vector by the
matrix :
1

0 0 ...

2
1
2
S0  2 
0

0

 ...
1
2
1
2
0 ...
1
...
2
1
0
...
2
... 0 ...










Filter banks
The highpass filtering is equivalent to multiplying the
extended vector by matrix
 1


 2
 1
 2
.
S1  2 
 0

 0

 ...

0
1
2
1
2

0
...
0
...
0
...
1
...
2
1
...
2
0 ...





.






1
x(n)  x(n  1)
2
The synthesis highpass filter is: y (n)  1 x(n  1)  x(n) .
2
The synthesis lowpass filter is: y (n) 
This is the Haar filter bank.
Example
Let x(n)  x(0), x(1), x(2), x(3), x(4), x(5) be input sequence
of the the Haar filter bank.
Output of the lowpass filter is:
y0 (n)  x(0), x(0)  x(1), x(1)  x(2), x(2)  x(3), x(3)  x(4), x(4)  x(5), x(5)
Output of the highpass filter is:
y1 (n)  x(0), x(1)  x(0), x(2)  x(1), x(3)  x(2), x(4) - x(3), x(5) - x(4), x(5)
Decimated output of the lowpass filter is:
v0 (n)  x(0), x(1)  x(2), x(3)  x(4) , x(5)
Decimated output of the highpass filter is:
v1 (n)  x(0), x(2)  x(1), x(4) - x(3), x(5)
Example
The extended low-frequency part is:
~
y (n)  x(0), 0, x(1)  x(2), 0, x(3)  x(4), 0, x(5)
0
The extended high-frequency part is:
~
y1 (n)  x(0), 0, x(2)  x(1), 0, x(4) - x(3),0, x(5)
Lowpass filtered ~y0 has the form
w0 (n)  x(0), x(0), x(1)  x(2), x(1)  x(2), x(3)  x(4), x(3)  x(4)
Highpass filtered ~y has the form
1
w1 (n)   x(0), x(0), x(1)  x(2), x(2)  x(1), x(3)  x(4), x(4) - x(3)
Summing up w0 (n) and w1 (n) after normalization we get
~
x (n)  0, x(0), x(1), x(2), x(3), x(4)  x(n  1).
Wavelet filtering
The most important feature of the wavelet filter banks is
their hierarchical structure.
The recursive nature of wavelets leads to a tree structure of
the corresponding filter bank.
The input sequence is decomposed into the so-called
reference (low-frequency) subsequences with diminishing
resolutions and related with them the so-called detail (highfrequency) subsequences.
At each level of decomposition the wavelet filtering is
invertible, that is, the reference signal of this level together
with the corresponding detail signal provide perfect
reconstruction of the reference signal of the next level (with
higher resolution)
Wavelet filtering
x(n)
Fig.8.1 One level of wavelet decomposition
followed by reconstruction
Wavelet filtering
x(n)
h0 (n)
h1 (n)
2
2
r1 (n)
d 1 ( n)
h0 (n)
h1 (n)
2
r2 (n)
2
d 2 ( n)
Fig.8.2 Multiresolution wavelet decomposition
Wavelet filtering
In the theory of wavelet filter banks such pairs of filters h0 (n)
and h1 (n) are found that there exist pairs of the inverse filters
g0 (n) and g1 (n) providing the perfect reconstruction of the
input signal.
The wavelet filtering provides perfect reconstruction of the
input signal, that is, the output signal is determined as follows:
y(n)  Ax(n   ) ,
where A is the gain factor, and  is the delay.
At the L  th level of decomposition we obtain rL (n) with
resolution 2 L times scaled down compared to the resolution of
the input signal and d L (n), d L1 (n) ,…, d1 (n) with resolution 2 j
j  L, L  1,...,1 times scaled down compared to the input
signal.
Wavelet filtering
At the L  th level of decomposition the total length of
reference and detail subsequences is :
2  L N  2  L N  2 ( L1) N  2 ( L2) N  ...  2 1 N 
L

1

2

i
L 
1
L 
 N   2  2   N  2
 2   N
1
1 2
 i 1



L
The synthesis wavelet filter banks always consist of FIR
linear phase filters that is very convenient from the
implementation point of view.
Wavelet and scaling function
The remarkable properties of wavelet filter banks follow
from the dilation equation and the wavelet equation which
connect pulse responses of wavelet filters and special
functions called the wavelet and the scaling function:
 A (t )  2  h0 (n) A (2t  n),
n
 S (t )  2  g 0 (n) S (2t  n),
(8.1)
(8.2)
n
 A (t )  2  h1 (n) A (2t  n),
(8.3)
n
 S (t )  2  g1 (n) s (2t  n),
(8.4)
n
where  A (t ), S (t ) denote scaling functions and  A (t ),  S (t )
are the wavelets. (8.1),(8.2) are dilation equations and (8.3),(8.4)
are wavelet equations.
Typical wavelet
Wavelets
Wavelets are basis functions  jk (t ) in continuous time. A
basis is a set of lineary independent functions that can be
used to produce all admissible functions f (t ) :
f (t )   b jk jk (t ),

bJK 
j ,k
 f (t )
JK
(t )dt.

The wavelet transform operates in continuous time (on
functions) f (t ) and in discrete time (on vectors) x(n) . The
output is the set of coefficients b jk . For infinite signals the
basis is necessarily infinite. For finite length vectors with N
components there will be N basis vectors and N
coefficients. The DWT is expressed by an N  N matrix.
Wavelets
The special feature of the wavelet basis is that all functions
 jk (t ) are constructed from a single mother wavelet  (t ).
This wavelet is a small wave ( a pulse). Normally it starts at
time t  0 and ends at time t  N .
The shifted wavelets  0 k start at time t  k and end at time
t  k  N.
The rescaled wavelets  j 0 start at time t  0 and end at
time t  N / 2 j .
A typical wavelet  jk is compressed 2 j times and shifted k
times.
 jk (t )   (2 j t  k )
Scaled wavelet
Wavelet and scaling function
Let W j be a subspace generated by wavelets  jk for a
given j then the following equality holds
f (t )   w j , w j   b j ,k jk (t )

L2  W j ,
j
j
k
where L2 is the space containing all functions for which
1/ 2
 

  f (t ) 2 dt 


 


is finite and  is the direct sum of subspaces,
L2 can be represented as a sum
that is, any function from
of functions from W j .
j
The scaling functions  (2 t  k ) with a given j are a
basis for the set of signals V j , v j  k a j ,k j ,k (t )
The chain of subspaces V j satisfies the conditions:
f (t )  vJ 1 (t ) 
...  V  V ...  L2 , V j 1  W j  V j
j
j 1
 w (t )
j  J 1
j
Wavelet filtering
 j ,k (t )   h0 (k ) j 1,k (t )
 j ,k (t )   h1 (k ) j 1,k (t )
k
k
v j 1 (t )   a j 1,k j 1,k (t )   a j ,k j ,k (t )   b j ,k j ,k (t )
k
k

a j ,k 
v
j 1
(t ) j ,k (t )dt

k

b j ,k   v j 1 (t ) j ,k (t )dt

a j , k   h0 (n  2k )a j 1,k
n
b j ,k   h1 (n  2k )a j 1, k
n
Wavelet and scaling function
When we perform the wavelet decomposition of the signal it is
divided into different scales of resolution, rather than different
frequencies. Multiresolution divides the frequencies into octave
bands with bandwidth corresponding to the decomposition
level, instead of uniform bands from  to   
as the Fourier transform does.
At each level of the wavelet decomposition time steps are
reduced with a factor of 2 and the frequency steps are
increased twice or in other words t  2  j and   2 j .
Haar example
1
For lowpass filter with h0 (0) 
2
dilation equation
and
h0 (1) 
1
2
the
 (t )   (2t )   (2t  1).
It can be shown that the solution is the box function:
1, for 0  t  1
 (t )  
.
0, otherwise
The coefficients of the wavelet equation are h1 (0) 
1
2
and h1 (1)   1 . The wavelet is a difference of half-boxes:
2
 (t )   (2t )   (2t  1).
 1 for 0  t  1 / 2
 (t )  
 1 for 1/2  t  1
is the Haar wavelet!
If wavelet is a small wave then the Haar wavelet is a square wave.
Haar example
(t)
(2t)
1
0
(2t 1)
1
1
0
1
Haar example
Let our input sequence x(n) have length N  4 then in
terms of matrices the hierarchical filtering can be written as
y  Tx,
 r2
 2
 r
T 
 r
 0

2
2

r
r
where

2
2
r
r 
,

0 0
 r r 
is the matrix with rows equal to the Haar wavelets
1 1 1

 1 1 1
 1 1 0

 0 0 1

1

1
0

1 
r2
 r2
r
0
scaled by r 
1
2
.
Haar example
The wavelet transform based on the Haar wavelets is orthonormal
since the rescaled Haar wavelets  jk (t )  2 j / 2 (2 j t  k ) form an
orthonormal basis and the inverse matrix used for synthesis
represents the transposed matrix T .
We can write V j 1  V j  W j ,
orthogonal sum.
V j  all combinations
a
W j  all combinations
b
k
k
jk
where 
denotes the
 jk (t ) of scaling functions at level j ,
 jk (t ) of wavelets at level j.
jk
We have two orthogonal bases for V j 1 , either the  s at level
j  1 or  s and  s at level
j.
Wavelet filtering
For decomposition with three levels we get
V3  V2  W2  V1  W1  W2  V0  W0  W1  W2 .
The functions in V0 are constant on (0,1]. The functions in
W0 , W1 , W2 are combinations of wavelets.
The function f (t ) in V3 has a piece f j (t )
wavelet subspace W j (plus V0 ):
in each
f (t )   a0 k  ok (t )   b0 k 0 k (t )   b1k 1k (t )   b2 k 2 k (t ).
k
k
k
k
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement