Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I need someone to explain to me what convolution is

  1. Dec 12, 2006 #1
    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.
  2. jcsd
  3. Dec 12, 2006 #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
  4. Dec 12, 2006 #3
    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
  5. Dec 12, 2006 #4


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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 (Text):

          [ 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 (Text):

    [ 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 (Text):

    [ 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
  6. Dec 12, 2006 #5
    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, thats 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:
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?