1 Introduction

Buzsáki proposed that neurons cause synchronous oscillations through conventional excitation and suppression in the network [1, 2], electroencephalograph (EEG), which is a very suitable activity for studying the human brain on the time scale of cognitive processes by covering a large number of the entire head sensors [3, 4]. Synchronization of EEG is thought to be an expression of brain function region integration or binding, time-varying brain activity makes the generated EEG be a non-stationary signal, an extremely complex non-periodic bioelectrical signal because of mutations and noise, how to deal with this signal is a huge challenge. Most signals have an energy distribution of 0.5 and 60 Hz, and their amplitude is usually 2 to 100 μV [5]. Therefore, the EEG signal overlaps many other biological signals and external noise in amplitude and frequency. Since synchronization can be expressed in different ways, various measures have been proposed to quantify the synchronization between signals [4]. A good EEG synchronization measurement method should be insensitive to noise, robust and can detect linear and nonlinear relationships between signals.

Nolte et al. provides an imaginary part of coherency method to study brain interactions which is demonstrated for EEG measurements of voluntary finger movement. But nonlinearity not considered, imaginary part is mostly small, thereby risking to miss meaningful interactions [7]. Stam et al. propose a novel measure to quantify phase synchronization, the phase lag index (PLI), and compare its performance to the well‐known phase coherence (PC), and to the imaginary component of coherency (IC). But Less sensitive to volume conduction, common sources, and montage [6], Vinck et al. [8] proposed phase leads and lags is weighted by the magnitude of the imaginary part of the coherency, but there is no evidence that the size of the phase difference is important for the coupling strength, Relative insensitive to phase differences around 0 and 180 degrees. The advantage of wavelet transform is that it has good time aggregation, high frequency resolution, phase information and its similarity with conventional signals, so it is used to identify the degree of association between two non-stationary time series and perform signal Spectrum estimation. However, there are many ways to use the wavelet transform to determine EEG synchronization. These methods have different advantages when dealing with different problems. But which is the best measure to use? How to use?

In this paper, unidirectional coupled Hénon maps and the auditory Stroop EEG are stimulated, which measure is best able to detect connections that do exist, hence we compare 5 measures of functional connectivity on simulated data and the degree of synchronization of the analog signal can be precisely adjusted. A variety of methods using wavelet synchronization signals and FFT coherence methods are used for comparison. For the problem of parameter setting in wavelet coherence process, the Shannon entropy method is used to optimize the parameters and more accurately detect the synchronization process of cognitive control EEG than FFT coherence. In a word, it is concluded that the wavelet coherence measures performed best on the auditory Stroop EEG.

2 Methods

2.1 Wavelet Correlation Analysis

2.1.1 Wavelet Cross Correlation

Wavelet cross-correlation is similar to classical signal cross-correlation, effectively quantization two signal correlations based on scale. Set two cross-correlation signals \( {\text{x}}({\text{t}}) \) and \( {\text{y}}({\text{t}}) \) at a given scale a and delay u, the wavelet cross-correlation of x and y is defined as:

$$ WC_{XY} \left( {a,u} \right) = E\left[ {W_{XX} \left( {a,\tau } \right)W_{YY} \left( {a,\tau + u} \right)} \right] $$
(2.1-1)

In formula (2.1-1) \( W_{XX} \left( {a,\tau } \right) \) and \( W_{YY} \left( {a,\tau + u} \right) \) are the wavelet transform coefficients of \( x(t) \) and \( y(t) \), respectively.

If the real part \( RW_{XX} \left( {a,\tau } \right) \) and the imaginary part \( IW_{YY} \left( {a,\tau + u} \right) \) of the wavelet transform coefficients are separated, the correlation between the two signals at a given scale a is quantified by the real part, then the wavelet cross-correlation is defined as:

$$ WR_{XY} \left( {a,u} \right) = \frac{{RWc_{XY} \left( {a,u} \right)}}{{\sqrt {RWC_{XX} \left( {a,0} \right)RWC_{YY} \left( {a,0} \right)} }} $$
(2.1-2)

2.1.2 Real Part Quantization Wavelet Cross Correlation

Sello and Bellazzini suggest that only the real part \( W_{xy} \left( {a,u} \right) = \overline{W}_{xx} \left( {a,u} \right)W_{yy} \left( {a,u} \right) \) of the wavelet transform is considered, and the wavelet local correlation coefficient is defined by the wavelet cross spectrum:

$$ WLCC\left( {a,u} \right) = \frac{{RW_{xy} \left( {a,u} \right)}}{{|W_{xx} \left. {\left( {a,u} \right)} \right|\left| {W_{yy} \left( {a,u} \right)} \right|}} $$
(2.1-3)

2.1.3 Real and Imaginary Wavelet Cross-Correlation

If you consider the information provided by the real and imaginary parts of the wavelet transform, there is a certain relationship. Then the wavelet cross-correlation is defined as:

$$ WR_{XY} \left( {a,\tau } \right) = \frac{{\sqrt {\left| {RWC_{xy} \left( {a,\tau } \right)} \right|^{2} + \left| {IWC_{x\gamma } \left( {a,\tau } \right)} \right|^{2} } }}{{\sqrt {\left| {WC_{xx} \left( {a,0} \right)} \right|\left| {WC_{yy} \left( {a,0} \right)} \right|} }} $$
(2.1-4)

Where \( RWC_{xy} \) and \( IWC_{xy} \) are the real and imaginary parts of the cross-wavelet correlation function defined by Eq. (2.1-1), respectively.

2.1.4 Wavelet Coherence

Based on the above process, after calculating the cross-wavelet spectrum for the signals x and y and smoothing them, Wavelet Coherence (WC) is defined as.

$$ WC_{xy} \left( {a,b} \right) = \frac{{S\left( {WCS_{xy} \left( {a,b} \right)} \right)}}{{\sqrt {S\left( {\left| {CWT_{x} \left( {a,b} \right)} \right|^{2} } \right)} \sqrt {S\left( {\left| {CWT_{y} \left( {a,b} \right)} \right|^{2} } \right)} }} $$
(2.1-5)

According to Schwartz’s inequality:

$$ \left( {\mathop \sum \limits_{{\overline{I} = 1}}^{n} a_{i} b_{i} } \right)^{2} \le \left( {\mathop \sum \limits_{T = 1}^{n} a_{i}^{2} } \right)\left( {\mathop \sum \limits_{T = 1}^{n} b_{i}^{2} } \right) $$
(2.1-6)

Where \( a_{1} , \ldots ,a_{n} ,b_{1} , \ldots ,b_{n} \) are real numbers, and Schwartz’s inequality guarantees that the value of WC is between 0 (the frequency component is completely unrelated) and 1 (the frequency component is completely correlated).

2.2 Fast Fourier-Based Coherence

In order to calculate the correlation of the two signals in the frequency domain, we define by crossover:

$$ C_{xy} (f) = E[X(f)Y^{*} (f)] $$
(2.2-1)

where \( E[.] \) is the expectation operator, \( X(f) \) is the (discrete) Fourier transform of \( x(n) \), the asterisk indicates complex conjugation, and \( {\text{f}} \) is frequency. In practice, afinite number of samples will give a noisy estimate of (cross-and auto-) spectra. To reduce the noise, signals are segmented into equal length pieces, and the spectra of each segment is averaged.

The coherence function \( c(f) \) is the square of the cross spectrum, normalized by the (auto-) spectra of the two signals:

$$ C(f) = \frac{{|C_{xy} (f)|^{2} }}{{C_{xx} (f)C_{yy} (f)}} $$
(2.2-2)

This measure is particularly useful when the correlation between signals is limited to a particular frequency band.

3 Experimental Results and Analysis

3.1 Generate Simulation Signals

We first use the chaotic system to obtain two simulation signals that can control the coherence. Here we use Hénon maps. We can simulate the generation of a pair of unidirectionally coupled \( X \) and \( Y \) signals,

$$ x\left( {k + 1} \right) = 1.4 + bx\left( {k - 1} \right) - x^{2} (k) $$
(3.1-1)
$$ y\left( {k + 1} \right) = 1.4 + dy\left( {k - 1} \right) - [\mu x\left( k \right) + (1 - \mu )y(k)]y(k) $$
(3.1-2)

We analyzed the system in three different situations. One system is the same \( (b = d = 0.3) \), the other two are different systems \( (b = 0.3, \,d = 0.1) \) and \( (b = 0.1, \,d = 0.3) \). The data is generated using the latter two cases. In general, we use μ to control the correlation and independence of the two signal data from \( \mu = 0 \) (completely independent) to \( \mu = 1 \) fully correlated with the simulation.

In order to confirm the relevant method we proposed. We propose that the signal using the chaotic system is superimposed with the real auditory Stroop EEG signal from literature [12]. The 2024 points are generated, and in order to avoid the instant start effect, we give up the first 1000 points. We selected an EEG signal and added it to the two signals generated by the chaotic system. Select 200–280 for display, as shown in Fig. 1, the result of \( b = 0.3 \) and \( d = 0.1 \) when \( \mu = 0.9 \).

Fig. 1.
figure 1

Simulated signal synchronization

3.2 Comparison of related methods results

We used the simulated honen simulation signal to control the correlation to 0.9 to get several synchronization methods. The results of wavelet cross-correlation considering only the real part are shown in Fig. 2A, local wavelet correlation results are shown in Fig. 2B. The wavelet correlations considered in the real part imaginary part are shown in Fig. 2C, 4Wavelet coherence results D in the figure. Through comprehensive comparison we can see that the results of using wavelet coherence are better, indicating that the coherent method has a good effect on synchronous EEG signals.

Fig. 2.
figure 2

Multi-method comparison results graph

Figure 2, the use of wavelet coherence works best. But it’s hard to compare the methods that are intuitively better. Therefore, we have obtained the standard deviation of the results obtained by the two methods.

The red line in Fig. 3 shows the result of the difference between Fourier coherence and 0.9. The blue line shows the standard deviation of the results after wavelet coherence. We can see that the results of wavelet coherence are better than Fourier, but the results are not very obvious. We propose a method for optimizing wavelet parameters based on Shannon entropy.

Fig. 3.
figure 3

Standard deviation result (Color figure online)

3.3 Optimization of Wavelet Parameters

In order to determine the Morlet wavelet shape, the Shannon entropy method is proposed to optimize the wavelet basis parameter β. When the EEG signal is similar to the Morlet shape, a high-amplitude band energy will appear on the time-scale phase plane, and thus the energy distribution can be used. “Sparseness” is used to evaluate the degree of similarity with the mother wavelet, and finally the Morlet wavelet that best matches the EEG signal is obtained.

$$ H\left( p \right) = - \mathop \sum \limits_{i = 1}^{n} p_{i} \log P_{i} $$
(3.3-1)

From the perspective of probability theory, “sparseness” can be described as the uniformity of probability distribution. Combining entropy to reflect the uncertainty of information distribution in information theory, Shannon entropy is used to estimate the sparsity of wavelet transform coefficient matrix. The Shannon entropy \( {\text{H}}({\text{p}}) \) is expressed as follows:

Where: For an indeterminate probability distribution, the sum of all uncertainties satisfying the uncertainty is 1, i.e. \( \sum_{{{\text{i}} = 1}}^{\text{n}} {\text{Pi}} = 1 \).

The wavelet transform coefficients at a certain scale are recorded as the coefficient matrix composed of wavelet transforms corresponding to M scales, and the calculation expressions are as follows:

$$ P_{i} = \left| {w_{g} \left( {a_{j} ,b} \right)} \right|\text{ / }\mathop \sum \limits_{j = 1}^{M} w_{g} \left( {a_{j} ,b} \right) $$
(3.3-2)

The calculated results are shown in Fig. 4.

Fig. 4.
figure 4

Shannon entropy optimizes wavelet parameters

Therefore, by calculating the Shannon wavelet entropy corresponding to different shape Morlet wavelets, the Morlet wavelet parameters are optimized according to the principle that the mother wavelet with the smallest entropy is the most similar to the feature components. As shown in the figure, when the shape parameter \( \upbeta \) is \( 1.2 \).

We use Shannon entropy to optimize wavelet parameters. Select and compare 100 sets of real EEG signals. In Fig. 5, the red line indicates the optimized result, the blue line indicates the result before optimization, and the result show that parameter optimization is found to be better than the original result. We can easily see the difference between the results before and after optimization.

Fig. 5.
figure 5

One hundred groups of signal experimental comparison (Color figure online)

It can be seen that the synchronization effect of wavelet coherence is more precise than the Fourier coherence from Fig. 6 after the Shannon entropy optimization, the error is close to zero (blue line).

Fig. 6.
figure 6

After optimization with Shannon entropy (Color figure online)

4 Conclusion

In this paper, we address part of this question: which measure is best able to detect connections that do exist, in the non-stationary and noisy auditory Stroop EEG data hence we compare 6 measures of functional connectivity on simulated data (unidirectional coupled Hénon maps and EEG). No measure performed best in all tested situations. The FFT andwavelet coherence measures performed best on simulate data, and wavelet coherence performed most reliably on non-stationary data after Shannon entropy parameter optimization. From the perspective of brain network, the synchronization of brain cognition in different cognitive states is obtained more accurately. In the future, the dynamic evolution process of brain cognition can also be analyzed in detail through the method proposed in this paper. It can be seen that the neural network construction and analysis method based on wavelet coherence can be an effective tool to study the neural processing mechanism and we use the Shannon entropy to select the appropriate wavelet parameter to construct brain function connectivity.