tutorial morlet wavelet

21
1 Term paper A Tutorial of the Morlet Wavelet Transform student:葉峻豪 R99942036 電信所 Outline 1. Introduction………………………………………………………...p.2 2. Wavelet transform……………………………………………. …...p.2 2.1 Continuous Wavelet Transform (CWT)………………………....p.3 2.2 Continuous Wavelet Transform with discrete coefficients……..p.7 2.3 Discrete Wavelet Transform (DWT)……………………………..p.8 3. Complex Wavelet transform…………………………………...…p.12 4. Some famous Mother Wavelet…………………………………....p.14 5. Morlet Wavelet……………………………………………………p.18 6. Application of the Morlet wavelet analysis in the ECG ...........…p.19 7. History of Wavelet transform………………………………...…..p.20 8. Conclusion………………………………………………………....p.21 9. Reference………………………………………………………..…p.21

Upload: pham-van-hoan

Post on 24-Oct-2014

108 views

Category:

Documents


6 download

TRANSCRIPT

Term paper A Tutorial of the Morlet Wavelet Transformstudent R99942036

Outline1. Introduction...p.2 2. Wavelet transform. ...p.2 2.1 Continuous Wavelet Transform (CWT)....p.3 2.2 Continuous Wavelet Transform with discrete coefficients..p.7 2.3 Discrete Wavelet Transform (DWT)..p.8 3. Complex Wavelet transform...p.12 4. Some famous Mother Wavelet....p.14 5. Morlet Waveletp.18 6. Application of the Morlet wavelet analysis in the ECG...........p.19 7. History of Wavelet transform.....p.20 8. Conclusion....p.21 9. Reference..p.21

1

1. IntroductionThe Morlet Wavelet Transform is a kind of Wavelet transform, and Wavelet transform can be seen a powerful tool in time-frequency analysis. Above all the tool in time-frequency analysis, the famous one is the Fourier transform. Fourier transform is useful to analysis the frequency component over the whole time, but it can not catch the change in frequency response with respect to time. Short-Time Frequency transform (STFT) uses a window function to catch the frequency component in a time interval. Although STFT can be use to observe the change in frequency response with respect to time, there is still a problem that the fixed width of the window function lead to the resolution fixed. On the other hand, from the Uncertainty Principle, we know that the product of the time domain resolution and the frequency resolution is constant, so we can not have high resolution at both the time domain and frequency domain at the same time. Therefore, we may have high time resolution when observing the high frequency signal component and have high frequency resolution when observing the low frequency signal component. Wavelet transform is one of the solutions to the above problem: by changing the location and scaling of the mother wavelet, which is the window function in Wavelet transform, we can implement the multi-resolution concept mentioned above. In the way employing a window with variable width, Wavelet transform can capture both the short duration, high frequency and the long duration, low frequency information simultaneously. It is more flexible than STFT and particularly useful for the analysis of transients, aperiodicity and other non-stationary signal feature. The Morlet Wavelet transform is the kind of the Continuous Wavelet Transform, which is one class of the Wavelet transform. We will force on the Continuous Wavelet Transform and describe briefly the other classes Wavelet transform. Besides, the conventional wavelet transform is based on real-valued wavelet function and scaling function, but the Morlet Wavelet transform is actually a complex Wavelet transform. In the later chapter, we will introduce some basic concept of the complex Wavelet transform.

2. Wavelet transformThere are three distinct classes about Wavelet transform in use today: Continuous Wavelet Transform (CWT), continuous Wavelet transform with discrete coefficients and Discrete Wavelet Transform. With respect to continuous/discrete in the input/output, we distinguish this three classes following:2

Class Continuous Wavelet Transform Discrete Wavelet Transform

Input

Output Discrete Discrete

Continuous Continuous Discrete

continuous Wavelet transform with discrete coefficients Continuous

Now we make the differences of the three classes Wavelet transform.

2.1 Continuous Wavelet Transform (CWT)2.1.1 Definition a (, ) 1 * t a x(t ) b dt , b [0, } ..(1) b is the complex conjugate of the mother wavelet (t ) , which is the

X w ( a, b) =

where * (t )

analysis wavelet function, a is the location parameter of the wavelet and b is the scaling (dilation) parameter of the wavelet. Note that a is any real number and b is any positive real number.2.1.2 Inverse Continuous Wavelet Transformx(t ) =

1 C

0

1 b5/ 2

X w (a, b) (

ta )dadb b

where C =

( f ) f

2

0

df < .

2.1.3 Constraints for the mother wavelet

In general, the mother wavelet is not arbitrary function. Here list three constraints in designing mother wavelet:2.1.3.1 Compact Support

Support: the region of the mother wavelet where is not equal to zero Compact support: the width of the support is not infinite2.1.3.2 Vanishing Moments

We usually need that the mother wavelet is a high frequency signal, and that could3

make the Wavelet transform sensitive to the high frequency input. The result of that wavelet transform can be more precise in time-frequency analysis. Since all signals in nature can be represented by polynomial, therefore we define the moment: kth moment: mk = t k (t )dt .

If m0 = m1 = m2 = = mp-1 = 0, we say (t ) has p vanish moments. At least, werequire the vanishing moment is not less than one, i.e.

(t )dt = 0The more the order vanishing moment is, the higher frequency function the mother wavelet is, and the more sensitive this Wavelet transform to process the high frequency component is.2.1.3.3 Admissibility Criterion

C =

( f ) f

2

0

df <

where ( f ) is the Fourier transform of the mother wavelet (t ) . This constraint is due to that the inverse wavelet transform can exist.2.1.4 Modified for digital computer

It is impossible to implement the integral for scaling parameter b in the infinite interval in digital computer. Since the constraint Compact Support, which support the mother wavelet exists in a finite length, we can modify the inverse Wavelet transform by the scaling function. Define the scaling function (t ) :

(t ) = ( f )e j 2ft df

where ( f ) =

( f ')

2

f

f'

e j 2ft df ' for f > 0 , ( f ) = * ( f ) . The scaling function

is usually a lowpass filter. Now the modified Wavelet transform is: X w ( a, b) = LX w (a, b0 ) =

1 * t a x(t ) b dt a (, ) b , 1 b [0, b0 ] * t a x(t ) b0 dt b0 4

The reconstruction is: x(t ) = 1 b0 1 ta 1 t a )dadb + LX w (a, b0 ) ( )da 0 5 / 2 X w (a, b) ( 3/ 2 b C b b b0 0

2.1.5 Scalogram

Scalogram is the absolute value and square of the output of the Wavelet transform, i.e., 1 Sc x (a, b) = X w (a, b) = b2 2

t a x(t ) b dt *

The mean of Scalogram is the wavelet energy density function which is the contribution to the signal energy at the specific scale parameter a and location parameter b. It is analogous to the spectrogramthe energy density surface of the STFT.2.1.6 Compare with Fourier transform and time-frequency analysis Fourier transform (FT)F ( f ) = x(t )e j 2ft dt (2)

As we know, Fourier transform convert signal in time domain to frequency domain by integrating over the whole time axis. However, if the signal is non-stationary, the signal in frequency is actually a function of time and we can not know when the frequency component changes. The time-frequency tile allocation of FT is:

Fig.1. From Fig.1, we can know that the time information is completely lost after Fourier transform. Frequency axis is divided uniformly, and the frequency resolution may be precise when we integrate along the whole time axis.5

Short-Time Frequency transform (STFT)

Here we take the Short-Time Frequency transform as the example of time-frequency analysis:X (t , f ) = w(t )x( )e j 2f d .(3)

where w(t) is the window function, t is the location and f is the frequency. STFT tries to solve the problem of the FT, which FT can not catch the change in frequency response with respect to time, by introducing a window function w(t). The window function is used to extract a portion of x(t) and then take Fourier transform. The output of the STFT has two parameters: one is the time parameter t, which indicating the instant we concern. The other is the frequency parameter f, which is the same role in the FT. However, there is another problem: the width of the window is fixed, which may cause that there is no enough resolution in some interval. For example, suppose the window size is one, there is a signal with frequency 0.1Hz. The extracted data from STFT in 1 second look like flat (DC term) in the time domain. The time-frequency tile allocation of STFT is:

Fig.2. From Fig.2, we can see the time information reserved after STFT. Besides, both the time axis and frequency axis are divided uniformly, and there is no one which resolution is difference with others. By the way, the frequency resolution depends on the time resolution, which resolution can easily be understood by the Uncertainty Principle: the product of the time domain resolution and the frequency resolution is constant.Wavelet transform6

1 * t a x(t ) b dt (4) b Wavelet transform is one of solutions to above problem. The mother wavelet (t ) X w ( a, b) = by dilated (parameter b) and translated (parameter a) is designed to balance between the time domain and frequency domain resolution. We can see clearly very low frequency components at large b, which makes the width of the mother wavelet expansive, and very high frequency components at small b, which makes the width of the mother wavelet concentrating. The time-frequency tile allocation of Wavelet transform is:

Fig.3. the multi-resolution From Fig.3, we can see both the time axis and frequency axis are not divided in fixed interval, and this flexibility is very useful in time-frequency analysis. It is worthy to note that the parameter b is inversely proportional to the frequency and parameter a is just like the time. This is another difference between the a-b plot of the Wavelet transform and the t-f plot of the STFT

2.2 Continuous Wavelet Transform with discrete coefficients2.2.1 Definition

The main difference with Continuous Wavelet Transform is that the parameter a and b are not chosen arbitrarily. Here we constrain a to be n2-m and constrain b to be 2-m at the (1): a (, ) 1 * t a X w (a = n 2 m , b = 2 m ) = x(t ) b dt , b [0, } b X w (a = n2 m , b = 2 m ) = 1 2 m7

t n2 m x(t ) * 2 m dt

n Z , n (, ) X w (n, m) = 2 m / 2 x(t ) * 2 m t n dt , .(5) m Z , m (, }

(

)

2.2.2 Inverse Continuous Wavelet Transform with discrete coefficients

x(t ) =

m = n =

2

m/2

1 (2 m t n) X w (n, m)

where 1 (t ) is the dual function of (t ) , i.e.,

2 m 1 (2 m1 t n1 ) (2 m t1 n)dt = (m m1 ) (n n1 )

should be satisfied. We often desire that 1 (t ) = (t ) , and then x(t ) =m = n =

2

m/2

(2 m t n) X w (n, m)

The mother wavelet should satisfies

2 m (2 m1 t n1 ) (2 m t n)dt = (m m1 ) (n n1 ) .

2.3 Discrete Wavelet Transform (DWT)2.3.1 Concept

DWT comes from the Continuous Wavelet Transform with discrete coefficients, but the mathematical part is simplified largely. Even there is no easy formula to represent the relation between the input and output.2.3.2 1-D Discrete Wavelet Transform

8

Fig.4. one-stage 1-D DWT From Fig.4, we know that x1, L [n] is the low frequency component, which is the

result after the input passes through the lowpass filter g[n] and x1, H [n] is the high frequency component, which is the result after the input passes through the highpass filter h[n] . Above case of DWT is a one-stage DWT, and if we want to have a more precise analysis, we can implement more stages in DWT. The following is the case of two-stage DWT:

Fig.5. two-stage 1-D DWT At the Fig.5, the difference with Fig.4 is that decompose the lowpass component from stage one furthermore. Sometimes it can also decompose the highpass component from stage one due to difference goals. It is worthy to note that even if it pass through many stages decomposing, the output total bits number after DWT dose not increase many bits when the size of input is more larger than the size of the filter. On the other hand, we can observe the effect of more stages DWT from the frequency domain:

9

Fig.6. three-stage 1-D DWT in the frequency domain Fig.6 can also explain that when we implement more stages in DWT, we may get a more precise time-frequency analysis.2.3.3 1-D Inverse Discrete Wavelet Transform

Fig.7. one-stage 1-D inverse DWT In general, we need that the inverse DWT conforms to the condition Perfect Reconstruction, which mean that the output of the inverse DWT is fully equal to the input of the DWT. How to choose the synthesis filter g1[n] and h1[n] is the other important issue, and here we do not force to this part.2.3.4 2-D one-stage Discrete Wavelet Transform

10

Fig.8. one-stage 2-D DWT From Fig.8, we see that this one-stage 2-D DWT seems to the two-stage 1-D DWT, but they are difference. The main difference is this 2-D DWT decomposes the low frequency and high frequency component in two dimensions separately and the two-stage 1-D DWT decomposes twice in the same (and the only) dimension. We take an example following for the result of the one-stage 2-D DWT in the image processing:

Fig.9. an example of the one-stage 2-D DWT11

From Fig.8, it is the result of the one-stage 2-D DWT with the input is a rectangular. We can see clearly that DWT can be applied in the edge and corner detection or compression since the lowpass frequency component have no much difference with the original input signal but the size, and the other highpass frequency component is sparse except the edge of the original input reserved.

3. Complex Wavelet transformThe conventional wavelet transform is based on real-valued wavelet function and scaling function, but the Morlet Wavelet transform is a complex Wavelet transform. Why do we consider the complex version? There are some troubles with real wavelet: Problem 1: Oscillation Since the mother wavelet is a bandpass filter, the wavelet coefficients will oscillate around singularities. It complicates wavelet-based processing. Problem 2: Shift Variance Small shift of the signal will greatly perturb the wavelet coefficient oscillating around singularities. We can see the following example:

12

Fig. Problem 3: Aliasing The signal after wavelet transform will result in substantial aliasing. Of course the inverse DWT will cancel this aliasing, but only when the wavelet and scaling coefficients are not changed. Any processing about wavelet coefficient (thresholding, filtering, and quantization) upsets the delicate balance between the forward and inverse transforms, leading to artifact errors in the reconstructed signal. Fortunately there is one solution of above shortcomings: complex wavelet. Now we start to introduce some basic concept of the complex Wavelet transform. Before starting, we first note that it seems same between separable 2-D DWT (here do not describe it) and complex Wavelet transform. The main difference is that the separable 2D DWT lacks the directionality. While the separable 2D DWT supports three directions, the complex Wavelet transform can extend to support six directions. Since the complex Wavelet transform is based on the Hilbert transform, we will introduce some concept the Hilbert transform first.3.1 Hilbert transform

The Hilbert transform of the input signal x(t ) is:

y (t ) = Hilbert{x(t )} = x(t ) * h(t ) ,

where h(t ) =

1 and * is the convolution. The frequency response of h(t ) is: t H ( w) = j sgn( w) .

We can see the result of the Hilbert transform: Y ( w) = X ( w) H ( w) = j sgn( w) X ( w)

Fig. the frequency response of the Hilbert transform By the Hilbert transform, there is an important property: analytic representation of the signal, which is that the negative frequency component of the Fourier transform is discarded with no loss of information:13

xc (t ) = x(t ) + j y (t ) = x(t ) + j Hilbert{x(t )} In the complex Wavelet transform, it will use this property by the Hilbert transform.3.2 Complex Wavelet transform

Here first we note the key due to above mention problems: the Fourier transform does not suffer from these problems. First, the magnitude of the Fourier transform dose not oscillate positive and negative but rather provides a smooth positive envelope in the Fourier domain. Second, the magnitude of the Fourier transform is perfectly shift invariant. Third, the Fourier coefficients has not aliasing and do not rely on a complicated aliasing cancellation property to reconstruct the signal. The main point is the Fourier transform is based on complex-valued oscillating sinusoids e jwt = cos( wt ) + j sin( wt ) and the real and imaginary parts of the oscillating sinusoids is a Hilbert transform pair, i.e. sin( wt ) = Hilbert{cos( wt )} . Therefore, the oscillating sinusoids e jwt = cos( wt ) + j sin( wt ) is actually an analytic signal and it is supported only on one-half of the frequency axis ( w > 0). Inspired from the Fourier transform, we can imagine the complex wavelet transform with a complex-valued mother wavelet: c (t ) = r (t ) + j i (t ) where r (t ) is real and even, i (t ) is imaginary and odd, and i (t ) is the Hilbert transform of r (t ) . The complex scaling function is defined similarly. The choice of complex mother wavelet and complex scaling function is another important issue, and here we do not force on it. As the Fourier transform, complex wavelets can be used to analyze both real-valued signals and complex-valued signals. On the other hand, the complex WT enables new multi-scale signal processing that exploit the complex magnitude and phase. In particular, the large magnitude can indicate the presence of a singularity while the phase indicates its position within the support of the wavelet.

4. Some famous Mother WaveletThere are many functions chosen to be the mother wavelet, and here we list some important case.4.1 Haar basis/Haar Wavelet

14

Fig.10. Haar Wavelet The Haar Wavelet is the easiest Wavelet transform, and it is a kind of the Continuous Wavelet Transform with discrete coefficients. We can see clearly that this mother wavelet is a highpass filter and the scaling function is a lowpass filter indeed. There are some advantages of the Haar Wavelet: (1) Simple (2) Fast algorithm (3) Orthogonal (therefore reversible) (4) compact, real, odd (5) Vanish moment = 1 The main disadvantage is both the mother wavelet and the scaling function are not enough smooth. Since there are less rectangular signals in nature, and in general it hope the basis seem to the signal we want to analysis in the signal processing.4.2 Mexican hat function/ Mexican hat Wavelet2 25 / 4 (1 + 2t 2 )e t 3 The Mexican hat Wavelet is the second derivative of the Gaussian function. We

(t ) =

can see this Mexican hat function in following plot:

15

Fig.11. Mexican hat function In general, the any order derivative of the Gaussian function can be employed as a mother wavelet, and it is worthy to note that the p order derivative of the Gaussian function has p vanishing moment. On the other hand, since the Gaussian function is a low frequency signal, it is not suitable to be a mother wavelet (recall the mother wavelet is usually a high frequency signal). Now we consider the wavelet transform of an exponential discontinuity, which is a sudden spike in the signal half way along its length followed by a smooth exponential decay, at the Fig.12. In the Fig.12 (b), we can see that the location, where the smallest b is, points to the location the signal discontinuity in the Fig.12 (a). On the other hand, we can also observe the effect of the multi-resolution: the resolution of the wavelet transform is invariant along a (location) but variant along b (scaling), looked Fig.13.

Fig.12. Point to an exponential discontinuity. (a) A sudden spike with an exponential tail. (b) The transform plot for the discontinuity.

16

Fig.13. the effect of the multi-resolution Furthermore, here we can also observe the effect of the vanishing moment: The more the order vanishing moment is, the more sensitive this Wavelet transform to process the high frequency component is. Since we know that observing the high frequency components by observing the location where the smallest b is, and it points to the location the high frequency signal (or discontinuity part) from the Fig.12. Therefore, comparing the red circle part both in the Fig.14 and Fig.15, we can observe this effect: when the vanishing moment is higher, the high frequency component of the result after Wavelet transform is more precise.

Fig.14. the vanishing moment = 1

17

Fig.15. the vanishing moment = 2 A complex version of the Mexican hat Wavelet can easily be constructed by setting the analytic version signal of the real-valued mother wavelet. However, in practice the Morlet wavelet is used when a complex wavelet function is required.

5. Morlet WaveletThe Morlet wavelet is the most popular complex wavelet used in practice, which mother wavelet is defined asw 0 1 (t ) = 4 e jw0t e 2 2

t e 2 . 2

where w0 is the central frequency of the mother wavelet. Note that the term e

2 w0 2

is

used for correcting the non-zero mean of the complex sinusoid, and it can be negligible when w0 > 5 . Therefore in some research the mother wavelet definition of the Morlet wavelet is:t2 2

(t ) =where the central frequency w0 > 5 .

14

e

jw0t

e

,

The Morlet wavelet has a form very similar to the Gabor transform. The important difference is that the window function dose also be scaled by the scaling parameter, while the size of window in Gabor transform is fixed.

18

6.Application of the Morlet wavelet analysis in the electrocardiogramThe application of the Morlet wavelet analysis in the electrocardiogram (ECG) is mainly to discriminate the abnormal heartbeat behavior. Since the variation of the abnormal heartbeat is a non-stationary signal, then this signal is suitable for wavelet-based analysis. Here we see an example about the wavelet analysis application in the ECG. Fig.16 shows the pressure in the aorta and ECG corresponding to an episode of ventricular fibrillation in a porcine model. We have some note following about this example: (1) The ECG signal has a typical random or unstructured appearance. However, the aorta pressure trace reveals regular low amplitude spikes in the Fig.16 (a). (2) The irregular activity of the much larger ventricular muscle mass completely obscured this atrial activity in the standard ECG recording shown in the Fig.16 (b). (3) The wavelet energy scalogram for this signal is plotted in the Fig.16 (c). (A Morlet wavelet was used in the study.) The high amplitude band at around 810 Hz is much more in this interval than the other traces where no atrial pulsing was apparent. (4) In the Fig.16 (d), the location of zero wavelet phase between 1.3 and 1.5 Hz is plotted. The phase plot exhibits a strikingly regular pattern with the zero phase lines aligning themselves remarkably well with the atrial pulsing of the pressure trace. (5) This result suggests that (wavelet) phase information, which obscure to the traditional methods, may be used to interrogate the ECG for underlying low-level mechanical activity in the atria.

19

Fig.16 Simultaneous ECG and pressure recordings. (a)The aorta pressure trace, with (b) ECG, corresponding (c) wavelet energy plot obtained using the Morlet wavelet. (d) The zero phase lines of the Morlet wavelet transform. The plots correspond to the time period 726.23731.31 s after the initiation of VF. (After Addison et al 2002 IEEE Eng. Med. Biol. ( IEEE 2002).)

7. History of Wavelet transform1910, Haar families, which was proposed by the mathematician Alfrd Haar. Haar wavelet is the first literature relates to the wavelet transform, but the concept of the wavelet did not exist at that time. 1981, Morlet, wavelet concept, which was proposed by the geophysicist Jean Morlet. 1984, Morlet and Grossman, wavelet. Morlet and the physicist Alex Grossman invented the term wavelet. 1985, Meyer, orthogonal wavelet. Before 1985, a lot of researchers thought that there was no orthogonal wavelet except Haar wavelet. The mathematician Yves Meyer constructed the second orthogonal wavelet called Meyer wavelet in 1985. 1987, International conference in France, which is the 1st international conference20

about Wavelet transform. 1988, Mallat and Meyer, multiresolution. Stephane Mallat and Meyer proposed the concept of multiresolution. 1988, Daubechies, compact support orthogonal wavelet. Ingrid Daubechies found a systematical method to construct the compact support orthogonal wavelet. 1989, Mallat, fast wavelet transform. With the appearance of this fast algorithm, the wavelet transform had numerous applications in the signal processing field.

8. ConclusionIn this tutorial, we first compare the difference for the Fourier transform, Short-Time Frequency transform (STFT), and Wavelet transform. We mainly introduce the wavelet concept and force on the two parts Continuous Wavelet Transform and the complex Wavelet Transform, which two classes does the Morlet Wavelet belong to. Besides, the complex Wavelet can overcome these problems met in the real-valued Wavelet: Oscillation, Shift Variance and Aliasing. In practice the Morlet Wavelet was used in the electrocardiogram (ECG) study. We also take a briefly example which is the application of the Morlet wavelet analysis in the ECG. In general, the mother Wavelet is designed by real-valued function, and however in this example we can see the application of the phase from the complex Wavelet transform.

9. Reference[1] C. L. Liu, A Tutorial of the Wavelet Transform. February 23, 2010. [2] P. S. Addison, Wavelet transforms and the ECG: a review, in IOP science 8 August 2005 [3] I. W. Selesnick, R. G. Baraniuk, and N. G. Kingsbury, The Dual-Tree Complex Wavelet Transform, in IEEE SIGNAL PROCESSING MAGAZINE, NOVEMBER 2005. [4] W.Wu, Extracting Signal frequency information in time/frequency domain by means of continuous wavelet transform, in International Conference on Control, Automation and Systems 2007. [5] P.M. Bentley and J.T.E. McDonnel, Wavelet transforms: an introduction, in ELECTRONICS B COMMUNICATION ENGINEERING JOURNAL AUGUST 1994. [6] ]J.J Ding, Slides of time-frequency analysis and wavelet transform

21