# 4.3.9 Coherence and Correlation

## Summary

Coherence measures the degree of linear dependency of two signals by testing for similar frequency components. If two signals correspond to each other perfectly at a given frequency, the magnitude of coherence is 1. If they are totally unrelated coherence will be 0.

Correlation is another measure of the relationship between two signals. A correlation coefficient is used to evaluate similarity. If two signals have a high degree of similarity, the magnitude of the computed correlation coefficient is large. If there is little or no linear relationship between two signals, the magnitude of the coefficient is small.

## What You Will Learn

This tutorial will show you how to:

1. Test coherence and find out the frequency where two signals are in the highest degree of linear dependency.
2. Perform correlation and find the lag to translate a dataset.

## Coherence

2. Select the menu item File: Import: Single ASCII... to import the data <Origin Installation Directory>\Samples\Signal Processing\Coherence.dat.
3. Select column A, then right-click and select Set As: Y from the shortcut menu. This sets the plot designation for column A to Y.
4. Highlight the two columns and from the menu select Analysis: Signal Processing: Coherence.... This opens the Coherence: cohere dialog box.
5. Change the Window Type to Welch, and click OK.
6. Two columns of data are added to the worksheet. Highlight these two new columns and from the menu select Plot: Line: Line to plot coherence against frequency.
7. Select the Data Reader on the Tools toolbar to read the strongest peak in the graph. The image above shows that at a frequency of 0.25 there is a strong peak, indicating a strong correspondence between the two signals at this frequency.