I need someone to explain to me what convolution is

In summary, convolution is a way to compute output of a linear system given an input and an impulse response. Convolution is a generalization of the so-called moving average. For example, the average of the last 50 days of a stock's trading is called the stock's 50-day moving average. The data from each new trading day bumps off the oldest data from 50 days ago. The moving average is a special case of convolution, where one function is nothing more than a rectangle. Imagine that the stock price for 10 days was something like this, where each entry represents the price on a specific day. If you wanted the 2-day moving average of this data, you would convolve it with a "box
  • #1
kolycholy
39
0
I need someone to explain to me what convolution is
I have textbooks that explain it, and I also can google it! lol
but nothing seems to help, so I probably need a person to explain it to me in simple words.
 
Engineering news on Phys.org
  • #2
what do you know about impulse response, LTIs? convolution is a way to compute output of a linear system given an input and an impulse response of that system... that's conceptually... or are you interested in just the technique?
we can elaborate on either part, tell us what is it you do not understand
 
  • #3
EvLer said:
what do you know about impulse response, LTIs? convolution is a way to compute output of a linear system given an input and an impulse response of that system... that's conceptually... or are you interested in just the technique?
we can elaborate on either part, tell us what is it you do not understand

see i know that if given an LTI and impulse response function and input, we can calculate the output of the system ...
but why??

also i would also appreciate if you could go over LTI and impulse response
 
  • #4
Convolution is basically a generalization of the so-called moving average. For example, the average of the last 50 days of a stock's trading is called the stock's 50-day moving average. The data from each new trading day bumps off the oldest data from 50 days ago.

The moving average is a special case of convolution, where one function is nothing more than a rectangle. Imagine that the stock price for 10 days was something like this, where each entry represents the price on a specific day.

[ 20 21 22 21 20 22 28 22 19 15 ]

If you wanted the 2-day moving average of this data, you would convolve it with a "boxcar" (rectangular) function with unit area and width two:

[ 0.5 0.5 ]

If you wanted the 5-day moving average, you'd convolve it with a rectangle five units wide, but still just one unit in total area:

[ 0.2 0.2 0.2 0.2 0.2 ]

The actual mechanism of convolution, as performed on this kind of discrete data by computer, is this:

1) reverse one of the datasets.
2) "slide" it past the other, moving one entry at a time.
3) multiply all the corresponding entries and sum them.


For example, to convolve our stock price dataset with our two-day moving average rectangular function, we'd do the following:

1) Reverse one of the functions. Let's reverse the [ 0.5 0.5 ] dataset, because it's trivial to reverse.

2) Slide them past one another. Start with the end:

Code:
      [ 20   21   22   21   20   22   28   22   19   15 ]
[ 0.5   0.5 ]

3) Multiply all the vertical pairs, assuming zero for entries that don't exist:

0.5 * 20 = 10

So the first value of the result is 10.

I'll repeat for the next couple of values, just to make sure you get the idea.

Code:
[ 20    21   22   21   20   22   28   22   19   15 ]
[ 0.5   0.5 ]

Value out = 20 * 0.5 + 21 * 0.5 = 20.5

Code:
[ 20   21    22   21   20   22   28   22   19   15 ]
    [ 0.5   0.5 ]

Value out = 21 * 0.5 + 22 * 0.5 = 21.5

And so on.

Any two functions can be convolved this way, regardless of their shapes. Digital filters and all kinds of other interesting things can be made out of this very simple concept.

You can, of course, also convolve continuous functions the same way. You just have to flip one of the functions around, and then perform an integral in place of the explicit sum I have shown you.

- Warren
 
  • #5
kolycholy said:
see i know that if given an LTI and impulse response function and input, we can calculate the output of the system ...
but why??

also i would also appreciate if you could go over LTI and impulse response
Let's start with DT case. Each disrete signal can be re-written as a series of scaled and shifted impulses. That's one point. Another point is that LTI is completely characterized by an impulse response, i.e. what happens to the delta function (impulse) when it goes through the system. Now, to see what happens to the discrete signal when you run it through the LTI is easy: you run series of shifted-scaled impluses, and given that the system is LTI, i.e. it has properties of linearity, the initial series of impulses is multiplied by the impulse response and added: sum of series of multiplicaiton of the impulses of input and impulse response.

When it comes to continuous case... consider periodic signals (aperiodic can be considered as periodic with T -> infinity, that's FTs don't know how far you are on that yet), each periodic signal can be represented as a sum of complex exponentials and again each part of it is multiplied by the impulse response and integrated over a period (since integration is equivalent to summation in DT case).

hope that helps, unless i totally confused you :confused:
 

1. What is convolution?

Convolution is a mathematical operation that involves combining two functions to produce a third function.

2. How does convolution work?

Convolution works by multiplying one function by the flipped and shifted version of the other function, and then integrating the product over the range of the variable.

3. What is the purpose of convolution?

The main purpose of convolution is to analyze how a system responds to an input signal, and to filter or modify the input signal to produce an output signal.

4. What are some examples of convolution in real life?

Convolution has many practical applications, such as image processing, audio signal processing, and data analysis. For example, blurring an image is a form of convolution, and noise reduction in audio signals also uses convolution.

5. Are there any limitations to convolution?

Yes, there are some limitations to convolution. It assumes that the system is linear and time-invariant, which may not always be the case in real-world scenarios. Additionally, it can be computationally expensive for larger data sets.

Similar threads

  • Electrical Engineering
Replies
4
Views
2K
Replies
5
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Electrical Engineering
Replies
23
Views
1K
Replies
2
Views
2K
  • Linear and Abstract Algebra
Replies
3
Views
916
  • Engineering and Comp Sci Homework Help
Replies
1
Views
823
  • Electrical Engineering
Replies
5
Views
5K
  • Programming and Computer Science
Replies
1
Views
820
  • Calculus and Beyond Homework Help
Replies
0
Views
139
Back
Top