You are on page 1of 3

Convolution Explained!!!

B.H.Sri Hari
December 7, 2006

Convolution summation of two discrete-time signals x[n] and h[n] is given by



X
y[n] = x[k]h[n − k].
k=−∞

This is a general case where nothing is assumed about the lengths of the signals x[n] and h[n]. Note that the above
convolution summation can be written in a matrix form. This is because as it is noticed, the above convolution oper-
ation is just a linear transformation of the signal x[n] to y[n] using h[n]. As the convolution operation is commutative
i.e.,
y[n] = x[n] ∗ h[n] = h[n] ∗ x[n]
where * denotes the convolution operation, it can also be thought as the linear transformation of the signal h[n] to
y[n] using x[n]. We go into the details of the matrix method of the convolution using the procedure explained in the
matlab file. Here I present three cases.
1. Case1:
First we will convolve the two signals x[n] = [1 2 3 3] and h[n] = [1 1 1] (This is the example when there is no
carry involved in the multiplications and additions) . Let us write it in the following form as

[1 2 3 3] ∗ [1 1 1]

Let us first do normal multiplication of the numbers 1233 and 111. It is as follows:

1233 × 111
−−−−−−−−
001233
012330
123300
−−−−−−−−
136863
−−−−−−−−

which is same as conv(x,h) or myconv(x,h) in Matlab. Note that there is no carry involved in multiplications
to get the horizontal rows, and no carry involved in the addition of the rows.
2. Case2:
Second we will convolve the two signals x[n] = [1 2 3 3] and h[n] = [2 2 3] (This is the example when there is no
carry involved in the multiplications but carry involved in final additions) Let us first do normal multiplication
of the numbers 1233 and 223.

1233 × 223
−−−−−−−−
003699
024660
246600
−−−−−−−−
274959
−−−−−−−−

Note that there is no carry involved in multiplications to get the horizontal rows, but there is carry in the
addition of the rows. Obviously, it is not same as conv(x,h) or myconv(x,h) in Matlab, where the answer is
[2 6 13 18 15 9]. But when the multiplication procedure is slightly modified we can get the convolution result.
In this case(i.e., Case2), where, carry is involved in final additions, if carry occurs, do not pass it on to the next
column, instead retain in the same column where it has been generated. Note that in the fifth column of normal
multiplication, we add 9 and 6 to get 15. So, we send 1 to the fourth column as carry. Do not do that. Just
write 15 in the answer row below column 5. Similarly for the fourth column we write 18 completely instead of
just 8. Repeat this for all the columns. Final answer which is in the answer row is now just the convolution of
the the signals x[n] = [1 2 3 3] and h[n] = [2 2 3]. See below for the procedure.
1233 × 223
−−−−−−−−
0 0 3 6 9 9
0 2 4 6 6 0
2 4 6 6 0 0
−−−−−−−−
2 6 13 18 15 9
−−−−−−−−

3. Case3:
Third we will convolve the two signals h[n] = [1 2 3 3] and x[n] = [8 9 5] (This is the example when there is
carry involved in the multiplications and also in final additions). Let us first do normal multiplication of the
numbers 1233 and 895.
1233 × 895
−−−−−−−−
006165
110970
986400
−−−−−−−−
11 0 3 5 3 5
−−−−−−−−

which is completely different from the convolution result which is [8 25 47 61 42 15]. Again, by just modifying
the multiplication process, we get the convolution result. In Case2 we discarded the carry in the additions where
ever it occurred. Similarly, in this case also we follow the same procedure. That is, for example in the first row,
and in sixth column, we got 15 by multiplying 3 with 5. So you got a carry of 1. Do not send it to fifth column,
instead retain it. So, by following the procedure, we can write it as,
1233 × 895
−−−−−−−−
0 0 5 10 15 15
0 9 18 27 27 0
8 16 24 24 0 0
−−−−−−−−
8 25 47 61 42 15
−−−−−−−−

Now we will use the example given in Case3 and proceed to see how we can visualize the above multiplication procedure
as the matrix analysis of the convolution summation. We take the three rows between the first two dotted lines and
form a matrix say Y . So it can be written as
 
0 0 5 10 15 15
Y =  0 9 18 27 27 0 
8 16 24 24 0 0
Now rotate this matrix 90o in clockwise direction. Let us call the matrix Z which is as follows.
 
8 0 0
 16 9 0 
 
 24 18 5 
Z=  24

 27 10  
 0 27 15 
0 0 15
We know that the addition of these columns result in the convolution summation. So if we call it as y, it is defined as,
     
8 0 0
 16   9   0 
     
 24   18   5 
y= + +
 24   27   10 

     
 0   27   15 
0 0 15

It can be decomposed in to the following form as


     
1 0 0
 2   1   0 
     
 3   2   1 
y=  3
8 +  9 +  5




 3 


 2 

 0   3   3 
0 0 3

Note that, this is nothing but, in a matrix form,


 
1 0 0
 2 1 0  
  8
 3 2 1 
 9 
y=
 3 3 2 
  5
 0 3 3 
0 0 3
which can be written in compact form as
y = Hx
where H is called convolution matrix. The beauty of this matrix is that it has Toeplitz structure. Note that this
Toeplitz structure is not forced but it is natural which roots back to modified multiplication procedure. To tell in a
more technical way, it is because of the Time-Invariance property of the Linear system.

You might also like