Journal of Biosciences and Medicines, 2014, 2, 43-49
Published Online April 2014 in SciRes. http://www.scirp.org/journal/jbm
How to cite this paper: Zhou, B.Y., et al. (2014) Robust Spatial Filters on Three-Class Motor Imagery EEG Data Using Inde-
pendent Component Analysis. Journal of Biosciences and Medicines, 2, 43-49.
Robust Spatial Filters on Three-Class Motor
Imagery EEG Data Using Independent
Bangyan Zhou, Xiaopei Wu*, Lei Zhang, Zhao Lv, Xiaojing Guo
The Key Laboratory of Intelligent Computing & Signal Processing, Ministry of Education,
Anhui University, Hefei, China
Email: firstname.lastname@example.org, *email@example.com
Received January 2014
Independe nt Component Analysis (ICA) was often used to separate movemen t rela ted in depen-
dent components (MRICs) from Electroenceph alogram (EEG) data. However, to obtain robust spa-
tial filters, complex characteristic features, which were manually selected in most cases, have been
commonly used. This study proposed a new simple algorithm to extract MRICs automatically,
whi ch just uti lize d th e spatial distribution pattern of ICs. The main goal of t his study was to show
the relat ionship be tween spatial fi lters performance and desi gning samples. The EEG data which
contain mixed brain states (preparing, motor imagery and rest) were us ed to design spatial filte rs.
Meanwhile, the singl e class data was also used to calculate spatial filters to assess whether the
MRICs extracted on different class motor imagery spatial filters are similar. Furthermore, the spa-
tial filters c ons truc ted on one subject’s EEG data were applied to extract th e oth ers ’ MRICs. Fi nally,
the different spati al filters we re t hen applied to single-trial EEG to extract MRICs, an d Sup port
Vector Machine (SVM ) classifi ers wer e used to discriminate left hand、ri ght -hand a nd foot imagery
movements of BCI Compe ti tion IV Dataset 2a, whic h recorded four motor imagery data of nine
subjects. The results suggested that any segment of finite motor imagery EEG samples could be
used to design ICA spatial filters, and the extracted MRICs are consistent if the positi on of e lec-
trodes are the same, which confirmed the robustness and practicality of ICA used in the motor
imagery Brain Computer Interfaces (MI-BCI) systems.
ICA; Spatial Filter; Motor Imagery; BCI; SVM
Brain-Computer Interfaces (BCI) translate brain signals into control signals that allow the user to communicate
with the outside world without using muscles or peripheral nerves . In recent years, ICA has been successful-
B. Y. Zhou et al.
ly used to identify brain related signals and artifacts from Electroencephalography (EEG) data in BCI system 
. In this paper, the chosen ICA algorithm was Infomax . Here, a new algorithm was proposed to extract
movement related independent components (MRICs) automatically, which were used to classify the different
brain states corresponding to different motor imagery activities.
Meanwhile, we studied the influences of different design samples on ICA spatial filters performance. On one
hand, lots of trials, including motor imagery state or rest state , were commonly used to optimize ICA spatial
filters. In theory, more trials would provide more information that can help improve the classification accuracy.
However, using more trials would increase the burdens of data acquisition and computation. In this study, dif-
ferent time segments of small number of trials, wh ic h contain all different brain states during the experiments,
were used to design ICA spatial filters. On the other hand, ICA is an unsupervised algorithm , so there is no
previous knowledge about the class labels of the motor imagery data. In this paper, the single class data was
used to design spatial filters to assess whether the MRI Cs extracted by the ICA spatial filters constructed on dif-
ferent single class motor imagery data were similar. Furthermore, the state-to-state method  and the ses-
sion-to-session method  have been proposed. In this study, a subject-to-subject method, which applied spatial
filters constructed on one subject’s motor imagery EEG data to extract the others’ MRICs, was proposed. The
method was investigated by cross validation among nine subjects. In addition, Support Vector Machine (SVM)
 classifiers were used to discriminate left hand, right hand and foot imagery movements. The main goal of
this study is to assess whether different EEG segments would influence the performance of ICA spatial filters,
and confirm the practicality of ICA used in MI-BCI system for its robustness.
2. Experimental Paradigm and Dataset
The performances of the algorithms were evaluated on BCI Competition IV Dataset 2a. The datasets were rec-
orded from nine healthy subjects. For each subject, two sessions on different days were recorded. During each
session, the subjects were asked to perform 288 trials of four different motor imagery tasks, namely left hand,
right hand, foot and tongue motor imagery (72 trials per class). Each trial began with an acoustic cue “beep” (at t
= 0 s), and along with a fixation cross appeared on the black screen. After two seconds (at t = 2 s), an arrow cu e,
which pointed either to the left, right, down or up, appeared for 1.25 s on the screen. The subjects were then in-
structed to image the corresponding imaginary movement between 3 s and 6s. After 6 s (at t = 6 s), the screen
was black again, allowing the subjects to relax. The timing scheme is shown in Figure 1 right.
Twen t y-two EEG electrodes (with left mastoid serving as reference and right mastoid as ground) were used to
record cortical potential. The configuration of electrodes distribution is shown in Figure 1 left. The data was
sampled at 250 Hz and bandpass-filtered between 0.5 Hz and 100 Hz. An additional 50 Hz notch filter was
enabled to suppress line noise.
In this paper, three of the four classes motor imagery data (left hand, right hand and foot) were selected to
evaluate our algorithms. In order to assess the robustness to artifacts and outliers of ICA, no treatments (dis-
carded or artifact correction) were performed. The raw EEG data was only bandpass-filtered between 8 Hz and
35 Hz, which covering mu and beta rhythms bands.
Figure 1. Layout of EEG electrodes (left) and Timing scheme of paradigm (right) for BCI Competition 2008 Datasets 2a.
B. Y. Zhou et al.
3.1. ICA Algorithm
ICA is a Blind Source Separation (BSS) algorithm. Assume that there is an N-dimensional unknown vector of
hidden independent sources SN = [s1,…,sN]T. The measured multi-channel EEG signals XN = [x1,…, xN]T can be
considered as the following liner mixture of sources.
where A is an unknown mixture matrix. The goal of ICA is to obtain hidden sources with the unmixing matrix
W by following matrix transformation.
where unmixed signals UN are the estimate of SN. Each row of W is a spatial filter for estimating ICs and each
column of A (equals W−1) is a spatial pattern, which consists of electrode weights of ICs . The same goal of
different ICA algorithms is to make the estimated sources ui (I = 1 ,2 , .. . N) statistically independent. In this paper,
instead of using the standard Infomax code, the computer code of ICA algorithm was written in our own. The
independence criterion of information maximization and natural gradient optimization algorithm were used. The
final iterative optimization formula of matrix W is as follows.
where E[ ] is statistical average. K is the switch matrix corresponding to sources’ different probabilistic models.
Here, the ICA algorithm uses the diagonal elements kii to switch between s u per- and sub-Gaussian model .
3.2. Identifying Independent Components
Usually, complex characteristic features have been used to identify MRICs . In this paper, just the spatial
distribution information of sources was used to recognize the independent components. From the spatial pattern,
we can conclude that the distribution of sources should be consistent with the position of electrodes, which
means that the source si should have the highest influence on the nearest measured electrode signal xi. So we
search the maximum values of every column of absolute value matrix (|A|). If the row number of the maximum
value was consistent with the row number of the measured electrode signal xi, then the corresponding column
number j of the maximum value was recorded, and the spatial filter for extracting sources si was wj.
In this paper, ten MRICs (IC3, IC5, IC8, IC9, IC10, IC11, IC12, IC15, IC16, IC17), which have biggest
weights on the nearest measured electrode signal x3, x5, x8, x9, x10, x11, x12, x15, x16, x17 respectively, were ex-
tracted from twenty-two channel EEG signals, because they represent brain activities from sensorimotor cortex
areas. If the ten sour c es do not exist simultaneously with our method, it means the filter design fails. Figure 2
shows spatial projection s of selected ten motor ICs for one subject S3.
3.3. Feature Selection and Classification
For one single trial data xi, the selected ten spatial filters wj(j = 1,2,…,10 ) were used to extract MRICs by equa-
The normalized variance fi of each source was used as features of classifier.
fvar svar s
Support Vector Machine (SVM) classifier with a Gaussian kernel was used to estimate the classification ac-
curacy for each trial, and a 5-fold cross-validation was performed to avoid overfitting. Within each trial, the
same time segment (3.5 - 5.5 s), which was the motor imagery periods, was used to train and test the classifier.
B. Y. Zhou et al.
Figure 2. Topographic maps of subject S3 (BCI Competition IV Dataset 2a). The selected ten comonents (from left to right)
are: IC3, IC5, IC8, IC9, IC10, IC11, IC12, IC15, IC16, IC17.
4.1. ICA Filter Design Based on Different Time Segment Data
This section shows the relationship between ICA filter performance and training samples. The 0 - Tw time seg-
ment of one trial was selected, and ICA spatial filters were optimized on a 5Tw (5 × Tw seconds) time segment.
The value of Tw was 1 s, 2 s, 3 s, 4 s, 5 s, 6 s, 7 s respectively, which gradually contains all brain states through-
out the experiment (preparing state, motor imagery state and rest state). For each subject, the five trials were se-
lected randomly, and a 10 × 22 spatial filter was designed to extract MRICs. Finally, the normalized variances of
ten MRICs were used as features of SVM classifier for 5-fold cross-validation. The procedure was repeated 30
times, the mean classification accuracies were calculated for each subject (see Table 1), p.s., the trials of filter
design failure were not included in.
As sh own, the average accuracies of nine subjects obtained on different time segments were very similar. The
maximum is 66.33% in 0 - 5 s, and the minimum is 65.11% in 0 - 1 s. Meanwhile, with the length of time seg-
ment increased, the average classification accuracy increased slightly in the front of 5 s. It may be because that
data of longer duration provides more information to optimize ICA spatial filters. From all the seven different
time segments results, we can conclude that any time segment EEG data can be used to design ICA spatial filters,
even the non -motor-imagery data (0 - 1 s and 0 - 2 s) or mixed-state data(0 - 7 s), which demonstrated that the
performance of ICA algorithm is not related closely to the train samples.
4.2. ICA Filter Design Based on Different Single Class Data
Usually the mixed class data was used to calculate ICA spatial filters. However in the Section 4.1, we have
proved that even the non-labeled data (preparing state and rest state) can be used to design ICA spatial filters. In
this section, this view was further proved by comparing the effect of different single class data on the perfor-
mances of ICA spatial filters. For each subject, ICA spatial filters were designed only on single class EEG data,
i.e., used left hand motor imagery data (5 trials selected randomly from 72 trials of left hand motor imagery data)
to design spatial filters, then the filters were used to extract MRICs from all the 216 trials (72 trials × 3 class),
etc. Without loss of generality, 0 - 7 s continuous time segment was used to design ICA spatial filters, then a
5-fold cross-validation was performed by SVM classifier. The above procedure was repeated 30 times, and the
average accuracies of all nine subjects were shown in Figure 3. As s hown , for each subject, the average classi-
fication accuracies under the four cases were similar. For the same subject, the biggest difference of classifica-
tion accuracies under four conditions was less than 4.5%. And under the same single class condition, the biggest
difference of average classification accuracies of all nine subjects was only less than 1%. We thus can conclude
that the performance of ICA spatial filters is not related closely to the class labels of train samples, and any class
of motor imagery data could be used to design ICA spatial filters.
B. Y. Zhou et al.
Table 1. Mean classification accuracies of 9 subjects in 0 - Tw segments.
S1 S2 S3 S4 S5 S6 S7 S8 S9 Mean Std
0 - 1 s 80.21 71.88 85.53 54.36 54.40 48.70 76.78 61.81 52.33 65.11 13.70
0 - 2 s 81.71 71.97 86.35 54.06 53.18 47.58 78.99 59.92 53.35 65.23 14.59
0 - 3 s 79.26 71.59 86.26 52.75 54.48 50.18 81.46 61.22 51.39 65.40 14.35
0 - 4 s 81.03 71.94 88.28 53.11 51.22 50.72 80.01 62.11 55.14 65.95 14.60
0 - 5 s 80.82 71.26 86.17 54.09 52.27 51.30 83.66 63.12 54.32 66.33 14.39
0 - 6 s 80.08 72.26 86.56 55.98 53.43 49.56 80.65 62.24 54.63 66.15 13.90
0 - 7 s 81.40 72.17 88.70 56.64 52.18 50.30 80.49 61.09 53.47 66.27 14.60
Figure 3. Average classification accuracies of nine subjects. The data
for designing ICA spatial filters was left-hand, right-hand, foot and
mixed-class motor imagery data respectively.
4.3. Subject to Subject Transfer
In this section, the subject-to-subject transfer was implemented on nine subjects. i.e., the ICA spatial filters,
which were calculated on one subject’s 35-second (5 trials × 7 seconds) motor imagery EEG data, were used to
extract the MRICs of all nine subjects. After that, the normalized variance features of the ten MRICs were ap-
plied to SVM classifier for training and testing. The procedure was also repeated 30 times. The average cross
validation classification accuracies between subjects were compared in Table 2.
One obvious conclusion that can be seen in Table 2 is that the highest accuracy is S3 (86.96%) while the
lowest accuracy is S5 (46.96%). However, even when using the subject S5’s data to design ICA spatial filters,
the average accuracy was still the highest (6 7. 64 %). While the overall performance of ICA spatial filters de-
signed on subjects S6 and S9 were slightly inferior, the average accuracies were just 62.23% and 61.15% re-
spectively. All the results suggested that the ICA spatial filters constructed on one subject’s motor imagery data
also can be used to extract correct MRICs for other subjects, which reflected the similarity of brain structure s.
5. Discussion and Conclusion
This study proposed a new simple algorithm to extract MRICs automatically, which just used the spatial pattern
of ICs. The homemade ICA code based on Infomax theory was used to optimize spatial filters, and the perfor-
mance of filters, constructed on different training data, was compared. The experiment results showed that any
time segment and any class of EEG data can be used to design ICA spatial filters. This phenomenon sugges ted
that the performance of ICA spatial filters have not much relationship with the brain state, which is convenient
for practical application of ICA-BCI system. In addition, we fully believe that ICA algorithm has a strong ability
to acquire similarity information of brain structures. Thus, if the positions of EEG electrodes are the same, ICA
B. Y. Zhou et al.
Table 2. Average classification accuracies of subject-to-subject transfer between nine subjects.
Test Subject for ICA filers design
S1 S2 S3 S4 S5 S6 S7 S8 S9 Mean
S1 81.40 82.39 81.96 80.95 83.05 77.02 80.58 81.21 71.01 79.95
S2 72.48 72.17 68.08 67.47 72.18 66.68 66.04 71.98 66.11 69.24
S3 86.91 87.59 88.70 88.52 92.10 85.47 86.45 86.24 80.66 86.96
S4 55.46 52.65 55.95 56.64 53.80 50.31 53.38 55.67 50.11 53.77
S5 49.87 49.84 46.08 47.71 52.18 44.41 45.63 44.94 41.99 46.96
S6 50.26 49.57 48.38 49.43 54.24 50.30 54.87 47.33 51.50 50.65
S7 82.25 83.28 81.60 79.68 81.52 70.18 80.49 79.91 73.68 79.03
S8 63.73 62.98 70.82 67.64 62.73 61.80 61.61 61.09 61.82 63.80
S9 54.70 54.86 52.12 58.31 56.98 53.92 54.59 53.92 53.47 54.76
Mean 66.34 66.15 65.63 66.26 67.64 62.23 64.85 64.70 61.15 64.99
Std 14.71 15.47 15.89 14.48 14.99 13.75 14.48 15.51 12.75 2.08
spatial filters constructed on the different individual data sets should be consistent to some extent, which can be
seen from the results of the subject-to-subject transfer. In summary, this study fully proved the robustness and
practicality of ICA used in the MI-BCI systems.
This work is supported by National Natural Science Foundation of China (#61271352) and Young Talent Foun-
dation of Anhui province (#2011SQRL020ZD).
 Nicolas-Alonso, L.F. and Gomez-Gil, J. (2012) Brain Computer Interfaces: A Review. Sensors, 12, 1211-1279.
 Zima, M., Tichavský, P., Paul, K. and Krajča, V. (2012) Robust Removal of Short-Duration Artifacts in Long Neonatal
EEG Recordings Using Wavelet-Enhanced ICA and Adaptive Combining of Tentative Reconstructions. Physiological
Measurement, 33, N39. http://dx.doi.org/10.1088/0967-3334/33/8/N39
 Grandchamp, R., Braboszcz, C., Makeig, S. and Delorme, A. (2012) Stability of ICA Decomposition across Withi n-
Subject EEG Datasets. Engineering in Medicine and Biology Society (EMBC), 2012 Annual International Conference
of the IEEE, California, 8-28.
 Lee, T.W., Girolami, M. and Sejnowski, T.J. (1999) Independent Component Analysis Using an Extended Infomax
Algorithm for Mixed Subgaussian and Supergaussian Sources. Neural Computation, 11, 417-441.
 Wang, Y., Wang, Y.T. and Jung, T. P. (2012) Translation of EEG Spatial Filters from Resting to Motor Imagery Using
Independent Component Anal ysi s. Plo S ONE, 7, e37665. http://dx.doi.org/10.1371/journal.pone.0037665
 Brunner, C., Naeem, M., Leeb, R., Graimann, B. and Pfurtscheller, G. (2007) Spatial Filtering and Selection of Opt i-
mized Components in Four Class Motor Imagery EEG Data Using Independent Components Analysis. Pattern Recog-
nition Letters, 28, 957-964. http://dx.doi.org/10.1016/j.patrec.2007.01.002
 Naeem, M., Brunner, C., Leeb, R., Graimann, B. and Pfurtscheller, G. (2006) Seperability of Four -Class Motor Im-
agery Data Using Independent Components Analysis. Journal of Neural Engineering, 3, 208.
 Lotte, F., Congedo, M., Lécuyer, A., Lamarche, F. and Arnaldi, B. (2007) A Review of Classification Algorithms for
EEG-Based Brain-Computer Interfaces. Journal of Neural Engineering, 4, R1-R13.
 Xue, Z., Li, J., Li, S. and Wan, B. (2006) Using ICA to Remove Eye Blink and Power Line Artifacts in EEG. IEEE 1st
B. Y. Zhou et al.
International Conference on Innovative Computing, Information and Control, 2006 ICICIC’06, 107-110.
 De Vos, M., De Lathauwer, L. and Van Huffel, S. (2011) Spatially Constrained ICA Algorithm with an Application in
EEG Processing. Signal Processing, 91, 1963-1972. http://dx.doi.org/10.1016/j.sigpro.2011.02.019