The wavelet transform decomposes a signal into components localized in both time (or space) and scale (which relates to frequency, though the axis is more precisely a scale axis than a frequency axis), using scaled and shifted versions of a prototype function called the mother wavelet. Unlike the Fourier transform, which provides only frequency information, the wavelet transform reveals when in time particular frequency content occurs, making it well suited to non-stationary signals.
In practice
Two main forms appear in embedded work. The Continuous Wavelet Transform (CWT) operates on a signal using a continuously parameterized set of scales and translations; it is computationally expensive and rarely implemented directly on resource-constrained MCUs, but it appears in offline analysis tools and as a conceptual reference. The Discrete Wavelet Transform (DWT) evaluates a discrete, dyadic subset of scales and translations and is the most common practical form used on embedded targets, though lifting-based variants and undecimated transforms also appear in some applications. It can be implemented efficiently as a cascade of FIR filter pairs -- a low-pass filter producing approximation coefficients and a high-pass filter producing detail coefficients -- followed by downsampling by two at each stage. This structure is called a filter bank, and the "Wavelets I - From Filter Banks to the Dilation Equation" and "Discrete Wavelet Transform Filter Bank Implementation (part 1 and 2)" blog posts cover this architecture in detail.
Common embedded applications include vibration analysis on industrial sensors, ECG and PPG signal processing on wearables, image compression (JPEG 2000 uses a wavelet core), and edge detection in machine vision pipelines running on Cortex-A or DSP-class processors. On smaller MCUs, single-level or two-level DWT decompositions are sometimes used for feature extraction before transmitting compressed data or feeding a classifier, reducing the bandwidth or compute burden downstream.
A key practical consideration is filter choice. Different wavelet families -- Haar, Daubechies (db2 through db20), Symlets, Coiflets -- offer different trade-offs among filter length, smoothness, vanishing moments, orthogonality, and symmetry. Longer filters generally produce better frequency selectivity in practice, but also increase per-stage compute and introduce more latency, which matters in real-time embedded loops. The "Wavelets II - Vanishing Moments and Spectral Factorization" post explains how vanishing moments relate to the filter design. Haar wavelets (db1) have the shortest possible filter (length 2) and are sometimes used on very constrained 8-bit or 16-bit targets because a single stage reduces to simple additions and subtractions.
Memory layout deserves attention on MCUs with limited RAM. An in-place lifting-scheme implementation of the DWT can operate on a single buffer without a separate output array, which is important when working with tens of kilobytes or less. Fixed-point implementations using Q-format arithmetic are common on MCUs without an FPU; coefficient scaling must be managed carefully to avoid overflow or excessive quantization noise across multiple decomposition levels.
Discussed on DSPRelated
Frequently asked
What is the difference between the DWT and the CWT?
The CWT evaluates the transform at a continuous range of scales and translation positions, producing a highly redundant, dense time-scale representation. It is useful for analysis and visualization but is computationally impractical on most embedded targets. The DWT uses a discrete, dyadic set of scales (powers of two) and matching translation steps, reducing redundancy and enabling an efficient filter bank implementation with O(N) complexity. Embedded implementations almost always use the DWT.
How does a DWT filter bank work?
Each stage of a DWT filter bank splits the input into two streams: a low-pass filtered and downsampled stream (approximation coefficients) and a high-pass filtered and downsampled stream (detail coefficients). The next stage then processes only the approximation coefficients, progressively halving the
sample rate while isolating coarser frequency bands. The specific
FIR filter coefficients are determined by the chosen wavelet family. The 'Discrete Wavelet Transform Filter Bank Implementation (part 1)' and 'part 2' blog posts walk through this structure with implementation detail.
How does the wavelet transform compare to the FFT for embedded signal analysis?
The
FFT gives a global frequency spectrum with no time localization -- a transient event at 1 kHz looks the same whether it occurs at the start or end of the window. The DWT retains time localization alongside frequency content, which is valuable for detecting transient faults, arrhythmias, or mechanical impacts. The trade-off is that DWT output is harder to interpret intuitively, and choosing an appropriate wavelet family adds design complexity. For stationary signals where frequency content does not change over the analysis window, the FFT is usually simpler and sufficient. The 'Evaluate Window Functions for the
Discrete Fourier Transform' post is a useful companion for understanding when the DFT/FFT approach is the right tool.
Which wavelet should I choose for an embedded application?
Haar (db1) is the simplest -- filter length 2, integer arithmetic friendly -- suitable for very constrained MCUs or as a first prototype. Daubechies wavelets (db2 through db8) are a common practical choice, offering a good balance between filter length and smoothness; db4 (filter length 8) is frequently seen in biomedical and vibration work. Longer filters (db10 and up, Symlets, Coiflets) give better frequency selectivity and more vanishing moments but increase per-stage multiply-accumulate count and latency. The 'Wavelets II - Vanishing Moments and Spectral Factorization' post explains how vanishing moments affect the ability to represent smooth signals compactly.
Can the DWT be computed in real time on a microcontroller?
Yes, for moderate data rates and a small number of decomposition levels. A single-level DWT on a Cortex-M4F at 168 MHz (STM32F4 series) can process audio-rate data (16-48 kHz) in real time using fixed-point or single-precision
floating-point arithmetic in many implementations, though actual throughput depends heavily on implementation details, filter length, and compiler configuration. Deeper decompositions and longer filters increase the load, but the filter bank structure is cache- and pipeline-friendly. On 8-bit MCUs such as AVR or PIC, real-time DWT is feasible only at low sample rates or with very short filters like Haar, due to limited multiply throughput.
Differentiators vs similar concepts
The wavelet transform is most often compared to the
Fourier transform (
DFT/
FFT). The DFT decomposes a signal into sinusoids of fixed frequency and provides no information about when in time those frequencies occur -- it assumes the signal is stationary over the analysis window. The wavelet transform provides joint time-scale localization (related to, but not identical to, time-frequency localization), making it better suited to non-stationary signals at the cost of a less intuitive frequency axis. The
Short-Time Fourier Transform (STFT) is a middle ground: it applies a sliding windowed DFT to gain some time localization, but its time-frequency resolution is fixed by the chosen window length. The DWT instead uses analysis at multiple scales: finer scale (higher frequency) components are captured with shorter effective support in time, while coarser scale (lower frequency) components are captured with longer effective support, which matches the structure of many natural signals. This is a conceptual distinction from STFT windowing rather than a literal windowing mechanism. Within wavelet transforms, the DWT (dyadic, filter bank implementation) should not be confused with the CWT (continuous scale parameter, dense and redundant), which is rarely used directly in embedded implementations.