In this section, we describe the wavelet coherence and the analytic signal approach, which we have used in the analysis of our data to obtain measures of coherence (in addition to linear coherence by Fourier transformation) and phase synchronization, respectively. Given a real function x(t), the continuous wavelet transform Cx (cwt) is defined as:
where φ(t) is the mother wavelet, and a and b are the scale and location parameters, respectively. In Eq. (1), the * and ⊗ symbols denote the complex conjugate and the convolution operator, respectively.44 We can describe intuitively the wavelet coefficients Cx(a, b) as measuring the local temporal similarity of the original function x(t) and a time-scaled version of the original mother wavelet φ(t). A typical mother wavelet used in cwt is the complex Morlet wavelet, φ(t):
(here we have chosen the form provided in MATLAB documentation: https://www.mathworks.com/help/wavelet/ref/cmorwavf.html) where fb and fc are the time decay parameter and the central frequency, respectively. For the actual analysis of data, the variable t and the parameter fc are intended to be normalized to the sampling time and frequency, respectively. Given the mother wavelet, a scaled version of it with scaling parameter a is characterized by a characteristic frequency:
Note that it can be misleading to associate one frequency to a scaled wavelet. In fact, due to its time localization, a wavelet is characterized by a spectrum of frequencies and f represents only the value where the maximum of the absolute value of its Fourier transform (FT) is found. Equation (3) is the formula that allows one to shift between scale and characteristic frequency. Time scaling of the mother wavelet is therefore achieved by shrinking (a < 1) or dilating (a > 1) the wavelet in time, which corresponds to probing a signal locally in a frequency band centered at higher or lower frequencies, respectively.
Given two functions x(t) and y(t) the wavelet cross spectrum Cx,y and wavelet coherence Cohx,y are defined by:
where S is a smoothing operator in time and scale. Here we have reported the formulas provided in MATLAB documentation (https://www.math-works.com/help/wavelet/ref/wcoherence.html). The time-scale resolved phase difference between the two signals is defined as:
A different method to define the phase of a time-dependent function is the analytic signal method.45 Given a function x(t), its Hilbert transform (HT) is defined as Hx(t):
where p.v. denotes the Cauchy principal value of the integral. One important property of the HT is that it shifts the phase of the Fourier components by ±π/2:
where the tilde (~) denotes the FT and sgn(ω) is the signum function. The analytic signal of a function x(t) is defined as:
and it has the property that its FT contains only positive frequencies. However, the definition of analytic signal by itself does not guarantee a unique definition of instantaneous phase and frequency of a signal, the reason being that the analytic signal may contain a broad spectrum of positive frequencies. The method of analytic signal leads to a unique (noncontradictory) definition of instantaneous phase and frequency of a signal only if the Bedrosian’s product theorem holds true,45 which requires that a signal is defined in a “narrow” frequency band. If this requirement is not met, paradoxical results for the instantaneous phase and frequency of a signal are found46 (pp. 913–914). Therefore, for a correct definition of instantaneous phase by the analytic signal method, first a narrow band pass filter centered at the frequency of interest is applied to the signal x(t) and a filtered signal xF(t) is obtained. Afterwards, the analytic signal is defined by:
where HxF is the Hilbert transform applied to the filtered signal. The instantaneous phase is defined as:
Both wavelet transform and the analytic signal method allow one to define an instantaneous phase difference between two signals which are particularly useful under nonstationary conditions. Usually, given a time interval in which the phase difference of two signals is studied, both methods yield a distribution of phase values (one phase value for each time point), and the question arises if the distribution is consistent with the hypothesis of a constant, well-defined phase difference between the signals. If the distribution is peaked around a certain phase value, we could argue in favor of a phase covariation or synchronization of the two signals. On the contrary, if the phase distribution is uniform or rather broad, we conclude that there is no phase covariation or synchronization of the signals. In this study, we have used the concept of PSI which is based on the definition of entropy of a random variable.47 Given a discrete random variable with N possible values, the definition of Shannon entropy is:
where Pi is the probability of the ith value of the random variable. The PSI is defined as:
where Emax = ln(N). Strictly speaking, the Shannon entropy of a random variable is defined by using log2, since the maximum entropy coincides with the number of bits necessary to code the maximum information, i.e., when all the values are equiprobable. In general, we can easily demonstrate that, regardless of the base for the logarithm d (d > 1), the maximum entropy occurs when all the outcomes of the random variable are equiprobable and it coincides with logd(N) On the contrary, the entropy of a random variable is zero only when one outcome is certain (i.e., Pi = 1; Pj = 0, j ≠ i). From the definition of entropy, it follows that the PSI can take values in the range 0–1 and, specifically, PSI = 1 when E = 0, and PSI = 0 when E = Emax. Other metrics for phase synchronization are also found in the literature. We mention a metric inversely related to the standard deviation of an angular variable,44,48 an index based on conditional probability,47 and an index based on mutual information.49 We note that different metrics may yield different synchronization values because they are sensitive to different features of the phase distribution of the two signals. For example, the PSI of the relative phase of two signals can have a high value also for a multimodal distribution, i.e., having distinct narrow peaks. However, in this case, the distribution might have a large standard deviation and therefore the related synchronization index might not be significant. More complex measures of synchronization have been considered in the field of electroencephalography (EEG).50
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.
Tips for asking effective questions
+ Description
Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.