Correlation & Autocorrelation

From LabRPS Documentation
Jump to navigation Jump to search

This function can be accessed by the Correlate command of the Analysis-tables menu when a table is selected. The correlation function, also known as the covariance function is used to test the similarity of two signals x(i) and y(i). It is computed by:

Covariance formula.png

in which x(hat) and y(hat) are the mean values of the signals x(i) and y(i) respectively. If the number of points is n, the function will be computed between -n/2 and n/2. The abscissas are therefore point numbers and not i values.

To perform a cross-correlation between two signals, they must be in the same table and use the same abscissa. You just have to select the two columns in the table and select the Correlate command from the Analysis-tables menu. A plot will be created and the values of the correlation function will be added as two new columns in the table.

An example of a correlation between two functions sin(x) and cos(x).

Correlate signal.png

The resulting correlation plot:

Correlate result.png

The correlation of a signal with itself can also be used in spectral analysis (it is then called autocorrelation or autocovariance function). This operation can be performed by selecting one column in a table and use the Autocorrelate command from the Analysis-tables menu.