Path Tracking Control of an Omni-Directional Service Robot Based on Model Predictive Control of Adaptive Neural-Fuzzy Inference System

: In this paper, model predictive control (MPC) based on an adaptive neural-fuzzy inference system (ANFIS) is proposed to realize control of an omni-directional service robot in path tracking. The weight of the cost function in a traditional MPC needs to be manually adjusted, and it is difﬁcult to adjust to a satisfactory value. In order to improve the performance and the control accuracy of MPC, a fuzzy system trained by ANFIS is used to adaptively adjust the weight of MPC’s cost function to reduce the error in the process of path tracking. The different simulation experiments are conducted to verify the performance of the proposed algorithm. The experimental results show that the distance error of MPC based on ANFIS is reduced by more than 50% under different paths compared with a traditional MPC, and the angle error is reduced by more than 70%. Meanwhile, the stability is increased by around 60%. The results show the feasibility and superiority of MPC based on ANFIS.


Introduction
In recent years, the technology of service robots has been developed widely, and it has been a research hotspot [1,2]. Among these, path tracing is crucial.
Path tracing methods mainly include proportion integration differentiation (PID), fuzzy control (FC), proportion integration differentiation fuzzy (FPID), model predictive control (MPC), fuzzy model predictive control (FMPC), etc. In [2], a simple and effective PID robust tuning method is proposed and applied to a simple mobile robot model with uncertain delay estimation. Although experiments show that it has good path tracking performance, it cannot cope with multiple controlled quantities simultaneously. Moreover, it is not suitable for complex nonlinear time-varying systems. In [3], a path tracking and heading adjustment system for a Mecanum wheel robot based on a fuzzy logic controller (FLC) is proposed. It can achieve better path tracking control without external references such as beacons or visual marks. However, it simplifies a Mecanum wheel chassis to a differential wheel chassis during the control process. Additionally, the system cannot control the rotation angle of the chassis, which makes the chassis lose the flexibility unique to the Mecanum wheel chassis. In [4], an equivalence relationship between fuzzy proportionalintegral-derivative (PID) controllers and conventional PID controllers is put forward, the designer can further tune the membership functions of fuzzy variables in the control rules to acquire more superior performance. In [5], a self-tuning fuzzy PID controller, which is easy to be realized on a single-chip microcomputer, is presented. Even though it can control irregular lines precisely, the speed response of a single motor is insufficient in a short time. In [6], a fuzzy controller is designed to minimize the path tracking error, and a cuckoo optimization algorithm (COA) is used to optimize the fuzzy controller. Experiments show that it can achieve accurate path tracking.
Predictive control is a novel type of control algorithm in the field of industrial process control. It is not only a representative advanced control algorithm but also a theoretical system of stability and robust design of uncertain systems with rolling optimization characteristics [7]. In [8], a MPC strategy for non-holonomic constrained wheeled mobile robot (WMR) is put forward. The kinematic model of the WMR is linearized. According to the constraints of the status and input, WMR control law can achieve optimal control. In [9][10][11][12], MPC applied to an omni-directional wheeled chassis is introduced. MPC can realize accurate control of complex paths. Nevertheless, some parameters of MPC need to be manually adjusted, which is time-consuming and labor-intensive. If the tuning is inaccurate, it is difficult to achieve optimal path tracking. Thus, there is more research and development required n the direction of adaptive tuning. In [13], an adaptive fuzzy nonlinear model predictive control (FNMPC) strategy for trajectory tracking of the WMR is proposed. An adaptive fuzzy system is obtained through training and applied to the approximation of the WMR model. The parameters of the fuzzy model are adjusted online by using the gradient descent algorithm, which can minimize the tracking error of a given trajectory. In [14], an improved MPC strategy is designed. The improved MPC also can adaptively adjust the weight of the cost function through fuzzy control, and it is superior to a traditional MPC in terms of tracking accuracy and steering stability. However, operators need to summarize a complete set of fuzzy control rules through a large amount of practical experience. If the fuzzy system is simple or wrong, it may lead to the reduction of control accuracy, even the deterioration of dynamic quality. Therefore, it is more difficult to build complete fuzzy rules.
In [15], an adaptive network fuzzy inference system (ANFIS) architecture and learning process are explored. This system can realize the establishment of a fuzzy inference system in the framework of an adaptive network. It uses a hybrid learning algorithm or other learning algorithms to train and learn data set. A superior fuzzy system can also be obtained by optimizing the premise and consequence parameters. In [16], a control of a pilot-scale conversion hydrogen production unit is studied. ANFIS is applied to MPC to realize an optimal control strategy. The process is trained and learned by ANFIS, and the membership function is optimized using empirical training data.
In order to ensure high tracking accuracy and stability, and without the need for operators to summarize a complete set of fuzzy control rules, this paper puts forward a strategy of MPC based on ANFIS. This strategy can adaptively adjust the weight of the cost function in MPC to achieve accurate path tracking.
The rest of this paper is organized as follows: Section 2 describes the kinematic model of the omni-directional wheel chassis. In Section 3, the design of the control system is proposed. Section 4 is the simulation analysis. The conclusion of this paper is presented in Section 5.

Kinematic Model
As shown in Figure 1, the local coordinate frame of the service robot chassis is X R PY R , the global coordinate frame is X I OY I , and the point P is the reference point on the chassis.
In the global coordinate frame, the position P is determined by X I and Y I [17][18][19][20], and the position of the chassis in the local coordinate frame is: where θ is the angle between the global coordinate frame and the local coordinate frame, ξ I = x I y I θ I T is the position of the robot in the global coordinate frame, and ξ R is Appl. Sci. 2021, 11, x FOR PEER REVIEW 3 of 19 In the global coordinate frame, the position P is determined by I X and I Y [17][18][19][20], and the position of the chassis in the local coordinate frame is: Where θ is the angle between the global coordinate frame and the local coordinate The rolling constraint of the Mecanum wheel forces all rollers to move along the ground direction. There must be a certain number of rollers rotating so that there is pure rolling at the contact point [10,21]. The velocity direction of the wheels is decomposed and deduced: , as shown in Figure 2, l is the distance between every Mecanum wheel and the point P , and r is the radius of the Mecanum wheel.  The rolling constraint of the Mecanum wheel forces all rollers to move along the ground direction. There must be a certain number of rollers rotating so that there is pure rolling at the contact point [10,21]. The velocity direction of the wheels is decomposed and deduced: jR(θ) where j = sin(α + β + γ) − cos(α + β + γ) −l cos(β + γ) , as shown in Figure 2, l is the distance between every Mecanum wheel and the point P, and r is the radius of the Mecanum wheel. In the global coordinate frame, the position P is determined by I X and I Y [17][18][19][20], and the position of the chassis in the local coordinate frame is: Where θ is the angle between the global coordinate frame and the local coordinate The rolling constraint of the Mecanum wheel forces all rollers to move along the ground direction. There must be a certain number of rollers rotating so that there is pure rolling at the contact point [10,21]. The velocity direction of the wheels is decomposed and deduced: Where [ ] = sin( cos( cos( ) j l α β γ α β γ β γ , as shown in Figure 2, l is the distance between every Mecanum wheel and the point P , and r is the radius of the Mecanum wheel.   The rolling constraints of an individual Mecanum wheel can be grouped into the single Equations (4) and (5).

Design of Control System
The control system schematic diagram is shown in Figure 3. The schematic diagram can be described as a MPC design and ANFIS design.

Design of Control System
The control system schematic diagram is shown in Figure 3. The schematic diagram can be described as a MPC design and ANFIS design.

MPC
MPC can solve complex control problems of multi-variable inputs [22]. MPC consists of the following three parts: linearization and approximate discretization of a kinematic model, design of objective function, and design of constraint conditions [23,24].

Linearization and Approximate Discretization
Define ϕ • as u , Equation (8) can be simplified as: First-order Taylor expansion is performed at a reference point in Equation (9), which was rewritten as:

MPC
MPC can solve complex control problems of multi-variable inputs [22]. MPC consists of the following three parts: linearization and approximate discretization of a kinematic model, design of objective function, and design of constraint conditions [23,24].

Linearization and Approximate Discretization
Define • ϕ as u, Equation (8) can be simplified as: First-order Taylor expansion is performed at a reference point in Equation (9), which was rewritten as: • ξ r = f (ξ r , u r ), ξ r and u r are the reference pose and velocity which are the closest to the latest pose (Euclidean Distance). Equation (10) can be approximately discretized as: Appl. Sci. 2021, 11, 838 5 of 18 where A = I + TA, B = TB.

Design of Objective Function
Define kT as k, The state functions are: where , m is the number of control quantity, and n is the number of status quantity. At time k + 2, Equation (12) can be written as: Substituting Equation (12) into Equation (13), the state functions can be expressed as: By recursion in the above way, Equation (15) can be solved.
Equation (16) can be abbreviated as: Appl. Sci. 2021, 11, 838 , N p is the prediction horizon, N c is the control horizon, and N p >N c .
The MPC in this paper was a relatively simplistic but standard non-linear MPC algorithm, in which all the ∧ A k+i were the same in the processing of the prediction model and all the ∧ B k+i were the also same [23]. According to the MPC strategy, the optimization problem should be converted into a quadratic programming (QP) problem [7]. The objective function was the quadratic function of the spatial state of the omni-directional wheel chassis and the control inputs. Additionally, the relaxation factor was introduced, which could not only directly limit the control increment, but also avoid the emergence of non-feasible solutions in the execution process [25]. The objective function is: where Q is the weight matrix of Y, , ρ is weight coefficient, and ε is the relaxation factor.

Design of Constraints
QP is a typical mathematical optimization problem. The reference trajectory tracked by the omni-directional wheel chassis was quicker and smoother by adding linear or nonlinear constraints. Hence, the motion performance of the omni-directional wheel chassis was improved. The linear constraints were:  (17) could be rewritten as: where Equation (20) is: Therefore, the quadratic programming problem is: ε is used as an independent variable, and is computed by Equation (21). A series of optimally controlled increments ∆U(k) * could be calculated in the control horizon by optimizing Equation (21) in each control cycle.
The first element acted as the actual controlled increment of ∆U(k) * in Equations (22) and (23).

Design of ANFI
ANFIS is a multi-inputs and single-output model. Based on experience and knowledge, a neural network was employed to optimize the premise and consequence parameters to adaptively establish a fuzzy inference system [15,[26][27][28][29].

Architecture of ANFIS
Assuming that ANFIS had two inputs ∆l and ∆ϕ, and one output q. As shown in Figure 4, ANFIS covered the input variables with 8 fuzzy subsets. The rules of the rule base are:  The structure of each layer of ANFIS was as follows.

Layer 1
This layer is called the "fuzzification layer". The nodes are adaptive.
where l Δ or ϕ Δ is the input of the node i .
Layer 4 This layer is called the "defuzzification layer". The nodes were adaptive.
where i ω − is a normalized firing strength value received from layer 3, l Δ and ϕ Δ are the input of the node i , and , ,  If ∆l is A i and ∆ϕ is B i , then f i = p i ∆l + q i ∆ϕ + s i , (i = 1, 2 · · · , 8).
Where A i (B i ) is the fuzzy subset of ∆l(∆ϕ), p i , q i , s i called the consequence parameters are the linear parameters of the function f i .
The structure of each layer of ANFIS was as follows.

Layer 1
This layer is called the "fuzzification layer". The nodes are adaptive.
where ∆l or ∆ϕ is the input of the node i. A i or B i is the language tags associated with this node function, O 1 i is the membership function of A i or B i , which specifies how much given ∆l(∆ϕ) satisfies A i (B i ). The superscript 1 of O 1 i indicates the first layer, and the subscript i indicates the ith node.

Layer 2
This layer is called the "rule layer". The nodes were fixed and labeled as Π i , (i = 1, 2 · · · , 64). The nodes realized the process of fuzzy inference. The output, which represented the firing strength of a rule, was the product of all the incoming signals.
Layer 3 This layer is called the "normalization layer". The nodes were fixed and labeled as N i (i = 1, 2 · · · , 64). Every node in this layer received all outputs from layer 2 and the normalized firing strength of the ith rule.
Layer 4 This layer is called the "defuzzification layer". The nodes were adaptive.
where ω i is a normalized firing strength value received from layer 3, ∆l and ∆ϕ are the input of the node i, and p i , q i , s i are the linear parameters of the function f i .

Layer 5
Appl. Sci. 2021, 11, 838 9 of 18 This layer is called the "summation layer". The single node was fixed, and labeled as Σ. This layer calculated the sum of all outputs from layer 4 and provided an output of ANFIS.

Collection of Data Set
It is a crucial process to collect a training data set for ANFIS. This paper used an ANFIS architecture of two-inputs and single-output. The three parameters of a collected data set are: where ∆l represents the error between the reference XY distance and the actual XY distance, ∆ϕ represents the error between the reference ϕ ref and the actual ϕ real , and the output q represents the weight ratio. A traditional MPC was used to track a reference trajectory. At the sampling period T, ∆l and ∆ϕ were collected, and the weight ratio q was adjusted to reduce the error significantly. The ∆l, ∆ϕ and adjusted q were collected as the training data set of ANFIS.

Training of Data Set
Training ANFIS means using the optimization algorithm to optimize the premise and the consequence parameters in its structure. The premise parameters were µ A i (∆l) or µ B i (∆ϕ)(i = 1, 2 · · · , 8) in the second membership function, and the consequence parameters were p i , q i , s i (i = 1, 2 · · · , 64) in the fourth membership function f i . In MATLAB, ANFIS toolbox and graphic editing tools were used to train the data set.

Control System
A fuzzy system can be obtained through ANFIS training. As shown in Figure 5, the weight q can be adaptively adjusted by the fuzzy system according to the input of ∆l and ∆ϕ. Assuming q ϕ is 1, Equation (30) can be solved according to Equation (29), and Q i is used at Equation (21). The distance l between every omni-directional wheel and the robot center point is

The Parameters of Omni-Directional Wheel Chassis
The distance l between every omni-directional wheel and the robot center point is 0.291 m, and the other parameters are shown in Table 1.

Training of Data Set
MPC was used to track the path of a circle. The sampling period T was 0.5 s. The data set for training ANFIS is shown in Figure 6. In SIMULINK, ANFIS toolbox and graphic editing tools were used to train the data set, and the parameters were set as shown in Table 2. The membership functions of using 7 and 8 fuzzy sets are shown in Table 3, the training error of using 7 fuzzy sets was 137.63, and the training error of using 8 fuzzy sets was 0.14. Accordingly, this paper used 8 fuzzy sets, and the membership functions after training ANFIS are shown in Figures 7 and 8.

Method Error Tolerance Epochs
Parameter Back-Propagation 0 150 Table 3. The membership functions of using 7 and 8 fuzzy sets.

Simulation Results
MPC based on ANFIS was adopted to simulate and analyze two different paths. The simulation time t was 30 s, and the sampling period T was 0.5 s. The speed, acceleration, and relaxation factor of every motor of the omni-directional wheel chassis were: when the error curve fluctuated uniformly, the error peak value was the maximum fluctuation difference. The optimization ratio of reducing the maximum fluctuation difference can be solved by Equation (32).
where P or is the optimization ratio, e t is the maximum fluctuation difference of a traditional MPC, and e o is the maximum fluctuation difference of MPC based on ANFIS.

Path I
The reference trajectory of a circle was Equation (33), the initial status ξ start was [0, 0, 0] T , and the range of weight ratio q was q ∈ 13 50 . The simulation comparison was conducted between a traditional MPC (the weight ratio q is 25) and MPC based on ANFIS.
As shown in Figures 9-14, after stabilization, the results are shown in Tables 4 and 5. where or P is the optimization ratio, t e is the maximum fluctuation difference of a traditional MPC, and o e is the maximum fluctuation difference of MPC based on ANFIS.

Path Ⅰ
The reference trajectory of a circle was Equation (33), the initial status start ξ was T [0,0,0] , and the range of weight ratio q was ( ) 13 50 q ∈ . The simulation comparison was conducted between a traditional MPC (the weight ratio q is 25) and MPC based on ANFIS.
As shown in Figures 9-14, after stabilization, the results are shown in Tables 4 and 5.                Compared with the traditional MPC without disturbance, MPC based on ANFIS reduced the maximum fluctuation difference of ∆l by 58.966%, and the maximum fluctuation difference of ∆ϕ was reduced by 72.895%. The stability of ∆l increased by 67.668% and the stability of ∆ϕ was increased by 61.369%. All the data showed that the error curve of the proposed algorithm was flatter and more stable compared with the traditional MPC without disturbance.
The external disturbance applied to the X direction at t was 10 s, and the disturbance was 0.2 m. After stabilization, the results are shown in Tables 6 and 7. Compared with the traditional MPC, MPC based on ANFIS reduced the maximum fluctuation difference of ∆l by 57.673%, and the maximum fluctuation difference of ∆ϕ was reduced by 72.328%. The stability of ∆l was increased by 66.109%, and the stability of ∆ϕ increased by 59.899%. The error curve was much flatter and stabilized faster compared to the traditional MPC with disturbance. The experiment showed the effectiveness and superiority of the MPC based on ANFIS.

Path II
The reference trajectory of ∞ was Equation (34), the initial status ξ start was [1.1, 0.6, 0] T , and the range of weight ratio q was q ∈ [9,15]. The weight ratio q of a traditional MPC was 15 Tables 8 and  9. An external disturbance applied to the X direction at t was 10 s, and the disturb ance was 0.1 m. After stabilization, the results are shown in Tables 10 and 11.   Tables 8 and  9. MPC based on ANFIS 1.045% An external disturbance applied to the X direction at t was 10 s, and the disturbance was 0.1 m. After stabilization, the results are shown in Tables 10 and 11.  Tables 8 and 9. Compared with the traditional MPC without disturbance, MPC based on ANFIS reduced the maximum fluctuation difference of ∆l by 72.990%, and all the ∆ϕ approached 0. The stability of ∆l was increased by 77.780%. The error curve tended to be flatter and more stable compared to the traditional MPC without disturbance.
An external disturbance applied to the X direction at t was 10 s, and the disturbance was 0.1 m. After stabilization, the results are shown in Tables 10 and 11. Compared with the traditional MPC with disturbance, MPC based on ANFIS reduced the maximum fluctuation difference of ∆l by 73.326%, and all the ∆ϕ approached 0. The stability of ∆l was increased by 78.148%. The error curve was much flatter and stabilized faster compared with the traditional MPC with disturbance. Moreover, the robot could respond more quickly when there was disturbance.
Experiments showed that MPC based on ANFIS had superior performance compared with a traditional MPC.

Conclusions
By adjusting the weight of the cost function in MPC, the path tracking error can be reduced prominently. However, the weight of the cost function in a traditional MPC needs to be manually adjusted which is time-consuming and labor-intensive, and it is difficult to adjust to a satisfactory value. Therefore, in order to adaptively adjust the weight, MPC based on ANFIS is proposed. The ANFIS toolbox is used for data set training, and the training error is 0.14. In SIMULINK, MPC based on ANFIS and a traditional MPC are compared to verify the effectiveness and superiority. Experiments show that when the path is circular and ∞, compared with a traditional MPC, the maximum fluctuation difference effect of ∆l is reduced by around 50%, the maximum fluctuation difference effect of ∆ϕ is reduced by around 70% (all the ∆ϕ approach 0 when the path is ∞), and the stability is increased by around 60%. The error curve is much flatter and tends to stabilize faster compared with a traditional MPC. All the experiments show the effectiveness and superiority of the MPC based on ANFIS.