Convolutions

advertisement
Convolutions
by John S. Colton, Feb 2008
What is a convolution? Physical ideas to think about.
1. Spectrometer. A spectrometer is a device which you can use to separate light into its colors by
means of a diffraction grating. It’s basically just like a large prism. To measure the amount of
light at the different colors, you place a detector in the diffracted beam (or in the refracted beam,
in the case of a prism), and move it back and forth as you record the intensity. However, the
detector is not infinitely narrow—so if you attempt to measure how much light is at wavelength
0, what you’re actually measuring is the light intensity for a small range of wavelengths around
0. How is what you are actually measuring related to the true I()?
2. Shadows. A light source creates a shadow of an object. If the light source is point-like, the
shadow that is produced can be called the “true shadow”. However, an actual light source is not a
true point, but rather has a certain physical extent. How is the shadow created by an actual light
source different than the true shadow?
How would both of the above examples change if the detector were even larger? If the light
source were even larger?
Definition
Convolutions frequently arise when you know the solution to the problem for a point detector or
point source, and want to determine the solution for a source/detector of finite size. In that case,
the answer is said to be the solution for a point source/detector convoluted with a “kernel
function” (or more simply, just a “kernel”) that models the finite size of source/detector. The
convolution is represented by the symbol , and the mathematical definition of the convolution
of two functions is:
g ( )  a (t )  b(t ) 

 a(t )b(  t )dt

a(t) could be the solution function and b(t) the kernel, or vice versa—it doesn’t matter because
the convolution is commutative, as can readily be proved from the definition:
a(t )  b(t )  b(t )  a(t )
The kernel, let’s call it b(t), is sometimes called a “weighting function”, and can be thought of as
a window through which we observe the function a(t). In the spectrometer example above, the
kernel function is perhaps even a literal window, the entrance to the detector. When a
convolution is done in time rather than space, the window moves with time and basically causes
the answer function at a given time to be the average of a(t) during the kernel’s window. In fact,
the window can be give rise to a more complicated average (a weighted average) if b(t) is not
simply on/off (one or zero).
1
Performing a convolution generally smoothes the original function a(t), i.e. sharp peaks are
rounded and steep slopes are reduced. Because of the smoothing process, the convolution is often
referred to as “filtering,” and just like any smoothing operation, the price you pay for smoothing
the function is a certain loss of information. The amount of smoothing depends on the nature of
the two functions a(t) and b(t). Convolutions in fact are used in data processing to smooth out
noise, to do digital image processing, and so forth.
MathWorld puts it like this: A convolution is an integral that expresses the amount of overlap of
one function as it is shifted over another function. It therefore “blends” one function with
another.
Website applet
This website has an excellent convolution applet:
http://www.jhu.edu/~signals/convolve/index.html
You can select functions for b(t) and a(t) by choosing the pre-made functions (blue, red, green,
and black), or by defining your own function via clicking and dragging your mouse. b(t) is on the
left, a(t) on the right.
Once you have chosen your functions, click on the next set of axes. The two functions will
appear—b(t) on the left and a(t) on the right. Then you must drag the window function through
the original function. (Or, since the convolution is commutative, you can equally well think of
the window function as being the stationary one.)
As you do so, the two graphs at the bottom will appear. They represent graphically the way the
integral for g() is performed in the boxed equation above. You vary the position, , from - to
+. When you vary the position:


The top graph shows the functions b(t) and a(t) multiplied together, just like they are on the
inside of the integral in the definition above. Also, b(t) is reversed in the graph, just like it is
for the definition above. This graph changes continuously as you vary .
The bottom graph shows what you get when you integrate the top graph. For each position ,
the integral gives you g(). Once it has calculated the convolution for a particular , that point
gets fixed on the graph. Thus, when you are done dragging the window function through the
original function, you are left with a plot of g() in the bottom graph.
Play around with the applet to improve your “convolution intuition”.
Convolution of a delta function
If you convolve a function with a delta function, you obtain:
a (t )   (t ) 

 a(t ) (  t )dt  a( )

In other words, you just get the original function back again. No information has been lost!
2
If the kernel is allowed to change from a pure delta function to a rectangular pulse of decreasing
width, then the resulting convolution becomes an increasingly smoother version of a(t). The
amount of smoothing is directly related to the width of the rectangular pulse, and (as mentioned
above) causes information to be lost from the original function.
Convolution theorems
An interesting result occurs if you take the Fourier transform of a convolution. This is done in a
worked homework problem, P0.30, and is called the Convolution Theorem:
FT a(t )  b(t )  2 FT a(t ) FT b(t )
In other words, aside from the factor of sqrt(2), the Fourier transform of a convolution is
equal to the product of the Fourier transforms of the individual functions.
Here’s a related theorem:
FT a(t )  b(t ) 
1
2
FT a(t )  FT b(t )
In other words, aside from the factor of 1/sqrt(2), the Fourier transform of a product of two
functions is equal to the convolution of the Fourier transforms of the individual functions.
The above two theorems also apply to inverse Fourier transforms.
3
Download