# Manipulator Trajectory Tracking with a Neural Network Adaptive Control Method

Authors: Wenbin Zha; Hui Zhang; Xiangrong Xu
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

In order to solve the joint chattering problem of the manipulator in the process of motion, a novel dynamics model is established based on the dynamics model of the manipulator, by fitting parameters of the neural network and combining with the estimated value of the inertia matrix. We proposed a neural network adaptive control method with a time-varying constraint state based on the dynamics model of estimation. We design the control law, establish the Lyapunov function equation and the asymmetric term, and derive the convergence of the control law. According to the joint state tracking results of the manipulator, the angular displacement, angular velocity, angular acceleration, input torque, and disturbance fitting of the manipulator are analyzed by using the Simulink and Gazebo. The simulation results show that the proposed method can effectively suppress the chattering amplitude under the environment disturbances.


---

## Body

## 1. Introduction

With the development of artificial intelligence, robots are more and more popular, so the design and research of the redundant manipulator control system have become an important research direction in the robotics field [1]. When the manipulator end-effector is performing a task, it is necessary to ensure that the trajectory of the manipulator end-effector moves according to the expected trajectory, and in order to ensure that the end-effector does not fail due to jitter during the execution of the task, therefore, how to suppress the jitter [2] has become one of the main difficulties in the research of the manipulators [3].Due to frictions, model errors, and unknown disturbances, the trajectory at the end-effector of the manipulator will have obvious deviation, so the control of trajectory motion is particularly important. The implementation methods include the adaptive control that achieves better end-effector trajectory tracking characteristics in the robot dynamics [4, 5], neural network control that has universal approximation to any nonlinear functions [6–8], and the fuzzy control strategy that is widely used in artificial intelligence [9]. At present, these control algorithms have achieved a lot of research results. The PD control in adaptive control shows that the PD model can be used to compensate the sliding mode control law when the manipulator is not affected by the friction and external influence. The neural network adaptive control shows that the neural network control with Gaussian radial basis function as the excitation function in the hidden layer has the advantages of good stability, unique approximation, no local minimum, and fast network convergence. However, due to its unconstrained state, the error is large and the time convergence is affected. A neural network adaptive control with time constraint is proposed in reference [10, 11]. In reference [12, 13], the fuzzy/neural network control method is proposed to control the force and position of the manipulator, but the force and position cannot be controlled simultaneously in the same direction. In reference [14], when the dynamics model is not accurate, the position/force hybrid control method of base and generalized Jacobi is proposed to complete the compliant control of the manipulator, but it is still roughly the same as the above situation. Although the force position hybrid control can overcome the external interference to some extent, it needs to sacrifice the position accuracy. Wenhai Qi [15, 16] proposed a proper fuzzy SMC control law to drive the state signals onto the predefined fuzzy manifold. A kind of control problem is successfully solved, and the system state can be driven onto the specified sliding surface in a finite-time range. Finally, a robotic manipulator model is provided to conduct the effectiveness and feasibility of the proposed theoretical findings [17, 18]. However, the environmental disturbance is not fully considered. To realize the high-precision position/force control needs of dual-arm robots for manipulating an object in the environment disturbances, a novel control strategy based on the modified sliding mode impedance controller is developed [19]. In fact, the proposed controller depends on second-order time derivative of joint position, and the real-time implementation of derivatives is generally an important drawback in real-time control implementation.To sum up, a novel dynamics model based on the dynamics model of the manipulator is established by fitting the parameters with neural network and combining with the estimated value of the inertia matrix. Combined with time-varying constrained output states, a neural network adaptive control algorithm with time-varying output constraints is proposed without the complex manipulator dynamics model.


## 2. Kinetic Equation

The dynamics equation of the Kuka iiwa14 robot is simplified as follows:(1)Wθθ¨+Cθ,θ˙+Gθ+τd=τ,where θ is the joint displacement, Wθ is the positive definite inertia matrix, θ˙ is the joint angular velocity, θ¨ is the joint angular acceleration, Cθ,θ˙ is the matrix of Coriolis force and centripetal force, Gθ is the gravity vector, τd is the unknown external disturbance, and τ is the control input torque.


### 2.1. Dynamics Model

In order to reduce the complexity of the manipulator dynamics model, the estimated value of the inertia matrix is introduced and substituted into equation (1) to obtain the new dynamics equation as follows:(2)τ=W¯θ¨+Nθ,θ˙,θ¨,where W¯ is the user-defined inertial estimation matrix (a positive definite diagonal matrix), and Nθ,θ˙,θ¨ can be expressed as follows:(3)Nθ,θ˙,θ¨=W¯−Wθ¨+Cθ,θ˙+Gθ+τd.ForNθ,θ˙,θ¨ in the new dynamics model, the fitting characteristics of RBF neural network can be used to estimate online, and N^ can be used to represent the estimated value of Nθ,θ˙,θ¨, and its estimation expression is as follows:(4)N^=fθ,θ˙,θ¨.Therefore, a new dynamics equation is formed using neural network estimation:(5)τ=W¯θ¨+N^=W¯θ¨+fθ,θ˙,θ¨+ε,where ε is the estimation error vector.


## 2.1. Dynamics Model

In order to reduce the complexity of the manipulator dynamics model, the estimated value of the inertia matrix is introduced and substituted into equation (1) to obtain the new dynamics equation as follows:(2)τ=W¯θ¨+Nθ,θ˙,θ¨,where W¯ is the user-defined inertial estimation matrix (a positive definite diagonal matrix), and Nθ,θ˙,θ¨ can be expressed as follows:(3)Nθ,θ˙,θ¨=W¯−Wθ¨+Cθ,θ˙+Gθ+τd.ForNθ,θ˙,θ¨ in the new dynamics model, the fitting characteristics of RBF neural network can be used to estimate online, and N^ can be used to represent the estimated value of Nθ,θ˙,θ¨, and its estimation expression is as follows:(4)N^=fθ,θ˙,θ¨.Therefore, a new dynamics equation is formed using neural network estimation:(5)τ=W¯θ¨+N^=W¯θ¨+fθ,θ˙,θ¨+ε,where ε is the estimation error vector.


## 3. Method of Time-Varying Output Constraint State

### 3.1. Problem Description

In order to address problem about environment disturbances and to reduce the difficulty of modeling, a control method of combining the constrained output state with the dynamics modeling method of neural network estimation is proposed.Suppose that the output angular displacement constraint of the manipulator isk¯mt≤θt≤k¯mt. In order to ensure the convergence of the closed-loop system, the following error constraints are given:(6)kat=θdt−k¯mt,kbt=k¯mt−θdt,.Suppose the angular displacement error ise1=e11,e12,…,e1nT=θ−θd and the angular velocity error is e2=e21,e22,…,e2nT=θ˙−α. α is the virtual controller.The variableα can be defined as follows:(7)α=−k1+se1+θ˙d,where k1=diagk11t,…,k1ntands=diags11t,…,s1nt; set s1it=k˙ai/kai2+k˙bi/kbi2+βi, where βi>0.Suppose the piecewise function ishie1i=1,e1i>00,e1i≤0, the error variable can be transformed into(8)ξai=e1ikai,ξbi=e1ikbi,ξi=hie1iξbi+1−hie1iξai,i=1,…,n,.In order to realize the convergence of the closed-loop system, two lemmas are introduced.Lemma 1.
∀ζ<1 and integers p>0, there is inequality which satisfies log1/1−ζ2p<ζ2p/1−ζ2p.Lemma 2.
if and only if−ka<e1<kb, ζ<1.By Lemma2, the output state is contained in the constraints which satisfy −ka<e1<kb. The explicit constraints include the constant case mentioned in reference [20].


### 3.2. Control Law Design

The Lyapunov equation with back-stepping term is designed as follows:(9)V=12plog11−ξ+12e2Te2.Then,(10)V˙≤−k1ξ2p1−ξ2p+∑i=1nuie1i2p−1e2i+e2Te˙2,where the vector e˙2 satisfies e˙2=θ¨−α˙=W¯−1τ−f−ε−α˙ and vector ui satisfies ui=h1i/kbi2p−e2i2p+1−h1i/kai2p−e2i2p.Then, equation (10) can be changed into the matrix H(q) which satisfies(11)V˙≤−∑i=1nk1iξi2p1−ξi2p+∑i=1nuie1i2p−1e2i+e2TW¯−1τ−f−ε−W¯α˙.The design control law is as follows:(12)τ=−W¯K2e2−W¯α˙−f+A,where A=u1e112p−1;…;une1n2p−1 and K2>0.5 and is the positive definite gain matrix.In order to enhance the robustness, a robust term can be added as follows:(13)τ=−W¯K2e2−W¯α˙−f+A+k3satr,where k3 is a positive definite matrix, sat () is a saturation function, and r = λe + de, where λ is a positive number.According to the simultaneous equations (11) and (13), the following expression can be obtained:(14)V˙≤−k1ξ2p1−ξ2p−e2TK2e2+e2Tε˜,where ε˜ is the error.(15)∑i=1ne2iε≤12e2Te2+12ε˜.Thus, it is easy to construct the necessary inequality as follows:(16)V˙≤−CV+B,where C=2pk1i,2k2i and B=1/2ε˜2.(17)−1<ξi<1;e2≤2V¯0.Therefore, according to Lemma2, we can get the convergence of angular displacement error, which is easy to obtain α convergence; thus, the angular velocity error converges.


### 3.3. The Simulation and Analysis

The URDF model of Kuka iiwa14 manipulator is selected as the simulation object, and Simulink and Gazebo are used to simulate and analyze it, respectively.The selection of gain matrices and parameters is very crucial to the stability and position/force tracking of the effect of the manipulator system. Only selecting reasonable control parameters can accomplish the coordinated handling and compliant control of the manipulator. Through many simulation experiments, the following gain and parameter values are finally selected. According to the sample data of the observed inertial positive matrixW, the estimated value W¯ is diag ([100, 250, 80, 10, 5, 5, 5]). The central point of the excitation function in RBF neural network is selected as follows: c=−1.5−0.1−0.500.511.5−1.5−0.1−0.500.511.5−1.5−0.1−0.500.511.5. The width value is 0.4.In the initial state of the robot system, the expected values of the output angular displacement, angular velocity, and angular acceleration are taken, respectively. The lower boundary of the constraint isk¯mt=0.2θd+λd−3.14, the higher boundary of the constraint is k¯mt=1.5θd+λd+3.14, and control gain variables k1 and β in virtual controller are 4 and 0.5, respectively. The factors f and KS in the adaptive law are 5 and 0.01, respectively; the initial selection in the controller is 30. The system order p of TVBLF is 2. The coefficient k3 of saturation function is taken as 0.5 and λ as 5.In order to show the tracking performance of the designed control law, the expected input states of joint position, velocity, and acceleration can be set as sin(t), cos(t), and −sin(t), respectively, and the simulation is carried out in Simulink, as shown in Figure 1.Figure 1
Tracking effect of the algorithm in this paper: (a) error of position; (b) error of velocity; (c) output acceleration; (d) output torque; (e) unknown term fitting.
(a)(b)(c)(d)(e)Figures1(a) and 1(b) show that the designed control method can track the position and speed at the same time, and the tracking effect is superior. In order to highlight the effect of chattering suppression, it can be compared with the unconstrained neural network control and debug parameters and make its tracking accuracy similar with the algorithm in this paper. The output acceleration, output torque, and fitting terms of unknown terms are shown in Figure 2.Figure 2
Unconstrained neural network control: (a) output acceleration; (b) output torque; (c) unknown term fitting.
(a)(b)(c)Figures1(c) and 2(a) show that the output acceleration oscillation of the proposed algorithm is obviously alleviated, thus suppressing chattering, as shown in Figures 1(d) and 2(b). Figures 1(e) and 2(c) show that the dynamics model designed in this paper is easier to fit, thus indirectly alleviating the chattering phenomenon.In order to show the saturation function in equation (13), only equation (12) is used as the control law for tracking control, and the position tracking effect is shown in Figure 3.Figure 3
Drag process in Gazebo.Figures3 and 1(a) show that using the saturation function as the robust term can improve the tracking accuracy (for example, the tracking accuracy of joint 6 is significantly improved), thus ensuring the tracking stability.In order to further verify the anti-interference performance of the proposed algorithm, we can drag object in Gazebo. In order to simulate the real experiment, the real-time ratio in Gazebo was adjusted to make the fluctuation range of (0.92, 0.97), and the drag object mass was designed to be 10 kg. The desired trajectory of the joint is shown in Figure4. And the tracking performance of the algorithm is shown in Figure 5.Figure 4
Expected joint state: (a) position; (b) velocity; (c) acceleration.
(a)(b)(c)Figure 5
Tracking state of dragging experiment: (a) error of position; (b) error of velocity; (c) output torque.
(a)(b)(c)In Figure5, the execution time interval of the manipulator dragging is about [4.5, 14] (s). Figures 5(a) and 5(b) show that the proposed algorithm can still track the joint position and joint velocity of the manipulator under obvious external interference and the tracking accuracy is high. Figures 5(b) and 5(c) show that the set speed in Gazebo is not consistent with the initial speed designed in this paper, resulting in instantaneous sudden change in the initial stage. Figure 5(c) shows that the dithering phenomenon of the manipulator can be suppressed by using the algorithm in this paper.In Gazebo, the control algorithm of time-varying constrained output state is combined with the estimated dynamics model to realize the anti-interference experiment in dragging, as shown in Figure6.Figure 6
Drag process in Gazebo.Figure6 shows that the manipulator can still complete the dragging task under the condition of obvious friction interference. It is proved again that the control algorithm of time-varying constrained output state combined with the estimated dynamics model has the advantage of anti-interference.To sum up, the experimental results show that the combination of the estimated dynamics model and the time-varying constrained output state can effectively track the joint position and speed in the interference environment with obvious intensity and can suppress the chattering phenomenon of the manipulator. The most important thing is that there is no need to establish a specific dynamics model, which has a wider generalization. Therefore, it is suitable for most redundant manipulators.


## 3.1. Problem Description

In order to address problem about environment disturbances and to reduce the difficulty of modeling, a control method of combining the constrained output state with the dynamics modeling method of neural network estimation is proposed.Suppose that the output angular displacement constraint of the manipulator isk¯mt≤θt≤k¯mt. In order to ensure the convergence of the closed-loop system, the following error constraints are given:(6)kat=θdt−k¯mt,kbt=k¯mt−θdt,.Suppose the angular displacement error ise1=e11,e12,…,e1nT=θ−θd and the angular velocity error is e2=e21,e22,…,e2nT=θ˙−α. α is the virtual controller.The variableα can be defined as follows:(7)α=−k1+se1+θ˙d,where k1=diagk11t,…,k1ntands=diags11t,…,s1nt; set s1it=k˙ai/kai2+k˙bi/kbi2+βi, where βi>0.Suppose the piecewise function ishie1i=1,e1i>00,e1i≤0, the error variable can be transformed into(8)ξai=e1ikai,ξbi=e1ikbi,ξi=hie1iξbi+1−hie1iξai,i=1,…,n,.In order to realize the convergence of the closed-loop system, two lemmas are introduced.Lemma 1.
∀ζ<1 and integers p>0, there is inequality which satisfies log1/1−ζ2p<ζ2p/1−ζ2p.Lemma 2.
if and only if−ka<e1<kb, ζ<1.By Lemma2, the output state is contained in the constraints which satisfy −ka<e1<kb. The explicit constraints include the constant case mentioned in reference [20].


## 3.2. Control Law Design

The Lyapunov equation with back-stepping term is designed as follows:(9)V=12plog11−ξ+12e2Te2.Then,(10)V˙≤−k1ξ2p1−ξ2p+∑i=1nuie1i2p−1e2i+e2Te˙2,where the vector e˙2 satisfies e˙2=θ¨−α˙=W¯−1τ−f−ε−α˙ and vector ui satisfies ui=h1i/kbi2p−e2i2p+1−h1i/kai2p−e2i2p.Then, equation (10) can be changed into the matrix H(q) which satisfies(11)V˙≤−∑i=1nk1iξi2p1−ξi2p+∑i=1nuie1i2p−1e2i+e2TW¯−1τ−f−ε−W¯α˙.The design control law is as follows:(12)τ=−W¯K2e2−W¯α˙−f+A,where A=u1e112p−1;…;une1n2p−1 and K2>0.5 and is the positive definite gain matrix.In order to enhance the robustness, a robust term can be added as follows:(13)τ=−W¯K2e2−W¯α˙−f+A+k3satr,where k3 is a positive definite matrix, sat () is a saturation function, and r = λe + de, where λ is a positive number.According to the simultaneous equations (11) and (13), the following expression can be obtained:(14)V˙≤−k1ξ2p1−ξ2p−e2TK2e2+e2Tε˜,where ε˜ is the error.(15)∑i=1ne2iε≤12e2Te2+12ε˜.Thus, it is easy to construct the necessary inequality as follows:(16)V˙≤−CV+B,where C=2pk1i,2k2i and B=1/2ε˜2.(17)−1<ξi<1;e2≤2V¯0.Therefore, according to Lemma2, we can get the convergence of angular displacement error, which is easy to obtain α convergence; thus, the angular velocity error converges.


## 3.3. The Simulation and Analysis

The URDF model of Kuka iiwa14 manipulator is selected as the simulation object, and Simulink and Gazebo are used to simulate and analyze it, respectively.The selection of gain matrices and parameters is very crucial to the stability and position/force tracking of the effect of the manipulator system. Only selecting reasonable control parameters can accomplish the coordinated handling and compliant control of the manipulator. Through many simulation experiments, the following gain and parameter values are finally selected. According to the sample data of the observed inertial positive matrixW, the estimated value W¯ is diag ([100, 250, 80, 10, 5, 5, 5]). The central point of the excitation function in RBF neural network is selected as follows: c=−1.5−0.1−0.500.511.5−1.5−0.1−0.500.511.5−1.5−0.1−0.500.511.5. The width value is 0.4.In the initial state of the robot system, the expected values of the output angular displacement, angular velocity, and angular acceleration are taken, respectively. The lower boundary of the constraint isk¯mt=0.2θd+λd−3.14, the higher boundary of the constraint is k¯mt=1.5θd+λd+3.14, and control gain variables k1 and β in virtual controller are 4 and 0.5, respectively. The factors f and KS in the adaptive law are 5 and 0.01, respectively; the initial selection in the controller is 30. The system order p of TVBLF is 2. The coefficient k3 of saturation function is taken as 0.5 and λ as 5.In order to show the tracking performance of the designed control law, the expected input states of joint position, velocity, and acceleration can be set as sin(t), cos(t), and −sin(t), respectively, and the simulation is carried out in Simulink, as shown in Figure 1.Figure 1
Tracking effect of the algorithm in this paper: (a) error of position; (b) error of velocity; (c) output acceleration; (d) output torque; (e) unknown term fitting.
(a)(b)(c)(d)(e)Figures1(a) and 1(b) show that the designed control method can track the position and speed at the same time, and the tracking effect is superior. In order to highlight the effect of chattering suppression, it can be compared with the unconstrained neural network control and debug parameters and make its tracking accuracy similar with the algorithm in this paper. The output acceleration, output torque, and fitting terms of unknown terms are shown in Figure 2.Figure 2
Unconstrained neural network control: (a) output acceleration; (b) output torque; (c) unknown term fitting.
(a)(b)(c)Figures1(c) and 2(a) show that the output acceleration oscillation of the proposed algorithm is obviously alleviated, thus suppressing chattering, as shown in Figures 1(d) and 2(b). Figures 1(e) and 2(c) show that the dynamics model designed in this paper is easier to fit, thus indirectly alleviating the chattering phenomenon.In order to show the saturation function in equation (13), only equation (12) is used as the control law for tracking control, and the position tracking effect is shown in Figure 3.Figure 3
Drag process in Gazebo.Figures3 and 1(a) show that using the saturation function as the robust term can improve the tracking accuracy (for example, the tracking accuracy of joint 6 is significantly improved), thus ensuring the tracking stability.In order to further verify the anti-interference performance of the proposed algorithm, we can drag object in Gazebo. In order to simulate the real experiment, the real-time ratio in Gazebo was adjusted to make the fluctuation range of (0.92, 0.97), and the drag object mass was designed to be 10 kg. The desired trajectory of the joint is shown in Figure4. And the tracking performance of the algorithm is shown in Figure 5.Figure 4
Expected joint state: (a) position; (b) velocity; (c) acceleration.
(a)(b)(c)Figure 5
Tracking state of dragging experiment: (a) error of position; (b) error of velocity; (c) output torque.
(a)(b)(c)In Figure5, the execution time interval of the manipulator dragging is about [4.5, 14] (s). Figures 5(a) and 5(b) show that the proposed algorithm can still track the joint position and joint velocity of the manipulator under obvious external interference and the tracking accuracy is high. Figures 5(b) and 5(c) show that the set speed in Gazebo is not consistent with the initial speed designed in this paper, resulting in instantaneous sudden change in the initial stage. Figure 5(c) shows that the dithering phenomenon of the manipulator can be suppressed by using the algorithm in this paper.In Gazebo, the control algorithm of time-varying constrained output state is combined with the estimated dynamics model to realize the anti-interference experiment in dragging, as shown in Figure6.Figure 6
Drag process in Gazebo.Figure6 shows that the manipulator can still complete the dragging task under the condition of obvious friction interference. It is proved again that the control algorithm of time-varying constrained output state combined with the estimated dynamics model has the advantage of anti-interference.To sum up, the experimental results show that the combination of the estimated dynamics model and the time-varying constrained output state can effectively track the joint position and speed in the interference environment with obvious intensity and can suppress the chattering phenomenon of the manipulator. The most important thing is that there is no need to establish a specific dynamics model, which has a wider generalization. Therefore, it is suitable for most redundant manipulators.


## 4. Conclusions

In this paper, the position tracking of 7-DOF manipulator is analyzed and studied from the following three aspects:(1)
The dynamics equation of the manipulator is established and analyzed(2)
Based on the established dynamics model, the appropriate inertia estimation matrix is selected and the required terms are fitted by neural network so as to establish a new dynamics equation and achieve the effect of simplifying the model(3)
The control equation based on the time-varying constrained output state is established to improve the convergence stability under the condition of model uncertainty and obvious external disturbance, such as obvious frictionIn view of the above three aspects, this paper establishes the estimated dynamics model by combining the neural network fitting characteristics with the estimated inertia matrix. Then, based on the estimated dynamics model, a neural network adaptive joint position control method with time-varying output constraints is proposed. Finally, Simulink and Gazebo simulation experiments show that the control algorithm with time-varying constraint output state and the estimated dynamics model can track the joint position of iiwa14 manipulator under the condition of obvious friction interference, and the tracking accuracy is high, and the chattering phenomenon can be suppressed.



---

*Source: 9332324-2021-10-19.xml*