You are on page 1of 5

2010 IEEE 6th International Conference on Wireless and Mobile Computing, Networking and Communications

Virtual Keyboard BCI using Eye blinks in EEG

Brijil Chambayil Rajesh Singla


Dept. of Instrumentation and Control Engineering, Dept. of Instrumentation and Control Engineering,
Dr. B. R. Ambedkar National Institute of Technology, Dr. B. R. Ambedkar National Institute of Technology,
Jalandhar, India Jalandhar, India
brijil.chambayil@gmail.com rksingla1975@gmail.com

R. Jha
Dept. of Instrumentation and Control Engineering,
Dr. B. R. Ambedkar National Institute of Technology,
Jalandhar, India
jhar@nitj.ac.in

Abstract— A Brain Computer Interface (BCI) provides a new frequencies respectively are called delta (δ), theta (θ), alpha (α),
communication channel between human brain and the computer. beta (β), and gamma (γ).
This paper is concentrated on developing a BCI system, a Virtual
Keyboard using the LabVIEW platform. The The main artifacts in EEG can be divided into patient-
Electroencephalogram (EEG) signal contains the technical related (physiological) and system artifacts. The patient-related
artifacts (noise from the electric power source, amplitude or internal artifacts are body movement-related, EMG, ECG
artifact, etc.) and biological artifacts (eye artifacts, ECG and (and pulsation), EOG, ballistocardiogram and sweating. The
EMG artifacts). Eye blink is one of the main artifacts in the EEG system artifacts are 50/60 Hz power supply interference,
signal. But in this context the Eye blinks are not artifacts and are impedance fluctuations, cable defects, electrical noise from the
control signals to select the blocks/characters in the Virtual electronic components and unbalanced impedances of the
Keyboard. The kurtosis coefficient and amplitude characteristics electrodes.
of the eye blink signals are used to detect the control signals.
Eye blinks are normally considered as physiological
Keywords- BCI, EEG, Eye blink, Kurtosis, LabVIEW artifacts in the EEG. But if we consider in a BCI point of view,
these signals, although artifacts, can be used as good control
I. INTRODUCTION signals. Eye blink signals can be used in BCI applications like
virtual keyboard while the eye close and eyes open signals can
Amyotrophic lateral sclerosis (ALS), also referred to as Lou be used for folding and opening electric foldable hospital beds.
Gehrig's disease, is a form of motor neuron disease. ALS is
a progressive, fatal, neurodegenerative disease caused by the
II. BRAIN COMPUTER INTERFACE
degeneration of motor neurons, the nerve cells in the central
nervous system that control voluntary muscle movement. The BCI provides a new communication channel between the
disorder causes muscle weakness and atrophy throughout the human brain and the computer. Mental activity leads to
body as both the upper and lower motor neurons degenerate, changes of electrophysiological signals like the EEG. The BCI
ceasing to send messages to muscles. The patient may system detects such changes and transforms it into a control
ultimately lose the ability to initiate and control all voluntary signal which can be used to control a simple video game,
movement; bladder and bowel sphincters and the muscles motion of a wheel chair etc. One of the main goals is to enable
responsible for eye movement are usually (but not always) completely paralyzed patient to communicate with their
spared. environment. The machine should be able to learn to
discriminate between different patterns of brain activity as
It is understood that the EEG signal of ALS patients will accurate as possible and the user of the BCI should learn to
have the least EMG artifact content. The eye event signals can perform different mental tasks in order to produce distinct brain
be easily detected and can be effectively used as controls in signals.
BCI applications.
A BCI is a communication and control system that does not
The electroencephalogram, or EEG, consists of the depend in any way on the brain’s normal neuromuscular output
electrical activity of relatively large neuronal populations that channels. The user’s intent is conveyed by brain signals (such
can be recorded from the scalp. In healthy adults, the as EEG) rather than by peripheral nerves and muscles, and
amplitudes and frequencies of such signals change from one these brain signals do not depend for their generation on
state of a human to another, such as wakefulness and sleep. The neuromuscular activity.
characteristics of the waves also change with age. There are
five major brain waves distinguished by their different Furthermore, as a communication and control system, a
frequency ranges. These frequency bands from low to high BCI establishes a real-time interaction between the user and the

978-1-4244-7742-5/10/$26.00 ©2010 IEEE 466


Figure 1. Block Diagram of BCI system

outside world. The user receives feedback reflecting the B. Kurtosis


outcome of the BCI’s operation, and that feedback can affect
The EEG signal is stochastic, and each set of samples is
the user’s subsequent intent and its expression in brain signals.
called realizations or sample functions (x(t)). The expectance
The first step in developing an effective BCI paradigm is to (µ) is the mean of the realizations and is called first-order
determine suitable control signals from the EEG. A suitable central momentum. The second-order central momentum is the
control signal has the following attributes: it can be precisely variance of the realizations. The square root of the variance is
characterized for an individual, it can be readily modulated or the standard deviation ( σ ), which measures the spread or
translated to express the intention, and it can be detected and dispersion around the mean of the realizations [5].
tracked consistently and reliably [1]. The EEG eye blink
signals have all the above three attributes and hence can be The kurtosis, also called fourth-order central momentum,
used as a control signal. characterizes the relative flatness or peakedness of the signal
distribution [5], and is defined in (1), which was modified to
refer to a non-Gaussian distribution.
III. EYE BLINK CHARACTERISTICS
Eye blinks are typically characterized by peaks with (1)
relatively strong voltages. There is also certain variability in the
amplitude of the peaks of a specific individual, more variability The kurtosis coefficient of an event is significantly high
between different subjects. Eye blinks can be classified as short when there is an eyes-open, eyes-close or an eye blink. The
blinks if the duration of blink is less than 200ms or long blinks other spurious signals generated by patient movement, event
if it is greater or equal to 200ms. like switching ON/OFF a plug etc have a small value for
Eye blinks can be classified into three types: reflexive, kurtosis coefficient. Hence eye events can be detected by
voluntary and spontaneous. The eye blink reflexive is the kurtosis coefficient.
simplest response and does not require the involvement of
cortical structures. In contrast, voluntary eye blinking (i.e.
purposely blinking due to predetermined condition) involves
multiple areas of the cerebral cortex as well as basal ganglion,
brain stem and cerebella structures. Spontaneous eye blinks are
those with no external stimuli specified and they are associated
with the psycho-physiological state of the person.

A. Amplitude
The eye related signals will be predominant in the frontal
and prefrontal regions of the brain. In the prefrontal lobe, say
FP1-F3 or FP2-F4 electrode pairs, a downward peak in the
negative region shows an eyes-open event and a positive peak
shows an eyes-close event. Also the amplitude of these peaks
will be significantly higher compared to the rhythmic brain
activity. An eye-blink signal can be detected by its positive and Figure 2. Eye blink signal
negative peak occurrences.

467
IV. DATA ACQUISITION AND PROCESSING V. INPUTS AND SELECTION SCHEME OF VIRTUAL
The EEG signal is acquired using Biopac MP36 system. KEYBOARD
The Biopac disposable vinyl electrodes (EL 503) are placed on Eye blinks are used as inputs or control signals in this BCI.
the FP1 and F3 region in the 10-20 International electrode The user of the BCI has to produce an eye blink in the specified
system. The reference electrode is placed on the earlobe. The time interval, i.e. 5s interval. The input is of binary nature. The
lead set SS2L connects the electrode to the Channel 1 (CH-1) BCI detects in this 5s interval whether an eye blink is present
of the MP36 system which is further connected to the computer or not.
via USB port.
A single selection can be done in 20s. In every 5s interval
The CH-1 of the Biopac MP36 system is set up as the user should make an eyeblink. So in effect at the end of 20s
‘Electroencephalogram (EEG), 0.5-35 Hz’ mode. In this mode interval the BCI will detect one of the following events.
the gain of the amplifier is 25000. Two hardware filters, a 0.5
Hz high pass filter and a 1 kHz low pass filter, are used in this • Single eye blink occurred
configuration. Also a digital low pass filter having 66.5 Hz cut- • Two eye blinks occurred
off and a 0.5 Q ratio is employed. This ensures the noise free
picking up of EEG signals from the scalp electrodes. The • Three eye blinks occurred
sampling frequency is set at 200 samples per second. The entire alphabets (A - Z) and the space character (--) are
Using the Biopac Student Lab 3.7 software, the EEG data the characters available in the Virtual Keyboard. The total 29
of 14 subjects were taken. The subjects are lying on a bed and characters are divided into three blocks having 9 characters
are supine and relaxed. With the eyes closed the calibration is each.
done. After calibration the EEG is recorded and director gives
instruction to the subject to perform the eye blink event. Every
instruction is given after at least 5 s intervals. The event
markers are introduced into the signal using F9 key. The data is
saved in the .mat format so that it will be easy to access in
MATLAB. The file is saved as EEG data in first column, α-
activity in the second column, β-activity in third, δ-activity in
fourth and θ-activity in the last column.

Figure 5. Various blocks of characters

Figure 3. Data Acquisition System

Figure 6. Selection scheme in the Virtual Keyboard

Figure 4. Actual Photograph showing data recording from a subject with the
instructions from the director

468
The Block 1 contains the characters A – I, the Block 2 data presentation, giving the flexibility of a programming
contains the characters J – R and the Block 3 contains the language without the complexity of traditional development
characters S – Z and space (--) character. The user can select tools. For developing a program in LabVIEW, the user has to
the Block 1 by producing a single eye blink. The selection of a go through the following processes,
block is accompanied by glowing the characters in the block
for a small time interval. This is considered as a visual • Designing the Front Panel
feedback to the user. Similarly the user can select the Block 2 • Developing the Block Diagram code
and Block 3 by producing two eye blinks and three eye blinks
respectively. The corresponding block selected is glowed for a After developing the program it can be used in real world
small time interval. applications.
After the first selection the user can select one of the three A. Front Panel
columns in each block by producing the next set of eye blinks.
The first, second and third column can be selected by one, two The front panel describes how the Virtual Keyboard
and three eye blinks respectively. (Virtual Instrument) looks like. The user will get the feedback
through the graphical displays and LED displays in the front
After the selection of a particular column, a particular panel. The front panel consists of 27 LEDs, one for each
character in that column can be selected using the next set of character. When a block/character is selected these LEDs glow.
eye blinks. Every column has three characters. The first, second
and third character can be selected using one, two and three eye There is a provision to enter the path of the EEG file in the
blinks respectively. After selecting a character the entire disk. The selected character is displayed in the string indicator.
process continues again to select the next character and so on. The complete signal read is shown in the waveform graph
display. The waveform chart displays the 1000 samples (5s) of
the signal. There are numeric indicators showing the kurtosis
VI. DEVELOPING VIRTUAL KEYBOARD IN LABVIEW coefficient value, maximum amplitude and minimum
PLATFORM amplitude of the 1000 samples. The Eye blink LED glows
LabVIEW is a powerful graphical development when it detects an eye blink. The program can be aborted at
environment for signal acquisition, measurement analysis, and any time by pressing the Stop button.

Figure 7. Front Panel of Virtual Keyboard

469
B. Block Diagram VIII. CONCLUSION
The actual programming in LabVIEW is the development This contribution presented a development of a BCI system,
of the block diagram. The block diagram code describes the the Virtual Keyboard. Eye blinks are used as control signals in
utility of a front panel object (a control or an indicator). In the this BCI and kurtosis coefficient, maximum amplitude and
block diagram various loops and structures are used to develop minimum amplitude in a sample window are successfully used
complex algorithms. to detect the eye blinks from non-eye blink signal. The BCI
developed can be used for communication purposes, which use
The signal is read from the file using Read from
eye blinks as control signals, especially for locked-in patients
spreadsheet file function. A while loop in combination with a
like those suffering from Amyotrophic lateral sclerosis (ALS).
for loop and other functions calculates the kurtosis value,
The Virtual Keyboard developed obtained a correct spelling
maximum value and minimum value. A comparison of these
rate of 1.00 character/min which is excellent. The spelling rate
values with the preset values gives a decision, whether eye
can be improved by reducing the time given to produce the eye
blink is present or not. The while loop gives the number of eye
blinks output. This value is used to select the case structure. blink.
According to the code in the case structure the decision is
taken to select a block/character. REFERENCES
[1] Saeid Sanei and J. A. Chambers, “EEG Signal Processing”, First
Edition, ch. 1, p1 – p18, John Wiley and Sons Ltd., 2007.
VII. RESULTS AND DISCUSSION
[2] B. Obermaier, G. R. Müller and G. Pfurtscheller,””Virtual Keyboard”
The Virtual Keyboard developed is a Virtual Instrument controlled by Spontaneous EEG Activity”, IEEE Transactions on Neural
(VI). A character selection rate of 1 character/min is obtained Systems and Rehabilitation Engineering, Vol. 11, No. 4, p422 – p426,
with the current settings. A single selection of the block is December, 2003
obtained in 20s, the column in the block is selected in the next [3] Rajesh Singla, Balraj Gupta, “Brain Initiated Interaction”, Journal of
Biomedical Science and Engineering, p170 – p172, 2008.
20s and the character is selected in the next 20s. Every
selection by the user is accompanied by giving a visual [4] Sovierzoski M.A., Argoud F.I.M., de Azevedo F.M., “Identifying eye
blinks in EEG signal analysis“, Proceedings of the 5th International
feedback to the user by glowing the corresponding Conference on Information Technology and Application in Biomedicine,
block/column/character in the Virtual Keyboard. Every p406 - p409, May 2008, China.
selection of a character will show the corresponding character [5] D. G. Manolakis, V. K. Ingle, S. M. Kogon, “Statistical and Adaptive
in the screen in the Virtual Keyboard. Signal Processing: Spectral Estimation, Signal Modeling, Adaptive
Filtering and Array Processing”, Artech House Publishers, 2005. ch. 3,
pp. 75–82.
TABLE I. COMPARISON OF VARIOUS VIRTUAL KEYBOARDS DEVELOPED [6] Manoilov, P. P. “EEG Eye-Blinking Artifacts Power Spectrum Analysis”,
Proceedings of International Conference on Computer Systems and
Virtual Keyboards Correct Spelling Rate Technologies, CompSysTech '06, V. Tamovo, Bulgaria, 15-16 June
2006, pp. IIIA.3-I-IIIA.3-5.
Virtual Keyboard Developed using [7] Guido Dornhege, José del R. Millán, Thilo Hinterberger, Dennis J.
1.00 character/min McFarland Dennis J. McFarland, Klaus-Robert Müller , “Toward Brain-
Eye blink in EEG Computer Interfacing”, First Edition, The MIT Press.
Virtual Keyboard (B. Obermaier [8] Steven G. Mason, Gary E. Birch, “A General Framework for Brain–
0.85 character/min Computer Interface Design”, IEEE Transactions on Neural Systems and
et.al.) [2] Rehabilitation Engineering, Vol. 11, No. 1, March 2003.

Thought Translation Device (TTD) 0.50 character/min


A comparison of the BCI developed with the other BCIs
developed earlier based on the spelling rate is shown in the
Table 1.

470

You might also like