IME-SCALE methods have already proved relevant tools. T in signal processing. In most cases, for data analysis, one uses continuous wavelet transforms rather ...
~
IEEE SIGNAL PROCESSING LEPERS, VOL. 1, NO. 2, FEBRUARY 1994
32
On the Initialization of the Discrete Wavelet Transform Algorithm Patrice Abry and Patrick nand&
Abstruct- This letter shows that making use of the discrete wavelet transform to analyse data implies performing a preliminary initialization of the fast pyramidal algorithm. An approximation enabling easy performance of such an initialization is proposed.
I. MOTIVATION
T
IME-SCALE methods have already proved relevant tools in signal processing. In most cases, for data analysis, one uses continuous wavelet transforms rather than a discrete wavelet transform (DWT), which is usually used in coding. However, we believe that, thanks to the fast pyramidal algorithm and the minimum redundancy dyadic sampling, the DWT is also an efficient tool when analysing experimental data. In this letter, our aim is to stress, via two simple examples, the importance of performing a correct initialization of the DWT algorithm when examining the wavelet coefficients to analyze data. Theoretically speaking, initializing the algorithm means projecting data onto the space VO:the first space of a sequence of successive approximation spaces V, generating the chosen multiresolution analysis [ 11. We propose an approximation that enables us to easily perform this initialization. We will then clarify the relations between the two possible interpretations of the detail d z ( j , n) and approximation a&, n) coefficients: constant-Q band-pass filtered versions of the data versus outputs of the filter-bank pyramidal structure. These dual approaches are summarized through a z h ).
a& - 1,k)&
=
= (z, ;j,J
- 2n)
Last, we will illustrate (on a couple of examples) the importance of initializing the pyramidal algorithm. In spite of our using an orthonormal Daubechies 6 wavelet [l] in these examples, we do not restrict ourselves to the orthonormal case. In some applications, this initialization can be of greater importance when using nonorthogonal wavelets. 11. INITIALIZING THE PYRAMIDAL ALGORITHM Experimental data very often consist of a collection of samples { z n = z(nT,),n E Z},which are related to the physical signal z ( t ) through the sampling theorem:
z(t)= CZkSirU: (t - kT,) X
where T, is the sampling period. Let us immediately remark that this sampling period gives a physical meaning to the approximation space VO. Indeed, the discrete-time filtering of the fast algorithm sets T, = 1 and thus selects the realtime spread of the father wavelet (the scaling function), which generates VOand of the mother wavelet. For instance, when the scaling function time support lies in [ - N , MI, it actually means that the data will be projected onto a space VOgenerated by function 4(t)whose time support is [-NT,, MT,]. From now on, we will assume T, = 1. Thus, the variable t will stand for a normalized time with respect to T,. Most of the time, the initialization of the DWT simply consists of applying the oversimplification: a z ( j = 0, k) E xk
(1)
k
whereas, in fact, the ak(0, k ) should result from the projection of z ( t ) onto VO: 0
0
where $(t) (resp., $(t)) is the dual function of the scaling
i
i)
function 4 (resp., of the wavelet $), and (resp., is its associated filter in the pyramidal algorithm (see [ l ] or [2] for complete definitions of dual functions. In the orthonormal 0
case, one has 4
0
0
0
4 and $ f $). 4j,n(resp., $ j , n ) are dilated, time-shifted versions of 4 (resp., $). 0
0
Manuscript received October 4, 1993; revised January 18, 1994. The associate editor coordinating the review of this letter and approving it for publication was Prof. Boudreaux-Bartels. The authors are with the Laboratoire de Physique. Ecole Normale SupCrieure de Lyon, Lyon, France. IEEE Log Number 9216799.
~ ~ (k )0=,
J o
z(t)+(t- k) dt.
(3)
This result was already stated by Shensa, as reported in [3]. Recalling that z ( t ) is only known through its samples { z n } n 6 zthis , inner product can hardly be computed but rewritten as
k 0
0
with ap = (sinc, = J sinc (t)+(t- p ) dt. The general calculation of these inner products ap is not easy, yet we propose a rough approximation that enables US
1070-9908/94$04.00 0 1994 IEEE
~
33
ABRY AND FLANDRIN ON THE INITIALIZATION OF THE DISCRETE WAVELET ALGORITHM
to estimate them. The examples of the next sections tend to prove that this approximation is valid. One can rewrite ap as
ap =
J i ( v ) exp (-2irvp)11I(v)
0
where @(v) and {IIl(v) = 1, if 0
dv
5 lvl 5 1/2, and 0 0
elsewhere} are the Fourier transforms of 4(t) and sinc (t), respectively. One then sees that neglecting the behavior of 0
]VI
2 1/2 enables us to assimilate sinc(t) to a Dirac function within the integral. Thus, ap simplifies to @(v) for 0
cyp N
$ ( - p ) . It follows that a,(O,k) reads
- IC).
k) N-
a,@,
(4)
n
The quality of this approximation can be examined in Fig. 0
1. A very good approximation of the time-shape of $(t)can
Dubechies6
0
be obtained as the impulse response of the filter h convolved with itself a large number of times. One then simply needs 0
0
to collect the samples { $ ( p ) = $(t = p ) } , , ~to perform the approximate initialization of (4). We will show, using examples, that initializing the algorithnm with (4) rather than with the samples {z,} makes an important difference. 'Let us note that these modifications would be useless in the case of scaling functions whose time support is -1 5 t 5 1, (e.g., the Haar wavelet or splines of order 0 or 1). Let us also remark that initializing the a,(O, k) is of minor importance when dealing with largely oversampled data z(t).This is straightforward from the definition (see (3)) and reasoning among the same line. 111. EWLE
1: ANALYZING A DIRAC FUNCTION
Let us imagine that the data to be analyzed reads z(t) = 0
S(t - to). Then, one has: d s ( j , k ) = to). The output coefficients of the pyramidal algorithm are plotted in Fig. 2. When no initialization was made (top), one can see that the derail signals do not correspond to samples of any dilated 0
version of 4, which can be checked by direct numerical comparison. On the contrary, when the initialization has been performed (bottom), one perfectly recognizes the samples of 0
dilated versions of 4, which is the theoretical result expected from the inner product in (2). Therefore, this example shows that the two approaches of (1) and (2) are well meeting only when the proposed initialization of the a,(O, IC) is performed. Furthermore, if one is interested in locating, in the data, transient events, (modeled by a Dirac impulse) to be detected from the d,(j, IC), it is clear from Fig. 2 that an incorrect initialization is responsible for an incorrect location estimation. Indeed, the maximum of l d z ( j , IC)) at scale j neither coincide in time with that of another scale or with the location of the Dirac impulse. This lack of coincidence will therefore be a serious drawback when detecting transients from time-aligned maxima, whereas initializing the DWT will ensure a time coincidence of the impulse and the maxima of the ldz(j, I C ) [ through scales.
Fig. 1. Fourier transforms of the scaling functions associated with Daubechies3 wavelet (top) and Daubechies6 wavelet (bottom). The shape of the ideal low-pass filter has been superimposed. The higher the degree of regularity, the better the quality of the approximation (most of the energy lies within IvI 5 1/2).
In Fig. 2, one also sees that the values taken by the d z ( j , k) remain the same from scale to scale, but one should note that this is so only because the Dirac function was located at Q good position on the dyadic grid. If it had not been so well located, one would still have had samples of a dilated wavelet, but the reference position of the sampling would have changed with scale. Yet, initializing the pyramid still ensures the correspondence of (1) and (2), and this is the crucial point. Iv. EXAMPLE2: ANALYZING A WAVELET Let us now use another striking example: z ( t )= $jo,leo(t). Let us assume orthonormality of the { @ j , k ( t ) } ; then, one has d!b30,ko(i k) = 1 when ( j , = ( j o , ko), and d ! b 3 0 , L Ok)( ~=, 0 elsewhere. The wavelet coefficients computed by the pyramidal algorithm are displayed in Fig. 3. When no initialization is made, one gets d+30,h0( j ,IC), which are significantly different from 0 for scales j # j o and locations IC # ICo. On the contrary, initializing the a,(O, IC) results in one large coefficient at the
34
IEEE SIGNAL PROCESSING LETERS, VOL. 1, NO. 2, FEBRUARY 1994
s1 B
’
lea signal !
0.5 ...... i .....................
If5
1010
......... ;...................................................
;
1015
1020 b 2 5
1&
1035
lo&
......
;
test signal
g= 0o.2
2 4.2 $4.4
106
960
980
lo00
9 1005
1010
..... ... 1005 1010
.
.
.
1015
1020
1025
1015
1020
1020
1040
1080
1080
1040
1060
1080
th-ne (S)
(SI
1
;
i o ;
1025
1030
1035
1040
1045
1050
1030
.;. ....... .;_ ...... .;. .... 1035 1040 1045 1050
960
j 980
1000
1020
1100
......
lo
;
Bo
;
1 0
;
de(ail3
1005
1010
1015
1020
1025
1030
1035
1040
1045
.... ,...........
.........................
1050
lest sianal
’
z1
50.5 ...... i.. ....... .I._. ..... _.;......... i........ i........ . I . . .......:. ............... . _ _ _ . I ...... lW5
ld10
ld15
?,,
ld20 time (s) 1 8 3 8
1035
l&
ld45
....! ....... ., ......................... . ....; ..... . ; .........i . . . . . ..j .....
....;................... ;..................
1005
1010
1015
1020
1025
1030
1035
1040
1045
1005
1010
1015
1020
1025
1030
1035
1040
1045
1050
;
.......... 1050
1
I
8
960
980
lo00
detail3
1005
1010
1015
1020
1025
1020
1040
1060
1080
1100
1040
1060
lo80
I 1100
detail4
1030
1035
1040
1045
1050
Fig. 2. DWT of a D i m function (least asymmetric D i m Daubechies6 wavelet) without initialization (top) and with a correct initialization of the pyramidal algorithm (bottom). In this latter case, one recognizes exactly sampled shaped of dilated versions of the mother wavelet.
correct time- scale location, corresponding to the theoretical result. This is, of course, of importance since it is clearly telling us that the analyzed data consists of one of the atoms involved in the decomposition. Of course, the remark of the previous section concerning a good location on the dyadic grid still holds.
V. CONCLUSION
In this letter, we have shown that a relevant interpretation of the information conveyed by data can be performed through the DWT on condition that a correct initialization of the
960
980
loo0
1020
Fig. 3. DWT of a & , 1 2 8 ( t ) signal (least asymmetric (Daubechies6 wavelet) without initialization (top) and with a correct initialization of the pyramidal algorithm (bottom). In this latter case only, one finds a single very strong coefficient (on scale 3), betraying that r ( t )is a dilated version of the mother wavelet.
pyramidal algorithm is performed. We have also proposed a simple yet efficient, way of calculating the a, (0, I C ) , which, in some sense, should always be the preliminary step when running a DWT. REFERENCES I. Daubechies, Ten Lectures on Wavelets. New York: SIAM, 1992. Y. Meyer, Ondelettes et algorithmes concurrents. Hermann, 1992, 1st ed. 0. Rioul and P. Duhamel, “Fast algorithms for discrete and continuous wavelet transforms,” IEEE Trans. Inform. Theory, vol. 38, no. 2, pp. 569-586, 1992.