Computes the cross correlation of two signals.
The correlation method to use.
This input is available only if both x and y are arrays or waveforms.
If x and y are small, the direct method typically is faster. If x and y are large, the frequency domain method typically is faster. Additionally, slight numerical differences can exist between the two methods.
Name | Description |
---|---|
direct |
Computes the cross correlation using the direct method of linear correlation. |
frequency domain |
Computes the cross correlation using an FFT-based technique. |
Default: frequency domain
The normalization method to use to compute the cross correlation between the two input signals.
This input is available only if both x and y are arrays or waveforms.
Name | Description |
---|---|
none |
Does not apply normalization. |
unbiased |
Applies unbiased normalization. |
biased |
Applies biased normalization. |
Default: none
Length of each set of x-values. This node computes each set of values separately.
sample length x must be greater than 0.
This input is available only if x is a double-precision, floating-point number.
Default: 100
Length of each set of y-values. This node computes each set of values separately.
sample length y must be greater than 0.
This input is available only if y is a double-precision, floating-point number.
Default: 100
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
Default: No error
A Boolean that specifies whether to use the data points before the current block to compute the cross-correlation.
True | Uses the data points before the current block to compute the cross-correlation. |
False | Does not use the data points before the current block to compute the cross-correlation. |
This input is available only if one of the input sequences is a double-precision, floating-point number.
Default: True
Error information.
The node produces this output according to standard error behavior.
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
The cross correlation Rxy(t) of the sequences x(t) and y(t) is defined by the following equation:
where the symbol denotes correlation.
The discrete implementation of cross correlation 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, as shown by the following equations:and
Then this node obtains the elements of h using the following equation:
for
The elements of the output sequence Rxy are related to the elements in the sequence h by
for
Because you cannot index arrays with negative numbers, the corresponding cross correlation value at t = 0 is the N th element of the output sequence Rxy. Therefore, Rxy represents the correlation values that this node shifts N times in indexing.
This node applies unbiased normalization as follows:
for j = 0, 1, 2, ..., M + N - 2
where R xy is the cross correlation between x and y with no normalization. f(j) is:
This node applies biased normalization as follows:
for j = 0, 1, 2, ..., M + N - 2
where R xy is the cross correlation between x and y with no normalization.
Where This Node Can Run:
Desktop OS: Windows
FPGA: DAQExpress does not support FPGA devices
Web Server: Not supported in VIs that run in a web application