*Proceeding Paper* **Investigation of Internal Model for Unmanned Vehicle Control in Case of Its Aggressive Motion along a Spatial Trajectory †**

**Igor Prokopiev 1, Elena Sofronova 1,\* and Viktoria Moiseenko <sup>2</sup>**


**Abstract:** The work is devoted to the study of methods that are used to control the movement of an object along a given trajectory. A control method involving an accurate internal model is proposed. This internal model was built on the basis of the object's mathematical model and real object, performed by artificial neural networks. For a limited period of time the model is able to determine the object state without surveillance system usage. The dynamic model of an unmanned vehicle was obtained by method developed at the Robotics Center of the FRC CSC RAS. This method acquires experimental data and performs model identification by means of a neural network. The trajectory is a set of spatial points generated by the developed real unmanned vehicle simulator. The control was carried out on the basis of PID-controller and model predictive control method. The comparison of control methods for a real and virtual unmanned vehicles was conducted in the simulator developed. The results of field experiments, during which control by internal model was applied, are presented.

**Keywords:** identification; unmanned vehicle; path tracking

**1. Introduction**

Unmanned vehicles control from the initial state to the final one should meet the desired quality requirements. At the same time, it is necessary to synthesize such control laws that ensure the achievement of the control goal in the wide class of the uncertainty of vehicle's dynamics. To synthesize the required control laws, the unmanned vehicles control system simulation should be performed. A mathematical model of a real system can be obtained with the help of well-known identification methods [1,2]. Herein the following system identification methods are used, ARMAX (autoregressive moving average models with exogenous inputs) and NARMAX (non-linear ARMAX). These methods allow to obtain linear and non-linear polynomial functions that model the relationship between the perception of the robot sensor and its motor response. These methods are extended to neural network structures [3] and are successfully applied to non-linear unmanned vehicles.

One of the approaches in the field of unmanned mobile systems, such as unmanned vehicles operating in automatic mode, is aimed at the development of non-linear control laws for real time trajectories tracking [4–6].

Unmanned vehicles' real-time trajectory control is usually divided into three sub-tasks, trajectory generation, position determination, and trajectory tracking.

This paper presents the results of model identification of a real unmanned vehicle. Kinematic equations of unmanned vehicle describe mass center position (*x*, *y*) and direction of movement (*θ*). These parameters depend on linear velocity (*v*) and rotation angle of front wheels (*α*). Unmanned vehicle and its kinematic movement control scheme are presented in Figure 1.

**Citation:** Prokopiev, I.; Sofronova, E.; Moiseenko, V. Investigation of Internal Model for Unmanned Vehicle Control in Case of Its Aggressive Motion along a Spatial Trajectory. *Eng. Proc.* **2023**, *33*, 38. https://doi.org/10.3390/ engproc2023033038

Academic Editors: Askhat Diveev, Ivan Zelinka, Arutun Avetisyan and Alexander Ilin

Published: 20 June 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/).

Artificial neural networks belong to modern model identification methods used in robotics. Combined with differential equations, ANNs provide satisfying results in real non-linear dynamics systems identification.

(**a**) (**b**) **Figure 1.** Unmanned vehicle (**a**) and its kinematic movement control scheme (**b**).

The article presents a formal statement of the model identification problem. A universal strategy for its solution that uses ANNs is proposed. The obtained model, or so-called the internal one, is applied in a special simulator developed to automate path generation and the process of obtaining the state of the unmanned vehicle that is conducted in selected control methods in case of some parametrical changes.

### **2. Unmanned Vehicle Model Identification**

The unmanned vehicle (UV) is built on the basis of an automobile chassis on a scale of 1:10, has a weight of 1.5 kg and can reach speed up to 10 m/s. The appearance of the UV is shown in Figure 1a. The front wheels of the UV implement steering, the rear ones monitor the state of the robot. Figure 1b shows the kinematic movement control scheme of the unmanned vehicle, where *x*, *y* refer to the coordinates; *α* is the angle of front wheels rotation; *θ* is the UV orientation relative to the *x* axis; *L* is the distance between the front and rear axes of the robot; and *R* is the base point located in the center of the robot's rear axis.

Experimental data on the vehicle movement was obtained according to a special technique developed in the Robotics Center of the FRC CSC RAS.

The vehicle model consists of hybrid finite-difference equations of the following form

$$\mathbf{x}(k) = \begin{bmatrix} x(k) \\ y(k) \\ \theta(k) \\ v(k) \end{bmatrix} = \begin{bmatrix} x(k-1) + \Delta t v(k-1)\cos(\theta(k-1)) \\ y(k-1) + \Delta t v(k-1)\sin(\theta(k-1)) \\ f^{\theta}(v(k-1), \theta(k-1), u(k), \omega(k), \Delta t) \\ f^{v}(v(k-1), \theta(k-1), u(k), \omega(k), \Delta t) \end{bmatrix}, k = 1, \ldots, K,\tag{1}$$

where **x**(k) is a state vector,

$$\mathbf{x}(k) = \begin{bmatrix} x(k) & y(k) & \theta(k) & v(k) \end{bmatrix}^T = \begin{bmatrix} x(k) & y(k) & \mathbf{u}(k) \end{bmatrix}^T,\tag{2}$$

*v*(*k*) is the velocity of the object, *θ*(*k*) is the UV orientation relative to the *x* axis, *ω*(*k*) is the component of control for orientation *θ*(*k*), *u*(*k*) is the component of control for linear velocity *<sup>v</sup>*(*k*), <sup>Δ</sup>*<sup>t</sup>* is the time span, *<sup>f</sup> <sup>θ</sup>* (*v*(*<sup>k</sup>* <sup>−</sup> <sup>1</sup>), *<sup>θ</sup>*(*<sup>k</sup>* <sup>−</sup> <sup>1</sup>), *<sup>u</sup>*(*k*), *<sup>ω</sup>*(*k*), <sup>Δ</sup>*t*) and *<sup>f</sup> <sup>v</sup>*(*v*(*<sup>k</sup>* <sup>−</sup> <sup>1</sup>), *θ*(*k* − 1), *u*(*k*), *ω*(*k*), Δ*t*) are the outputs of a neural network, *K* is the number of control steps.

Object movement is determined by orientation *θ*(*k*) and velocity *v*(*k*) being predicted by neural network. The inputs of the neural network include orientation and speed control signals *ω*(*k*) and *u*(*k*) along with the previous state of orientation *θ*(*k* − 1) and velocity *v*(*k* − 1). At the output, we obtain the current values of orientation *θ*(*k*) and velocity *v*(*k*). The neural network has the following structure

$$\mathbf{z}^{(l)} = \mathbf{q}^{(l)} \left( \mathbf{W}^{(l)} \mathbf{z}^{(l-1)} + \mathbf{z}\_0^{(l)} \right), l = 1, \dots, L,\tag{3}$$

where **z**(*l*) is the output vector of layer *l*, *ϕ*(*l*)(**s**) is a vector activation function of layer *l*, **W**(*l*) is a weight matrix of layer *l*, **W**(*l*) = & *w*(*l*) *i*,*j* ' , *<sup>i</sup>* = 1, ... , *nl*, *<sup>j</sup>* = 1, ... , *nl*−1, dim**W**(*l*) <sup>=</sup> *nl* <sup>×</sup> *nl*−1, **<sup>z</sup>** (*l*) <sup>0</sup> is a bias of *l*, **z** (*l*) <sup>0</sup> <sup>=</sup> " *v*(*k* − 1) *θ*(*k* − 1) *u*(*k*) *ω*(*k*) Δ*t* #*T* , *L* is the number of layers, **z**(*L*) = " *θ*(*k*) *v*(*k*) #*<sup>T</sup>* , *<sup>n</sup>*<sup>0</sup> <sup>=</sup> 5, *nL* <sup>=</sup> 2.

Activation function *ϕ*(*l*)(**s**) is applied to each component of the state vector

$$\boldsymbol{\mathfrak{p}}^{(l)}(\mathbf{s}) = \begin{bmatrix} \boldsymbol{\mathfrak{p}}\_1^{(l)}(\mathbf{s}\_1) & \dots & \boldsymbol{\mathfrak{p}}\_{n\_l}^{(I)}(\mathbf{s}\_{n\_l}) \end{bmatrix}^T.$$

The sought-for parameters of the neural network include the components of the weight matrix and bias of each layer. The total number of the parameters sought is ∑*L <sup>l</sup>*=<sup>1</sup> *nl*(*nl*−<sup>1</sup> + <sup>1</sup>).

The quality criterion for neural network parameter optimization is the root-meansquare error of state prediction (2)

$$\sum\_{k=1}^{K} \|\mathbf{z}^{L}(k) - \mathbf{u}(k)\|\_{2} \to \min. \tag{4}$$

For the experiments the following neural network was used: *L* = 4, *n*<sup>0</sup> = 5, *n*<sup>1</sup> = *n*<sup>2</sup> = *n*<sup>3</sup> = 64, *n*<sup>4</sup> = 2. All layers but the last used ReLu as activation function. To find the vector of optimal neural network parameters the stochastic gradient descent method ADAM was used [7].

To collect the required amount of data in the entire robot operating control range, VISLAM system was used. This system is based on RealSense t265 camera, that records data on control and state vectors at frequency of 20 Hz.

Figure 2 shows a trajectory obtained from a training sample (the light dotted line) and a trajectory obtained by internal model (1) with a neural network (the solid line).

**Figure 2.** The trajectories of the vehicle movement on the plane {*x*, *y*}.

Figure 3 depicts the change of state vector components *v*(*t*) and *θ*(*t*) over time. The light line shows the movement of a real vehicle, the solid one corresponds to the movement according to the model (1), and the dotted line corresponds to control components.

**Figure 3.** The change of state and control components over time.

#### **3. Trajectory Tracking Scheme**

To implement motion control along the trajectory, it is necessary to solve the control synthesis problem [8] and represent control as function that depends on the coordinates of the state space. In the majority of cases, a trajectory tracking error is calculated and a control signal, that works out this error, is set.

Depending on the task, the desired trajectory is set as a sequence of points on a plane or in three-dimensional space, and instead of calculating the distance to the trajectory, the distance to the points of the desired trajectory is determined. The block diagram of the unmanned vehicle control system, in which either PID-controller or model predictive control is used, is shown in Figure 4.

**Figure 4.** Block diagram of an internal model control system.

#### **4. Controllers**

#### *4.1. Closed-Loop Control*

In the steering control loop of the vehicle a P-controller was used. The control signal had the following form

$$
\alpha = \arctan \frac{L\omega}{v},
\tag{5}
$$

where *L* is the distance between the axes of the robot, *v* and *ω* is the linear and angular velocities of the robot,

$$
\omega = \frac{\upsilon k(s) \cos(\theta\_c)}{1 - k(s)e} - k\_\theta \mid \upsilon \mid \theta\_c - \left(k\_\varepsilon \upsilon \frac{\sin(\theta\_c)}{\theta\_c}\right) e,\tag{6}
$$

where *k*(*s*) is a path curvature, *θ<sup>e</sup>* is an error in motion direction, *e* is a position error, and *k<sup>θ</sup>* and *ke* are controller coefficients.

Figure 5 shows the results of tracking the desired trajectory using P-controller and an internal model. The dashed line shows the desired trajectory, and the solid line shows the trajectory that has been tracked. The dots mark the constraints in the form of gates.

**Figure 5.** The movement along the trajectory with the help of internal model and P-controller.

#### *4.2. Model Prediction Control*

Predictive control is an optimization strategy that has a variety of advantages, such as accounting constraints imposed on system's state and control signals, and ability to work with non-linear objects. The optimal trajectory is the solution to the optimization problem. Predictive control includes object simulation under various control actions that ensure current problem solution, for example, bypassing the obstacles or passing through a gate. Among the resulting set of trajectories, one trajectory is selected according to some criterion. As a criterion, the squared error of achieving the goal and the squared control signal with some weighting factors are often used

$$J = \sum\_{i=1}^{L} w\_{\mathbf{x}} (r\_i - \mathbf{x}\_i)^2 + \sum\_{i=1}^{L} w\_{\mathbf{u}} \Delta \mu\_{i'}^2 \tag{7}$$

where *wx* and *wu* are weights, *ri* is a desired trajectory, *xi* is a manipulated variable, *ui* is a control signal, *L* is a control horizon.

The goal of predictive control lies in sequential search for optimal control strategy for a certain time interval that is called control horizon. Each time the first step of the strategy found is the only one applied. This step completed, the prediction horizon is being shifted and new optimization starts.

Online optimization taking place at every step has became possible due to the availability of high-performance computing facilities embedded on the vehicle's board.

For the control object model (1) and the prediction horizon value equal to 8, the desired and obtained trajectories are shown in Figure 6.

**Figure 6.** The movement along the trajectory with the help of internal model and model prediction control.

#### **5. Results**

To study the approaches proposed, an environment for unmanned vehicles simulation based on ROS1 and ROS2 operating systems, has been developed.

Experimental comparison of control methods that apply internal model for real-time control was conducted, with the problem of unmanned vehicle trajectory tracking served as experimental domain. The control was carried out on the basis of P-controller and model predictive control (MPC). The results of field experiments are shown in Table 1. The difference between the length of the desired trajectory *S*<sup>1</sup> and the length of the path *S*<sup>2</sup> covered under different velocity *v* was used as a comparison criterion. The desired trajectory length was 67.4 m.


**Table 1.** Results of field experiments.

According to the experiments the following conclusions may be performed:


**Author Contributions:** Conceptualization, I.P. and E.S.; methodology, I.P.; software, I.P.; validation, I.P. and V.M.; formal analysis, E.S.; investigation, I.P.; data curation, I.P.; writing—original draft preparation, I.P., E.S. and V.M.; writing—review and editing, E.S.; visualization, V.M.; supervision, I.P. 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:** The experimental data for both methods is available at https://cloud.mail.ru/public/raik/h6vjgsMkR (accessed on 19 June 2023).

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

### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
