Linear Convolution Dr.
ISSRAA JWAD KAZIM
Preface on Linear Convolution
A system that is both linear and shift-invariant (time-invariant) is referred to as a linear
shift-invariant (LSI) system. If x(n) is the response of an LSI system to the unit sample δ(n) its
response to δ(n-k) will be h(n-k). Therefore, in the superposition sum given in:
is become: ℎ𝑘(𝑛) = ℎ(𝑛 − 𝑘)
and it follows that
This Equation is known as the convolution sum, and is written as
where * indicates the convolution operator. The sequence h(n) referred to as the unit sample
response or impulse response, provides a complete characterization of an LSI system. In other
words, the response of the system to any input x(n) may be found once h(n) is known.
Convolution Properties
Convolution is a linear operator and, therefore, has a number of important properties
including the commutative, associative, and distributive properties.
Commutative Property
The commutative property states that the order in which two sequences are convolved is
not important. Mathematically, the commutative property is
From a systems point of view, this property states that a system with a unit sample
response h(n) and input x(n) behaves in exactly the same way as a system with unit sample
response x(n) and an input h(n). This is illustrated in Figure (a).
Associative Property
The convolution operator satisfies the associative property, which is
14
Linear Convolution Dr. ISSRAA JWAD KAZIM
From a systems point of view, the associative property states that if two systems with
unit sample responses h1(n) and h2(n) are connected in cascade as shown in Figure (b), an
equivalent system is one that has a unit sample response equal to the convolution of h1(n) and
h2(n):
Distributive Property
The distributive property of the convolution operator states that
From a systems point of view, this property asserts that if two systems with unit sample
responses h1(n) and h2(n) are connected in parallel, as illustrated in Figure (c), an equivalent
system is one that has a unit sample response equal to the sum of h1(n) and h2(n):
Types of Convolutions
There are several different approaches that may be used, and the one that is the easiest
will depend upon the form and type of sequences that are to be convolved.
1. Equations Method
2. Graphical Method
3. Alternative Method
15
Linear Convolution Dr. ISSRAA JWAD KAZIM
1. Equations Method
1) The resultant signal has a number of taps (samples), N , is
N = N1 + N2 −1
where N1 is the number of samples of the first signal,
N2 is the number of samples of the second signal, and
N is the number of samples of the resultant signal.
2) The left and right extremes can be found using the left and right extremes of the two
sequences to be convolved, i.e.,
yl = xl + hl
yr = xr + hr
where xl , hl , and yl are the left extremes of the signals x , h , and y respectively.
In a similar manner, xr , hr , and yr are the right extremes of the signals x , h , and y
respectively.
Example
Find the convolution of the two discrete-time signals which are given below:
x(n) = [1,1,0,1,1] , and h(n) = [1,−2,−3,4]
where x(0) = 0 , and h(0) = 4 .
Solution
From the graphs, we have xl = −2 , xr = 2 , hl = −3 , and hr = 0
Therefore, the left and right extremes of the convolved signal yL (n) are
h(n)
1
1
-2 -1
-2 -1 0 1 2 n -3 0 n
-2
yl = xl + hl = −2 + (−3) = −5
yr = xr + hr = 2 + 0 = 2 -3
The number of samples are:
16
Linear Convolution Dr. ISSRAA JWAD KAZIM
N1 = 5 , N2 = 4 N = N1 + N2 −1 = 5 + 4 −1 = 8
The convolved signal yL (n) is expressed as
yL (n) = x(k)h(n − k)
k =−
when n = 0
yL (0) = x(k)h(−k)
k =−
= x(−2)h(2) + x(−1)h(1) + x(0)h(0) + x(1)h(−1) + x(2)h(−2)
= (1)(0) + (1)(0) + (0)(4) + (1)(−3) + (1)(−2) = −5
when n = 1
yL (1) = x(k)h(1 − k)
k =−
= x(−2)h(3) + x(−1)h(2) + x(0)h(1) + x(1)h(0) + x(2)h(−1)
= (1)(0) + (1)(0) + (0)(0) + (1)(4) + (1)(−3) = 1
when n = 2
yL (2) = x(k)h(2 − k)
k =−
= x(−2)h(4) + x(−1)h(3) + x(0)h(2) + x(1)h(1) + x(2)h(0)
= (1)(0) + (1)(0) + (0)(0) + (1)(0) + (1)(4) = 4
when n = −1
yL (−1) = x(k)h(−1 − k)
k =−
= x(−2)h(1) + x(−1)h(0) + x(0)h(−1) + x(1)h(−2) + x(2)h(−3)
= (1)(0) + (1)(4) + (0)(−3) + (1)(−2) + (1)(1) = 3
when n = −2
yL (−2) = x(k)h(−2 − k)
k =−
= x(−2)h(0) + x(−1)h(−1) + x(0)h(−2) + x(1)h(−3) + x(2)h(−4)
= (1)(4) + (1)(−3) + (0)(−2) + (1)(1) + (1)(0) = 2
when n = −3
yL (−3) = x(k)h(−3 − k)
k =−
= x(−2)h(−1) + x(−1)h(−2) + x(0)h(−3) + x(1)h(−4) + x(2)h(−5)
= (1)(−3) + (1)(−2) + (0)(1) + (1)(0) + (1)(0) = −5
when n = −4
yL (−4) = x(k)h(−4 − k)
k =−
= x(−2)h(−2) + x(−1)h(−3) + x(0)h(−4) + x(1)h(−5) + x(2)h(−6)
17
Linear Convolution Dr. ISSRAA JWAD KAZIM
= (1)(−2) + (1)(1) + (0)(0) + (1)(0) + (1)(0) = −1
when n = −5
yL (−5) = x(k)h(−5 − k)
k =−
= x(−2)h(−3) + x(−1)h(−4) + x(0)h(−5) + x(1)h(−6) + x(2)h(−7)
= (1)(1) + (1)(0) + (0)(0) + (1)(0) + (1)(0) =1
yL (n)
4
1
-4 -3
-5 -2 -1 0 1 2 n
-1
-2
-3
-4
-5
Example
Find the response of the filter with impulse response h(n) = [1,2,4] to the input sequence
x(n) = [1,2] .
Solution
The type of convolution is Linear Convolution
Here N1 = 2 and N2 = 3 . Then N = N1 + N2 −1 = 4 .
yL (n) = x(k)h(n − k)
k =−
Therefore,
yL (0) = x(k)h(−k)
k =−
= x(0)h(0) + x(1)h(−1) = (1)(1) + (2)(0) = 1
yL (1) = x(k)h(1 − k)
k =−
= x(0)h(1) + x(1)h(0) = (1)(2) + (2)(1) = 4
yL (2) = x(k)h(2 − k)
k =−
= x(0)h(2) + x(1)h(1) = (1)(4) + (2)(2) = 8
yL (3) = x(k)h(3 − k)
k =−
= x(0)h(3) + x(1)h(2) = (1)(0) + (2)(4) = 8
yL (n) = [1,4,8,8]
18
Linear Convolution Dr. ISSRAA JWAD KAZIM
Example
Determine the Linear Convolution of the two finite duration sequences given below:
1 −1 n 1 1 −1 n 1
x(n) = and h(n) =
0 otherwise 0 otherwise
Solution
We know that the convolution of the two sequences is expressed as
yL (n) = x(k)h(n − k) = x(n − k)h(k)
k =− k =−
First plot the given sequences
1 1
-1 0 1 n -1 0 1 n
To find the convolution, we have
when n = 0 yL (0) = x(k)h(−k)
k =−
= x(−1)h(1) + x(0)h(0) + x(1)h(−1)
= (1)(1) + (1)(1) + (1)(1) = 3
when n = 1 yL (1) = x(k)h(1 − k)
k =−
= x(−1)h(2) + x(0)h(1) + x(1)h(0)
= (1)(0) + (1)(1) + (1)(1) = 2
when n = 2 yL (2) = x(k)h(2 − k)
k =−
= x(−1)h(3) + x(0)h(2) + x(1)h(1)
= (1)(0) + (1)(0) + (1)(1) =1
when n = −1 yL (−1) = x(k)h(−1 − k)
k =−
= x(−1)h(0) + x(0)h(−1) + x(1)h(−2)
= (1)(1) + (1)(1) + (1)(0) = 2
when n = −2 yL (−2) = x(k)h(−2 − k)
k =−
= x(−1)h(−1) + x(0)h(−2) + x(1)h(−3)
= (1)(1) + (1)(0) + (1)(0) =1
19
Linear Convolution Dr. ISSRAA JWAD KAZIM
yL (n)
2
1
-3 -2 -1 0 1 2 3
2. Graphical Method
The steps for finding out the convolution sum are as follows:
1) Plotting: plot both sequences, as a function of k.
2) Folding: Fold the signal x2 (k) about the origin.
3) Shifting: Shift x2 (−k) to the right by n0 if n0 is positive or shift x2 (−k) to the left
by n0 if n0 is negative to obtain x2 (n0 − k) .
4) Multiplication: Multiply the product sequence x1(k) by x2 (n0 − k) to obtain the
product sequence.
5) Summation: Sum all the values of the product sequence to obtain the value of the output
at time n = n0 .
Example
The previous example can also be solved using graphical method as below.
We know that
yL (n) = x(k)h(n − k)
k =−
1 1
-1 0 1 -1 0 1 k
k
when n = 0
1 1
-1 0 1 k -1 0 1 k
yL (0) = x(k)h(−k) = 3
k =−
20
Linear Convolution Dr. ISSRAA JWAD KAZIM
when n = 1
1 1
0 1 2 k 0 1 k
yL (1) = x(k)h(1 − k) = 2
k =−
when n = 2
h(2 − k) x(k)h(2 − k)
1 1
1 2 3 k 0 1 k
yL (2) = x(k)h(2 − k) = 1
k =−
when n = 3
h(3 − k) x(k)h(3 − k)
2 3 4 0 k
k
yL (3) = x(k)h(3 − k) = 0
k =−
when n = −1
x(k)h(−1− k)
1 1
-2 -1 0 k -1 0 k
yL (−1) = x(k)h(−1 − k) = 2
k =−
21
Linear Convolution Dr. ISSRAA JWAD KAZIM
when n = −2
h(−2 − k) x(k)h(−2 − k)
1 1
-3 -2 -1 k -1 0 k
yL (−2) = x(k)h(−2 − k) = 1
k =−
when n = −3
h(−3 − k) x(k)h(−3 − k)
-4 -3 -2 k 0
k
y(−3) = x(k)h(−3 − k) = 0
k =−
yL (n)
2
1
-3 -2 -1 0 1 2 3 n
3. Alternative Method : Using the matrix representation, the linear convolution of the given
two sequences can be determined
h(n)
1 2 4
x(n)
1 1 2 4
2 2 4 8
So, yL (n) = [1,4,8,8]
22