PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

466 Practical MATLAB® Applications for Engineers


Since


a
a

k a
n




 


 1


1


1


0






∑ 
for 

gn nnun
n

() n
()

 ()











2

1


56


6


5


22


6


0 5















∑ 


R.5.20 The steps involved in the discrete convolution of f(n) with h(n) are


a. Since

g(n) f(n) h(n)



⊗ fkhn k
k

()( )




then the fi rst step in the implementation of the discrete convolution is to change
the variable n by k in each of the functions f(n) and h(n).
b. Since h(k) is known, then h(−k) can be represented by refl ecting or reversing h(k)
with respect to the vertical axis (approximately k = 0).
c. To obtain h(n − k), it is necessary to shift h(−k)n places to the left or right when
n is negative or positive, respectively, for all possible values of n.
d. For each possible value of n = n 0 , it is necessary to evaluate the product h(n 0 − k)
f(k) and then perform the sum over all values of k (−∞ ≤ k ≤ + ∞).
e. The steps c and d return just one point in the convolution process, that is, h(n) ⊗
f(n), for n = n 0.
f. This procedure is to be repeated for all possible values of n, returning for each n
a single point of the convolution.
g. The sets of all the connected points obtained in this matter is referred to as the
(graphic) convolution of f(n) with h(n).
The example in R.5.21 illustrates graphically the process just described.

R.5.21 For example, evaluate the graphical convolution of g(n) = h(n) ⊗ f(n) for the follow-
ing discrete sequences:


hn un f n un n

n
()( 21 ) ()and () () ( 4 )

ANALYTICAL Solution

The two sequences h(n) and f(n) are illustrated in Figure 5.7, by replacing n with k.
Figure 5.8 shows f(−k), that is, f(k) refl ected with respect to the vertical axis (k = 0 ).
Then f(0 − k)h(k) = g(0) = 1 , and for all n < 0, g(n) ≡ 0. Then shifting f(−k) by 1 , as
indicated in Figure 5.9, we get

g()1  1 1
2

3
2
Free download pdf