# Controlling a Robotic Arm by Brainwaves and Eye Movement

Cristian-Cezar Postelnicu, Doru Talaba, Madalina-Ioana Toma

► To cite this version:

Cristian-Cezar Postelnicu, Doru Talaba, Madalina-Ioana Toma. Controlling a Robotic Arm by Brainwaves and Eye Movement. 2nd Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Feb 2011, Costa de Caparica, Portugal. pp.157-164, 10.1007/978-3-642-19170-1_17. hal-01566543

HAL Id: hal-01566543

https://inria.hal.science/hal-01566543

Submitted on 21 Jul 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Controlling a Robotic Arm by Brainwaves and Eye Movement

Cristian-Cezar Postelnicu¹, Doru Talaba², Madalina-Ioana Toma¹

¹,² Transilvania University of Brasov, Romania, Faculty of Mechanical Engineering, Department of Product Design and Robotics, {cristian-cezar.postelnicu, talaba, madalina-ioana.toma}@unitbv.ro

**Abstract.** This paper proposes two paradigms for controlling a robotic arm by integrating Electrooculography (EOG) and Electroencephalography (EEG) recording techniques. The purpose of our study is to develop a feasible paradigm for helping disabled persons with their every-day needs. Using EOG, the robotic arm is placed at a desired location and, by EEG, the end-effector is controlled for grasping the object from the selected location. Simple algorithms were implemented for detecting electrophysiological signals like eye saccades, blinking and eye closure events. Preliminary results of this study are presented and compared.

**Keywords:** electrooculography, electroencephalography, eye movement, robotic arm, brain computer interface.

## 1 Introduction

In the European Union, there are about 37 million disabled people [1]. For disabled people with severe neuromuscular disorders such as brainstem stroke, brain or spinal cord injury, cerebral palsy, multiple sclerosis or amyotrophic lateral sclerosis (ALS), we must provide basic communication capabilities in order to give them the possibility to express themselves [2]. Two main solutions have been developed over time: Brain Computer Interface (BCI) systems and EOG based systems.

A BCI is a non-muscular communication channel that enables a person to send commands and messages to an automated system such as a robot or prosthesis, by means of his brain activity [2] and [3]. BCI systems are used in numerous applications such as: speller applications [4], [5] and [8], controlling a wheelchair [6], prosthesis [9] or a cursor on a screen [10], and also for multimedia [11] and virtual reality [12]. One of the most important features in a BCI system is represented by acquisition. The most spread acquisition technique is EEG, and it represents a cheap and portable solution for acquisition. The EEG technique assumes brainwaves recording by electrodes attached to the subject's scalp. EEG signals present low level amplitudes in the order of microvolts and frequency range from 1 Hz up to 100 Hz. Specific features are extracted and associated with different states of patient brain activity, and further with commands for developed applications.
EOG is a technique for measuring the resting potential of the retina by analyzing the surrounding muscles. The eye can be represented as a dipole. The potential in the eye can be determined by measuring the voltages from the electrodes placed around the eye, eyegaze changes or eye blinks causing potential variations (electrodes placement presented in Fig. 1). In the field of rehabilitation, this technique was used for applications such as virtual keyboard [7], control of a wheelchair [13] or for commanding the hand grippers of a robot[14].

<figure><img src="image_2.png" /><figcaption>Fig. 1. System architecture and EOG electrodes placement</figcaption></figure>

The EOG signals amplitude values vary from 50 to 3500µV [13]. Gaze angles vary linear for ±30°. Amplitude of biopotentials recorded from patients varies widely even when similar recording conditions are achieved; thus we need a special recognition algorithm for identifying relevant parameters from recorded signals. Different types of signals have been identified and used in applications: blinks and saccadic movements.

In this paper, we focus on presenting and analyzing the results of two developed paradigms for controlling a robotic arm by integrating EOG and EEG signals. Experimental paradigms are presented in the “EOG-based Control Paradigm” and “EOG-EEG-based Control Paradigm” sections. Also, a real-time pattern recognition algorithm for eye saccades and blinking is presented. We conclude by presenting further improvements of current developed paradigms and further phases of our project.
## 2 Contribution to Sustainability

Our project's aim is to develop a feasible solution for helping disabled people. In this paper, we focused on a comparison between two possible interaction paradigms. This paper presents the results of preliminary tests, which are promising for the further development of our project.

A fully functional system will be implemented, thus the user (a disabled person) will have the opportunity to control a robotic system. A robotic arm will be attached to a wheelchair that is in fact a mobile robot; thus the user will control the robotic arm in order to get help, and also will control the wheelchair navigation. This is going to be tested with the car simulator developed within the project IREAL that has the capability to fully simulate the navigation for training purposes (see Fig. 1). By means of biopotentials, the user will control his wheelchair and will choose a desired location (an object that is found at that location) for positioning the robotic arm's gripper. After selecting a desired object, the user can control the robotic arm in order to manipulate the object, e.g. to feed himself.

Based on results presented in this paper we will decide on a paradigm for our future implemented system. Fatigue is an important factor in developing a feasible system, and one of the two paradigms proposed seems to reduce it when the system is used.

## 3 Developed System

Helping disabled people is one of the most important research fields nowadays. Two paradigms for controlling a robotic arm are presented in this paper. Although disabled people cannot use their normal output pathways (speaking, moving their limbs) to interact with other people, they can still send us messages by using special pathways. The former paradigm is based exclusively on EOG signals, whereas the latter combines EOG and EEG signals.

<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Visual feedback (four objects are drawn). Left – a successful trial of selecting top object; middle – a successful trial of robotic arm's gripper closure; right – car simulator.</figcaption></figure>
**3.1 System Architecture**

Our implemented solution consist in recording EEG and EOG patient's biopotentials, and using them for selecting in a synchronous pseudo-randomly manner between four objects placed at fixed locations (see Fig. 2). This preliminary phase of our main project is based on a virtual reality application developed using XVR software [16].

The recording block represents an interface between physical device, used for signal acquisition, and computer, used for signal processing (see Fig. 1). A Simulink application was implemented for acquiring signals from device and forwarding them to the XVR application. Recorded signals were also stored in files for further analysis.

The XVR block represents a developed application for processing acquired signals, identifying relevant parameters, automatically training developed algorithms and testing the proposed control paradigms (see Fig. 1). Also, this application sends a visual feedback for the user. Many previous studies proved that visual feedback enhances the user's attention for the tested application.

**3.2 Experimental Setup**

For this study, it was used a g.USBamp system from Guger Technologies [17]. This system is a multimodal amplifier for electrophysiological signals like EEG, EOG, ECG (Electrocardiography – recording of the electrical activity of the heart) and EMG (Electromyography – recording of the electrical activity produced by skeletal muscles). Electrodes are placed in pairs (a bipolar recording for EOG signals, see Fig. 1): horizontal movements are detected by C-D pair and vertical movements by A-B pair. Electrode E is placed on the subject's forehead, it represents system ground, and electrode F is placed on the right earlobe and represents the system reference. All electrodes were placed on the subject's skin using a conductive gel. Signals were sampled at 256 Hz and were bandpass filtered between 0.5 Hz and 30 Hz, also an additional 50 Hz notch filter was enabled to suppress line noise.

The user was sitting in front of a computer monitor at around 50 cm. Visual stimuli (objects) were drawn on the monitor at around ±20 degrees on horizontal and ±15 degrees on vertical with respect to the centre of the monitor (see Fig. 2). Thus, the drawn objects were selected by eye saccades. When the indicated object was selected, the gripper attached to robotic arm was placed at that location and the user was instructed to close the gripper. In the former solution, the user was able to close the gripper using a double blink action, whereas in the latter solution he could close the gripper by closing his eyes for a short period of time.

The implemented solution consists of two different steps. The former step is represented by training of our pattern recognition algorithm. First, the user is instructed to execute the instructions that appear on the monitor: "Left", "Right", "Top", "Bottom" (these commands were drawn as arrows and were executed by eye saccades, see Fig. 2), "Double blink" and "Closed eyes". This step was also useful for training the subject in using the application. Pattern recognition algorithms for eye saccades movement identification, double blinking and eyes closing events identification were implemented. The latter step of our application consists in testing
the implemented algorithms, in terms of accuracy, by presenting at fixed time steps
visual instructions for subjects.

**3.3 Pattern Recognition Algorithm**

For eye movement events, a real-time pattern recognition algorithm was implemented. The algorithm recognizes values for amplitude and width during a requested action. During the training phase, for eye saccades the algorithm identifies the average of the signals and then compares it with each sample in order to determine the signal's maximum amplitude and width during each event separately. The lowest and highest absolute values were rejected from recorded parameters for each event separately; other values were averaged. The width was determined by selecting continuous values exceeding with at least 25% the difference between current maximum amplitude and signal's average. For double blink events were identified two sets of values, one set for each blink.

A successful trial is considered when values for current requested action (left, right, up, down or double blink), in terms of width and amplitude, have a maximum range of ±20% considering difference between identified values during training phase and current identified values. This percentage was considered after evaluating a set of preliminary recordings. The algorithm works in a real-time manner; it checks every sample and compares current values with previously identified values. A valid trial is considered if the action is executed in a maximum time interval of 2 seconds.

For EEG paradigm the algorithm extracted a maximum average of recorded
signals during eye closure events; this value was calculated during training phase.
During the testing phase the algorithm was searching for a variation of at least 80%
from difference between identified average and average during the resting phase,
and also for a minimum duration time of 600ms.

**3.4 EOG-based Control Paradigm**

This paradigm assumes eye saccades for object selection and double eye blinking
events for gripper closure. An eye saccade represents a potential variation of around
20µV for each degree of eye movement. In this preliminary phase, the exact
positions of the presented objects were not relevant. Our algorithm was focused on
identifying parameters of variations in the recorded signals, such as amplitude and
width for each saccade as described in previous section.

For the current paradigm, the training phase consists of next steps: 10 trials for each left, right, top and bottom eye movement events and 10 trials for strong double blinking event. These events were executed in the following order: left, right, top, bottom and double blink. A strong blink has an amplitude higher than any other eye activity. A double blink event was chosen because this event is executed only when the user has the intention to execute it. For each action, 7 seconds were allocated, 2 seconds for executing the command and 5 seconds for resting (a “Wait” message was displayed on the monitor).

The testing phase consisted in presenting an arrow on the monitor for indicating
an object to be selected. Objects were drawn in red and, when a trial was successful,
the object was changing its colour in green in order to give a visual feedback to the user (he knew that the trial was successful) thus being stimulated to pay attention to application. If the selection trial of an object was unsuccessful, the user was instructed to continue to focus on that object in order to execute the double blink event (gripper closure). This method was chosen in order to test independently the recognition algorithms, thus calculating the accuracy rate for each command. If the closure trial was successful, the object was changing its color in blue.

## 3.5 EOG-EEG-based Control Paradigm

The difference between the two proposed paradigms is only at the level of gripper closure events. For this paradigm, the training step consisted of the following actions: 10 trials for each left, right, top and bottom eye movement events and 10 trials for eye closure events. These commands were executed similarly to previous EOG-based described commands.

EEG signals are used for detecting eye closure events. One electrode was used for signal acquisition, the electrode being placed at O2 location according to the international 10-20 system [15]. EEG signals are divided into five frequency bands: alpha, beta, delta, theta and gamma. Alpha is the relevant band for our application and its range is from 8 to 12 Hz. An increase in the signal amplitude can be detected when the user has closed eyes; recognition algorithm is detailed in section 3.3. EEG signals were bandpass filtered between 8 Hz and 12 Hz; also an additional 50 Hz notch filter was enabled to suppress line noise.

The testing phase is similar to the previously described strategy; the gripper closure activation process represents the difference between the paradigms. The user was instructed to close his eyes for at least 1 second.

## 3.6 Results

Eight subjects (5 male and 3 female; age 23-28) took part in a series of experiments. One of the subjects had prior experience with EOG systems, but none of the other subjects had prior experience with EEG systems. All subjects had tested both paradigms in order to compare them, regarding accuracy and comfort for user. Five subjects started with first paradigm and the rest of them with the second paradigm, and in the next sessions, they tested the other paradigm. This strategy was used in order not to promote only a paradigm. Each subject tested each paradigm with a minimum distance of four days between recording sessions.

The training setup is described above in the EOG-based paradigm. For both paradigms, the testing setup is as follows: 40 left, 40 right, 40 top and 40 bottom actions and 160 closure actions (1 instruction for each selection command; a closure action is represented by a double blink or eye closure event). Selection commands were presented to user in a pseudo-randomly manner, the total count for each command was identical, but commands were presented in a random order. The timing for this setup is the following: 2 seconds for selection, 2 seconds wait time (with eyes focused on the selected object), 2 seconds for gripper closing action and finally 5 seconds of waiting time when the subject was changing his gaze on the
centre of the monitor. One minute delay was inserted between the training and
testing phases.

For the EOG-based paradigm, the obtained results revealed a maximum accuracy
for selection commands of 86.25% (average between all selection commands from
one subject), whereas the average accuracy was of 78.60% (average between all
selection commands from all subjects). For double blink events, the maximum
achieved accuracy was of 93%, whereas the average for all subjects was 79.05%.

For the EOG-EEG-based paradigm, the maximum accuracy achieved for selection commands was of 93.75% and an average of 86.50%. For eye closure events, the maximum accuracy achieved was of 98%, whereas the average was 90.9%.

For further analysis during each test, acquired signals were stored in a separate
file, and so were the values from training and testing phases. After the second
session, each subject was asked to answer some questions about the tested
paradigms. Relevant answers and final conclusions are stated in the next section.

4 Conclusions and Future Work

These preliminary results revealed conclusions converted in future possible
improvements for presented controlling paradigms. Comparing the two proposed
paradigms, we notice a major difference for selection events in terms of accuracy.
This difference might appear due to the user's fatigue when using the EOG-based
system. Also, the difference is seen for average values. Most of the subjects
presented an increase in the selection accuracy of over 7.5% in case of the EOG-
EEG paradigm. One of the subjects presented an accuracy rate increase of over 10%,
two of them of over 14% and a single one presented a decrease in the accuracy rate
of 3%.

Considering commands for gripper closure, we conclude there is a difference
between maximum accuracy rates and also for average rates. It seems that using eye
closure events (through EEG signals), subjects achieved a higher accuracy rate.
From the answers given by subjects, we conclude that the EOG-EEG-based
paradigm was preferred by subjects; results also confirmed this fact. They argued
that this combination was less tiring.

Future work is related to refining developed algorithms, in order to increase
recognition accuracy rates. Current system will evolve in an asynchronous one,
allowing the user to select a desired object at will. Some new tests will be conducted
in order to finally choose the best paradigm for our project, considering also the fact
that many objects for selection will be added in the next applications, and also new
commands will be integrated.

**Acknowledgments.** This paper is supported by the Sectoral Operational Programme Human Resources Development (SOP HRD), financed from the European Social Fund and by the Romanian Government under the contract number POSDRU/88/1.5/S/59321 for author (1) and by the research project IREAL, contract no. 97/2007, id: 132, funded by the Romanian Council for Research CNCSIS for author (2).
References

1. European Parliament, http://www.europarl.europa.eu/factsheets/4_8_8_en.htm

2. Wolpaw, J.R., Birbaumer, N., McFarland, D.J., Pfurtscheller, G. Vaughan, T.M.: Brain-computer interfaces for communication and control. J. Clin. Neurophysiol. 113(6), 767--791 (2002)

3. Birbaumer, N.: Breaking the silence: Brain-computer interfaces (BCI) for communication and motor control. Psychophysiology 43, 517--532 (2006)

4. Donchin, E., Spencer, K.M., Wijesinghe, R.: The Mental Prosthesis: Assessing the Speed of a P300-Based Brain-Computer Interface. IEEE Trans. Rehab. Eng. 8, 174--179 (2000)

5. Blankertz, B., Dornhege, G., Krauledat, M., Schroder, M., Williamson, J., Murray-Smith, R., Muller, K.R.: The Berlin brain-computer interface presents the novel mental typewriter hex-o-spell. In: Proceedings of the 3rd International Brain-Computer Interface Workshop and Training Course, pp. 108--109. Verlag der Technischen Universität Graz (2006)

6. Vanacker, G., Millan, J. del R., Lew, E., Ferrez, P.W., Galan Moles, F., Philips, J., Van Brussel, H., Nuttin, M.: Context-Based Filtering for Assisted Brainactuated Wheelchair driving. Computational Intelligence and Neuroscience, vol. 2007, Hindawi Publishing Corporation (2007)

7. Dhillon, H.S., Singla, R., Rekhi, N.S., Jha, R.: EOG and EMG based virtual keyboard: A brain-computer interface. In: 2nd IEEE International Conference on Computer Science and Information Technology, pp. 259--262. IEEE Press (2001)

8. Blankertz, B., Krauledat, M., Dornhege, G., Williamson, J., Murray-Smith, R., Muller, K.R.: A Note on Brain Actuated Spelling with the Berlin Brain-Computer Interface. Universal Access in Human-Computer Interaction. Ambient Interaction. LNCS, vol. 4555, pp. 759--768. Springer, Heidelberg (2007)

9. Guger, C., Harkam, W., Hertnaes, C., Pfurtscheller, G.: Prosthetic Control by an EEG-based Brain-Computer Interface (BCI). In: Proceedings AAATE 5th European Conference for the Advancement of Assistive Technology. Dusseldorf, Germany (1999)

10. Vaughan, T.M., McFarland, D.J., Schalk, G., Sarnacki, W.A., Krusienski, D.J., Sellers, E.W., Wolpaw, J.R.: The Wadsworth BCI Research and Development Program: At Home with BCI. IEEE Trans. on Neural Systems and Rehab. Eng. 14(2), 229--233 (2006)

11. Ebrahimi, T., Vesin, J.-M., Garcia, G.: Brain-Computer Interface in Multimedia Communication. IEEE Signal Processing Magazine 20(1), 14--24 (2003)

12. Leeb, R., Scherer, R., Friedman, D., Lee, F., Keinrath, C., Bischof, H., Slater, M., Pfurtscheller, G.: Combining BCI and Virtual Reality: Scouting Virtual Worlds. In: Dornhege, G., Millan J. del R., Hinterberger, T., Mcfarland, D.J., Müller, K.R. edition, Towards Brain-Computer Interfacing. MIT Press (2007)

13. Barea, R., Boquete, L., Mazo, M., Lopez, E.: System for Assisted Mobility Using Eye Movements. IEEE Trans. on Neural Systems and Rehab. Eng. 10(4), 209--218 (2002)

14. Duguleana, M., Mogan, G.: Using Eye Blinking for EOG-Based Robot Control. In: IFIP Advances in Information and Communication Technology, vol. 314. Emerging Trends in Technological Innovation (2010)

15. Jasper, H.: Ten-twenty Electrode System of the International Federation. Electroencephalography. J. Clin. Neurophysiol. 10, 371--375 (1958)

16. XVR development environment, http://www.vrmedia.it/Xvr.htm

17. Guger Technologies, http://gtec.at/