Convolution
, and autocorrelation.
≈ 19 min read
Convolution. encyclopegia.org, snapshot enwiki-001371560685. /a/convolution
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
and autocorrelation. For the operations involving function f , and assuming the height of f is 1.0, the value of the result at 5 different points is indicated by the shaded area below each point. The symmetry of f is the reason f \star g and g*f are identical in this example.
In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions f and g that produces a third function f*g , as the integral of the product of the two functions after one is reflected about the y-axis and shifted. The term convolution refers to both the resulting function and to the process of computing it.
The integral is evaluated for all values of shift, producing the convolution function. The choice of which function is reflected and shifted before the integral does not change the integral result (see commutativity). Graphically, it expresses how the 'shape' of one function is modified by the other.
Some features of convolution are similar to cross-correlation: for real-valued functions, of a continuous or discrete variable, convolution f*g differs from cross-correlation f \star g only in that either f(x) or g(x) is reflected about the y-axis in convolution; thus it is a cross-correlation of g(-x) and f(x) , or f(-x) and g(x) . For complex-valued functions, the cross-correlation operator is the adjoint of the convolution operator. Convolution has applications that include probability, statistics, acoustics, spectroscopy, signal processing and image processing, computer vision and human vision, geophysics, engineering, physics, and differential equations.
The convolution can be defined for functions on Euclidean space and other groups (as algebraic structures). For example, periodic functions, such as the discrete-time Fourier transform, can be defined on a circle and convolved by periodic convolution. (See row 18 at .)
A discrete convolution can be defined for functions on the set of integers. Generalizations of convolution have applications in the field of numerical analysis and numerical linear algebra, and in the design and implementation of finite impulse response filters in signal processing. Computing the inverse of the convolution operation is known as deconvolution.
(f * g)(t) := \int_{-\infty}^\infty f(\tau) g(t - \tau) \, d\tau. An equivalent definition is (see commutativity): (f * g)(t) := \int_{-\infty}^\infty f(t - \tau) g(\tau)\, d\tau. While the symbol t is used above, it need not represent the time domain.
At each t , the convolution formula can be described as the area under the function f(\tau) weighted by the function g(-\tau) shifted by the amount t . As t changes, the weighting function g(t-\tau) emphasizes different parts of the input function f(\tau) ; If t is a positive value, then g(t-\tau) is equal to g(-\tau) that slides or is shifted along the \tau -axis toward the right (toward +\infty ) by the amount of t , while if t is a negative value, then g(t-\tau) is equal to g(-\tau) that slides or is shifted toward the left (toward -\infty ) by the amount of |t| . For functions f , g supported on only [0,\infty) (i.e., zero for negative arguments), the integration limits can be truncated, resulting in: (f * g)(t) = \int_{0}^{t} f(\tau) g(t - \tau)\, d\tau \quad \ \text{for } f, g : [0, \infty) \to \mathbb{R}.
For the multi-dimensional formulation of convolution, see domain of definition (below). f(t) * g(t) \mathrel{:=} \underbrace{\int_{-\infty}^\infty f(\tau) g(t - \tau)\, d\tau}_{(f * g )(t)}, which has to be interpreted carefully to avoid confusion. For instance, f(t) * g(t-t_0) is equivalent to (f*g)(t-t_0) , but f(t-t_0) * g(t-t_0) is in fact equivalent to (f * g)(t-2t_0) .
F(s) = \int_{-\infty}^\infty e^{-su} \ f(u) \ \text{d}u and G(s) = \int_{-\infty}^\infty e^{-sv} \ g(v) \ \text{d}v respectively, the convolution operation (f * g)(t) can be defined as the inverse Laplace transform of the product of F(s) and G(s) . More precisely, \begin{align} F(s) \cdot G(s) &= \int_{-\infty}^\infty e^{-su} \ f(u) \ \text{d}u \cdot \int_{-\infty}^\infty e^{-sv} \ g(v) \ \text{d}v \\ &= \int_{-\infty}^\infty \int_{-\infty}^\infty e^{-s(u + v)} \ f(u) \ g(v) \ \text{d}u \ \text{d}v \end{align} Let t = u + v , then \begin{align} F(s) \cdot G(s) &= \int_{-\infty}^\infty \int_{-\infty}^\infty e^{-st} \ f(u) \ g(t - u) \ \text{d}u \ \text{d}t \\ &= \int_{-\infty}^\infty e^{-st} \underbrace{\int_{-\infty}^\infty f(u) \ g(t - u) \ \text{d}u}_{(f * g)(t)} \ \text{d}t \\ &= \int_{-\infty}^\infty e^{-st} (f * g)(t) \ \text{d}t. \end{align} Note that F(s) \cdot G(s) is the bilateral Laplace transform of (f * g)(t) . A similar derivation can be done using the unilateral Laplace transform (one-sided Laplace transform). The convolution operation also describes the output (in terms of the input) of an important class of operations known as linear time-invariant (LTI).
See LTI system theory for a derivation of convolution as the result of LTI constraints. In terms of the Fourier transforms of the input and output of an LTI operation, no new frequency components are created. The existing ones are only modified (amplitude and/or phase).
In other words, the output transform is the pointwise product of the input transform with a third transform (known as a transfer function). See Convolution theorem for a derivation of that property of convolution. Conversely, convolution can be derived as the inverse Fourier transform of the pointwise product of two Fourier transforms.
(f * g_T)(t) \equiv \int_{t_0}^{t_0+T} \left[\sum_{k=-\infty}^\infty f(\tau + kT)\right] g_T(t - \tau)\, d\tau, where t_0 is an arbitrary choice. The summation is called a periodic summation of the function f . When g_T is a periodic summation of another function, g , then f*g_T is known as a circular or cyclic convolution of f and g . And if the periodic summation above is replaced by f_T , the operation is called a periodic convolution of f_T and g_T .
(f * g)[n] = \sum_{m=-\infty}^\infty f[m] g[n - m], or equivalently (see commutativity) by: (f * g)[n] = \sum_{m=-\infty}^\infty f[n-m] g[m]. The convolution of two finite sequences is defined by extending the sequences to finitely supported functions on the set of integers. When the sequences are the coefficients of two polynomials, then the coefficients of the ordinary product of the two polynomials are the convolution of the original two sequences.
This is known as the Cauchy product of the coefficients of the sequences. Thus, when is non-zero over a finite interval (representing, for instance, a finite impulse response), a finite summation may be used: (f * g)[n]=\sum_{m=-M}^M f[n-m]g[m]. (f * g_{_N})[n] \equiv \sum_{m=0}^{N-1} \left(\sum_{k=-\infty}^\infty {f}[m + kN]\right) g_{_N}[n - m]. The summation on k is called a periodic summation of the function f. If g_{_N} is a periodic summation of another function, g, then f*g_{_N} is known as a circular convolution of f and g. When the non-zero durations of both f and g are limited to the interval [0,N-1], f*g_{_N} reduces to these common forms: The notation f *_N g for cyclic convolution denotes convolution over the cyclic group of integers modulo .
Circular convolution arises most often in the context of fast convolution with a fast Fourier transform (FFT) algorithm. (f * g )(x) = \int_{\mathbf{R}^d} f(y)g(x-y)\,dy = \int_{\mathbf{R}^d} f(x-y)g(y)\,dy, and is well-defined only if and decay sufficiently rapidly at infinity in order for the integral to exist.
Conditions for the existence of the convolution may be tricky, since a blow-up in at infinity can be easily offset by sufficiently rapid decay in . The question of existence thus may involve different conditions on and : \frac{1}{p}+\frac{1}{q}=\frac{1}{r}+1, then \left\Vert f*g\right\Vert_r\le\left\Vert f\right\Vert_p\left\Vert g\right\Vert_q,\quad f\in L^p,\ g\in L^q, so that the convolution is a continuous bilinear mapping from to .
The Young inequality for convolution is also true in other contexts (circle group, convolution on ). The preceding inequality is not sharp on the real line: when , there exists a constant such that: \left\Vert f*g\right\Vert_r\le B_{p,q}\left\Vert f\right\Vert_p\left\Vert g\right\Vert_q,\quad f\in L^p,\ g\in L^q. The optimal value of was discovered in 1975 and independently in 1976, see Brascamp–Lieb inequality.
A stronger estimate is true provided : \|f * g\|_r\le C_{p,q}\|f\|_p\|g\|_{q,w} where \|g\|_{q,w} is the weak norm. Convolution also defines a bilinear continuous map L^{p,w}\times L^{q,w}\to L^{r,w} for 1 , owing to the weak Young inequality: \|f * g\|_{r,w}\le C_{p,q}\|f\|_{p,w}\|g\|_{r,w}. \int_{\mathbb{R}^d} {f}(y)g(x-y)\,dy = (f*g)(x) \in C^\infty(\mathbb{R}^d) . More generally, it is possible to extend the definition of the convolution in a unique way with \varphi the same as f above, so that the associative law f* (g* \varphi) = (f* g)* \varphi remains valid in the case where f is a distribution, and g a compactly supported distribution . \int_{\mathbf{R}^d} f(x) \, d(\mu*\nu)(x) = \int_{\mathbf{R}^d}\int_{\mathbf{R}^d}f(x+y)\,d\mu(x)\,d\nu(y). In particular,
(\mu*\nu)(A) = \int_{\mathbf{R}^d\times\mathbf R^d}1_A(x+y)\, d(\mu\times\nu)(x,y), where A\subset\mathbf R^d is a measurable set and 1_A is the indicator function of A . This agrees with the convolution defined above when μ and ν are regarded as distributions, as well as the convolution of L 1 functions when μ and ν are absolutely continuous with respect to the Lebesgue measure.
The convolution of measures also satisfies the following version of Young's inequality \|\mu* \nu\|\le \|\mu\|\|\nu\| where the norm is the total variation of a measure. Because the space of measures of bounded variation is a Banach space, convolution of measures can be treated with standard methods of functional analysis that may not apply for the convolution of distributions.
Commutativity: f * g = g * f Proof: By definition: (f * g)(t) = \int^\infty_{-\infty} f(\tau)g(t - \tau)\, d\tau Changing the variable of integration to u = t - \tau the result follows. Associativity: f * (g * h) = (f * g) * h Proof: This follows from using Fubini's theorem (i.e., double integrals can be evaluated as iterated integrals in either order).
Distributivity: f * (g + h) = (f * g) + (f * h) Proof: This follows from linearity of the integral. Associativity with scalar multiplication: a (f * g) = (a f) * g for any real (or complex) number a . Multiplicative identity: No algebra of functions possesses an identity for the convolution.
The lack of identity is typically not a major inconvenience, since most collections of functions on which the convolution is performed can be convolved with a delta distribution (a unitary impulse, centered at zero) or, at the very least (as is the case of L 1 ) admit approximations to the identity. The linear space of compactly supported distributions does, however, admit an identity under the convolution.
Specifically, f * \delta = f where δ is the delta distribution. Inverse element: Some distributions S have an inverse element S −1 for the convolution which then must satisfy S^{-1} * S = \delta from which an explicit formula for S −1 may be obtained. The set of invertible distributions forms an abelian group under the convolution.
Complex conjugation: \overline{f * g} = \overline{f} * \overline{g} Time reversal: If q(t) = r(t)*s(t), then q(-t) = r(-t)*s(-t). Proof (using convolution theorem): q(t) \ \stackrel{\mathcal{F}}{\Longleftrightarrow}\ \ Q(f) = R(f)S(f) q(-t) \ \stackrel{\mathcal{F}}{\Longleftrightarrow}\ \ Q(-f) = R(-f)S(-f) \begin{align} q(-t) &= \mathcal{F}^{-1}\bigg\{R(-f)S(-f)\bigg\}\\ &= \mathcal{F}^{-1}\bigg\{R (-f)\bigg\} * \mathcal{F}^{-1}\bigg\{S(-f)\bigg\}\\ &= r(-t) * s(-t) \end{align} Relationship with differentiation: (f * g)' = f' * g = f * g' Proof: \begin{align} (f * g)' & = \frac{d}{dt} \int^\infty_{-\infty} f(\tau) g(t - \tau) \, d\tau \\ & =\int^\infty_{-\infty} f(\tau) \frac{\partial}{\partial t} g(t - \tau) \, d\tau \\ & =\int^\infty_{-\infty} f(\tau) g'(t - \tau) \, d\tau = f* g'. \end{align} Relationship with integration: If F(t) = \int^t_{-\infty} f(\tau) d\tau, and G(t) = \int^t_{-\infty} g(\tau) \, d\tau, then (F * g)(t) = (f * G)(t) = \int^t_{-\infty}(f * g)(\tau)\,d\tau. \int_{\mathbf{R}^d}(f * g)(x) \, dx=\left(\int_{\mathbf{R}^d}f(x) \, dx\right) \left(\int_{\mathbf{R}^d}g(x) \, dx\right).
This follows from Fubini's theorem. The same result holds if f and g are only assumed to be nonnegative measurable functions, by Tonelli's theorem. \frac{d}{dx}(f * g) = \frac{df}{dx} * g = f * \frac{dg}{dx} where \frac{d}{dx} is the derivative.
More generally, in the case of functions of several variables, an analogous formula holds with the partial derivative: \frac{\partial}{\partial x_i}(f * g) = \frac{\partial f}{\partial x_i} * g = f * \frac{\partial g}{\partial x_i}. A particular consequence of this is that the convolution can be viewed as a "smoothing" operation: the convolution of f and g is differentiable as many times as f and g are in total.
These identities hold for example under the condition that f and g are absolutely integrable and at least one of them has an absolutely integrable (L 1 ) weak derivative, as a consequence of Young's convolution inequality. For instance, when f is continuously differentiable with compact support, and g is an arbitrary locally integrable function, \frac{d}{dx}(f* g) = \frac{df}{dx} * g. These identities also hold much more broadly in the sense of tempered distributions if one of f or g is a rapidly decreasing tempered distribution, a compactly supported tempered distribution or a Schwartz function and the other is a tempered distribution.
On the other hand, two positive integrable and infinitely differentiable functions may have a nowhere continuous convolution. In the discrete case, the difference operator D f(n) = f(n + 1) − f(n) satisfies an analogous relationship: D(f * g) = (Df) * g = f * (Dg). \mathcal{F}\{f * g\} = \mathcal{F}\{f\}\cdot \mathcal{F}\{g\} where \mathcal{F}\{f\} denotes the Fourier transform of f . \mathcal W\left(C^{(1)}x \ast C^{(2)}y\right) = \left(\mathcal W C^{(1)} \bull \mathcal W C^{(2)}\right)(x \otimes y) = \mathcal W C^{(1)}x \circ \mathcal W C^{(2)}y , where \bull is face-splitting product, \otimes denotes Kronecker product, \circ denotes Hadamard product (this result is an evolving of count sketch properties ).
This can be generalized for appropriate matrices \mathbf{A},\mathbf{B} : \mathcal W\left((\mathbf{A}x) \ast (\mathbf{B}y)\right) = \left((\mathcal W \mathbf{A}) \bull (\mathcal W \mathbf{B})\right)(x \otimes y) = (\mathcal W \mathbf{A}x) \circ (\mathcal W \mathbf{B}y) from the properties of the face-splitting product. \tau_x (f * g) = (\tau_x f) * g = f * (\tau_x g) where τ x f is the translation of the function f by x defined by (\tau_x f)(y) = f(y - x). If f is a Schwartz function, then τ x f is the convolution with a translated Dirac delta function τ x f = f ∗ τ x δ. So translation invariance of the convolution of Schwartz functions is a consequence of the associativity of convolution.
Furthermore, under certain conditions, convolution is the most general translation invariant operation. Informally speaking, the following holds Suppose that S is a bounded linear operator acting on functions which commutes with translations: S(τ x f) = τ x (Sf) for all x. Then S is given as convolution with a function (or distribution) g S ; that is Sf = g S ∗ f. Thus some translation invariant operations can be represented as convolution.
Convolutions play an important role in the study of time-invariant systems, and especially LTI system theory. The representing function g S is the impulse response of the transformation S. A more precise version of the theorem quoted above requires specifying the class of functions on which the convolution is defined, and also requires assuming in addition that S must be a continuous linear operator with respect to the appropriate topology.
It is known, for instance, that every continuous translation invariant continuous linear operator on L 1 is the convolution with a finite Borel measure. More generally, every continuous translation invariant continuous linear operator on L p for 1 ≤ p (f * g)(x) = \int_G f(y) g\left(y^{-1}x\right)\,d\lambda(y). It is not commutative in general.
In typical cases of interest G is a locally compact Hausdorff topological group and λ is a (left-) Haar measure. In that case, unless G is unimodular, the convolution defined in this way is not the same as \int f\left(xy^{-1}\right)g(y) \, d\lambda(y) . The preference of one over the other is made so that convolution with a fixed function g commutes with left translation in the group: L_h(f* g) = (L_hf)* g. Furthermore, the convention is also required for consistency with the definition of the convolution of measures given below.
However, with a right instead of a left Haar measure, the latter integral is preferred over the former. On locally compact abelian groups, a version of the convolution theorem holds: the Fourier transform of a convolution is the pointwise product of the Fourier transforms. The circle group T with the Lebesgue measure is an immediate example.
For a fixed g in L 1 (T), we have the following familiar operator acting on the Hilbert space L 2 (T): T {f}(x) = \frac{1}{2 \pi} \int_{\mathbf{T}} {f}(y) g( x - y) \, dy. The operator T is compact. A direct calculation shows that its adjoint T* is convolution with \bar{g}(-y).
By the commutativity property cited above, T is normal: T* T = TT* . Also, T commutes with the translation operators. Consider the family S of operators consisting of all such convolutions and the translation operators.
Then S is a commuting family of normal operators. According to spectral theory, there exists an orthonormal basis {h k } that simultaneously diagonalizes S. This characterizes convolutions on the circle. Specifically, we have h_k (x) = e^{ikx}, \quad k \in \mathbb{Z},\; which are precisely the characters of T. Each convolution is a compact multiplication operator in this basis.
This can be viewed as a version of the convolution theorem discussed above. A discrete example is a finite cyclic group of order n. Convolution operators are here represented by circulant matrices, and can be diagonalized by the discrete Fourier transform.
A similar result holds for compact groups (not necessarily abelian): the matrix coefficients of finite-dimensional unitary representations form an orthonormal basis in L 2 by the Peter–Weyl theorem, and an analog of the convolution theorem continues to hold, along with many other aspects of harmonic analysis that depend on the Fourier transform. : (\mu * \nu)(E) = \iint 1_E(xy) \,d\mu(x) \,d\nu(y) for each measurable subset E of G. The convolution is also a Radon measure, whose total variation satisfies \|\mu * \nu\| \le \left\|\mu\right\| \left\|\nu\right\|. In the case when G is locally compact with (left-)Haar measure λ, and μ and ν are absolutely continuous with respect to a λ, so that each has a density function, then the convolution μ∗ν is also absolutely continuous, and its density function is just the convolution of the two separate density functions.
In fact, if either measure is absolutely continuous with respect to the Haar measure, then so is their convolution. If μ and ν are probability measures on the topological group then the convolution μ∗ν is the probability distribution of the sum X + Y of two independent random variables X and Y whose respective distributions are μ and ν.
(f_1*\cdots*f_m)(x)=\inf_x \{ f_1(x_1)+\cdots+f_m(x_m) | x_1+\cdots+x_m = x\}. It can be shown that the infimal convolution of convex functions is convex.
Furthermore, it satisfies an identity analogous to that of the Fourier transform of a traditional convolution, with the role of the Fourier transform is played instead by the Legendre transform: \varphi^*(x) = \sup_y ( x\cdot y - \varphi(y)). We have: (f_1*\cdots *f_m)^*(x) = f_1^*(x) + \cdots + f_m^*(x). S * \operatorname{id}_X = \operatorname{id}_X * S = \eta\circ\varepsilon.
Further reading
. Dominguez-Torres, Alejandro (Nov 2, 2010). "Origin and history of convolution".
41 pgs. https://slideshare.net/Alexdfar/origin-adn-history-of-convolution. Cranfield, Bedford MK43 OAL, UK. Retrieved Mar 13, 2013. . . . . . . . . . . . A video lecture on the subject of convolution given by Salman Khan Example of FFT convolution for pattern-recognition (image processing) Intuitive Guide to Convolution A blogpost about an intuitive interpretation of convolution.
Text derived from https://en.wikipedia.org/w/index.php?oldid=1371560685 under CC BY-SA 4.0; modifications have been made.