PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

494 Practical MATLAB® Applications for Engineers


R.5.107 Let the notation f(n − 1) 7 denote that the fi nite sequence f(n) consisting of the ele-
ments [1 2 3 4 5 6 7] is shifted by one element to the right, returning the sequence
f(n − 1) 7 = [7 1 2 3 4 5 6]; and the expression f(n + 1) 7 indicate that the elements
of f(n) are rotated (or shifted) to the left by one element, returning the sequence
f(n + 1) 7 = [2 3 4 5 6 7 1].


R.5.108 Let us next compare the linear convolution with the circular convolution. Recall
that the linear discrete convolution of the sequences f 1 (n) with f 2 (n) is indicated
by ⊗ and defi ned by the following equation:


fn fnL fn fmfn m
m

() () () ( ) ( )


 


12 ⊗ ∑ 12

which consists of a sequence of length 2N − 1.
The assumption is that each of the sequences f 1 (n) and f 2 (n) are of equal length N.
However, the circular convolution of the two sequences given by f 1 (n) and f 2 (n) is
indicated by the character ° and it is defi ned by the following equation:


f n fn fnC fmfn m
m

N
() () () ( ) ( )



12 1
0

1
 ∑ 2

returning the sequence fC(n) which consists of (length) N elements.


R.5.109 Let us gain some insight of the circular process by evaluating the circular convolu-
tion given by the sequence


f 1 (n) = [1 0 2 4 2] with f 2 (n) =[2 1 2 3 5]


ANALYTICAL Solution

The elements of the convolution fC(n) = f 1 (n) (^) ° f 2 (n) can be computed as follows:
fC(0) = f 1 (0)f 2 (0) + f 1 (1)f 2 (4) + f 1 (2)f 2 (3) + f 1 (3)f(2) + f 1 (4)f 2 (1)
fC(0) = 1(2) + (0)(5) + 2(3) + 4(2)+ 2(1)
fC(0) = 2 + 0 + 6 + 8 + 2 = 18
fC(1) = f 1 (0)f 2 (1) + f 1 (1)f 2 (0) + f 1 (2)f 2 (4)+ f 1 (3)f 2 (3) + f 1 (4)f 2 (2)
fC(1) = 1(1) + 0(2) + 2(5) + 4(3) + 2(2)
fC(1) = 1 + 0 + 10 + 12 + 4 = 27
fC(2) = f 1 (0)f 2 (2) + f 1 (1)f 2 (1) + f 1 (2)f 2 (0) + f 1 (3)f 2 (4) + f 1 (4)f 2 (3)
fC(2) = 1(2) + 0(1) + 2(2) + 4(5) + 2(3)
fC(2) = 2 + 0 + 4 + 20 + 6 = 32
fC(3) = f 1 (0)f 2 (3) + f 1 (1)f 2 (2) + f 1 (2)f 2 (1) + f 1 (3)f 2 (0) + f 1 (4)f 2 (4)

Free download pdf