## the Convolution – part 1 of 2

31/10/2012 § 2 Comments

This part is about the definition and feeling of Convolution. Part 2 of 2 is implementation (in a programming language)

There is a mathematical definition and then there is *the visual definition*.

To be honest – I can’t visualize what that integration or summation is really trying to do. So, lets play with basics.

**what is convolution**

You can get a ‘word-to-word’ definition out there somewhere. But let’s try to *see* it rather than trying to be *verbally correct*.

What happens to an ‘impulse’ when it passes through a ‘channel’ is called ‘impulse response’ of that ‘channel’. Impulse response is just a way a channel behaves when its excited with unit impulse. In a sense, impulse response’ models the ‘channel’. The process of knowing the channel behavior given impulse response and input signal is convolution. Pretty straightforward, right ? Then how did scientists managed to get that complicated’ formula for such a simple thing ? You’ll know that once you manage to visualize it. 😉

**experimentation**

To visualize convolution there are pretty good tools out there, but we want to learn basics so lets not complicate the situation and use this tool. Forget the theory, get to the interactive Java applet, let’s experiment. x[n] is input signal and y[n] is output signal.

1. Choose x[n] as a unit impulse (second last from right) and y[n] as unit impulse (second last from right). Convolve it, we observe that at n = 0 output is 1 and 0 elsewhere.

2. Choose x[n] as unit impulse and y[n] as the first signal from left. Convolve it. This time we have non zero output even at time beyond n = 0, even though the input excitation was given only at time n = 0. Why so ? This is because the channel, y[n], tends to remember the input till 3 seconds after the input excitation is given. This is a kind of ‘memory’ that this channel has. Other way to see it is that the effect of single impulse of excitation lasts for 4 seconds. How does it matter ? Lets see.

3. Keep y[n] same as in last experiment. Choose x[n] as the first signal from left. This time the input excitation will not last for just 1 second but for 3 seconds. Don’t convolve yet! Try and think what should happen. Channel keeps memory of each input till 3 seconds… that means total excitation at a given instant will be the sum of excitation produced by current impulse and the memory of excitation of previous impulses. Think about it for a while and then go ahead with the convolution. Can you see it ? Can you feel it ? If no, write a comment down there in comment box and I’ll get back to you. And do not proceed till you can see it from eye of your mind.

4. So you can feel it, cool! Try convolving all different combinations and before you see the result on screen try to draw it on a paper using your gut feeling. It’ll take sometime but you’ll get it. You’ll also realize that if you interchange x[n] and y[n] the output remains same. That means convolution doesn’t care what is input and what the channel response, all it know is the basic maths which even you, now, understand. 🙂

5. Now that you can see it and feel it, let’s try to write this ‘gut feeling’ in form of a mathematical expression. Not a big deal, really.Lets see what we want to do:

- channel keeps memory
- total excitation at any given moment is the sum of memory that channel has and excitation of in coming signal
- hmm.. that means for excitation at a given instant I need value of current excitation and sum of values of past excitations which depends on how channel ‘remembers’ them.
- so, for a given instance n, I should know what has happened from n-1 th instance to instance till which channel can remember.
- take a paper and a pen, and try to write what you can feel.
*I am running out of words to express my feeling, probably I’ll get back later when I can find words to express it*. Once you are done you’ll realize that you are thinking what that ‘complicated’ formula wants you to think.

So, now you see how a simple gut feeling can take form of complicated mathematical equation.

By the time I came close to describing how to jot down the ‘convolution feeling’, I ran out of words. Sorry for that. I’ll surely get back and improve this post.

[…] Part 1 was about ‘feeling’ convolution. […]