**1. Introduction**

Currently, there are many types of navigation of autonomous unmanned robots. Satellite navigation is certainly a common way. However, it also has a number of applicability limitations. For example, indoors, the satellite signal usually does not reach devices through concrete and metal structures. In this case, due to the fact that the space inside buildings is often limited to relatively small areas, it is possible to use navigation tools such as triangulation [1], navigation through various markers such as QR codes [2,3], barcodes [4], ArUco markers for position correction [5–7], and SLAM navigation [8,9], as well as combinations of the above methods.

In unexplored spaces, the most promising of the mentioned technologies is the SLAM navigation method [10]. This method can be used in an unprepared and unknown to the robot room to create a map and then use it. At present, this concept is widely used in the field of robotics for solving problems of autonomous motion [11–13]. According to SLAM, the robot needs to know its location at every moment of time, and also gradually scans the surrounding space with the help of sensors, thus compiling a map of the area. The map is built gradually as the robot explores new areas.

The main source of information about the location of the robot is odometry obtained in one way or another (wheels, computer vision, IMU, or a combination of both). However, any sensory system has its weak points. Therefore, for example, cameras can fail when lighting changes, or wheel slip can occur, causing an odometry error. In this regard, it becomes necessary to support the navigation system in some way independent of the readings of the sensors. This explains the relevance of this study.

The paper proposes the use of model-based navigation as a parallel system. In this case, one system can correct its values relative to the other.

**Citation:** Prokopiev, I. ; Shmalko, E.; Diveev, A. Autonomous Navigation of Mobile Robot Assisted by Its Identified Neural Network Model. *Eng. Proc.* **2023**, *33*, 8. http://doi.org/10.3390/ engproc2023033008

Academic Editors: Ivan Zelinka, Arutun Avetisyan and Alexander Ilin

Published: 17 May 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Federal Research Center "Computer Science and Control" of the Russian Academy of Sciences, 119333 Moscow, Russia; fvi2014@list.ru (I.P.) ; aidiveev@mail.ru (A.D.)

Receiving a mathematical model for the control object is often time-consuming and sometimes even impossible using traditional methods. To build a mathematical model of a robot, the laws of theoretical mechanics and the Lagrange equations of the second kind for generalized coordinates are used. It should be noted that the analytical derivation of the robot dynamics equations in most cases will not accurately determine some parameters of the model, for example, friction coefficients of the robot moving parts or moments of inertia of rotating structures. Thus, the analytical output of mechanics equations allows one to build models with accuracy to the values of some parameters.

In view of the increasing diversity and extremely complex nature of control objects, including the variety of modern robotic systems, the identification problem is becoming increasingly important, which allows one to build a mathematical model of the control object, having input and output data about the system. Conducting experiments in order to identify the correspondence of the mathematical model to a real object is the necessary stage of solving the identification problem.

The identification of a nonlinear system is of particular interest, since most real systems have nonlinear dynamics, and if, earlier, the identification of a system model consisted of the selection of optimal parameters for the selected structure, then the emergence of modern machine learning methods opens up broader prospects and allows one to automate the identification process itself. Thus, this process should also be automated and, therefore, must be considered as the task for machine learning.

A modern technique to identify a mathematical model of a robot is the use of artificial neural networks. To perform this, it is necessary, depending on the assumed complexity of the robot model, to choose the structure and type of the neural network, then, depending on the problem to be solved, select a set of controls and build a training sample. Next, it is necessary to train the neural network so that the resulting neural network reacts to control actions in the same way as a real object. It is this approach that is presented in this paper and applied in the described experiments for a mobile robot.

Further, the paper presents a mathematical formulation of the model identification problem. A universal approach for solving it based on modern methods of machine learning using neural networks is proposed. As an example, a solution to the navigation problem for a mobile wheeled robot based on the proposed approach using its identified model is presented.

#### **2. Problem Statement of the Control Object Identification by an Artificial Neural Network**

In the identification problem, the mathematical model of the control object is not fully or partially known, but the researcher has a real control object or its physical simulator. In this case, the real control object or physical simulator layout is an unknown function. The space of the input vectors of this function is the space of admissible controls for this object.

Let some control functions be set as functions of time

$$\mathbf{u}^{\dot{j}}(\cdot) = \mathbf{v}^{\dot{j}}(t), \ t \in [0; t^+], \tag{1}$$

where **<sup>u</sup>***<sup>j</sup>* <sup>∈</sup> <sup>U</sup> <sup>⊆</sup> <sup>R</sup>*m*, *<sup>j</sup>* <sup>=</sup> 1, ... , *<sup>K</sup>*, U is a compact set that takes into account control constraints, and *t* <sup>+</sup> is a limit value of time.

The control functions **v***<sup>j</sup>* (*t*), *j* = 1, ... , *K*, should be selected so that it is possible to determine dynamic abilities and speed limits in straight lines and at turns by the movement of the control object.

To obtain a training sample, it is necessary to conduct natural experiments. In the experiment, the control object is subjected to a given control **u***<sup>j</sup>* (·), *j* = 1, ... , *K* and at fixed times, *ti* = *i*Δ*t*, the state of the control object is stored, **x**(*ti*), *i* = 0, ... , *Dj*, where *Dj* is a number of time intervals for experiment with control **u***<sup>j</sup>* (·), *j* = 1, . . . , *K*.

A training sample for an artificial neural network is a set of stored values of the vectors of the control and the state in determined moments of time.

$$\mathbf{T}\_{\rangle} = (T\_{i}^{\dot{j}} = \{ \mathbf{u}^{\dot{j}}(t\_{i}), \mathbf{x}^{\dot{j}}(t\_{i}), t\_{i} = i\Delta t \}\_{i} : i = 0, \ldots, D\_{\dot{j}} \}. \tag{2}$$

The input vector for the artificial neural network is an element of the training sample **<sup>y</sup>**(*ti*) = *<sup>T</sup><sup>j</sup> <sup>i</sup>* , *i* = 1, . . . , *Dj* − 1, *j* ∈ {1; *K*}.

The output vector for the artificial neural network **z**(*ti*) must coincide with the state space vector for the next moment of time **x***<sup>j</sup>* (*ti*+1), *i* = 0..., *Dj* − 1, *j* ∈ {1; *K*}:

$$\mathbf{z}(t\_i) = \mathbf{f}\_{\text{NN}}(\mathbf{y}(t\_i)), \ i = 0, \ldots, D\_i - 1, \ j \in \{1; K\}. \tag{3}$$

where **f***NN*(**y**(*ti*)) is a function described by the artificial neural network.

A target functional of optimization in the machine learning process of the artificial neural network is

$$J\_0 = \sum\_{j=1}^{K} \sum\_{i=0}^{D\_j - 1} ||\mathbf{x}^j(t\_{i+1}) - \mathbf{z}(t\_i)|| \to \min. \tag{4}$$

In this case, the trained neural network is an approximation of the mathematical model of the control object in the form of a system of finite-difference recurrent equations.

If the time interval Δ*t* was selected to be quite small, then it is possible to use the artificial neural network as approximation of right parts of ordinary differential equation system in the Cauchy form. For this purpose, it is necessary to determine a rate of change of state variables for each time moment:

$$\dot{\mathbf{x}}^{j}(t\_{i}) = \frac{\mathbf{x}^{j}(t\_{i+1}) - \mathbf{x}^{j}(t\_{i})}{\Delta t}, \; i = 0, \ldots, D\_{j} - 1, \; j = 1, \ldots, \text{K}. \tag{5}$$

If the rate vector (5) is used as the output vector when training the neural network, then the mathematical model of the control object has the following form:

$$\mathbf{x}^{i}(t\_{i+1}) = \mathbf{x}^{i}(t\_{i}) + \Delta t \mathbf{f}\_{\text{NN}}(\mathbf{x}^{i}(t\_{i}), \mathbf{u}^{j}(t\_{i}), t\_{i}), \ i = 1, \ldots, D\_{j} - 1, \ j = 1, \ldots, \text{K}. \tag{6}$$

An important step in system identification is to determine the type of model used, since the overwhelming majority of methods implement the so-called parametric identification [14]. First, a certain model structure is selected, which is considered suitable for describing a given object. Next, an identification experiment is carried out in which the input and output signals are measured, and then the identification method implements the tuning of the model parameters in accordance with some adaptive laws, so that the response of the model to the input signal can approximately correspond to the response of the real system to the same input action. Most often, object identification is used using linear systems [15], since it is easy to determine the effect of various input signals on the output for them. Although linear models are attractive for many reasons, they have their limitations, especially since all physical systems are nonlinear to some extent, and in many cases linear models are not suitable for representing these systems. In this regard, there is currently a significant interest in methods for identifying nonlinear systems, especially using machine learning methods based on neural networks [16–18].

Neural networks, being a universal approximator, provide a powerful tool for identifying nonlinear systems. In view of the wide distribution and availability of software, neural networks have gained immense popularity. Combined approaches have also been developed, based, for example, on the reference model [19]. This article presents the implementation of a combined approach to the identification of a control object based on a neural network [20].

#### **3. Application Object Description**

A wheeled mobile robot shown in Figure 1 is taken as a control object.

**Figure 1.** A control object.

The work uses a mixed approach to identification, when part of the object model is known based on physical laws, and the other part is determined by a neural network trained on the basis of a specially formed training sample.

The robot motion model is described by a system of differential equations:

$$\begin{cases} \dot{\mathfrak{x}} = \upsilon \cos(\theta), \\ \dot{\mathfrak{y}} = \upsilon \sin(\theta), \\ \dot{\theta} = \omega. \end{cases} \tag{7}$$

where *x*, *y*, *andθ* define the object state, and *v*, *ω* are control signals.

Robot control is implemented using two signals: the desired linear velocity *u<sup>v</sup>* and the desired angular velocity *uω*. In the model (7), it is assumed that control signals are completely directly transmitted to the system *v* = *uv*, *ω* = *uω*. In fact, a completely different picture is observed: firstly, the speeds cannot change infinitely quickly, and the system always has a certain dynamics, and secondly, as a rule, there is some regulator at a lower level that directly controls the voltage supplied to the motors. Therefore, in order to adequately describe the robot motion model, we introduced two additional equations into the (7) system that describe an object's dynamics.

$$\begin{cases} \dot{\pi} = v \cos(\theta), \\ \dot{\nu} = v \sin(\theta), \\ \dot{\theta} = \omega, \\ \dot{\upsilon} = f^{v}(v, \omega, \mu^{v}, \mu^{\omega}), \\ \dot{\omega} = f^{\omega}(v, \omega, \mu^{v}, \mu^{\omega}), \end{cases} \tag{8}$$

where *f <sup>v</sup>* and *f <sup>ω</sup>* are unknown functions to be identified.

Factors such as friction of the wheels on the surface, inertia, and uneven distribution of the robot's mass do not allow writing the functions *f <sup>v</sup>*, *f <sup>ω</sup>* in an explicit form.

For the numerical implementation of the identification problem, Equation (8) is presented in the finite-difference form with the time step Δ*t*:

$$\begin{cases} \mathbf{x}\_{k+1} = \mathbf{x}\_k + \Delta t \cdot v\_k \cos(\theta\_k), \\ y\_{k+1} = y\_k + \Delta t \cdot v\_k \sin(\theta\_k), \\ \theta\_{k+1} = \theta\_k + \Delta t \cdot \omega\_{k'} \\ v\_{k+1} = F^\upsilon(v\_k, \omega\_{k'}, \mu\_{k'}^\upsilon, \mu\_{k'}^\upsilon, \Delta t), \\ \omega\_{k+1} = F^\omega(v\_k, \omega\_k, \mu\_{k'}^\upsilon, \mu\_{k'}^\upsilon, \Delta t). \end{cases} \tag{9}$$

To identify the system, we used the approximation of the function *F* by the parametric function *Fφ*. The learning function with parameters *φ* takes the current state of the robot, the control vector, and the time step as input, and outputs the state of the robot at the next moment of time:

$$[\upsilon\_{k+1}, \omega\_{k+1}] = F\_{\Phi}(\upsilon\_{k\prime} \omega\_{k\prime} \mathfrak{u}\_{k\prime}^{\upsilon} \mathfrak{u}\_{k\prime}^{\omega\prime} \Delta t). \tag{10}$$

Parameters *φ* are selected in such a way that the trajectory of the movement of the object described by the system of Equation (9) with the model (10) repeats the real trajectory of the robot as closely as possible.

#### **4. ANN Model Identification**

For training, the principle of supervised learning was chosen, in which the neural network is trained using the training dataset "input–reference output", and then checked using a set of validation and test data that did not fall into the training sample.

To collect data, multiple runs of the robot were implemented under various types of control. Figures 2 and 3 show the example trajectories and sample control data.

**Figure 2.** Sample 1: (**a**) trajectory; (**b**) control.

**Figure 3.** Sample 2: (**a**) trajectory; (**b**) control.

An artificial neural network with the multilayer perceptron architecture was chosen as the training model (10). PyTorch was used to train the neural network. A neural network with three layers was chosen, with 128 neurons on all hidden layers, an RELU activation function, and Adam optimization algorithm.

To assess the quality of the model, the accuracy of predicting the trajectory of movement by the model was evaluated on passages that were not included in the training sample. The neural network receives as input the initial state of the system and the control sequence for the test drive. As in the training phase, the trajectory of the robot's movement is predicted. To compare the predicted and actual trajectories, the *ATE* metric was used—the absolute translation error:

$$J\_{ATE} = \frac{1}{N} \sum\_{t=0}^{N} \sqrt{(\mathfrak{x}\_t - \mathfrak{x}\_t)^2 + (\mathfrak{y}\_t - \mathfrak{y}\_t)^2} \tag{11}$$

where *N* is the number of points in the trajectory; *xt* and *yt* are actual trajectory point coordinates; *x*ˆ*<sup>t</sup>* and *y*ˆ*<sup>t</sup>* are coordinates of the predicted trajectory point.

To assess the quality of the predicted angle, the *MAE* (mean absolute error) metric was used.

$$J\_{MAE} = \frac{1}{N} \sum\_{t=0}^{N} |yaw\_t - y\hat{a}w\_t|\_{\prime} \tag{12}$$

where *yawt* is the actual value of the yaw angle, and *yaw*ˆ *<sup>t</sup>* is the predicted value of the yaw angle.

The results of simulations of the trained neural network model are shown in Figures 4 and 5. As can be seen from the presented plots, the robot copes with the task of following the given trajectory even in the complex environment with strong surface slopes.

**Figure 4.** The trajectory to follow is given by green points at the distance of (**a**) 30 cm ; (**b**) 20 cm. The robots's trajectory is a red line.

**Figure 5.** The robot's trajectory (red line) in a complex environment of the Robotic Center of FRC CSC RAS.

#### **5. Discussion**

This paper presents an approach to the localization of a mobile robot based on the identified neural network model. The presented results show how the robot copes quite accurately with the task of following various trajectories. The resulting neural network model can be used as an independent method of localization or as an auxiliary algorithm for correcting the position in case of failure of sensors and cameras.

**Author Contributions:** Conceptualization, I.P. and E.S.; methodology, A.D. and E.S.; software, I.P.; validation, E.S.; formal analysis, A.D.; investigation, I.P. and E.S.; data curation, E.S.; writing—original draft preparation, E.S.; writing—review and editing, E.S. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflicts of interest.
