Main Content

Continuous Wavelet Transform as a Bandpass Filter

CWT as a Filtering Technique

The continuous wavelet transform (CWT) computes the inner product of a signal, f(t), with translated and dilated versions of an analyzing wavelet, ψ(t). The definition of the CWT is:

C(a,b;f(t),ψ(t))=f(t)1aψ*(tba)dt

You can also interpret the CWT as a frequency-based filtering of the signal by rewriting the CWT as an inverse Fourier transform.

C(a,b;f(t),ψ(t))=12πf^(ω)ψ^¯(aω)eiωbdω

where f^(ω) and ψ^(ω) are the Fourier transforms of the signal and the wavelet.

From the preceding equations, you can see that stretching a wavelet in time causes its support in the frequency domain to shrink. In addition to shrinking the frequency support, the center frequency of the wavelet shifts toward lower frequencies. The following figure demonstrates this effect for a hypothetical wavelet and scale (dilation) factors of 1,2, and 4.

This depicts the CWT as a bandpass filtering of the input signal. CWT coefficients at lower scales represent energy in the input signal at higher frequencies, while CWT coefficients at higher scales represent energy in the input signal at lower frequencies. However, unlike Fourier bandpass filtering, the width of the bandpass filter in the CWT is inversely proportional to scale. The width of the CWT filters decreases with increasing scale. This follows from the uncertainty relationships between the time and frequency support of a signal: the broader the support of a signal in time, the narrower its support in frequency. The converse relationship also holds.

In the wavelet transform, the scale, or dilation operation is defined to preserve energy. To preserve energy while shrinking the frequency support requires that the peak energy level increases. The implementation of cwt in Wavelet Toolbox™ uses L1 normalization. The quality factor, or Q factor of a filter is the ratio of its peak energy to bandwidth. Because shrinking or stretching the frequency support of a wavelet results in commensurate increases or decreases in its peak energy, wavelets are often referred to as constant-Q filters.

DFT-Based Continuous Wavelet Transform

The equation in the preceding section defined the CWT as the inverse Fourier transform of a product of Fourier transforms.

C(a,b;f(t),ψ(t))=12πf(ω)ψ^*(aω)ejωbdω

The time variable in the inverse Fourier transform is the translation parameter, b.

This suggests that you can compute the CWT with the inverse Fourier transform. Because there are efficient algorithms for the computation of the discrete Fourier transform and its inverse, you can often achieve considerable savings by using fft and ifft when possible.

To obtain a picture of the CWT in the Fourier domain, start with the definition of the wavelet transform:

<f(t),ψa,b(t)>=1af(t)ψ*(tba)dt

If you define:

ψ˜a(t)=1aψ*(t/a)

you can rewrite the wavelet transform as

(fψ˜a)(b)=f(t)ψ˜a(bt)dt

which explicitly expresses the CWT as a convolution.

To implement the discretized version of the CWT, assume that the input sequence is a length N vector, x[n]. The discrete version of the preceding convolution is:

Wa[b]=n=0N1x[n]ψ˜a[bn]

To obtain the CWT, it appears you have to compute the convolution for each value of the shift parameter, b, and repeat this process for each scale, a.

However, if the two sequences are circularly-extended (periodized to length N), you can express the circular convolution as a product of discrete Fourier transforms. The CWT is the inverse Fourier transform of the product

Wa(b)=1N2πΔtk=0N1X(2πk/NΔt)ψ*(a2πk/NΔt)ej2πkb/N

where Δt is the sampling interval (period).

Expressing the CWT as an inverse Fourier transform enables you to use the computationally-efficient fft and ifft algorithms to reduce the cost of computing convolutions.

The cwt function implements the CWT.