- Tutorials, follow the NBT course

**Follow us **

**Most popular pages**

Table of Contents

Coordinated activation over different brain regions can be measured using the statistical method which goes under the name of *phase synchronization*.

Synchronization phenomena have been widely explore in chaotic systems and in the field of nonlinear dynamics.

Applied to biological time series (irregular, non-stationary, non-linear and noisy) of the brain electrical activities, phase synchronization detection can provide an indication of short-range synchronies, commonly interpreted as subserving 'perceptual binding' among adjacent or same brain regions, and more interesting it can describe long-range synchronization patterns between widely separated brain regions, thought to subserve cognitive mechanisms, such as memory, emotion, motor planning.

Phase synchronization differs from coherence measure: the latter does not separate the effects of amplitude and phase in the interrelations between two signals, while in the former the phase component is obtained separately from the amplitude component for a given frequency

This page is divided into two sections:

- Extended Phase Synchrony tutorial, which is meant to give you a deeper understanding of Phase Synchronization mechanisms, using coupled chaotic systems as example.
- Computing Phase Locking Value using NBT, which explains how to compute Phase Locking in NBT.

Two coupled frictionless harmonic oscillators, and , are in phase synchrony when the PHASE LOCKING relationship is verified:

where *n* and *m* are small integers that define the frequency equality of the coupled slow and fast oscillations, and are the phases of the two oscillators and is the *relative phase*.

In noisy and/or chaotic systems, the phase locking condition is replaced by the weaker PHASE ENTRAINMENT condition:

or by the even weaker condition of FREQUENCY LOCKING:

where <> denotes averaging over time, is the *relative frequency*, and are the frequency of the oscillators expressed as time derivative of the phase of the two oscillators, respectively.

In biological signal, such as EEG time series, synchronization is measured computing the PHASE LOCKING VALUE, which is the mean phase coherence of an angular distribution:

where is the relative phase, N is the number of samples of the data set, CV denotes the circular variance of an angular distribution obtained by transforming the relative phase angles onto the unit circle in the complex plane.

R has values in [0 1], R reaches the value 1 if and only if the condition of strict phase locking is obeyed, whereas for a uniform distribution of phases (for example in unsynchronized time series) R = 0.

Instantaneous Phase is computed using Hilbert transform (see link for definition). Since this requires integration over infinite time, which cannot we performed for a finite length data set, 10% of the calculated instantaneous phase values should be discarded on each side of the dataset. Instantaneous phase difference can be computed using either wavelet analysis or Hilbert transformation. Studies show that these two approaches are equivalent for the analysis of EEG signals.

For illustration, here, we consider a commonly used example with two coupled (1,2) non identical Rossler systems subjected to noisy perturbations:

where a, b, c are constant parameters of the Rossler systems, are the natural frequencies of the two systems, governs the strength of the coupling, are two Gaussian delta-correlated noise.

The code in this link solves the coupled system of equations, extracts the instantaneous phase of the two oscillators computes the relative phase when the systems are uncoupled (, and not affected by noise), coupled (, and not affected by noise) and affected by noise.

Indeed, as you see in the figure below, increasing the coupling strength the systems are more and more synchronized resulting in small oscillations of relative phase around a constant value also in presence of noise.

Interestingly, it is possible to identify LAG SYNCHRONIZATION, meaning that phase synchronization between the system appears at specific time lag, τ. This time lag is obtained my computing the minimum of a *Similarity Function* defined as follow:

.

If , for , and *COMPLETE SYNCHRONIZATION* is verified, and the systems are perfectly coupled.

If the similarity function has a minimum for nonzero time shift, it means that a time lag exists between the two processes.

If and are completely independent for all time shifts .

In the following figure you can see how increasing the coupling strength not only the mean relative frequency reduces, but also the similarity function has minimum in correspondence of smaller time lag.

You can obtain this plot using the code in this link , where we vary the coupling factor from 0 to 0.4, for two coupled nonidentical Rossler systems.

Considering EEG time series correlated non linear oscillators, we simulate two real signals and , linear combination of the components and of two uncoupled Rossler systems affected by noise ().

mu = 0.02; u = mu*x2+(1-mu)*x1; v = mu*x1+(1-mu)*x2;

We compute the instantaneous phases using Hilbert transform:

h1=hilbert(u); h2=hilbert(v); [phase1]=unwrap(angle(h1)); [phase2]=unwrap(angle(h2)); % since the calculation of the hilbert transform requires integration over % infinite time; 10% of the calculated instantaneous values are discarded % on each side of every window % discard 10% perc10w = floor(nit/10); phase1 = phase1(perc10w:end-perc10w); phase2 = phase2(perc10w:end-perc10w);

We compute the Phase Locking Value (PLV):

n = 1; m = 1; RP=n*phase1-m*phase2; % relative phase P_L_V=abs(sum(exp(i*RP))/length(RP));

In the following figure, we show how increasing the coupling strength of the two systems the PLV approaches 1.

Until now we made the hypothesis of locking ratio equal to , which is plausible in EEG time series given that signals are obtained from the same physiological system (i.e. the brain).
In some chases you may want to examine synchronization mechanisms measured at different districts (i.e. synchronization between MEG and Electromiographic signals ) or you want to be sure that the assumption n:m = 1:1 is correct for every couple of EEG time series. In order to determine the *n:m ratio synchronization indices* are introduced. n:m synchronization indices are used also to characterize the strength of synchronization.

Here we present three main indexes that are implemented in the function nbt_n_m_detection . These indices can be computed for different n:m ratio, the n:m ratio that gives the largest indices is, then, selected. You can also use the function nbt_n_m_surrogate_detection where surrogate data are used to derive significance levels for the indices.

**1. Index based on Shannon Entropy**

It is defined as:

where is the entropy of the distribution of the cyclic relative phase , , where N is the number of bins used for the distribution. The optimum number of bins (N) is set as , where L is the number of data points.

, where corresponds to a normal distribution (no synchronization), corresponds to a Dirac-like distribution (perfect synchronization). Such distribution can be observed only in the ideal case of phase locking of noise-free quasilinear oscillators.

**2. Index based on the intensity of the first Fourier mode of the distribution**

It is defined as:

. The advantage of this index is that its computation involves no parameters: we do not need to choose the number of bins as we do not calculate the distribution itself.

**3. Index based on conditional probability**

If the oscillators are strongly nonlinear then the distribution of is non-uniform even in the absence of noise. We observe the phase of the second oscillator () at the instants of time when the phase of the ﬁrst one attains a ﬁxed value (phase stroboscope):

To account for the n:m locking, the phases are wrapped into intervals and , respectively. Repeating this procedure for all and averaging, we get a statistically signiﬁcant synchronization index. Practically, if we deal with the time series, we can introduce binning for the phase of the ﬁrst oscillator, i.e. divide the interval into N bins. Next, we denote the values of falling into the l-th bin as and the number of points within this bin as . Then, we compute corresponding values , where

If the oscillators are not synchronized, then we expect to be uniformly distributed on the interval , otherwise these quantities group around some value and their distribution is unimodal. To quantify it, we compute:

The case of complete dependence between both phases corresponds to , whereas vanishes if there is no dependence at all. To improve the statistics, we average over all N bins and get the synchronization index.

According to the deﬁnition above measures the conditional probability for to have a certain value provided is in a certain bin.

In NBT Phase Locking Value (PLV) is computed by the function *PhaseLockingObject = nbt_doPhaseLocking(Signal,SignalInfo,FrequencyBand,interval,filterorder)* which updates the Phase Locking Value Biomarker Object. This function computes the PLV for each couple of EEG signals, for a specified frequency band (*FrequencyBand*) in HZ and a specified time interval in second (*interval*). You can also specify the order of the fir filter used to extract the desired frequency components (default value is *filterorder = 4*).

When you set the filter order remember that the signal length must be at least 3 times the filter order. When you set the frequency band remember that the highest of the frequencies must be minor that the half of the sampling frequency

Since nbt_doPhaseLocking uses Hilbert Transform to compute the phases of the signals, for signal longer than 4096/fs seconds (fs is the sampling frequency), the PLV is averaged over a windowed signal (hanning windows of width 4096 samples with 20% overlapping), resulting in a compromise between statistical accuracy and stationarity. This procedure might take more computational time

The command here after computes the PLV 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.

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

To plot the PLV matrix, type:

PhaseLockingValue8_13Hz.plotPLV

Interestingly, the Phase Locking Value Biomarker Object contains information also on the synchronization indices (i.e. PhaseLockingValue8_13Hz.indexE based on Shannon Entropy,PhaseLockingValue8_13Hz.indexF based on intensity of the first Fourier mode, PhaseLockingValue8_13Hz.indexCF based on conditional probability).

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

Tass, P. and Rosenblum, MG and Weule, J. and Kurths, J. and Pikovsky, A. and Volkmann, J. and Schnitzler, A. and Freund, H.J., Detection of n: m phase locking from noisy data: application to magnetoencephalography, Physical Review Letters, 81, 15, 3291-3294,1998, APS

Mormann, F. and Lehnertz, K. and David, P. and E Elger, C., Mean phase coherence as a measure for phase synchronization and its application to the EEG of epilepsy patients,Physica D: Nonlinear Phenomena, 144, 3-4, 358-369, 2000

Michael G. Rosenblum, Arkady S. Pikovsky, and Jürgen Kurths, From Phase to Lag Synchronization in Coupled Chaotic Oscillators HYSICAL REVIEW LETTERS, VOLUME 78, NUMBER 22, 2 JUNE 1997

Michael Rosenblum, Arkady Pikovsky, Jurgen Kurths Carsten Schafer, and Peter A. Tass, Phase synchronization: from theory to data analysis Handbook of Biological Physics, Elsevier Science, Series Editor A.J. Hoff, Vol. 4, Neuro-informatics, Editors: F. Moss and S. Gielen, Chapter 9, pp. 279-321, 2001.

Otnes R., Enochson L. (1972) Digital time series analysis, John Wiley & Sons, New York

M. Le Van Quyen et al., “Comparison of Hilbert transform and wavelet methods for the analysis of neuronal synchrony,” J. Neurosci. Methods, vol. 111, pp. 83-98, 2001.