Influence of Temporal and Frequency Selective Patterns Combined with CSP Layers on Performance in Exoskeleton-Assisted Motor Imagery Tasks

: Common Spatial Pattern (CSP) has been recognized as a standard and powerful method for the identification of Electroencephalography (EEG)-based Motor Imagery (MI) tasks when implementing brain–computer interface (BCI) systems towards the motor rehabilitation of lost movements. The combination of BCI systems with robotic systems, such as upper limb exoskeletons, has proven to be a reliable tool for neuromotor rehabilitation. Therefore, in this study, the effects of temporal and frequency segmentation combined with layer increase for spatial filtering were evaluated, us-ing three variations of the CSP method for the identification of passive movement vs. MI+passive movement. The passive movements were generated using a left upper-limb exoskeleton to assist flexion/extension tasks at two speeds (high—85 rpm and low—30 rpm). Ten healthy subjects were evaluated in two recording sessions using Linear Discriminant Analysis (LDA) as a classifier, and accuracy (ACC) and False Positive Rate (FPR) as metrics. The results allow concluding that the use of temporal, frequency or spatial selective information does not significantly ( p < 0.05) improve task identification performance. Furthermore, dynamic temporal segmentation strategies may perform better than static segmentation tasks. The findings of this study are a starting point for the exploration of complex MI tasks and their application to neurorehabilitation, as well as the study of brain effects during exoskeleton-assisted MI tasks.


Introduction
Motor imagery (MI) is a cognitive process that consists in imagining the execution of a movement without presenting a voluntary muscle contraction [1][2][3][4].The physiological basis of MI is based on the relationship between the electrical activities of the human brain and the actions or states associated with being human [2].To date, two types of MI have mainly been discussed: kinesthetic (KMI) and visual (VMI).KMI involves the ability to imagine movements by feeling an impression of muscle contractions and sensation of the movement [1].KMI involves a sensory experience of movements, whereas VMI involves the ability to visualize and imagine movements without the need for sensations in the body.Both types of MI have been involved in intervention for the rehabilitation of people with severe motor limitations using BCIs [5].
Neurological diseases or events such as stroke and Spinal Cord Injury (SCI) are conditions that can generate limitations in mobility and motor functions [6,7].This is because the communication pathways between the brain and the peripheral nervous system are usually affected, interrupting the synaptic connections that allow the generation of movement or sensory response [8].Robotic devices emerge as an alternative for the rehabilitation or assistance of these people because mechatronic structures, such as exoskeletons, can support the subject during the performance of tasks, improving independence and quality of life [1,6].Additionally, these devices, with the repeated and passive execution of movements, can help in the neural retraining of patients with neuromotor impairments [9].For instance, Pilla et al. [9] designed an upper limb exoskeleton to perform elbow flexion/extension during a continuous protocol in different sessions for the treatment of spasticity in disabled people.Here, the device not only targets therapeutic interventions but is also equipped to carry out biomechanical monitoring of the individual parameters receiving this treatment, highlighting the capabilities of arm exoskeletons for rehabilitation.
Recently, studies reported that MI training may modulate the effects on neuroplasticity and spinal pre-synaptic inhibition, which could benefit people with neuromotor impairments.Moreover, MI-based BCIs have been widely implemented in the motor rehabilitation of upper limb movements, which widely use computational methods in the discrimination of MI tasks from EEG signals.For instance, Padfield et al. in their review discussed the current advantages of EEG-based BCIs to replace functions of the Central Nervous System (CNS), using end-effectors such as robotic devices, prostheses, or virtual reality (VR) therapeutic systems [1].In this context, active exoskeletons have been the most explored device with MI-based BCI applications because these frameworks can detect a motor intention of the subject and convert this task into a control command, allowing for an assisted movement [1].For example, different exoskeletons have been used to control finger extension/flexion after detecting upper limb MI from EEG [10,11].Alternative systems have served as end-effectors to produce movements of flexion/extension in the upper limbs [12].In contrast, upper joint movements such as the shoulder, elbow, and wrist have also been addressed using EEG signals [13][14][15].However, challenges in the recognition of mental tasks have been reported because physiological and/or non-physiological artifacts may alter EEG signals [16,17].Therefore, the implementation of effective computational decoders is still a matter of discussion.
Common Spatial Pattern (CSP) is a powerful technique for MI task discrimination that was first introduced in 1990 to extract special features from EEG signals [18].CSP aims to find a linear combination of signals so that the variance of one class is maximized while the variance of the other class is minimized [19,20].Usually, in CSP-based BCIs, after finding spatial patterns highly correlated to a condition, these features are used to train Machine Learning (ML)-based methods to classify MI patterns.For instance, Triana et al. [21] implemented a real-time MI-based BCI system for the identification of sitting and standing tasks using CSP in the feature extraction stage.Rithwik et al. [22] proposed a CSP-based method to decode left and right bidirectional hand movements, highlighting that MI signal processing-based approaches have great potential for incorporation into motor rehabilitation sessions.Cantillo-Negrete et al. designed a CSP-based BCI system to (de)activate a robotic hand orthosis, which was used in the intervention of patients with chronic stroke and healthy subjects [23].
Despite the versatility and effectiveness of the CSP, different variations of this method have been reported in the literature to improve the performance in the identification of MI tasks [24].For example, Yu et al. [25] implemented a variation called deep CSP to improve MI classification, in which several layers of CSP are implemented to obtain more selective and objective features of MI signals.Ang et al. [19,24] proposed the Filter Bank CSP (FBCSP) configuration to discriminate MI tasks by segmenting the signal into multiple filters before the application of the CSP layer, using a selection criterion based on mutual information.Blanco-Diaz et al. performed a comparative study of spectral and temporal combinations using CSP and FBCSP in the feature extraction stage in two public databases [26].Finally, variations of CSP, such as unsupervised extraction [27], wavelet CSP [28], or regularized CSP [29], have also been presented with promising outcomes.
Although CSP has been reported as a gold standard technique for classifying upper limb MI tasks [13], its default setting is binary classification, which can limit the degrees of neuromotor classification [30,31].
Other efforts have focused on improving the accuracy of computational methods to recognize mental tasks.For instance, Guerrero et al. [32] performed a comparative study between methods based on CSP and Deep Learning (DL) to discriminate hand MI tasks, evaluating performance with different time windows and filter banks.DL achieved better performance than CSP but with additional computational cost.Similarly, Alazrai et al. implemented a DL framework to classify MI tasks on the same hand, achieving interesting results compared to standard approaches [33].Dong et al. [31] implemented CSP in a configuration of one vs.one to classify multiple MI tasks, such as movement of the right and left upper limbs, foot, and tongue.However, approaches to multiple tasks during flexion/extension arm MI have been little explored.
The use of robotic devices during MI has become an emerging tool for stimulating sensory afferents, improving mechanisms in the cortical control of sensory function [34].This is associated with two advantages for neurological restoration in people with neuromotor impairments.The first is that the use of haptic-kinesthetic feedback during MI protocols can improve the performance of BCIs task identification algorithms [34,35].The second is that the use of sensory feedback during MI can re-activate pathways associated with the mechanoreceptors of limbs that have been affected after neurological trauma.This is associated with neural biomarkers [34], which have gained recognition because this information may be used as neurofeedback that can play an important role in induction of neuroplasticity and improvement of proprioception [36,37].The exploration of cortical behaviors has been presented using hand orthosis [36], arm exoskeletons [34], and robotic gloves [35,37].However, these works have been focused on binary conditions, such as rest and motion classification, whose limitations are explained above.
Considering that CSP is based on the spatial filtering of EEG signals, the application of several layers combined with spectral or temporal selection could be counterproductive due to loss of information.Furthermore, the authors hypothesized that cortical rhythms may have a recognizable pattern in EEG signals during different states for a similar task, for example, using robotic devices at different speeds during KMI.Therefore, in this study, the performance of three CSP-based methods was evaluated to identify the MI of upper limb extension/flexion during passive movement from an exoskeleton at two speeds.Specifically, EEG patterns related to passive movement vs. MI+passive movement in flexion/extension tasks of the left upper limb were identified.It is worth mentioning that it is still relevant in the literature to study the effects related to the application of specific methods, such as CSP.This pattern classification could facilitate understanding of brain behavior during different tasks with the same limb, which may lead to the development of more personalized neurorehabilitation systems.

CSP-Based Methods
This section presents the CSP configurations used in this study: CSP, FBCSP, and Filter Bank Common Spectral Spatial Patterns (FBCSSP).For more information on each of the methods, please refer to our previous works [26,32].A graphical representation of each of the CSP variations is shown in Figure 1.

Classic CSP
CSP is classified as a supervised technique used to identify between different classes (usually two classes).Thus, a class label was required to identify the weight matrices during pattern generation [25].The principle of this technique is the implementation of a spatial filter, whose main function can be elucidated through the subsequent equation: where the matrix W ∈ R p×C encompasses the weights allocated for spatial filtering, whereas Y ∈ R t×P denotes the resultant EEG data post-application of the weighted matrix.The symbol Y ∈ R t×C denotes the filtered EEG signal, t represents the number of samples over time, and C is the EEG channels used.Note that P corresponds to the number of spatial patterns involved.
On the other hand, the calculation of the matrix W is performed by W = P T A, where P is a relationship between a set of eigenvectors and a diagonal matrix of eigenvalues, and A is a set of associated eigenvectors [25].Finally, the features extracted using the CSP method correspond to the logarithm of variance from the matrix Y, which are subsequently used to identify MI patterns, usually in binary classification.In this study, three patterns were used to calculate the weight matrix, obtaining six CSPs (one per class).

Selective Frequency CSP
Spectral feature segmentation was performed using a filter bank prior to application of the CSP layer (FBCSP).EEG signals were segmented into several frequency bands of interest, mainly around the Mu (µ, 8-12 Hz) and Beta (β, 14-30 Hz) bands, and subsequently a CSP layer was applied in each of the frequency sub-bands.Several authors have reported the use of a mutual information-based feature selection stage, which was implemented in this study to obtain more selective features from EEG signals [19].In addition, previous works have demonstrated that filter banks of 8-15 Hz, 15 -22 Hz, and 22-30 Hz show adequate accuracy rates for binary classification [26,32].Note that this method uses spectral filtering (using the filter bank) and spatial filtering through the CSP layer, which is implemented following the same configuration presented in the previous section.

Combined CSP Layers with Selective Frequency
The variation implemented to increase the number of CSP layers uses a filter bank, previously extracted using FBCSP, and applies an additional CSP layer that combines each of the sub-CSPs calculated for each filter bank [32,38].This method is called FBCSSP, see Figure 1.Note that in this variation, two CSP layers are implemented using the same configurations as presented in the previous sections.A description of each layer is presented below.

•
Layer 1: This layer enables the extraction of the CSP from filtered signals after employing the filter bank.Its importance stems from its capability to emphasize differences in variances between classes for particular frequency-selective patterns [38].• Layer 2: CSP is used to generate more selective features associated with the spatial and spectral domains.These parameters are computed by linearly projecting the weights with the output of each CSP in layer 1.

Experimental Protocol 2.2.1. Participant
Ten healthy individuals participated in this study (six male and four female), ranging in age from 21 to 48 years (29 ± 9), and without any neurological, psychological or other health conditions reported.The statistical power of the sample size was estimated using G*power software to suggest whether the results of the performance metrics can be compared with the literature [39,40].Wilcoxon signed rank was used with a value of α = 0.05, an effect size of d = 2.13, and a sample size of n = 10.The results of this test yielded a statistical power of 0.9, which is within the ranges reported in previous studies [40].
Ethics Committee: All volunteers provided their consent voluntarily and confirmed their agreement through an informed consent process, in accordance with the principles outlined in the Declaration of Helsinki.The research protocol was approved by the Ethics Committee of the Federal University of Espírito Santo (UFES) and registered under the protocol number CAAE:39410614.6.0000.5060.

EEG Collection
The EEG data were collected using a total of 16 electrodes placed on the scalps of participants according to the 10-20 international system.The recorded EEG channels were FP1, FP2, F3, F4, FC3, FCz, FC4, C5, C3, C1, C2, C4, C6, CP3, CPz and CP4, sampled at a rate of 125 Hz, with references A1 and A2 placed in the earlobes as shown in Figure 2. To acquire EEG signals and monitor impedance, the OpenBCI Cyton + Daisy device was used along with its Graphic User Interface (GUI), ensuring that the impedance of the channels with the scalp remained below 20 kΩ.The selection of these specific channels was established by prior research, which emphasized their relevance within sensorimotor regions to discriminate tasks related to MI of upper limb movements [26].

Procedures
During procedures, MI is related to flexion/extension movements of the upper limbs (specifically, the arm and elbow) while using an exoskeleton.More information about the exoskeleton can be found in [41,42].Figure 3 illustrates the setup of the acquisition environment and the instrumented exoskeleton on the subjects.For data recording, the protocol, comprising the following procedural steps, was executed in sequence as follows: • Passive movement (baseline): The exoskeleton initiates passive movements at a minimal speed, set at 30 rotations per minute (rpm).During this phase, lasting 120 s, the subject performs passive flexion/extension tasks facilitated by the exoskeleton.

•
Beep: A beep is used to signal the beginning of each trial, lasting 1.25 s.Its purpose is to inform the subject about the beginning of a new repetition cycle.

•
No-action: During the no-action period, which spans from 2 to 3 s, the subject remains in a state of relaxation and rest, with no specific task or action required.

•
MI+passive movement: MI plus passive movement are incorporated, with variations in two speeds-30 and 85 rpm over a duration of 10 s.In this phase, the subject is instructed to mentally simulate (MI) the performance of flexion/extension movements while simultaneously receiving passive movements from the exoskeleton.
The recordings were conducted in a noise-isolated environment, with only the subject and a researcher present.Note that visual cues were not provided through a screen.Instead, instructions were transmitted through both auditory cues (beep) and the sensation of movement generated by the exoskeleton.The protocol for each subject included 30 trials, spanning from the initial beep to the MI+passive movement phase.Within these trials, 15 were performed at a minimum speed (30 rpm), followed by subsequent 15 repetitions at a higher speed (85 rpm), resulting in a total of 30 trials.The speed variation between trials was randomized to avoid predictability.Each subject underwent the protocol twice, constituting two sessions with a 5-min interval between them.The sequential order of the protocol is shown in Figure 4.Note that spatial filters, such as Common Average Reference (CAR), were not implemented in the preprocessing stage in order to avoid combining undesirable spatial filters.After filtering and segmenting the signals, the CSP methods described above were implemented.

Evaluation
To classify the features associated to each task using the CSP methods, Linear Discriminant Analysis (LDA) was implemented.This classifier was used due to its low computational cost and the fact that LDA has been classified as a standard ML method to identify MI patterns [43].As aforementioned, the objective of this study is to identify passive movement tasks (baseline) vs. MI+passive movement at each of the exoskeleton speeds: low (30 rpm) and high (85 rpm).
The k-fold cross-trial validation was implemented as a validation method using five folds, segmenting the data into 80% trials for training and 20% for testing.The performance metrics used were accuracy (ACC) and False Positive Rate (FPR); see Equation (2).These metrics were calculated using the confusion matrix for binary discrimination, where TP corresponds to true positives, TN to true negatives, FP to false positives, and FN to false negatives: Additionally, a statistical significance analysis was performed to determine the effects on performance in the use of temporal and frequency segmentation together with the application of CSP layers.For this, the performance data of all subjects were evaluated using Shapiro-Wilk and Levene tests to observe the type of distribution and homogeneity of variances.Considering that the data presented a high probability of belonging to a normal distribution with homogeneous variances, the two-sample t-test with a significance threshold of 0.05 was applied.The alternative hypothesis is that the CSP method presented better performance metrics in ACC and FPR than the FBCSP and FBCSSP variants.Finally, the null hypothesis is the opposite.

Results
The performance in the identification of passive movement vs. MI+passive movement in the left upper limb flexion/extension tasks using the robotic exoskeleton at two different speeds is presented in Figure 5.The results are shown in a joint representation using a boxplot and semi-violinplot, which allow observing the distribution and density of the data to obtain the variability and concentration in certain areas of the distribution region.The results are presented for the three CSP variations implemented (classical CSP, FBCSP, and FBCSSP), for the two types of temporal segmentation, and for the two recording sessions.The results for each speed are shown for each metric, where ACC high (high speed) is shown in green, ACC low (low speed) in red, FPR high in purple, and FPR low in yellow, respectively.
The behavior of the results reveals that the use of temporal and frequency segmentation, as well as the application of CSP layers, degrades the performance in the identification of passive movement vs. MI+passive movement.This behavior is more noticeable in the static temporal segmentation represented by TW3.Regarding the distribution of the metrics data, it is possible to observe that in most of them, there is a homogeneous density.
In order to evaluate whether the effects on performance are significant, i.e., whether frequency segmentation together with the application of CSP layers degrades the performance in task identification, the differences (significant or non-significant) in the performance comparison between the methods are presented in Tables 1 and 2. From these, it is possible to observe that there are significant differences between the CSP and FBCSSP methods for TW0 and TW3 window segmentation.Furthermore, for TW3, the CSP and FBCSP methods also presented significant differences.In contrast, for session 2, CSP and FBC-SSP presented significant differences in performance; however, these differences were only presented for the temporal segmentation TW0.For the other comparisons between methods, the differences were not significant.These effects were for the two performance metrics, ACC and FPR.These results allow determining that the FBCSSP method presents significantly lower performance than the CSP for the identification of passive movement vs. MI+passive movement.Table 1.Significant differences between CSP variations for Session 1.

Discussion
This paper presents the effects of performance on passive movement vs. MI+passive movement identification, employing three variations of the CSP method based on temporal and frequency segmentation, and CSP layer augmentation.Passive movements were generated using an upper limb exoskeleton that performs left arm flexion/extension tasks at two different speeds.The results of this study allow determining that the use of selective information in time, frequency, or space does not significantly improve the performance in the identification tasks evaluated using CSP variations.This result is in agreement with the literature.For instance, Ùbeda et al. implemented a linear decoder to estimate hand movements during passive motion, where low-performance metrics were found, suggesting that further exploration related to the frequency band is required [44].
In our previous studies related to temporal and frequency evaluation and CSP layer enhancement, we determined time windows and specific filter banks to find EEG patterns that allow to differentiate MI tasks with greater accuracy [26,32,38].For instance, in [26], these methods were compared to decode MI of the right and left hands in two databases, finding significant differences when varying the length of the time window and the filter bank configurations.In [32], CSP-based methods were compared with artificial neural networks, where we found accuracy improvements using these DL techniques but with a higher computational cost.It should be noted that in these previous studies were based on left-and right-hand classification, which diverge from those presented during this study.In another approach reported in [38], CSP techniques were evaluated during the execution of lower limb movements, such as classification between pedaling and non-pedaling tasks from EEG signals.
To the best of our knowledge, this is the first time that an analysis with EEG signals during KMI and an arm exoskeleton at different speeds that performs flexion/extension tasks is implemented.However, previous studies have reported findings during similar experiments.For instance, Barios et al. performed an analysis of cortical rhythms during the use of a BCI with haptic, visual, and auditory feedback [34].Haptic feedback was delivered by an arm exoskeleton, where the results suggest that phase synchronization of cortical rhythms can identify the identification of temporal edges in MI.However, the passive movement was configured with constant velocity and time execution of 1-2 s.Gonzalez-Cely et al. performed a preliminary study that demonstrated that the passive motion of a robotic glove may improve the performance of ML techniques to classify open/close-hand MI tasks [35].This proposal also used constant velocity during the protocol, which may limit the scope.Guggenberg et al. implemented a strategy to classify KMI from EEG signals in a protocol that employed a robotic hand orthosis and a functional electrical stimulator [36].This approach reached an accuracy rate above 0.6 using information from the Beta (β) band.Ono et al. [37] experimented with neurofeedback training, using a robotic hand and action observation during several sessions on different days.It was observed that events related to desynchronization increased after training, suggesting that the use of robotic devices and proprioception stimulation may improve the behavior of cortical rhythms.However, the experiment was performed with constant movement visualization.Cantillo-Negrete et al. [23] implemented a BCI based on a hand orthosis that was commanded by MI detection with CSP, allowing for activation and deactivation (binary classification).Improvements in accuracy were reached after different sessions by post-stroke patients, which highlights the potential of these systems for clinical trials.
Other works have demonstrated the behavior of cortical rhythms during the measurement of EEG signals and the use of upper limb robotic devices.For instance, the systems reported in [10,11] suggested the feasibility of BCIs to control finger movements in neurorehabilitation strategies.Moreover, other robotics-based BCIs were designed with the objective of rehabilitating spasticity over joints, such as the wrist, elbow, or shoulder [14,15].The tasks evaluated in the aforementioned works are based on left-and right-hand MI classification, rest and MI classification, or movement and rest classification from EEG signals, i.e., binary classification of states.Therefore, other efforts have concentrated on the classification of multiple tasks.For example, Dong et al., implemented CSP-based methods in a configuration of one vs.one to classify left-and right-hand, tongue, and foot MI [31].Nevertheless, they involved different tasks on the limb, which would make classifying the EEG signal easier.Meanwhile, Alazrai et al. used neural networks to classify MI tasks from the same limb, highlighting that this approach may be more challenging due to cortical behaviors [33].However, this approach does not employ passive movements from a robotic exoskeleton.
In this context, we hypothesized that the use of a robotic arm exoskeleton at different speeds could enhance cortical rhythms which could facilitate the classification of upper limb KMI tasks.An adequate classification score and False Positive Rate were found, considering the literature reports [31][32][33]36].Considering the working principle of CSPbased methods [19], our results suggest that information in the time domain cannot be fully discriminatory when the KMI is under different conditions, which is a limitation for spatial filtering methods.Further analysis in the frequency domain may complement or contradict this statement in the future.
On the other hand, it seems that the CSP method without the use of a filter bank had better performance metrics compared to FBCSP and FBCSSP.This reported effect may be due to several factors.The most supported one in the literature is that passive assistance during EEG protocols is still a matter of discussion in the neuroscience field, as some authors report adequate performance metrics using slow cortical rhythms (delta band < 4 Hz) for detection [44], while others mention only the Beta band in their BCIs [36].For this reason, the selection of an appropriate filter bank is not trivial.In previous studies [26,32,38], our findings with FBCSSP were better than those with conventional CSP using the 3-filter configuration of 8-15 Hz, 15-22 Hz, and 22-30 Hz, which was our motivation.However, it was possible to observe that further analysis with different configurations is necessary to improve the performance metrics of the classifiers.
In addition, it was superficially observed that the effects (positive or negative) on performance depend on the type of tasks to be identified and the type of protocol implemented.For example, this type of effect also depends on the recording equipment, the impedance and type of electrodes, the emotional conditions of the subjects, and the methods evaluated, among other considerations [17,45].Furthermore, the type of ML method used for task recognition may influence the classification tasks.Thus, it is recommended to explore and compare the performance along with more complex methods such as Support Vector Machine (SVM) or Extreme Learning Machine (ELM).Furthermore, another main factor may be due to the type of task evaluated, which may be associated with a complete task that requires more concentration and experience to generate discriminative patterns [46].Therefore, being a complex task, temporal and frequency segmentation may degrade associated patterns and decrease performance.Also, the application of double spatial filtering (CPS layers), which selects better distributed spatial patterns, may be counterproductive for the recognition and filtering of task-relevant information for discrimination.Finally, another cause of low performance in the FBCSP and FBCSSP methods is due to the implementation of feature selection based on mutual information, which, in principle, would select more specific patterns; however, this may cause a negative effect considering the loss of information when selecting features.
Interventions with repetitive flexion/extension movements of the upper limbs using exoskeletons have been proposed not only for the treatment of joint spasticity but also as a tool for monitoring information related to the evolution of patients with neurological impairments [9].In this context, our results allowed determining a surface difference between low and high speeds generated by the passive movement of the exoskeleton, which has not been previously reported.This is a starting point to further explore the effect of kinesthetic velocities on cortical rhythms during the execution of MI tasks.We consider that our method can be extended to the design of more robust BCIs that allow for more personalized rehabilitation, i.e., a human-robot interface that allows repetitive cycling at different speeds using intention by MI.This is not only for neurorehabilitation purposes but can also be used as a methodology to follow the neural evolution of patients [9].However, instrumental monitoring with EEG signals requires further evidence.
Eventually, the exploration of cortical rhythms is still under study under different conditions.Our results allowed determining differences in classifier performance during passive movement tasks.Different performance metrics were found with respect to each condition, suggesting that the cortical patterns between speeds may differ, although minimally.For this reason, different and more complex approaches are suggested.
The CSP-based techniques were able to discriminate the different tasks with an accuracy rate above chance, showing that our technique is feasible for binary classification and can be extended in a multiclass version.These results mark a starting point for explorations of upper limb EEG signals using robotic assistance under different conditions, which has the potential to be implemented in the construction of neurofeedback biomarkers or sensory feedback in BCIs for neurorehabilitation.
Finally, this study had some limitations.On the one hand, the sample size used in this study could limit the general effects of the methods' performance, limiting also the comparison of other physiological factors, such as sex, age, and mental conditions.On the other hand, other ML-based methods, which could present a more robust classification performance in temporal, frequency, and layered CSP segmentation, were not employed in this study.

Conclusions
This study concludes that the use of temporal and frequency selective segmentation, together with a layer increase for spatial filtering evaluated in three variations of the CSP method (classical CSP, FBCSP, and FBCSSP), does not significantly improve performance in the identification of passive movement vs. MI+passive movement in assisting left arm flexion/extension tasks by using a left upper limb exoskeleton.However, differences between classifier performance during KMI at different speeds of the robotic device were found, suggesting that the cortical patterns between speeds may be different but in a very minimal way.It was also verified that dynamic temporal segmentation (considering the whole signal time) presented higher robustness compared to static temporal segmentation (in a given period of time).
Future studies will focus on evaluating these types of complex tasks in different temporal, frequency, and spatial-filtering strategies, as well as recognition methods to find more discriminative patterns to direct research towards BCIs for neuromotor rehabilitation based on complex tasks.

Figure 1 .
Figure 1.Block diagram of the CSP-based methods (CSP, FBCSP, and FBCSSP) implemented in this study.

Figure 2 .
Figure 2. EEG locations used in this study considering 10-20 international system.

Figure 3 .
Figure 3. Experimental setup for data collection using the robotic exoskeleton.

Figure 4 .
Figure 4. Protocol sequence followed by the subjects for task collection (passive movement and MI+passive movement).

2. 3 .
Signal Pre-Processing and Evaluation 2.3.1.EEG Signal Pre-Processing EEG signals were filtered using a 5th order zero-phase Butterworth filter in the frequency band from 8 to 30 Hz to obtain spectral information in the Mu (µ) and Beta (β) bands.Subsequently, the signals were segmented temporally, implementing two strategies, one continuous (dynamic) and one static.The continuous one (TW0) corresponded to segmenting the signals in time windows of 1 s overlapped at 50%, while the static one (TW3) corresponded to selecting a specific time range, in this case, from 1 to 6 s.This allows to evaluate the temporal behavior in the identification of MI patterns.

Figure 5 .
Figure 5. Performance in the identification of passive movement vs. MI+passive movement in the three CSP variations to determine the effects of temporal and frequency segmentation, and the application of CSP layers.(a) Session 1-TW0; (b) Session 1-TW3; (c) Session 2-TW0; (d) Session 2-TW3.