Why donate?

- Tutorials, follow the NBT course

**Follow us **

**Most popular pages**

Table of Contents

Coherence, also referred as magnitude squared coherence MSC, is a statistical measure of phase correlations between oscillatory signals of identical frequency.

The coherence between two oscillatory signals with stable phase relations attains the maximum value of 1 whereas the coherence of oscillations with highly random phase relations is 0. Spatially distinct neuronal oscillations are unlikely to align their phases with respect to each other if there is no interaction between the neuronal populations.

Coherence, therefore, is a popular method for detecting neuronal sources that are working together in a spatially distributed network and to determine how strongly they couple (“collaborate”). It should be mentioned, however, that in many recording situations (especially scalp EEG or MEG) different channels may pick up activity from the same source and thus lead to a significant coherence, which nevertheless should not be interpreted as an interaction between distinct neuronal sources. In real data, you cannot expect coherence around 1 over long periods of time and, vice versa, the coherence will only approach zero when signals come from neuronal populations that are not interacting.

Mathematically coherence is defined as the normalized cross-power spectrum.

where and are the power spectral densities of two signals x and y, is the cross-power spectral density. Values of coherence will always satisfy .

Since coherence can be applied only to stationary signals, the spectra are estimated from finite sets of data by: (1) subdividing the whole data sets into segments, (2) computing approximations of the spectra of each segment using Discrete Fourier Transform, and (3) averaging these subspectra across all segments.

The quality of the estimation depends on the number and size of the segments, and on the validity on the assumption of an underlying linear relationship and stationarity

Coherence and Reference Signals: EEG coherence has been proven to be invalid using average reference or source derivation, because signal and noise are mixed and added to all the recordings from each channel.
Since coherence is amplitude independent, the absolute magnitude of the EEG signal in a single or common reference is irrelevant, except where the magnitude of the signal is very large, such as a Cz reference.

This page is divided into two sections:

- Extended Coherence tutorial, which is meant to give you a deeper understanding of Coherence.
- Computing Coherence using NBT, which explains how to compute Coherence in NBT.

Let's generate two signals of 1 second, the first composed of two sinusoids of frequency 2Hz and 40Hz, the second of two sinusoids of 1Hz and 40Hz, both sampled at 100Hz. We use the matlab function mscohere to compute the magnitude squared coherence (MSC), segmenting the signal with an Hamming window of length 2ˆ4 samples and 50% overlapping.

(follow this code)

The figure below shows in A the coherence of the first signal with itself, as you can see the MSC is 1 for each frequency; in B the MSC is computed for the two signal and has higher values, for frequency higher than 30Hz with a maximum at 40Hz, which is the frequency component present in both the signals.

Here we show first the MSC values for two random noises. As you can see in C, the two noise result uncoherent.

Then we add random noise to the signals created in the previous section and we compute the MSC between them for increasing noise components. As you can see in D, increasing the noise over the signal, which means reducing the SNR, MSC values are attenuated and the signals result less and less coherent.

(follow this code)

As explained previously the quality of the estimation of the MSC depends on the number and size of the segments.

Here we show how increasing too much the length of the segmenting window (expressed in samples by the colored numbers in E), the hypothesis of stationarity is less and less valid and coherence detection is affected by noise.

(follow this code )

In NBT Coherence is computed by the function *CoherenceObject = nbt_doCoher(Signal,SignalInfo,FrequencyBand,interval)* which updates the Coherence Biomarker Object. This function computes the MSC for each couple of EEG signals, for a specified frequency band (*FrequencyBand*) and a specified time interval (*interval*).

The command here after computes the Coherence biomarker object for the dataset, *Signal, SignalInfo*, in the alpha frequency range (8-13 Hz), for the first 5 seconds (interval = [0 5]) of the signal.
Remember to indicate a directory where to save your coherence biomarker using the function *nbt_SaveClearObject*

Coherence8_13Hz = nbt_doCoher(Signal,SignalInfo,[8 13],[0 5]); nbt_SaveClearObject('Coherence8_13Hz',SignalInfo,SaveDir);

To plot the coherence matrix, type:

Coherence8_13Hz.plotCoherence

You can also create and run the function *nbt_runCoher(Signal, SignalInfo, SaveDir)* to process and save more than one Coherence biomarker at time, as follow in this example code.

Carter, G.C. (1987) Coherence and time delay estimation, Proceedings of the IEEE 75:236-255

Rappelsberger, P. (1989). The reference problem and mapping of coherence: A simulation study. Brain Topog. 2(1/2): 63-7

Thatcher, R.W. and North, D.M. and Biver, C.J. (2008) Development of cortical connections as measured by EEG coherence and phase delays, Human brain mapping, 29(12):1400-1415

Lachaux, J.P. and Rodriguez, E. and Martinerie, J. and Varela, F.J. and others (1999) Measuring phase synchrony in brain signals, Human brain mapping, 8(4):194-208