Signal Convolution: Interactive Sliding-Window Visualizer

simulator intermediate ~10 min
Loading simulation...
Gaussian convolution — smooth, ring-free filtering

A Gaussian kernel of width 10 applied to a 3 Hz sine wave produces a smoothed output with preserved phase and reduced high-frequency content.

Formula

(f * g)(t) = ∫ f(τ) · g(t − τ) dτ
F{f * g} = F{f} · F{g} (convolution theorem)
Discrete: (f * g)[n] = Σ f[k] · g[n − k]

The Most Important Operation in Signal Processing

Convolution is everywhere — every time you blur a photo, apply an audio equalizer, detect edges in an image, or process a neural network layer, you are performing convolution. It is the mathematical operation that describes how any linear system responds to any input, making it the universal language of signal processing.

Slide, Multiply, Sum

The intuition behind convolution is simple: flip the kernel, slide it across the input signal, and at each position multiply overlapping values and add them up. The result is a new signal that represents the weighted, running average of the input. This simulator animates the entire process so you can watch the output being constructed point by point.

Kernels Shape the Output

Different kernels produce dramatically different effects. A box kernel (rectangular window) averages neighboring values equally, producing a moving average. A Gaussian kernel weights nearby values more heavily, creating smoother results without ringing. A derivative kernel (like [-1, 0, 1]) detects changes, turning smooth regions into silence and edges into peaks.

The Convolution Theorem: Speed Through Frequency

Direct convolution requires O(N²) multiplications, which becomes impractical for large signals. The convolution theorem provides an elegant shortcut: transform both signals to the frequency domain using FFT, multiply pointwise, and transform back. This reduces the cost to O(N log N) and is how all practical convolution engines work for large kernels.

FAQ

What is convolution in signal processing?

Convolution is a mathematical operation that combines two signals to produce a third. One signal (the input) is slid across another (the kernel), and at each position, corresponding values are multiplied and summed. It is the fundamental operation behind filtering, blurring, edge detection, and system response analysis.

What is the relationship between convolution and filtering?

Every linear time-invariant (LTI) filter can be described by its impulse response. The output of the filter for any input is simply the convolution of the input with the impulse response. Convolution in the time domain equals multiplication in the frequency domain.

Why is the Gaussian kernel special?

The Gaussian kernel is unique because it minimizes the joint time-frequency uncertainty product. It introduces no ringing, has no negative lobes, and its Fourier transform is also a Gaussian. It is the default smoothing kernel in most applications.

What is the convolution theorem?

The convolution theorem states that convolution in the time domain is equivalent to pointwise multiplication in the frequency domain: F(f*g) = F(f) · F(g). This allows fast convolution via FFT — multiply spectra and inverse transform — which is O(N log N) instead of O(N²).

Sources

Embed

<iframe src="https://homo-deus.com/lab/signal-processing/convolution/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub