Computing the convolution summation
For analog systems, convolution is evaluated through an integration. The job is easier for digital systems because convolution is evaluated by a summation. It’s a very good idea to start with the graphical method of computing. The steps are
- Change variable n into dummy variable k, i.e., writing
x(k)x(k) size 12{x \( k \) } {},
h(k)h(k) size 12{h \( k \) } {}. Choose
x(k)x(k) size 12{x \( k \) } {}satationary and
h(k)h(k) size 12{h \( k \) } {}shifting (later on we’ll see that the reverse is also possible).
- Form the mirror image (also called folding or flipping)
h(−k)h(−k) size 12{h \( - k \) } {}of
h(k)h(k) size 12{h \( k \) } {} and evaluate the convolution at
n=0:y(0)=∑k=−∞∞x(k)h(−k)n=0:y(0)=∑k=−∞∞x(k)h(−k) size 12{n=0: matrix {
{} # {}
} y \( 0 \) = Sum cSub { size 8{k= - infinity } } cSup { size 8{ infinity } } {x \( k \) h \( - k \) } } {}.
- Shift
h(−k)h(−k) size 12{h \( - k \) } {} by adding a sliding variable n, i.e.
h(n−k)h(n−k) size 12{h \( n - k \) } {}. Let
n=−1,−2,−3...n=−1,−2,−3... size 12{n= - 1, - 2, - 3 "." "." "." } {} to shift
h(n−k)h(n−k) size 12{h \( n - k \) } {} towards the right (future), at each index n evaluate the convolution, continue until the convolution does not exist any more, i.e.
h(n−k)h(n−k) size 12{h \( n - k \) } {} has slided past completely
x(k)x(k) size 12{x \( k \) } {}.
- Now reverse the shifting direction by letting
n=−1,−2,−3...n=−1,−2,−3... size 12{n= - 1, - 2, - 3 "." "." "." } {} to shift
h(n−k)h(n−k) size 12{h \( n - k \) } {} to the left (past), evaluate the convolution at each point until the convolution does not exist any more, i.e.
h(n−k)h(n−k) size 12{h \( n - k \) } {} has slided past
x(k)x(k) size 12{x \( k \) } {}.
The process of computing the convolution summation can be summarised as “Fold – Shift – Multiply – Add”.
Example 1 Input signal and impulse response are respectively
x
(
n
)
=
[
0,1,2,3,1,0
]
h
(
n
)
=
[
0,1,2,2,0
]
x
(
n
)
=
[
0,1,2,3,1,0
]
h
(
n
)
=
[
0,1,2,2,0
]
alignl { stack {
size 12{x \( n \) = \[ 0,1,2,3,1,0 \] } {} #
size 12{h \( n \) = \[ 0,1,2,2,0 \] } {}
} } {}
where figures in bold face are samples at origin. Find the output signal
y(n)=x(n)∗h(n)y(n)=x(n)∗h(n) size 12{y \( n \) =x \( n \) *h \( n \) } {}.
Solution
Proceed through the steps as guided above:
Continue we’ll have
∑k=8,2,0∑k=8,2,0 size 12{ Sum cSub { size 8{k} } { {}={}} 8,2,0} {}. Next, we reverse the direction of shifting as indicated in step (4) above. The final output signal is
y
(
n
)
=
[
.
.
.
0,1,4,9,
11
,
8,2,0,
.
.
.
]
y
(
n
)
=
[
.
.
.
0,1,4,9,
11
,
8,2,0,
.
.
.
]
size 12{y \( n \) = \[ "." "." "." 0,1,4,9,"11",8,2,0, "." "." "." \] } {}
The method of sequence (vector)
There are other methods of computation for the digital convolution. The graphical method above is basic and very illustrative. The method of sequence (vector) consumes less time and is a good choice. In this method we must always write the samples at origin on the same column. For above example, we proceed as follows.
x
(
k
)
=
[
.
.
.
,
0,0,0,1,2,3,1,0,0
.
.
.
]
h
(
k
)
=
[
.
.
.
,
0,0,1,2,2,0,0,0,0
.
.
.
]
n
=
0
:
h
(
−
k
)
=
[
.
.
.
,
0,0,2,2,1,0,0,0,0
.
.
.
]
x
(
k
)
h
(
−
k
)
=
[
.
.
.
,
0,0,0,2,2,0,0,0,0
.
.
.
]
⇒
∑
k
=
4
n
=
1
:
h
(
1
−
k
)
=
[
.
.
.
,
0,0,0,2,2,1,0,0,0
.
.
.
]
x
(
k
)
h
(
1
−
k
)
=
[
.
.
.
,
0,0,0,2,4,3,0,0,0
.
.
.
]
⇒
∑
k
=
9
x
(
k
)
=
[
.
.
.
,
0,0,0,1,2,3,1,0,0
.
.
.
]
h
(
k
)
=
[
.
.
.
,
0,0,1,2,2,0,0,0,0
.
.
.
]
n
=
0
:
h
(
−
k
)
=
[
.
.
.
,
0,0,2,2,1,0,0,0,0
.
.
.
]
x
(
k
)
h
(
−
k
)
=
[
.
.
.
,
0,0,0,2,2,0,0,0,0
.
.
.
]
⇒
∑
k
=
4
n
=
1
:
h
(
1
−
k
)
=
[
.
.
.
,
0,0,0,2,2,1,0,0,0
.
.
.
]
x
(
k
)
h
(
1
−
k
)
=
[
.
.
.
,
0,0,0,2,4,3,0,0,0
.
.
.
]
⇒
∑
k
=
9
alignl { stack {
size 12{x \( k \) = \[ "." "." "." ,0,0,0,1,2,3,1,0,0 "." "." "." \] } {} #
size 12{h \( k \) = \[ "." "." "." ,0,0,1,2,2,0,0,0,0 "." "." "." \] } {} #
size 12{n=0: matrix {
{} # {} # {}
} h \( - k \) = \[ "." "." "." ,0,0,2,2,1,0,0,0,0 "." "." "." \] } {} #
size 12{x \( k \) h \( - k \) = \[ "." "." "." ,0,0,0,2,2,0,0,0,0 "." "." "." \] matrix {
{} # {}
} drarrow matrix {
{} # {}
} Sum cSub { size 8{k} } { {}=4} } {} #
n=1: matrix {
{} # {} # {}
} h \( 1 - k \) = \[ "." "." "." ,0,0,0,2,2,1,0,0,0 "." "." "." \] {} #
x \( k \) h \( 1 - k \) = \[ "." "." "." ,0,0,0,2,4,3,0,0,0 "." "." "." \] matrix {
{} # {}
} drarrow matrix {
{} # {}
} Sum cSub { size 8{k} } { {}=9} {}
} } {}
The above two iterative computation methods can be programmed on a computer.
An important observation to note is that when we convolve two finite discrete-time sequences of lengths M and N we will get a sequence of length
L=M+N−1L=M+N−1 size 12{L=M+N - 1} {}
(5)
Example 2 Input signal and impluse are respectively
x
(
n
)
=
u
(
n
)
h
(
n
)
=
a
n
u
(
n
)
∣
a
∣
<
1
x
(
n
)
=
u
(
n
)
h
(
n
)
=
a
n
u
(
n
)
∣
a
∣
<
1
alignl { stack {
size 12{x \( n \) =u \( n \) } {} #
size 12{h \( n \) =a rSup { size 8{n} } u \( n \) matrix {
{} # {} # {}
} \lline a \lline <1} {}
} } {}
Find the output signal by analysis computation.
Solution
Let
h(k)h(k) size 12{h \( k \) } {} stationary and
x(k)x(k) size 12{x \( k \) } {} shifted. This means (see
Section) that we take the convolution as
y
(
n
)
=
h
(
n
)
∗
x
(
n
)
=
∑
k
=
−
∞
∞
h
(
k
)
x
(
n
−
k
)
y
(
n
)
=
h
(
n
)
∗
x
(
n
)
=
∑
k
=
−
∞
∞
h
(
k
)
x
(
n
−
k
)
size 12{y \( n \) =h \( n \) * x \( n \) = Sum cSub { size 8{k= - infinity } } cSup { size 8{ infinity } } {h \( k \) x \( n - k \) } } {}
We go through the steps as guided previously (
Figure).
The output does not grow to infinity but to a limit determined by using the formula of infinite geometric series
1+x+
x
2
+
x
3
+...=
∑
n=0
∞
x
n
=
1
1−x
, |x| <1
1+x+
x
2
+
x
3
+...=
∑
n=0
∞
x
n
=
1
1−x
, |x| <1
MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipDI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqadeaabiGaciaacaqaaeaadaqaaqaaaOqaaiaaigdacqGHRaWkcaWG4bGaey4kaSIaamiEamaaCaaaleqabaGaaGOmaaaakiabgUcaRiaadIhadaahaaWcbeqaaiaaiodaaaGccqGHRaWkcaGGUaGaaiOlaiaac6cacqGH9aqpdaaeWbqaaiaadIhadaahaaWcbeqaaiaad6gaaaGccqGH9aqpdaWcaaqaaiaaigdaaeaacaaIXaGaeyOeI0IaamiEaaaaaSqaaiaad6gacqGH9aqpcaaIWaaabaGaeyOhIukaniabggHiLdGccaaMe8UaaiilaiaaywW7caGG8bGaamiEaiaacYhacaaMe8UaeyipaWJaaGymaaaa@5962@
(6)
Here x is a, thus the limit is
11−a11−a size 12{ { {1} over {1 - a} } } {}