The Wavelet Transform: Variable Time

Một phần của tài liệu The biomedical engineering handbook (Trang 115 - 120)

5.2.1 Continuous Wavelet Transform

A decomposition of a signal, based on a wider frequency mapping and consequently better time resolution is possible with the wavelet transform. The Continuous Wavelet Transform (CWT) [3] is defined thusly for a continuous signal, x(t),

CWTx, a)= 1

a

x(at)gtτ

a

dt (5.1a)

or with change of variable as

CWTx, a)=√ a

x(at)g

tτ a

dt (5.1b)

where g(t)is the mother or basic wavelet,∗denotes a complex conjugate, a is the scale factor, and t is a time shift. Typically, g(t)is a bandpass function centered around some center frequency, fo. Scale a allows the compression or expansion of g(t)[1,3,10]. A larger scale factor generates the same function compressed in time whereas a smaller scale factor generates the opposite. When the analyzing signal is contracted in time, similar signal features or changes that occur over a smaller time window can be studied.

For the wavelet transform, the same basic wavelet is employed with only alterations in this signal arising from scale changes. Likewise, a smaller scale function enables larger time translations or delays in the basic signal.

The notion of scale is a critical feature of the wavelet transform because of time and frequency domain reciprocity. When the scale factor, a, is enlarged, the effect on frequency is compression as the analysis window in the frequency domain is contracted by the amount 1/a [10]. This equal and opposite frequency domain scaling effect can be put to advantageous use for frequency localization. Since we are using bandpass filter functions, a center frequency change at a given scale yields wider or narrower frequency response changes depending on the size of the center frequency. This is the same in the analog or digital filtering theories as “constant-Q or quality factor” analysis [1,10,11]. At a given Q or scale factor, frequency translates are accompanied by proportional bandwidth or resolution changes. In this regard, wavelet transforms are often written with the scale factor rendered as

a= f f0

(5.2) or

CWTx

τ, a= f f0

= 1 f/f0

x(t)g

tτ f/f0

dt (5.3)

This is the equivalent to logarithmic scaling of the filter bandwidth or octave scaling of the filter bandwidth for power-of-two growth in center frequencies. Larger center frequency entails a larger bandwidth and vice versa.

The analyzing wavelet, g(t), should satisfy the following conditions:

1. Belong to L2 (R), that is, be square integrable (be of finite energy) [2]

2. Be analytic[G(ω) = 0 forω < 0]and thus be complex-valued. In fact many wavelets are real- valued; however, analytic wavelets often provide valuable phase information [3], indicative of changes of state, particularly in acoustics, speech, and biomedical signal processing [8]

3. Be admissible. This condition was shown to enable invertibility of the transform [2,6,12]:

s(t)= 1 cg

−∞

a>0W(τ, a) 1

ag tτ

a 1

a2dadτ (5.3a)

where cg is a constant that depends only on g(t)and a is positive. For an analytic wavelet the constant should be positive and convergent:

cg = ∞

0

|G(ω)|2

ω dω <∞ (5.3b)

which in turn imposes an admissibility condition on g(t). For a real-valued wavelet, the integrals from both−∞to 0 and 0 to+∞should exist and be greater than zero.

The admissibility condition along with the issue of reversibility of the transformation is not so critical for applications where the emphasis is on signal analysis and feature extraction. Instead, it is often more important to use a fine sampling of both the translation and scale parameters. This introduces redundancy which is typical for the CWT, unlike for the discrete wavelet transform, which is used in its dyadic, orthogonal, and invertible form.

All admissible wavelets with g Œ L1(R) have no zero-frequency contribution. That is, they are of zero mean,

+∞

−∞ g(t)dt=0 (5.3c)

or equivalently G(ω)=0 forω=0, meaning that g(t)should not have nonzero DC [6,12]. This condition is often being applied also to nonadmissible wavelets.

The complex-valued Morlet’s wavelet is often selected as the choice for signal analysis using the CWT.

Morlet’s wavelet [3] is defined as

g(t)=ej2πfote(t2/2) (5.4a) with its scaled version written as

g t

a

=ej(2πfo/a)te(t2/2a2) (5.4b)

Morlet’s wavelet insures that the time-scale representation can be viewed as a time-frequency distribution as in Equation 5.3. This wavelet has the best representation in both time and frequency because it is based on the Gaussian window. The Gaussian function guarantees a minimum time-bandwidth product, providing for maximum concentration in both time and frequency domains [1]. This is the best compromise for a simultaneous localization in both time and frequency as the Gaussian function’s Fourier transform is simply a scaled version of its time domain function. Also the Morlet wavelet is defined by an explicit function and leads to a quasi continuous discrete version [11]. A modified version of Morlet’s wavelet leads to fixed center frequency, fo, with width parameter, s,

g(σ, t)=ej2πfote(t2/2σ2) (5.4c) Once again time–frequency (TF) reciprocity determines the degree of resolution available in time and frequency domains. Choosing a small window size, s, in the time domain, yields poor frequency resolution while offering excellent time resolution and vice versa [11,13]. To satisfy the requirement for admissibility and G(0)=0, a correction term must be added. Forω >5, this correction term becomes negligibly small and can be omitted. The requirements for the wavelet to be analytic and of zero mean is best satisfied for ω0=5.3 [3].

Following the definition in Equation 5.1a and Equation 5.1b the discrete implementation of the CWT in the time-domain is a set of bandpass filters with complex-valued coefficients, derived by dilating the basic wavelet by the scale factor, a, for each analyzing frequency. The discrete form of the filters for each a is the convolution:

S(k, a)= 1

a

k+(π/2) i=k(π/2)

s(i)gmik

a

= 1

a

π/2

i=−(π/2)

s(ki)gmi

a

(5.4d)

with k=t/Ts, where Tsis the sampling interval. The summation is over a number of terms, n. Because of the scaling factor a in the denominator of the argument of the wavelet, the wavelet has to be resampled at a sampling interval Ts/a for each scale a. Should the CWT cover a wide frequency range, a computational problem would arise. For example, if we wish to display the CWT over 10 octaves (a change by one octave corresponds to changing the frequency by a factor of 2), the computational complexity (size of the summation) increases by a factor of 210 = 1024. The algorithm by Holschneider et al. [14] solves this problem for certain classes of wavelets by replacing the need to resample the wavelet with a recursive application of an interpolating filter. Since scale is a multiplicative rather than an additive parameter, another way of reducing computational complexity would be by introducing levels between octaves (voices) [15]. Voices are defined to be the scale levels between successive octaves, uniformly distributed in a multiplicative sense [13,16]. Thus, the ratio between two successive voices is constant. For example, if one wishes to have ten voices per octave, then the ratio between successive voices is 21/10. The distance between two levels, ten voices apart is an octave.

The CWT can also be implemented in the frequency domain. Equation 5.1 may be formulated in the frequency domain as:

CWT, a)=√ a

S(ω)G(aω)ejω (5.5)

where S(ω)and G(ω)denote the Fourier transformed s(t)and g(t), and j =(−1)1/2. The analyzing wavelet g(t)generally has the following Fourier transform:

Gτ,u(ω)=√

aG(aω)ejωτ (5.6a)

The Morlet wavelet [Equation 5.4a and Equation 5.4b] in frequency domain is a Gaussian function:

Gm(ω)= 1

√2ωeω0)2/2 (5.6b)

From Equation 5.6a and Equation 5.6b it can be seen that for low frequencies,ω, (larger scales a) the width, D/ω, of the Gaussian is smaller and vice versa. In fact, the ratio Dω/omega is constant [1], that is, Morlet wavelets may be considered filter banks of the constant-Q factor.

Based on Equation 5.5, Equation 5.6a, and Equation 5.6b the wavelet transform can be implemented in the frequency domain. At each scale, the Fourier image of the signal can be computed as

Y(ω, a)=S(ω)Gm, a) (5.6c)

with S(ω)being the Fourier transform of the signal, Gm, a)being the scaled Fourier image of the Morlet wavelet at scale a, and the operation c standing for element-by-element multiplication (windowing in frequency domain). The signal at each scale a will finally be obtained by applying the inverse Fourier transform:

CWT, a)=(FFT)−1Y(ω, a) (5.6d) This approach has the advantage of avoiding computationally intensive convolution of time-domain signals by using multiplication in the frequency domain, as well as the need of resampling the mother wavelet in the time domain [17,18].

Note that the CWT is, in the general case, a complex-valued transformation. In addition to its mag- nitude, its phase often contains valuable information pertinent to the signal being analyzed, particularly in instants of transients [3]. Sometimes the TF distribution of the nonstationary signal is much more important. This may be obtained by means of real-valued wavelets. Alternatives to the complex-valued Morlet wavelet are simpler, real-valued wavelets that may be utilized for the purpose of the CWT. For example, the early Morlet wavelet, as used for seismic signal analysis [19], had the following real-valued form:

g(t)=cos(5t)et2/2 (5.6e)

It had a few cycles of a sine wave tapered by a Gaussian envelope. Though computationally attractive, this idea contradicts the requirement for an analytic wavelet, that is, its Fourier transform G(ω)=0 forω <0.

An analytic function is generally complex-valued in the time domain and has its real and imaginary parts as Hilbert transforms of each other [2,20]. This guarantees only positive-frequency components of the analyzing signal.

A variety of analyzing wavelets have been proposed in recent years for time-scale analysis of the ECG. For example, Senhadji et al. [21] applied a pseudo-Morlet’s wavelet to bandpass filtering to find out whether some abnormal ECG events like extrasystoles and ischemia are mapped on specific decomposition levels:

g(t)=C(1+cos(2πf0t))e−2iπkf0t t≤1/2f0 and k integer ∈ {−1, 0, 1} (5.6f) with the product kf0 defining the number of oscillations of the complex part, and C representing a normalizing constant such thatg = 1. The above function is a modulated complex sine wave that would yield complex-valued CWT including phase information. However its envelope is a cosine, rather than a Gaussian, as in the case of the complex Morlet wavelet. It is well known that strictly the Gaussian function (both in time and frequency domain) guarantees the smallest possible time-bandwidth product which means maximum concentration in the time and frequency domains [22].

The STFT has the same time-frequency resolution regardless of frequency translations. The STFT can be written as

STFT, f)= ∞

−∞x(t)g(tτ)e−2πjftdt (5.7) where g(t)is the time window that selects the time interval for analysis or otherwise known as the spectrum localized in time. Figure 5.1 shows comparative frequency resolution of both the STFT as well as the wavelet transform. The STFT is often thought to be analogous to a bank of bandpass filters, each shifted by a certain modulation frequency, f0. In fact, the Fourier transform of a signal can be interpreted as passing the signal through multiple bandpass filters with impulse response, g(t)ej2πft, and then using complex demodulation to downshift the filter output. Ultimately, the STFT as a bandpass filter rendition simply translates the same low pass filter function through the operation of modulation. The characteristics of the filter stay the same though the frequency is shifted.

Unlike the STFT, the wavelet transform implementation is not frequency independent so that higher fre- quencies are studied with analysis filters with wider bandwidth. Scale changes are not equivalent to varying modulation frequencies that the STFT uses. The dilations and contractions of the basis function allow for variation of time and frequency resolution instead of uniform resolution of the Fourier transform [15].

Both the wavelet and Fourier transform are linear time–frequency representations (TFRs) for which the rules of superposition or linearity apply [10]. This is advantageous in cases of two or more separate signal constituents. Linearity means that cross-terms are not generated in applying either the linear TF or time- scale operations. Aside from linear TFRs, there are quadratic TF representations which are quite useful in displaying energy and correlation domain information. These techniques, also described elsewhere in this volume include the Wigner–Ville distribution (WVD), smoothed WVD, the reduced inference

f0 2f0 3f0 4f0

Fourier transform

Response

Wavelet transform

Frequency h(2–4) g(2–4)g(2–3) g(2–2) g(2–1)

FIGURE 5.1 Comparative frequency resolution for STFT and WT. Note that frequency resolution of STFT is constant across frequency spectrum. The WT has a frequency resolution that is proportional to the center frequency of the bandpass filter.

distribution (RID), etc. One example of the smoothed Wigner-Ville distribution is W(t , f)=

s

t−1

2τ

e2πfs

t+1 2τ

h

τ 2

(5.8a)

where h(t), is a smoothing function. In this case the smoothing kernel for the generalized or Cohen’s class of TFRs is

φ(t ,τ)=h τ

2

δ(t) (5.8b)

These methods display joint TF information in such a fashion as to display rapid changes of energy over the entire frequency spectrum. They are not subject to variations due to window selection as in the case of the STFT. A problematic area for these cases is the elimination of those cross-terms that are the result of the embedded correlation.

It is to be noted that the scalogram or scaled energy representation for wavelets can be represented as a WVD as [1]

|CWTx, a)|2=

Wx(u, n)Wgut

a , an

dudn (5.9a)

where

Wx(t , f)=

x

t−1 2τ

ejτ2πfx

t+1 2τ

(5.9b)

5.2.2 The Discrete Wavelet Transform

In the discrete TFRs both time and scale changes are discrete. Scaling for the discrete wavelet transform involves sampling rate changes. A larger scale corresponds to subsampling the signal. For a given number of samples a larger time swath is covered for a larger scale. This is the basis of signal compression schemes as well [23]. Typically, a dyadic or binary scaling system is employed so that given a discrete wavelet function, y(x), is scaled by values that are binary. Thus

ψ2j(t)=2jψ(2jt) (5.10a)

where j is the scaling index and j=0,−1,−2,. . .. In a dyadic scheme, subsampling is always decimation- in-time by a power of 2. Translations in time will be proportionally larger as well as for a more sizable scale.

It is for discrete time signals that scale and resolution are related. When the scale is increased, resolution is lowered. Resolution is strongly related to frequency. Subsampling means lowered frequency content.

Rioul and Vetterli [1] use the microscope analogy to point out that smaller scale (higher resolution) helps to explore fine details of a signal. This higher resolution is apparent with samples taken at smaller time intervals.

Một phần của tài liệu The biomedical engineering handbook (Trang 115 - 120)

Tải bản đầy đủ (PDF)

(611 trang)