1. Introduction
Synthesis of a feedback stabilization system is one of the key tasks in applied robotics. Feedback is needed to level out the differences between the model and the real object, as well as other possible uncertainties and noise. From a mathematical point of view, this problem belongs to the class of problems for the synthesis of optimal control systems, where it is necessary to find a control vector function that depends on the state vector of the object and delivers a minimum to the quality functional (see
Figure 1).
There are two main strategies for the synthesis of a control system: parametric and structural-parametric.
Parametric synthesis includes all methods in which the control structure is specified, and only the parameters are optimally tuned from the point of view of the functional. This synthesis strategy is by far the most common. It also includes the most popular various PID controllers [
1,
2], other controllers based on neural networks [
3,
4], and fuzzy logic [
5,
6], etc. In all these approaches, some preliminary knowledge of the developer about the object is required in order to set the controller structure as correctly as possible; nevertheless, there is still no reason to consider the chosen structure as optimal, as only the parameters are adjusted according to the optimality criterion.
With the structural-parametric approach, not only are the parameters optimized, but the optimal structure of the feedback control function is also sought. Among the analytical methods for solving the problem of stabilization system synthesis, the most popular are methods based on solving the Riccati equation [
7], but, for linear systems only, as well as more modern analytical approaches of backstepping [
8] and analytical design of aggregated controllers [
9,
10], they also depend on the types of right-hand sides of nonlinear differential equations that describe the control object model. This challenging task for nonlinear systems can be addressed by a dynamic programming (DP) algorithm assisted by the Hamilton–Jacobi–Bellman (HJB) equation. However, it always results in difficulty due to the well-known curse of dimensionality. Recently, modern techniques such as adaptive DP (ADP) [
11,
12,
13,
14] and reinforcement learning (RL) [
15,
16,
17] have received increasing attention as powerful machine learning and optimization strategies for addressing the control problems of nonlinear systems regarding the use of neural networks for numerical approximating solutions of the HJB equation. However, these approaches also have many computational difficulties, primarily related to the definition and training of the neural networks used.
Thus, the application of machine learning methods opens up broad prospects, but it is necessary to develop novel control methods addressing general mathematical statements of the control synthesis problem in order to satisfy the requirement of optimal performance in control synthesis tasks. This motivates our research.
In this paper, we apply symbolic regression methods to solve the problem of synthesis of a stabilization system. These methods also belong to the class of machine learning methods, but unlike neural networks, they allow us to search for not only for parameters but also for the optimal structure of the control function. These methods use evolutionary optimization algorithms for the structural-parametric search for the control function, basing it directly on the value of the quality functional.
A wheeled mobile robot is considered as a control object.
The paper develops an applied software implementation of the robot control system. To create it, the most popular robotic operating system ROS is used today. It provides the ability to work with all aspects of the control system, including hardware abstraction, low-level control, message passing between processes, and package management. The developed software systems were tested in the Gazebo simulation environment, which is one of the most popular robotic simulators due to its compatibility with ROS. Gazebo is a 3D simulator that aims to model a robot in a way that gives you a close substitute for how the robot would behave in a real physical environment. Gazebo has a fairly reliable simulation of physics and various physical phenomena, takes into account the influence of forces, and also has a large number of plug-ins for simulating the operation of sensors, such as lidars or cameras. Due to these facts, most developers of control systems for robotic systems around the world use this ROS/Gazebo bundle as a standard for testing the developed control algorithms [
18,
19].
In this work, we used the ready-made Gazebo model ROSbot 2.0 integrated into ROS [
20]. As a position source, a plugin was used that gives the true coordinates of the robot. The robot model in the simulator is shown in
Figure 2.
For the selected object, the problem of synthesizing the stabilization system was successfully solved by machine learning based on symbolic regression via the network operator method [
21].
2. Problem Statement of the Stabilization System Synthesis
The main goal of the introduction of the stabilization system is to provide a stability property for the object in some domain .
Let us be given a mathematical model of a control object. This model can be derived from physical laws or identified by some machine learning technique [
22]. Generally, this model is described by a system of ordinary differential equations with a free control vector on the right hand side
where the state of the object is described by
, and control by
;
is a compact set,
,
An area of initial conditions is given
It is necessary to find a control function in the form
where
is a fixed point in the state space, which becomes an equilibrium point of the differential equation
where control function
has the following properties:
The properties (
6) indicate that
for the system
means that there is always a stable equilibrium point
. Additionally, the equilibrium point possesses attractor properties, since near this point all solutions converge.
Computationally, to provide a stability property to the equilibrium point
, the synthesis problem (
1)–(
4) is solved with the terminal point
, the initial domain
, and the quality criterion
where
is a weight coefficient,
is a time of achievement of the terminal position from the initial condition
of the set of initial conditions
,
,
and
are given positive values, and
is a partial solution of the system
for initial conditions
,
,
Since we are solving the problem of synthesizing a stabilization system using machine learning, we need machine confirmation of the achievement of the desired properties. Let us introduce the following definition of a machine criterion for a differential equation system to obtain some property. To define the property of the whole system (
1), it is enough to set a quantity
K of partial solutions that obtain this property.
Definition 1. If D experiments are carried out, and in every i experiment partial solutions of the differential equation perform the required property from any randomly selected initial conditions from the initial domain,and so the existence of this property for the differential equation in this domain is proven by a machine. In other words, as the number of experiments increases, the probability of a “bad” event, when the system does not have the desired property, tends to zero. From a mathematical point of view, this means that all private solutions for a domain of initial conditions have this property except for solutions for a subset of a zero measure.
Based on the proposed formulation of the problem statement, let us consider in the next section a solution of the stabilization system synthesis problem via a machine learning approach of symbolic regression for a mobile robot in a Gazebo simulation environment.
3. Stabilization System Synthesis for ROSbot in Gazebo
We consider the ROSbot 2.0 virtual robot implemented in the Gazebo physical simulation environment. The robot is a platform on four non-rotating wheels around the vertical axis. An electric motor is attached to each wheel. A differential control scheme is used: the robot moves forward and backward by applying the same voltage to all four electric motors; turning the robot to the right or left is carried out by supplying more voltage to the electric motors of the left or right wheels, respectively.
The robot motion model is described by the following system of differential equations [
23]
where
is a vector of state,
is a control vector.
Physical control of the robot in Gazebo is implemented using two signals:
— the desired linear speed; and
— the desired angular velocity. As we are aiming to stabilize the system, it can be assumed that control signals are completely directly transmitted to the system
,
. In this case, the (
13) equations are converted to the following:
The stabilization system is synthesized in advance and then is programmed into an onboard computer. For the solution, a machine learning approach based on symbolic regression was chosen. Symbolic regression allows you to search for a solution to the problem without training data, simply according to the formal statement, relying in the search process on the criterion of minimizing the functional. Moreover, this approach is universal and can be equally applicable to models of any kind, including non-linear models or models in the form of neural networks.
The network operator method [
21] was used in the calculations. This symbolic regression method is good because it uses the principle of variation of the basic solution, which significantly speeds up the process of finding a solution that is close to optimal. The method encodes possible solutions as a square upper triangular matrix. It is in the form of a matrix that describes the sequence of calculation of the control function that the resulting stabilization system is placed in the on-board computer.
In the calculations, the following parameters were set.
The control values were constrained
The initial domain was defined by 26 elements:
The stabilization point was chosen as
It is necessary to find a control function in the form
where
are constant parameters,
, such that a robot from all 26 initial conditions (
15) reaches the stabilization point (
16) with minimal time and highest accuracy.
A time consuming computational experiment has been carried out, and as the result of synthesis the network operator method found a solution in the form of a network operator matrix. The dimension of the matrix in this experiment was L×L, where .
This matrix encodes a rather sophisticated symbolic formula. Each non-zero element represents one of either unary (such as
,
⋯) or binary operation (such as
,
). To be able to calculate control values, the matrix has to be decoded online on an onboard computer in real time. The computational complexity of such a process is limited by
but is often reasonably low because a lot of matrix elements are zero.
4. Verification in Gazebo
For a real time onboard computation network, the operator decode function has been implemented in C++ [
24] and later incorporated into the ROS node Rosbot controller. Rosbot controller node accepted robot ground truth coordinates and movement goal as inputs and generated control signals
every 100 ms as outputs.
The robot was directed to reach several goals. After reaching its first goal, the robot started heading to the next and so on, as shown in
Figure 3.
In general we noticed that the robot’s movements were stable and predictable.
5. Discussion
In this paper, a Rosbot controller synthesized by a computer algorithm using the network operator method has been verified to work in a Gazebo simulated environment. The synthesis algorithm required only a mathematical model of the robot as an input. The mathematical structure of the control function has been found automatically without any human input. The synthesized function has been verified to be able to control Rosbot in a stable and predictable way.
The presented numerical approach to the synthesis of a stabilization system by a robot, implemented on the Gazebo simulator robot, is a universal machine learning approach for the synthesis of control systems, and opens up broad prospects for its use in various technical problems. The main advantage of the approach is that it is not tied to the type of control object model, and allows you to find the feedback control function in automatic mode using the symbolic regression algorithm.