DSPRelated.com

Deconvolution

Category: Algorithms

Deconvolution is the process of estimating an original signal from a measured output that has been distorted by a known (or estimated) convolution with a system's impulse response. The result is generally an approximation, since the problem is ill-posed even when the impulse response is known. In embedded signal processing, it is used to reverse or partially compensate for the effects of filtering, channel distortion, or sensor dynamics.

In practice

Deconvolution appears in embedded systems wherever a physical process blurs or shapes a signal in a way that must be undone before further processing. Common examples include removing the frequency response of a sensor (such as an accelerometer or microphone), equalizing a communications channel, restoring sharpness in image sensor pipelines, and compensating for the passband shaping of an anti-aliasing filter upstream in a measurement chain (noting that bandwidth-limited information lost by that filter cannot be recovered).

In practice, deconvolution is ill-posed: dividing by the system's frequency response amplifies noise wherever that response is small. Naive frequency-domain division produces unstable or noisy results on real hardware. Regularized approaches, such as least-squares deconvolution (which frames the problem as minimizing ||Hx - y||^2 with a regularization term), are more robust and are practical to implement on Cortex-M4/M7 class processors or DSP cores that have hardware multiply-accumulate support. The blog post "Deconvolution by least squares (Using the power of linear algebra in signal processing)" covers this formulation in detail.

On resource-constrained MCUs (8- or 16-bit cores, small SRAM), full least-squares deconvolution is often too expensive. Designers instead use simpler inverse FIR filters designed offline, or limit deconvolution to short kernels where the matrix operations stay within available memory and cycle budgets. Fixed-point arithmetic requires careful scaling to avoid overflow in the intermediate matrix products.

A related consideration is latency. Frequency-domain deconvolution via FFT introduces a block delay proportional to the transform length, which may be unacceptable in closed-loop control applications. Time-domain FIR-based inverse filtering adds deterministic, sample-level latency and is often preferred when the impulse response of the distorting system is short and well-characterized.

 Learn this in DSP Foundations

Discussed on DSPRelated

Frequently asked

What is the difference between deconvolution and inverse filtering?
Inverse filtering is one specific approach to deconvolution: you design a filter whose frequency response is the reciprocal of the distorting system's response and apply it to the measured signal. Deconvolution is the broader goal; least-squares, Wiener filtering, and regularized methods are all forms of deconvolution that handle noise and ill-conditioning better than a pure inverse filter.
Why is deconvolution considered numerically unstable, and how is that handled on embedded targets?
The distorting system's frequency response may be near zero at some frequencies, making its inverse very large and causing noise at those frequencies to be amplified enormously. On embedded targets, the standard mitigations are regularization (adding a small constant to the denominator before dividing, as in Tikhonov regularization), Wiener filtering (which weights the inverse by the signal-to-noise ratio), or constraining the inverse filter length so high-frequency amplification is naturally limited.
Can deconvolution be done in real time on a microcontroller?
Yes, if the inverse filter is precomputed offline and implemented as a fixed FIR or IIR filter at runtime. Cortex-M4 and M7 devices that include an FPU and DSP/SIMD-style instructions can run moderately long FIR inverse filters in real time, though achievable filter length depends on clock rate, sample rate, and memory bandwidth for the specific part and configuration. Online least-squares deconvolution that re-solves a matrix system each block is much more expensive and typically requires a DSP core or application processor.
How does deconvolution relate to the decimation filters used in sigma-delta ADCs?
Sigma-delta ADC decimation chains (sinc filters and subsequent stages) impose a known frequency-domain shaping on the signal. If that passband shaping must be compensated downstream, the compensation can resemble deconvolution in form, though standard sigma-delta decimation is not typically described as deconvolution. Designing later filter stages to partially invert the response of earlier stages is an approach relevant to topics like multi-stage decimator optimization.
What data types are typically used for deconvolution on embedded processors?
Floating-point (single precision) is common on Cortex-M4/M7 and DSP cores because the dynamic range requirements of matrix inversion and division are hard to manage in fixed-point without careful analysis. Fixed-point Q-format implementations are possible for short, well-conditioned kernels, but require offline analysis of the coefficient range and intermediate accumulator growth to avoid overflow or excessive quantization error.

Differentiators vs similar concepts

Deconvolution is sometimes conflated with equalization. Equalization in communications typically refers to compensating for intersymbol interference in a channel and is optimized for symbol detection rather than waveform recovery; deconvolution aims to reconstruct the original continuous signal or sequence. Deconvolution is also distinct from correlation: correlation measures similarity between signals, while deconvolution actively inverts a known system response. Finally, deconvolution differs from simple high-pass or shelving filter compensation in that it operates on the full impulse response of the distorting system, not just a coarse frequency tilt.