DTFT, DFT, ZT, and FFT
503
R.5.139 The cross-correlation of two sequences f 1 (n) with f 2 (n) is given by
xcorr f s f s
R s
f n f n s
s
( ( ), ( ))
( )
( ) (
)
1
2
1 2
1
2
ϭ
ϭ
ϩ
Ϫ ϱ
ϩ
over the range
Յ Յ ϱ ϱ
ϭϪϱ
ϩϱ
n
∑
whereas the convolution is given by
conv f s f s
f n f s n
s
n
( ( ), ( ))
( ) (
)
1
2
1
2
ϭ
Ϫ
Ϫ ϱ
ϩ ϱ
ϭϪϱ
ϩϱ
∑
over the range
Յ Յ
R.5.140 The relation between the convolution and cross-correlation is given by
f n
f n
R n
2
1
1 2
( )
( )
( )
Ϫ
ϭ
⊗
R.5.141 The MATLAB command xcorr(f) returns the autocorrelation of f, and the command xcorr(f 1 , f 2 ) returns the cross-correlation of the sequences f 1 with f 2 . Observe
that xcorr(f 1 , f 1 ) = xcorr(f 1 ).
R.5.142 Since the convolution can be evaluated using DFT, it is logical to think that DFT
can be used to evaluate the cross-correlation. The relation is given by
DFT[R 12 (n)] = DFT * [ f 1 ] . DFT[ f 2 ]
or
R n
F k F k
12
1
2
(
) * ( ) ( )
⇔
R.5.143 Some properties of the correlation function are summarized as follows:
a. R 11 (n) = R 11 (−n)
b. The max[R 11 (n)] occurs at n = 0
c. R 12 (n) = R 21 (−n)
d. xcorr(f 1 , f 2 ) = f 1 (n) ⊗ f 2 (−n)
R.5.144 Let fn1 = [0 1 2 –1 –2 0 1 0] and fn2 = [0 1 2 3 4 5 6 7].
a. Evaluate by hand the fi rst three coeffi cients R 11 (0), R 11 (1), and R 11 (2) of the autocorrelation for fn1 (Figure 5.17).
b. Evaluate by hand the fi rst three coeffi cients R 12 (0), R 12 (1), and R 12 (2) of the crosscorrelation for fn1 with fn2.
c. Verify the preceding results by using the MATLAB commands xcorr(fn1) and
xcorr(fn1, fn2).
d. Compare the results obtained in parts a and b, with part c.
e. Obtain the plots of the autocorrelation function of fn1 and it is an even function
and its maximum value occurs at n = 0.
f. Obtain plots of the cross-correlation xcorr(fn1, fn2) and xcorr(fn2, fn1), and verify
that xcorr(fn1, fn2) ≠. xcorr(fn1, fn2)
CRC_47760_CH005.indd 503
CRC_47760_CH005.indd 503
7/23/2008 1:47:29 PM
7/23/2008 1:47:29 PM
Précédent

- 514/708

Suivant