In the discipline of digital signal processing, the “filtering" of a
sequence of numbers (the input signal) is achieved by convolving
the sequence with another set of numbers called the filter coefficients,
taps, weights, or impulse response. This makes intuitive sense if
you think of a moving average with the coefficients being the weights.
For an input sequence x(n)x(n) and filter coefficients h(n)h(n), the output
sequence y(n)y(n) is given by
y
(
n
)
=
∑
k
=
0
N
-
1
h
(
k
)
x
(
n
-
k
)
y
(
n
)
=
∑
k
=
0
N
-
1
h
(
k
)
x
(
n
-
k
)
(11)There is a large literature on digital filters and how to design them
[19], [18].
If the number of filter coefficients NN is finite, the filter is
called a Finite Impulse Response (FIR) filter. If the number is infinite,
it is called an Infinite Impulse (IIR) filter.
The design problem is the choice of the h(n)h(n) to obtain some desired
effect, often to remove noise or separate signals [18], [19].
In multirate digital filters, there is an assumed relation between the
integer index nn in the signal x(n)x(n) and time. Often the sequence of
numbers are simply evenly spaced samples of a function of time. Two
basic operations in multirate filters are the down-sampler and the
up-sampler. The down-sampler (sometimes simply called a sampler or
a decimator) takes
a signal x(n)x(n) as an input and produces an output of y(n)=x(2n)y(n)=x(2n).
This is symbolically
shown in Figure 1.
In some cases, the down-sampling is by a factor other than two and
in some cases, the output is the odd index terms y(n)=x(2n+1)y(n)=x(2n+1), but
this will be explicitly stated if it is important.
In down-sampling, there is clearly the possibility of losing
information since half of the data is discarded. The effect in
the frequency domain (Fourier transform) is called aliasing which
states that the result of this loss of information is a mixing up
of frequency components [19], [18]. Only if the original signal is band-limited
(half of the Fourier coefficients are zero) is there no loss of
information caused by down-sampling.
We talk about digital filtering and down-sampling because
that is exactly what Equation 9 and Equation 10 do.
These equations show that the scaling and wavelet coefficients at
different levels of scale can be obtained by convolving the expansion
coefficients at scale jj by the time-reversed recursion coefficients
h(-n)h(-n) and h1(-n)h1(-n) then down-sampling or decimating (taking every other
term, the even terms) to give the expansion coefficients at the next level
of j-1j-1. In other words, the scale-jj coefficients are “filtered" by
two FIR digital filters with coefficients h(-n)h(-n) and h1(-n)h1(-n) after
which down-sampling gives the next coarser scaling and wavelet
coefficients. These structures implement Mallat's
algorithm
[16], [15] and have been developed in the engineering
literature on filter banks, quadrature mirror filters (QMF), conjugate
filters, and perfect reconstruction filter banks
[20], [21], [27], [29], [28], [25], [26] and are expanded somewhat
in Chapter: Filter Banks and Transmultiplexers of this book. Mallat, Daubechies, and others showed
the relation of wavelet coefficient calculation and filter banks.
The implementation of Equation 9 and Equation 10 is illustrated
in Figure 2 where the down-pointing arrows denote a decimation or
down-sampling by two and the other boxes denote FIR filtering or a
convolution by h(-n)h(-n) or h1(-n)h1(-n). To ease notation, we use both h(n)h(n)
and h0(n)h0(n) to denote the scaling function coefficients for the dilation equation (Reference).
As we will see in Chapter: The Scaling Function and Scaling Coefficients, Wavelet and Wavelet Coefficients , the FIR filter implemented by h(-n)h(-n)
is a lowpass filter, and the one implemented by h1(-n)h1(-n) is a highpass
filter. Note the average number of data points out of this system is the
same as the number in. The number is doubled by having two filters; then
it is halved by the decimation back to the original number. This means there
is the possibility that no information has been lost and it will be
possible to completely recover the original signal. As we shall see, that
is indeed the case. The aliasing occurring in the upper bank can be
“undone" or cancelled by using the signal from the lower bank. This is
the idea behind perfect reconstruction in filter bank theory
[26], [6].
This splitting, filtering, and decimation can be repeated on the scaling
coefficients to give the two-scale structure in Figure 3.
Repeating this on the scaling coefficients is called iterating the
filter bank. Iterating the filter bank again gives us the three-scale
structure in Figure 4.
The frequency response of a digital filter is the discrete-time Fourier
transform of its impulse response (coefficients) h(n)h(n). That is given
by
H
(
ω
)
=
∑
n
=
-
∞
∞
h
(
n
)
e
i
ω
n
.
H
(
ω
)
=
∑
n
=
-
∞
∞
h
(
n
)
e
i
ω
n
.
(12)The magnitude
of this complex-valued function gives the ratio of the output to the input
of the filter for a sampled sinusoid at a frequency of ωω in radians
per seconds. The angle of H(ω)H(ω) is the phase shift between the
output and input.
The first stage of two banks divides the spectrum of
cj+1(k)cj+1(k) into a lowpass and highpass band, resulting in the scaling
coefficients and wavelet coefficients at lower scale cj(k)cj(k) and
dj(k)dj(k).
The second stage then divides that lowpass band into another lower lowpass
band and a bandpass band. The first stage divides the spectrum into two
equal parts. The second stage divides the lower half into quarters and so
on. This results in a logarithmic set of bandwidths as illustrated in
Figure 5. These are called “constant-Q" filters in filter bank
language because the ratio of the band width to the center frequency of
the band is constant. It is also interesting to note that a musical scale
defines octaves in a similar way and that the ear responds to frequencies
in a similar logarithmic fashion.
For any practical signal that is bandlimited, there will be an upper scale
j=Jj=J, above which the wavelet coefficients, dj(k)dj(k), are negligibly
small [9]. By starting with a high resolution
description of a signal in terms of the scaling coefficients cJcJ, the
analysis tree calculates the DWT
down to as low a resolution, j=j0j=j0, as desired by
having J-j0J-j0 stages. So, for f(t)∈VJf(t)∈VJ, using (Reference) we have
f
(
t
)
=
∑
k
c
J
(
k
)
φ
J
,
k
(
t
)
=
∑
k
c
J
-
1
(
k
)
φ
J
-
1
,
k
(
t
)
+
∑
k
d
J
-
1
(
k
)
ψ
J
-
1
,
k
(
t
)
f
(
t
)
=
∑
k
c
J
-
2
(
k
)
φ
J
-
2
,
k
(
t
)
+
∑
k
∑
j
=
J
-
2
J
-
1
d
j
(
k
)
ψ
j
,
k
(
t
)
f
(
t
)
=
∑
k
c
j
0
(
k
)
φ
j
0
,
k
(
t
)
+
∑
k
∑
j
=
j
0
J
-
1
d
j
(
k
)
ψ
j
,
k
(
t
)
f
(
t
)
=
∑
k
c
J
(
k
)
φ
J
,
k
(
t
)
=
∑
k
c
J
-
1
(
k
)
φ
J
-
1
,
k
(
t
)
+
∑
k
d
J
-
1
(
k
)
ψ
J
-
1
,
k
(
t
)
f
(
t
)
=
∑
k
c
J
-
2
(
k
)
φ
J
-
2
,
k
(
t
)
+
∑
k
∑
j
=
J
-
2
J
-
1
d
j
(
k
)
ψ
j
,
k
(
t
)
f
(
t
)
=
∑
k
c
j
0
(
k
)
φ
j
0
,
k
(
t
)
+
∑
k
∑
j
=
j
0
J
-
1
d
j
(
k
)
ψ
j
,
k
(
t
)
(13)which is a finite scale version of (Reference).
We will discuss the choice of j0j0 and JJ further in Chapter: Calculation of the Discrete Wavelet Transform.