Skip to main content

Advertisement

Adaptive filtering and analysis of EEG signals in the time-frequency domain based on the local entropy

Abstract

The brain dynamics in the electroencephalogram (EEG) data are often challenging to interpret, specially when the signal is a combination of desired brain dynamics and noise. Thus, in an EEG signal, anything other than the desired electrical activity, which is produced due to coordinated electrochemical process, can be considered as unwanted or noise. To make brain dynamics more analyzable, it is necessary to remove noise in the temporal location of interest, as well as to denoise data from a specific spatial location. In this paper, we propose a novel method for noisy EEG analysis with accompanying toolbox which includes adaptive, data-driven noise removal technique based on the improved intersection of confidence interval (ICI)-based algorithm. Next, a local entropy-based method for EEG data analysis was designed and included in the toolbox. As shown in the paper, the relative intersection of confidence interval (RICI) procedure retains the dominant dipole activity projected on electrodes, while the local (short-term) Rényi entropy-based analysis of the EEG representation in the time-frequency domain is efficient in detecting the presence of P300 event-related potential (ERP) at specific electrodes. Namely, the P300 are detected as sharp drop of entropy in the temporal domain that enabled accurate calculation of the index of the noise class for the EEG signals.

Introduction

Electroencephalogram (EEG) is one of the earliest methods for observing brain dynamics. It also has been one of the most reliable, affordable, and non-invasive ways of recording brain activity. While recording EEG, it is important to design the recording scenario focusing on the brain dynamics of interest. The factors the number of electrodes, placement of electrodes, subjects condition, scalp preparation, any external distractions, and many more play an important role in either obtaining a proper recording or crippling the experiment in turn causing poor recording session.

With all the external and internal factors that could adversely affect the session taken care of in the best possible way, the EEG recorded can provide useful insight into the underlying phenomena and brain dynamics of the subject. While some brain dynamics, like the activity during sleep and epileptic seizures, could be difficult to accurately correlate to induced events, some other potentials like contingent negative variation (CNV), mismatch negativity (MMN), and P300 are related to the occurred event. This event can be marked on a time scale, and the EEG following this event could be observed with higher temporal resolution. Such potentials which are neural responses of events are often referred to as event-related potentials (ERP). One of the early ERP researchers, Herb Vaughan in 1969, defined ERP as the general class of potentials that display stable time relationships to a definable reference event.

P300 is one of the most studied ERPs, arguably one of those potentials which is understood the most when compared to other ERPs [1]. Research on the P300 component by Squires, Squires, and Hillyard (1975) revealed a lesser prominent P3a component and a P3b component. Verleger, Jaskowski, and Wauschkuhn (1994) have shown that P3b component is observed for targets that are infrequent but are in some sense expected; most researchers refer to this as P3 component or P300 component. It gets its name due to the fact that the early researchers noticed that the ERP had a peak amplitude at around 300 ms [2]. Work done by Donchin (1981) proposed that the P300 wave is somehow related to a process called “context updating”; this was confirmed by other researchers as well [3, 4], considering these there has been development of practical response to stimuli communication methods. Such methods are built on algorithms that leverage real-time streaming of EEG data to classify between a P300 signal (which is target ERP), and a non-target ERP [48]. Any such system which interacts with computer and tries to interpret brain signals to do a certain task is called brain computer interface (BCI) systems.

The importance of response to stimuli detection and identification has been shown in a significantly large number of experiments with different kinds of stimuli [46, 9]. Popular among them is the visual P300 ERP experiment, often used as a speller [10]. Namely, in the visual P300 experiment, the user is shown a matrix of characters, images, or faces; the user is expected to focus or perform a specific response to target stimuli by counting or pressing a button whenever the stimuli flashes. This response to stimuli is expected to produce P300 ERP. Nonetheless, P300 are not the only brain dynamics that are occurring during the experiment, as other neuronal activities are constantly happening in the brain which, in our case, are considered as noise. Additionally, there are also other electrical activities that electrodes pick up like 50 Hz line noise, eye blink artifacts, and muscle artifacts. There are numerous effective artifact removal techniques which get rid of these artifacts, therefore we shall consider EEG data with dipole activations and without artifacts in our data processing steps.

With real-life EEG data, it is difficult to validate and study the advantages and limitations of data analysis methods, but with deep understanding of the data, it becomes clear what to expect from the data simulations, and how to treat the data, allowing the validation of data analysis methods with ground truth data. Moreover, the advantage of being able to manipulate effect sizes and noise characteristics in simulated data, which is not possible to do in real data, makes the simulation of data even more essential. A fair amount of research work has been done using simulated data [1114]. In our case, we simulate data with dynamics, features, and parameters of P300 ERP in mind in order to make it look as similar as possible to real data. Next, we analyze some real-life P300 data [10], keeping in mind that the ground truth about this data could be affected by artifacts, noise, and mood of the subjects and other factors, and also that data sample is not large enough to draw any cognitive conclusions.

The rest of the paper is structured as follows. Section 2 provides information on the structure of the data analyzed in the paper. An adaptive, data-driven method for noise removal from EEG records is described in Section 3.1, followed by the representation of the EEG signals in time-frequency domain explained in Section 3.2. Section 3.3 presents the proposed approach for detecting the phenomena of interest in EEG time-frequency domain using the local (short-term) entropy measures both for simulated and a real-life P300 EEG data. Discussion on visual comparison of results are elaborated in Section 4, followed by conclusion in Section 5.

Structure of simulated data

The biophysical events, which give rise to scalp ERP, are presumed to occur if an excitatory neurotransmitter is released at the apical dendrites of a cortical pyramidal cell. Resulting phenomena is detected as the current flowing from the extracellular space into the cell, yielding a net negativity on the outside of the cell in the region of the apical dendrites. To complete the circuit, the current will also flow out of the cell body and basal dendrites, yielding a net positivity in this area. Together, the negativity at the apical dendrites and the positivity at the cell body create a tiny dipole. Hence, by interpreting this in terms of source activation, a dipole is defined as a pair of positive and negative electrical charges separated by a small distance.

As shown in Fig. 1a, we use a non-adaptive distributed source imaging method with 2004 dipoles for a standard head shape with fixed locations and orientations (their magnitudes are estimated by defining a set of electrode weights for each source location). Thus, 64 electrodes and 3 dipole orientations generate 64×3×2004 weighting matrix. For example, multiplying the data from all electrodes by the weights for the 637th element of that weighting matrix would give you the estimate of activity at the 637th voxel in the brain model for the selected head shape.

Fig. 1
figure1

The 637th dipole location, signal dipole projection with orientation according to X plane

However, accurate spatial localization of P300 ERP is rather challenging and requires further technological advancements to achieve precise source localization. This is due to the fact that for each person’s idiosyncratic folding pattern of the cortex is not the same. Thus, in this paper, we shall consider, based on reliable sources, that P300 dipole activation was largest at a midline parietal electrode site [1]. So, in order to simulate a P300 ERP, dipole activation is simulated to occur and peak at 300 ms, and the effect of this dipole activation is dominantly visible at electrode locations/numbers Pz(31), CPz(32), P1(20), P2(57), CP1(19), and CP2(56) (but it can also be seen on some other more distant electrodes) as visible in Fig. 1b. This kind of simulations where one dipole is activated is commonly addressed as forward model.

Some of the disadvantages of the above method are that the weights for each electrode are not fine-tuned to the statistical properties of the data. Another disadvantage is the number of comparisons that can be computed must be controlled in statistical analyses. But having clear hypotheses to constrain the analyses and results search space will help address both the issues to a significant extent [15].

One particular disadvantage of the ERP technique is that ERPs are so small that it usually requires more than one trials to measure them accurately. Therefore, we consider 30 trails which seems to be a modest number of trails for a P300 experiment [9].

In order to make the simulated data as real as possible, let us also consider the situation where the subject who is responding to the event does not necessarily respond to the event with millisecond accuracy and with the same concentration and state of mind for each trial. This results in P300 ERP which might not accurately peak at 300ms causing latency variability. In addition, there are other brain dynamics which occur around P300, viz, P100 or P200 and N400, which might or might not be visible due to the effect of other dipole activation. Considering these factors, we do not just use a Gaussian waveform to represent a P300, but we do a pointwise multiplication of Gaussian and a trial unique sine wave (where each trial has its own random phase value) which results into a trial unique Morlet-like wavelet.

Let us now consider a Gaussian taper with a peak at 300 ms and sinusoidal waveform of 10 Hz.

$$ x(t) = ae^{-(t-m)^{2}/(2\sigma^{2})} $$
(1)

where a is the amplitude of Gaussian, t is the total number of time point, m is peak time, and σ is the width of the Gaussian, and the sinusoidal waveform

$$ v(t) = cos(2\pi f t + 2 \pi \xi) $$
(2)

where f is the frequency of the sinusoidal waveform, t is the total number of time points, and ξ random value which shifts the phase of the waveform randomly on each trial. With t values same for both Gaussian and Sinusoidal, pointwise multiplication of these two waveforms gives us a wavelet which looks like a typical Morlet wavelet.

$$ y(t) = x(t) v(t) = e^{\frac{-t^{2}}{2\sigma^{2}}} e^{2\pi f t + 2 \pi \xi} $$
(3)

For the wavelets, which are generated for T=30 trials, the phase randomly changes for each trial. The average of all these wavelets from each trial at the dipole level is shown in Fig. 2a.

Fig. 2
figure2

a Average of 30 phase-shifted Morlet wavelets at dipole 637. b Average of 30 trails at electrode CPz

Unlike the Gaussian taper which smoothly dissipates to zero on both the sides, Morlet wavelet integrates to zero. This means it has both positive and negative values in the middle and tapers to zero on both the ends such that the sum over integral is approximately equal to zero. This kind of narrow-band responses which are also transient in nature are typical for cognitive brain responses [16, 17].

The noise in our simulated data is just an activation of other dipoles which are projected onto the electrodes. An immediate intuitive thought when trying to simulate noise is to add white noise, i.e., adaptive white Gaussian noise (AWGN), but in our EEG simulation, it is crucial to consider that noise should look like temporal dynamics that have been recorded by the electrode placed on the scalp. These temporal dynamics in real-life data are the results of neural responses due to activities which are uncorrelated to event, viz, other cognitive, motor, perceptual, and language processes. Such data on the dipole level has a mixture of signals with different frequencies and amplitudes.

In order to represent this, we generate a pink noise, initially generated in the frequency domain, Fig.3a. It decreases with an increase in frequency, due to which it is also referred to as factorial noise or 1/f noise. The parameter called the exponential decay ed allows us to control how frequencies decays as we initially represent these amplitude varying frequencies in the frequency domain with

$$ A_{c} = \xi(1,{\frac{n}{2}-1}) e^{\frac{-{\lim}_{(1 \to \frac{n}{2}-1)} x}{ed}} $$
(4)
Fig. 3
figure3

a Frequency domain representation of 1/f noise. b Histogram of noise. c Time domain representation of noise at dipole 2004

where ξ is a random variable generated for each data point n which has 1024 data points as we consider 1 s long signal with sampling rate of 1024. Ac represents the amplitude coefficients of ξ random variables which are multiplied by exponential parameter from Euler’s formula eik to give fc Fourier coefficients

$$ f_{c} = A_{c} e^{i 2\pi \xi} $$
(5)

Here, ξ is the random sizes of amplitude parameter for n data points. Coefficients such as fc are generated for each dipole that is the real part of the inverse Fourier transform which represents the noise that is generated by each dipole

$$ X = \text{real}(\text{IFFT}(f_{c})) $$
(6)

The histogram representation of the noise in Fig.3b shows that the noise is normally distributed, and the time domain representation in Fig. 3c shows the temporal structure of the data which very closely represents the real EEG signal.

The projection of dipoles onto the electrodes can be represented with a linear algebraic equation

$$ Y = LX $$
(7)

where X is a matrix of dipole time series data, which is multiplied with L the lead field matrix to give matrix Y which is electrode time series data [18].

Figure 2b represents the trial average of ERP at electrode CPz, which shows activity due to the projection of dipoles onto CPz. The interesting thing about the electrode CPz is that it is one of those electrodes which is near to the scalp location where the P300 dipole activation is happening. Therefore, features of P300 in the ERP along with noise are visible in Fig. 2b.

Now that we have established ground truth about the data, in order to evaluate the accuracy of the data analysis method, we can compare the results of the data processing pipeline in Section 3.1, against the data that is simulated and projected onto the electrodes. This gives us an evaluation of the ground truth about the data and also the effectiveness of the data analysis method.

Methods

RICI algorithm

A fairly simple and most commonly used method of isolating ERPs from the EEG noise (which is the result of activation of other dipoles) is to average across trials. Averaging across more and more trails will progressively reduce the EEG noise. But as the EEG noise N decreases as a function of the square root of the number of trails T, the size of noise in an average of T trails equals \((1/\sqrt T) \times N \); therefore, increasing the number of trials only works to a certain extent.

Figure 4 shows the trail averaged spatial activity across all the electrodes. Here, in each electrode, the ERPs are isolated from the EEG noise, but as it can be seen that there is one major limitation to this method, i.e., the number of EEG trails used to average out EEG noise is not enough, as there is still much noise that is obscuring the features of interest. It might be tempting to increase the total number of trials by, for example, four times (T=120), and this might reduce the noise by 50%. But this is not a practical solution since the time needed to detect ERP would be much higher, which in turn increases the length of the whole EEG recording session.

Fig. 4
figure4

Time by activity representation of ERPs at all the 64 electrodes

An alternative approach that we propose in this paper is tested with the simulated P300 ERP (from Section 2). This method is based on adaptive temporal filtering, where adaptive filters are able to reconfigure themselves by tracking non-stationary changes in the signal.

A method that originally proposed this kind of adaptive filtering [19] was shown to efficiently adapt to unknown smoothness of the signal [20] ensuring close to optimal bias-to-variance trade-off [21], getting its name based on its functionality as the intersection of confidence intervals (ICI) method [20]. The goal of the ICI based denoising procedure is to obtain discrete estimates \(\hat {y}(t_{i})\) as close as possible to the noise-free signal y(ti); the ICI method does so by selecting upper and lower boundaries of confidence interval to track non-emptiness of confidence intervals intersection, whose limits can be expressed as:

$$ U(t_{i}, h) = \hat{y}(t_{i},h) + \Gamma. s(t_{i},h), $$
(8)

and

$$ L(t_{i},h) = \hat{y}(t_{i},h) - \Gamma. s(t_{i},h). $$
(9)

where Γ is the preset threshold, h is the window size which is less than or equal to optimal window size [22], and ti is instantaneous time for the estimates \(\hat {y}(t_{i})\). Note that the performances of the ICI-based denoising are highly dependent on threshold Γ [23], which causes oversmoothing for larger values of Γ and undersmoothing for small values of Γ.

An improved ICI-based method, called the relative intersection of confidence intervals (RICI), has been proposed in [24]. The modified approach takes into account the amount of overlapping

$$ O(t_{i},h) = \underline{U}(t_{i},h)-\overline{L}(t_{i},h), $$
(10)

and defines R(ti,h) as a ratio of the overlapping versus the size of the considered confidence interval:

$$ R(t_{i},h) = \frac{\underline{U}(t_{i},h)-\overline{L}(t_{i},h)}{U(t_{i},h)-L(t_{i},h)}. $$
(11)

Now, if ICIs are empty R(ti,h)=0, and if all the previous confidence intervals are inside the considered confidence interval, then R(ti,h)=1, making R(ti,h)[0,1]. The improved method introduces threshold Rc as a additional criterion defined as:

$$ R(t_{i},h) \geq R_{c} $$
(12)

where Rc[0,1].

For our EEG signal, we choose the values Γ=4.4 and Rc=0.85, as suggested in [25], for temporal smoothing which significantly reduces noise retaining features of the narrow band cognitive response around 300 ms. This can be seen at electrode CPz(32), Pz(31), CP2(56), and P2(57) in Fig. 5, when compared to Fig. 4. Anyway, since RICI filtering does not have prior knowledge of the feature that needs to be retained, it cannot distinguish between other features and P300 ERP; therefore, there are features in Fig. 5 which may be misunderstood as useful information. Hence, in order to understand the behavior of the P300 feature better, we express the data in time-frequency domain in Section 3.2, in order to represent and understand the behavior of the distribution with respect to changes in its entropy in Section 3.3. As electrodes CPz, Pz, CP2, and P2 are primarily influenced by P300 dipole activation and given the correct adjustment of parameters Γ and Rc, which allows RICI to denoise the ERPs at these electrodes, the RICI results are shown and discussed with more details in Section 4.

Fig. 5
figure5

Time by activity representation of ERPs after RICI for 64 electrodes

Finally, it is worth mentioning that a plugin for EEGLAB toolbox [26], where the RICI method can be applied on any data that can be imported into EEGLAB, is been built. In this plugin, the parameters Γ and Rc can be adjusted manually to best suite the data that needs to be denoised and features that need to be retained. The goal here is to provide a tool to the researchers to manually do denoising on specific temporal regions of the data or run denoising on the whole dataset by selecting parameters of Γ and Rc using the RICI plugin.

Time-frequency ERP representations

The non-stationarities of an ERP signal are encoded in the phase spectrum of the signal, and their direct extraction causes problems like phase unwrapping, as the frequency characteristics of such a signal are equally important. The assumption that the signal is roughly stationary over some shorter (sliding) time window gives us a better frequency resolution because instantaneous frequency commonly describes phase variations. This allows us to compute the power spectrum of a signal over short windows of time resulting in high resolution (energy concentration) and integrity (correct boundaries in time and frequency) [27].

Hamming window decays quite fast relative to other window functions, which suites our need for building a distribution which reflects any quick changes in the signal onto the distribution.

Let us consider a Hamming window of size h(τ)=7 as an analyzing window in a quadratic distribution:

$$ SPW_{s} (t,f) = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} g(t-u) H(f-v) W_{s}(u,v)\; \mathrm{d}u \mathrm{d}v. $$
(13)

which is known as smoothed pseudo-Wigner-Ville distribution (SPWVD) [28]; we therefore obtain energy distribution by smoothing the density distribution with the window function h(τ). The resulting time-frequency power plots for few EEG electrodes are shown in plot (b) of Figs. 6, 7, 8, 9, 10, and 11 of each electrode which shows the energy spectrum of the distribution for P300 ERP at electrodes CPz, Pz, CP2 and P2. Also, notice that some of these electrodes, viz, Oz and F6, do not have the P300 ERP or its feature in the time-frequency plane.

Fig. 6
figure6

Electrode CPz a. Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 7
figure7

Electrode Pz. a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 8
figure8

Electrode CP2. a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 9
figure9

Electrode P2. a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 10
figure10

Electrode Oz. a Time domain representation of ERP. b SPWVD time-frequency representation.c Short-term Rényi entropy of the distribution

Fig. 11
figure11

Electrode F6. a Time domain representation of ERP. b SPWVD time-frequency representation.c Short-term Rényi entropy of the distribution

Rényi entropy

The EEG data have non-stationarities in the recordings, which resulted in a mixture of signal components with different time durations and frequency band widths. These varying frequencies in time have been expressed in the form of instantaneous power and energy spectrum using SPWVD, as shown in 13. Based on this, it has been established that an entropy of a multi-component system is relatively larger than for the mono-component system, and the generalized entropy of such system represented in the time-frequency domain is well expressed with Rényi entropy [28] as

$$ H_{\alpha} (C_{s_{n}}) = \frac{1}{1-\alpha} \log_{2} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} C_{s_{n}}^{\alpha} (t,f)\; \mathrm{d}t \mathrm{d}f, $$
(14)

where Cs(t,f) is the distribution obtained from 13 and additionally normalized, and α is rank of Rényi measure. Figure 12 shows in red (circle point representation) the entropies of averaged ERPs for each electrode; it also shows in green (square point representation) the entropies of averaged ERPs for the same electrodes after the data had been processed by the RICI temporal denoising (as explained in Section 3.1). Change in global entropy after RICI shows that the standard deviation

$$\sigma = \sqrt{\frac {\sum\nolimits_{i=1}^{N} (x_{i} - \overline{x})^{2}}{N-1}} $$

of the ERPs across the scalp for the given time period has increased by 0.1%.

Fig. 12
figure12

Change in global Rényi entropy before and after RICI for average of ERPs at each electrode

This shows that although global Rényi entropy is a good indicator of signal complexity, change in entropy for the ERPs obtained across the scalp provides us with very little information on what is happening on the electrode level.

Therefore, in this paper, we explore the solution which can represent the P300 features using short-term Rényi entropy [28] using a sliding window of fixed size. This is done by considering different portions of the (t,f) plane; for each time instant p to obtain different values of the Rényi entropy, where p is centered in the (t,f) plane for the upper and lower window span t0, we can express the short-term Rényi entropy as

$$ C_{s_{p}} (t,f) = \left\{ \begin{array}{rcl} C_{s}(t,f), & p - t_{0} < t < p + t_{0}, \\ 0 & otherwise, \end{array} \right \} $$
(15)

Plots (a), (b), and (c) of Figs. 6, 7, 8, 9, 10, and 11 show simulations of ERPs at electrodes, their time-frequency distribution, and their short-term Rényi entropy which represents the change in instantaneous power of the distribution Cs(t,f) for each time instant p.

The Rényi entropy of a signal is invariant to the active dipole orientation (if it is negative or positive) and does not care about the within subject variation; this makes it a robust tool for ERP analysis.

To check short-term Rényi entropy methods’ performance with some real-life EEG dataset, we considered training datasets of two subjects from visual P300 experiment [10] which was recorded using the paradigm described by Donchin et al., in 2000, [5] and originally by Farwell and Donchin, in 1988 [6]. Researchers were interested in basically two types of responses which were recorded at 240 Hz, one that would appear if the character the user was focusing flashed, and thus was considered as target response, and the non-target response is the one where characters were flashing while the user was focused on the character he selected, waiting for it to flash. This produced a target ERP and a non-target ERP which are trail averaged with other targets and non-targets as shown in plot (a) of Fig. 13 and Fig. 14, and short-term Rényi entropy of target and non-target shows a clear difference on how the local changes in entropy are different for targets and non-targets; this is clearly visible in plot (b) of Fig. 13 and Fig. 14 for the electrode Cz. The dataset provided was prepossessed to minimize noise, and more details about the dataset and experiment can be obtained by studying P300 experiment conducted by Wolpaw, in 2002 [10].

Fig. 13
figure13

Visual P300 experiment recorded at electrode Cz for subject A. a Trial average ERPs of targets and non-targets. b Short-term Rényi entropy of averaged ERPs

Fig. 14
figure14

Visual P300 experiment recorded at electrode Cz for subject B. a Trial average ERPs of targets and non-targets. b Short-term Rényi entropy of averaged ERPs

Results and discussion

The position of P300 dipole in the head model of Fig. 1a and its projection due to dipole activation is shown in Fig. 1b, based on which we simulated P300 narrow band responses on the dipole level which has been trail averaged and shown in Fig. 2.

Other dipole activations which represent noise in our dataset have been initially simulated with factorial decaying frequencies in the frequency domain as shown in Fig. 3a, and the normal distribution of the histogram in Fig. 3b shows how pink noise is almost Gaussian, very similar to adaptive white Gaussian noise. Meanwhile, the time domain representation of the pink noise shown in Fig. 3c looks much more like real biological EEG activity and shows how it is different than the adaptive white Gaussian noise in its temporal structure.

Simulated P300 ERP on an electrode level, which is a combination of simulated P300 narrow band response and noise, projecting onto the scalp is shown in Fig. 2b. Such trial averaged scalp projections of activity in each electrode has been shown in Fig. 4 for all the 64 EEG electrodes. The scalp projections of activity after adaptive RICI temporal denoising is shown in Fig. 5. Finally, Fig. 12 compares before and after RICI global Rényi entropy and shows the shift of global entropy for each of the 64 EEG electrodes.

Electrodes CPz, Pz, CP2, P2, Oz, and F6 were few electrodes chosen to show more details in the structure of ERP which is visible in plot (a) of Figs. 6, 7, 8, 9, 10, and 11 and Figs. 15, 16, 17, 18, 19, and 20 which show the before and after RICI trail averaged ERPs at the said electrodes, and plot (b) of Figs. 6, 7, 8, 9, 10, and 11 and Figs. 15, 16, 17, 18, 19, and 20 show the pre- and post-RICI representations of ERP time-frequency distribution obtained by SPWWD. Plot (c) of Figs. 6, 7, 8, 9, 10, and 11 and Figs. 15, 16, 17, 18, 19, and 20 shows the time domain representation of local short-term Rényi entropy changes, which is based on the energy spectrum of the ERPs for pre- and post-RICI.

Fig. 15
figure15

Electrode CPz after RICI. a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 16
figure16

Electrode Pz after RICI a Time domain representation of ERP b SPWVD time-frequency representation c short-term Rényi entropy of the distribution

Fig. 17
figure17

Electrode CP2 after RICI.a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 18
figure18

Electrode P2 after RICI. a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 19
figure19

Electrode Oz after RICI. a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

Fig. 20
figure20

Electrode F6 after RICI. a Time domain representation of ERP. b SPWVD time-frequency representation. c Short-term Rényi entropy of the distribution

The pre-processed Visual P300 experiment datasets obtained from BCI competition 3 [10] have subjects A and B EEG data at the Cz electrode location for both target and non-target ERP activities. This has to be averaged across their respective trials, and their ERP is shown in plot (a) of Figs. 13 and 14, and plot (b) of Figs. 13 and 14 which shows the local short-term Rényi entropy for both target and non-target ERP to facilitate discussion and comparison with results of the simulated dataset.

Analysis of real-life P300 ERP in general [1], as well as the dataset we obtained and studied [10], shows that the P300 ERP waveform vary significantly between subjects. In addition, external factors as drop in concentration or internal factors like noise due to other dipole activations could cause small variations in latency and phase of P300 ERP [1, 29]. This is the reasons why the proposed method for ERP analysis is designed not to depend on any prior information about the signal.

With respect to real-life P300 ERP datasets, the simulated ERP dataset has a lot in common to the one explained in Section 2, so much so that we can consider the factors like the variation in latency and phase that affect the real-life P300 ERP dataset, to stand true to our simulated dataset as well.

A visual interpretation of the temporal dynamics of the ERPs of our simulated data at near dipole electrodes CPz, Pz, CP2, and P2 (in the plot (a) of Figs. 6, 7, 8, and 9) shows that the effect of P300 dipole activation, although visible around 300 ms, has been corrupted by noise from other dipoles. The time-frequency representation in plot (b) of Figs. 6, 7, 8, and 9 for the same electrodes more clearly shows the P300 feature, but it also has many ridges throughout the temporal plane. Far dipole electrodes Oz and F6 in plots (a) and (b) of Figs. 10 to 11 do not have P300 feature as they are relatively away from P300 dipole activation region (however, they also have ridges and features due to other dipole activations which are not relevant to P300).

Also, it is worth noting that the recommended (in Section 3.3) short-term Rényi entropy changes in Figs. 6, 7, 8, and 9 are not consistent for the near dipole electrodes.

But once the ERPs are denoised with the RICI, as suggested in Section 3.1, including P300 ERP component, other dominant components are also retained, which is visually comparable between Fig.4 and Fig. 5.

Comparison between plots (a) and (b) of Figs. 6, 7, 89, 10, and 11) and Figs. 15, 16, 17, 18, 19, and 20) both for near dipole electrodes and far dipole electrodes show the cleaner ERP temporal dynamics and lesser ridges in the time-frequency representation in the latter. By the way, the P300 ERP and its temporal dynamics around 300 ms are more clearly visible at near dipole electrodes in plots (a) of Figs. 15, 16, 17, and 18 than in Figs. 6, 7, 8, and 9.

Interestingly, the short-term Rényi entropy method (elaborated on in the Section 3.3) after RICI denoising (as explained in Section 3.1), gives a bell-shaped curve around the temporal region where P300 ERP is dominant. This is visible for near dipole electrodes in Figs. 15, 16, 17, and 18, but it is not present for far dipole electrodes (which has nothing but noise, and it can be considered to have similar uncorrelated EEG activity as non-targets).

The bell-shaped curve is comparable with the short-term Rényi entropy of real visual P300 ERP dataset that has been analyzed in plot (b) of Fig. 13 to Fig. 14 for targets. As local Rényi entropy shows a steep drop in the zone of event detection and then a steady climb indicating the local similarity in the P300 activity (which is then followed by a steep drop, representing the difference between ERP and pink noise), this can be noted as area of detection for our ERP. The reason why the bell shape is much larger with real visual P300 ERP is explained by the original sampling rate being 240 samples per second, and the chosen short-term Rényi entropy window size is selected to consider 101 samples, thus making the area of detection larger. In simulated P300 ERP whose sampling rate is 1024, a short-term Rényi entropy window size of 101 creates smaller local entropy bell-shaped curve.

Note that the proposed entropy-based analysis requires the short-term Rényi entropy window to be carefully selected for the ERP based on its temporal structure, since the short-term Rényi entropy window size should be large enough to detect the ERP component of interest. We therefore have allow user in the short-term Rényi entropy toolbox plugin to manually select the desired window size. However, an automatic procedure for selecting the optimal window size is planned to be investigated in our future work.

Conclusion

The paper present a novel approach for noisy EEG signal interpretation in the time-frequency domain. In order to analyze EEG dynamics more accurately, it is necessary to denoise the data. Noise removal was performed using the improved adaptive, data-driven ICI method, called the RICI method (which was also included in the accompanying toolbox). The results of the RICI filtering showed that the P300 feature was successfully retained in the time-frequency domain while the noise was significantly reduced. Next, a local Rényi entropy was proposed as a tool for the P300 detection in the time-frequency distributions of the denoised EEG records. It was shown that the local Rényi entropy is superior to peak-based measures due to its insensitivity to latency variability and change in dipole orientation. Both the RICI and local Rényi entropy analysis have proved to perform well for the simulated data where ground truth is known. The method was also applied to real-life P300 data showing the promising results. In our future work, we plan to perform comprehensive testings on the large P300 datasets and other ERPs in order to obtain detailed performance analysis of the proposed technique for analysis of the EEG records in the time-frequency domain. For this purpose, we have also built a toolbox plugin to automatize large datasets analysis.

Availability of data and materials

Please contact the authors for data requests.

Abbreviations

AWGN:

Adaptive white Gaussian noise

BCI:

Brain computer interface

CNV:

contingent negative variation

EEG:

Electroencephalogram

ERP:

Event-related potential

ICI:

Intersection of confidence interval

MMN:

Mismatch negativity

RICI:

Relative intersection of confidence interval

SPWVD:

Smoothed pseudo-Wigner-Ville distribution

References

  1. 1

    S. J. Luck, An introduction to the event-related potential technique, vol. 33, 2nd ed. (MIT Press, Cambridge, 2014).

  2. 2

    S. Sutton, M. Braren, J. Zubin, E. R. John, Evoked-potential correlates of stimulus uncertainty. Science. 150(3700), 1187–1188 (1965).

  3. 3

    S. J. Luck, E. K. Vogel, K. L. Shapiro, Electrophysiological evidence for a postperceptual locus of suppression during the attentional blink. J. Exp. Psychol. Hum. Percept. Perform.24(6), 1656–1674 (1998). https://doi.org/10.1037/0096-1523.24.6.1656.

  4. 4

    B. Rivet, A. Souloumiac, G. Gibert, V. Attina, P300 Speller brain- computer interface: enhancement of P300 evoked potential by spatial filters P300. IEEE, 16th European Signal Processing Conference, Lausanne, pp. 1-5, 2008.

  5. 5

    E. Donchin, K. M. Spencer, R. Wijensinghe, The mental prosthesis: assessing the speed of a P300-based brain-computer interface. IEEE Trans. Rehab. Eng.8:, 174–179 (2000).

  6. 6

    L. A. Farwell, E. Donchin, Talking off the top of your head: towards a mental prosthesis utilizing event-related brain potentials. Electroencephalogr. Clin. Neurophysiol.70(6), 510–23 (1988).

  7. 7

    B. Rivet, A. Souloumiac, V. Attina, G. Gibert, xDAWN algorithm to enhance evoked potentials: application to brain-computer interface. IEEE Trans. Biomed.56(8), 2035–2043 (2009).

  8. 8

    B. Rivet, A. Souloumiac, Optimal linear spatial filters for event-related potentials based on a spatio-temporal model: asymptotical performance analysis. Sig. Process.93(2), 387–398 (2013). https://doi.org/10.1016/j.sigpro.2012.07.019.

  9. 9

    G. Madhale Jadav, L. Batistić, M. Vrankić, S. Vlahinić, Brain computer interface communicator: a response to auditory stimuli experiment (IEEE, 2017). https://doi.org/10.23919/mipro.2017.7973461.

  10. 10

    J. R. Wolpaw, N. Birbaumer, D. J. McFarland, G. Pfurtscheller, T. M. Vaughan, Brain-computer interfaces for communication and control. Clin. Neurophysiol.113:, 767–791 (2002).

  11. 11

    W. Miltner, C. Braun, R. Johnson Jr., G. V. Simpson, D. S. Ruchkin, A test of brain electrical source analysis (BESA): a simulation study. Electroencephalogr. Clin. Neurophysiol.91:, 295–310 (1994).

  12. 12

    Y. Wang, P. Berg, M. Scherg, Common spatial subspace decomposition applied to analysis of brain responses under multiple task conditions: a simulation study. Clin. Neurophysiol.110:, 604–14 (1999).

  13. 13

    J. Yao, J. P. A Dewald, Evaluation of different cortical source localization methods using simulated and experimental EEG data. NeuroImage. 25(2), 369–382 (2005). https://doi.org/10.1016/j.neuroimage.2004.11.036.

  14. 14

    S. Haufe, V. V. Nikulin, K. R. Müller, G. Nolte, A critical assessment of connectivity measures for EEG data: a simulation study. NeuroImage. 64:, 120–133 (2013). https://doi.org/10.1016/j.neuroimage.2012.09.036.

  15. 15

    D. Barnes-Holmes, C. Staunton, Y. Barnes-Holmes, R. Whelan, I. Stewart, S. Commins, D. Walsh, P. Smeets, S. Dymond, Interfacing relational frame theory with cognitive neuroscience: semantic priming, the implicit association test, and event related potentials. Int. J. Psychol. Psychol. Ther.4:, 215–240 (2004).

  16. 16

    R. J. Barry, J. A. Rushby, J. L. Smith, A. R. Clarke, R. J. Croft, M. J. Wallace, Brain dynamics in the active vs. passive auditory oddball task: exploration of narrow-band EEG phase effects. Clin. Neurophysiol.18(10), 2234–2247 (2007). https://doi.org/10.1016/j.clinph.2007.06.059.

  17. 17

    J. Sinkkonen, H. Tiitinen, R. Näätänen, Gabor filters: an informative way for analysing event-related brain activity. J. Neurosci. Methods. 56(1), 99–104 (1995).

  18. 18

    M. X. Cohen, Analyzing neural time series data: theory and practice (MIT Press, Cambridge, 2014).

  19. 19

    A. Goldenshluger, A. Nemirovski, On spatial adaptive estimation of nonparametric regression. Math. Methods Stat.6(2), 135–170 (1997).

  20. 20

    V. Katkovnik, A new method for varying adaptive bandwidth selection. IEEE Trans. Sig. Process.47(9), 2567–2571 (1999).

  21. 21

    P. Tie-Gen, W. Yin-Hua, W. Ti-Hua, Mean shift algorithm equipped with the intersection of confidence intervals rule for image segmentation. Pattern Recogn. Lett.28(2), 268–277 (2007).

  22. 22

    V. Katkovnik, On multiple window local polynomial approximation with varying adaptive bandwidths (Physica-Verlag HD, 1998). https://doi.org/10.1007/978-3-662-01131-7_47.

  23. 23

    A. S. Ashour, N. Dey, Adaptive window bandwidth selection for direction of arrival estimation of uniform velocity moving targets based relative intersection confidence interval technique. Ain Shams Engineering Journal. 9(4), 835–843 (2018). https://doi.org/10.1016/j.asej.2016.03.021.

  24. 24

    J. Lerga, N. Saulig, M. žuškin, A. Panjkota, in 4th International Conference on Smart and Sustainable Technologies (SpliTech). Denoising accuracy of adaptive ICI-based estimators with regards to sampling rate (IEEE, 2019). https://doi.org/10.23919/splitech.2019.8783082.

  25. 25

    J. Lerga, M. Vrankic, V. Sucic, A signal denoising method based on the improved ICI rule. IEEE Sig. Process. Lett.15:, 601–604 (2008).

  26. 26

    A. Delorme, S. Makeig, EEGBAB: an open source toolbox for analysis of single-trial EEG dynamics. J. Neurosci. Methods. 134(1), 9–21 (2004). https://doi.org/10.1016/j.jneumeth.2003.10.009.

  27. 27

    B. Boashash, Time Frequency Signal Analysis and Processing: A Comprehensive Reference (Elsevier, Oxford, 2003).

  28. 28

    V. Susic, N. Saulig, B. Boashash, Estimating the number of components of a multicomponent nonstationary signal using the short-term time-frequency Rényi entropy. EURASPI J. Adv. Sig. Process.2011(1) (2011). https://doi.org/10.1186/1687-6180-2011-125.

  29. 29

    S. J. Luck, S. A. Hillyard, Electrophysical evidence for parallel and serial processing during visual search. Percept. Psychopyhsics. 48(6), 603–617 (1990). https://doi.org/10.3758/bf03211606.

Download references

Funding

This work was fully supported by the Croatian Science Foundation under the projects IP-2018-01-3739, and IP-2020-02-4358, Centre for Artificial Intelligence and Cybersecurity - University of Rijeka, University of Rijeka under the projects uniri-tehnic-18-17 and uniri-tehnic-18-15, and European Cooperation in Science and Technology (COST) under the project CA17137.

Author information

GMJ and JL contributed to the conceptualization. GMJ and JL contributed to the methodology. GMJ contributed to the software. JL and IS contributed to the validation. GMJ and JL contributed to the investigation. JL contributed the resources. GMJ and JL contributed to the data curation. GMJ contributed to the writing and preparation of the original draft. JL and IS contributed to the writing of the review and editing. Supervision was done by JL. Project administration was done by JL. Funding acquisition was done by GMJ, JL, and IS. All authors read and approved the final manuscript.

Correspondence to Guruprasad Madhale Jadav.

Ethics declarations

Consent for publication

This research does not contain any individual person’s data in any form (including individual details, images, or videos).

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Madhale Jadav, G., Lerga, J. & Štajduhar, I. Adaptive filtering and analysis of EEG signals in the time-frequency domain based on the local entropy. EURASIP J. Adv. Signal Process. 2020, 7 (2020). https://doi.org/10.1186/s13634-020-00667-6

Download citation

Keywords

  • Non-stationary signals
  • Electroencephalogram (EEG)
  • Event-related potentials (ERP)
  • P300
  • Relative intersection of confidence interval (RICI)
  • Time-frequency signal analysis
  • Rényi entropy