Keywords

1 Introduction

A brain-computer interface (BCI) is a system that is capable of translating user’s intentions from only brain activity, usually electroencephalographic (EEG) signals, into commands for an external device [1]. These systems have been studied as a complementary option during rehabilitation therapy in patients that have suffered a stroke [2].

Motor imagery (MI) and actual movement share part of their neural substrate [3]. Hence, there is interest on using MI-based BCIs for inducing brain plasticity and enhancing motor rehabilitation by allowing the repetitive practice of brain motor activity. In particular, efforts have been focused on gait recovery as it represents a major improvement on life-quality [4] for people with motor impairment at the lower limb level.

Motor imagery and real movement are related to the attenuation of EEG power, known as event-related desynchronization or ERD, in \(\mu \) (8–13 Hz) and \(\beta \) (14–26 Hz) bands [5]. Such motor activity is expected to occur in premotor and supplementary motor (SMA) areas, since they are key structures for motor imagery [5]. Also, there is a high amplitude in the \(\gamma \) band within 60–80 Hz during gait compared to being standing, while there is also modulation in 70–90 Hz relative to the gait cycle and inversely coupled to 24–40 Hz [6]. These changes are expected mostly over the standardized position of Cz, near the feet motor area and relatively close to the SMA.

In the present study, we evaluated the spectral changes of gait MI while being standing. Then, the frequency bands where changes were found were used to train a naïve Bayesian classifier and its percentage of correct classifications was evaluated. This work was performed as part of the Associate project, which is aimed to validate the effectiveness of a new neurorehabilitation intervention for promoting gait motor relearning that integrates a BCI system, brain electrical stimulation and a lower limb exoskeleton. Therefore, one of the goals within the framework of this project is to develop an algorithm that allows gait motor imagery detection from EEG signals in order to control an exoskeleton.

2 Experiments

This section explains the process of EEG recording for different mental conditions and the analysis of the data. The main purpose of these experiments was to determine the most evident EEG differences in terms of frequency that are associated to gait MI and to use them to train a classifier that detects gait MI. Hence, three subjects participated in one experimental session in which the accuracy of gait MI detection is evaluated.

2.1 EEG Recording

The Starstim 32 system (Neuroelectrics®) was used to acquire EEG data at a sample rate of 500 Hz, using a right-earlobe reference. EEG signals from the 10/10 international system positions Cz, Pz, Fz, FC1, FC2, CP1, CP2, C3, and C4 were obtained. In terms of software, Neuroelectrics Instrument Controller (NIC) and a Matlab® platform were used to record data, while the Matlab routines were also used to control the visual cue system in this study.

2.2 Recording Session

Users stood in front of a computer screen and they were instructed to either imagine they were walking or to remain standing but relaxed in response to visual cues, as shown in Fig. 1. If the word “Go” appeared on the screen (7 s), then the user had to imagine to walk at approximately one gait cycle per second that simulated a continuous and comfortable walking rate. On the other hand, if the screen was cleared out (6–8 s), the user stopped motor imagery. Participants were encouraged not to anticipate the “Go” cue but to wait until it appeared to prepare their MI. In this case, MI condition was compared while standing because future evaluations of a gait MI-BCI would require the user to be at that position.

The session consisted of three runs of 30 attempts or trials of MI with a corresponding lapse of relaxing state. The temporal sequence of a run is presented in Fig. 2.

Fig. 1.
figure 1

Subject performing the experimental session.

Fig. 2.
figure 2

Temporal sequence of one run.

2.3 EEG Analysis

After EEG was obtained, the mean ERD from the first run was estimated to determine the most evident spectral changes. First, a Laplacian filter and a 1–100 Hz bandpass filter was applied on Cz. The resulting signal was divided in MI and rest (just standing) epochs. Spectra from each epoch was calculated with fast Fourier transform using non-overlapping windows of 100 samples (0.2 s). Then, the mean spectrum of the windows of each rest epoch was subtracted to the spectra of the corresponding MI epoch, which represents the varying ERD per MI trial across time. Finally, mean ERD of all trials was computed and inspected visually to determine the frequency features that would be used for classifying MI for all subjects: 8–13 Hz (\(\mu \)-rhythm) and 20–35 Hz bands. This decision is detailed in Sect. 3.1.

Once characteristic features were selected, EEG data was processed to obtain two signals from each channel that represented the two chosen bandwidths. The following procedure was performed in windows of 0.5 s (i.e., 250 samples) to simulate an online processing:

  1. 1.

    Obtaining spectral power at the characteristic frequencies: A Laplacian filter was applied to the nine channels. This was followed by the parallel processing with two bandpass filters, one with cutoff frequencies of 8–13 Hz and another of 20–35 Hz. Then, signals were squared to approximate EEG bandpower. This procedure resulted in eighteen signals (twice per EEG channel).

  2. 2.

    Smoothing: Each signal was smoothed by assigning to the current signal value the mean of the last 4 s of the spectral power. Such smoothing introduced slow variations on the signal. In consequence, further detrending was required.

  3. 3.

    Detrending: Each signal was detrended by removing the straight-line fit of the last 8 s of the smoothed signal.

  4. 4.

    Obtaining a representative value of the window: The mean of the last window of detrended signal was obtained. This value was the one introduced in the classifier.

Processed signals from the first run were used to train a naïve Bayesian classifier [7] to identify MI from rest. The remaining runs were used to test the accuracy of classification, which is evaluated as the percentage of correct classifications in the run. Note that classification into rest or MI is performed every 0.5 s, due to the selected window size for signal processing.

3 Results

This section presents the mean ERD results that were used to select frequency bands as features for the classifier. Then, accuracy results are described for the second and third runs.

3.1 ERD Results

Figure 3 shows the mean ERD associated to gait MI for all subjects. As can be seen, Subject 3 presents the most evident bandpower attenuation on the \(\mu \) rhythm and on the range of approximately 20–40 Hz, which seems to correspond to the reported modulation on 24–40 Hz [6] that is coupled to the gait cycle. However, the attenuation band seems shifted a couple of Hz lower respect to results from [6]. A similar behavior is observed for Subject 1, but with a less evident ERD for the higher band. In the case of Subject 2 there too much variability in the mean ERD across time to find a spectral trend. Based on these results, the characteristic frequencies were chosen as 8–13 Hz (\(\mu \)-rhythm) and 20–35 Hz bands.

Fig. 3.
figure 3

Mean ERD on Cz associated to gait MI across time.

3.2 Accuracy Results

Table 1 shows the accuracy for the three subjects and the two runs in which classification performance was evaluated. In the table, it can be observed that two of the subjects could achieve in at least one of the runs an accuracy above 70%. This accuracy level is commonly used as a threshold to define if there is enough control of the system to allow communication [8]. To illustrate the kind of errors in classification that occurred in one of the best classifications, a fragment from the second run of Subject 3 is presented in Fig. 4. There it can be seen that the classified state is similar than the real one. However, there are cases where the intention may be misclassified, as in the period from 225–250 s. Also, the detection of the Standing+MI condition, which shown as a pulse with variable width, can be narrower or broader than the pulse of the actual condition. Note that sometimes the MI state is detected before the cue is presented, this could be either due to the non-specificity of the classifier or to the possible preparation of the subject to perform MI, despite of the instruction of trying not to anticipate to the cue presentation. However, as MI or the lack of it are the only tasks the user is performing, it is not surprising that the user suspects when the next cue is appearing soon.

Table 1. Accuracy for each subject and run
Fig. 4.
figure 4

Classification fragment from the second run of Subject 3. The decision of the classifier (continuous) is shown with respect to the real condition (dashed) according to cue presentation.

4 Discussion

Based on the previous results, it seems that the output from the classifier is similar to the real condition, according to the visual cue presentation in the best cases of classification, even if the accuracy is still far from 100%. It is important to note that accuracy can vary depending on the velocity of the user to change from one cognitive state to another and on the ability of sustaining the mental state. In addition, it must be considered that the user might move during EEG recording to sustain body balance, which for the purpose of framework in which the study is developed, is a required condition. In this case, the protocol is not adequate for evaluating the potential of classifier, but just observing the time relation between cue apparition and the spectral changes. However, note that this kind of classification strategy is not expected to give satisfactory results for all subjects since the beginning, since it is oriented to a learning process of brain activity modulation.

It should be noted that the number of features that are used for classification is high. This may be reduced or optimized depending on the subject to reduce computational cost. Nevertheless, it would be recommended to cover with electrodes a broader spatial area than just around Cz in the case of an application for people with motor impairments, since their brain activity is more heterogeneous compared to healthy people.

As future work, it is planned to evaluate the strategy on more subjects. If results suggest the strategy is suitable for motor relearning in terms of brain activity, the protocol could be implemented in a BCI system that provides feedback, so improvements in brain activity modulation can be evaluated.

5 Concluding Remarks

The proposed protocol allowed two out of three subjects to obtain an accuracy level above 70%, which is related to a reasonably control level. Nevertheless, the strategy is oriented to the improvement of brain activity modulation, so it could not work in all subjects since the first session. Note that this protocol implements as classifiable features the most evident EEG spectral changes that were observed during gait and that are also reported in the literature. However, improvements in reducing the number of the features that are used for classification could be performed. Future work involves further evaluation of the strategy with more subjects.