Wavelet convolution: basic principle

Peter Barrett Bryan
2 min readMay 26, 2022

An introduction to wavelets and the mathematics of convolution

Motivation

We’ve previously discussed how to decompose a signal of interest into frequencies components using the Fourier transform.

What if we want to characterize where in a signal given frequencies occur, though? The wavelet transform addresses just this problem, allowing us to localize where features — like frequency components — occur in a signal.

In data science, we are often interested in localizing specific frequencies. Wavelet convolution is an invaluable tool to add to our digital signal processing toolkit.

What’s a wavelet?

Figure 1: Basic Gaussian-modulated sinusoid wavelet. Image by author.

Wavelet comes from the French “ondelette”: a little wave. First, adorable. Second, pretty apt! A wavelet is an oscillator with a brief duration.

There are lots of different wavelets optimized for different applications, but we’ll consider the simplest. Figure 1 shows the real and imaginary components of a Gaussian-modulated sinusoid wavelet. The name gives plenty of hints! It is a simple orthogonal (i.e., cosine and sine) pair that has been modulated (i.e., ramped up and down) by a Gaussian. The “envelope” of this wavelet function is a Gaussian.

Visualizing wavelet convolution

Now, let’s put wavelet convolution to use! Let’s define an FM chirp as a signal that we want to characterize. We’ll ramp it from 1Hz to 15Hz (Figure 2, first subplot). To analyze our signal, let’s construct a wavelet at 8Hz, i.e. an 8Hz sine and cosine function modulated by a Gaussian.

Figure 2: Sample convolution of wavelet with linearly ramped FM chirp. Figure by author.

Let’s see what happens when we “convolve” the two. Convolution simply entails sliding our wavelet along our target signal (Figure 2, second subplot), multiplying pointwise (Figure 2, third subplot), and summing. Taking the magnitude of the complex pair results in Figure 4, fourth subplot.

Check that out! Convolution with our 8Hz wavelet correctly indicates where in our chirp 8Hz occurs. We’ve used wavelet convolution to localize the frequency characteristics of our signal.

Wavelet convolution has given us a tool to determine where in a signal frequencies occur. What if we don’t have a specific frequency of interest, though? Up next, we’ll explore the application of the continuous wavelet transform (CWT) to localize frequencies over a wide range!

Thank you for taking the time to read!

--

--

Peter Barrett Bryan

Software engineer with specializations in remote sensing, machine learning applied to computer vision, and project management.