Omnidirectional Mobile Robot Dynamic Model Identiﬁcation by NARX Neural Network and Stability Analysis Using the APLF Method

: In this paper, the NARX neural network system is used to identify the complex dynamics model of omnidirectional mobile robot while rotating with moving, and analyze its stability. When the mobile robot model rotates and moves at the same time, the dynamic model of the mobile robot is complex and there is motion coupling. The change of the model in different states is a kind of symmetry. In order to solve the problem that there is a big difference between the mechanism modeling motion simulation and the actual data, the dynamic model identiﬁcation of mobile robot in special state based on NARX neural network is proposed, and the stability analysis method is given. To verify that the dynamic model of NARX identiﬁcation is consistent with that of the mobile robot, the Activation Path-Dependent Lyapunov Function (APLF) algorithm is used to distinguish the NARX neural network model expressed by LDI. However, the APLF method needs to calculate a large number of LMIs in practice and takes a lot of time, and, to solve this problem, an optimized APLF method is proposed. The experimental results verify the effectiveness of the theoretical method.


Introduction
The omnidirectional mobile robot has more flexible mobile performance than the traditional wheeled mobile robot. Integration of electronic, mechanical, control, automation and communication technology, combined with the theoretical expertise of many professionals. It has wide application prospects in commercial, military, and civilian applications and has become an important research platform in the control field. Obstacle avoidance, path planning and visual image processing are also important research directions for omnidirectional mobile robots. How to improve robot control performance and model accuracy is one of the main foci in the field of the omnidirectional mobile robot. So, establishing an accurate dynamic model of a mobile robot is very helpful to the establishment of the accurate mobile robot control system [1][2][3][4][5][6].
There are many kinds of wheel arrangement for omnidirectional mobile robot and different arrangement will lead to different results of kinematic model and dynamic model [7,8]. At present, the main method is to use three omnidirectional wheels with 120-degree angle distribution, which takes into account the stability and reliability, reduces the use of mechanical components and the cost [9]. Good control effect and accurate model building are inseparable. Sira proposed a generalized proportional integral (GPI) observer to observe the uncertainty of omnidirectional mobile robot and compensate the control [10]. Ren discusses the influence of unknown friction on the dynamic model of a three-wheeled omnidirectional mobile robot [11]. A dynamic model control method based on a mobile robot is introduced, and the Lyapunov function is used to prove the asymptotic stability of the system [12]. However, when the model cannot be accurately established or the model is not accurate, it is a good solution to use NARX neural network to identify the system and design the corresponding controller [13]. For modeling and recognizing the dynamics model of 2-axis PAM robot, Anh proposed a forward dynamic MIMO neural network NARX model [14]. To identify the nonlinear model of small unmanned helicopter from experimental flight data, Tijani proposed a multiobjective differential evolution (MODE) method based on NARX neural network [15].
In order to analyze the stability of neural network system, Tanaka point out that the dynamics of neural network systems can be represented by a class of nonlinear systems treated as linear differential inclusions (LDI) [16][17][18], then, the Lyapunov equation is established to analyze the stability of the system. The quadratic form of common Lyapunov function (CLF) is usually used to analyze the stability of nominal linear systems [19]. However, the conservatism of CLF in stability analysis is still too high, therefore, a parameter-dependent Lyapunov function (PDLF) method is proposed, which greatly reduces the conservatism of the stability results, and is widely used as a reliable stability criterion [20][21][22][23]. In the following development, a k-sample variation method has been paid more and more attention by scholars [24][25][26]. Tognetti proposed a quadratic Lyapunov function based on current and past time information to analyze the stability of TS fuzzy system [27]. Xiang adds the uncertain parameters with a memory of a certain interval, which could reduce the conservativeness [28]. However, in application, as the number of system matrices A increases, the number of LMIs required to calculate the Lyapunov function also increases exponentially. Therefore, it is particularly important to reduce the use of the LDI method to represent the A matrices generated by the neural network system [16] and to reduce the number of LMIs that need to be calculated [29].
The work of this paper has three main points. Firstly, establishes the dynamic model of the omnidirectional mobile robot and introduces the NARX neural network to identify the condition that the dynamic model cannot accurately describe the actual movement state of the robot when the mobile robot moving with rotation. Secondly, a novel Activation Path-Dependent Lyapunov Function (APLF) method is introduced, which is used to analyze the neural network system represented by LDI. Finally, in order to solve the problem that a large number of LMIs need to be calculated when the step interval is too large in APLF method. An optimized APLF method to discuss the substitution of all LMI by a subset of vertex sequence is introduced. This paper is organized as follows: Section 2 establishes the dynamic model of omnidirectional mobile robot. Section 3 introduces NARX neural network to identify the state of rotation and movement of omnidirectional mobile robot. Section 4 introduces the LDI method to represent the identified NARX neural network. Presents the PR method to find the minimum representation in the set of LDI matrices, and introduces the APLF method to analyse the stability of the NARX neural network system. An optimized APLF method, which reduces the number of LMI and calculation time, is given in Section 5. Conclusions are provided in Section 6.

Robot Kinematic Model
First the omnidirectional mobile robot coordinate system is established, which is divided into the global coordinate system and the robot body coordinate system [30]. The global coordinate system is the coordinate system of the world where the robot is located, and the relative position of the robot and the coordinate system in the body coordinate system is always constant. The robot coordinate frame is shown in Figure 1.
Where y, x, o constitute the global coordinate system and Y, O, X constitute the robot body coordinate system. V a , V b , V c are the rotational speed of the omnidirectional mobile robot drive wheel T 1 , T 2 , T 3 and the angle between them is ϕ = 120 • . The speed of the omnidirectional mobile robot in the X direction and Y direction of the body coordinate system are respectively V X , V Y , the horizontal distance from the center point of the robot to the omnidirectional wheel is L. Define the angle between the robot carrier coordinate system and the world coordinate system is θ, the rotation angular velocity isθ, and the counterclockwise direction is the positive direction. From the Figure 1, it can be seen that the kinematic equations of the three driving wheels of the mobile robot are: Let the rotation matrix from the body coordinate system to the globle coordinate system be: Then the x and y speed in the globle coordinate system are V xg , V yg and can be converted as follow: It can be obtained from (1) and (3) Equation (4) is the kinematic model of mobile robot. The input value V xg , V yg ,θ are the speed of Y,X axis and robot angular velocity in the globle coordinate system. The output volue V a , V b , V c are the target speed of three driving wheels of robot.

Robot Dynamic Model
The displacement and rotation angle of the mobile robot in global coordinate system are recorded as q = [x y θ] T , Then the velocity vector isq = ẋẏθ T . Define V X = V xg , V Y = V yg , the new vector is V M = V X V Yθ T . Furthermore, T i (i = 1, 2, 3) represents the traction force generated by each driving wheel. The force F x , F y are the traction force applied to the center of gravity of the omnidirectional robot. The relationship between these two groups of forces is as follows: According to Newton's second law, the formula of the rotational moment as follows: where M I is the moment of force around the axis of the robot gravity center. Equations (5) and (6) can be rewritten as: Equation (7) is recorded as It is known from (8) that if the mobile robot is to run at a certain speed and in a certain direction, the omnidirectional wheel must generate a certain torque, which requires a motor connected to the omnidirectional wheel to achieve. The dynamic equation for constructing a DC motor is: Vector u = [u 1 u 2 u 3 ] T is Input voltage for three DC motors, ω = [ω 1 ω 2 ω 3 ] T is the motor angular rate. In actual system, the motor needs to pass through a set of reduction gears to connect to the wheels. Let φ = [φ φ φ] T be the output speed of the DC motor after passing through the reduction gear set, which is the wheel speed. So the relationship between ω and φ are: where Combining (9) and (10): By combining (4) and (11), the dynamic model of omnidirectional mobile robot in body coordinate system is obtained as: It can be seen that before the (12), only the relationship between speed and force was studied, and the actual voltage value was not involved. However, the controller is ultimately controlled by exerting a control force on the motor, that is, the voltage. After the (12), the relationship between the control voltage of DC motor and the speed vector of mobile robot is clarified. Equation (12) can be rewritten as: where The velocity vectorq = ẋẏθ T in the global coordinate system has the following relationship with the velocity vector V M = V X V Yθ T in the body coordinate system: Derivative (10) Substituting (14) and (15) into Formula (13), we get: Equation (16) can be rewritten as: where According to (17), set X =q, then the final state space expression can be established: Expand the vector X we can get: Finally, a dynamic model of the three-wheeled omnidirectional mobile robot is established. The input of the model is the voltage u = [u 1 u 2 u 3 ] T of the three motors, and the output is the speed vectorq = ẋẏθ T of the omnidirectional mobile robot in the global coordinate system.
And the constant coefficients involved in matrix A and matrix B are given in Table 1. An interesting fact is that when the mobile robot is moving normally without rotating, the simulation data of its dynamic model is consistent with the actual situation. However, when the mobile robot moves while rotating, θ andθ will always change. At this time, the simulation data of the dynamic model cannot accurately describe the mobile robot. Figure 2 shows that the omnidirectional mobile robot moves a 2 m × 2 m square trajectory at the speed of 0.5 (m/s) with a rotational angular velocity of 2 (rad/s). It can be seen that the dynamic model cannot accurately reflect the actual state of motion when the mobile robot is rotating with moving. The following will introduce using NARX neural network to identify the dynamic model of the mobile robot when it moving with rotating.

Introduction To NARX Neural Network
NARX neural network is a typical dynamic recurrent neural network, which is generally composed of an input layer, a hidden layer, and an output layer. The output of NARX neural network not only depends on the current input, but also related to the output of the past moment. It can accommodate sufficient historical data and the characteristics of changes between data. Therefore, the NARX network model can better approximate nonlinear dynamics model.
The reason for choosing NARX neural network is that the network can feed back output results during the training process, so it contains long-term information of the sequence, has long-term memory capabilities, and can simulate the long-term dynamics of the time sequence. At the same time, in the network training process, the network needs to be expanded in time sequence, and the output delay provides a shorter path for the propagation of gradient information, reducing the sensitivity of the network to long-term time dependence, so the convergence performance and generalization ability are better. Figure 3 shows the NARX neural network model structure of the omnidirectional mobile robot.

NARX Neural Network Training Data Selection And Experiment
NARX neural network's training data uses the data measured by the omnidirectional mobile robot running at different moving speeds and different rotation angular speeds. The set moving speeds are 0.3 m/s, 0.5 m/s, 0.7 m/s, 1 m/s, 1.5 m/s, the set rotation speeds are 1 rad/s, 1.5 rad/s, 2 rad/s, 2.5 rad/s, 3 rad/s, record the required relevant data during 25 experiments, and each kind of moving speed will go ahead along the set 2 m × 2 m square trajectory at different rotational angular speeds. Among them, the three motor voltages of the mobile robot are the input data of the NARX neural network, and the X, Y-axis movement speed and rotation angular velocity which calculated by the sensor measurement are used as the expected output data of the NARX neural network. Use the Levenberg-Marquardt method to train NARX neural network. The output of the trained neural network model is as follows: Figure 4 shows the output of NARX neural network model and error comparison. It can be seen that the NARX neural network output after data training is basically consistent with the trajectory output of the mobile robot. The curves in Figure 4b are the errors of the mobile robot trajectory with dynamics model and NARX neural network model in X, Y-axis directions respectively. It shows that the neural network can effectively replace the dynamic model with a very small error when the mobile robot rotating with moving. However, it is not enough to match the actual output numerically. The following will introduce a method to analyze the stability of the NARX neural network.

NARX Neural Network Stability Conditions
Before analyze stability of the trained NARX neural network, it is necessary to linearize it and transform it into a set of state space matrices. Then, a novel APLF method is used to analyze the stability of the neural network model in zero input state.

Use LDI Method To Represent NARX Neural Network
In this section, the method of using Linear Differential Inclusions (LDI) represent the trained NARX neural network we will be introduced [16].
The single neuron structure in Figure 5 can be described by the following formula: x(k + 1) = f (v) (20) where w 1 and w 2 are the connection weight values, and f (v) is the Sigmod activation function and is defined as: Parameter q is the f (v) correlation coefficient and greater than zero. In addition, f (v) and its derivative satisfy the following constraints: where g 1 , g 2 are the minimum and maximum values of f (v) respectively. Furthermore, Equations (19) and (20) can be written as follows: Furthermore, let x(k) = [x(k) x(k − 1)] T and (21) can be written as: From (22), it can be known that the state space matrix set of a single neuron are: Using this LDI method for the NARX neural network in Figure 3. The output neuron is defined as: where By substituting (19) into (24) w 211 g 11v w 111 + w 212 g 12b w 112 + w 213 g 13m w 113 + w 214 g 14n w 114 + w 215 g 15z w 115 )x(k) +(w 211 g 11v w 121 + w 212 g 12b w 122 + w 213 g 13m w 123 + w 214 g 14n w 124 + w 215 g 15z w 125 )x(k − 1)} (25) The matrix representation can be obtained as {g 21l (w 211 g 11v w 111 + w 212 g 12b w 112 + w 213 g 12m w 113 + w 213 g 14n w 114 + w 215 g 15z w 115 )x(k) +g 21l (w 211 g 11v w 121 + w 212 g 12b w 122 + w 213 g 12m w 123 + w 213 g 14n w 124 + w 215 g 15z w 125 )x(k − 1)} Then the state space matrix set of NARX neural network are: where a 1 = g 21l (w 211 g 11v w 111 + w 212 g 12b w 112 + w 213 g 12m w 113 + w 213 g 14n w 114 + w 215 g 15z w 115 ) a 2 = g 21l (w 211 g 11v w 121 + w 212 g 12b w 122 + w 213 g 12m w 123 + w 213 g 14n w 124 + w 215 g 15z w 125 ) x(k) x(k-1)

Minimum Representation
From (26), it can be seen that the number of matrices obtained after linearization of the neural network is too large. At the same time, the number of LMIs are also large too, which is very unfavorable for calculation.The Parameter Region (PR) method is used below to find the state space matrix set The smallest representation in. The definition of minimum substitution is as follows: Definition 1. A nonlinear system described by LDI, which consists only of vertex points, is said to be a minimum representation.
Equation a 1 and a 2 in (26) can be regarded as coordinate points in a two-dimensional coordinate system, and then the entire matrix set can be expressed as scatter points as shown in Figure 6: The red star points in Figure 6 are the matrix A scatter point set. The polygon is used to enclose all coordinate points and the blue circle are its vertex points. The matrix A set represented by the blue circle are the minimum representation points of the LDI system. Furthermore, merge the vertices which are very close. Then, the final A matrix set are as follows:

NARX Neural Network Stability Analysis
PDLF method is based on quadratic Lyapunov function and reduces the over conservatism of common Lyapunov function (CLF) [20][21][22]. In this chapter, in order to analyze the stability of NARX neural network system, the Activation Path-Dependent Lyapunov Function (APLF) method based on quadratic Lyapunov function is introduced. The ξ(k)in PDLF only depends on the current step k. In APLF, however, ξ(k) depends on the activation path value of ξ(s), where s ∈ [L, k], L < k, and define I[k 1 , k 2 ] {k 1 , k 1 + 1, ..., k 2 }.
During the each step interval [k1, k2],using h j (k 2 , k 1 ), j ∈ I[1, N k 2 −k 1 ] records the information of evolution of activation path-dependent value ξ(k). Respect that For the sake of simplicity for notations,define k n+1 = k n + K, n ∈ N, we denote h(n) h(k n+1 , k n ), A j A j (k n+1 − k n ) = A j (k) and state transition matrix Φ(n + 1, n) can be expressed as where Using ξ(k) instead of z(k) and the activation path-dependent vector is that In summary, the activation path-dependent parameter h(n) of the NARX neural network system and system matrices A j co-constructed a novel Activation Path-Dependent Lyapunov Function (APLF). That is The inequality is The uncertain values h(n) are represented by activation function ,so could called it Activation Dependent. In addition, at step interval [k1, k2] not only includes current uncertain values, but also involves past uncertain information and in a neural network system those uncertain values constitute lots of nodes during [k1, k2], which connect with each other like a Path. That is the reason why the method in this paper is called in Activation Path-Dependent Lyapunov Function.
In method CLF, it chooses P(ξ(k)) = P , and, PDLF defines P(ξ(k)) = ∑ N i=1 ξ i (k)P i , ∀i ∈ I [1, N], which makes PDLF more conservative than CLF. However, CLF and PDLF only include curent uncertain values, APLF contain uncertain values of past, that why CLF and PDLF are a special case of APLF.
In Equation (34) K is the step interval coefficient and determine the past uncertain values window. When K is large enough, the conservativeness of the APLF algorithm will approach to 0. Furthermore, N is the number of matrices, here set N = 5. When K = 1, substituting the A matrix set (27) into the inequality (34), the following P matrices is calculated to satisfy the corresponding LMI problems: When K = 2 and K = 3, there are corresponding P matrices that satisfies the inequality equation in Formula (34), and the corresponding P matrices is not listed due to space limitations. Because of the existence of the P matrices, the NARX neural network represented by LDI is stable, so the dynamic model of the mobile robot identified by NARX is consistent in nature with the real mobile robot. Current APLF method needs to calculate all LMIs to analyze the stability of the system. For reducing the number of LMIs and calculation time, an optimized APLF method will be introduced next.

Optimized APLF Method
The basic drawback of APLF method is that the number of LMI increases exponentially with the increase of K. This chapter will introduce the optimized APLF method, It costs a lot of computation to analyze the subset of vertex or scheduling parameter trajectories [29].
Put matrix A (27) into Equation (31), set K = 3, then A n has the following situations The situations described in equation (35) are just a few cases in N K = 125. Using number records and set the collection to Θ: The sequence contained in Θ is called a scenario sequence, and add a rate γ into Equation (34): where K i is the length of the subsequence in Θ, when γ < 1, it can be said that it is stable under discrete decay rate γ. It has been proved in the paper [29] that when γ < 1 and there is a scenario sequence Θ satisfying the formula (37), the system is asymptotically stable. The algorithm details are as follows: Usually, set Θ = {1, 2, 3}.Define γ * Θ is the minimum γ ,γ min = max i∈Θ max(abs(eig(A i ))) 1/K i . Furthermore, σ = max i∈Iσ (A i ), whereσ denotes the maximum singular value, andγ sv = max i∈Θσ (A i ) 1/K i . Then,γ min ≤ γ * ≤ γ * Θ ≤γ sv ≤ σ. If choose a longer sequence Θ, will get a smaller γ * . However, the optimization algorithm will not work, when try all the sequence Θ. Next, use Algorithm ?? to calculate the data in example (27). The information of optimized APLF approach and its comparison with APLF approach is shown in Table 2.
In Table 2, it can be see, As the memory value K grows. The optimized APLF method needs to calculate the number of LMIs and the time required to complete the calculation is significantly less than the APLF method. Case the optimized APLF only needs to calculate a specific sequence instead of all N K sequences.An interesting fact is that when K = 1, the computation time of the original APLF is less than the optimized APLF method. Because it takes time to find the minimum γ, namely γ * Θ , in the optimized APLF method. However, when K ≥ 2, the computation time required for the optimized APLF and the number of LMI are much less than the original APLF method.This means that after greatly reducing the computation time and the number of LMI calculations, the stability analysis of the neural network control system can be converted from offline analysis to online analysis, which expands the application scenarios and increases the practicability, such as self-driving cars, drones, etc. Moreover, γ * Θ = 0.8418 < 1 ensures that the NARX neural network system is stable and can be expressed as the dynamic model of omnidirectional mobile robot. ). 5. ifγ − γ < ε (e.g. ε = 0.000001),END;we proved γ * ∈ [γ,γ]. 6. ELSE,find the sequences yielding active constraints: i = arg max i∈Θ [n] max j∈Θ [n] eig(A T i P j A i − γ * Θ P i ). 7. Branch them either by incrementing its horizon one unit,or by appending every sequence of Θ [n] ;denote the resulting scenario as Θ [n+1] .Let n = n + 1. 8. Go to step 2.

Conclusions
Based on the mechanical structure characteristics of the omnidirectional mobile robot, the force analysis has carried out to establish the dynamic model of the mobile robot. Because the dynamic model of mobile robot is complex, especially when it is rotating with moving, and there is a kinematic coupling situation. Therefore, the NARX neural network has been used to identify the dynamic model of the mobile robot. Furthermore, the qualitatively consistent between the NARX neural network and the dynamic model of mobile robot has been further verified, and the NARX neural network has been analyzed the stability. Firstly, the trained NARX neural network is represented by LDI and transformed into a set of several state space matrices A. Then, the PR method is used to find the minimum representation in the matrix set. Furthermore, APLF method is used to analyze the stability of NARX neural network. Finally, presents an optimized APLF method, which could reduce the number of LMIs and calculation time. The experimental results show that the dynamic model identified by NARX is consistent with the actual mobile robot.
Author Contributions: L.X. wrote the paper and designed the experiments; L.X., Y.W. and H.F. analyzed the data and discussed the results; Y.W. and H.F. supervised, checked, gave comments, and approved this work. All authors have read and agreed to the published version of the manuscript.
Funding: This work is supported by the Fundamental Research Funds for the Central Universities under grant 3072020CF0408.

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