# Conceptual Design of BCI for Mobile Robot Control
## 2 Materials and Methods
### 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:  
\[{}_{\text{BCI}}S^{\ell}\leftrightarrow{}_{\text{BCI}}\left\{\omega,S_{0}, \omega\right\}^{\ell} \tag{7}\]  
where, \(\omega^{\ell}\) is an aggregated dynamic representation of BCI, \(\omega^{\ell}\) is the system structure, \(S^{\ell}_{0}\) is BCI system coordinator (design & control system), and \(\ell\) 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_\(\omega^{\ell}\) contains coordinator \(S^{\ell}_{0}\), the set of sub-systems \(\overline{\omega}^{\ell-1}\) and their structural connections \({}_{\sigma}\)\({}^{\prime}\). The BCI subsystems \(\overline{S}^{\ell\pm 1}\) presented in \(\overline{\omega}^{\ell-1}\) form (2) are:  
\(\omega^{\ell-1}_{1}\): man-operator; \(\omega^{\ell-1}_{2}\): measuring system;  
\(\omega^{\ell-1}_{3}\): computer control system; \(\  
As for the mobile robot \({}_{4}S^{\ell-1}\) subsystem, concerning its motion process, the realization \({}_{4}\omega^{\ell-1}\) used at the conceptual design phase in (\(\rho\),\(\rho\)) form (2) can be presented in form (8) at the detailed design phase as the following kinematics equations [12]:  
\[ \begin{array}{c}x(t)=\frac{1}{2}\int_{0}^{t}[v_{r}(t)+v_{l}(t)]cos\varphi(t) dt,\ y(t)=\frac{1}{2}\int_{0}^{t}[v_{r}(t)+v_{r}(t)]sin\varphi(t)dt,\\ \varphi(t)=\frac{1}{a}\int_{0}^{t}[v_{r}(t)-v_{l}(t)]dt\end{array}  \tag{8}\]  
which connects linear \(\dot{x}\), \(\dot{y}\) and angular \(\dot{\varphi}\) velocities of robot center point \(P(x,y)\) (located in the middle of the axis connecting driven robot wheels) as the output \({}_{4}Y^{\ell-1}\) with the input \({}_{4}X^{\ell-1}\), i.e., linear velocities of the centers of the left \(v_{l}\) and right \(v_{r}\) wheels of robot. \(a\) is the distance between the centers of the left and right wheels, and \(\varphi\) 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 \(v_{l}\) and right \(v_{r}\) wheels of the robot respectively. The outputs are point \(P\) coordinates (\(x\),\(y\)), ICC coordinates \(xICC\) and \(yICC\), distance \(R\), and angle \(\varphi\) 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. Figure 3: Robot location in the global coordinates (reference system). 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 \(v_{l}\) and the right \(v_{r}\) of the wheel.