The Discrete Wavelet Transform (DWT) decomposes a finite-length signal into a hierarchy of approximation and detail coefficients at multiple scales. Unlike the DFT, which projects onto infinitely-supported sinusoids, wavelets are compactly supported: they are simultaneously localised in time and frequency. This dual localisation makes the DWT the canonical tool for detecting transients, edges, and non-stationary features — phenomena that a pure frequency representation blurs across the entire spectrum.
In embedded condition-monitoring and edge-ML pipelines, the DWT is valued for three properties:
its
A single DWT stage passes a length-$N$ sequence
where
This guarantees that the two sub-bands together cover the full bandwidth without overlap or gap.
The approximation
The layout is critical: level
The synthesis (inverse) stage upsamples each sub-band by two and applies the dual filter pair
Combined, analysis and synthesis satisfy
to floating-point rounding.
For an orthogonal wavelet the DWT is a unitary transform:
where
Haar (
Daubechies-2 (
| Case | Time | Space | Notes |
|---|---|---|---|
| Forward | Geometric series: |
||
| Inverse | Identical pass through synthesis bank |
Memory is one length-$N$ coefficient buffer, two length-$N/2$ working arrays, and the static
filter table of size
Input:
Stage 1 (analysis):
| 0 | 0 | 1 | ||
| 1 | 2 | 3 |
Coefficient buffer (layout detail | approx):
Reconstruction: upsample
-
$N$ must be divisible by$2^L$ . Odd-length or non-aligned signals at deeper levels produce fractional half-lengths and are rejected by design. - Boundary handling must match. Periodic (modulo) extension is used for both analysis and synthesis; mixing it with symmetric extension on the other pass destroys perfect reconstruction.
-
Filter length vs. signal length. At each level the signal halves; once it equals
$P$ the periodic convolution wraps completely. Stop decomposition before the signal shorter than the filter length to avoid artefacts. -
Fast-math reordering. With
-ffast-mathfloating-point associativity relaxes; reconstruction residuals may reach$10^{-5}$ rather than$10^{-7}$ for 32-bit floats.
- Daubechies-$N$ family: increasing tap count adds vanishing moments, improving energy compaction for smooth signals at the cost of longer filters and larger boundary effects.
- Biorthogonal wavelets (e.g. CDF 9/7 used in JPEG 2000): analysis and synthesis filters differ but still give perfect reconstruction; not orthogonal, so Parseval does not hold.
- Wavelet packet transform: decomposes both approximation and detail sub-bands at every level, forming a full binary tree of sub-bands for adaptive best-basis selection.
-
Undecimated (stationary) DWT: omits downsampling; translation-invariant but
$O(N \log N)$ .
- Denoising: threshold small detail coefficients (hard or soft thresholding); edges and transients survive while broadband noise is suppressed.
- Compression: retain the few large coefficients; the rest encode to zero-runs.
- Feature extraction for edge-ML: wavelet energy per sub-band is a compact descriptor for vibration, ECG, or acoustic signals.
- Multi-rate filtering: each level is a critically sampled octave-band filter, useful for hearing-aid and audio-codec pipelines.
- ConvolutionCorrelation: the inner analysis/synthesis loops are FIR convolutions; the same periodic-indexing trick is used.
- FastFourierTransform / RealFastFourierTransform: alternative time-frequency view; the DWT trades uniform frequency resolution for logarithmic-scale (dyadic) resolution.
- PowerDensitySpectrum: Welch's method is an FFT-based power estimator; the DWT gives a non-uniform octave-band equivalent.
- DiscreteCosineTransform: a block transform (fixed basis); the DWT is a multi-scale transform (variable support).
- S. Mallat, "A Theory for Multiresolution Signal Decomposition: The Wavelet Representation," IEEE Trans. Pattern Analysis and Machine Intelligence, 11(7), 674–693, 1989.
- I. Daubechies, Ten Lectures on Wavelets, SIAM, 1992.
- G. Strang and T. Nguyen, Wavelets and Filter Banks, Wellesley-Cambridge Press, 1996.
- A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed., Ch. 11, 2010.