# The SSVEP-Based BCI Text Input System Using Entropy Encoding Algorithm

Authors: Yeou-Jiunn Chen; Shih-Chung Chen; Ilham A. E. Zaeni; Chung-Min Wu; Andrew Jason Tickle; Pei-Jarn Chen
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

The so-called amyotrophic lateral sclerosis (ALS) or motor neuron disease (MND) is a neurodegenerative disease with various causes. It is characterized by muscle spasticity, rapidly progressive weakness due to muscle atrophy, and difficulty in speaking, swallowing, and breathing. The severe disabled always have a common problem that is about communication except physical malfunctions. The steady-state visually evoked potential based brain computer interfaces (BCI), which apply visual stimulus, are very suitable to play the role of communication interface for patients with neuromuscular impairments. In this study, the entropy encoding algorithm is proposed to encode the letters of multilevel selection interface for BCI text input systems. According to the appearance frequency of each letter, the entropy encoding algorithm is proposed to construct a variable-length tree for the letter arrangement of multilevel selection interface. Then, the Gaussian mixture models are applied to recognize electrical activity of the brain. According to the recognition results, the multilevel selection interface guides the subject to spell and type the words. The experimental results showed that the proposed approach outperforms the baseline system, which does not consider the appearance frequency of each letter. Hence, the proposed approach is able to ease text input interface for patients with neuromuscular impairments.


---

## Body

## 1. Introduction

The neurodegenerative disease or spinal cord injury always reduces the muscle ability and results in difficulties in speaking, swallowing, and breathing. The life quality of people with the above disease is always greatly reduced. Therefore, it would make them find difficulty in performing even simple activities, such as communicating with other people. Although these severely disabled lost many human functions, they still have healthy eyes and brain which can help them see and think. In order to better provide the needs of these severely disabled, a lot of high technology assistive devices have been developed in recent years. There is an interactive method by brain computer interface (BCI) technology proposed in this paper to help the disabled communicate with other people.A BCI connects human brain to computer or other devices by attaching electrodes on the human scalp. In general, we can acquire the electroencephalography (EEG) and extract several features from the EEG signals by using BCI technology. The BCI technology will help people to send messages or commands to the outside world or devices without saying any word [1]. Besides, BCI technology is noninvasive and it would ease the uncomfortableness of subject with motor neuron disease when the subject accepts EEG acquisition [2–5].Previous studies on BCI topic use event-related potential (ERP) method associated with either physical or mental occurrence in time. Event-related potential often includes theμ and β rhythms, slow cortical potential, P300-evoked potential, and the steady-state visually evoked potential (SSVEP) [2]. The visually evoked potential (VEP) is a form of slow cortical potential, which is a visual stimulus, such as an alternating checkerboard pattern displayed on the screen to elicit evoked potential, such as an alternating checkerboard pattern, [6]. Chen et al. developed a BCI-controlled LEGO page turner by using VEP technology [7]. The BCI control page turner proved that EEG recognition rate of the system is high enough to be used in practical application, but the duration for each trial was about 7 to 12 seconds.Recently, the BCI technology is utilized in mental text input systems by using different methods of EEG recognition, such as P300, motor imagery, and steady-state evoked potential (SSVEP) [8, 9]. The BCI based text input system using P300 is one of the earliest types of BCI. For such interface, the user needs to select a command in the row and the column from a matrix [10]. It needs longer EEG recognition time generally because P300 needs more raw EEG data for recognition. In order to reduce the response time and increase the signal-to-noise ratio, SSVEP had been widely used in BCI. SSVEP is an oscillatory EEG wave that appears in the occipital lobe of the subject’s brain in response to visual stimuli modulated at a certain frequency [3]. The frequency of EEG signal in the occipital lobe matches that of the visual stimulus and its harmonics when using SSVEP method [2, 4]. Xu et al. and Yin et al. proposed a mental text input system by combining P300 and SSVEP [11, 12]. Obermaier et al. used spontaneous EEG signal to implement a mental text input system [13]. But the number of stimulating frequencies used in a SSVEP-based BCI application should be larger than the number of commands [14]. Thus, the performance of these approaches would be greatly reduced when the number of commands is increased. Therefore, a multilevel selection interface is needed to reduce the number of stimulating frequencies and then the recognition rate of a text input system can be improved.An entropy encoding algorithm is a lossless data compression scheme and it could assign a unique prefix-free code to each unique symbol. The length of each code word is approximately proportional to the negative logarithm of the probability. Therefore, the most common symbols use the shortest codes [15–17]. For the SSVEP-based BCI text input system, the code length of a letter represents how and how many times to select a letter from the multilevel letter options. An entropy encoding algorithm such as Huffman coding can find a minimal prefix code if the probability distribution of source symbol sets is known [15]. Therefore, entropy encoding algorithm is able to efficiently generate the structure of multilevel selection. Besides, in order to increase the efficiency of binary selection, D-ary coding method was proposed to represent large source of letter [17]. Thus, integrating an entropy encoding algorithm would greatly improve the efficiency of multilevel selection.In this study, a multilevel selection interface using entropy encoding algorithm is applied to a SSVEP-based BCI text input system. In order to improve the accuracy of SSVEP-based BCI, a multilevel selection interface is proposed to reduce the candidates of a decision model. For the purpose of improving the efficiency of multilevel selection interface, the letters are arranged to fit a tree structure by using an entropy encoding algorithm, which considers the appearance frequency of each letter. The Bayesian decision model with Gaussian mixture model is adopted to classify frequency responses.The rest of this paper is organized as follows. Section2 describes the entropy encoding algorithm based multilevel selection interface for a SSVEP-based BCI text input system, including EEG feature extraction, design of multilevel selection interface, and Bayesian decision model with Gaussian mixture model. Section 3 presents the results of a series of experiments examining the performance of the proposed approach. In Section 4, the conclusion and recommendations for future research are presented.


## 2. Methods

In this section, a SSVEP-based BCI text input system is presented to improve performance beyond that of previously proposed methods. First, the power spectrum of EEG is extracted and used to represent the evoked response of a user. Second, the letters are optimally arranged as a tree structure and used to design the multilevel selection interface. Finally, the Bayesian decision model with Gaussian mixture model is used to decide the correct selection. The procedure of proposed approach is described in the following subsections. Feature extraction is presented in Section2.1. Then, the design procedure of multilevel selection interface is described in Section 2.2. The Bayesian decision model with Gaussian mixture model is then described in Section 2.3.


### 2.1. Feature Extraction

In this subsection, the features used in this study are presented. For a EEG signal,x, an exponentially modified Gaussian function based on nonlinear curve fit model, f
x, is used to remove the drift phenomenon of EEG signal. The f
x is defined as (1)
f
x
=
y
0
+
A
t
0
exp
⁡
1
2
w
t
0
2
-
x
-
x
c
t
0
1
2
+
1
2
erf
⁡
z
2
,where y
0 is the offset from the y-axis and A is the amplitude of the data set. x
c, w, and t
0 are the mean of x, width of the function, and the modification factor, respectively. z is then defined as(2)
z
=
x
-
x
c
w
-
w
t
0
.The error function erf
⁡
· in (1) is an error function and is defined as(3)
erf
⁡
z
=
2
π
∫
0
z
exp
⁡
-
u
2
d
u
.After removing the drift phenomenon ofx, a 2nd order band-pass filter is used to limit the frequency range of x to the subject’s responses on visual stimulation. Then, the Savitzky-Golay filter, g
t, is adopted to smooth the signal and reduce noise and it is defined as(4)
g
t
=
∑
i
=
-
n
L
n
R
c
i
×
f
t
+
i
,where n
L and n
R are the number of samples before and after each considered sample at time t, respectively. c
i is the weighting coefficients of a filter, which can keep higher moments [18, 19].To estimate the evoked response, the power spectrum ofg
· can be calculated by using fast Fourier transform [20] which can be written as(5)
g
-
d
=
1
N
∑
n
=
0
N
-
1
g
n
ex
p
j
(
2
π
/
N
)
n
d
,where d
∈
{
0,1
,
.
.
.
,
N
-
1
} and N is the length of g
·. Then the power spectrum can be calculated as(6)
E
=
lim
T
→
∞
1
2
T
∫
-
T
T
g
-
t
2
d
t
.


### 2.2. Design of Multilevel Selection Interface

The procedure to design a multilevel selection interface is illustrated in this subsection. The frequencies of used letters, which were calculated from several large-scale English corpora, can be found in previous study [21] and the letters were tabulated and divided into upper- and lower-case letter. Since the probability of a letter is derived from the letter appearance frequency, the probability should meet the condition of the following equation:(7)
∑
i
=
1
M
P
(
i
)
=
1
,where P
i and M are the probability of ith letter and the number of letters used in a text input system, respectively.For multilevel selection interface, there are 5 block options used to represent the selections. In these options, 4 options are used to select a letter or a group of letters. The 5th option is “SPACE” and “BACK command” for the first and other level, respectively. The “BACK command” enables a user to back a previous level when he/she makes a wrong selection. An example of multilevel selection interface is shown in Figure1. The option number 0 to 3 in the level 1 contains every letter. In the levels 2 and 3, the options number 0–3 only contain the letter in the chosen box on levels 1 and 2, respectively. Multilevel selection interface is shown on Figure 1 and the letters for each option of level 1 are sequentially assigned to the options. The results of level 2 and level 3 assumed that the option 0 of level 1 and level 2 is selected.Figure 1
An example of multilevel selection interface.The purpose of allocating the letter position into the optimal option block can effectively reduce the selecting times of multilevel selection interface and then the entropy encoding algorithm is able to find an optimal allocation of letters. Thus, an entropy encoding algorithm proposed by Huffman is integrated to find an assignment of letter and is denoted by EEA. In this approach,D-ary Huffman coding with D equal to 4 is used to provide 4 selections.Furthermore, Navarro and Brisaboa had shown that the average length of codes for an encoding algorithm can be effectively reduced by adding dummy letters with zero probability. Therefore, the dummy letters with zero probability are considered in this study (denoted by EEA_D) and then the number of letters modeled by EEA_D (denoted byN
L) can be calculated by the following equation: (8)
N
L
=
D
+
k
D
-
1
,where k and D are any integer number and the number of options at each node.


### 2.3. Bayesian Decision Model

For an input EEG signal, a power spectrum,E, is estimated and used to decide a selection, w
^, from options of multilevel selection interface. The decision model is based on posterior probability and is defined as(9)
w
^
=
arg
max
⁡
w
i
P
w
i
∣
E
,where w
i is a model of ith option. According to Bayesian theory, (9) can be derived as(10)
w
^
=
arg
max
⁡
w
i
P
w
i
P
E
P
E
∣
w
i
.The P
(
E
) is a constant and P
(
w
i
) is assumed to be a uniform distribution in this study. Thus, P
(
E
) and P
(
w
i
) can be omitted without affecting the decision and then (10) can be rewritten as(11)
w
^
=
arg
max
⁡
w
i
P
E
∣
w
i
.In this study, a Gaussian probability density function inm-dimension space is used to model the probability P
(
w
i
∣
k
) and then it can be written as(12)
P
E
∣
w
i
=
1
2
π
(
m
/
2
)
Σ
(
1
/
2
)
exp
⁡
-
1
2
E
-
μ
T
Σ
-
1
E
-
μ
,where μ and Σ are the mean and variance.


## 2.1. Feature Extraction

In this subsection, the features used in this study are presented. For a EEG signal,x, an exponentially modified Gaussian function based on nonlinear curve fit model, f
x, is used to remove the drift phenomenon of EEG signal. The f
x is defined as (1)
f
x
=
y
0
+
A
t
0
exp
⁡
1
2
w
t
0
2
-
x
-
x
c
t
0
1
2
+
1
2
erf
⁡
z
2
,where y
0 is the offset from the y-axis and A is the amplitude of the data set. x
c, w, and t
0 are the mean of x, width of the function, and the modification factor, respectively. z is then defined as(2)
z
=
x
-
x
c
w
-
w
t
0
.The error function erf
⁡
· in (1) is an error function and is defined as(3)
erf
⁡
z
=
2
π
∫
0
z
exp
⁡
-
u
2
d
u
.After removing the drift phenomenon ofx, a 2nd order band-pass filter is used to limit the frequency range of x to the subject’s responses on visual stimulation. Then, the Savitzky-Golay filter, g
t, is adopted to smooth the signal and reduce noise and it is defined as(4)
g
t
=
∑
i
=
-
n
L
n
R
c
i
×
f
t
+
i
,where n
L and n
R are the number of samples before and after each considered sample at time t, respectively. c
i is the weighting coefficients of a filter, which can keep higher moments [18, 19].To estimate the evoked response, the power spectrum ofg
· can be calculated by using fast Fourier transform [20] which can be written as(5)
g
-
d
=
1
N
∑
n
=
0
N
-
1
g
n
ex
p
j
(
2
π
/
N
)
n
d
,where d
∈
{
0,1
,
.
.
.
,
N
-
1
} and N is the length of g
·. Then the power spectrum can be calculated as(6)
E
=
lim
T
→
∞
1
2
T
∫
-
T
T
g
-
t
2
d
t
.


## 2.2. Design of Multilevel Selection Interface

The procedure to design a multilevel selection interface is illustrated in this subsection. The frequencies of used letters, which were calculated from several large-scale English corpora, can be found in previous study [21] and the letters were tabulated and divided into upper- and lower-case letter. Since the probability of a letter is derived from the letter appearance frequency, the probability should meet the condition of the following equation:(7)
∑
i
=
1
M
P
(
i
)
=
1
,where P
i and M are the probability of ith letter and the number of letters used in a text input system, respectively.For multilevel selection interface, there are 5 block options used to represent the selections. In these options, 4 options are used to select a letter or a group of letters. The 5th option is “SPACE” and “BACK command” for the first and other level, respectively. The “BACK command” enables a user to back a previous level when he/she makes a wrong selection. An example of multilevel selection interface is shown in Figure1. The option number 0 to 3 in the level 1 contains every letter. In the levels 2 and 3, the options number 0–3 only contain the letter in the chosen box on levels 1 and 2, respectively. Multilevel selection interface is shown on Figure 1 and the letters for each option of level 1 are sequentially assigned to the options. The results of level 2 and level 3 assumed that the option 0 of level 1 and level 2 is selected.Figure 1
An example of multilevel selection interface.The purpose of allocating the letter position into the optimal option block can effectively reduce the selecting times of multilevel selection interface and then the entropy encoding algorithm is able to find an optimal allocation of letters. Thus, an entropy encoding algorithm proposed by Huffman is integrated to find an assignment of letter and is denoted by EEA. In this approach,D-ary Huffman coding with D equal to 4 is used to provide 4 selections.Furthermore, Navarro and Brisaboa had shown that the average length of codes for an encoding algorithm can be effectively reduced by adding dummy letters with zero probability. Therefore, the dummy letters with zero probability are considered in this study (denoted by EEA_D) and then the number of letters modeled by EEA_D (denoted byN
L) can be calculated by the following equation: (8)
N
L
=
D
+
k
D
-
1
,where k and D are any integer number and the number of options at each node.


## 2.3. Bayesian Decision Model

For an input EEG signal, a power spectrum,E, is estimated and used to decide a selection, w
^, from options of multilevel selection interface. The decision model is based on posterior probability and is defined as(9)
w
^
=
arg
max
⁡
w
i
P
w
i
∣
E
,where w
i is a model of ith option. According to Bayesian theory, (9) can be derived as(10)
w
^
=
arg
max
⁡
w
i
P
w
i
P
E
P
E
∣
w
i
.The P
(
E
) is a constant and P
(
w
i
) is assumed to be a uniform distribution in this study. Thus, P
(
E
) and P
(
w
i
) can be omitted without affecting the decision and then (10) can be rewritten as(11)
w
^
=
arg
max
⁡
w
i
P
E
∣
w
i
.In this study, a Gaussian probability density function inm-dimension space is used to model the probability P
(
w
i
∣
k
) and then it can be written as(12)
P
E
∣
w
i
=
1
2
π
(
m
/
2
)
Σ
(
1
/
2
)
exp
⁡
-
1
2
E
-
μ
T
Σ
-
1
E
-
μ
,where μ and Σ are the mean and variance.


## 3. Experimental Results and Discussion

To evaluate the proposed approach, the number of options used in multilevel selection interface is set to be 5. Besides, the letters used in this SSVEP-based BCI text input system can be categorized into four groups, including 26 uppercase letters, 26 lowercase letters, 10 numbers (from 0 to 9), and 4 special letters (comma, dot, question mark, and exclamation mark). The subjects were visually stimulated by using an LCD screen and the visual stimulator flickering at five frequencies from 6 Hz to 10 Hz with 1 Hz increment. Then, the EEG signals were measured using electrodes placed at the Oz, A1, and A2 (ground) in accordance with the international EEG 10–20 system. The sampling rate and the frame size were set to be 1 k Hz and 1000, respectively. Besides, a 2nd order band-pass filter with cut-off frequencies between 5 and 30 Hz is used to limit the frequency range of the EEG signals to the subject’s responses on visual stimulation.


### 3.1. Experimental Results of Multilevel Selection Interface

To evaluate the performance of different multilevel selection interface, the average message length is adopted and it can be derived as(13)
L
av
=
∑
i
=
1
N
P
i
L
i
,where L
av, P
(
i
), and L
(
i
) are average message length, probability of ith letter, and message length of ith letter, respectively.In this study, the arrangement of letters can be modeled as a tree structure. Therefore, an approach, which does not consider the appearance frequency of each letter, was treated as a baseline system and was used to compare with the proposed approaches EEA and EEA_D. In the baseline system as shown in Figure1, the majority of the letters were distributed inside each option block on the level 1. All the numbers, uppercase letters, and lowercase letters were put inside the left three option blocks of level 1, while the special letters were put inside the fourth option block of level 1. Each option block of level 1 contained 16 letters, while each option block of level 2 and level 3 contained 4 letters and 1 letter, respectively. For EEA_D, there were 66 letters used in the text input system and D was 4. Thus, the k of (8) was 21 in this study.The codes of letters for baseline, EEA, and EEA_D multilevel selection interface were shown in Tables1, 2, and 3, respectively. These codes represented the selection order chosen by the subject on each level. For example, a letter “D” on baseline system is encoded as “011.” It means that the subject should choose options 0, 1, and 1 on level 1, level 2, and level 3, respectively, if the subject wants to type letter “D.” When it is expressed as a tree structure, the result is shown in Figure 2.Table 1
The encoding results of baseline system.
Letter
Code
Letter
Code
Letter
Code
A
000
W
112
s
222
B
001
X
113
t
223
C
010
Y
120
u
232
D
011
Z
121
v
233
E
002
a
130
w
300
F
003
b
131
x
301
G
012
c
122
y
310
H
013
d
123
z
311
I
020
e
132
0
302
J
021
f
133
1
303
K
030
g
200
2
312
L
031
h
201
3
313
M
022
i
210
4
320
N
023
j
211
5
321
O
032
k
202
6
330
P
033
l
203
7
331
Q
100
m
212
8
322
R
101
n
213
9
323
S
110
o
220
?
3320
T
111
p
221
!
3321
U
102
q
230
,
3322
V
103
r
231
.
3323Table 2
The encoding results of EEA.
Letter
Code
Letter
Code
Letter
Code
A
11
W
0001
s
1230
B
0003
X
01203
t
0333
C
011
Y
0000
u
000202
D
010
Z
000200
v
012001
E
02
a
1232
w
01231
F
120
b
00303
x
0120021
G
122
c
00021
y
03311
H
001
d
01201
z
0120022
I
21
e
00323
0
0033
J
03313
f
03310
1
0121
K
0122
g
03312
2
0332
L
002
h
01202
3
00301
M
032
i
00022
4
00300
N
20
j
000201
5
0330
O
13
k
012000
6
00320
P
121
l
01232
7
01230
Q
000203
m
1233
8
00302
R
23
n
00023
9
1231
S
22
o
01233
?
012003
T
10
p
00322
!
0120023
U
031
q
0120020
,
030
V
0031
r
00321
.
013Table 3
The encoding results of EEA_D.
Letter
Code
Letter
Code
Letter
Code
A
2211
W
3333
s
20
B
2332
X
1012210
t
02
C
2213
Y
01123
u
012
D
3313
Z
1012211
v
330
E
3312
a
03
w
222
F
01122
b
231
x
3331
G
10120
c
010
y
220
H
3330
d
32
z
10123
I
2321
e
00
0
332
J
10121
f
100
1
0110
K
23203
g
103
2
1010
L
01120
h
30
3
2330
M
2212
i
13
4
2323
N
2322
j
23200
5
0113
O
01121
k
0111
6
2333
P
3311
l
31
7
3332
Q
101223
m
013
8
2331
R
3310
n
12
9
2210
S
1013
o
11
?
101222
T
1011
p
102
!
1012212
U
23201
q
23202
,
223
V
101220
r
21
.
230Figure 2
An example to represent a letter “D” with code “011” in tree structure.To compare the performance of baseline system, EEA, and EEA_D, the experimental results expressed as average, minimum, and maximum length of codes were shown in Table4. The average lengths of codes were 3.03, 2.63, and 2.42 for baseline, EEA, and EEA_D, respectively. We also can find that the minimum code length of EEA and EEA_D was 2, which was smaller than the minimum code length of baseline approach. However, the maximum code length of EEA and EEA_D was 7, which was larger than that of baseline approach. Thus, to minimize the average length of codes for EEA and EEA_D, the entropy encoding algorithm needs to increase the length of codes for letters with low appearance frequency.Table 4
The experimental results expressed as average, minimum, and maximum length of codes for different approaches.
Method
Average
Minimum
Maximum
length
length
length
Baseline
3.03
3
4
EEA
2.63
2
7
EEA_D
2.42
2
7Next, the proposed approaches are examined by using two types of sentences which are pangram and nonpangram. A pangram is a sentence that contains all letters of the alphabet. The testing pangrams are shown as follows.(1)
Bored? Craving a pub quiz fix? Why, just come to the Royal Oak!
(2)
Sphinx of black quartz, judge my vow!
(3)
Just keep examining every low bid quoted for zinc etchings.
(4)
How razorback jumping frogs can level six piqued gymnasts!
(5)
Grumpy wizards make toxic brew for the evil queen and Jack.The testing nonpangrams (NP) are shown as follows.(1)
Life is not about getting and having, it is about giving and being.
(2)
Whatever the mind of man can conceive and believe, it can achieve.
(3)
Strive not to be a success, but rather to be of value.
(4)
Two roads diverged in a wood, and I took the one less traveled by, And that has made all the difference.
(5)
I attribute my success to this, I never gave or took any excuse.The experimental results for pangram and nonpangram were shown in Table5. For pangrams, the average lengths of codes were 3.04, 3.03, and 2.78 for baseline, EEA, and EEA_D, respectively. The average lengths of codes for nonpangrams were 3.04, 2.55, and 2.33 for baseline, EEA, and EEA_D, respectively. When the sentence is nonpangrams, it is clear that the performance of EEA can be greatly improved from 3.03 to 2.55 (2.78 to 2.33 for EEA_D). Therefore, the appearance frequencies of letters are very important for nonpangrams. For a text input system, the nonpangrams match the writing or spelling in real world. Thus, the proposed approaches EEA and EEA_D are able to greatly improve the performance of a text input system.Table 5
The average length of codes for pangrams and nonpangrams.
Number
Pangrams
Nonpangrams
Baseline
EEA
EEA_D
Baseline
EEA
EEA_D
1
3.08
3.27
2.98
3.04
2.53
2.35
2
3.06
3.35
3.03
3.04
2.56
2.31
3
3.02
2.74
2.54
3.05
2.56
2.35
4
3.02
2.92
2.72
3.04
2.55
2.26
5
3.02
2.86
2.65
3.04
2.56
2.40
Average
3.04
3.03
2.78
3.04
2.55
2.33


### 3.2. Experimental Results of SSVEP-Based BCI Text Input System

In this subsection, the performance of proposed SSVEP-based BCI text input system was examined. 12 subjects (10 males and 2 females), who have normal vision and had no history of any neurological or psychological disorders, were asked to participate in the experiments. The average age of the subjects is 20.9 and 21.5 years old for males and females, respectively.In this experiment, the evoked responses of the visual stimulation from 6 Hz to 10 Hz with 1 Hz increment are used to represent the five options in multilevel selection interface. Then the Bayesian decision models were used to recognize the evoked EEG signal of the subject due to these letter options. The experimental results were shown in Figure3 and the average recognition rate was 89.50%. It is clear that the accuracy of 4 kinds of visual stimulation frequencies from 6 Hz to 9 Hz was higher than 85% and then it can be applied to a practical application. However, the accuracy of 10 Hz is lower than those of other visual stimulation frequencies. An example of evoked EEG signals was shown in Figure 4 and then it was observed that the signal-to-noise rate of 7 Hz is higher than that of 10 Hz. Thus, it would greatly reduce the performance of the text input system. To overcome this disadvantage, the blinking frequency 10 Hz should be assigned to an option block, which includes the infrequently used letters or special marks in a BCI text input system. Thus, in this study, the blinking frequency 10 Hz was assigned to the 5th option block on level 1 which includes the “SPACE” and “BACK” commands.Figure 3
The experimental results of proposed SSVEP-BCI based text input system.Figure 4
The examples of evoked signals for (a) 7 Hz and (b) 10 Hz.
(a)
(b)


### 3.3. Experimental Results of Proposed Approach

The performance of proposed approach was examined by using the information transfer rate (ITR). The ITR used in this study is based on Wolpaw method, which is presented by Volosyak [22], and then it can be defined as(14)
B
t
=
lo
g
2
D
+
p
lo
g
2
R
+
1
-
R
lo
g
2
1
-
R
D
-
1
,where R is the accuracy of the EEG recognition. The unit of ITR is then expressed as bits per trial. It is clear that B
t is greatly dependent on recognition rate and the response time of a system. Therefore, the ITR considering response time is used in this study and it is defined as(15)
ITR
=
60
T
·
D
·
B
t
,where T is the time duration to input all testing letters.The ITR were 31.9 bits/min, 39.04 bits/min, and 42.62 bits/min for baseline, EEA, and EEA_D, respectively, after the experiments for the SSVEP-based BCI text input system. It is clear that the ITR can be improved by arranging the order of the letters in a multilevel selection interface. According to the entropy encoding algorithm, the input times for a letter with high appearance frequency can be effectively reduced and then the ITR can be effectively improved. In this experiment, the accuracy of an option (blinking frequency is 10 Hz) is lower than other option blocks (blinking at 6 Hz, 7 Hz, 8 Hz, and 9 Hz) and it can be regarded as an infrequent option block for allocating the letters or special marks with low appearance inside. So, the ITR is not seriously affected by the entropy encoding algorithmin this study. However, when the accuracy is quite different for each option, the ITR would be greatly affected and the accuracy should be considered in a multilevel selection interface.


## 3.1. Experimental Results of Multilevel Selection Interface

To evaluate the performance of different multilevel selection interface, the average message length is adopted and it can be derived as(13)
L
av
=
∑
i
=
1
N
P
i
L
i
,where L
av, P
(
i
), and L
(
i
) are average message length, probability of ith letter, and message length of ith letter, respectively.In this study, the arrangement of letters can be modeled as a tree structure. Therefore, an approach, which does not consider the appearance frequency of each letter, was treated as a baseline system and was used to compare with the proposed approaches EEA and EEA_D. In the baseline system as shown in Figure1, the majority of the letters were distributed inside each option block on the level 1. All the numbers, uppercase letters, and lowercase letters were put inside the left three option blocks of level 1, while the special letters were put inside the fourth option block of level 1. Each option block of level 1 contained 16 letters, while each option block of level 2 and level 3 contained 4 letters and 1 letter, respectively. For EEA_D, there were 66 letters used in the text input system and D was 4. Thus, the k of (8) was 21 in this study.The codes of letters for baseline, EEA, and EEA_D multilevel selection interface were shown in Tables1, 2, and 3, respectively. These codes represented the selection order chosen by the subject on each level. For example, a letter “D” on baseline system is encoded as “011.” It means that the subject should choose options 0, 1, and 1 on level 1, level 2, and level 3, respectively, if the subject wants to type letter “D.” When it is expressed as a tree structure, the result is shown in Figure 2.Table 1
The encoding results of baseline system.
Letter
Code
Letter
Code
Letter
Code
A
000
W
112
s
222
B
001
X
113
t
223
C
010
Y
120
u
232
D
011
Z
121
v
233
E
002
a
130
w
300
F
003
b
131
x
301
G
012
c
122
y
310
H
013
d
123
z
311
I
020
e
132
0
302
J
021
f
133
1
303
K
030
g
200
2
312
L
031
h
201
3
313
M
022
i
210
4
320
N
023
j
211
5
321
O
032
k
202
6
330
P
033
l
203
7
331
Q
100
m
212
8
322
R
101
n
213
9
323
S
110
o
220
?
3320
T
111
p
221
!
3321
U
102
q
230
,
3322
V
103
r
231
.
3323Table 2
The encoding results of EEA.
Letter
Code
Letter
Code
Letter
Code
A
11
W
0001
s
1230
B
0003
X
01203
t
0333
C
011
Y
0000
u
000202
D
010
Z
000200
v
012001
E
02
a
1232
w
01231
F
120
b
00303
x
0120021
G
122
c
00021
y
03311
H
001
d
01201
z
0120022
I
21
e
00323
0
0033
J
03313
f
03310
1
0121
K
0122
g
03312
2
0332
L
002
h
01202
3
00301
M
032
i
00022
4
00300
N
20
j
000201
5
0330
O
13
k
012000
6
00320
P
121
l
01232
7
01230
Q
000203
m
1233
8
00302
R
23
n
00023
9
1231
S
22
o
01233
?
012003
T
10
p
00322
!
0120023
U
031
q
0120020
,
030
V
0031
r
00321
.
013Table 3
The encoding results of EEA_D.
Letter
Code
Letter
Code
Letter
Code
A
2211
W
3333
s
20
B
2332
X
1012210
t
02
C
2213
Y
01123
u
012
D
3313
Z
1012211
v
330
E
3312
a
03
w
222
F
01122
b
231
x
3331
G
10120
c
010
y
220
H
3330
d
32
z
10123
I
2321
e
00
0
332
J
10121
f
100
1
0110
K
23203
g
103
2
1010
L
01120
h
30
3
2330
M
2212
i
13
4
2323
N
2322
j
23200
5
0113
O
01121
k
0111
6
2333
P
3311
l
31
7
3332
Q
101223
m
013
8
2331
R
3310
n
12
9
2210
S
1013
o
11
?
101222
T
1011
p
102
!
1012212
U
23201
q
23202
,
223
V
101220
r
21
.
230Figure 2
An example to represent a letter “D” with code “011” in tree structure.To compare the performance of baseline system, EEA, and EEA_D, the experimental results expressed as average, minimum, and maximum length of codes were shown in Table4. The average lengths of codes were 3.03, 2.63, and 2.42 for baseline, EEA, and EEA_D, respectively. We also can find that the minimum code length of EEA and EEA_D was 2, which was smaller than the minimum code length of baseline approach. However, the maximum code length of EEA and EEA_D was 7, which was larger than that of baseline approach. Thus, to minimize the average length of codes for EEA and EEA_D, the entropy encoding algorithm needs to increase the length of codes for letters with low appearance frequency.Table 4
The experimental results expressed as average, minimum, and maximum length of codes for different approaches.
Method
Average
Minimum
Maximum
length
length
length
Baseline
3.03
3
4
EEA
2.63
2
7
EEA_D
2.42
2
7Next, the proposed approaches are examined by using two types of sentences which are pangram and nonpangram. A pangram is a sentence that contains all letters of the alphabet. The testing pangrams are shown as follows.(1)
Bored? Craving a pub quiz fix? Why, just come to the Royal Oak!
(2)
Sphinx of black quartz, judge my vow!
(3)
Just keep examining every low bid quoted for zinc etchings.
(4)
How razorback jumping frogs can level six piqued gymnasts!
(5)
Grumpy wizards make toxic brew for the evil queen and Jack.The testing nonpangrams (NP) are shown as follows.(1)
Life is not about getting and having, it is about giving and being.
(2)
Whatever the mind of man can conceive and believe, it can achieve.
(3)
Strive not to be a success, but rather to be of value.
(4)
Two roads diverged in a wood, and I took the one less traveled by, And that has made all the difference.
(5)
I attribute my success to this, I never gave or took any excuse.The experimental results for pangram and nonpangram were shown in Table5. For pangrams, the average lengths of codes were 3.04, 3.03, and 2.78 for baseline, EEA, and EEA_D, respectively. The average lengths of codes for nonpangrams were 3.04, 2.55, and 2.33 for baseline, EEA, and EEA_D, respectively. When the sentence is nonpangrams, it is clear that the performance of EEA can be greatly improved from 3.03 to 2.55 (2.78 to 2.33 for EEA_D). Therefore, the appearance frequencies of letters are very important for nonpangrams. For a text input system, the nonpangrams match the writing or spelling in real world. Thus, the proposed approaches EEA and EEA_D are able to greatly improve the performance of a text input system.Table 5
The average length of codes for pangrams and nonpangrams.
Number
Pangrams
Nonpangrams
Baseline
EEA
EEA_D
Baseline
EEA
EEA_D
1
3.08
3.27
2.98
3.04
2.53
2.35
2
3.06
3.35
3.03
3.04
2.56
2.31
3
3.02
2.74
2.54
3.05
2.56
2.35
4
3.02
2.92
2.72
3.04
2.55
2.26
5
3.02
2.86
2.65
3.04
2.56
2.40
Average
3.04
3.03
2.78
3.04
2.55
2.33


## 3.2. Experimental Results of SSVEP-Based BCI Text Input System

In this subsection, the performance of proposed SSVEP-based BCI text input system was examined. 12 subjects (10 males and 2 females), who have normal vision and had no history of any neurological or psychological disorders, were asked to participate in the experiments. The average age of the subjects is 20.9 and 21.5 years old for males and females, respectively.In this experiment, the evoked responses of the visual stimulation from 6 Hz to 10 Hz with 1 Hz increment are used to represent the five options in multilevel selection interface. Then the Bayesian decision models were used to recognize the evoked EEG signal of the subject due to these letter options. The experimental results were shown in Figure3 and the average recognition rate was 89.50%. It is clear that the accuracy of 4 kinds of visual stimulation frequencies from 6 Hz to 9 Hz was higher than 85% and then it can be applied to a practical application. However, the accuracy of 10 Hz is lower than those of other visual stimulation frequencies. An example of evoked EEG signals was shown in Figure 4 and then it was observed that the signal-to-noise rate of 7 Hz is higher than that of 10 Hz. Thus, it would greatly reduce the performance of the text input system. To overcome this disadvantage, the blinking frequency 10 Hz should be assigned to an option block, which includes the infrequently used letters or special marks in a BCI text input system. Thus, in this study, the blinking frequency 10 Hz was assigned to the 5th option block on level 1 which includes the “SPACE” and “BACK” commands.Figure 3
The experimental results of proposed SSVEP-BCI based text input system.Figure 4
The examples of evoked signals for (a) 7 Hz and (b) 10 Hz.
(a)
(b)


## 3.3. Experimental Results of Proposed Approach

The performance of proposed approach was examined by using the information transfer rate (ITR). The ITR used in this study is based on Wolpaw method, which is presented by Volosyak [22], and then it can be defined as(14)
B
t
=
lo
g
2
D
+
p
lo
g
2
R
+
1
-
R
lo
g
2
1
-
R
D
-
1
,where R is the accuracy of the EEG recognition. The unit of ITR is then expressed as bits per trial. It is clear that B
t is greatly dependent on recognition rate and the response time of a system. Therefore, the ITR considering response time is used in this study and it is defined as(15)
ITR
=
60
T
·
D
·
B
t
,where T is the time duration to input all testing letters.The ITR were 31.9 bits/min, 39.04 bits/min, and 42.62 bits/min for baseline, EEA, and EEA_D, respectively, after the experiments for the SSVEP-based BCI text input system. It is clear that the ITR can be improved by arranging the order of the letters in a multilevel selection interface. According to the entropy encoding algorithm, the input times for a letter with high appearance frequency can be effectively reduced and then the ITR can be effectively improved. In this experiment, the accuracy of an option (blinking frequency is 10 Hz) is lower than other option blocks (blinking at 6 Hz, 7 Hz, 8 Hz, and 9 Hz) and it can be regarded as an infrequent option block for allocating the letters or special marks with low appearance inside. So, the ITR is not seriously affected by the entropy encoding algorithmin this study. However, when the accuracy is quite different for each option, the ITR would be greatly affected and the accuracy should be considered in a multilevel selection interface.


## 4. Conclusions

In this study, the entropy encoding algorithm was proposed to improve the efficiency of multilevel selection interface for the SSVEP-based BCI text input system. The entropy encoding algorithm was successfully used to improve the efficiency of the tree structure of multilevel selection interface according to the appearance frequency of each letter. The Bayesian decision model with Gaussian mixture model was able to recognize the input options and provided the appropriate EEG recognition. The experimental results demonstrated that the proposed EEA and EEA_D, new letters arrangements in option blocks of BCI, outperform baseline arrangement. The proposed EEA and EEA_D could be applied to a practical application and improve the text input speed and performance of the SSVEP-based BCI text input system. Meanwhile, the SSVEP-based BCI text input system can solve the communication problems for the severely disabled such as amyotrophic lateral sclerosis, cerebral palsy, and spinal cord injury. In the future, the recognition accuracy of evoked EEG signal stimulated with different visual stimulation frequencies should be considered to improve the performance of entropy encoding algorithm for a multilevel selection interface.



---

*Source: 234260-2015-08-27.xml*