EEG Filtering Optimization for
Code–modulated Chromatic Visual Evoked
Potential–based Brain–computer Interface
Daiki Aminaka, Shoji Makino, and Tomasz M. Rutkowski?
Life Science Center of TARA at University of Tsukuba
1-1-1 Tennodai Tsukuba Ibaraki, Japan
tomek@bci-lab.info
http://bci-lab.info/

Abstract. We present visual BCI classification accuracy improved results after application of high– and low–pass filters to an electroencephalogram (EEG) containing code–modulated visual evoked potentials(cVEPs). The cVEP responses are applied for the brain–computer interface (BCI) in four commands paradigm mode. The purpose of this projectis to enhance BCI accuracy using only the single trial cVEP response.
We also aim at identification of the most discriminable EEG bands suitable for the broadband visual stimuli. We report results from a pilot
study optimizing the EEG filtering using infinite impulse response filters
in application to feature extraction for a linear support vector machine(SVM) classification method. The goal of the presented study is to develop a faster and more reliable BCI to further enhance the symbiotic
relationships between humans and computers.
Keywords: Brain–computer interface; ERP; EEG classification; cVEP.

1

Introduction

A brain computer interface (BCI) is a symbiotic device which facilitates human–machine interaction without dependence on any muscle or peripheral nervous
system actions [7]. BCI employs human neurophysiological signals for a straightbrainwave–based communication of a human with an external environment. Particularly, in the case of patients su↵ering from locked–in–syndrome (LIS) [4],amyotrophic lateral sclerosis (ALS) or coma, BCI could help them to communicate or complete various daily tasks (type letters or control their environments
using Internet of Things technologies, etc.). The BCI shall create a feasible option for such patients to communicate with their families, friends or caretakers
by using their trained and properly classified brainwaves only [7].
A code modulated visual evoked potential (cVEP) is proposed in this paper
as a brain–computer interface (BCI) paradigm. The cVEP is a natural response
to a visual stimulus generated with specific code–modulated, and also enhanced?

The corresponding author.

2

D. Aminaka, S. Makino, and T.M. Rutkowski

with color modulation, sequences [2, 3] while the user gases at the light source.
The cVEP–based BCI is a stimulus–driven paradigm which does not require along training, as compared to the imagery–driven paradigm [7].
Usually, cVEP’s advantage is in its faster classification time comparing toother types of visual–BCIs using steady state visual evoked potentials (SSVEPs)
or P300 responses. Theoretically a single classification interval could take lessthan 387.5 ms in our experiments, but actually the cVEPs have to be averaged
to remove EEG noise, which multiplies the above mentioned minimum period.
Usually the averaging procedure can take longer time, for example 1.9375 seconds as in our previous study based on five cVEPs’ averaging [1], which limits
this paradigm’s advantage. In this paper, we present results of classification improvement after application of high– and low—pass filtering of EEG to create
the faster cVEP–based BCI. A linear support vector machine (SVM) classifier
is applied in the presented cVEP–based BCI research project.
The cVEPs used in this project are induced by four RGB light–emitting
diodes (LEDs). We also utilize the higher flashing carrier frequency of 40 Hz(which is amplitude modulated with the proposed m sequences) comparing to
the classical setting of 30 Hz (limited to compare results with classical computer
displays usually with 60 Hz refreshing rate) [2]. There are maximum of five consecutive positive pulses (continues light) and minimum of one positive/negative
pulse of the LEDs in this experiment settings. If cVEP’s frequency features would
be evoked similarly as in a case of SSVEP, the steady–state response suppose
shall appear in EEG frequency bandwidths of 6 ⇠ 30 Hz or 8 ⇠ 40 Hz according
to our hypothesis. In other words, low–pass filtering with a cuto↵ frequency of
30 Hz or 40 Hz shall do the best job to remove unnecessary higher frequencies
from EEG. Moreover, we propose to use chromatic green–blue stimuli [6] as afurther extension in our project. We also compare our results with the classicalmonochromatic (white–black) set–up.
From now on the paper is organized as follows. In the following section we
describe materials and methods used in this study. Next, results and discussion
are presented. Conclusions together with future research directions summarize
the paper.

2

Materials and Methods

The experiments reported in this paper were performed in the Life Science Center of TARA, University of Tsukuba, Japan, and they were approved by the
ethical committee of the Graduate School of Systems and Information Engineering at University of Tsukuba, Tsukuba, Japan (experimental permission
no. 2013R7). The subjects agreed voluntarily to participate in the study. The
visual stimulus generating LEDs were driven by square waves delivered fromARDUINO UNO micro–controller board. We used m sequence encoded flashing patterns [3] to create four commands of the cVEP–based BCI. The binary
pseudorandom string m sequence with a length of 31 bits was used as follows[0100100001010111011000111110011]. The special feature of the m sequence,

EEG Filtering Optimization for Chromatic cVEP–based BCI

3

Fig. 1. The user seating in front of a frame with four visual stimulation chromatic LEDs
used in this study. The picture was included with a permission of the photographeduser.

which has been useful for the cVEP–based BCI paradigm design, was an uniqueautocorrelation function. The autocorrelation function had only a single peak at
the m sequence0 s period. It was thus possible to introduce a circular shift ofthe m sequence denoted by ⌧ , to create a set of another sequences with shifted
autocorrelation functions, respectively. In this study, the shifted time length has
been defined as ⌧ = 7 bits. Three additional sequences have been generated using shifts of ⌧ , 2 · ⌧ and 3 · ⌧ , respectively. During the online cVEP–based BCI
Table 1. EEG signals recording conditions
Number of users

9 (8 males and 1 female)

Average age of users

26.4 years old (standard deviation of 7.0 years)

Single session length

8 and 11 smsequence length T 516.7 and 387.5 msmsequence shifts ⌧116.7 and 87.5 ms

EEG amplifierg.USBamp by g.tec with wet active g.LADYbird electrodes

Electrode locations

O1, O2, P o3, P o4, P 1, P 2, Oz and P oz

Reference and ground

Left earlobe and F P z

Sampling frequency

512 HzNotch filter

Butterworth 4th order stopping 48 ⇠ 52 Hz

Band–pass filter

Butterworth 8th order with a passband of 5 ⇠ 100 Hz

4

D. Aminaka, S. Makino, and T.M. Rutkowski#1

Accuracy [%]

100

80

60

60

60

40

40

40

20

20

10

20

30

40

60

70

80

90

100

#4

100

Accuracy [%]

50

0
0

20

10

20

30

40

50

60

70

80

90

100

#5

100

0
0

80

80

60

60

60

40

40

40

20

20

10

20

30

40

50

60

70

80

90

100

#7

100

0
0

20

30

40

50

60

70

80

90

100

#8

100

0
0

80

60

60

60

40

40

40

20

20

20

0
0

0
0

30

40

50

60

70

80

Cutoff frequency [Hz]

90

100

30

40

50

60

70

80

90

100

60

70

80

90

100

60

70

80

90

100

#6

10

20

30

40

50

10

20

30

40

60

70

80

Cutoff frequency [Hz]

90

100

0
0

50

#9

100

80

20

20

20

10

80

10

10

100

80

0
0

#3

100

80

0
0

Accuracy [%]#2100high−gb
low−gbhigh−wk
low−wk

80

10

20

30

40

50

Cutoff frequency [Hz]Fig. 2. The mean accuracy results of SVM–based classification after high–pass filtering.
There are four results depicted for each user, namely from green–blue high carrier
frequency (blue lines); low carrier frequency (green lines); white–black high carrier
frequency (orange lines); low carrier frequency (red lines), respectively. Square markers
show the maximum accuracies. Four horizontal lines, or dots, at the bottom of eachpanel depict the significant di↵erences of classification accuracies between the non–filtered (raw EEG signals, of which accuracies are not shown here) and the filtered
cVEPs (p < 0.05 of Wilcoxon–test). The theoretical chance level of the experiments
was of 25%.

experiments the four LEDs continued to flash simultaneously using the time–
shifted m sequences as explained above. Two m sequence period lengths
have been tested to investigate whether they would a↵ect the cVEP response
discriminability. The conventional full m sequence period of T = 516.7 ms, as
in case of a conventional computer display with a refresh rate of 60 Hz (referredhere as “a low flashing frequency”) and the proposed T = 387.5 ms (referred as“a high flashing frequency”) have been tested. The LED–based visual stimulus
generator is presented in Figure 1. During the cVEP–based BCI EEG experiments the users were seated on a comfortable chair in front of the LEDs (seeFigure 1). The distance between user’s eyes and LEDs was about 30 ⇠ 50 cm(chosen by the users for a comfortable view of the all LEDs). A notch filter wasapplied to remove power line interference of 50 Hz from EEG together with aband–pass filter to remove eye blinks and muscle–originating noise. Details of
the EEG experimental set up are summarized in Table 1. To avoid user’s eye
blinks, each trial to gaze at a single LED was separated with pauses. The 60
cVEPs were collected for each of four LED flashing targets. An OpenViBE [5]EEG Filtering Optimization for Chromatic cVEP–based BCI#1Accuracy [%]

100

80

60

60

60

40

40

40

20

10

20

30

40

60

70

80

20

90

0
0

100

#4

100

Accuracy [%]50

high−gb
low−gbhigh−wk
low−wk

20

10

20

30

40

50

60

70

80

90

100

#5

100

0
0

80

80

60

60

60

40

40

40

20

20

10

20

30

40

50

60

70

80

90

100

#7

100

0
0

20

30

40

50

60

70

80

90

100

#8

100

0
0

80

60

60

60

40

40

40

20

20

20

0
0

0
0

30

40

50

60

70

80

Cutoff frequency [Hz]

90

100

30

40

50

60

70

80

90

100

60

70

80

90

100

60

70

80

90

100

#6

10

20

30

40

50

10

20

30

40

60

70

80

Cutoff frequency [Hz]

90

100

0
0

50

#9

100

80

20

20

20

10

80

10

10

100

80

0
0

#3

100

80

0
0

Accuracy [%]

#2

100

80

5

10

20

30

40

50

Cutoff frequency [Hz]Fig. 3. The mean accuracy results of SVM–based classification after low–pass filtering.
There are four results depicted for each user, namely from green–blue high carrier
frequency (blue lines); low carrier frequency (green lines); white–black high carrier
frequency (orange lines); low carrier frequency (red lines), respectively. Square markers
show the maximum accuracies. Four horizontal lines, or dots, at the bottom of eachpanel depict the significant di↵erences of classification accuracies between the non–filtered (raw EEG signals, of which accuracies are not shown here) and the filtered
cVEPs (p < 0.05 of Wilcoxon–test). The theoretical chance level of the experiments
was of 25%.

bio–signal data acquisition and processing environment, together with in–houseprogrammed in Python extensions, were applied to realize the online cVEP–
based BCI paradigm. In the data acquisition phase, user gazed at four LEDs
as instructed. The cVEPs to top LED were firstly collected for the classifier
training and other were used for testing. The triggers indicating the onsets ofthe m sequences were sent to the amplifier directly from the ARDUINO UNO
micro–controller to mark the beginning of each cVEP response.
A linear SVM classifier was used in this study to identify which of the flickering patterns the user was gazing at. The cVEP response processing and classification steps were as follows: (i) for training purpose, the EEG cVEP responses
to the top flashing LED (m–sequence with ⌧ = 0) were defined as Y (t) andanother three cVEPs (responses to bottom, right and left LEDs as shown in
Figure 1) were created by circular shifting of the original Y (t) by ⌧ , 2 · ⌧ and 3 · ⌧respectively; (ii) high–pass Butterworth IIR filters were applied to EEG withcuto↵ frequencies of a and b Hz, where a 2 {6, 7, . . . , 100} Hz; (iii) four–classlinear SVM classifier was trained using 60 filtered cVEPs for each flashing tar-

6

D. Aminaka, S. Makino, and T.M. Rutkowski

get, respectively; (iv) high–pass filters were applied similarly as in (ii) to EEG
for testing dataset with 60 filtered cVEPs to four target m sequences linear
SVM evaluations; (v) the above steps (ii)–(iv) were applied for the frequencies
a = 5, 6, . . . , 100 Hz. The above procedure steps (i)–(v) were also repeated byswitching testing and training cVEPs to the top LED. Finally, four experimenttypes were conducted for each user by employing: the conventional low frequency;
the proposed high frequency; and in each of the above setting in the two color
modes with white–black and green–blue flashing LEDs.

3

Results

Results of the conducted cVEP–based BCI paradigm experiments are summarized in Figures 2 and 3. The accuracies were calculated for cVEPs inducedby four types of stimulations as mentioned in previous section. The theoreticalchance level of all experiments was of 25%. In the case of Figure 2, the mean
high–pass filter cuto↵ frequency of four maximum classification accuracies foreach user was of 5.58 Hz (standard deviation of 2.22 Hz). The significant di↵erences of the above accuracies, as tested with pairwise Wilcoxon–test, between
non–filtered and filtered cVEPs (p < 0.05) were observed as shown in form ofhorizontal lines in at the bottom of each panel in Figure 2.
We next applied low–pass filtering to EEG for identifying the higher frequency features, which resulted with BCI classification accuracies as shown in
Figure 3. Except for subject #1, the results have shown that low–pass cut–o↵frequencies within a range of 10 ⇠ 30 Hz scored the best for all the stimulation
types. The mean cuto↵ frequency of four maximum classification accuracies foreach user was of 20.58 Hz (standard deviation of 14.32 Hz). There were significant di↵erences among non–filtered and filtered result (p < 0.05), as evaluatedwith Wilcoxon–test, yet the frequencies values we user–dependent as shown in
Figure 3.

4

Conclusions

The proposed LED flashing and cVEP response–based BCI paradigm with thechromatic (green–blue) stimulus has been discussed in this paper. We tested andoptimized high– and low–pass filters for cVEP–based BCI accuracy improvement
using linear SVM classifier. The conducted experiments verified the optimal filter
bandwidth for the proposed cVEP feature extraction within the mean range of
5.58 ⇠ 20.58 Hz (which shall round up to 6 ⇠ 21 Hz taking into account theexact frequency steps used in the study). We originally hypothesized that thelow–pass filleting at 30 or 40 Hz cuto↵ frequencies shall do the good job for cVEP
unrelated noise removal, but the results of the presented experiments have shownthat much lower cuto↵ frequencies of about 21 Hz are also feasible.
For the future research, we plan to investigate further details of frequency
features of cVEP, which is a broadband signal due to it’s square wave pseudo–
random components.

EEG Filtering Optimization for Chromatic cVEP–based BCI

7

References
1. Aminaka, D., Makino, S., Rutkowski, T.M.: Chromatic and high–requency cVEP–
based BCI paradigm. In: 2015 37th Annual International Conference of the IEEE
Engineering in Medicine and Biology Society (EMBC). pp. (accepted, in press).
IEEE Engineering in Medicine and Biology Society (2015)
2. Bin, G., Gao, X., Wang, Y., Hong, B., Gao, S.: VEP-based brain-computer interfaces: time, frequency, and code modulations [Research Frontier]. Computational
Intelligence Magazine, IEEE 4(4), 22–26 (2009)
3. Bin, G., Gao, X., Wang, Y., Li, Y., Hong, B., Gao, S.: A high-speed BCI based oncode modulation VEP. Journal of Neural Engineering 8(2), 025015 (2011)
4. Plum, F., Posner, J.B.: The Diagnosis of Stupor and Coma. FA Davis, Philadelphia,
PA, USA (1966)
5. Renard, Y., Lotte, F., Gibert, G., Congedo, M., Maby, E., Delannoy, V., Bertrand,O., Lécuyer, A.: Openvibe: an open-source software platform to design, test, and use
brain-computer interfaces in real and virtual environments. Presence: teleoperatorsand virtual environments 19(1), 35–53 (2010)
6. Sakurada, T., Kawase, T., Komatsu, T., Kansaku, K.: Use of high-frequency visual stimuli above the critical flicker frequency in a SSVEP-based BMI. Clinical
Neurophysiology p. (online first) (2014)
7. Wolpaw, J., Wolpaw, E.W. (eds.): Brain-Computer Interfaces: Principles and Practice. Oxford University Press (2012)