Can someone explain convolution to me?

In summary, convolution is a way to take a signal and multiply it by the response of a filter. This produces a new signal that is a weighted sum of the original and the filter's response.
  • #1
jack476
328
125
I'm trying to teach myself a bit of the content of signals and systems before the term starts using BP Lathi's "Linear Systems and Signals". I'm on convolutions now, and while I understand how to do them, I don't think I fully understand what exactly they are.

So, for a given unit impulse response h(t) and an input x(t), the response y(t) is the convolution of x(t) with h(t). For example (going off of what was in the book), if
h(t) = e-2tu(t)

and x(t) = e-tu(t)

The convolution x(t)*h(t) is e-t-e-2tu(t). The other convolution drills I was able to solve without trouble. However, I don't feel like I understand intuitively what convoluting two signals is actually doing.

Furthermore, I don't get what the connection is to the Laplace transform, which was touched on very briefly in my introductory differential equations course but not really explained. I understood how to use convolutions with Laplace transform problems, but still, I don't philosophically understand what's happening.
 
Engineering news on Phys.org
  • #2
Please read the wikipwdia article on convolution. It has pictures that might help explain.

Basically, convolving in the time domain is the same as multiplying in the frequency domain.

For example, convolving the impulse response of a rectangular filter with a signal in the time domain is the same as multiplying the rectangular filter with the spectrum of the signal and then converting back to the time domain.

I'll TRY to explain it intuitively. This is crudely put, but every part of each signal (the impulse response and the signal) interacts (affects) every part of the other. For example. a change in anyone point in the impulse response will affect every point of the applied signal. That is like saying changing the filter changes the whole signal.

http://en.wikipedia.org/wiki/Convolution
 
  • #3
I'll comment on convolution in a non-EE context. Perhaps some other forum member will clarify its relation to EE !

For a purely qualitative example think of a flatbed scanner scanning a B&W image from a piece of paper. Suppose the detectors have a lens over them that picks up light from a significant area away from the center of the detector. Then the intensity at a pixel at (x,y) in the copy (i.e. the output image) won't determined just by the intensity of the pixel (or point) that location in the original image. Instead, the pixel in the copy will be some sort of combination of the intensities in an area around (x,y) in the original.

A simplified model for the action of a lens on a detector is that the output intensity measured at (x,y) is a weighted sum of the intensities at some locations in the vicinity of (x,y). To specify such a model, you can specify a function g(s,t) that gives the weights at location (s,t) in a coordinate system where (0,0) is the center of the lens.

It's worth noting that the above model makes the scanner analogous to a "linear time invariant system" (at least by my understanding of LTI). For example, if you shift the original paper to the right, the output input of the copy shifts to the right. (So spatial translation of input produces spatial translation of output - analgous to the similar behavior of an LTI under time translation.) Since the lens output is a weighted sum, if we apply to the "sum" of two original images, it produces a copy that can be regarded as the sum of two copies, one of each original.

For more quantitative example, simplify the above situation to a 1-dimensional image - some sort of intensity that exists at each point on a line. The lens is will also be simplified so instead of outputing a weighted average from a 2-D area, it outputs a weighted sum of intensities around a point on the line.

The lens can be described by a function g(s). We think of s = 0 as the center of the detector and g(s) as the weight used for the intensity measured a distance s from the center.

Think of the "orginal" 1-D image as given by f(x), which gives the intensity at location x.

Let the value of the "copy" at location x be H(x). To compute H(x) in a discrete case, we need to form the weighted sum of terms of the form f(x+s) g(s). Such a term represents the value of the original image at distance s from x (to the right of x , if s > 0) times the value of the weight that the lens applies at distance s from the center of the detector. We sum such terms for all possible values of s at which the lens has an effect.

The analogous result in the case of continuous image and lens is [itex] H(x) = \int f(x+s) g(s) ds [/itex] where the bounds of integration can be set to [itex] -\infty, \infty [/itex] by the trick of defining [itex] g(s)[/itex] to be zero outside the area that affects the lens's output.

This definition of convolution is not a perfect match the EE definition of convolution. The EE definition wants [itex] \int f(x-s)g(s) ds [/itex].

To our integral [itex] \int f(x+s) g(s) ds [/itex], apply the change of variable [itex] s = -u [/itex] to obtain:
[itex] \int_{\infty}^{-\infty} f(x -u) g(-u) (-du) = \int_{-\infty}^{\infty} f(x-u) g(-u) du [/itex]

Reverting to using [itex] s [/itex] as the variable we have [itex] \int_{-\infty}^{\infty} f(x-s)g(-s) ds [/itex] versus the EE definition [itex] \int_{-\infty}^{\infty} f(x-s) g(s) ds [/itex].

If we had specified the weights [itex] g(s) [/itex] "reversed", so that [itex] g(-s) [/itex] gave the weight to be used at a distance [itex] s [/itex] to the right of the center of the lens, then would have computed [itex] H(x) [/itex] as [itex] H(x) = \int_{-\infty}^{\infty} f(x+s)g(-s) ds [/itex] and after a change of variable similar to the above work, this would have become exactly equal to the EE definition.

Explanations (like http://en.wikipedia.org/wiki/Convolution ) of the EE version of convolution as a series of steps, have the step of reflecting the signal g(s) about the origin. This is analogous to writing the weight function [itex] g(s) [/itex] that models the lens in the "reversed" way. I don't know why it's natural to reflect [itex] g(s) [/itex] in EE applications.

Convolution can also be explained as a calculation to find the distribution of the sum of two independent random variables. That calculation matches the EE definition of convolution. This is a long post, so I won't go into that interpretation here.
 
Last edited:
  • #5
I've never quite understood people who ask pure math questions here when there are nice math subsections just one floor above on PF...
 

1. What is convolution and why is it important in science?

Convolution is a mathematical operation that combines two functions to produce a third function. It is important in science because it allows us to analyze and manipulate data in a way that highlights patterns and relationships between variables.

2. How does convolution work?

Convolution involves integrating two functions, one of which is typically a signal and the other is a filter or kernel. The result is a new function that represents the overlap between the two original functions. This process is repeated over different sections of the original signal, resulting in a convolutional neural network.

3. What are the applications of convolution in science?

Convolution has many applications in science, including image and signal processing, computer vision, natural language processing, and deep learning. It is also used in fields such as physics, biology, and economics to analyze and understand complex data sets.

4. Can you give an example of convolution in action?

An example of convolution in action is in image processing, where a kernel is applied to an image to enhance certain features or filter out noise. For instance, a blur filter can be applied to a photo by convolving the image with a Gaussian kernel, resulting in a smoother and less detailed version of the original image.

5. Is convolution the same as correlation?

No, convolution and correlation are similar but not the same. They both involve combining two functions, but the main difference is that convolution flips one of the functions before integrating, while correlation does not. This leads to different results and applications in science.

Similar threads

Replies
5
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
184
  • Topology and Analysis
Replies
1
Views
409
  • Electrical Engineering
Replies
7
Views
2K
  • Electrical Engineering
Replies
2
Views
2K
Replies
4
Views
760
  • Electrical Engineering
Replies
1
Views
935
  • Electrical Engineering
Replies
3
Views
801
Back
Top