Computes the cross correlation of the input signals X and Y. Details
![]() |
X is the input signal. |
![]() |
Y is the input signal Y. |
![]() |
Rxy is the cross correlation of input signals X and Y. |
![]() |
error returns any error or warning from the VI. Refer to Signal Processing Error Codes for more information about these conditions. |
The cross correlation Rxy(t) of the signals x(t) and y(t) is defined as
,
where the symbol denotes correlation.
The discrete implementation of the CrossCorrelation VI is as follows. Let h represent a sequence whose indexing can be negative, let n be the number of elements in the input sequence X, let m be the number of elements in the sequence Y, and assume that the indexed elements of X and Y that lie outside their range are equal to zero,
and
.
Then the CrossCorrelation VI obtains the elements of h using
for j = -(n - 1), -(n - 2), , -2, -1, 0, 1, 2, , m - 1
The elements of the output sequence Rxy are related to the elements in the sequence h by
for i = 0, 1, 2, , size - 1, size = n + m -1,
where size is the number of elements in the output sequence Rxy.
Because you cannot index LabVIEW and LabVIEW DSC module arrays with negative numbers, the corresponding cross correlation value at t = 0 is the nth element of the output sequence Rxy. Therefore, Rxy represents the correlation values that the CrossCorrelation VI shifted n times in indexing.
The following block diagram shows one way to index the CrossCorrelation VI.
The following graph is the result of the preceding block diagram.