A Combined Projection for Remote Control of a Vehicle Based on Movement Imagination: A Single Trial Brain Computer Interface Study

Disabled patients using brain computer interface (BCI) applications have a more convenient life. The present study implements an electroencephalogram (EEG)-based signal processing algorithm for controlling a wireless mobile vehicle through imagination. The aim is to improve the filtered common spatial pattern (CSP) algorithm for BCI applications. The proposed method is a combination of the CSP projection with a Modified Secondary Projection of the filtered Common Spatial Pattern (MSPCSP). With this algorithm, distinctive differential features are obtained from the combination of the MSPCSP and CSP projection eigenvalues to identify four classes: moving-forward-for-pause, stop-for-pause, moving-forward-continuously, and stopped-continuously. The second contribution is the design of a task to produce clear imaginary movement patterns. The task is a combination of brain stimulation by viewing red and yellow sketches of the right hand that indicate opening the hand and making a fist. Eighteen subjects participated in the experiment for wireless control of a mobile vehicle in offline and real-time modes. The results were then evaluated through an accuracy and paired t-test statistical analysis for offline and real-time signal processing. The results based on the MSPCSP projection showed significant improvements in accuracy in comparison with the CSP projection: 82.16± 9.04% with $p < 0.05$ and 70.83± 8.27% for offline and real-time processing, respectively. In addition, the MSPCSP projection attained higher accuracies of 14.72% and 13.33% for offline and real-time processing, respectively. It was concluded that the MSPCSP projection generates more discriminant differential features than the filtered CSP projection. Further, the MSPCSP projection with the thresholds extend the limitation of CSP-based methods from two- to four-class identification.


I. INTRODUCTION
Control of assistant robots for paralyzed patients is a part of brain computer interface (BCI) studies. One method used to identify human imaginary movements for robot control is automatically identifying the event-related desynchronization (ERD) patterns in EEG signals [1]. ERDs are patterns that appear in an EEG signal when a subject intends to move, causing a decrease in the rhythmic activity within the localized amplitude; in addition, the time, intention, and subject's action synchronized through event related synchronization (ERS) appear, causing an increase in the rhythmic activity within the localized amplitude [2], [3]. The same The associate editor coordinating the review of this manuscript and approving it for publication was Gang Wang . ERD patterns with some amplitude alterations are also observable when the subject intend to move in their imagination [4]. Different algorithms have been developed to detect evoked related potentials [5] and the imaginary movement features based on ERD patterns, such as a common spatial pattern (CSP) [6], wavelet [7], and chaos theory [8], [9]. The present study focuses on enhancing the CSP method for controlling wireless mobile vehicles. In definition, the CSP is a transformation function with the property of perpendicular data projection for two classes. As the first CSP-based constraint, CSP-based methods are highly affected by noise, and several methods have been developed to reduce the effects of such noise, including a common sparse spectral spatial pattern (CSSSP) [10], filter bank CSP (FBCSP) [6], FBCSP with an adaptive system [11], sliding window discriminative CSP (SWDCSP) [12], and FBCSP with kernel linear discriminant analysis (LDA) [13]. As the second CSP constraint, CSP-based methods are limited to two classes of identification, of which several studies have been published to overcome the limitation of controlling multiclass CSP motor imagery (MI) applications [14].
In a key series of initial studies, Ang et al. [6] developed an FBCSP projection that includes a combination of a filter bank and CSP with a mutual information feature selection algorithm. During the procedure, several feature selection functions are applied, of which the ''mutual information based best individual'' method is known as the best feature selection approach. Features are then classified using different classifiers, of which the Naïve Bayes Parzen Window method has achieved the best results. Next, Ang et al. [15] integrated a method obtained in a previous study [6], using online adaptive learning with a semi-supervised learning algorithm to improve the accuracy results, which was effective.
In the next level of studies, novel algorithms have recently been published for enhancing the precision of the CSP algorithm in the MI applications. For example, Hekmatmanesh et al. [9], [13] combined the FBCSP projection with a discriminative sensitive learning vector quantization algorithm to weigh the CSP coefficients, and features were then selected using the KPCA/KLDA feature selection algorithms. The features obtained were then classified using the K-nearest neighbor (K-NN), neural network, and a support vector machine (SVM) with different kernels, and the best results were obtained by the SVM with the generalized radial basis function (GRBF) kernel.
In a series of studies, Zhang et al. [16] developed an algorithm for optimizing the utilized filter bands and signal segmentation ranges of the CSP algorithm, which is called the temporally constrained sparse group spatial pattern. With this algorithm, the EEG signal is first filtered using a band-pass filter, and the spectrum of the EEG signal is then computed. Next, several sub-series are extracted from the signal spectrum, and then a joint sparse optimization algorithm with a temporal smoothness procedure is applied to optimize the CSP features. Finally, the optimized features are classified using an SVM classifier that increases the results slightly. Next, Wang et al. [17] enhanced the CSP projection coefficients for MI applications using a regularization algorithm developed for solving a generalized eigenvalue problem. The principal of the modified CSP is to obtain the optimum generalized eigenvalue by solving a minimization problem. The proposed method for the minimization problem is a singular value decomposition with the least squares algorithm. The regularized CSP results showed a significant increase in CSP efficiency.
In the next step, Guo et al. [18] developed an enhanced CSP method called component regularized CSP (RCSP). With this algorithm, the EEG signal is decomposed into components using a wavelet packet technique. The key RCSP features obtained using the regularization of the covariance matrices in the CSP algorithm and the best features were then selected using the minimal redundancy maximal relevance procedure. The features were then classified using the LDA algorithm, and the results increased significantly in comparison with the traditional methods.
Despite the above-mentioned CSP constraints, the CSP algorithm was developed for two-class identification. Several algorithms have been implemented to extend the two-class CSP to multi-class identification [19], [20]. Through basic attempts, a two-class CSP was extended to a three-class CSP using a one-versus-rest classification technique [11]. Next, Grosse-Wentrup et al. [21] used the joint approximate diagonalization (JAD) method to compute independent component features, and maximum mutual information values were then obtained and classified using a logistic regression algorithm.
Recently, Meisheri et al. [22] extended Grosse-Wentrup's method [21] using the Self-Regulated Interval Type-2 Neuro-Fuzzy Inference system approach, which was not successful. Therefore, Jafarifarmand et al. [23] improved the previous method [22] for multiclass CSP identification using an adaptive theory concept for real-time MI applications. With this algorithm, the JAD feature extraction is fused with a self-regulated supervised Gaussian fuzzy adaptive system, Art, as a multi-classifier that achieves a higher accuracy. In another recent study, Chacon et al. [24] developed a novel feature using the CSP principal that enables a classifier to diagnose different states of mind. In the algorithm, spectrum images of the ERD patterns related to the three types of imaginary movements were plotted in red-blue-green mode. The correlation features between states were then computed and classified using the SVM classifier, and the results showed significant improvements. In our last survey, a comprehensive review on the Brain controlled vehicles and aerial vehicles for more details is available in [25], [26]. Also, employed methods and sensors for identifying patterns is considered in [27]. In another study, Holm et al. [28] designed two algorithms based on the traditional deep learning with the convolutions and FBCSP. Methods applied on the he BCI competition IV dataset and accuracy results showed that the proposed improved FBCSP has more accurate results, but the presented results are not suitable for real-time experiments.
The CSP algorithm has been improved in different studies, for example, Jin et al. [29] improved the CSP algorithm using a fusion algorithm with respect to the Dempster-Shafer theory. The algorithm is applied to optimized the CSP features that affects the distribution of the features. This study compared different improved CSP method with the proposed fusion method, named traditional CSP, Lasso-CSP, FCSP, and DRL1-CSP. Results showed that the CSP features distribution based on the fusion caused the best accuracy results. In another study, et al. [30] improved the CSP using a regularization method. In the algorithm the EEG channels are first selected using a correlation-based channel selection method. The classified results based on the SVM with the RBF kernel obtained more accurate result.
In another recent study, Lee et al. [31] implemented the CSP method with the LDA algorithm to control a drone swarm. In the approach, the main contribution was using three different stimulator's task for brain for generating more distinctive patterns (features) includes: speech imagery, visual imagery and motor imagery. The LDA is a binary classifier which is used for four classes identification, that the accuracy results showed this could be the cause of high error rate. Batres et al. [32] developed a method based on the improved Quaternion-based Signal Analysis algorithm for feature extraction and controlling a hexapod robot. In the algorithm, four EEG signals are employed and significant results obtained for offline and real-time classification.
In the present study, our contribution is to implement a weighting projection based on the CSP principals for imaginary pattern recognition, called the modified secondary projection of the filtered common spatial pattern (MSPCSP). The second contribution is computing four discriminating thresholds based on the MSPCSP coefficients to identify four mind states for controlling a wireless mobile vehicle in real-time mode: ''Moving-forward,'' ''Stopfor-pause,'' ''moving-forward-continuously,'' and ''stoppedcontinuously.'' The remainder of this paper is organized as follows: Section 2 describes the designed experimental task for recording an EEG signal, Section 3 details the proposed method, Section 4 presents the obtained results, Section 5 discusses the achievements, and finally, Section 6 provides some concluding remarks regarding this study.

II. EXPERIMENTAL SETUP
In imaginary-based BCI experiments, the employed tasks in an experimental setup play an important role, which is producing relative patterns to the imagination of movement. In our experiment, a visionary-imagination task of opening a hand and making a fist was designed to produce relative patterns with respect to the regulations shown in Figure 1 a.
A total of 18 male volunteers (S1 to S18) participated in the experiment at Lappeenranta University of Technology. The task is implemented in the following four steps: (1) Displaying a fixation cross for 500 ms at the center of a black screen, (2) displaying an image of a hand opening or making a fist for 1000 ms, (3) removing the image and displaying a black screen to let the subject imagine a movement represented by the displayed image (or opening the right hand or making a fist) for 2500 ms, and (4) displaying a black screen to let subjects rest for a random period of 3500 to 4000 ms, Figure 1 a. The reason for using the cross sign at the center of a black screen is attracting the subject's attention at that location. In addition, the reason for using the black screen is because other colors produce specific frequencies relative to the displayed color in the EEG. In other words, colors such as red and yellow produce significant patterns in the EEG. With respect to our scientific experiences from our previous projects to determine how color and negative emotions affect afternoon sleep and learning [33]- [37], we used red and yellow colors for making hand fist and opening hand, respectively. Stimulating brain with two stimulators simultaneously (imaginary movement and color imagination) could have potential of producing different stronger patterns which could be used in the BCI applications [31].
Before the experiment, subjects practiced opening their hands and making a fist 10 times to help them imagine the feeling of movements close to such motions. The imaginary task was repeated for 150 trials on individual subjects. The recorded signals are then used to train a classifier in offline mode. For the real-time mode experiment, the task was executed for 20 trials individually to control a real mobile vehicle connected to a computer with a wireless XBee chipset, as shown in Figure 1 b. More details on the task and applications are presented in our previous studies [38], [39].
In the real-time experiment, the subjects were asked to imagine the displayed image once and throughout the entire 2500 ms period. In total, two tasks were conducted during the real-time experiment, i.e., imagining making a fist once during the 2500 ms period, and similarly imagining opening their hand during this same period. During the experiment, a portable Enobio-32 amplifier with 32 dry electrodes (Shown in Figure 2) was used for EEG data collection, in which the sampling frequency rate was set to 500 Hz [40]- [42]. MATLAB-2017a software was used for signal processing in offline and real-time modes.

III. METHODS
To control a wireless mobile vehicle, four steps are implemented as follows: (1) data recording, (2) preprocessing, (3) feature extraction, and (4) classification. In this section, the procedure of EEG data processing is described as shown in Figure 3 and started with preprocessing as follows.

A. PREPROCESSING
The preprocessing step is an initial principal procedure for programming a model for real-time system identification. As shown in Figure 1, our software sends a marker to the EEG data to record the exact moment of imagination and rest (Figure 1 a). In offline preprocessing, samples of marked imaginary movement for 32 channels were first windowed as follows: 200 ms before the visual stimulation (display of images) until 2500 ms after the visual stimulation. The rest of the signals were located after the imagination time, which is called the resting time. Next, the windowed signals were arranged in a matrix of [m × n × t], where m is the number of trials, n is the number of channels, and t is the number of samples in each window. In our experiment, 150 trials were recorded for individuals, among which 75 trials belonged to the moving-forward class and 75 belonged to the stopfor-pause class. In addition, 75 resting trials were extracted after displaying one movement more than twice. Therefore, a matrix size of [150 × 32 × 500] was built.
The windowed 32-channel signals are then passed through a sixth-order Butterworth band-pass filter with a frequency range of 8-13 Hz, and the frequency range was determined based on our previous publications [43], [44]. The applied filters help visualize the ERDs ( Figure 4) and illustrate the skull map ERD spectrum for the 32 channels. The skull   map spectrum in Figure 5 is informative for considering the employed frequency range, location, and quality of the neuron's activation during the task. In real-time preprocessing, the EEG amplifier sends 500 samples at once with 100 ms delay. Therefore, the input matrix dimensions for processing are [1 × 32 × 500] and the same Butterworth filter is applied to remove noise. In the next section, the algorithm In similar experiments the ERD pattern appears from 800 to 1150 ms because of the decreasing localized amplitude, and the ERS appears from 1150 to 1400 ms because of the increasing localized amplitude. [45]- [47]. The ERD/ERS patterns are observable in other channels in which FC1 is an example.
for computing the MSPCSP projection and the threshold for the classifier is described.

B. MODIFIED SECONDARY PROJECTION OF THE COMMON SPATIAL PATTERN (MSPCSP)
To apply the MSPCSP projection to the EEG data, the traditional CSP with the above-mentioned filter function is first applied for the 32 channels [9], [41]. To implement the traditional CSP, the preprocessed matrix is normalized, averaged, and stored in matrices, denoted as C S (covariance for condition stop-for-pause) and C F (covariance for condition moving forward) as follows: )), where Z F and Z S are parameters for the EEG signal under moving-forward-and stop-for-pause for one second conditions, respectively. In addition, m is the number of trials for individual classes, which is 75 in our experiments, and T is the transposed operator. To compute a whitening transform function, the C F and C S matrices are combined in Eqs. (2), and the whitening coefficients are then computed using Eq.
(3) as follows: where A 0 , δ, and Tr are eigenvectors, the diagonal eigenvalue matrix, and whitening matrix coefficients, respectively. The C F and C S matrices are then transferred by utilizing the whitening matrix: Here, G F and G S share common eigenvalues in Eq. (5). The main objective of the CSP is to find a matrix labeled A, as in Eq. (5), which satisfies Eq. (6). To check the computations, the shared eigenvalue summation must be the unit matrix (I ), as in Eq. (6).
where the diagonal eigenvalue matrices for the movingforward-and stop-for-pause conditions are assigned to the γ F and γ S symbols, respectively. By sorting the eigenvectors, large and small eigenvalues are separated and placed in G F and G S matrices, respectively. In addition, W proj1 is then defined to arrange the CSP projection coefficients as follows: The computed W proj1 [32×32] matrix is the target CSP weight.
To obtain the first CSP projection, the W proj1 weight is applied to the EEG data, as in Eq. (8): The Data [32×500] matrix was utilized as the input for the second projection and Data [32×500] is the implemented traditional matrix, which is the basis of our further computations. The MSPCSP (second) projection computation is defined by Eq. (9).
where C T newF and C T newS are the transposed average covariance matrices of the new projected EEG data with the CSP weights of the moving forward (Data F ) and stopfor-pause (Data S ) classes, respectively. Eqs. (2) to (7) are then utilized to obtain the W proj2[500×500] projection. Finally, the two projections were applied to the EEG with the given order in Eq. (10).
The final transformation is the FProj matrix, which is based on two complementary transformations. For feature extraction, the first and last rows of the decreasingly sorted transformed matrix in the moving-forward class are subtracted from the first and last rows of the stop-for-pause class, respectively. The first and last rows contain the largest and smallest classes, respectively. The extracted differential features are then utilized to compute the thresholds for the threshold classifier.

C. FEATURES AND CLASSIFIER
To classify the features, various approaches have been employed, such as an SVM, GRBF, and neural networks [8], [13], [36], [37], [48]. In the present study, a threshold classifier is proposed to classify the MSPCSP and CSP features.

1) DIFFERENTIAL THRESHOLD COMPUTATIONS
Various methods have been developed to classify the features. In the present study, the idea is to compute differential eigenvalue features by applying the projection FProj to the movement and rest signals. The projection FProj enables us to identify sub-classes, namely, stopped-continuously and moving-forward-continuously. In the computations, two types of EEG rest are defined: 1) rest after frequent imagination of one action and 2) rest after a single action. In our algorithm, the rest of the EEG signal after the frequent imagination of one action is employed. Therefore, the eigenvalues of the remaining EEG signal are computed, and the FProj matrix is then applied to obtain the altered projections.
To find the thresholds, the MSPCSP eigenvalue matrix of the moving-forward class and stop-for-pause classes are first sorted decreasingly. The average values of the first and last rows are then computed and assigned to the P A and P B parameters for the moving-forward class and stop-for-pause main classes, respectively. To find the subclass thresholds, the first and last rows of the decreasingly sorted eigenvalues of moving-forward (main class) are subtracted from the first and last rows of the decreasingly sorted rest eigenvalues, respectively. Thereafter, the average of the eigenvalues is assigned to P C1 , which is called moving-forward-continuously (first sub-class). The same procedure is applied to the stop-forpause eigenvalues and the remaining eigenvalues, and the averaged value of the eigenvalues is assigned to P C2 , labeled stopped-continuously. Therefore, two differential eigenvalue matrices were obtained, and the average values were assigned to parameters P C1 and P C2 . Hence, four thresholds are determined to develop a threshold classifier, namely, P A , P B , P C1 , and P C2 . In the next step, the memory matrices and classifier implementation using thresholds are explained.

2) THRESHOLD CLASSIFIER AND COMMUNICATION WITH MEMORY
Four states are defined to design a threshold classifier: moving-forward, moving-forward-continuously, stop-forpause, and stopped-continuously. Because of the nonlinearity of the EEG behavior, the thresholds are updated for each EEG segment.
The attained thresholds are 1) P A , which is the first threshold for the main class ''moving-forward,'' and 2) P B , which is the second threshold for the main class ''stop-for-pause.'' The criterion decision for the classifier is set as follows: 1) if P B > P A , the vehicle will stop for a pause, 2) if P B < P A , the vehicle will move forward and pause for one second, as shown in Figure 6.a, and 3) the range between P C1 and P C2 is recognized as a continuous action (subclasses).
To determine how the decision-making is applied to the subclasses, a memory matrix is defined.
In the algorithm, a memory matrix is defined based on zero values and one value (shown in Figure 6) to record the previous conditions. Here, we demonstrate how the memory and thresholds communicate. The initial conditions in the memory are set to (0, 0), which means that the vehicle is stopped. In the memory matrix, the first value describes the previous condition, and the second value describes the present condition. The decision tree shown in 6 is based on the obtained thresholds and explained as follows: If the differential thresholds attained satisfy P B < P A , the vehicle condition changes from stop to move-forward-for-pause, and the memory value changes to (0, 1). In the next trial, if the differential value obtained satisfies P B > P A , the EEG state changes and the vehicle is stops for a pause. Therefore, the memory changes to (1, 0). Next, if the differential value obtained is between P C1 and P C2 , the EEG state remains unchanged, and the previous state is continued or stopped continuously. For instance, if the value obtained between P C1 and P C2 and the present state is (0, 1) (the vehicle move-forwardfor-pause), the memory changes to (1,1). In this case, the system recognizes that it should move forward continuously to prevent an interruption. In the conceptual of view, moving forward is identified, if in two frequent times the moving forward class were identified, then the class state identified as a moving forward-continuously automatically, until a stop class is identified. If the previous state is zero and the recognized present state is also zero, the memory is set to (0, 0), and the vehicle remains stopped for the next trial (stoppedcontinuously state). Stopped-continuously class happens if two frequent times the moving forward class identified, then the class state identified as a moving forward-continuously automatically until a moving class is identified. As the main limitation of the above-mentioned procedure, the use of other classifiers is not applicable and requires further study.

IV. RESULTS
In this experiment, 18 male candidates with an average age of 29.5 years participated in the control of a remote vehicle by imagination. The participants did not have an addiction to cigarettes, alcohol, or a history of drug consumption for a long period. They were also asked not to drink caffeine for at least 3 h prior to the experiment. A sample of the ERD/ERS imagination pattern of the right hand making a fist and a scalp map of 32 channels are shown in Figures 4 a and 5 b.
To consider the efficiency of the MSPCSP and CSP projections for offline and real-time processing, the accuracy of the standard deviation and paired t-test evaluations are presented in Table 1. The paired t-test is an evaluation that provides information on the meaningfulness of changes between two conditions in one group. If the changes in the extracted features are meaningful, the obtained paired t-test has a p-value of p < 0.05. If the feature changes are meaningless, the obtained paired t-test has a p-value of p > 0.05. For realtime processing, 20 trials were conducted, and the vehicle's information is given in Table 1. To investigate the efficiency of the MSPCSP method in comparison with the CSP method, the feature scattering of S13 is shown in Figure 7.

V. DISCUSSION
The aim of the present study is to implement the MSPCSP projection to find discriminate features and employ them as a threshold in a multiclass classification for controlling a wireless mobile vehicle application. To control the mobile vehicle, two main classes of ''moving-forward'' and ''stopfor-pause'' are computed. Then, by using each main class, two other subclasses are computed. In total, four classes are identified: the ''moving-forward'' class with the sub-class of ''moving-forward-continuously'' and the ''stop-for-pause'' class with the sub-class of ''stopped continuously.'' Then, the MSPCSP features were considered in two modes: offline  and real-time classification processing. In the both modes, the input signals were 32 EEG signals. In the next section, we describe the implemented algorithms for identifying the mind states during offline and real-time processing.

A. CONSIDERING CSP AND MSPCSP PROJECTIONS
In the algorithm, the preprocessed EEG signal is briefly divided into two matrices of size [75 × 32 × 500], each representing one of two classes: imagining the right hand making a first and opening. In addition, one matrix with the same size was computed for the remaining EEG signal. In our BCI experimental application, imagining the right hand making a fist and opening were the main classes, which were translated into a moving-forward-for-pause and stopfor-pause (brake) state for 1 s each. The complementary explanation for computing the MSPCSP is as follows: First, the traditional CSP projection is implemented using Eqs. (1) to (7), which we refer to as W proj1 [32×32] . To compute the CSP projection for imaginary signals, Eq. (8) is applied, and the matrix Data [32×500] is obtained. Therefore, CSP changes the signal projection toward two orthogonal directions in a two-dimensional feature space that represents the main classes using Data [32×500] , which generates two values from each segment. From a mathematical perspective, the CSP projection differentiates the direction of classes by maximizing the variances for one class and minimizing the variances for the second class, as shown in Figure 7 a. Most of the traditional CSP error rates are computed from the area with the overlap between the two classes, as shown in Figure 7 a, which is intended to be reduced using the MSPCSP projection. The second projection is then applied to the preprocessed EEG data using CSP. The projected EEG data were first sorted decreasingly and then transposed. The covariance of the modified projection (sorted and transposed) is then computed as an update of the eigenvalues. Then, the new orthogonal coefficients are computed by reusing Eqs. (1)- (9). The MSPCSP projection includes an altered CSP with additive information (W proj2 [500×500] ) in comparison with the traditional CSP projection (W proj1 [32×32] ). Finally, the EEG data were transferred into a higher feature space using Eq. (10), the second projection is called the MSPCSP. Then, the MSPCSP is sorted decreasingly to find the largest and smallest eigenvalues for computing the main classes thresholds, and the eigenvalues are then employed for finding the subclass thresholds. The computing procedure for the mainand sub-class thresholds is repeated for every epoch of the individual participants and updated automatically. To determine the number of projections that are informative, the above-mentioned procedure is repeated individually because the accuracy obtained reaches a constant value with fewer fluctuations. In our experiment, the application of two projections reached a constant accuracy for individuals. In the next discussion, the finding of sub-classes using CSP and MSPCSP is described.

B. DIFFERENTIAL FEATURES AND SUB-CLASSES
This part begins with the following questions: Do the frequent imaginations of making a fist generate frequent ERDs (continual moving-forward)? If so, are they detectable? More specifically, by making a fist once, one ERD pattern appears, and the EEG background (signals with no actions) is the dominant signal. By making a fist continuously or frequently, a frequent number of ERD patterns do not appear in the EEG. In other words, we do not know how long an action should be continued, which has the potential for further consideration. VOLUME 10, 2022 By contrast, the imagination of frequent fist-making actions is not applicable to the subjects. However, the imagination of a movement more than once causes an interruption and delay in the real-time system. For employing a real-time system, the same procedure needs to be processed for updating the thresholds for each new incoming data.
To solve the first problem, informative data are extracted from the MSPCSP and CSP projections, leading to differential features for controlling continuous actions. In our experiment, differential features are used to extract two sub-classes from the main classes, namely ''moving-forwardcontinuously'' and ''stopped-continuously.'' To classify the states of the subject's mind, a memory matrix is required, as defined in Section III-C2. In addition, the interruption problem (interruption) in real-time experiments for continuous movements is solved using the memory matrix.
As described in Sections III-C1 and III-C1, computing differential features using hand fisting-, hand opening-, and rest-eigenvalues enable sub-class identification (movingforward-continuously and stopped-continuously). The key point for identifying the sub-class algorithm was seeking a range of informative values in the eigenvalues that differed from the EEG-background and main classes. Experimentally, averaged differential eigenvalues P C1 and P C2 were used as separating thresholds, although the results were random. Therefore, a range of values between P C1 and P C2 is selected, which results in high variations. Experimentally, it is recognized that some of the values between the ranges P C1 and P C2 are instructive, and we could not find a rule between the results and values because of the low number of features and the non-linearity. Although this is solvable using optimizing algorithms within the P C1 and P C2 range, but we solve it using a memory matrix.
To consider the range between P C1 and P C2 , the differential features for the main-and subclass scattering are depicted in Figure 7 b, which is for S13. Figure 7 b shows that the area between Feature 1 and Feature 3 is not outspread in the feature space, and is limited within a range. For the other subjects, Feature 1 and Feature 3 had a higher dispersion with an overlap, but the trend was similar. In addition, Feature 2 and Feature 4 show good separation with less overlap between the main classes of stopped-continuously and moving-forwardcontinuously. To identify the subclasses from the P C1 and P C2 range of values and obtain a higher and constant accuracy, a memory matrix is defined. The memory matrix has two advantages: 1) developing a method for recognizing the sub-classes and 2) removing interruptions for real-time experiments. The communication of the classifier and the memory is explained in detail in Section III-C2. To use the memory matrix in a real-time experiment, the following regulation was implemented: 1) updating thresholds are limited within the range of the minimum and maximum values that are obtained in the offline processing, and 2) if an undefined condition is identified, then the previous state in the memory is repeated and the mobile vehicle remains under the condition with no changes. Limitations of the present study: The principal communication of the memory with the thresholds for identifying classes explained in Section III-C2, and it is illustrated that the threshold computations, memory process, and sub-class identification are sections of each other and cause a limitation in using a threshold classifier, which has the potential to be solved through the use of other classifiers. In the real-time experiment, the same task and processing for adjusting the tree decision algorithm is applied for the subjects to find the accuracy results. Additionally, 32 channels are employed for the real-time processing.

C. ANALYZING RESULTS
The experiment was conducted in both offline and online modes. From Table 1, it can be seen that the classifier with the MSPCSP features reaches an average accuracy of 82.16±9.04% and 70.83±8.10% for offline and real-time processing, respectively. In addition, the CSP method has an average accuracy of 67.44±8.10% and 57.508.63% for offline and real-time processing, respectively. The results showed that the MSPCSP projection increases the accuracy in comparison with the CSP by an average of 14.72% and 13.33% for offline and real-time modes, respectively. A paired t-test was applied to the CSP and MSPCSP features separately to consider the significance of the right-hand fist-making imagination (moving-forward) and hand opening (stop-for-pause) with the sub-class results. Table 1 shows that the paired t-test results based on the CSP approach were insignificant for the two candidates, whereas there were no insignificant paired t-test results with the MSPCSP feature changes. Consequently, the values in Table 1 show that the features extracted from the MSPCSP are more discriminated and yield more accurate results.

VI. CONCLUSION
In the present study, a second projection using the CSP principals was computed, called MSPCSP, and was used to identify four classes in real-time processing. The main MSPCSP eigenvalues and the differential discriminative weights were used for identifying two main classes and two sub-classes, respectively. The differential weights were computed through a differential operation between the eigenvalues in three states: making a fist with the hand, opening the hand, and at rest. The discriminative weights were used as features and were helpful for further computations of the threshold values of the classifier algorithm. The results obtained show that the MSPCSP projection achieves an accuracy of 82.16±9.04% with p < 0.05 and 70.83±8.27% for offline and real-time processing, respectively. In addition, the MSPCSP method increased the average results by 14.72% and 13.33% compared to the CSP method for offline and real-time processing, respectively. It was concluded that the computed projection weights based on the MSPCSP projection are more distinctive than those of the CSP projection method. Moreover, the algorithm for computing the thresholds effectively extended the number of identifying classes in CSP from two to four states.