Anticipatory Detection of Self-Paced Rehabilitative Movements in the Same Upper Limb From EEG Signals

Currently, one of the challenges in EEG-based brain-computer interfaces (BCI) for neurorehabilitation is the recognition of the intention to perform different movements from the same limb. This would allow finer control of neurorehabilitation and motor recovery devices by end-users. To address this issue, we assess the feasibility of recognizing two rehabilitative right upper-limb movements from pre-movement EEG signals. These rehabilitative movements were performed self-selected and self-initiated by the users using a motor rehabilitation robotic device. This work proposes anticipatory detection scenarios that discriminate EEG signals corresponding to non-movement state and movement intentions of two same-limb movements. The studied movements were discriminated above the empirical chance levels for all proposed detection scenarios. Percentages of correctly anticipated trials ranged from 64.3% to 77.0%, and the detection times ranged from 620 to 300 ms prior to movement initiation. The results of these studies indicate that it is possible to detect the intention to perform two different movements of the same upper limb and non-movement state. Based on these results, the decoding of the movement intention could potentially be used to develop more natural and intuitive robot-assisted neurorehabilitation therapies.


I. INTRODUCTION
Brain-Computer Interfaces (BCIs) are emerging assistive technologies that provide an artificial communication pathway between the brain and the external world [1], [2]. These systems translate a mental task performed by the user into commands to control external devices using brain signals recorded with invasive or non-invasive techniques [3]. This is remarkably interesting for rehabilitation therapies due to BCIs provides patients with motor impairments with a non-muscular communication channel that could be used to activate a robot-assisted rehabilitation device [4]. Additionally, BCI-based rehabilitation therapies encourage patients to actively participate in the rehabilitation process, offering the benefit of improving motor function and shorten-The associate editor coordinating the review of this manuscript and approving it for publication was Emil Jovanov.
ing the recovery period [5]- [7]. Non-invasive BCIs based on electroencephalography (EEG) signals have been explored in order to develop novel neurorehabilitation therapies [8]- [11]. Ideally, these BCIs extract information encoded on the EEG signals about the movements that users attempt to carry out. The conventional strategy is motor imagery (MI) [12]- [14], where the user mentally rehearses movement without physical activity over a long time. This induces power changes in frequency bands of EEG signals obtained mainly from the sensorimotor brain cortex [15]- [18]. After the user performs the MI strategy, the BCI system uses these power changes as discriminatory features about the imagination of movement. Then, BCI applies a classification model in order to recognize the imagined movement against other mental states (e.g., movement imagination vs. non-movement). Finally, classifier outputs are used as commands to trigger a rehabilitation device. Description of the state of the art of studies reporting decoding of motor information of same-limb movements from electroencephalographic brain signals. SCI: spinal cord injury patients; ME: motor execution; MI: motor imagery; PMI: premovement EEG information; GCs: Gabor coefficients; MRCP: movement related cortical potentials; CSP: common spatial patterns; AUC: area under the curve coefficient; FBCSP: filter bank common spatial pattern; AR: Auto regresive coefficient; RMS: root mean squared; coefficient ELNN: Elmans neural networks; LDA: linear discriminant analysis; sLDA: shrinkage linear discriminant analysis; SDA: sparse discriminant analysis.
Despite the success of MI-based BCIs on neurorehabilitation therapies [30]- [34], the MI strategy often offers a limited solution to allow more natural control of the BCI system and to promote rehabilitation and recovery at both, physical and cortical levels [10], [35]. Firstly, during the execution of the MI strategy, there is an inherent delay between imagination carried out by the user and the physical output of the robot-assisted rehabilitation devices. By contrast, in a motor rehabilitation context, it is necessary that robots execute the movements while the user is also performing the mental task in order to promote proprioceptive feedback [36] that induces neural reorganization on the patient. The delay is due to the need of the BCI technology to instruct the user through a synchronous sequence of strict and highly controlled visual or auditory cues about when the imagination should be initiated. In consequence, the movements performed by the robot-assisted rehabilitation devices are not perceived to be naturally controlled by the users. Secondly, the success of a BCI-based rehabilitation therapy requires a match between the mental task performed by the user and the movements performed by the robotic devices. This is not the case with the MI strategy since the user usually imagines body movements that are easy to recognize but that are not the same as the movements performed by the robots [37], [38]. Lastly, EEG-based BCI driven rehabilitation therapies for a single limb, like those required for patients affected by unilateral stroke, requires the recognition of diverse movements of the same limb to produce different movements in the robot-assisted rehabilitation devices. Due to these limitations, BCIs for neuro-rehabilitation, especially of the same limb, require the early recognition of motor information (i.e., the detection of ''movement intention'' which precedes movement execution) and the detection different natural movements in a single limb (i.e., several ''same-limb movements'' decided and initiated by the patient whenever he/she wants).
Recent studies have investigated the detection of motor information from EEG signals for the recognition of several same-limb movements. Table 1 presents a summary of some of the most relevant works. These studies achieved detecting motor information while a movement is imagined o executed following a synchronous protocol. These works are based on temporal and frequency features such as movement related cortical potentials (MRCPs) [20], [26], [28], [29], and spectral power (SP) [19], [21], and linear transformations as common spatial patterns (CSP) [22]- [25]. Likewise, the most used classification algorithms are artificial neural networks (ANN), support vector machines (SVM), linear discriminant analysis (LDA), and its derivations. Most of these works have explored the recognition of movements in bi-class (e.g., imagined movement versus non-movement) and multiclass (e.g., several imagined movements and no movement) classification scenarios in offline settings (i.e., using EEG signals from specific and fixed time intervals). Importantly, they have shown that it is possible to use EEG signals to recognize different same-limb movements. Only a few studies have explored the detection of motion information continuously over time [20], [26], [29]. Such studies have reported significant detection times from 100 to 500 ms before movement initiation. These results show the existence of decipherable motor information prior to movement onset. The detection of movement intention has been mainly studied for movements of different limbs [33], [39], and to lesser extent discrimination between movement intention and non-movement state in several analytical movements of the same upper limb has also been explored [29]. Nevertheless, more research is still required to achieve early detection of movement intention in more realistic rehabilitation therapy situations. For example, explore the detection of motor information for movements that are specifically conducted during a motor rehabilitation therapy and a more flexible BCI strategy where the user can decide the type of movement to be executed and when to initiate such movement. Finally, in the motor rehabilitation context, it would be notably interesting to detect motor information with sufficient preceding time in order to provide on-time natural movement control to users in BCI-based motor rehabilitation therapies.
In order to carry out a BCI strategy approaching a motor rehabilitation therapy context, this work proposes the anticipatory detection and discrimination of rehabilitative movements of the same upper limb using motor information extracted preceding the initiation of the movement. These rehabilitation movements have remarkable characteristics: i) the movements are performed using an upper limb motor rehabilitation device that assists the user in the execution of the movements and, ii) the movements are self-selected and self-initiated by the user, i.e., users were freely able to select which movement to perform and when to initiate it. Some studies have explored similar characteristics [19]- [29]. To our knowledge, these characteristics have not all been included simultaneously within one experimental task. This work addressed this proposed experimental task with fifteen healthy participants and a motor rehabilitation device for upper limb. The experiment consisted of two rehabilitative movements of the right upper limb, specifically supination/pronation of the forearm and flexion/extension of the arm, while the EEG signals were recorded. This study first aimed to determine whether EEG signals preceding movement can be used to detect the rehabilitative movement that will be executed, i.e., to discriminate between movement intention and no-movement at fixed time intervals. This aim is explored in three offline classification scenarios: i) relax versus movement intention intervals (irrespective of the movement), ii) supination/pronation movement intention versus flexion/extension movement intention, and iii) relax and movement intention of each movement. The second aim explored the feasibility detecting of movement information that precedes the movement initiation along the time of a trial. This aim was explored in two pseudo-online classification scenarios: i) relax versus movement intention intervals and ii) relax and movement intention of each movement.
The analysis of the EEG activity showed significant event-related desynchronization in the motor-related frequency bands of the EEG that precedes the movement initiation. This suggests the existence of neural correlates that are useful in detecting movement intention. These motor-related rhythms were used to extract features to detect the intention to perform the rehabilitative movements within offline and pseudo-online classification scenarios. The results of the three different offline classification scenarios showed significant accuracy rates of 75.6%, 68.3% and 62.8%, respectively. The results of the two pseudo-online classifica-tion scenarios showed, firstly, significant detection of movement intention (irrespective of the movement) 620 ms before movement initiation and a maximum accuracy rate of 77.0%; and secondly, significant detection of the intention to carry out supination/pronation of the forearm and flexion/extension of the arm from 400 ms (and a maximum accuracy rate of 64.3%) and 300 ms (and a maximum accuracy rate of 67.1%) before movement initiation, respectively. The results of these studies indicate that it is possible to detect the intention to perform two different movements of the same upper limb and non-movement state. These results extend those presented in [40]. First, the participant set is increased to double. Second, a more elaborate ERD/ERS analysis based on data from all participants and a larger number of EEG signals. Third, two additional offline classification scenarios are explored. At last, the continuous detection of movement intention is studied.

A. EXPERIMENTAL DESIGN
The experiment consisted of the execution of two selfselected and self-initiated movements of the same upper limb using a robotic rehabilitation device. The two movements were: i) supination/pronation of the forearm and ii) flexion/extension of the arm. Both movements were performed with the right limb. For the execution of the experiments, the participants were comfortably seated in a chair, in front of a computer screen, with the left forearm resting on the lap, and with the right arm softly grasping the robotic device without causing any muscle tension and effort. Fig. 1a shows a snapshot of the experimental setup with a participant, the computer screen, the EEG recording system, and the robotic device, Fig. 1b illustrates the two different rehabilitation movements (the top image shows the flexion/extension of the right arm while the bottom image shows the supination/pronation of the right forearm).
The experiment consisted of the execution of trials of the two movements and was guided by visual cues presented on the screen. Fig. 1c illustrates the temporal sequence of a trial which, lasted eighteen seconds in total. The first cue showed during three seconds an image with the text ''relax'' and indicated stay relaxed with the robotic rehabilitation device in the home position. Participants were asked to avoid any body movement or effort and to keep relaxed while looking at the center of the screen. The second cue showed during twelve seconds an image with a cross symbol and instructed to perform any of two movements (self-selected) at a natural pace. Participants were asked to initiate the movement whenever they decided to wait around six seconds after the cross was first displayed while avoiding any mental count. This means that they decided for each trial when to initiate the movement (self-initiated). In consequence, the actual movement onset is different across trials. After the execution of the movement was completed, participants were instructed to return the forearm or the arm towards the robot's home position. Finally, the last cue showed during three seconds FIGURE 1. (a) Snapshot of the experimental setup. Participants were seated in front of a computer screen while grasping the robotic device with the right arm. The execution of the experiment was guided by visual cues presented on the screen while the movements were selected and initiated by the participants. (b) Illustration of the two movements carried out by the participants. The top image shows the flexion/extension of the right arm while the bottom image shows the supination/pronation of the right forearm. (c) The temporal sequence of a trial. The fist cue indicated to relax. The second cue indicated to execute any of the movements (self-selected) whenever he or she wanted to initiate (self-initiated). The third cue indicated the completion of the task and resting, blinking or moving is allowed if it is necessary. (d) The temporal sequence of an experimental session. The experiment was conducted in two runs, with four blocks in each run, and fifteen trials in each block. This resulted in 120 trials in total per participant.
an image with the text ''rest'' and indicated to rest from the experimental task, blink or move the head and body if necessary. Participants were asked to avoid and/or minimize body movements, muscle effort, blinking, and any cognitive tasks from the presentation of the first cue up to the termination of the movement.
The experiment was conducted in a single experimental session comprising two separate runs. Each run consisted of 4 blocks of 15 trials each with a standby time of 1 minute between blocks; hence, the duration of each block was 4.5 minutes while the duration of an entire run was 21 minutes. To avoid fatigue and reduce tiredness, participants were requested to rest at least 5 minutes between the runs or more if they needed it. Therefore, the total time for the experimental session was at least 47 minutes. Altogether, 120 trials were recorded per participant, around 60 trials per movement. Fig. 1d illustrates the temporal sequence of the experimental session carried out with each participant. To keep a balance of the number of trials for the two movements, participants were informed about the number of movements to be executed and were asked to try to perform a similar number of trials for each movement while avoiding any sequence or counting. In addition, the experimenter recorded the type and number of movements performed by the participants during each block and informed them when a considerable imbalance occurred.

B. PARTICIPANTS
Fifteen able-bodied participants (11 males and 4 females) with age range from 20 to 26 years were recruited to participate in this study. All participants were bachelor students from our faculty, had no academic relationship with the experimenters, had no previous experience with EEG or BCI-related experiments, and none of them presented known neurological or motor impairment. Participants were duly informed about the goals of the research and all of them freely signed informed consent forms in accordance with the Declaration of Helsinki. The experimental protocol was approved by the Comité de Ética en Investigación de la Escuela de Medicina del Instituto Tecnológico y de Estudios Superiores de Monterrey (CONBIOETICA-19-CEI-011-20161017) and the Comité de Investigación de la Escuela de Medicina del Instituto Tecnológico y de Estudios Superiores de Monterrey (17CI19039003).

C. ROBOT DEVICE
A custom-made robotic device for the rehabilitation of the left or right upper limb called Tee-R [41] was used in the experiment. The Tee-R is a 2 DOF joystick-type motorized device for arm and hand movements that reproduces and facilitates the execution of hand supination/pronation, as well as combined elbow-shoulder flexion/extension. Only one of these two movements can be executed at a time. Fig. 1a and b show the Tee-R robot and illustrate these two different rehabilitation movements. To use this robot, the users grab the device with the hand while the wrist is freely holding in a U-type structure, and the elbow and forearm resting in the structure. The robot is equipped with several electric switches that allow to obtain digital signals that indicate if the device is in the home position, the movement type, the 2-D joystick position, the actual onset and the end of movements, among others. For this work, the Tee-R robot was no energized and it was free to move as the user decided, and the digital signals for the movement type and the time instant of the movement onset were sent to the EEG recording system.

D. DATA COLLECTION
EEG data were recorded from 62 scalp locations using a g.HIamp biosignal amplifier and a g.GAMMAsys system for active electrodes (g.tec medical engineering GmbH, Austria). The 62 electrodes were uniformly distributed on the scalp following the 10/10 international system with the ground at AFz and the reference placed in both earlobes. EEG signals were recorded at a sampling frequency of 1200 Hz, power-line notch-filtered and low-pass filtered at 100 Hz. The electrode impedance was checked and kept below 50 k . The impedance measurement process was carried out before the initiation of each run using the impedance measurement tool of the g.HIamp and the g.Recorder software.
In addition, two digital signals were recorded from the Tee-R robot. These signals encoded the movement type and the time instant of the movement onset. For these digital signals, a low level indicates no movement carried out while a high level indicates movement carried out. Therefore, during no movement execution and with the robot in the home position, the digital signals are deactivated, while during the execution of a movement only one of the signals is activated. Note that the Tee-R robot allows carrying out only one movement at a time and thus the two digital signals cannot be activated simultaneously. The digital signals were recorded along with the EEG signals at the same sampling frequency using the g.STIMbox device that is connected to the g.HIamp biosignal amplifier. The BCI2000 platform [42] was used in stimulus presentation mode to manage and control the execution of the experiment, record the EEG and digital signals, and store the data for offline processing.

E. DATA PREPARATION AND PRE-PROCESSING
After the experimental sessions, recorded data of each participant was subjected to offline preparation and preprocessing. EEG and digital signals were trimmed in 15s-long trials starting from the first visual cue and up to the end of the second cue, that is, the 3s-long segment at the end of each trial was discharged and not used in the rest of the study as it does not contain relevant EEG activity to study detection of movement intention. The movement type and movement onset time of each trial were obtained from the digital signals provided by the Tee-R. Here, the digital signals were inspected and the one with high level (i.e., activated) within the time interval [3,15) s was used to determine the type of movement (i.e., supination/pronation or flexion/extension) while the time instant of the shift from low level to high level was used to obtain the movement onset time. Thus, each trial is associated with a unique type of movement and with a movement onset time posterior to the presentation of the second visual cue. To avoid potential contaminations in EEG signals due to the event-related potential generated by the visual cue or due to unsuccessful movement attempts, trials with movement onset time lower than 1 s (early movement initiation) and higher than 11 s (delayed movement initiation) relative to the presentation of the second visual cue were excluded. This procedure is illustrated in Fig. 2a. The time axis of each trial was then aligned with the movement onset. Therefore, all trials have the same reference at the movement onset time (t = 0 s) but different trial's initiation (t ini ) and trial's end (t end ). This is illustrated in Fig. 2b. Note that the duration across all trials is t end − t ini = 15 s and they comprise a relax or no-movement segment in the time interval [t ini , t ini + 3) s, a movement execution segment in the time interval [0, t end ) s, and a movement intention segment that precedes the beginning of the movement at t = 0 s.
Frontal electrodes and electrodes located on the back of the head were excluded in order to remove noisy EEG channels contaminated by eye-blinks, muscle activity and other artifacts. Electrodes located far away from the motor cortex were FIGURE 2. (A) Illustration of the movement initiation in different trials and their exclusion procedure using the movement onset time obtained from the digital signals provided by the Tee-R. Trials with movement onset time lower than 1s (early movement initiation) and higher than 11s (delayed movement initiation) relative to the presentation of the second visual cue were excluded. (B) Illustration of the time aligning procedure in accepted trials. The time axis of each trial was aligned with the movement onset obtained from the digital signals provided by the Tee-R. The duration across all trials is t end − t ini = 15s and they comprise a relax or no-movement segment in the time interval [t ini , t ini + 3)s (light green segment), a movement execution segment in the time interval [0, t end )s, and a movement intention segment that precedes the beginning of the movement at t = 0s (light gold segment). In addition, the power spectral density features were computed separately from EEG in the relax interval [t ini + 1, t ini + 2)s (dark green segment labeled as Relax) and from EEG in the movement intention interval [−1, 0)s (dark brown segment labeled as IntA or IntB, according to the movement that the participant performed during the trial).
also excluded since they might not have relevant information about motor tasks. In consequence, only 21 EEG electrodes located over or surrounding the motor cortex (FC1, FC2, FC3, FC4, FC5, FC6, FCz, C1, C2, C3, C4, C5, C6, Cz, CP1, CP2, CP3, CP4, CP5, CP6, and CPz) were kept and used for further analysis. EEG signals were re-sampled to 256Hz and band-pass filtered from 0.1 Hz to 40 Hz using a four order, Butterworth-type filter. Finally, a baseline correction process was applied independently for each trial and channel using the average activity within the interval [t ini , t ini + 0.1] s, i.e., for each electrode and trial, the average activity of the relax segment was subtracted for each time sample of the entire trial. This was done to remove the effects of any direct current level of EEG potentials and to intensify the differences in the morphology of EEG potentials with respect to the relax interval.
Subsequently, an artifact rejection process was applied to exclude complete trials. This process included two steps: i) an automatic artifact rejection based on a z-score normalized transformation of every time-point of the EEG data and a thresholding as rejection rule (the threshold cutoff value was 4). This was applied within the trial's interval [−3, 0] s to cover the time corresponding to movement intention; and ii) a visual artifact rejection was applied to rule out noise-contaminated trials. This visual approach was applied as a double check process. All these data preparation and pre-processing steps were carried out in MATLAB using the FieldTrip toolbox [43]. The task-related power spectral changes were examined with an event-related desynchronization/synchronization (ERDS) analysis [44]. The goal was to explore short-lasting fluctuations in the brain's oscillatory activity (i.e., power increase/decrease) induced by the motor task, in specific during movement intention. The ERDS analysis was carried out as follows. First, all trials were trimmed from −3.1 to 1.0 s relative to the movement onset. Thus, all trials have the same length and reference. Then, for each electrode in each trial, the time-frequency representation TFR(t, f ) was calculated in the frequency band [1,40] Hz at the resolution of 1 Hz using Morlet wavelets [44], [45]. Here, the family of wavelets was where the ratio f /σ f was established in 7 as commonly done in the analysis of EEG signals [17], [45]. Subsequently, for each electrode individually, the ERDS relative to the reference interval [−2.6, −2.0) s was computed as: where TFR(t, f ) is the time-frequency representation averaged across-all-trials and TFR ref (f ) is the average of TFR(t, f ) in the reference interval for frequency f . Finally, the significant ERDS was computed with a bootstrap analysis at the significance level of α = 0.05 using as baseline the reference interval [17], [39]. As a result, significant event-related desynchronization is represented as negative percentage values (i.e., power spectral decrease relative to the reference interval), significant event-related synchronization is represented as positive percentage values while no significant desynchronization or synchronization are represented as zero percentage values.

G. DETECTION OF MOVEMENT INTENTION
The detection of movement intention from EEG signals during the execution of self-selected and self-initiated rehabilitative movements of the same upper limb was investigated using power spectral-based features and support vector machines (SVM). VOLUME 8, 2020

1) FEATURE EXTRACTION AND SELECTION
The power spectral density (PSD) of the EEG signals were used as features to investigate the detection of movement intention. This is because this method is highly used as feature extraction stage in EEG-based BCI due to the fact that power spectral changes are observed during motor tasks as movement execution, imagery, or attempt [35], [46]- [48]. The Welch's averaged modified periodogram method [49] with Hanning-windowed epochs of length 1s and overlap of 0.5s was employed to compute the PSD. The PSD was computed in the frequency range between 1Hz and 40Hz at a resolution of 1Hz. For each trial, the PSD was computed separately from EEG in the relax interval [t ini + 1, t ini + 2)s (labeled as Relax) and from EEG in the movement intention interval [−1, 0)s (labeled as IntA or IntB, according to the movement that the participant performed during the trial, that is, IntA for supination/pronation of the forearm and IntB for flexion/extension of the arm). Fig. 2b illustrates the time intervals of each trial employed to compute the PSD. Note that in the relax interval, the first 1s-long segment (i.e., [t ini , t ini + 1)s) and the third 1s-long segment (i.e., [t ini + 1, t ini + 3)s) were not considered to compute the PSD. The rationale was to discharge evoked potentials induced by the first visual cue and to remove any cognitive EEG activity related to the expectation and anticipation of the second visual cue. Note also that the movement intention interval consists exclusively of EEG activity that precedes the movement onset at t = 0. Several time instants for the initiation of the movement intention were explored as carried out in previous studies [20], [26], [27], and our best classification results were achieved with movement intention starting at t = −1, which agrees with our ERDS analysis results.
To examine significant differences in the PSD between different conditions (Relax vs. Int ∈ {IntA, IntB}, IntA vs. IntB, and Relax vs. IntA vs. IntB), and to select the power spectral values with the higher discriminative power, the square of the Pearson's correlation (r-squared) was employed [50], [51]. Then, we selected the 200 power spectral values with higher r-squared values. As a result, the feature vector is x ∈ R D where D = 200, which is associated with a class label y ∈ {Relax, IntA, IntB}. Features were z-score normalized to have zero mean and unit variance according to 1, 2, . . . , D) where µ i and σ i are the mean and standard deviation of the i-th feature.
2) CLASSIFICATION MODEL Support Vector Machines with Radial Basis function kernel (SVM-RBF) was used as classifier. This algorithm has shown good performance in applications with EEG signals [50]- [52]. A support vector machine takes as input a set of N feature vectors x i together with their labels y i ∈ {1, −1}. The idea behind SVMs is to find the hyperplane that maximizes the distance between the examples of the two classes {1, −1}. This is done by finding a solution to the optimization problem [52], [53].
subject to the condition where w is the normal to the hyperplane, and ξ i ≥ 0 are slack variables that measure the error in the misclassification of x i , C is the margin parameter that determines the tradeoff between the maximization of the margin and minimization of the classification error and b is the bias term. φ( x i ) is RBF kernel which is defined as: where γ is a parameter that controls the spread of the kernel [54]. The hyperparameters C and γ were set to 1.0 and 0.01, respectively. Finally, for the multi-class scenarios, SVMs were employed with one-versus-one strategy.

3) EVALUATION PROCEDURE AND METRICS
The detection of movement intention from EEG signals was investigated in three offline and two pseudo-online classification scenarios. The offline scenarios aimed to determine whether the EEG signals preceding movement can be used to discriminate between movement intention and relax. Thus, we studied the bi-class classification of Int ∈ {IntA, IntB} vs. Relax and IntA vs. IntB, and the three-class classification of IntA vs. IntB vs. Relax. This was carried out independently for each participant through a 10-fold cross-validation procedure. Power spectral based features were first computed and labeled accordingly. For each fold, feature selection and normalization were applied using training data exclusively and the classifiers were trained. Then, validation data was fed to the classifiers and the classification accuracy (or CA) and confusion matrix were computed. To assess the significance of the CA results, the whole procedure was repeated by shuffling the class labels during the training of the classifiers to compute the empirical random classification accuracy (or CA random ). The Wilcoxon rank-sum test at a significance level of α = 0.05 was applied to test significant differences between distributions of CA and CA random .
The pseudo-online scenarios aimed to assess the feasibility of continuous detection of motor information along a complete trial. Hence, we evaluated independently for each participant the time-resolved classification of Int vs. Relax and of IntA vs. IntB vs. Relax using a 10-fold cross-validation procedure at the trial level, i.e., the set of trials was randomly splitted into ten subsets and they were used to construct mutually exclusive sets of trials for training and testing. Filtering processes, feature extraction, selection and normalization, and classifier training were carried out using exclusively trials from the training set as in the offline classification scenarios.
Each trial in the testing set was segmented using a 1 s sliding window in 0.05 s steps. Subsequently, filtering processes, feature extraction, selection and normalization of each segment were applied such as in the offline classification scenarios.
Then, the trained classifier was applied to each test segment. Later, the time-resolved movement intention detection accuracy or DA(t) (rate of movement intention detected at time t) was computed. In the case of the IntA vs. IntB vs. Relax classification scenario, DA(t) is computed separately for the two movements (supination/pronation of the forearm and flexion/extension of the arm). The time-resolved chance level of detection accuracy or DA random (t) was computed empirically by randomly permuting the class labels during the training of the classifiers. Wilcoxon rank-sum test at a significance level of α = 0.05 was applied to test significant differences between the distributions of DA(t) and DA(t) random for each time instant. Finally, the following detection metrics were computed: (i) the time instant of movement intention onset or tMI defined as the lowest time instant prior to movement onset at which significant differences between DA(t) and DA(t) random are consistently obtained up to t = 0 s [39]; (ii) the percentage of trials where movement intention is detected prior to movement initiation, named as NT D (as there might be some test trials in which movement intention is detected after movement onset); (iii) average DA(t) in the non-movement time interval (−3, tMI ] s, named DA Nomov ; (iv) average DA(t) in the movement intention interval (tMI , 0] s, named DA Int ; (v) average DA(t) in the movement execution interval (0, 1] s, named DA Mov .

A. TRIAL REJECTION AND MOVEMENT ONSET TIME
The time instant of the movement initiation with respect to the presentation of the second visual cue was computed for all trials and participants using the digital signals from the Tee-R robot. The movement onset time was lower than 1 s in 2.06% of the trials and greater than 11 s in none of the trials. These trials were discarded. Then, trials identified by the artifact rejection process were also excluded and not considered in the rest of the study. The rate of rejection across-all-participants was 10.78 ± 5.61%. Table 2 shows a summary of the number of trials and the movement onset time for all participants and the average for all of them. The number of trials acrossall-participants was on average 98 ± 5 (minimum of 84 and maximum of 114) while the movement onset time for those trials was on average 4.99 ± 1.12s (minimum of 1.52 s and a maximum 9.98 s). Fig. 3 displays the across-all-participants significant eventrelated desynchronization/synchronization (ERDS) activity in electrodes located above the motor cortex in both hemispheres. Significant desynchronization (p < 0.05) is observed in all electrodes before and after the movement onset in the α [8,13] Hz and β [14,30] Hz motor-related frequency bands. This significant desynchronization exhibits several characteristics: (i) it starts prior to movement onset roughly at t ≈ −1 s and continues during movement execution (t ≥ 0 s); (ii) it is less prominent during movement intention (i.e., from t ≈ −1 to t = 0 s) than during movement execution (i.e., from t = 0 to t = 1 s); (iii) it is more prominent in the α than in the β frequency bands; (iv) it is more prominent in electrodes located on the left hemisphere (e.g., more power decrease is observed in C3 and C1 than in C2 and C4) which is congruent with the experimental task where the participant moved the right upper limb. Note also that no significant desynchronization or synchronization (p > 0.05) is observed before t ≈ −1 s and on other non motor-related frequency bands.

B. ERDS
To elucidate how the ERDS activity behaves along time, frequency, and scalp location, table 3 shows the average of significant ERDS activity for each consecutive 1s-long segments from −3 to 1 s. These results are presented for electrodes in the motor strip (C4, C2, Cz, C1, and C3) in the motor-related α and β frequency bands. In all electrodes and both frequency bands, the average of significant ERDS is scarce in the first segment [−3, −2) s (no more than ±4%), but in the subsequent segments it begins to decrease gradually reaching minimum values in the movement execution segment [0, 1) s (between −20% and −40%). For pre-movement segments (before t = 0) the ERDS minimum values are found in the [−10) s segment (between −13.23% and −26.13%. This indicates the existence of significant desynchronization during the segments of movement intention [−1, 0) s and movement execution [0, 1) s, but, it is more noticeable in movement execution than in movement intention. Note also that the significant desynchronization is stronger in electrodes located in the left motor cortex (i.e., contralateral) than in electrodes located in the VOLUME 8, 2020 FIGURE 3. Significant event-related desynchronization/synchronization (ERDS) activity computed across-all-participants in sensors located above the motor cortex. Abscissa represents time (from −3.1 to 1 s) while ordinate represents frequency (from 1 to 40 Hz). Dotted black vertical lines in all graphs represent the movement onset or t = 0 s. Significant desynchronization is presented in blue (i.e., negative percentage values), significant synchronization is presented in red (i.e., positive percentage values), and no significant desynchronization/synchronization is presented in green (i.e., zero percentage values). Significant desynchronization (p < 0.05) is observed in all sensors in the motor-related α [8,13] Hz and β [14,30] Hz frequency bands from t ≈ −1 s up to t = 1 s. right motor cortex (e.i., ipsilateral), for instance, the average of significant ERDS in the α and β frequency bands averaged across-all-segments is −16.15/ − 16.05%, and −18.47/ − 16.24% in electrodes C4 and C3, respectively. The significant desynchronization (i.e., power decrease) observed during the movement intention segment [−1, 0) s suggests the existence of oscillatory neural activity that might encode motor-related information associated to the execution of the self-selected and self-initiated movements of the limb. This might be associated with the activation of neural processes involved in movement preparation and planning [55], i.e., the movement intention phase that precedes movement execution. In addition, the differences between Relax and the other conditions are more noticeable in sensors located in the left motor cortex (C3, C1, CP1, CP3) than in sensors located in the right motor cortex (C2, C4, CP2, CP4) which is attributed to the contralateral control of limb movement [56] and they are consistent with the experimental task (right-side limb movements) and with the findings of the previous ERDS analysis. Note also that differences in the PSD values between IntA and IntB are observed in sensors FC3, FC1, FCZ, FC2, FC4 CP3 and CP1, principally around the α [8,13] Hz frequency band. Fig. 4b shows the results of the r-squared analysis for Int vs. Relax, IntA vs. IntB and IntA vs. IntB vs. Relax. In the three cases, the highest r-squared values are observed roughly around the α frequency band and to a lesser extent in the β frequency band. Regarding sensors, this r-squared analysis shows the highest discriminative power for Int vs. Relax in sensors located in the left motor cortex (e.g., C3, C1, CP3 and CP3), for IntA vs. IntB in sensors located in both hemispheres (e.g., C3, C1, C2 and C4), while for IntA vs. IntB vs Relax For the three cases, the highest discriminative power is observed roughly around the α frequency band and to a lesser extent in the β frequency band mainly in sensors located above the motor strip.

C. PSD ANALYSIS AND FEATURE EXTRACTION
in sensors located in the midline brain (e.g., FCz, Cz, CPz). This analysis indicates that selected PSD features are from motor-related frequency bands in sensor located above the motor strip. For the bi-class Int vs. Relax scenario, the true positive rate (i.e., movement intention correctly classified) was 75% while the false positive rate (i.e., relax instances incorrectly classified and movement intention) was 23%. For the bi-class IntA vs. IntB scenario, the classification rates for IntA and IntB were 69% and 68%, respectively, while the false negative rates for IntA and IntB were 31% and 32%, respectively. Finally, for the three-class IntA vs. IntB vs. Relax scenario, the confusion matrix indicates that the correct classification rate for IntA, IntB and Relax were 58%, 60% and 72% respectively, while the false negative rates were respectively 43%, 48% and 29%.

D. DETECTION OF MOVEMENT INTENTION
A summary of results for each participant and the average for all of them is presented in table 4. For the bi-class Int vs. Relax scenario, significant differences between the distributions of CA and CA random were found in 14 out of the 15 participants (only participant 1 presented a p-value greater than the confident level). In this case, participant 9 provided the higher average CA (86.2 ± 7.3%) while participant 2 provided the lower CA (66.5 ± 12.9%). In addition, the acrossall-participants average of CA (75.6 ± 6.8%) was 26.9% greater than the across-all-participants average of CA random (48.7 ± 2.8%). For the bi-class IntA vs. IntB scenario,  the significant differences between the distributions of CA and CA random were found in 12 out of the 15 participants (participants 4, 10 and 12 presented and pvalues greater than the confident level). Here, participant 3 showed the higher average CA (86.6 ± 11.3%), participant 4 provided the lower average CA (56.4 ± 15.8%), and the across-all-participants average of CA (68.3 ± 7.9%) was 20.2% greater than the across-all-participants average of CA random (48.1 ± 3.6%). Finally, the results of the three-class IntA vs. IntA vs. Relax scenario showed significant differences between the medians of the CA and CA random distributions in all of the participants. Participant 3 presented the higher CA (76.7 ± 7.5%), participant 11 presented the worst CA (54.1 ± 10.2%), and the across-all-participants average of CA (62.8 ± 6.0%) was 23.2% greater than the across-all-participants average of CA random (39.6 ± 2.9%). Altogether, the results of the offline classification scenarios indicate that power spectral features of EEG signals preceding execution of movement can be used to recognize between movement intention and relax and to recognize different movement intention of the same limb.   (Fig. 6a), DA(t) random stays flat around 50% for all time from −3.20 up to 1.00 s. DA(t), on the other hand, is initially similar to DA(t) random , then starts to rise gradually from around t = −1 s, and continues increasing as it gets closer to the movement onset at t = 0 s. Note that the minimum accuracy of 40.00% is observed at t = −3.00 s the movement intention onset or tMI is found at t = −0.62 s with an accuracy of 61.84% and the maximum accuracy of 77.02% is reached at t = 0.40 s. The summary of detection metrics results obtained is shown in table 5. On average, the percentage of trials where movement intention (NT D ) was detected before to movement onset was 74.07%, the detection accuracy in the non-movement time interval (DA nomov ) was 47.03%, the detection accuracy between tMI and movement onset time (DA int ) was 68.65%, and the detection accuracy during movement execution (DA mov ) was 73.38%. To sum up, no movement intention is detected from −3.20 s to tMI while movement intention is detected from tMI to the movement execution t = 1.00s.
For the three-class scenario IntA vs. IntB vs. Relax, DA(t) and DA(t) random are reported separately for the two movements executed in the experimental task ( Fig. 6b and c). In the two cases, the empirical time-resolved chance level of detection accuracy DA(t) random stays flat around 37%, while DA(t) starts below DA(t) random , and then starts to increase progressively reaching maximum accuracy after movement onset. For the supination/pronation of the forearm (Fig. 6b), the minimum accuracy of 27.47% is achieved at t = −3.10 s, tMI is reached at t = −0.40 s and the maximum accuracy of 64.34% is obtained at t = 0.40 s. For the flexion/extension of the arm (Fig. 6c), the minimum accuracy of 22.00% is accomplished at t = −3.00 s, tMI is obtained at t = −0.30 s, and the maximum accuracy of 67.10% is achieved at t = 0.80 s.
The summary of the detection metrics results for this case is shown in table 5. For NT D metric, the results were 64.83% and 67.35% for trials with movements of supination/pronation of the forearm and flexion/extension of the arm, respectively. For DA nomov , the results were 38.42% and 33.01%, DA int metric results were 58.53% and 59.63%, and finally, for DA mov metric the results were 60.42% and 62.81%, respectively.

IV. DISCUSSION
Conventional BCIs for motor rehabilitation employ information extracted from segments during motor imagery or movement execution to train and validate their classifier models [19]- [28]. However, MI shows some limitations for the development of optimal rehabilitation therapies. These limitations could be minimized through the use of EEG signals that precede the execution of the movement, which is known as movement intention. This work studied the anticipatory movement detection using EEG signals exclusively preceding movement onset for two self-selected and self-initiated movements of the right upper limb, which were executed with the aid of a robotic rehabilitation device. Anticipatory movement detection is essential for novel BCI-based rehabilitation therapies since it might provide patients with the ability to operate a robot-assisted rehabilitation device successfully, the benefit of enhanced motor function, and the opportunity to shorten the recovery period [4], [6], [7]. Despite there are relevant studies regarding the recognition of movement intention, most of them have considered movements produced by different body limb [33], [39] or they have not been conducted in a robot-assisted therapy scenario or the movements are not self-selected by the user [29]. In this study, a unique and novel experimental design was conducted in order to actively engage the participants in the execution of two rehabilitative movements of the right upper limb. This experimental design allowed users to take more control over the movement execution as expected in a neurorehabilitation therapy. These aspects are notably different compared to other studies and offer a potential advantage in the development of rehabilitation BCIs for continuous movement recognition.
The movement onset time for each participant and the average for all of them were computed (table 2) in order to check whether the movements were correctly executed in a self-selected and self-initiated manner by the participants. These results showed that participants did not perform the movements immediately after the appearance of the second visual cue. Therefore, they controlled the moment of movement initiation during the experiment. This is a relevant characteristic in the proposed experiment because the probability that the evoked response triggered by the visual stimulus would be interpreted as motor information is diminished and this control condition actively engages the participants in the execution of the experiments. The power spectral changes related to movement intention were examined with ERDS analysis (Fig. 4 and table 3). The ERDS analysis revealed significant power changes that initiated prior to the movement execution, which was considered as movement intention. This movement intention phase started roughly 800 ms prior to movement onset and was revealed as a significant desynchronization (p < 0.05) in all selected EEG channels located on or surrounding the motor cortex. Note that this was observed in frequency bands α [8,13]Hz and β [14,30] Hz which are related to well known motor-related sensorimotor EEG rhythms [1], [4], [37]. Additionally, this significant desynchronization was detected in both brain hemispheres, but the left hemisphere showed a significant desynchronization that was more prominent and started earlier than in the right hemisphere. To sum up, this significant desynchronization indicates the existence of neural correlates previous to movement onset associated with the motor task, which can be used as features to recognize movement intention.
Based on the results of the ERDS analysis, it was examined whether the PSD-based characteristics extracted from the EEG signals preceding the movement contain enough discriminative power that can be used to distinguish between the intentions of different movements and non-movement.
The results of the PSD feature extraction and selection analysis showed that there are highly power discrimination between Relax and Int classes and these features were obtained for frequency bands located on α [8,13] Hz and β [14,30] Hz which is consistent with the findings found in previous ERDS analysis and related studies [12], [15], [18]. For the IntA against IntB, the PSD features were calculated with lower power discrimination than Relax and Int classification scenario. This is consistent because the EEG activity of the two conditions are originated from the same spatial location in the brain. However, the PSD analysis between these conditions showed that there are differences that can be used to discriminate between both conditions. Finally, the PSD results for Relax and IntA and IntB showed that there are PSD features containing discriminatory power between the different conditions, allowing the possibility of recognition between the three conditions.
The offline classification scenarios results ( Fig. 5 and table 4) showed the feasibility to recognize the intention of movement in the studied movements from features extracted to pre-movement EEG signals above empirical chance levels. The average accuracy rates of the different classification scenarios (75%, 70%, and 61.90%) are in the range of previous MI-based BCI studies for bi-class and three-class scenarios [22]- [25]. Also, the confusion matrix showed that the trained classification models generated balanced results for the different classes. These results show that the classifiers were not highly biased towards any particular class. Additionally, this situation is empirically demonstrated with the accuracy results obtained in the classification models trained with shuffling technique.
Regarding the continuous detection of movement intention, significant time-resolved detection accuracy reported in this study demonstrated the feasibility of detecting specified movement intention before actual movement ( Fig. 6 and table 5). On average, for the different movements, DA starts to increase roughly 1000 ms before movement initiation. However, only detection accuracies become statistically significant (with DA rates of 52.91% to 61.84%) in the range (tMIs between 600 ms to 300 ms) before movement onset, and finally, DA reaches its maximum values during the movement execution. This is consistent with the results of the ERDS analysis. The averaged percentage range of trials where movement intention is detected before movement onset (NT D ) was 64.83% to 74.07%, which are congruent with those reported in previous MI-based BCIs studies [28], [29]. In the case of results for time instant of movement intention onset (tMI range of 600 ms to 300 ms) are above the mean of related studies results (between 222 ms to 57 ms) before movement execution [20], [25], [26], [29]. The results of this work showed that it is possible to detect motor information of different same-limb movements before their execution with statistical significance. Finally, these findings are interesting for the development of a BCI for motor neurorehabilitation that uses movement intention information to achieve early detection of upper limb movement and recognition of the type of movement in order to activate robot-assisted rehabilitation devices properly.
This study demonstrated that proposed models of anticipatory movement detection could be used in a BCIbased motor rehabilitation therapy. One of the advantages would be to reduce the inherent delay between the motor mental process carried out by the user and the output provided of the rehabilitation robot device. Another advantage would be the recognition of neural information strongly related to the rehabilitation movement improving the development of an intuitive and natural control of a motor neuroprosthesis or a robotic arm. These are primordial attributes of neurorehabilitation BCI systems that seek to recovery physical functions but also to reinforce the neuroplasticity process since the user will attain fast and natural brain control during the rehabilitation therapy. The next steps for this research are: i) an study with EEG source reconstruction techniques to explore potential distinguishable brain sources between the intentions of the different movements, ii) exploration of different relevant features based on time domain (as movement related cortical potentials and CSP) [22], [24], [26], [28]), iii) testing novel deep learning classifiers, and finally, iv) implementation an online BCI based on the recognition of movement intention which could control the rehabilitative robot device in real time.
LUIS GUILLERMO HERNÁNDEZ-ROJAS was graduated in biomedical engineering from the Universidad Autónoma de Occidente, Cali, Colombia, in 2012. He received the M.Sc. degree in automotive engineering from the Tecnoló gico de Monterrey, Mexico, in 2016, where he is currently pursuing the Ph.D. degree in engineering sciences. He has interest in the study of how the brain works and its interaction with the body and the world. He is focused on the interpretation of the brain-electrical activity acquired with the noninvasive electroencephalogram (EEG) technique in order to develop novel solutions for people with motor and communication disabilities. He also has knowledge in biosignal processing, data science, computational intelligence models, and development of biomedical applications. He aims to study the decoding motor activity from EEG signals, specifically the discrimination of the multiple movement intentions of the same upper limb to control neurorehabilitation systems based on BCI systems.
OMAR MENDOZA MONTOYA was born in Chihuahua, Mexico. He received the bachelor's degree in electronics from the Chihuahua Institute of Technology (ITCH), the master's degree in computer science from the Center for Research in Mathematics (CIMAT), Guanajuato, Mexico, and the Ph.D. degree in computer science from the Free University of Berlin, Germany. He is currently working as a Research Professor at the Tecnológico de Monterrey at Guadalajara. He is in charge of the development of new brain-controlled systems for medical applications. He has over ten years of experience in the development of new statistical methods and machine learning techniques for analyzing biomedical data. In his Ph.D. research project, he has developed an interface for decoding the electrical brain activity, which was used to control an electric wheelchair. The purpose of this system was to restore some mobility to people with severe neuromuscular disorders who cannot operate an electric wheelchair with joysticks or other peripherals. His main research interests include numerical analysis, optimization, statistical learning, signal processing, mathematical modeling, and neuroimaging. JAVIER M. ANTELIS was graduated in electronics engineering from the Francisco de Paula Santander University, Cúcuta, Colombia. He received the M.Sc. degree in electronic systems from the Tecnológico de Monterrey, Mexico, and the second M.Sc. and Ph.D. degrees in biomedical engineering from the University of Zaragoza, Spain. He is a member of the Robotics research Group, Tecnologico de Monterrey, and he leads the Neurotechnology and Brain-Computer Interface Research Lab (NTLab), where he has been involving in the field of quality of life technologies (QoL), brain-machine interfaces (BMI), bioelectrical signal processing, brain imaging, decoding of cognitive states from electrophysiological recordings, and instrumentation, data acquisition, and embedded systems. In his research, he aims to study and to understand the electrophysiological responses and the brain-electrical activity acquired with the noninvasive electroencephalogram (EEG) technique in order to develop novel solutions for people with reduced mobility and communication. Thus, he focuses on EEG-based brain-computer interfaces for movement recovery and rehabilitation. VOLUME 8, 2020