Keywords

1 Introduction

A BCI is a technology that allows interaction with external devices without making use of peripheral muscles or nerves. There are different ways to implement a BCI, one of them is through P300 ERP. P300 component is the name given to a positive signal deflection appearing at approximately 300 ms after a stimulus [16]. To evoke a P300 in a subject it is necessary to present a specific stimulus, usually both frequent and infrequent stimuli are presented. The subject is instructed to respond to infrequent stimuli, this procedure is known as the oddball paradigm [15]. There are several ways of presenting this stimulus, although the majority is based on the P300 speller paradigm of Farwell and Donchin [5]. One of the techniques used for its detection is electroencephalography (EEG), among its advantages are its high temporal resolution and relative low cost.

One of the biggest challenges for the P300-based BCI is to improve ERP detection in real-time [10]. Variability of the signal is an obstacle that does not allow achieving this goal. The variability of amplitude and latency impair the detection of the P300 component, these are affected by the attention of the subject or the difficulty of the task [6, 12]. The high inter-trial variability impairs the early detection of this ERP. In order to overcome those problems, the stimulus is repeated several times, although repetitions can cause fatigue [14] and a decrease in task performance [3, 8]. This is why most investigations seek directly or indirectly to improve the accuracy of the system with the least number of trials and thus improve the Information Transfer Rate ITR [10]. Therefore, achieving high accuracy with a single trial is a challenge. Another intrinsic disadvantage of this BCI modality is the low SNR, and thus the difficulty to differentiate between the P300 signal and neural background activity [2].

It is well known that P300 components are more prominent in the central, parietal and occipital lobes [12], although it is not clear yet what characteristics of the signal of each lobe can be measured to help the detection of this ERP [13]. For example, ERP signal has been parameterized with the amplitude peak or with the area under the curve (AUC) in a P300 window, as described by Farwell and Donchin [5] without conclusive results when these parameters were used as unique characteristic for the detection of P300. However, we suggest that by measuring the maximum AUC in the P300 region of each stimulus can be used to locate the electrodes that improve the SNR in a P300-based BCI.

Our method is based on the fact that if we know a priori the instant that the target stimulus is presented in a P300-based BCI we will be able to look for where there is an amplitude increase and therefore an increase of AUC in the EEG signal. In other words, we believe that, while the target stimuli the AUC increases in the P300 region, the non-target stimulus does not increase as much. Thus, electrodes having the highest AUC in the P300 region are potentially likely to have better characteristics for detecting P300 effectively. Here we propose a new method to detect the maximum relative AUC in a P300 region. We analyze how the detection of this AUC at each stimulation contributes to improve SNR in P300-based BCI. We want to know how maximum relative AUC parameter helps the detection of P300 component with a minimum number of trials. We believe that by finding electrodes with the maximum relative AUC at each stimulation, we will improve the prediction of a classifier.

2 Materials and Methods

In this section, we describe the dataset used for the analysis, the data preprocessing, we detail the proposed method and the procedure for classification.

2.1 DataSet

Second Competition BCI dataset IIb [1] was used for this offline analysis. P300 speller paradigm based on a paradigm described by Donchin et al. [4] was used to collect data from a single subject. These data were divided into three sessions, two sessions with data to train a classifier (42 characters) and one remaining session (with 31 characters) to predict the target characters.

P300 Speller Paradigm. In this paradigm, the subject was asked to concentrate on a letter that was inside a matrix with 36 alphanumerical characters, 6 rows and 6 columns. Each row and column flashed randomly one at a time, so each character will have 12 stimuli. The user must mentally count the times the row or column with the target character flashed. This presentation of 12 stimuli per character was based on an oddball paradigm [15], in which when two stimuli were presented: one frequent and one infrequent, the latter elicit a P300 component [15]. In this case, the row and column with the target character were the infrequent stimuli so they will contain a P300 component.

Data Collection. To spell one character, each row and column (of the 12) were flashed for 100 ms, randomly, one at a time. After each flash all rows and columns were blank for 75 ms, as explained in the competition description. In the end, there were 180 stimuli or flashing per character (12 row/column \(\times \) 15 times). The set of 12 stimuli was called trial and are repeated 15 times per character.

The data of the subject were collected at a sampling frequency of 240 Hz in three hierarchies: sessions, runs and characters. Each session contained runs, each runs contained a set of characters that form a word. In each run the subject focused on one character at a time.

2.2 Preprocessing

For our offline analysis we took 600 ms (144 samples) from the onset of the stimulus. Each of these segment was called epoch. Each trial was bandpass filtered 0.5–30 Hz and normalized to an interval of [−1 1]. Although this method was used for offline processing, in the future, our goal is to use it for online processing.

2.3 Area Calculation Method

The main objective of our method was to find the electrodes with maximum relative AUC in the zone where a P300 component can appear. The relative term was used since the maximum P300 AUC of the stimulus of one trial may be less compared to the maximum AUC of another stimulus of a different trial.

In general terms, the method calculated the AUC of the voltage signal generated by each stimulus (target and non-target) in the place where P300 was presumed exist, near the 300 ms (we will call them P300 window). The stimulus that contained the largest AUC was assumed to be the one that contained a P300 component. Subsequently, we evaluated the number of hits per electrode, which contained the maximum number of hits will be the maximum score and the rest of hits per electrode was normalized in function of this one. A hit means having detected all P300 components to accomplish the objective task. We used the training data to calibrate the P300 window and obtained the greatest number of hits. The electrodes with the highest score (or hits) will be considered for the classifier. We present this method of the maximum relative AUC with the P300 speller paradigm by Donchin [4], the method is general enough to be used in any other ERP paradigm.

Fig. 1.
figure 1

Diagram of method with P300 window. First, we determine the limits of the P300 window, the difference between the upper and lower limit of P300 window will determine the number of sliding windows (SW). Then, the size of the SW (n) is established and within it, we calculate the evolution of the AUC k times. k depends on SW

In what follows, we illustrate how the method was applied in the P300 speller paradigm previously described (character matrix 6-by-6). In this paradigm, it is considered that only two out of twelve stimuli (6 rows and 6 columns) should have increased AUC approximately to 300 ms from the onset of the stimulus, while the remaining ten (stimuli) would maintain their AUC or at least they would not change as much as the previous ones. However, it is known that the variability between stimulus and stimulus makes it difficult to differentiate them [10], which makes it a problem to overcome.

Fig. 2.
figure 2

Evolution of the AUC by trial. Top panel: In all trials to detect the letter ‘T’, two target stimuli have the largest AUC compared to the ten non-target stimuli. Bottom panel: Non-target stimuli has the largest area in almost all trials.

First, we established a P300 window where it is known that this component is generated, normally between 250 and 500 ms from the onset of the stimulus [12], although it was adjusted according to the number of hits. Once established the P300 window our method was in charge of calculating the evolution of the AUC. This evolution implies that within the P300 window a sliding window is established and within it a small initial interval (of n samples) is configured to calculate the AUC, see Fig. 1. As the interval grows we continue to calculate the area until reaching the limits of the sliding window that will be the largest interval calculated. This sliding window advances in steps of 1 sample until it reaches the limit of the P300 window.

In an ideal case, the calculated AUC of the target stimulus would evolve much faster than the non-target stimulus. That is, in one trial of 12 stimuli, 2 stimuli (1 row and 1 column) will have larger AUC values than the remaining ten, as shown in the top panel of Fig. 2. With this in each trial, the maximum area of the rows and columns was chosen to result in a single character of the stimulation matrix.

The detection of the target character was considered a success, otherwise, a failure. In each character, we calculated the relative error by dividing the number of hits by the number of trials. At the end, each electrode had a relative error depending on the number of hits. The electrodes that had the highest number of hits was the one that for us more information contributes.

In the Fig. 2 we can observe the evolution of the areas by trial of two characters, with good and poor results. In the top panel, there is a character of session 10 that was successful in all the trials, the maximum areas corresponds to the target stimuli. On the other hand, in the bottom panel, one target character of session 11 was not selected correctly in any trial since the maximum relative AUC does not correspond to the target stimuli.

Fig. 3.
figure 3

Electrodes and relative maximum area score. It can be observed that the electrodes with greater relative AUC in the P300 window are in the central and frontal lobes. Histogram of area-by-electrodes scores: the scores were obtained according to the number of hits that were achieved in each trial.

2.4 Classification

For the prediction of the target character we have chosen Krusienski method [9]. This is a fast method to classify with LDA. In this method, 800 ms (192 samples) were taken after each intensification which we call epoch. Each epoch was filtered with a moving average and then decimated with a factor of 12, leaving a total of 16 samples (192/12) per electrode. Eight electrodes: Fz, Cz, Pz, P3, P4, PO7, PO8, Oz; were selected and concatenated. In the end each epoch has 128 samples (16*8). Two training sessions with 42 characters were used to train the LDA model. The prediction of the class was made trial to trial. 0 was assigned for non-P300 class and 1 for P300 class. To infer the target character from test set was used:

$$\begin{aligned} \begin{aligned} predicted_{row}&=argmax_{rows}\left[ \sum _{i_{row}}w \cdot f(x_{i_{row}})\right] \end{aligned} \end{aligned}$$
(1)
$$\begin{aligned} \begin{aligned} predicted_{col}&=argmax_{cols}\left[ \sum _{i_{col}}w \cdot f(x_{i_{col}})\right] \end{aligned} \end{aligned}$$
(2)

where x is the feature vector, \(f(\cdot )\) is a transformation function and w is a vector of classification weights [9].

3 Results

Our method allowed to identify the electrodes with maximum relative AUC in the P300 window that helped us to improve the classifier’s success using the fewest trials. The central and frontal lobes were the electrodes with higher relative AUC (see Fig. 3) and they help to decrease the percentage of error, as shown in Fig. 4. Our results were compared with those obtained by applying the Krusienski method and with the results of the BCI competition 2003 winners. Although the winners of the competition used a Gaussian SVM kernel to achieve 100% success from 5 trial, the results are comparable since they use the same dataset. To facilitate the description of the results we present 2 approaches for our analysis. In the first, we show the maximum percentage of hits with the lowest number of trials. In the second approach, we demonstrate that with the selection of the appropriate electrodes we can improve the number of hits and decrease the computational cost for the detection of P300.

Fig. 4.
figure 4

Comparison of hits by trials. Method of the relative maximum AUC (Asterisk) with 10 electrodes: 6 occipital/parietal lobes and 4 central/frontal lobes reach 100% accuracy from the fourth trial. Krusienski method (squares) with 8 electrodes reach 100% error from the ninth trials and BCI Competition 2003 Dataset IIb (circle) from the fifth trial with 10 electrodes (Color figure online)

Fig. 5.
figure 5

Influence of the central or frontal lobe electrodes in the classifier. Top Panel: The trials required for a 100% success decrease from 9 to 5 when one electrode of the central (C3) or frontal (F1) lobe with maximum relative AUC is added to the electrodes of the occipital and parietal lobes of Krusienski method. Bottom panel: C3 and F1 electrodes plus occipital and parietal lobes electrodes of Krusienski method reach 100% success from the fourth trial. (Color figure online)

3.1 Reduction of Error and Number of Trials

A performance of 97.41% of the total hits (15 trials) was achieved with 10 electrodes, 6 electrodes of the occipital and parietal lobe of the Krusienski method: Pz, Oz, P3, P4, PO7, PO8; plus 4 electrodes with higher AUC: C1, FC2, Fz, F1. With this combination of electrodes 100% of hits from the fourth trial was achieved, overcoming the Krusienski method that reaches 100% from the ninth trial and total hits of 92.25%. Our results also surpassed the winners of the BCI competition 2003 [7] that achieved 100% success from the fifth trial, who use 10 electrodes: Fz, Cz, Pz, Oz, C3, C4, P3, P4, PO7, PO8.

Figure 4 presents the percentage of hits for each trial. From the first trial the classifier results improved with the electrodes of maximum relative AUC. In this trial the hits are increased from 17 characters (from 31) with the Krusienski method to 23 hits with the method of the areas. In the third trial our method of the AUC only fails in 1 characters, then from the fourth trial all the characters are correct.

In the figures below (Figs. 4 and 5), a 10–20 system brain mapping was used to illustrate the results and the electrodes used in each configuration. Each electrodes configuration has a different color and marker that determines which electrodes were used. For example, the green color and circle marker represents the results BCI competition, in the brain mapping, each electrode is marked with green and circle.

3.2 The Importance of Selecting the Appropriate Electrode

A single electrode of the central or frontal lobe with maximum relative AUC plus 6 of the occipital and parietal lobes was sufficient to reduce the number of trials necessary to achieve 100% success from the fifth trial. Our method reduces to 7 the number of electrodes necessary to achieve 100% of success from the fifth trial surpassing the BCI competition 2003 winners who used 4 electrodes of the central and frontal lobes and the results of the Krusienski method using 2 (see Fig. 5).

We wanted to quantify how much the electrodes of the central and frontal lobes contribute in hits rate. For this, we evaluated the results of the classifier taking into account only the electrodes of the occipital and parietal lobes used in the Krusienski method, without taking into account Fz and Cz electrodes. We observed that the classifier started with a low percentage of success and only in the ninth trial reached a total success. While adding a single electrode of the central or frontal lobe (C3, F1), the classifier to hit 100% from the fifth trial Fig. 5. The results even improve with the addition of F1 and C3 to the electrodes of the parietal and occipital lobes, see bottom panel of Fig. 5.

4 Discussion and Conclusions

This paper proposes a new methodology to extract more information from EEG electrodes in a P300-based BCI. We present the relative maximum AUC as a characteristic that contributes to the detection of the P300 component. This will help the detection of the electrodes with higher SNR that contribute to the reduction of the number of trials necessary for the detection of P300 and to improve the prediction error of the classifier.

We observed that with the use of a single electrode of the central or frontal lobe, with maximum relative AUC, plus 6 of the parietal and occipital lobes the results of the classifier can be improved. Figure 5 shows that the electrode F1 contribute more to the classifier than CZ and FZ used in the Krusienski method [9]. Our results also surpass the winners of the BCI competition II [7], who use 4 electrodes from these brain regions: FZ, CZ, C3, C4. Electrode selection methods allow using fewer electrodes and reducing setup time and cost for an EEG-based P300 spellers [11].

Similarly, the results of the Fig. 4 show that using 4 electrodes with higher relative AUC and 6 electrodes of the parietal and occipital lobes we can maximize the percentage of total hits to 97.41% and hit with a smaller number of trials. We understand that there are other electrodes of these lobes (central/frontal) that provide information but to a lesser degree that even some of them may even impair the detection of P300.

It is important to emphasize that what we are detecting is not necessarily the maximum AUC in a electrode, rather we are detecting how different AUC’s are in this brain region. We are showing that the AUC differences between the target and non-target stimuli of the central and frontal area greater than in other brain regions in this subject. With this work we are looking for AUC to maximize the differences between a target and a non-target stimulus. It is still unclear which features are specifically involved in the detection of P300. However it would seem that the AUC in the P300 window is a feature that could help detect this ERP with few trials. It is necessary to consider that there are other characteristics that contribute to the detection of P300 like N200, N100, among others.

One of the weaknesses that we observe in this method derives from external noise component that only damages an epoch, fluctuations that alter the calculation of the areas and therefore the maximum relative AUC. We consider that the search for other characteristics, such as those mentioned in the previous paragraph, can help to overcome it.

This method aims to help the adaptability of BCI in each subject detecting a specific feature in each stimulus of each electrode. We believe that these types of methods, which look for specific characteristics, can help overcome the inter- and intra-subject variability that affect BCI. This is why in the future we will study how these characteristics vary between subject and subject.