This tool lets you visualize and understand the convolution of two functions—an essential operation in signal processing, image analysis, and engineering. Experiment with different functions and see how they interact, giving you insight into how convolution shapes signals and transforms data.
Convolution is a mathematical operation that combines two functions \(f\) and \(g\) to produce a third function \((f*g)\). It is widely used in signal processing, image analysis, and neural networks, for its ability to detect patterns and transform data. In essence, convolution allows you to blend two signals or functions, providing insight into how they interact over time.
The convolution of two functions \(f(t)\) and \(g(t)\) is defined as:
Where:
The operation involves multiplying the function \(f(t)\) with a shifted and reversed version of \(g(t)\), and then integrating over all values of \(\tau\). In discrete signal processing, this becomes a summation over discrete values:
Select Functions: Enter two functions \(f(t)\) and \(g(t)\) or choose from a list of predefined functions.
View Functions: The first canvas displays the graphs of \(f(t)\), \(g(t)\), and \((f*g)(t)\).
Visualize Convolution: The second canvas illustrates the convolution process by showing \(g(t)\) sliding backwards over \(f(t)\). As it slides across, the value of the convolution integral is illustrated by the green shaded area; the integral over the product of the sliding functions. You can view the convolution at different points in time by dragging the dotted line left or right. The area shaded in green should equal the height of the convolution at any given point in time.
f(t) =
g(t) =
A convolution is an infinite integral. This poses problems for computation. It is important to keep this in mind when choosing functions to convolve. If you the input functions are not well behaved, the convolution result will be inaccurate. This problem can usually be fixed by multiplying both functions by a unit step. For example, \(f(t) = t\) and \(g(t) = sin(t)\) produces an unreliable convolution, while \(f(t) = tu(t)\) and \(g(t) = sin(t)u(t)\) is stable.
| Syntax | Function | Definition |
|---|---|---|
| e | Euler's Number | \(\approx 2.71828182846...\) |
| pi | π | \(\approx 3.14159265359...\) |
| u(t) | Unit Step / Heaviside Step | \( u(t) = \begin{cases} 1 & \textrm{if } t \geq 0 \\ 0 & \textrm{if } t < 0 \\ \end{cases} \) |
| dd(t) | Dirac Delta | \( \delta(t) = \begin{cases} \infty & \textrm{if } t = 0 \\ 0 & \textrm{if } t ≠ 0 \\ \end{cases} \) |
| sin(t) | Sine Wave | \(sin(t)\) |
| cos(t) | Cosine Wave | \(cos(t)\) |
| abs(t) | Absolute Value | \(|t|\) |
| sqrt(t) | Square Root | \(\sqrt{t}\) |
| cbrt(t) | Cube Root | \({t}^{\frac{1}{3}}\) |
| exp(t) | Exponential | \(e^t\) |
| log(t) | Natural Logarithm | \(log_{e}({t})\) |
| log10(t) | Base 10 Logarithm | \(log_{10}(t)\) |
| log2(t) | Base 2 Logarithm | \(log_{2}(t)\) |
| floor(t) | Floor Function | \(\lfloor{t}\rfloor\) |
| ceil(t) | Ceiling Function | \(\lceil{t}\rceil\) |
| min(a, b) | Minimum | \( min(a, b) = \begin{cases} a & \textrm{if } a \leq b \\ b & \textrm{if } a > b \\ \end{cases} \) |
| max(a, b) | Maximum | \( max(a, b) = \begin{cases} a & \textrm{if } a \geq b \\ b & \textrm{if } a < b \\ \end{cases} \) |
| c ? a : b | Piecewise / Ternary Operator | \( = \begin{cases} a & \textrm{if } c \\ b & \textrm{if } \neg c \\ \end{cases} \) |