You are here: Home » Content » DIGITAL CONVOLUTION

DIGITAL CONVOLUTION

Module by: Nguyen Huu Phuong

Convolution summation

With input signal expressed in terms unit samples as in Equation , the output of system S is
y ( n ) = S [ x ( n ) ] = S [ k = x ( k ) δ ( n k ) ] y ( n ) = S [ x ( n ) ] = S [ k = x ( k ) δ ( n k ) ] size 12{y \( n \) =S \[ x \( n \) \] =S \[ Sum cSub { size 8{k= - infinity } } cSup { size 8{ infinity } } {x \( k \) } δ \( n - k \) \] } {}
For a linear system
y(n)=Sk=x(k)δ(nk)=k=x(k)Sδ(nk)y(n)=Sk=x(k)δ(nk)=k=x(k)Sδ(nk) size 12{y \( n \) =S left [ Sum cSub { size 8{k= - infinity } } cSup { size 8{ infinity } } {x \( k \) δ \( n - k \) } right ]= Sum cSub { size 8{k= - infinity } } cSup { size 8{ infinity } } {x \( k \) S left [δ \( n - k \) right ]} } {} (1)
Next, if the system is also time (shift) invariant,
S[δ(nk)]=h(nk)S[δ(nk)]=h(nk) size 12{S \[ δ \( n - k \) \] =h \( n - k \) } {} (2)
Thus the output is
y(n)=k=x(k)h(nk) y(n)=k=x(k)h(nk) size 12{y \( n \) = Sum cSub { size 8{k= - infinity } } cSup { size 8{ infinity } } {x \( k \) h \( n - k \) } } {} (3)
This is the convolution summation (or convolution sum ) in DTSP (or DSP), corresponding to the convolution integral for analog systems. The notation asterisk is used to demote the convolution, so
y(n)=x(n)h(n)=k=x(k)h(nk)y(n)=x(n)h(n)=k=x(k)h(nk) size 12{y \( n \) =x \( n \) * h \( n \) = Sum cSub { size 8{k= - infinity } } cSup { size 8{ infinity } } {x \( k \) h \( n - k \) } } {} (4)
This means that if the impulse response h(n)h(n) size 12{h \( n \) } {} of a system is known we can find the output signal h(n)h(n) size 12{h \( n \) } {} for any input signal x(n)x(n) size 12{x \( n \) } {}. For this reason, impulse response is called the time characteristic (or characterization) of systems. The summation is taken from size 12{ - infinity } {} to size 12{ infinity } {}, but in reality either signal or impulse response (or both) is finite, then the summation is usually finite.

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
  1. 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).
  2. 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 \) } } {}.
  3. Shift h(k)h(k) size 12{h \( - k \) } {} by adding a sliding variable n, i.e. h(nk)h(nk) size 12{h \( n - k \) } {}. Let n=1,2,3...n=1,2,3... size 12{n= - 1, - 2, - 3 "." "." "." } {} to shift h(nk)h(nk) 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(nk)h(nk) size 12{h \( n - k \) } {} has slided past completely x(k)x(k) size 12{x \( k \) } {}.
  4. Now reverse the shifting direction by letting n=1,2,3...n=1,2,3... size 12{n= - 1, - 2, - 3 "." "." "." } {} to shift h(nk)h(nk) 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(nk)h(nk) 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:
Figure 1: Example 1
Continue we’ll have k=8,2,0k=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+N1L=M+N1 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 1x ,|x|<1 1+x+ x 2 + x 3 +...= n=0 x n = 1 1x ,|x|<1 MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipDI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqadeaabiGaciaacaqaaeaadaqaaqaaaOqaaiaaigdacqGHRaWkcaWG4bGaey4kaSIaamiEamaaCaaaleqabaGaaGOmaaaakiabgUcaRiaadIhadaahaaWcbeqaaiaaiodaaaGccqGHRaWkcaGGUaGaaiOlaiaac6cacqGH9aqpdaaeWbqaaiaadIhadaahaaWcbeqaaiaad6gaaaGccqGH9aqpdaWcaaqaaiaaigdaaeaacaaIXaGaeyOeI0IaamiEaaaaaSqaaiaad6gacqGH9aqpcaaIWaaabaGaeyOhIukaniabggHiLdGccaaMe8UaaiilaiaaywW7caGG8bGaamiEaiaacYhacaaMe8UaeyipaWJaaGymaaaa@5962@ (6)
Here x is a, thus the limit is 11a11a size 12{ { {1} over {1 - a} } } {}

Comments, questions, feedback, criticisms?

Send feedback