Next Article in Journal
Adaptive Visual Servoing Control for Hoisting Positioning Under Disturbance Condition
Previous Article in Journal
Pine Resin Derivatives as Sustainable Additives to Improve the Mechanical and Thermal Properties of Injected Moulded Thermoplastic Starch
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Conceptual Design of BCI for Mobile Robot Control

by
Kanstantsin Miatliuk
1,*,
Agata Nawrocka
2,
Karolina Holewa
2 and
Vassilis Moulianitis
3
1
Department of Robotics and Mechatronics, Bialystok University of Technology, 15-351 Bialystok, Poland
2
Department of Process Control, AGH University of Science and Technology, 30-059 Krakow, Poland
3
Department of Mechanical Engineering and Aeronautics, University of Partas, 26504 Rio Achaia, Greece
*
Author to whom correspondence should be addressed.
Appl. Sci. 2020, 10(7), 2557; https://doi.org/10.3390/app10072557
Submission received: 23 March 2020 / Revised: 27 March 2020 / Accepted: 29 March 2020 / Published: 8 April 2020

Abstract

:
This paper presents an application of Hierarchical Systems (HS) technology in conceptual and detailed design of Brain Computer Interface (BCI) system to control a mobile robot. The BCI is a biomechatronic system that includes biological (brain), computer (control PC), electronic (sensors), visual informatics (LCD—liquid crystal display, GUI—graphic user interface) and executive electro-mechanical (MR—mobile robot) subsystems. Therefore, the conceptual model of the designed BCI system should present connected formal models of the above subsystems presented in the general systemic basis. The structure of the BCI system, its dynamic realization as a unit in its environment and MR environment are presented formally as well. In addition, the conceptual model should also take into account the BCI inter-level relations performed by MR coordinator implemented in the form of the design and control system. Therefore, HS model (and its standard block aed—ancient Greek word) is selected and described as the formal basis of the conceptual model of BCI system in the first part of the given paper. BCI system detailed design is under consideration in the second part of the paper. BCI control system and MR design results, as well as MR control process are also described in the final part of the paper.

1. Introduction

At the end of the 20th century, leading research centers around the world, i.e., Graz University of Technology, Austria; University of Rochester, USA; EPFL, Switzerland; etc., initiated research aimed at developing Brain Computer Interfaces—BCI, which provide communication between a computer and a human brain. In the presented work, we deal with the conceptual design of the laboratory-level BCI system created in Process Control Dept., AGH University of Science and Technology, Poland [1,2]. This BCI system consists of measuring and computer control subsystems, mobile robot (MR) and man-operator. All the subsystems are briefly described in this paper. Formal basis for the Conceptual Design (CD) of the BCI system and its brief conceptual model are presented in the first part (Section 2.1 and Section 2.2) of the paper. The results of the BCI system detailed design and MR control processes are described in the second part (Section 2.2 and Section 2.3). A review of the literature on BCI systems will not be given in the paper since the focus of this work is to apply the Hierarchical Systems technology [2] to the BCI system design, which is a novel concept to this area of research.
Concerning the first part, the conceptual model of BCI being created at the conceptual design phase [2] must be coordinated with numerical and geometrical systems, taking into account connected mechanical, electro-mechanical, electronic, computer, and biological subsystems of BCI biomechatronic system. Besides, a conceptual model, which will be implemented in systems coordination (design and control), should describe all the subsystems, the mechanism of their interaction, technology of subsystems integration in the structure of higher level, and the system environment in common formal basis. Therefore, creation of a BCI conceptual model that will meet all the above mentioned requirements is a task of a high importance. This task is crucial for mechatronic systems and computer aided design (CAD) systems in particular [3].
According to the above formulated requirements, the conceptual model implemented in BCI design must be a hierarchical construction that connects any level BCI subsystem with its lower and higher levels. Therefore, Hierarchical System (HS) [4], with its standard block aed [5,6,7,8,9], which meets all of the above requirements for the BCI conceptual model, was selected as the formal basis for BCI system conceptual design (Section 2) in this paper. An overview of the other conceptual design methods is presented in the monograph [9] available online. An issue of interest in this study was to verify whether HS technology and the conceptual model could be implemented in the conceptual design of the BCI system taking into account all the subsystems (mechanical, electromechanical, electronic, and biological) of a BCI-MR biomechatronic system. The results of this study are given below.
Concerning the second part, the BCI system detailed design for performing MR control processes is executed in a laboratory environment. The purpose of this work is to control MR utilizing bioelectric activity of the human brain. This study was based on the use of visually evoked potentials, which are the brain’s response to retinal light stimulation. The possibility to use the BCI system by people with disabilities is one of the tasks of this work. The desired characteristics of the BCI system are real-time efficient operation, safety and ease of use. Providing real-time control without response delay requires proper optimization of the implemented algorithm and reduction of hardware requirements where possible. Ease of use can be achieved with high-frequency visually evoked potentials. In such conditions, a person will not be exposed to excessive noticeable stimuli of flickering light. On the other hand, the detection of the higher frequencies of electroencephalogram (EEG) signals is complicated [10]. Another important characteristic is safety. To minimize the possibility of the MR getting into forbidden places, one should be focused on the mobile robot motion. The definition of the MR workspace and the appropriate MR control algorithms should ensure the safety of the patient and his environment.

2. Materials and Methods

2.1. Theoretical Basis for Conceptual Design

Aed model S considered below unites the codes of the two level system [5] and general systems theory [11], numeric positional codes L s , geometry, and cybernetic methods. Aed is a standard element of Hierarchical Systems [5,6,7,8,9], which implements the general laws of systems organization on each level and the inter-level connections (see Figure 1). Aed S contains ω and σ models connected by coordinator S 0 :
S {   ω , S 0 , σ }
where ω is the dynamic representation of the level system in its environment S ε ; σ is the system structure; S 0 is the coordinator; ℓ ∈ Ls, Ls is numerical positional system. Aed scheme is given in Figure 1. Connected dynamic representations ω of aed elements, i.e., object S o , processes S o π , S ε π and environment S ε are presented in ( ρ ¯ , ϕ ¯ ) form:
ρ ¯ = { ρ t : C t × X t Y t & t T } ϕ ¯ = { ϕ t t : C t × X t t C t & t , t T & t > t }
where ρ ¯ and ϕ ¯ are reactions and state transition functions respectively, C is state, X is input, Y is output, and T is time of level . Object S o , processes S π { S o π , S ε π } and environment S ε are connected by their states, inputs and outputs [5,6,7,8,9].
The structure of system S is defined in the following way:
σ { S 0 , σ ˜ } ,
and σ ˜ is as follows:
σ ˜ { { { ω i : i I } τ : τ L s } , σ γ } { { σ τ : τ L s } , ω 0 } ,
where S 0 is a coordinator, ω ¯ ± 1 are aggregated dynamic models of subsystems S ¯ ± τ , and γ σ are structural connections. σ ˜ is the set of ω ¯ ± 1 subsystems and their structural connections γ σ coordinated with external ones γ ω = γ σ ± τ | S .
Being the main element of hierarchical systems, the coordinator performs the design and control tasks on its strata [5,6,7,8,9]. The coordinator is presented according to aed model (1) in the form (5):
S 0 { ω 0 , S 00 , σ 0 }
where ω 0 is the dynamic realization of S 0 , σ 0 is the structure of coordinator S 0 , and S 00 is the coordinator control unit. Coordinator S 0 is constructed recursively, and performs the design and control tasks on its selection, learning and self-organization strata [5,6,7,8,9].
Geometrical signs and metric characteristics μ of systems S being designed and controlled are defined in the framework of aed formal model in codes of numeric positional system L S [5,6,7,8,9]. The main of them are constructive dimension δ and connection defect ξ. For instance, the constructive dimension δ is presented in code L S as follows:
δ ˜ = ( n 3 n 0 ) δ , δ ˜ { δ σ , δ ω } , & ( n i ) δ = ( n 3 i ) ξ , ( n i ) δ N ,   i = 0 , 1 , 2 , 3 ;
where δ ω and δ σ are constructive dimensions of σ and ω respectively.
This representation of geometrical information about systems S being designed allows execution of all computer operations with geometric images as operations with numeric codes.
Aed formal model briefly described above presents a theoretical basis for the BCI biomechatronic system conceptual design and control.

2.2. Conceptual Model for BCI System Design

The conceptual model of the BCI system is briefly presented below, as an example of a biomechatronic system description in the theoretical basis of hierarchical systems (HS). The object under consideration in this work is the BCI system (Figure 2), with its measuring, computer, man-operator, and mobile robot subsystems, developed in AGH University of Science and Technology, Poland [1,2]. Systemic conceptual model of the BCI system is given in aed form (6) of HS:
  BCI S   BCI   { ω , S 0 , σ }
where, ω is an aggregated dynamic representation of BCI, σ is the system structure, S 0 is BCI system coordinator (design & control system), and is the index of level.
Structural scheme of the BCI system being designed is presented in Figure 2 in agreement with aed diagram (Figure 1). According to (3,4), BCI system structure σ contains coordinator S 0 , the set of sub-systems ω ¯ 1 and their structural connections γ σ . The BCI subsystems S ¯ ± τ presented in ω ¯ 1 form (2) are:
ω 1 1 : man-operator; ω 2 1 : measuring system;
ω 3 1 : computer control system; ω 4 1 : mobile robot.
BCI system coordinator S 0 is presented by man-coordinator and distributed design and control units. Computer control BCI subsystem ω 3 1 partially performs coordinator functions as well.
In their turn, each subsystem iSℓ−1 of level −1 has its own structural elements—lower level ℓ−2 subsystems presented in aggregated dynamic ijωℓ−2 form. For the Mindstorms NXT 2.0 mobile robot 4ωℓ−1 they are executive subsystem, i.e., wheels 41ωℓ−2 and servos 42ωℓ−2, and robot’s own NXT 2.0 control unit 43ωℓ−2. Subsystems of the mobile robot are connected by their structural connections σγℓ−2. For example, servos 42ωℓ−2 and wheels 41ωℓ−2 are connected by gear transmission, which is the structural connection of them, and at the same time is subsystem of level l−3, i.e., structural element of servo 42ωℓ−2. Similarly, the higher level subsystems ω ¯ 1 are connected by their common parts, i.e., structural connections σγℓ−1 that are the elements of lower levels. Man-operator 1ωℓ−1 and measuring subsystem 2ωl−1 are connected by their common elements—electrodes attached to human’s head.
Aggregated dynamic realizations ωℓ−1, i.e., dynamic models i(ρ,φ)ℓ−1 of BCI subsystems are formed after the definition of their inputs–outputs according to each concrete sub-process they execute. As for the mobile robot 4Sℓ−1 subsystem, concerning its motion process, the realization 4ωℓ−1 used at the conceptual design phase in (ρ,φ) form (2) can be presented in form (8) at the detailed design phase as the following kinematics equations [12]:
x ( t ) = 1 2 0 t [ v r ( t ) + v l ( t ) ] c o s φ ( t ) d t ,   y ( t ) = 1 2 0 t [ v r ( t ) + v r ( t ) ] s i n φ ( t ) d t , φ ( t ) = 1 a 0 t [ v r ( t ) v l ( t ) ] d t
which connects linear x ˙ , y ˙ and angular φ ˙ velocities of robot center point P(x,y) (located in the middle of the axis connecting driven robot wheels) as the output 4Yℓ−1 with the input 4Xℓ−1, i.e., linear velocities of the centers of the left vl and right vr wheels of robot. a is the distance between the centers of the left and right wheels, and φ is the angle between Xg and Xr axes of the global g and the local robot r coordinate systems respectively (Figure 3). The robot designed has the independent drives of both wheels and Instantaneous Center of Curvature (ICC), around which the rotary motion is performed by robot. ICC is placed in the line connecting the centers of the two wheels. For the case of the robot motion shown in Figure 3, ICC is separated from point P(x,y) by the distance R. The rotation around the ICC point takes place if speed values of each wheel are different.
The model of robot kinematics was implemented within the frameworks of Matlab/Simulink program environment for performing a kinematic task at the detailed design phase. The general view of the model is presented in Figure 4. The inputs of RobotKinematicModel block are linear velocities of the centers of the left vl and right vr wheels of the robot respectively. The outputs are point P coordinates (x,y), ICC coordinates xICC and yICC, distance R, and angle φ value phi (Figure 4a). The detailed structure of the RobotKinematicModel block is shown in Figure 4b, which illustrates the graphical representation of the robot kinematics equations describing the robot’s location.
At the detailed design phase, simulation studies of the mobile robot movement were carried out. For this purpose, a special environment was created to animate the movement of the robot. The robot’s movement was set by the linear velocity value of the left vl and the right vr of the wheel. Figure 5a presents the mentioned linear velocities of both wheels. Vertical bold lines indicate two time moments (t1 = 2.49 s and t2 = 9.19 s). Figure 5b,c show pictures from the simulation showing the current position of the robot along with the trajectory of the point P (black) and the point Pp (blue) for t1 and t2 time moments respectively. The green lines represent linear velocity vectors with the beginnings in the center of each wheel. The lengths of the vectors represent the values of the current linear velocity shown in the upper right corners of the simulation Figure 5b,c. Additionally, the current values of the following parameters are shown: simulation time (t), current position of the P point, i.e., x,y coordinates, and angle φ value. The current position of the ICC and radius R (red line) are also presented.
As for the robot dynamics, aggregated dynamic model ( ρ ¯ , φ ¯ ) of the MR can be presented at the phase of the detailed design like in [13] or in the following form:
x ˙ = A x + B u , y = C x
State equation in (9) corresponds to the state transition function φ ¯ in MR conceptual model (2) and the second output equation corresponds to the reaction ρ ¯ . Vectors x, y, u and matrices A, B, C must be predefined. In the case of the mobile robot motion, the elements of states vector x = [x1 x2]T are the displacement x1 and velocity x2. Mobile robot kinematics and dynamics tasks, briefly described above, belong to analysis design task of the BCI subsystem being designed, i.e., mobile robot in our case.
Concerning the man-operator subsystem, its model ω 1 1 can be constructed on its inputs X 1 1 , i.e., visual stimuli signals, perceived by human eyes; its outputs Y 1 1 , i.e., EEG signals recorded by measuring system ω 2 1 , taking into consideration human’s physiological state C 1 1 .
Measuring subsystem ω 2 1 purpose is EEG signals registration, processing and data transmitting to BCI control system by TrueScan 24 subsystem. TruScan Acquisition program is used as software means to perform impedance measurements. The electroencephalographic (EEG) signal was recorded using the EEG cap of Deymed Diagnostic company (Figure 6a), containing 19 chlorine silver electrodes (Ag/AgCl) arranged according to the International System 10–20. In addition, the cap contained a reference electrode and a grounding electrode (Figure 6b). The cap is placed on the head of the subject, i.e., man-operator, being examined (Figure 6c). EEG gel application to the measuring electrodes allowed to maintain electrodes impedance at 2–5 kΩ level during the conducted tests.
The BCI environment has its own structure and contains the following sub-systems: panel ω 1 + 1 which generates light stimuli perceived by man-operator’s eyes; floor area ω 2 + 1 where the mobile robot moves; man-coordinator ω 3 + 1 , which places electrodes on man-operator’s ω 1 1 head and attaches the measuring system; the higher level l+1 design and control system ω 4 + 1 .
The BCI system contains S π i sub-processes, which are the parts of the higher-level process S π (see Figure 1) performed by the entire BCI system: ( S π 1 ) ionic current flows generation within the neurons of the human brain, performed by the man-operator, ( S π 2 ) EEG signal acquisition by the measuring system; ( S π 3 ) data analysis and control signals generation for the mobile robot performed by computer subsystem; ( S π 4 ) mobile robot motion. Each process contains its lower-level sub-processes, e.g., ( S π 3 ) process of computer subsystem contains low-level ℓ−1 process of data reading S π 31 1 , digital filtering S π 32 1 , Fast Fourier Transformation S π 33 1 , signal spectral analysis S π 34 1 , frequency verification S π 35 1 , and generation of control signals for the mobile robot S π 36 1 . All these processes are described according to (2).
So, all the subsystems of the BCI biomechatronic system, i.e., man-operator S 1 , measuring S 2 , computer S 3 , and mobile robot S 4 systems have their aggregated dynamic ω and structural σ descriptions. All the connected descriptions of the subsystems S ¯ i and their processes S ¯ π i are presented in the knowledge base of the coordinator that performs the design and control tasks, connecting in this way structure σ and dynamic realization ω of the BCI system being coordinated.
BCI coordinator S 0 is described according to (5) and implemented by the human–computer design and control BCI subsystems including the MR controller. The coordinator maintains BCI functional modes by the man-operator and control system and performs the design process by the higher level CAD system. The BCI control system is described in the following Section 2.3.

2.3. Design of BCI Control System

The design process of BCI control system of the mobile robot (MR) also contains two stages, i.e., conceptual and detailed design phases. The conceptual model of the BCI control system is presented in form (5) of HS coordinator ( S 0 ) briefly described above in Section 2.1 as well as in another work [2]. Aggregated dynamic model ω 0 of the BCI control system ( S 0 ) is built on the relation of the control system inputs X 0 t , outputs Y 0 t and states C 0 t , presented in the following ( ρ ¯ , φ ¯ ) 0 form:
( ρ ¯ , φ ¯ ) 0 : ρ ¯ 0 = { ρ 0 t : C 0 t × X 0 t Y 0 t & t T } φ ¯ 0 = { φ o 0 t t : C 0 t × X 0 t t C 0 t & t , t T & t > t }
The inputs X0 and outputs Y0 of the coordinator of − 1 level are defined on the sets of its coordination signals G and feedbacks W as follows:
X 0 1 = { G , W 1 } , Y 0 1 = { G 1 , W } ,
As for the control system of Mindstorms mobile robot (Figure 7), it is presented by the internal control unit NXT 2.0 (which consists of ARM7 and AVR microcontrollers) and BCI control PC in the form of the coordinator according to the scheme presented in Figure 1 (Section 2.1).
In Figure 7, G−1 are coordination signals from the internal NXT 2.0 control unit of the MR to MR oS4 actuating systems, i.e., servos and wheels. The MR position measured by MR encoder with 1 degree precision is a feedback W 1 from MR actuating systems oS4 to NXT 2.0 control unit 4S0; W is a feedback from MR, i.e., NXT 2.0 control unit, to the BCI PC control system S0 of higher level . G are the control signals from control PC S0 to mobile robot 4S−1. The NXT 2.0 controller 4S0 is directly connected by its input X = (G,W−1) and output Y = (G−1,W) with the MR actuating systems and with the higher level coordinator S0, i.e., BCI PC design and control system, where (G−1, W−1) and (G, W) are lower level −1 and higher level coordination G and feedback W signals respectively.
Communication of the BCI PC control system S0 with lower −1 level NXT 2.0 control unit 4S0 of Mindstorms mobile robot is realized on the program level with the help of RWTH—Mindstorms NXT Toolbox integrated in MATLAB environment of the control PC. Control G and information W signals are transmitted with 12 Mbit/s speed. The transmission is possible owing to the implementation of Bluethoot 2.0 technology in NXT 2.0 control unit.
Concrete values of the BCI PC control system S 0 inputs X 0 , outputs Y 0 and states C 0 are defined and detailed in the design phase and described below. A concrete model of BCI control system S 0 was implemented in the form of finite state machine [14] at the detailed design phase according to its conceptual model. Finite state machine model of BCI control system (CS) was implemented within the frameworks of Matlab program system using Simulink Stateflow module. To implement control algorithms by generating control codes, Matlab, Simulink, and Embedded Coders were used. The proposed control system developed in Matlab is presented in Figure 8. The main element of the BCI control system is MainController unit, which realizes logic laws of control of TruStan 24 electroencephalograph (EEG) unit, the light stimulator and the mobile robot. According to the BCI CS conceptual model, inputs X 0 and outputs Y 0 of MainController.ock unit are given in Table 1. Table 2 presents the BCI control system states C 0 .
The first state 1C0 of the proposed BCI control system is the Idle state (Table 2). It is an idle state in which the connection to the TruScan 24 electroencephalograph is checked. The process of establishing the connection with the electroencephalograph is simulated by the variable eegStatus, which takes the value 1 for a correctly established connection. Idle state activity is represented by the idle variable. After receiving the connection information, the system remains in Idle status until the BCI system is started by the Start button being pressed, which is reflected in the start variable.
When there is no error related to the connection to the TruScan 24 device and the Start button is on, the system goes into 2C0 Running state, in which the light stimulator is activated first. The activation of the light stimulator is represented by the variable led = 1. In this state there are three sub-states: Waiting 21C0, DataRecStart 22C0, and DataRecStop 23C0. After starting the light stimulator, the system goes to the Waiting sub-state. From this sub-state, the system goes to DataRecStart after 1 s. This sub-state is responsible for the process of switching on the EEG signal recording by the TruScan 24 device, which has been set for 5 s. The DataRecStart subroutine activity is indicated by the variable dataRec. In the next step, after the 5 s have passed, the system goes to the DataRecStop sub-state where the system disables the EEG signal registration process.
After leaving the DataRecStop sub-station, the quality of recorded data is checked. For this purpose, errorLen and errorImp functions are used. The errorLen function examines the length of the recorded signal. The result of the function is error error2 = 1, when the registered signal does not contain an adequate number of samples. The errorImp function examines the impedance value of measuring electrodes. The result of this function is error error3 = 1, when the impedance value exceeds 5 kΩ. If error2 or error3 occurs, immediate return to Idle status takes place. State 2C0 Running is abandoned when the connection to the electroencephalograph is broken error1 = 1 or when the value of start = 0 (start button disabling). The exit from the state turns off the light stimulator (led = 0).
When errors error2 and error3 do not occur, the system goes to DataProcessing state 3C0. The activity of this state is represented by the variable dataProc. This 3C0 state consists of four substates, listed in the order of calling: 31C0 DataShowing, 32C0 DataPreprocessing, 33C0 FeatureExtraction and 34C0 Classification. In the DataShowing sub-state, the recorded results are displayed using the show function. The dataShow value represents the DataShowing sub-state activity. Then the system goes to DataPreprocessing sub-state 32C0, in which the pre-processing of the registered signal is performed, signaled by the variable dataPre = 1.
Pre-processing of the registered signal consists in extracting a fragment of data of a specific length (dataPreProc function) and filtration using the predefined filters (filtration function). The obtained results are further analyzed in the FeatureExtraction state 33C0. The purpose of this state is to isolate characteristic features from the signal.
In order to test the designed BCI state machine, the detection of characteristic parameters was based on the FFT analysis [15]. This method is based on reading the frequency at which the largest amplitude value was obtained. Determination of the Fourier transform in the FeatureExtraction state 33C0 is performed by the fftProc function, and the reading of the frequency with the highest amplitude value is performed by the fMaxFind function. The FeatureExtraction state activity represents the fEPoc variable. The last sub-state 34C0 of DataProcessing 3C0 state is the Classification, in which a classification of characteristics and sending a control command to the mobile robot is made. Since the task of the developed BCI system is the mobile robot control, one of five characteristics (modes) may be selected as a result of classification:
-
MoveForward;
-
MoveRight;
-
MoveBack;
-
MoveLeft;
-
Unclassified.
The command controlling the robot movement is called after that in the state machine using the coder. extrinsic function.

3. Results

Verification of BCI Control System

To verify the correct operation of the MainController-based BCI control system, the necessary tests were carried out. Testing was performed by “injecting” recorded signals, i.e., (EEG) electro-encephalographic signals from one measuring electrode and its corresponding impedance value. In addition, a set of simulation signals was introduced into the system: activation of the start button (variable start), connection to the TruScan 24 device (variable eegStatus) and execution of the task by the mobile robot (isDone variable).
There are two control scenarios realized in the experimental study:
(1)
properly operating machine;
(2)
occurrence of impedance error.
The first scenario which presents one cycle of the correct functioning of the BCI control system is shown in the work. Data “injected” into the BCI system is presented in Figure 9.
The operation of the BCI control system is shown in Figure 10. The initial state (initializing) is the Idle state. It is a waiting state from which the output takes place when a connection is established with the TruScan 24 device (variable error1 = 0) and the start button is on (variable start = 1). Calling the errorConnection function in each simulation step determines the value of the error1 variable.
Because the connection to the TruScan 24 device has been established correctly, after the start button is triggered in a 0.5 s simulation (Figure 10a) the system goes into the Running state, activating its default Waiting condition. Switching to the Running state means leaving the Idle state, which reflects the change in the idle value and the light stimulator activation (Figure 10c).
After 1 s, the Waiting sub-state switches to the DataRecording sub-state, in which the control system waits for 5 s for the recorded data from the TruScan 24 device. This step illustrates the variable datRec shown in Figure 10d. The quality of the received data is checked by the errorLen and errorImp functions, and their results are assigned to the error variables error2 and error3 respectively. Then the logical value of these variables is checked. The quality of the “injected” data met the above criteria, and the system went into the DataProcessing state. This moment (in 6.5 s) reflects the change in the value of the led variable and dataRec of Running status (Figure 10d) and the variable dataProc of the DataProcessing state (Figure 10e).
Transitions between consecutive substates: DataShowing, DataPreprocessing, FeatureExtraction and Classification are shown in the DataProcessing graph in Figure 10e. After classifying and sending a control command (6.9 s), the system moves from the DataProcessing state to the RobotWorking state. This is shown in Figure 10f by the variable robProc. In 8.8 s of the simulation, the system receives information about the robot completing the task, which is shown by the isDone variable on the RobotWorking chart (Figure 10a,f).
After leaving the RobotWorking state, the Running status is activated again. It was activated for 0.5 s because the start button was turned off, which caused the system transition to the Idle state. The system remained in this state till the end of the simulation.

4. Discussion

One of the research issues addressed in this work was the design of a BCI system and its implementation in mobile robot control. For this aim, the conceptual model of the BCI system was developed at the conceptual design phase first, and concrete construction of the BCI system including BCI control system were implemented at the detailed design phase after that. The BCI control system was designed to fulfil the control modes of mobile robot being controlled. Another research problem addressed in the work was the use of biological signal processing algorithms that would allow the extraction of characteristic parameters from the electroencephalographic signal that could be used to control the brain–computer interfaces. The main attention was paid to the analysis and detection of the characteristic parameters of Steady-State Visual Evoked Potentials (SSVEP) [10], generated in the brain by stimulation of the retina with a light stimulus at a frequency above 6 Hz. The development of the system using the characteristic parameters of the electroencephalographic signal to control the selected output device was preceded by experiments aimed at selecting the best light stimulus dedicated to BCI systems.
When designing a new BCI control system, it was important to use the Model-Based Design (MBD) methodology of HS, i.e., design using systems models. This methodology is based on the implementation of each sub-system that is a part of the new system of higher level, using models built in the MATLAB/Simulink software. By preparing the object model, one can simulate the entire control system and check how it affects the objects before the construction of the prototype. The main advantage of the MBD methodology of HS is that the hierarchical connections between particular components of the designed system are strictly defined at the modeling stage of the conceptual and detailed design phases. After verifying the correctness of the system operation, using the automatic code generation tools available in the MATLAB (MATLAB Coder, Simulink Coder, Embedded Coder) package, one can implement the control algorithm on the target device. Control of the executive element in the designed BCI system was carried out based on the state machine, which was implemented in the MATLAB 2014a/Simulink environment. As part of the aforementioned Simulink environment, Stateflow module was used for modeling and simulation of event-controlled systems with finite state machines. The main advantage of the Stateflow module is the availability of linguistic elements; hierarchy; and deterministic executive semantics that allow to describe complex logic in a natural, understandable and legible way. In addition, Stateflow module has got the following advantages: (a) application of flow diagram notations and state changes on one diagram, traditional C language syntax with input and output arguments; (b) description of the operation of the finite machine proposed by David Harel [15], enabling the representation of the hierarchy; (c) parallel operation and history within the states; (d) scheduling state changes using time operators; and (e) equipping with an integrated debugger that allows viewing data step-by-step through the subsequent stages of the model. BCI system implementation requires a control system development that will meet the relevant requirements. The most important element of the designed BCI control system is the MainController unit, which contains the entire logic necessary to control BCI sub-systems, i.e., TruStan 24 electroencephalograph, a light stimulator and a mobile robot.
The development of a BCI system using the characteristic parameters of the electroencephalographic signal to control the mobile robot allowed formulation of the following conclusions. The offline tests of the proposed algorithms for SSVEP characteristic parameters detection confirmed that the accuracy of the parameters classification is influenced by the length of the analyzed signal, the number of multiples taken for analysis, and the number of measuring electrodes. The offline tests allowed the selection of control algorithms based on statistical methods (LASSO) to be more efficient in detecting characteristic parameters of SSVEP [10] in comparison with methods using spectral analysis (PSDA). A virtual environment was created that fully imitated the brain–computer interface, implementing feedback based on the control system model and the mobile robot’s kinematic model. This environment allowed free offline testing by “injecting” previously registered data, and then used it to conduct final online tests. This approach significantly reduced the time needed to develop the resulting system. The conducted online tests confirmed the SSVE potentials fitness to control a mobile robot. The presented conclusions also confirm the effectiveness of the electroencephalographic signals application as control signals in the brain–computer interfaces.

5. Conclusions

Application of novel Hierarchical Systems technology in conceptual and detailed design of a BCI (Brain Computer Interface) system implemented to control a mobile robot is presented in this paper. Proposed conceptual model of the designed biomechatronic BCI system (Section 2.2) contains connected systemic models of the BCI subsystems of various natures, i.e., biological (brain), computer (control PC), visual informatics (LCD, GUI), electronic (sensors) and executive electro-mechanical (mobile robot), presented in the general formal basis of HS. Connections of the conceptual systemic models of the BCI subsystems with their models used at the detailed design phase are revealed. The BCI control system is presented at the conceptual design phase in the form of an HS coordinator. At the detailed design phase, the BCI control system was implemented by internal control unit NXT 2.0, which consists of ARM7 and AVR microcontrollers and BCI control PC. A concrete model of BCI CS was implemented in BCI control PC in the form of finite state machine within the frameworks of Matlab program system using Simulink Stateflow module. The main element of the BCI control system is the MainController unit, which realizes logic laws of control of TruStan 24 electroencephalograph (EEG) unit, light stimulator and mobile robot. The mobile robot being controlled is Mindstorms robot. Necessary tests were carried out to verify the MainController-based BCI control system designed. Testing was performed by “injecting” recorded electroencephalographic (EEG) signals and introducing a set of simulation signals into the system. The offline tests allowed the selection of control algorithms based on statistical methods more efficient in detecting characteristic parameters of SSVEP [1,10]. The conducted tests confirmed the effectiveness of SSVE potential application in a mobile robot control, as well as EEG signals application as control signals in a BCI system. Further research aimed at implementing learning strategies of HS coordinator in the BCI MR control system to realize high-level behaviors of mobile robot learning from its low-level motions while performing selected tasks is planned. It will make possible further improvement of the BCI MR control system and realization of learning and decision-making functions in robot control tasks.

Author Contributions

Formal analysis, V.M.; Investigation, A.N. and K.H.; Methodology, K.M.; Software, K.H.; Validation, A.N.; Writing—original draft, K.M.; Writing—review & editing, V.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was partially funded by the Polish National Agency for Academic Exchange (project PPI/APM/2018/1/00033/U/001), and by the funds of the Faculty of Mechanical Engineering of Bialystok University of Technology, Poland, within the framework of the original research work WZ/WM/1/2019.

Acknowledgments

The work presented was partially financed by the Polish National Agency for Academic Exchange as part of the Academic International Partnerships (project PPI/APM/2018/1/00033/U/001).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Nawrocka, A.; Holewa, K. Brain-Computer Interface Based on Steady-State Visual Evoked Potentials. In Proceedings of the 14th IEEE International Carpathian Control Conference, Rytro, Poland, 26 May 2013; pp. 251–254. [Google Scholar]
  2. Miatliuk, K.; Holewa, K.; Nawrocka, A. Conceptual Design of BCI in the Formal Basis of Hierarchical System. In Proceedings of the 15th IEEE International Carpathian Control Conference, Velke Karlovice, Czech Republic, 28 May 2014; pp. 336–341. [Google Scholar]
  3. Ullman, D.G. The Mechanical Design Process, 4th ed.; McGraw-Hill: Singapore, 2010. [Google Scholar]
  4. Mesarovic, M.; Macko, D.; Takahara, Y. Theory of Hierarchical Multilevel Systems; Academic Press: Cambridge, MA, USA, 1970. [Google Scholar]
  5. Novikava, S.; Mialtiuk, K.; Gancharova, S.; Kaliada, W. Aed Construction and Technology in Design. In Proceedings of the 7th IFAC Large Scale Systems Symposium, Pergamon, London, UK, 11 July 1995; pp. 379–381. [Google Scholar]
  6. Novikava, S.; Miatliuk, K.; Gancharova, S.; Daronin, S.; Buka, P.; Ivanow, A.; Zhybul, A.; Danichaw, A.; Sergeichik, V. Mathematical and Cybernetical Means of Aed Theory. In Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, Beijing, China, 14–17 October 1996; Volume 4, pp. 2874–2879. [Google Scholar]
  7. Miatliuk, K.; Kim, Y.H.; Kim, K.; Siemieniako, F. Use of Hierarchical System Technology in Mechatronic Design. J. Mechatron. 2010, 20, 335–339. [Google Scholar] [CrossRef]
  8. Miatliuk, K. Conceptual Model in the Formal Basis of Hierarchical Systems for Mechatronic Design. Cybern. Syst. 2015, 46, 666–680. [Google Scholar] [CrossRef]
  9. Miatliuk, K. Conceptual Design of Mechatronic Systems; WPB: Bialystok, Poland, 2017; Available online: https://pb.edu.pl/oficyna-wydawnicza/wp-content/uploads/sites/4/2018/02/Miatluk_publikacja.pdf (accessed on 23 March 2020).
  10. Zhu, D.; Bieger, J.; Molina, G.G.; Aarts, R.M. A Survey of Stimulation Methods Used in SSVEP-based BCIs. Comput. Intell. Neurosci. 2010, 1, 1–12. [Google Scholar] [CrossRef] [PubMed]
  11. Mesarovič, M.; Takahara, Y. Abstract Systems Theory; Springer: Berlin/Heidelberg, Germany, 1990. [Google Scholar]
  12. Siegwart, R.; Nourbakhsh, I.R. Introduction to Autonomous Mobile Robots; MIT Press: Cambridge, MA, USA, 2004. [Google Scholar]
  13. Pappalardo, C.M.; Guida, D. Forward and Inverse Dynamics of a Unicycle-Like Mobile Robot. Machines 2019, 7, 5. [Google Scholar] [CrossRef] [Green Version]
  14. Drusinsky, D.; Harel, D. On the Power of Bounded Concurrency: Finite Automata; ACM: New York, NY, USA, 1994; Volume 41, pp. 517–539. [Google Scholar]
  15. Lyons, R.G. Understanding Digital Signal. Processing, 3rd ed.; Prentice Hall: Upper Saddle River, NJ, USA, 2011. [Google Scholar]
Figure 1. Structural scheme of aed—standard block of HS. S0 is the coordinator, εS is the environment, Si are subsystems, πSi are subprocesses, πSl is the process of level ℓ, Xl and Yl are the input and output of mechatronic system Sl; and ci, zi, γ, wi, ui, yi are interactions.
Figure 1. Structural scheme of aed—standard block of HS. S0 is the coordinator, εS is the environment, Si are subsystems, πSi are subprocesses, πSl is the process of level ℓ, Xl and Yl are the input and output of mechatronic system Sl; and ci, zi, γ, wi, ui, yi are interactions.
Applsci 10 02557 g001
Figure 2. Structural scheme of the BCI system being designed.
Figure 2. Structural scheme of the BCI system being designed.
Applsci 10 02557 g002
Figure 3. Robot location in the global coordinates (reference system).
Figure 3. Robot location in the global coordinates (reference system).
Applsci 10 02557 g003
Figure 4. Robot kinematics model created in Simulink: (a) general view, (b) simulink realization of kinematic equations describing robot location [12].
Figure 4. Robot kinematics model created in Simulink: (a) general view, (b) simulink realization of kinematic equations describing robot location [12].
Applsci 10 02557 g004
Figure 5. Simulation results of robot’s motion: (a) values of linear velocities vl and vr, (b) picture at t1 time moment, (c) picture at t2 time moment.
Figure 5. Simulation results of robot’s motion: (a) values of linear velocities vl and vr, (b) picture at t1 time moment, (c) picture at t2 time moment.
Applsci 10 02557 g005
Figure 6. (a) cap for EEG of Deymed Diagnostic company; (b) 19 chlorine silver, reference and grounding electrodes; (c) subject (man-operator) being examined.
Figure 6. (a) cap for EEG of Deymed Diagnostic company; (b) 19 chlorine silver, reference and grounding electrodes; (c) subject (man-operator) being examined.
Applsci 10 02557 g006
Figure 7. BCI control PC S 0 and NXT control unit S o 4 1 presented in form of coordinators of 4S1 mobile robot and its actuating system oS4 of level −1, i.e., servos and wheels, respectively.
Figure 7. BCI control PC S 0 and NXT control unit S o 4 1 presented in form of coordinators of 4S1 mobile robot and its actuating system oS4 of level −1, i.e., servos and wheels, respectively.
Applsci 10 02557 g007
Figure 8. BCI control system developed in Matlab/Simuulink environment.
Figure 8. BCI control system developed in Matlab/Simuulink environment.
Applsci 10 02557 g008
Figure 9. Time series: (a) EEG signal, (b) electrode impedance.
Figure 9. Time series: (a) EEG signal, (b) electrode impedance.
Applsci 10 02557 g009aApplsci 10 02557 g009b
Figure 10. Auxiliary variables for the properly operating state machine scenario, i.e. (a) set of Inputs signals entered into the system, (b) set of variables Errors, (c) Idle state variable, (d) Running state variables, (e) set of DataProcessing state variables, (f) RobotWorking state variable.
Figure 10. Auxiliary variables for the properly operating state machine scenario, i.e. (a) set of Inputs signals entered into the system, (b) set of variables Errors, (c) Idle state variable, (d) Running state variables, (e) set of DataProcessing state variables, (f) RobotWorking state variable.
Applsci 10 02557 g010
Table 1. Selected input and output variables of MainController.
Table 1. Selected input and output variables of MainController.
X0/Y0Variable NameTypeDescription
INPUTS
(X0)
Startbooleanassumes a value of 1 for the running BCI system
eegStatusbooleantakes the value 1 when there is a connection error with the TruScan 24 device
isDonebooleantakes the value 1 when the robot has finished the task
indoubletable with registered EEG signal
impdoubletable with registered impedance values
OUTPUTS
(Y0)
idlebooleantakes the value 1 when state Idle is active
error1booleantakes the value 1 when there is a connection error with the TruScan 24 device
error2booleantakes the value 1 when there is an error related to reaching a certain signal length
error3booleantakes the value 1 when there is a connection error with the TruScan 24 device
ledbooleantakes the value 1 when the light stimulator in on
dataRecbooleantakes the value 1 when the state DataRecording is active
dataProcbooleantakes the value 1 when the state DataProcessing is active
dataShowbooleantakes the value 1 when the state DataShowing is active
dataPrebooleantakes the value 1 when the state DataPreprocessing is active
fEProcbooleantakes the value 1 when the state FeatureExtraction is active
classProcbooleantakes the value 1 when the state Classification is active
classintegertakes the value from the set {−1, 1, 2, 3, 4} being the result of Classification state
robProcboolean takes the value 1 when the state RobotWorking is active
Table 2. BCI PC control system S 0 states C 0 .
Table 2. BCI PC control system S 0 states C 0 .
State 1C0State 2C0State 3C0
IdleRunningDataProcessing

Share and Cite

MDPI and ACS Style

Miatliuk, K.; Nawrocka, A.; Holewa, K.; Moulianitis, V. Conceptual Design of BCI for Mobile Robot Control. Appl. Sci. 2020, 10, 2557. https://doi.org/10.3390/app10072557

AMA Style

Miatliuk K, Nawrocka A, Holewa K, Moulianitis V. Conceptual Design of BCI for Mobile Robot Control. Applied Sciences. 2020; 10(7):2557. https://doi.org/10.3390/app10072557

Chicago/Turabian Style

Miatliuk, Kanstantsin, Agata Nawrocka, Karolina Holewa, and Vassilis Moulianitis. 2020. "Conceptual Design of BCI for Mobile Robot Control" Applied Sciences 10, no. 7: 2557. https://doi.org/10.3390/app10072557

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop