1 Introduction

A visual evoked potential (VEP) is an electrical potential that can be derived from the scalp after a visual stimulus such as a flashing light. If the stimulation frequency is high enough (higher than 3.5 Hz), VEPs are called “steady-state” VEPs (SSVEPs) because the individual responses overlap, resulting in quasi-sinusoidal oscillations of the same frequency as the stimulus [1]. The borderline between the transient and steady-state VEPs is not strictly defined. Some authors report that the periodicity is observable when the stimulus frequency exceeds 3.5 Hz [1, 2] or 4 Hz [3, 4], while others state that SSVEP is a type of event-related potential modulated by a frequency of periodic stimuli higher than 5 Hz [5,6,7,8].

SSVEP is believed to have a stable amplitude (size) and phase (temporal shift) over time [9]. It is most prominent over occipital cortical areas [10] and presents strong immunity to physiological artifacts, such as eye and body movements [11,12,13,14,15]. Since SSVEP fundamental frequency is mainly the same as the frequency of the stimulus [4, 16], by providing stimuli of different frequencies, different SSVEPs can be evoked.

This idea has been widely adopted in brain–computer interfaces (BCIs)—technical systems that acquire and analyze brain activity patterns in real time to translate them into control commands for computers or external devices [17, 18]. An SSVEP-based BCI is composed of two separate modules (Fig. 1). The task of the first module is to deliver light stimuli produced by light sources flashing at different frequencies (f1, f2 … fn) to the user. The task of the second module is to record the EEG signal and then process it to detect the frequency of the light source currently observed by the user. Since each light source is bound to a specific control command (e.g., L1: move left; L2: stop; L3: move right; and L4: go forward [19]), the source detection results in the execution of the corresponding command. For example, if a user observes light source L3 and the system recognizes the frequency f3, the command “move right” will be executed. This loop, composed of EEG recording, EEG processing, and executing a command, is performed continuously in real time.

Fig. 1
figure 1

SSVEP-BCI scheme

SSVEP-based BCIs are popular among other BCI types due to their high signal-to-noise ratio (SNR) [20], reasonably low subject-to-subject differences [21], minimal user training [7, 22], and very high accuracy and communication rates [17, 23,24,25]. For example, Bin et al. [22] reported that 83–100% accuracy (mean 95.3%) was obtained in a survey with 12 subjects, where each subject was provided with six objects that flickered with different frequencies (13, 14, 15, 16, 17, and 18 Hz) on a computer screen. The EEG signal was recorded from nine parietal and occipital channels and was processed in a 2-s time window with canonical correlation analysis (CCA) using fundamental stimulus frequency and the first harmonic. The accuracy was calculated over 30 trials per each subject. Similar accuracy (81–100%, mean 94.7%) was reported by Volosyak et al. in a survey with five choices provided by LED fields (stimulation frequencies: 13, 14, 15, 16, and 17 Hz), 10 subjects, eight parietal and occipital electrodes, and a 2-s time window [26].

The accuracy obtained with SSVEP-BCI in laboratory conditions nowadays is more than satisfactory. In fact, if we ensure that conditions are appropriate and if the user is sufficiently focused, the accuracy of 80–100% for SSVEP-BCI with 2-s time window is a quite standard result. The problem is, however, that conditions that are “appropriate” for a BCI are not at all “appropriate” for a user. While the highest SSVEPs are obtained when the EEG signal is recorded in controlled laboratory conditions from about 8–10 electrodes and the EEG response is induced by low-frequency stimuli of high power and contrast, users prefer few electrodes, outside-laboratory conditions, and stimuli of high frequency, low power, and low contrast.

Unfortunately, increasing user comfort usually leads to a decrease in the interface accuracy. For example, Wei et al., in an experiment with 12 subjects where EEG data were recorded from only four channels, obtained an accuracy of 75–83% [27], much smaller than those reported in wider channel settings, although they used a fairly similar set of frequencies (9, 10, 11, 12, and 13 Hz). Slightly better results were reported by Chen et al. who obtained an accuracy of about 85% (averaged over 20 subjects) in an experiment with only one channel (Oz) [12]. The more direct comparison of the SSVEP detection accuracy across different number of EEG sensors is provided in [28], where the accuracy averaged over 10 subjects was 64%, 69%, 80%, 82%, and 84% for 1, 2, 3, 4, and 5 channels, respectively. (EEG sensors were located over parieto-occipital cortex.)

Hence, the question arises of how to sustain high accuracy of an SSVEP-based BCI while increasing its usability at the same time. The answer to this question is quite straightforward. We need efficient and effective algorithms for processing, analysis, and classification of the EEG signal [29, 30]. These algorithms must be able to extract SSVEP from the signal recorded in outside-laboratory conditions, from the smallest number of channels, and with stimuli that do not induce so much fatigue in the user. We believe that we are able to achieve at least some of these goals with a technique that at first glance is not at all suitable for low-channel processing, namely independent component analysis (ICA).

ICA is a method that is often used for artifacts reduction in EEG signal analysis [31,32,33,34,35]. A lot of research has been done so far to prove that ICA improves the quality of the raw EEG signal. Most of that research, however, was focused on multidimensional EEG, from 16 channels [36] through 19–20 [22, 37] up to 71 [38] and even many more.

In the case of multidimensional EEG, the sources that are strong enough (usually artifacts) are returned by ICA algorithms as individual components. Therefore, on the basis of the spatial, temporal, and spectral features of each component, it is possible to decide which are artifacts that should be discarded from further analysis. Then, the input EEG channels can be reconstructed with only non-artifact components to enhance the signal quality. In the case of low-dimensional EEG, there is usually no justification for removing any components (all of them are just new mixtures of sources). However, instead of discarding the possible artifact components, we can try to pick out the components that enhance the brain activity correlated with the task and use only those components in further processing. Of course, the question of how to choose the right components arises. The most obvious answer is by finding the components that are the best at solving the task at hand [39].

In this paper, we would like to show that ICA can bring significant improvements in SSVEP-BCI accuracy, even if only a few channels are used for EEG data recording. Two specific hypotheses verified in the paper are as follows:

  1. 1.

    The approach to control the SSVEP-BCI with ICA components instead of raw EEG signals provides both: (a) a higher number of individual frequencies detected in a frequency scanning phase and (b) a higher accuracy in an online BCI session.

  2. 2.

    Preprocessing with ICA increases the online SSVEP-BCI accuracy for low-luminance stimuli to a level that allows them to be used instead of the more tiring high-luminance stimuli.

In order to verify the stated hypotheses, we performed two experiments. In both experiments, we used an Arduino-based stimulator connected to a frame with four flickering LEDs (5 mm). In the first experiment, we focused only on a frequency scanning phase. We looked for frequencies providing prominent SSVEPs for individual subjects. Since we wanted to show that ICA components are better than raw EEG signals regardless of luminance level, we performed the experiment with two different luminance levels: 350 and 2000 lx. In the first experiment, we collected data from 24 subjects, who were exposed to a white LED flickering with several dozen different frequencies from a 5–35 Hz band. In the second experiment, performed with eight new subjects, we verified our approach for an online BCI session (also for two luminance levels). The experiment started with a frequency scanning phase, followed by the choice of the four frequencies providing the prominent SSVEPs. The chosen frequencies were passed to the online phase, where the user task was to control a Lego robot moving in four directions (left, right, forward, and stop). All the signal processing was carried out with Matlab 2015b.

The rest of the paper is structured as follows. Section 2 describes the setup of the experiments and the method used for SSVEP detection in off-line and online sessions. Sections 3 and 4 present the results of the experiments and a discussion of these results. Section 5 concludes the paper.

2 Methods

Twenty-four subjects (22 men, 2 women; mean age: 28.8 years; range 18–38 years) participated in the first experiment, and eight new subjects (6 men, 2 women; mean age: 25.7 years; range 22–31 years) participated in the second. All subjects had normal or corrected-to-normal vision and were right handed. None of the subjects had previous experiences with SSVEP-BCI, and none reported any mental disorders. The experiments were conducted according to the Helsinki Declaration on proper treatment of human subjects. Written consent was obtained from all subjects.

2.1 Off-line session setup

During the off-line session, 61 flickering stimuli of different frequencies were delivered in a random order to the subject by a single white LED (5 mm DIP 20 mA, 6500 K, 18,000 mcd). The set of stimulation frequencies covered the 5–35 Hz band with a resolution of 0.5 Hz (5, 5.5, 6,…, 35 Hz). The LED was attached to the computer screen, which was located approximately 100 cm from the subject’s eyes. The succeeding stimulation frequencies were delivered through an Arduino board. The subjects were divided into two groups. The first was exposed to stimuli of low luminance (350 lx) and the second to stimuli of high luminance (2000 lx). Each group was composed of 12 subjects.

The detailed scheme of the experiment with one subject was as follows (Fig. 2). The subject was placed in a comfortable chair, and EEG electrodes were applied on his or her head. In order to limit the number of artifacts, the participant was instructed to remain relaxed and not move. The start of the experiment was announced by a short sound signal, and 5 s later, EEG recording was started. The stimuli were presented one by one with 2-s breaks between them. The length of the stimulus was fixed and was equal to 10 s. The timing of the experiment was controlled by the Arduino board. The whole experiment was performed in one 12-min session.

Fig. 2
figure 2

Detailed scheme of the off-line session

During the experiment, EEG data were recorded from four monopolar channels at a sampling frequency of 256 Hz. Six passive gold electrodes were used in the experiments. Four of them were attached to the subject’s scalp at the O1, O2, Oz, and POz positions according to the extended International 10–20 system [40]. The reference and ground electrodes were located at Pz and the right mastoid, respectively. The impedance of the electrodes was kept below 5 kΩ. The EEG signal was acquired with a Discovery 20 amplifier (BrainMaster) and recorded with OpenViBE Software [41]. EEG data were filtered with a Butterworth band-pass filter of the fourth order in the 3–37 Hz band. Next, 61 10-s epochs, corresponding to the stimulus periods, were extracted from the continuous recording.

2.2 Off-line SSVEP detection method

Each of the epochs extracted from the EEG signal was processed separately in order to determine whether SSVEP could be found at the stimulus frequency. The processing algorithm was composed of the following four steps.

  1. 1.

    At the beginning, the FastICA algorithm [42, 43] was executed over the chosen time window of the signal recorded from the chosen channels. The number of components returned by the FastICA algorithm was equal to the number of channels used in the analysis.

  2. 2.

    At the next step, the power spectral density (PSD) was calculated separately for each ICA component with fast Fourier transform (FFT).

    $${\text{PSD}}(k) = \left| {\mathop \sum \limits_{n = 0}^{N - 1} x(n) \cdot e^{{ - \frac{i2\pi kn}{N}}} } \right|^{2} ,$$
    (1)

    where \(x(n)\) is the signal, N the signal length, and k the frequency bin (k = 0, 1, …, N).

    In order to take into account not only the fundamental frequencies (F) but also their first harmonics (h1), the amplitude of the first harmonic was added to the PSD at each fundamental frequency.

    $${\text{PSD}}_{Fh1} = {\text{PSD}}(F) + {\text{PSD}}(h1),$$
    (2)

    where \({\text{PSD}}_{Fh1}\) is the PSD modified by the first harmonic, \({\text{PSD}}(F)\) is the PSD calculated for the fundamental frequency, and \({\text{PSD}}(h1)\) is the PSD calculated for the first harmonic.

  3. 3.

    Since the spectral power of the EEG signal decreases as the frequency increases, the whole spectrum should be normalized or divided into parts, where each part is analyzed separately. The normalization process of the frequency spectrum calculated for the components returned by FastICA would be difficult to perform (due to the lack of a clear transition between the independent components (ICs) and raw signals), and therefore, we took the second approach and analyzed the 10-Hz sub-bands surrounding the stimulation frequency in the modified \({\text{PSD}}_{Fh1}\). Hence, the final step of our procedure was to detect the frequency of the maximum amplitude in the 10-Hz sub-band surrounding the stimulation frequency.

    $${\text{F}}_{ \hbox{max} } = { \hbox{max} }\left( {{\text{PSD}}_{Fh1} \left( { - \;5\;{\text{Hz}} + F_{\text{stim}} :F_{\text{stim}} + 5\;{\text{Hz}}} \right)} \right),$$
    (3)

    where \(F_{ \hbox{max} }\) is the frequency of maximum \({\text{PSD}}_{Fh1}\) from the 10-Hz buffer surrounding the stimulation frequency, and \(F_{\text{stim}}\) is the stimulation frequency.

    \(F_{ \hbox{max} }\) was detected individually for each IC. The decision that SSVEP had been found was made if \(F_{ \hbox{max} }\) was equal to the stimulation frequency (\(F_{\text{stim}}\)) for any of the components.

The FastICA algorithm that was applied for data transformation in the online and off-line session is an iterative method to find local maxima of a defined cost function [42,43,44]. The purpose of this algorithm is to find the matrix of weights w such that the projection \((w^{T} x)\) maximizes non-Gaussianity [43, 44]. As a measure for non-Gaussianity, simple estimation of negentropy based on the maximum entropy principle is used [43, 45]:

$$J(v) \propto \left[ {E\left\{ {G(y)} \right\} - E\left\{ {G(y)} \right\}} \right]^{2} ,$$
(4)

where \(y\)—standardized non-Gaussian random variable, v—standardized random variable with Gaussian distribution, and G(.)—any non-quadratic function. There are two classes of FastICA algorithms, the deflation algorithms (called also one-unit algorithms) and the symmetric algorithms [42]. While in deflation approach the vectors of weights are calculated one by one, in symmetric approach the estimation of all components (all weights vectors) proceeds in parallel. In the research presented in this paper, the symmetric FastICA approach was used.

2.3 Off-line data analysis

At the end of the off-line session, we obtained 24 EEG datasets, one per subject. Each dataset was composed of 61 epochs (61 stimulation frequencies), each of which contained 2560 samples (10 s) recorded from four channels. The final task of the signal-processing algorithm described in the previous subsection was to decide whether the EEG data recorded when the stimulation LED was flickering at a given frequency reflected that frequency. In other words, we looked for those epochs where synchronization of the brain waves with the stimulation frequency occurred. Hence, the output of the whole procedure was the number of epochs where SSVEP was detected.

In order to find out whether ICA preprocessing would provide any practical benefits, we compared the number of SSVEPs detected after applying FastICA with the number of SSVEPs detected without FastICA application. In both cases, we used exactly the same approach for SSVEP detection: the approach described in the previous subsection. The only difference was the input to Formula (1). When the EEG signals were preprocessed with the FastICA algorithm, the frequency spectrum was calculated over the individual components; in the other case, the frequency spectrum was calculated over raw EEG signals from individual channels.

We carried out the analysis across four combinations of channels. The first combination (S1) contained channels O1 and O2, and each of the following combinations was created by adding one or two of the remaining channels to the previous set of channels (S2: O1, O2, POz; S3: O1, O2, Oz; S4: O1, O2, Oz, POz). A full description of all combinations used in the analysis is provided in Table 1.

Table 1 Combinations of channels used in the analysis

Since we wanted to compare not only the number of frequencies found for different channel combinations (unprocessed and processed with FastICA algorithm) but also the number of frequencies found with different signal lengths, each of the four-channel combinations was analyzed in two time settings. In the first setting, the 10-s signal was divided into 2-s time windows without overlapping, and SSVEPs were sought in each 2-s window. In the second setting, the analysis was performed over the first 2, 4, 6, 8, or 10 s of the signal. The statistical significance of each pair of results (ICA on/off) was tested with paired sample t test (p value = 0.05).

2.4 Online session setup

The BCI system used in the online session was composed of four modules: control module, EEG recording module, signal processing module, and executive module (Fig. 3). The main part of the control module was a square frame (18 × 18 cm) with eight LEDs attached to four sites of the frame. There were two LED types: stimulation LEDs (5 mm DIP 20 mA, cold white (6500 K), 18,000 mcd), and control LEDs (5 mm DIP 20 mA, red (630 nm), 6000 mcd). The four stimulation LEDs were flickering all the time with the frequencies chosen at the end of the off-line session; each LED was flickering with another frequency. The four control LEDs were used to guide the user regarding which of the stimulation LEDs he or she should attend to at that moment. The control LEDs were used only in the testing mode. When the interface was used in the free user mode, the control LEDs were simply switched off. Since we had to know the correct directions to calculate the classification accuracy, only the testing mode was used in the experiments reported in the paper.

Fig. 3
figure 3

Online BCI system

The frame was controlled by the Arduino/Uno board. The main task of the board was to ensure that LEDs were flickering with constant frequencies during the whole experiment. The board’s second task was to send to the frame the sequence of signals that switched the control LEDs on and off.

While the stimulation LEDs were flickering, the EEG signal was recorded from a user scalp. The EEG recording module had the same configuration as in the off-line session (Discovery 20 amplifier; OpenVIBE Software; four channels: O1, O2, Oz, and POz, referenced to Pz; sampling frequency = 256 Hz). The recorded EEG signal was submitted to the signal-processing module, where it was processed with the algorithm described in the following subsection. The output of the signal-processing module was one of the four stimulation frequencies, namely the one recognized in the EEG signal. The four stimulation frequencies defined four classes of movement (left, right, forward, and stop). The classes were used in the executive module to control the Lego Mindstorms EV3 robot moving in the four directions. The connection with the robot was established via Bluetooth.

During the online session, the subject was sitting on a chair and was holding the frame with LEDs. The EEG electrodes were attached to the subject’s head and connected to the EEG recording device. The robot stood on the floor in front of the subject’s face. The subject’s task was to focus his or her attention on the stimulation LED indicated by a control LED and simultaneously observe the robot’s movements. The sequence of movements was the same for each subject and was composed of 60 movements, 15 per class. The classes in the sequence were set in a random order. The direction of movement changed every 2 s.

The choice of a 2-s time window was motivated by previous works in the field where different lengths of time window were analyzed. For example, Manyakov et al., who analyzed the classification accuracy for different numbers of targets, reported that the classification accuracy did not rise significantly after the first 2 s [46]. Similar results were obtained by Chen et al. [47], who reported that in the 3- and 4-s time windows, the classification accuracy was slightly higher than that in a 2-s time window but that increase was not significant.

The online BCI mode was used in the second experiment, performed with eight subjects. The experiment was composed of two stages, with white LEDs being used in both. At the first stage, an off-line session was performed (12 min) to detect the user-specific stimulation frequencies providing the prominent SSVEPs. Using the results from the off-line session, a set of four frequencies specific for the subject was established. In order to limit the subject’s fatigue, the highest frequencies from the set returned by the detection algorithm were passed to the online session. In the second stage, two online sessions were performed, one with the LEDs’ luminance set to 350 lx and the other with luminance set to 2000 lx. In order to reduce the influence of the order of sessions on the final results, four (randomly chosen) subjects started from the session with high LED luminance, and the other four started from the session with low LED luminance. Each session lasted 2 min. There were 5-min breaks between both stages and both sessions of the online stage.

2.5 Online SSVEP detection method

The online signal-processing module was run for every 512 EEG samples collected by OpenVIBE. Next, these 2-s signals were filtered with a Butterworth band-pass filter of the fourth order in the 3–37 Hz band. Finally, the FastICA algorithm was applied.

The online SSVEP detection algorithm was much quicker than its off-line version, since this time only the power for the four given frequencies had to be calculated. To deal with this task, we used Eq. (1) to calculate PSD(F) and PSD(h1) for each stimulation frequency. Next, we combined the signal power at the fundamental frequency and first harmonic (2).

We used Formula (2) four times for each stimulation frequency (once for each of the four channels), obtaining 16 power values. The final classification rule used for choosing the frequency that induced SSVEP was

$${\text{PSD}}_{ \hbox{max} } = \mathop {\hbox{max} }\limits_{1 \le i \le 16} ({\text{PSD}}_{i} ),$$
(5)

where \({\text{PSD}}_{ \hbox{max} }\) is the maximum PSD value, and \({\text{PSD}}_{i}\) is the value of the ith element of the 16-element vector containing the signal power calculated for each frequency and ICA components (four frequencies × four ICA components).

2.6 Online data analysis

While, in the case of off-line data analysis, the performance indicator was the number of stimulation frequencies correctly detected in the EEG signal, data from the online session were compared with the classification accuracy ratio (Acc). The classification accuracy was measured as

$${\text{Acc}} = \frac{\text{TP}}{60} *100{\text{\% ,}}$$
(6)

where TP is the number of true positives (the trials when the correct stimulation frequency was recognized).

To facilitate the future comparison, we also calculated the information transfer rate (ITR) [48, 49]:

$${\text{ITR}} = \frac{60}{T} \cdot B,$$
(7)

where ITR is the information transfer rate in bits per minute, T is the command-processing time (2 s), and B is the ITR in bits per symbol, calculated as:

$$B = { \log }_{2} N + {\text{Acclog}}_{2} {\text{Acc}} + (1 - {\text{Acc}}){ \log }_{2} \frac{{1 - {\text{Acc}}}}{N - 1},$$
(8)

where N is the number of classes (four classes).

The data gathered in the online session were recorded for further analysis. We were particularly interested in whether the expected improvement after ICA application would be possible to observe not only when data from all four channels were processed but also when three or even two channels were submitted to the FastICA algorithm. Hence, in the online data analysis, we used the same four-channel combinations as for the off-line data. As in the off-line session, also here the statistical significance of the results was tested with paired sample t test (p value = 0.05).

3 Results

3.1 Off-line

Our first goal was to compare the number of stimulation frequencies correctly detected with and without ICA application. We carried out the whole analysis in regard to 2-s time windows. Because we planned to use only the first 2 s of the recording in the online BCI session, we were particularly interested in the first time window. However, in order to find out whether the effect of ICA application would be stable over time and over the length of time window, we carried out the comparison for the whole 10-s period.

First, we analyzed the efficiency of stimulation frequency detection (ESFD) before and after ICA application for each 2 s of the recording (Fig. 4, Table 2). The comparison was done separately for each channel combination (four succeeding rows of plots) and for both luminance levels: 350 lx (left column) and 2000 lx (right column). The detection efficiency for one subject was calculated as the ratio between the number of detected stimulation frequencies and the total number of frequencies provided for the subject:

$${\text{ESFD}} = \frac{{FN_{\text{SSVEP}} }}{FN} *100,$$
(9)

where ESFD is the efficiency of stimulation frequency detection, FN is the number of stimulation frequencies, and \(FN_{\text{SSVEP}}\) is the number of stimulation frequencies providing detectable SSVEP.

Fig. 4
figure 4

Efficiency of the stimulation frequency detection (averaged over subjects) before and after FastICA application for each 2 s of the recording, each channel combination (four rows of plots), and both luminance levels: min. = 350 lx (left column); max. = 2000 lx (right column); stars denotes statistically significant results

Table 2 Increase in ESFD (averaged over subjects and time windows) after applying FastICA in the preprocessing stage for both luminance levels (min. = 350 lx; max. = 2000 lx)

To make the comparison more compact, the efficiency was averaged over subjects. Hence, Fig. 4 presents the average ESFD (together with the standard deviation) in succeeding 2-s time windows.

The same results are presented in tabular form in Table 2. The table is divided into two groups corresponding to the two luminance levels. The most important part of the table is the last column from each group, which demonstrates the efficiency gain (EG) obtained when FastICA algorithm was applied in the preprocessing stage, calculated as:

$${\text{EG}} = \frac{{\left( {\overline{{{\text{ESFD}}_{{{\text{ICA}}\_{\text{on}}}} }} - \overline{{{\text{ESFD}}_{{{\text{ICA}}\_{\text{off}}}} }} } \right)}}{{\overline{{{\text{ESFD}}_{{{\text{ICA}}\_{\text{off}}}} }} }},$$
(10)

where \(\overline{{{\text{ESFD}}_{{{\text{ICA}}\_{\text{on}}}} }}\) is the ESFD averaged over subjects obtained for signals preprocessed with FastICA, and \(\overline{{{\text{ESFD}}_{{{\text{ICA}}\_{\text{off}}}} }}\) is the ESFD averaged over subjects obtained for raw signals.

In order to find out whether the predominance of the independent components returned by ICA over the raw signals holds regardless of the length of the time window, we analyzed the ESFD in time windows of increasing length. We analyzed five time windows, containing data from the first 2, 4, 6, 8, and 10 s of the recording. The results are presented in Fig. 5 in a similar fashion to those in Fig. 4: Rows correspond to channel combinations; the columns correspond to luminance levels, with 350 lx on the left and 2000 lx on the right; and a single plot contains ESFD data averaged over subjects for raw EEG signals and signals preprocessed with the FastICA algorithm.

Fig. 5
figure 5

Efficiency of stimulation frequency detection (averaged over subjects) before and after FastICA application for the extended time window; each channel combination (four rows of plots); and both luminance levels: min. = 350 lx (left column); max. = 2000 lx (right column); stars denotes statistically significant results

As can be noticed in the figure, in each single case the higher number of stimulation frequencies was detected after FastICA application in the preprocessing stage. The exact gain in ESFD for each channel combination, LED luminance, and time window length is presented in Table 3. The last row contains the grand mean over channel combinations.

Table 3 Average increase in ESFD after applying FastICA in the preprocessing stage obtained for time windows of different lengths and both luminance levels (min. = 350 lx; max. = 2000 lx)

The results presented so far clearly demonstrate that the average number of detected stimulation frequencies was higher across the whole recorded signals after applying the FastICA algorithm for signal preprocessing. This proves the usability of ICA for the low EEG channel setting. However, to design a successful BCI system, we do not need the information about the ESDF of the whole 10-s signal but only the information about the ESDF of its first part, which will be used in the online mode. From Fig. 5, we can see that for both luminance levels and each combination of channels, the average efficiency calculated over the first 2 s was higher in the case of signals that had undergone ICA preprocessing. Figure 6 presents the same information but with respect to individual subjects.

Fig. 6
figure 6

Efficiency of the stimulation frequency detection before and after FastICA application for each subject, each channel combination, the first 2 s of the recording, and both luminance levels: min. = 350 lx (left column); max. = 2000 lx (right column)

Continuing the analysis of the first 2 s of the signal, we decided to examine the average efficiency of stimulation frequency detection in the individual frequency ranges. In other words, we wanted to find out whether the use of ICA in the signal preprocessing stage increased the number of stimulation frequencies detected in different frequency ranges. Obviously, we were particularly interested in the frequencies that are most comfortable for the user, that is, the frequencies from the highest frequency band. The analysis was performed for the full four-channel setup (combination S4, composed of channels O1, O2, Oz, and POz).

To perform the task at hand, the frequency band was divided into five sub-bands of 5 Hz each: 5–10 Hz, 10–15 Hz, 15–20 Hz, 20–25 Hz, and 25–30 Hz. For each subject and frequency sub-band, the ratio of the number of correctly detected stimulation frequencies from the given sub-band to the number of all stimulation frequencies contained in that interval was calculated. The individual ratios were then averaged over the subjects, and the average ESFD for each frequency sub-band was obtained. Figure 7 presents the average ESFD in the analyzed frequency sub-bands for low (upper graph) and high (lower graph) LED luminance. The exact efficiency gain obtained after ICA application is presented in Table 4.

Fig. 7
figure 7

Efficiency of stimulation frequency detection for each frequency sub-band for the first 2 s of the signals recorded from channels contained in the S4 combination (O1, O2, Oz, and POz); the white boxes correspond to ESFD obtained with raw EEG signals, and the black ones correspond to ESDF obtained with signals preprocessed with the FastICA algorithm. The upper plot presents results obtained for low-luminance level and the lower plot—for high-luminance level; stars denotes statistically significant results

Table 4 Average ESFD gain after applying the FastICA algorithm in the preprocessing stage obtained for both luminance levels: (min. = 350 lx; max. = 2000 lx)

3.2 Online

Since the proposed approach correctly detected the highest number of stimulation frequencies in the case of the four-channel combination (S4), we started the analysis of the online session results from that combination. As in the off-line session, here we also analyzed individually the results obtained when users were stimulated with LEDs of the low (350 lx) and high (2000 lx) luminance. Table 5 presents the improvement of the classification accuracy (Acc) obtained after FastICA application at the signal preprocessing stage. The results for the low and high LED luminance are presented in the top and bottom parts of the table, respectively. In each group, the results obtained for raw signals and signals preprocessed with FastICA are compared in terms of Acc and ITR. The Acc and ITR gains were calculated as follows:

$${\text{AG}} = \frac{{\left( {\overline{{{\text{Acc}}_{{{\text{ICA}}\_{\text{on}}}} }} - \overline{{{\text{Acc}}_{{{\text{ICA}}\_{\text{off}}}} }} } \right)}}{{\overline{{{\text{Acc}}_{{{\text{ICA}}\_{\text{off}}}} }} }},$$
(11)

where AG is the Acc gain, \(\overline{{{\text{Acc}}_{{{\text{ICA}}\_{\text{on}}}} }}\) is the Acc averaged over subjects obtained for signals preprocessed with FastICA, and \(\overline{{{\text{Acc}}_{{{\text{ICA}}\_{\text{off}}}} }}\) is the Acc averaged over subjects obtained for raw signals.

Table 5 Acc and ITR averaged over the subject before and after FastICA application for channel combination S4 and both luminance levels: min. = 350 lx (upper part) and max. = 2000 lx (bottom part)
$${\text{ITRG}} = \frac{{\left( {\overline{{{\text{ITR}}_{{{\text{ICA}}\_{\text{on}}}} }} - \overline{{{\text{ITR}}_{{{\text{ICA}}\_{\text{off}}}} }} } \right)}}{{\overline{{{\text{ITR}}_{{{\text{ICA}}\_{\text{off}}}} }} }},$$
(12)

where ITRG is the ITR gain, \(\overline{{{\text{ITR}}_{{{\text{ICA}}\_{\text{on}}}} }}\) is the ITR averaged over subjects obtained for signals preprocessed with FastICA, and \(\overline{{{\text{ITR}}_{{{\text{ICA}}\_{\text{off}}}} }}\) is the ITR averaged over subjects obtained for raw signals.

As can be noticed in Table 5, the classification accuracy achieved for the four-channel combination S4 was higher after FastICA application for both high and low LED luminance levels. Therefore, we decided to perform the analysis across three other channel combinations to find out how the gain in the classification accuracy (induced by FastICA application) would be affected by the reduction of subsequent channels. The results are presented in Fig. 8 via the classification accuracy averaged over subjects obtained with raw EEG signals (white bars) and after application of FastICA (black bars). As in the previous figures, the results are grouped according to low (top plot) and high (bottom plot) luminance levels. The exact gain in the classification accuracy obtained after applying the FastICA algorithm is presented in Table 6.

Fig. 8
figure 8

The classification accuracy averaged over subjects before (white bars) and after (black bars) FastICA application for each channel combination and both luminance levels: min. = 350 lx (upper plot) and max. = 2000 lx (lower plot); stars denotes statistically significant results

Table 6 Average increase in the classification accuracy after applying FastICA in the preprocessing stage for both luminance levels (min. = 350 lx; max. = 2000 lx) and four combinations of channels

Given that for each combination of channels and both luminance levels, the average classification accuracy after FastICA application was higher than before (as shown in Fig. 8 and Table 6), it was decided to check whether that relationship would also hold for the individual subjects (Fig. 9).

Fig. 9
figure 9

Classification accuracy before and after FastICA application for individual subjects, all channel combinations (four rows of plots), and both luminance levels: min. = 350 lx (left column); max. = 2000 lx (right column)

4 Discussion

By analyzing the efficiency of stimulation frequency detection in succeeding 2-s time windows (Fig. 4), we can notice that regardless of the luminance level and channel combination, ICA preprocessing always improved the detection rate. Obviously, this domination of ICA-preprocessed signals increased with the number of channels, starting from an almost unnoticeable difference in ESFD for the two-channel combination and ending with a considerable ESFD gain for the four-channel combination.

In Table 2, which presents the efficiency gain (averaged over subjects) only in the first 2-s time window, we can observe that the gain averaged over channel combinations was much higher for low LED luminance (low: 52%, high: 19%). In the case of combinations S3 and S4, the gain for low luminance was even equal to 63% (S3) and 71% (S4). Of course, comparing the ESFD across both LED luminance levels, it can be noticed that ESFD is much higher in the case of high luminance. However, the difference in ESFD is not so high when we compare the ESFD obtained for high LED luminance calculated for raw signals with the ESFD obtained for low LED luminance but calculated with ICA. That means that it might be possible to achieve comparable ESDF after stimulating a user with a much lower luminance purely thanks to the implementation of ICA. This is a very important benefit of applying ICA since low luminance is far less tiring for a user and therefore improves the comfort of SSVEP-BCI.

Another fact that can be observed in Table 2 and Fig. 4 is the high similarity of ESFD obtained for combinations S3 and S4 across all analyzed conditions. The increase provided by the additional channel (POz) did not exceed 5%; it was equal to 0 and 4% for low luminance and 1 and 2% for high luminance. This suggests that it may therefore be possible to reduce the number of channels to three and hence to make the BCI application faster and even more user friendly.

Two general observations can be made by analyzing the results presented in Table 2 and Fig. 4. The first observation concerns the luminance level. As can be noticed, regardless of the channel combination and on/off ICA condition, the higher luminance provided higher detection efficiency. Although this result is in agreement with general brain theory [50]—a stronger stimulus induces a stronger brain response—it was not observed to such a high extent in the previous research. For example, Mouli et al. reported that the efficiency of SSVEP detection did not change significantly after reducing the luminance from high to low [51]. They analyzed four levels of luminance, from 357 lx (similar to that used in our study) to 1430 lx, and obtained similar efficiency of SSVEP detection across all levels for five subjects, four stimulation frequencies, and one EEG channel (O2).

The second general observation concerns the time windows used in the analysis and is independent from ICA preprocessing, channel combination, and luminance level. As can be seen, the averaged ESFD in all analyzed conditions maintained a similar level in all time windows. Of course, it was slightly lower in the first time window (covering the first 2 s), which can be attributed to the time needed to fully focus the subject’s attention on the stimulus, but the difference was still not significant.

In Fig. 5, we can see that the predominance of signals that underwent ICA preprocessing is maintained regardless of the length of time window. The efficiency gain in all time windows is the highest in the case of channel combinations S3 and S4, much smaller for combination S2, and only minor for combination S1. These observations are confirmed by Table 3, which presents the exact values of efficiency gain obtained after ICA preprocessing. In the table, it can be observed that the gain obtained with combination S3 was not only similar to the gain obtained with combination S4, but for some signal lengths, combination S3 provided an even higher increase in ESFD than combination S4 (time windows 1–4, 1–8, and 1–10 s for low luminance; time windows 1–8, and 1–10 s for high luminance). Analyzing the results from Fig. 5 across luminance levels, we should underline that once again, the efficiency gain was much higher in the case of low luminance (a maximum of 49% for the first 4-s time window) compared to high luminance (a maximum of 24% for the first 2-s time window).

The number of detected stimulation frequencies increases with the length of time window since the time needed for constituting the brain response for different frequencies is different; some frequencies immediately induce the brain response, while others need time to develop the prominent SSVEP [16, 52, 53]. Hence, the efficiency of frequency detection depends on the length of time window used in the off-line session: The longer the time window, the higher the ESFD. However, as shown in Fig. 5, regardless of the length of the time window, it was always profitable to use ICA to reorganize information contained in the raw EEG signals before starting the detection process.

Figure 6 presents the ESFD obtained for the first 2 s of the recorded signal with respect to the individual subjects. When we look more closely at this figure, we can see that not only the average detection efficiency but also the efficiency calculated for each individual subject increased after the application of ICA. This tendency holds for almost all subjects across both luminance levels and all channel combinations. Obviously, as could be expected after the analysis of the average ESFD, there are some discrepancies, five for combination S1, namely Sub2, Sub6, and Sub10 for low luminance and Sub2 and Sub6 for high luminance; three for combination S2, namely Sub10 for low luminance and Sub2 and Sub6 for high luminance. However, in the case of the two last combinations of channels, there is only one exception to the rule of ICA predominance (for Sub11, combination S4, high luminance).

Analyzing the increase in the detection efficiency obtained after ICA application across different frequency bands (for combination S4 and the first 2-s time window), we can notice that the ESFD increased regardless of the frequency sub-bands for both luminance levels (Fig. 7 and Table 4). We should underline here that once again, the efficiency gain obtained with signals preprocessed with ICA was much higher across all frequency ranges (Table 4) in the case of low luminance (a maximum of 99% for the 10–15 Hz sub-band) compared to high luminance (a maximum of 56% for the same sub-band).

One unexpected effect that we can observe in Fig. 7 is a lack of monotonicity in succeeding frequency sub-bands. In many previous papers, it was reported that the efficiency of the stimulation frequency detection decreased with increasing frequency [16, 54]. In Fig. 7, this tendency holds only for the first three frequency sub-bands (5–10 Hz, 10–15 Hz, and 15–20 Hz) and for the fourth one for high luminance, but then the ESFD increases even above the level obtained for 15–20 Hz. This is true for both luminance levels and regardless of ICA application. If this tendency is confirmed by other research, it could be another step toward making SSVEP-BCI more user-convenient, since the frequencies from the 25–30 Hz band are much less tiring for the user than lower frequencies.

For the analysis of the results from the second experiment, where the subjects took part not only in the off-line session but also in the online one, we chose the combination of channels that allowed detection of the highest number of stimulation frequencies in the first experiment: combination S4.

Analyzing the classification accuracy (Acc) across individual subjects (Table 5), we can notice that regardless of the luminance level, the classification accuracy for each subject was higher when ICA was applied in the preprocessing stage. Of course, individual results differed across subjects but this overall tendency was maintained. As in the off-line mode, here the accuracy gain obtained due to ICA application was also significantly higher in the low luminance condition (the accuracy gain for the S4 combination was 11%) compared to the high-luminance condition (5%).

Considering the different channel combinations, it can be noticed that although the average results (Table 6, Fig. 8) show the predominance of ICA components in the case of each combination, the individual results (Fig. 9) maintain this rule only for combinations S3 and S4. In the case of combination S2, there are two subjects for whom this tendency does not hold (Sub7 for low and high luminance and Sub8 for high luminance) and in the case of the two-channel combination S1, there is no clear pattern at all. Hence, it can be deduced that two channels were too few for ICA to enhance the component associated with the stimulation frequency provided.

Too small number of channels (in our case the two of them) is one of the barriers limiting the usefulness of the approach described in the paper. The two other factors that also can limit the benefits obtained after the application of the proposed approach are

  • two short signals and

  • the requirement for an instantaneous system reaction.

All three issues mentioned above are inherent features of most ICA algorithms. Two small numbers of too short signals do not provide enough space to properly reorganize the signal matrix during the ICA transformation, and the transformation itself needs some time to be completed.

5 Conclusion

The research presented in the paper is a part of a wider study whose aim is to find SSVEP-BCI solutions that on the one hand are comfortable for users and on the other provide a high number of individual frequencies detected in the off-line mode and high accuracy in the online mode. In this paper, we focused on showing that using ICA for signal preprocessing can bring significant benefits in the case of a low-channel EEG setup and stimuli that induce relatively little user fatigue, namely stimuli of high frequency and low luminance.

Both hypotheses stated in the Introduction have been successfully verified via two experiments covering off-line (24 subjects) and online (eight subjects) BCI sessions. In the first experiment, we detected 50% more stimulation frequencies after ICA application for four EEG channels when compared to the results obtained without ICA preprocessing. In the second experiment, we obtained an 8% increase in classification accuracy after the application of ICA. Both results are the averages calculated over two analyzed conditions: low (350 lx) and high (2000 lx) LED luminance levels. Of course, more important for us were the results obtained for low luminance only. These were even more promising: 71% gain in the off-line mode and 11% gain in the online mode after the application of the proposed approach.

The final accuracy of 90% (range 82–100%) in the case of high luminance and 77% (range 64–90%) in the case of low luminance is perhaps not very impressive since it is comparable with that of other studies [22, 26]. However, we have to bear in mind that these results were obtained with a setup that is more convenient for the user than for the processing system, namely one with high frequencies and a small number of electrodes. In this regard, especially the results obtained for low LED luminance should be highlighted. The average accuracy of 77% is not high for an SSVEP-BCI but is sufficient to use the system successfully. Moreover, with such a low luminance, the BCI system will be not so tiring for the user, and hence it should be possible to use it for long time periods.