Mobile robot control based on noninvasive brain-computer interface using hierarchical classifier of imagined motor commands

The study describes approaches of direct and supervisor control of a mobile robot based on a non-invasive brain-computer interface. An interface performs electroencephalographic signal decoding, which includes several steps: filtering, artefact detection, feature extraction, and classification. In this study, a classifier with hierarchical structure was developed and applied. Description of a committee of classifiers based on neural networks and support vector machines is given. The developed classifier demonstrated accuracy 50 ± 5% of single trial decoding of four classes of imaginary fine movements. Prospects of using non-invasive brain-computer interface for control of mobile robots was described. Key applications of the system are maintenance of immobilized patients and rehabilitation procedures both in clinic and at home.


Introduction
Nowadays various types of mobile robots are developed and widely used in many areas.Mobile robots designed to work alone (in extreme areas, security systems, service, etc.), are already produced in small series and have relatively simple intelligent control systems.Mobile robots capable of working in a group (exploring, providing communication, combat, security and gaming robots, etc.) are still under development; their control system is complex and intelligent.
Additionally, mobile anthropomorphic robots have been developed.They are named so because of their resemblance to a man.According to forecasts, in the near future anthropomorphic robots should be widely used as assistants to people, especially in cases of work in extreme areas and services sector including help to immobilized people in hospitals and at home.
Remote control of mobile robots can be implemented in various ways, but in order to work with immobilized people, contactless means of communication between a person and a robot are required.
A promising way to realize communication between a person with reduced motor abilities and a robot is the use of "brain-computer interfaces" (BCI).BCI is a modern technology and tool that can provide human interaction with external electronic and electromechanical devices based on decoding of signals of electrical brain activity [1].It's shown that for immobilized people who need to control service robotic devices themselves, a BCI based on imaginary movements recognition can be applicable and useful [2].
As a mean of obtaining information about bioelectric activity of the brain, corresponding to motor commands, electroencephalography (EEG) is often used.Recent studies show that EEG as a non-invasive and relatively inexpensive technology has significant potential for BCI development.However, a factor limiting the practical application of BCI based on EEG signals is the complexity of reliable and reproducible interpretation (decoding) of brain signals.Another factor is the difficulty of classification of EEG patterns of imaginary movements in real time.
Currently, some Russian scientific groups and organizations carry out research related to the development of BCI, many of which are known internationally [3,4].Thus, there are attempts to create a human-computer interface using BCI based on EEG signals.Commonly, such tools allow detecting some mental commands of a person using the P300 component of event related potential elicited in the process of decision-making [4].However, such interfaces are limited by the number of degrees of freedom and can be used for simple control of a robot.
The aim of this work is to develop a mobile robot control system based on BCI, which performs classification of imaginary movements using EEG signals.Mobile robots with such control systems can be used, for example, to help people with limited motor abilities, as well as for rehabilitation in clinics and at home.In this study, BCI application for control of two types of mobile robots (robotised cart and the anthropomorphic robot) is discussed.

Mobile robots
Mobile robots appeared due to the need to expand the working area of manipulators and in order to perform transport operations.
In modern mobile robots, many modern vehicles are used, including ones based on bionic ways of movement, borrowed from nature.First of all they include walking.
Depending on the environment, in which robots move and operate, they can be divided into terrestrial, water, air and space types of robots.Terrestrial robots include wheeled, crawlered, running on rails and walking robots.
Walking type of movement has higher maneuverability in rugged terrain than wheeled or tracked types.Additionally, this type of movement is more economical in these conditions because interaction with ground occurs only in places of contact with a foot, while wheeled and crawlered types of movement leave a continuous track behind machines.Since the main purpose of walking machines is movement on rough terrain, their control systems must be adaptive.
Anthropomorphic robotics engaged in research of humanoid robots has been actively developed in recent years.Such robots are designed to work in a weakly determined environment and are positioned as universal human assistants.Synthesis of control system of an anthropomorphic robot is a complex problem.Rapid development of this area is associated with the recent successes in the field of artificial intelligence.

Remote control
Remote control of a mobile robot can be implemented on different levels of control system, including direct control of individual drives of a robot (direct control) and supervisory control using a set of high-level commands.
Direct control provides maximum freedom but it is laborious and requires a lot of skill.Time lag in the communication channel makes it even more difficult to work in this mode.
In turn, supervisory control provides a limited set of commands but these commands can run complex behavior algorithms.

Brain-computer interfaces
At present, advances in neurophysiology, psychology and artificial intelligence, as well as in development of devices for bio signal recording, have led to the possibility to create new means of human-machine communications based on direct decoding of nervous system signals.
Currently, non-invasive BCIs based on EEG are implemented to recognize imaginary and real movements of large parts of the body, for example, hands and feet.However, such BCIs are not effective for decoding fine motor skills, for example, movements of fingers of one hand.This problem is difficult to solve because of the anatomical proximity of the brain structures participating in the realization of imaginary movements and because of subtle differences in corresponding EEG signals.Solution of this problem requires large computational resources for data analysis.On the other hand, BCI should operate in real time, which means to generate control signals with minimum delay determined by the speed of operation of external devices.

BCI structure
While controlling robotic devices, such as a wheelchair, robotic manipulator, prosthesis, exoskeleton, etc., a paralyzed person should be able to give commands that allow these devices to perform specific tasks for human movement, object manipulation or prosthesis control.In this paper, it is proposed to do this using a non-invasive BCI, which decodes brain activity signals and forms supervisory commands for external devices.For the practical implementation of such a system, it is necessary to use biological feedback through vision, which allows a user to learn how to control the system by amplifying EEG signals corresponding to imaginary commands [3].Delays in calculating the response must be small enough so that in the user's mind mental command and response are clearly associated.
It is possible to formulate principles for development of systems for control of robotic devices through a BCI: (1) aiming to achieve level of accuracy and speed of classification of EEG patterns, acceptable for use of BCI for control of robotic devices in real time; (2) ensuring sufficient degrees of freedom of BCI, that is, the number of recognized imaginary commands (at least 4); (3) optimization of computational resources to reduce runtime calculations including the classification of imaginary commands by single trial of imagination.
Data flow in EEG-based BCIs includes several main stages: recording and preprocessing of EEG signals, extracting features in spectral or temporal domains, classification of EEG patterns of imaginary commands, and forming a final decision (Fig. 1).To study the possibility of implementation of a humancomputer interaction system based on a non-invasive BCI, the classifier of imaginary finger movements of one hand, developed by the authors earlier [5,6] was used.
The adaptation of this version of the BCI to the classification of imaginary commands was carried out using a specially developed program and methodology.According to the method, subjects were asked to consistently imagine 4 types of imaginary movements of fingers of one hand (thumb, index, middle and little fingers).These imaginary movements corresponded to control commands for the robotic device.During training subjects first had to press a computer mouse button with a finger assigned to control the necessary behavior of the device, in the rhythm defined by beeps.After a few real movements, sound disappeared and subjects had to imagine movements with the same finger.
Training was focused on the kinesthetic sensations of subjects.The test series of real and imaginary movements were repeated several times.As a result, the subject had to perform at least one hundred real and one hundred imaginary movements in a given rhythm in one block of the test.The number of test blocks should correspond to the number of types of performed movements (real / imaginary finger movements).Thus, the control of the robotic devices with the command buttons is simulated.
The EEG signals were recorded using a 32-channel digital electroencephalograph of the company «Mitsar».We used 19 electrodes, which were located using the 10-20 system.EEG signals with a duration of 600 ms were recorded in the frequency band of 0.53 Hz -30 Hz.The sampling rate was 500 Hz.Artifacts such as eye movements, slow and fast waves, fragments of EEG signals with an amplitude of more than 100 μV were excluded.For analysis and subsequent classification, EEG signal registered from the sensorimotor region of the cerebral cortex were used: C3, Cz, F3 sites.
Analysis of EEG signals was carried out both in time and frequency domains.To ensure the necessary speed of the system, analysis of each individual trial (without accumulation) was made.An algorithm utilizing a combination of two feature spaces was used: length of the curve and the cepstral coefficients of segments of the signal.These features were extracted in a time sliding window, which allowed selecting the most informative segments of the signal.
Choosing the optimal size of the analysis window is important for increasing classification accuracy.Previously, it was shown that the selection of optimal values could significantly improve accuracy of classification of imaginary movements.On the basis of earlier studies [5], analysis window width was set 100 ms with a shift of 50%.
Classification of EEG patterns corresponding to imaginary movements was carried out using the calculated features as the inputs for two types of classifiers: artificial neural network and support vector machine.

Classification of imaginary movements
The developed committee of classifiers of EEG patterns is based on artificial neural networks (ANN) and support vector machines (SVM).Studies have shown that they are effective means of classification, including classification of imaginary movements.
In this work, neural networks were implemented in form of multilayer perceptron with three layers: two hidden and an output layer.As activating functions in hidden layers and in an output layer, sigmoid and linear functions were used, respectively.
SVM method is based on linear classification approach.The essence of the method is to divide the sample into classes using the optimal separating plane.Data conversion is determined by the kernel function.SVM with radialbasis kernel function was chosen for classification of EEG signal.This choice was based on the results of studies on the selection of the most suitable SVM type for this purpose.
A two-level committee of classifiers was used in the study.The first layer consisted of two artificial neural networks (ANN (C) and ANN (L)) and two classifiers based on support vector machines (SVM (C) and SVM (L)), and the second layer consisted of one artificial neural network (ANN (T)) combining results of the first level classifiers.The first-level classifiers analyzed two feature vectors (the length of curve L and the cepstral coefficients C) separately.For every trial, features were obtained for 20 segments of EEG signal (20 features for L and 20 features for C).Four classifiers of the first level gave their responses assigning a trial to one of classes.Every classifier's output consisted of 4 numbers -4 probabilities of belonging to each of possible classes.On the basis of these outputs, a feature vector (16 components) for the second-level ANN (T) was formed.This ANN made the final classification decision for every trial (Fig. 2).Real time control strategy based on BCI requires continuous EEG data recording.To ensure the continuity of input data and its parallel processing, multithreaded programming method was used.The data flow is as follows: as soon as the trial N ends and the trial N + 1 begins, thread 2 reads data related to the trial N, preprocesses it, extracts features, classifies, and returns the result of the classification (Fig. 3).
The conducted studies of the BCI prototype have shown that its characteristics correspond to real-time requirements.The time delays required to obtain a response from the classifier are within 150 ms, which is acceptable for BCI applications with biological feedback.Additionally, according to subjective self-reports of subjects, they really connected imaginary movements with received responses of the system.The following results of classification were obtained in the study.In autonomous sessions, classification accuracy of single-trial EEG patterns of four imaginary commands was 50 ± 5% at average for channels F3, C3.Thus, the probability of successful classification of four types of imaginary commands using only two EEG channels significantly exceeded the guessing level of 25%.During testing of the system using feedback, classification accuracy of 58% was archived.At the same time, studies have shown and proved the fact that some subjects are not able to learn how to work with BCI on the basis of EEG signals.

Examples of application of the BCIbased control system
An operator should be able to give commands to change the behavior of robotic devices.As part of the study, it was proposed to remotely control medical mobile robots by means of BCI.The control system based on BCI can allow immobilized people both to self-service using robot and to train impaired motor functions.
Experiments were conducted to control a robotic cart and an anthropomorphic robot using noninvasive BCI based on classification system of imaginary movements.
The robotic cart (Fig. 4) has 4 controlled drives (2 for moving the platform and 2 for orientation of stereo vision cameras) and can be used to service immobilized patients.
An anthropomorphic robot NAO with 23 degrees of mobility can be used as a mobile device for interacting with a patient and performing simple actions (Fig. 5).These mobile robots were controlled using BCI by issuing high-level commands (supervisory control).Supervisory control was performed by simulating pressing of control keys with different fingers: four classes of commands were formed: «Forward», «Stop», «Right», «Left».The experiments demonstrated possibility of training the BCI classifier to classify these commands and to control the cart and the robot.Since both the cart and the robot had vision systems and their own systems for recognizing and avoidance of obstacles, such supervisory control was sufficient for the practical application of these robotic devices.
Thus, a robotic cart is capable of delivering medicines and water and transporting away the used flatware.In the future we plan to equip the platform with an artificial hand for loading and unloading the required items.
Anthropomorphic robot NAO has intellectual control system, which allows it to perform a wide range of actions, such as hand and foot movements, steps, turns, etc.Such man-like robot equipped with BCI based control system can become a novel tool for rehabilitation of patients with severe movement disorders caused by stroke and brain injuries.There might be two use cases: 1. user imagines a movement of immobilized limb, BCI decodes this intention and robot performs this movement (imitating human movement); 2. user controls robot with supervisory commands («Forward», «Stop», «Right», «Left»), and robot, performing them, passes through a complex path.
In the first case user receives a feedback from robot, which significantly increases the user's motivation and enables binding of mental command and real movement.These results are the necessary conditions for facilitation of rehabilitation process [7].
Second scenario aims at objective tracking of rehabilitation process in absence of real movements, in a period when brain training based on brain plasticity has started but ability to control user's own movements has not yet appeared.In this case, path of the robot and required time might be used as objective markers to demonstrate dayto-day dynamics.

Conclusion
Thy study demonstrated that developed control system based on BCI meets the requirements of practical application in real time.Thus, maximum delay required for generation of control signals does not exceed 150 ms, which makes it possible to use bio feedback approach.The multithreading implemented in the system allows BCI to record and process EEG signals simultaneously without data losses.
BCI with a combined hierarchal EEG pattern classifier was given as an example of development of effective BCIs based on processing of EEG signals.This classification system learns in order to recognize imaginary motor commands not only by hands or feet, but also by small parts of the body (fingers of one hand).It's shown that such an EEG pattern classification system can provide acceptable accuracy and classification speed for BCI.Thus, it might be used to control various robotic devices, such as a robotic cart with computer vision system, an artificial hand with a five-finger wrist or an anthropomorphic robot Further development of effective BCI-based systems for remote control of a robot requires new solutions for increasing the accuracy and the speed of classification of EEG patterns, as well as new approaches to increase degree of freedom of BCI and to optimize the computational resources required for BCI implementation.Solving these problems will create effective BCIs that will provide people with limited motor functions ability to control robotic devices using brain signals that can significantly improve their quality of lives in the world of healthy people.

Fig. 3 .
Fig. 3. Scheme of the classification system operating in real time.