Effects of the concentration level, eye fatigue and coffee consumption on the performance of a BCI system based on visual ERP-P300

Background: A widely used paradigm for Brain-Computer Interfaces (BCI) is based on detecting P300 Event-Related Potentials (ERPs) in response to stimulation and concentration tasks. An open challenge corresponds to maximizing the performance of a BCI by considering artifacts arising from the user’s cognitive and physical conditions during task execution. New Method: In this study, an analysis of the performance of a visual BCI-P300 system was performed under the metrics of Sensitivity (Sen), Specificity (Spe), Accuracy (Acc), and Area-Under the ROC Curve (AUC), considering the main reported factors affecting the neurophysiological behavior of the P300 signal: Concentration Level, Eye Fatigue, and Coffee Consumption. Comparison with existing methods: We compared the performance of three P300 signal detection methods (MA-LDA, CCA-RLR, and MA+CCA-RLR) using a public database (GigaScience) in different groups. Data were segmented according to three factors of interest: high and low levels of concentration, high and low eye fatigue, and coffee consumption at different times. Results: The results showed a significant improvement between 3% and 6% for the metrics evaluated for identifying the P300 signal in relation to concentration levels and coffee consumption. Conclusion: P300 signal can be influenced by physical and mental factors during the execution of ERPs evocation tasks, which could be controlled to maximize the interface’s capacity to detect the individual’s intention.


Introduction
During the last decades, BCI technologies have been used to restore the communication and control skills of people with disabilities.These systems can identify the user's intention and execute an assigned task with information from Central Nervous System (CNS) without using the Peripherical Nervous System (PNS) (McFarland and Wolpaw, 2011).For this reason, BCI systems have been implemented and researched in education, motor rehabilitation, robotics, and medicine (Chaudary et al., 2016;Abdulkader et al., 2015;Perez Vidal et al., 2016;Rezeika et al., 2018;Patelia and Patel, 2019).
Most BCI systems obtain brain information through Electroencephalography (EEG), intending to generate patterns in signals related to specific mental tasks or strategies.One task of selective attention corresponds to the oddball paradigm, which allows the evocation of Event-Related Potential (ERP) P300.The P300 is a positive deviation of microvolts, with a latency (between stimulus and response) with random stimuli.Moreover, when an oddball stimulus is presented, the P300 signal is evoked.For this reason, it has been studied that concentration plays an essential role in the behavior of the P300 signal (Carlson, 2021;Vazquez-Marrufo, 2017), e.g., a decrease in the amplitude of the P300 signal has been demonstrated when the subject performs two simultaneous tasks during an experimental design (Picton, 1992).The concentration factor has also been studied through more interactive BCI systems using a video game, where a positive relationship was reported between the amplitude of the signal and the concentration level of the participants during the experiment (Koike et al., 2019).As well as concentration level, other neurophysiological factors have been of interest in studies of BCI systems (Pitt and Brumberg, 2021), such as motivation (Hammer et al., 2012), emotional stability (Hammer et al., 2018), and working memory (Sprague et al., 2016).Furthermore, moderate but significant correlations have been found between BCI system performance and the psychological characteristics of the individual (Hammer et al., 2012).
Furthermore, studies also report that the consumption of different substances may influence neuronal activities and, with it, can modify the performance of the ERP during the execution of tasks (Chen et al., 2020).Among the substances that may affect the ERP amplitude and latency, coffee is a product of great interest to the scientific community due to the positive effect of caffeine intake on cognitive performance.This effect has been demonstrated through decreased latency in the frontal cortex, which is related to improved cortical activity (Chen et al., 2020;Deslandes et al., 2004).
Another factor of interest with the BCI using visual stimulus corresponds to the form of stimulation because when the subject is presented with unusual stimuli, such as faces (Lee et al., 2019) or different colors (Guo et al., 2019), the performance of the BCI system is better.However, a problem arises: constant stimulation can generate visual fatigue for an extended period.This factor has been considered in EEG signals involving visual stimulation, where a decrease in accuracy has been reported in individuals who showed eye fatigue (Bieger et al., 2010;Collura, 2002;Guerrero-Mendez et al., 2021).
As mentioned in some previous examples, the electrophysiological behavior of the P300 signal can be affected by the user's cognitive, mental, and physical processes during the development of an experimental design in a BCI system.These factors related to individual-specific conditions could generate artifacts that affect the features of the P300 signal.With this, the recognition algorithms in an ERP-based BCI system may reduce or improve their performance whether the subject is focused, unfocused, with eye fatigue, without eye fatigue, or had a consumption of coffee in the hours before experimental development (Carlson, 2021;Picton, 1992;Deslandes et al., 2004;Chen et al., 2020).For this reason, and considering the open challenge of the scientific community for decoding the P300 signal in the presence of noise (Won et al., 2019;Dmitriev et al., 2018;Xiao et al., 2019;Blanco Díaz and Ruiz Olaya, 2020;Philip and George, 2020), the detection of physiological and cognitive variables that decrease the accuracy of the system and affects the performance of BCI are of interest (Hammer et al., 2018(Hammer et al., , 2012)).The goal is to carry out more controlled and accurate experimentation sessions, thus providing greater comfort to the individual who uses the interface and maximizing the system's usability.
This paper performs a comparative study to evaluate how specific mental and physical factors could affect the performance of P300-BCI systems.Two methods reported in the literature were used to identify P300: The Mean Amplitude with Linear Discriminant Analysis (MA-LDA) (Hwang et al., 2017;Lee et al., 2019), and the Canonical Correlation Algorithm with Regularized Logistic Regression (CCA-RLR) (Blanco Díaz and Ruiz Olaya, 2020).These methods were implemented using a public EEG database, which was segmented into different subject groups for the following factors: good vs. bad concentration level, high vs. low eye fatigue, and people who consumed coffee before the experiment at different times.In summary, the BCI system based on P300 may be affected by any of the above three conditions.
A maximum average AUC of 85.08% was obtained for the group with high concentration, which was significant concerning those with low concentration (78.74%).Additionally, the group that consumed coffee more than 4 h before the experiment had a significant better performance (88.25%) compared to those who did not consume coffee (84.26%) or consumed coffee less than 4 h before the experiment (81.06%).Finally, the group that did not perceive visual fatigue obtained an increase of 5.08% in AUC compared to the group that perceived visual fatigue.The results allow this work to conclude that concentration factor, visual fatigue, and coffee consumption play an important role in the performance of BCI systems based on the detection of P300 signals.This fact leaves an open door for future studies that allow a more controlled environment of these factors, and maximizing the interface's capacity in detecting the individual's intention.
This article is organized in the following way.The next section describes the experimental methodology that includes the protocol, signal processing, and implementation of algorithms.Then, Section 3 presents the results obtained in the validation.And finally, the discussion and conclusions are presented in the last two sections.

Materials and methods
The methodology was segmented into selecting EEG datasets, preprocessing signals, data analysis, P300 identification, performance metrics, and statistical significance analysis.The summary of the methodology is represented in Fig. 1.

EEG dataset
An open-access dataset of EEG recordings was used for the method implementation, which includes three different paradigms.This dataset was created by Lee et al. (2019).EEG signals were recorded using the BrainAmp device, with a sampling frequency of 1000 Hz that recorded 62 electrodes according to the 10-20 EEG international system.A total of 54 healthy subjects between 24 to 35 years participated in this study and performed two sessions for data acquisition.First, a training session was conducted, where offline data were used to build a classifier.Then, a validation session was conducted, where data were acquired in real-time.The experiment was composed of a speller based on the oddball paradigm with six rows and six columns with a stimulus interval of 80 ms and an inter-stimulus time of 135 ms.Thirtythree speller characters were used for the training session, and 36 characters were used for the validation session, each repeated 10 times for a total of 330 target stimuli in training (total of 1980) and 360 target stimuli in the validation (total of 2160) (see Fig. 2).At the beginning of each session, the subjects answered a questionnaire to identify their physical and mental factors, i.e., their psychological state during the experiment.For example, the subjects were asked about comfort, motivation, concentration, eye fatigue, drowsiness, physical and mental conditions, and when coffee was drunk in the last hours (1-24 h) or if not consumed.The questionnaire mentioned above categorizes concentration levels and eye fatigue levels.Values vary from 1 to 5, where 1 represents the highest level (very good), and 5 is the lowest level (very bad).For this study, subjects who manifested high levels (1 and 2) for each situation were grouped and separated from low levels (3, 4, and 5) to form two groups for each factor.Finally, groups were equalized to avoid bias by forming two groups: group 1 for good concentration and no eye fatigue; group 2 for very bad concentration level and eye fatigue, with 25 subjects for level concentration and 14 subjects for eye fatigue in each group.
In contrast, the coffee consumption methodology was different because the subjects answered the questionnaire about the time of the last coffee or no consumption.For this reason, the classification was split into 4 groups: group 1 if the subject did not consume coffee; group 2: if

Table 1
Information about the groups formed.N is the sample size.The questionnaire average score corresponds to the mean score per group for the factor of interest (i.e., concentration, eye fatigue, or coffee consumption).Note that for the concentration and eye fatigue factors only two groups were formed.the subject consumed coffee 1 h before the experiment, group 3: if the subject consumed coffee between 2 h and 4 h before the experiment; and group 4: if the subject consumed coffee between 4 h and 8 h before the experiment.More details on the formed groups is available in Table 1.

Pre-processing
Considering the temporal and spectral behavior of the ERP P300 (Picton, 1992;Lee et al., 2019), the EEG signals were filtered with a fifth-order Butterworth filter between the frequencies range of 0.5 and 40 Hz and segmented between 0 and 800 ms.The following channels:   ,   ,   ,  3 ,  4 ,   ,   3 and   4 (see Fig. 3) were used according to the brain lobes where the visual P300 is recorded commonly.These channels also correspond to the brain's parieto-central and occipital cortex channels (Blanco Díaz and Ruiz Olaya, 2020).Considering that the experimental design consisted of 10 trials for each letter of the speller, for this study 10 trials were averaged per channel for each subject as a noise reduction technique.
The signals were decimated by a factor of 10 to reduce the noise in the signal.As a result, the outputs correspond to the target signals (P300) that were identified as positive outputs and the non-target (no P300) as negative outputs (problem of binary classification).

Mean amplitude with linear discriminant analysis (MA-LDA)
The P300 consists of a positive deviation at approximately 300 ms after presenting the stimuli.For this reason, the mean value of the target EEG signals is greater than the mean value of the non-target EEG signals (Hwang et al., 2017;Lee et al., 2019).This study implemented the standard deviation as a feature to improve the classification criteria.In BCI systems, the most implemented classifiers are discriminant classifiers, especially Linear Discriminant Analysis (LDA) (Hwang et al., 2017;Blanco Díaz and Ruiz Olaya, 2020).LDA is based on using hyperplanes to separate the training feature vectors representing two different classes (i.e., P300 and non-P300).The location and orientation of this hyperplane are determined from training data.In this study, a LDA classifier was trained using the training session's information.Subsequently, the classifier performance was evaluated with the information obtained from the online testing session.

Canonical correlation analysis with regularized logistic regression (CCA-RLR)
Regularized Logistic Regression (CCA-RLR) The Canonical Correlation Analysis (CCA) is a statistical technique that calculates the correlation between two multivariate sets; thus, the canonical correlation coefficient measures the magnitude of association between two canonical variables (Blanco Díaz and Ruiz Olaya, 2020; Lin et al., 2007).The canonical correlation coefficient is defined by: where  and  correspond to two multidimensional variables,  corresponds to the covariance matrices and  corresponds to the weights that maximize the correlation  between  and .For this study,  is the vector corresponding to the EEG signal (averaged after data analysis), and  corresponds to the Grand Averages (GA) of the training signals for target and non-target (16 reference signals in total, 2 per channel).
The CCA was performed over each channel, generating 16  values per trial, which were used as input features to the classifier.Logistic regression is a process of modeling the probability of a discrete outcome given for the input variables, which allows the classification of binary outcomes.The correlation coefficients obtained from CCA were classified by the Regularized Logistic Regression (RLR) (Blanco Díaz and Ruiz Olaya, 2020).

Hybrid method: MA-CCA + RLR
Several methods are reported in the literature regarding the abovementioned classification, which allows the adequate classification of P300 signals (Hwang et al., 2017;Lee et al., 2019;Blanco Díaz and Ruiz Olaya, 2020).In this study, a combination of the feature extraction phases utilizing a hybrid method (MA-CCA + RLR) was proposed to maximize the performance of the classifiers.This method was implemented as follows: The signal means in the time segment between 0 and 800 ms by method 1 were concatenated with the CCA correlation coefficients obtained from Eq. (1) of method 2.Then, the concatenation of these two vectors corresponds to the input features of the RLR classifier.

Performance metrics
According to the confusion matrices, the most commonly used metrics reported in the literature for P300 classification are: Sensitivity (Sen), Specificity (Spe), Accuracy (Acc), and the Area Under the Curve (AUC) of the Received Operation Curve (ROC) (Hwang et al., 2017;Won et al., 2019;Colwell et al., 2014;Dmitriev et al., 2018;Xiao et al., 2019;Blanco Díaz and Ruiz Olaya, 2020;Philip and George, 2020).The following equations define these metrics: where   ,  ,   and   correspond to the true positives, true negatives, false positives and false negatives, respectively.   and    are defined by:

Statistical analysis
An unpaired t-test was performed to compare the means and standard deviations of the BCI performance and to identify significant differences between the conditions of each physical or mental factor according to the four evaluation metrics (Sen, Spe, Acc, and AUC).For this, a Kolmogorov-Smirnov analysis was initially implemented to verify whether the data have a normal distribution.Then, the unpaired t-test was implemented with a -value of 0.05, where the alternative hypotheses were that the best algorithmic performance is obtained with a good state of eye fatigue, high concentration, and coffee consumption.However, the null hypothesis was the opposite.Additionally, Spearman's correlation was obtained between the four evaluation metrics and the scores obtained from the questionnaires for the indices of ocular state, concentration, and coffee consumption (ordinal vector) (Sprague et al., 2016;Hammer et al., 2018).The latter test was also performed with a significance of 0.05.This value allows searching for linear relationships between the psychological factors and the performance of the BCI system (Hammer et al., 2018;Sprague et al., 2016).

Table 2
Spearman correlation coefficients generated between the performance of BCI systems vs. the factors evaluated.

Results
The Grand Average (GA) is the reference EEG signal for the CCA method, obtained from each channel's grand averaging of the target and non-target signals.The reference signals are calculated for a test subject and shown in Fig. 4. The results of metrics of P300 identification, calculated with the Eqs.( 2)-( 5), using the MA-LDA, CCA-RLR, and MA+CCA-RLR methods for all subjects, are represented in Fig. 5, using violin plots.
The results of the Spearman correlation analysis between analyzed factors and the performance metrics are presented in Table 2.In addition, correlations of all methods are presented in Supplementary Material Fig. 1 for the metric results considering the Concentration level factor.Eye state in Supplementary Material Fig. 2, and Effect of Coffee Consumption in Supplementary Material Fig. 3.
According to Fig. 1 and Table 1 the groups were segmented into groups by each factor, considering the concentration level, eye fatigue, and coffee consumption.The results of these metrics for the concentration level factor are shown in Fig. 6.The metrics for the eye fatigue factor are shown in Fig. 7. Finally, the results for the metrics for coffee consumption are shown in Fig. 8.
A high standard distribution can be observed in Figs. 5, 6, 7, and 8.This behavior indicates that in some cases, the last Inter quartile range can be below 0 and above 1.However, this represents that the data have a low probability of having strictly lower or higher performance value for a BCI system.In contrast, the probability density is centered in the Inter quartile range where the average and median are located, which allows interpreting that the data have a high probability of having a normal distribution.These results support the Kolmogorov-Smirnov analysis, where it was obtained that the data have a high probability of having a normal distribution with a -value of 0.05.The unpaired t-test statistical analysis yielded significant results ( < 0.05) or all performance metrics between group 1 and group 2 concerning the concentration factor, using the P300 CCA-RLR decoding method and the hybrid method.Thus, the alternative hypothesis that the low concentration group had a worse performance than the high concentration group scores is accepted.Additionally, this statistical test showed significant results for the CCA method between groups 1, 3, and 4, considering the coffee consumption factor for the Spe, Acc, and AUC metrics.The other results show an average difference in performance between the groups.However, this difference is not statistically significant for a value of  = 0.05.Finally, the analysis based on the Spearman correlation coefficients obtained in Table 2, represents statistical significance for the variables Sen, Spe, Acc, and AUC, in the three factors analyzed using the CCA RLR method and the hybrid method, obtaining a maximum negative correlation of −0.38.Additionally, this correlation is negative for the factors of concentration and visual state, i.e., as soon as the subjects perceived a more significant state of ocular fatigue and low concentration, the performance was moderately lower.On the other hand, in most cases, the obtained correlation was positive for coffee consumption.Although the absolute value of the correlation coefficients  is low, these results support works reported in the literature related to BCI systems and psychological and cognitive factors, which will be compared below (Hammer et al., 2012(Hammer et al., , 2018)).Additionally, when implementing Spearman's correlation to evaluate the existing correlations between the three different factors, it was possible to observe a correlation between concentration levels and eye fatigue of 0.5644.On the other hand, the other two factors obtained correlation values close to zero, which leads to the conclusion that there is no correlation between coffee consumption and eye fatigue or concentration levels.

General discussion
Regarding the neurophysiological behavior of the P300 signal and its latency and amplitude alterations, this is probably a consequence of differences in the physiological and cognitive factors of the test subject during the execution of the experimental design sessions with BCI.The literature has reported that training the extraction and classification algorithms in subjects under the factors mentioned above affects the decoding of the patient's intention.Thus, a variation in the system's performance is produced (Hammer et al., 2012;Pitt and Brumberg, 2021).Therefore, this study aimed to analyze these differences through different metrics that quantify the ability of the classifiers to identify the ERP for three main factors: level of attention during the experiment, eye fatigue during the experimental design, and coffee consumption in the hours before the experiment.In addition, this study used recognition methods based on the signal's shape.
Before making comparisons between factors, it is essential to validate the results of the implemented methods.Consequently, from the results, it is possible to observe that the method that implements hybrid characteristics of the signal mean amplitude (Hwang et al., 2017;Lee et al., 2019) combined with the CCA (Blanco Díaz and Ruiz Olaya, 2020) is the one that obtains the best average performance for all subjects.Additionally, that method exhibits an average maximum performance of 84.17%, Spe of 85.99%, Acc of 85.68%, and AUC of 85.08%.
Concerning the concentration level factor, it is possible to observe in Fig. 6 that the BCI system performance metrics for group 1 (high concentration) show an improvement regarding group 2 (low concentration).According to Sen, group 1 reflects an average percentage improvement of 6.11%, Spe of 5.49%, Acc of 5.59%, and AUC of 5.8%, with statistically significant differences for the unpaired t-test ( < 0.05) by using the methods CCA-RLR and MA+CCA-RLR.These results support that concentration tasks directly influence the P300 signal evoked through the oddball paradigm.For that reason, it is affected by the subject's level of attention.In other words, the user's concentration level factor can improve the performance of a real-time BCI system based on event-related potentials (Carlson, 2021;Sprague et al., 2016).
Regarding the eye fatigue factor, through Fig. 7 it is possible to observe a positive difference between group 1 (low eye fatigue) and group 2 (high eye fatigue) metrics.An average Sen was obtained, increases by an amount of 6.35%, a Spe increases by 3.81%, Acc increases by 4.23%, and AUC increases by 5.08%, although it is not significant for the unpaired t-test.Different types of visual stimulation have been shown to affect the P300 signal (Guo et al., 2019).This response implies a similar behavior to other visual systems.Studies with Steady-State Evoked Potentials (SSVEP) indicate that ocular fatigue generates a percentage decrease in variables such as Acc in BCI systems (Bieger et al., 2010;Guerrero-Mendez et al., 2021).The stimulus method based on the oddball paradigm differs from the one used for SSVEP.Despite that fact, the results of this study are related to those reported in the literature.Hence, it is possible to observe that the group that did not perceive visual fatigue during the experimental development obtained better Sen, Spe, Acc, and AUC percentages than the group that perceived visual fatigue (Collura, 2002;Guerrero-Mendez et al., 2021).
With coffee consumption, it is possible to observe in Fig. 8 that the best performance for all metrics was obtained by group 4 (the group that consumed coffee in a lapse of more than 4 h), with an average Sen of 88.10%, Spe of 88.41%, Acc of 88.36% and AUC of 88.25% using the MA+CCARLR method.Furthermore, this outstanding performance was statistically significant versus groups 1 (did not consume coffee) and 3 (consumed coffee between 2 and 4 h) using the CCA-RLR method with the Spe, Acc, and AUC evaluation metrics ( < 0.05) according to the unpaired t-test.

Related works
Violin plots are frequently used to visualize numerical data's full distribution and compare distributions between multiple groups (Hintze and Nelson, 1998).In this study, Fig. 5 shows that the P300 extraction methods for all subjects have average Sen values of 73.67%, 79.56%, and 84%, average Spe values of 73.54%, 84.04%, and 85.99%, and average Acc values of 73.56%, 83.30% and 85.69%, and average AUC of 73.61%, 81.80%, and 85.08%, respectively.These preliminary results are in good agreement with those reported in the literature.Firstly, Hwang et al. reported Acc values close to 75% with four subjects using multiple trials (Hwang et al., 2017).Then, Won et al. reported AUC values of approximately 84% using multiple trials and preprocessing techniques such as Independent Component Analysis (ICA) (Won et al., 2019).Finally, Collwell reported AUC values of 75% and 86% using a derivation of LDA and multiple trials with 18 subjects (Colwell et al., 2014).
It is worth mentioning that studying the influence of psychological and cognitive factors that affect the performance of BCI systems is of great interest to the scientific community.This interest is because it allows the recognition of factors that can reduce performance in experimental sessions and is helpful in neuroscience for exploring brain behavior.Hammer et al. have been part of this challenge since they performed correlation studies between psychological factors and motivation in the performance of a BCI system based on motor imagery (Hammer et al., 2012).However, this study reported no significant correlations around 0.5 or significant correlations for specific tasks involving concentrating on neuromotor movements.These results demonstrate that the psychological predictors studied had a non-direct influence on the performance of BCI systems.Subsequently, Hammer et al. attempted in Hammer et al. (2018) to replicate a similar study with a BCI P300 system.That study reported negative Spearman correlations of approximately −0.41 between the performance of BCI systems with the psychological factor of emotional stability.That study concluded that people with high emotional stability scores had worse performance than those with low emotional stability.Furthermore, Sprague et al., in a study conducted in Sprague et al. (2016) demonstrated that executive function, general intelligence, and working memory might cause individual differences in P300-based BCI performance.Finally, it should be highlighted that a correlation of near 0.56 was found between the physiological factors of concentration levels and eye fatigue; however, the correlation value between these two factors and coffee consumption are close to zero.Therefore, this behavior is possibly linked to coffee consumption being considered an external stimulant (Chen et al., 2020).

Final discussion
The results obtained in this study support the studies reported in the literature where neurophysiological factors affect the user's intention decoding algorithms, where a better performance for all metrics with statistically significant differences between the group that reported high concentration versus low concentration is noteworthy.Additionally, significant Spearman correlations were obtained for these metrics, which despite not being high, demonstrate a negative behavior that may correlate with an indirect influence between the concentration factor and Speller BCI performance (Sprague et al., 2016;Hammer et al., 2018).Similar occurred with the visual fatigue factor, where the unpaired t-test showed no significant differences between the two groups; however, a worse percentage performance can be observed among the group that showed greater visual fatigue.These metrics obtained significant Spearman correlations for the Spe and AUC metrics using the decoding methods influenced by the CCA.In light of the results presented in Figs. 6 and 8, it can be stated that the CCA classifier may be more sensitive to changes in the responses recorded in the evoked potentials concerning variables such as amplitude and latency.This behavior is possibly induced by physiological and cognitive differences derived from the stimuli presented to the subjects, thus altering the shape of the P300 signal and leading to a decrease in the performance of this classifier.These metrics also obtained negative significant correlation coefficients for the two metrics mentioned above.These results suggest that visual fatigue is indirectly related to a decrease in BCI system performance, especially in the differentiation between the negative variable (non-P300) and the positive variable (P300).On the other hand, for the coffee consumption factor, the best performance in the Spe, Acc, and AUC metrics was obtained by the subjects who consumed coffee for a period of approximately 4 h compared to those who did not consume coffee or consumed it in a period between 2 to 4 h.Additionally, these metrics also obtained significant positive correlations.These times of 4 and 8 h align with the research conducted by Chen et al. (2020).The caffeine/placebo administration times were vital in demonstrating variations in the latencies and amplitudes of the ERPs generated.This fact allows concluding that coffee consumption could benefit cognitive brain functions.
The values of the correlations obtained in this study are close to those reported in the literature.This fact may be due to, as shown in Table 1, the population used in the study being more homogeneous than the general population, which is related to a reduction in the variance of the sample.The results of the statistical tests allow observing a direct influence on the concentration factor and coffee consumption in specific cases.The results of this study leave an open door for further study of factors such as concentration, visual fatigue, and the consumption of substances such as coffee in more controlled environments since, as observed, they can quantitatively affect the performance of BCI speller systems.

Conclusion
Physical and cognitive parameters such as concentration, visual fatigue, and coffee consumption play an important role in P300 spellerbased BCI performance.Identifying these factors would allow for an improved capability of BCI systems in detecting P300 signals, leading to better performance and, therefore, may aid in decoding the individual's intent.Additionally, this study had some limitations, especially related to the experimental conditions used in the public dataset and the limited number of subjects involved in the experiment.
Future studies will focus on studying more physical and mental factors that may affect the neurophysiological behavior of the P300 signal to maximize the performance of a BCI system based on sensing processes, such as those related to anxiety, stress, or other substance consumption.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Fig. 1 .
Fig. 1.Block diagram of the methodology followed for the identification of the P300 signal between the groups segmented by the factors.

Fig. 2 .
Fig. 2. Experimental design for the ERP-BCI paradigm based on the 6 × 6 speller implemented in Lee et al. (2019).The individual was notified for 4.5 s about the target letter, after the trigger the speller starts to run for approximately 13 s and finally the individual has a 2 s rest.

Fig. 3 .
Fig. 3. Topographic position of the 8 EEG channels used in the study, according to the international system 10-20.

Fig. 4 .
Fig. 4. Reference EEG signals (grand averages) obtained from training data corresponding to targets and non-targets for one subject.

Fig. 5 .
Fig. 5. Performance metrics for all subjects using the P300 identification techniques.Purple represents the distributions of the MA-LDA method; Lila represents the distributions of the CCA-RLR method; Pink represents the distributions of the MA+CCA-RLR method.The black line represents the mean.The red line represents the median.

Fig. 6 .
Fig. 6.Comparison of metrics for group 1 and group 2 of concentration level factor with the three P300 identification methods: (A) Sen (B), Spe(C), Acc, (D) AUC.Purple represents the distributions of group 1; Pink represents the distributions of group 2. The black line represents the mean.The red line represents the median.* represents a statistically significant difference according to the unpaired t-test ( < 0.05).** represents significant Spearman's correlation coefficient ( < 0.05).

Fig. 7 .
Fig. 7. Comparison of metrics for group 1 and group 2 of eye fatigue factor with the three P300 identification methods: (A) Sen (B), Spe (C), Acc, (D) AUC.Purple represents the distributions of group 1; Pink represents the distributions of group 2. The black line represents the mean.The red line represents the median.* represents a statistically significant difference according to the unpaired t-test ( < 0.05).** represents significant Spearman's correlation coefficient ( < 0.05).

Fig. 8 .
Fig. 8.Comparison of metrics for group 1, group 2, group 3, and group 4 of coffee consumption factor with the three P300 identification methods: (A) Sen (B), Spe (C), Acc, (D) AUC.Purple represents the distributions of group 1; Lila represents the distributions of group 2; Pink represents the distributions of group 3; Blue represents the distribution of group 4. The black line represents the mean, and the red line represents the median.* represents a statistically significant difference according to the unpaired t-test ( < 0.05).** represents significant Spearman's correlation coefficient ( < 0.05).