The neural network terminal sliding mode control for the 3-RRC parallel robot

In this paper, the 3 degrees of freedom (3-DOF) parallel robot (3-RRC) is taken as the research object. The Lagrange method is used to establish the reduced order dynamic equations of three branch chains. On the basis of the U-K (Udwadia-Kalaba) equation, the analytical expressions of ideal and non-ideal constrained forces are obtained. Then the complete dynamic model of 3-RRC parallel robot is established. In order to achieve high precision control of 3-RRC parallel robot, and fully considering the uncertainty of non-ideal constrained force and chattering problem in terminal sliding mode control algorithm, the neural network is used to adaptively adjust the gain of switching function and achieve universal approximation of the unknown non-ideal constrained force. The neural network terminal sliding mode control algorithm is proposed for the complete dynamic model of 3-RRC parallel robot, and the stability of the control system is proved by Lyapunov theorem. Finally, the simulation research is conducted on the 3-RRC parallel robot. Simulation results show that the tracking precision of angle positions and non-ideal constrained forces are all reached 10−2 order, which realize the high precision control of the 3-RRC parallel robot, weaken the chattering phenomenon, and verify the correctness and effectiveness of the proposed dynamic model and control algorithm.


Introduction
Parallel robot is a closed-loop kinematic chain mechanism, which is composed of fixed platform, moving platform and some links connecting them. These links are usually composed of drivable prismatic joints and passive spherical joints or general joints connecting the platform. In view of these structural characteristics, the parallel robot has four main advantages compared with the serial robot: firstly, since the cumulative error of the parallel robot is less, its motion accuracy is higher. Secondly, because the actuator of the parallel robot is fixed on or close to the fixed platform, its motion inertia is smaller. Thirdly, the components of the parallel robot system move in parallel, so its structural stiffness is larger, and there is no cantilever load in the system. Fourthly, the inverse kinematics of the parallel robot is relatively simple, which is beneficial to achieve real-time control. Therefore, parallel robot has a wide application prospect in the occasions that need high stiffness, precision, running speed, and perfect dynamic characteristics, such as aerospace, manufacturing equipment, medical, and other fields. 1,2 At present, most parallel robots are designed with 6-DOF structure, but in many applications (such as welding, medical, cutting, handling, etc.) parallel robots only need lower-mobility to meet the requirement. 3 Many scholars have successively carried out research on lower-mobility parallel robots (generally 2-5 degrees of freedom), especially 3-DOF parallel robots, such as the famous Delta, 3-RRR, 3-RPS, Tricept, and so on. The main advantages of the lower-mobility parallel robot compared with the 6-DOF parallel robot are that it can meet the needs of most industrial operations, and the complexity and cost of the mechanism are lower.
Different from the serial robot with perfect dynamic modeling method, the dynamics of parallel robot is more complex due to the closure of kinematic chain. In addition, lower-mobility parallel robots usually have parasitic motion and over-constraints, which make the dynamic modeling more complex. 4 The research on the dynamic modeling of parallel mechanism is mainly divided into four categories: Newton Euler method, Lagrange equation, Kane equation, and virtual power principle. Chen et al. 5 established a closed dynamic model of 3PRRU parallel robot by using Newton Euler method and carried out dynamic analysis, but the model was not accompanied by over-constraints. Xin et al. 6 combined Lagrange equation with virtual working principle to establish the dynamics of 3-DOF parallel mechanism. Dong 7 established the dynamic model of planar parallel mechanism with redundant driving force by Lagrange equation, which could eliminate the Lagrange operator through the zero space expression of velocity constraint matrix. Chen et al. 8 deduced the rigid flexible coupling dynamic model of 3-RRR planar parallel mechanism based on the Kane equation. Hu et al. 9 deduced the velocity mapping matrix of (3 UPU) + (3UPS + S) serial parallel robot, established the dynamic model based on the virtual work principle, which achieved the calculation formula of the driving force.
The accurate dynamic modeling of parallel robot plays an important role in the design of control algorithm. According to the above-mentioned work, many researches only consider the ideal constrained force, and lack the modeling and solving of non-ideal constrained force for the parallel robot. Udwadia-Kalaba equation is a new method for dynamic modeling of constrained complex mechanical systems. [10][11][12][13] When solving the dynamic problems of constrained systems, it does not need to introduce auxiliary variables, and the dynamic equation in analytical form and the acceleration expression in display form can be obtained, which is applicable to both ideal and non-ideal constrained force. In this paper, the 3-RRC parallel robot is taken as the research object, where exists the constrained force between the moving platform and each branch chain. Actually, the constrained force in the 3-RRC parallel robot can be divided into two parts. One is the normal force, which is regarded as the ideal constrained force. The other is the tangential force that can be seen as the non-ideal constrained force. Firstly, the reduced order dynamic equations of three branch chains are established by Lagrange method. Then the analytical expressions of ideal and non-ideal constrained forces are constructed and obtained by using the U-K equation. Finally the complete dynamic equation of 3-RRC parallel robot is established.
3-RRC parallel robot is a highly coupled and strongly nonlinear system. The sliding mode control is the preferred method for uncertain parallel robot control because of its strong robustness, no need for accurate modeling, special decoupling, and fast response speed. 14 Compared with the ordinary sliding mode control, terminal sliding mode control introduces nonlinear function in the design of sliding hyperactive plane, which can make the control system converge to the equilibrium point in limited time. At the same time, it also has the advantages of small control gain, fast dynamic response speed, and high steady-state accuracy. 15 Feng et al. 16 proposed a nonsingular terminal sliding mode control method for the singular problem of general terminal sliding mode controller, and discussed the design of nonsingular terminal sliding mode controller. This method has been successfully applied to the trajectory tracking control of n-DOF rigid robot. Zhang et al. 17 proposed nonsingular terminal sliding mode control, which realizes high-precision trajectory tracking control of redundant parallel robot system and eliminates the singularity of traditional terminal sliding mode control method. Doan et al. 18 constructed a synchronous full order terminal sliding mode surface in the state space of cross coupling error for the 3-DOF planar parallel robot with uncertain dynamics. The position error and synchronization error variables converge at the minimum value at the same time, which can ensure the effectiveness of position tracking control of the 3-DOF planar parallel robot.
Although the terminal sliding mode control has many advantages, the discontinuous switching characteristics of the sliding mode control will cause system chattering and affect the control accuracy of the system. In order to reduce the chattering effect of the sliding mode control, there are many methods such as filtering, observer, switching gain, fuzzy rules, neural network, and genetic algorithm optimization. Fei et al. 19 proposed a new low-pass filter sliding mode control method, which realized the tracking control performance of 3-DOF space robot and weakened the chattering phenomenon to a certain extent. Wang et al. 20 applied Hamilton Jacobi inequality theory and the designed disturbance observer to the designed sliding mode robust control to verify the anti-interference ability of WDPR. The disturbance observer can effectively reduce the chattering and improve the control accuracy of the system. Gao et al. 21 proposed a variable structure controller with integral operation switching surface, which makes the parallel robot system insensitive to uncertainty and external interference. The adaptive law is designed to realize the on-line identification and estimation for the uncertainty of the parallel robot system and reduce the chattering of the traditional sliding mode control. Wu et al. 22 established the dynamic characteristics of the robot based on the virtual work principle. The control scheme adopts fuzzy sliding mode variable structure control to suppress the chattering of the driving joint and reduce the pose error of the robot end-effector. Nguyen et al. 23 combined adaptive neural network, adaptive robust sliding mode control, and nonlinear compensation term to realize high-precision trajectory tracking control of redundant parallel robot. Zhou and Liang 24 proposed the sliding mode control based on genetic algorithm, adjusted the parameters of switching function and exponential approximation law through genetic algorithm, improved the control performance of robot joint position trajectory tracking, and significantly reduced the chattering of controller output.
In order to effectively reduce the chattering phenomenon of the terminal sliding mode control and considering the uncertainty of non-ideal constrained force, this paper combines the neural network control with the terminal sliding mode control to realize adaptive adjustment of switching function gain. The universal approximation of unknown constrained force is realized by using the universal approximation characteristic of the neural network. The neural network terminal sliding mode control algorithm for the complete dynamic model of 3-RRC parallel robot is proposed, and the stability of the control system is proved by Lyapunov theorem to realize the high-precision control of 3-RRC parallel robot.
The structure of this paper is as follows: firstly, the dynamic model of the reduced order 3-RRC parallel robot is derived according to the Lagrange equation, and then the analytical expressions of the ideal constrained force and non-ideal constrained force between the moving platform and each branch chain are obtained based on the U-K equation. The complete dynamic equation of the 3-RRC parallel robot is obtained. Then, according to the constrained dynamic equation, the neural network terminal sliding mode controller is designed, and the stability of the control system is proved by Lyapunov theorem. Finally, the simulation of 3-RRC parallel robot is carried out to verify the correctness and effectiveness of the proposed dynamic model and control algorithm.

The reduced order dynamic model of 3-RRC parallel robot
In order to realize the high-precision control of lowermobility parallel robot, it is necessary to establish its accurate dynamic model. This paper takes the spatial 3-RRC parallel robot as the research object, and its mechanism diagram is shown in Figure 1. The moving platform P 1 P 2 P 3 and fixed platform A 1 A 2 A 3 of this parallel mechanism are rectangular. The moving platform and the fixed platform are connected through three branch chains A i B i P i (i = 1, 2, 3). Each branch chain is made up of two links, which is composed of two revolute pairs (R pairs) A i , B i and one cylindrical pair (C pairs) P i (i = 1, 2, 3). The axes of the three moving pairs in each branch A i B i P i are parallel to each other, and the axes of these moving pairs are parallel to the fixed platform A fixed coordinate system O À xyz is established, in which the origin O is located at the intersection of the vertical line of the revolute pair A 1 and the connecting line A 2 A 3 in the fixed platform A 1 A 2 A 3 . The z-axis is perpendicular to the fixed platform. The x-axis and y-axis coincide with the vertical line of the rotating pair A 1 and A 2 A 3 respectively. The length of fixed platform and moving platform is L 1 = L 3 = 2a and the width is L 2 = L 4 = 2b. The mass of the moving platform is m 0 . Links A i B i and B i P i (i = 1, 2, 3) are rigid bodies, with lengths l i1 and l i2 , masses m i1 and m i2 , angle position variables u i1 and u i2 , and centroid coordinates (x i1 , y i1 , z i1 ) T and (x i2 , y i2 , z i2 ) T respectively.
3-RRC is a lower-mobility parallel robot, in which three links A i B i i = 1, 2, 3 ð Þ connected to the fixed platform are driving links, the links B i P i (i = 1, 2, 3) connected to the moving platform are drived links. The driving link of each branch chain has 1-DOF of rotating pair. The drived link is 1-DOF of rotating pair at the connection with the driving link, and 2-DOF of cylindrical pair can achieve translation and rotation at the connection with the fixed platform. According to the structure type, during the movement of the 3-RRC parallel robot, the moving platform can only realize the translation movement in the 3-dimensional direction relative to the fixed platform, and there are no rotational degrees of freedom. Therefore, the number of degrees of freedom of the 3-RRC parallel robot is three. According to the independent vector loop equation of the parallel mechanism, the following can be obtained: In the above equation, since the end of each branch chain is connected with the moving platform in the form of cylindrical pair, which can translate and rotate along the axis of the moving platform, and the end of each branch chain is subject to constrained force. In the 3-RRC parallel robot, the link corresponding to angle variable u 11 , u 21 , u 31 is called driving link, and the link corresponding to angle variable u 12 , u 22 , u 32 is called drived link. Because the end of each branch chain is subject to constrained force and there is only one driving link for each branch chain, it is necessary to reduce the order of the system. In this paper, the angle variable u 12 , u 22 , u 32 is function of u 11 , u 21 , u 31 respectively, and then u 12 , u 22 , u 32 can be expressed by u 11 , u 21 , u 31 as: For the convenience of subsequent calculation, take the derivative of variable u 11 , u 21 , u 31 in equation (2), ∂u 31 , and solve it simultaneously to obtain: A =À l 11 cu 11 l 12 cu(u 11 ) , B = l 21 cu(u 31 )s(u 21 Àu(u 21 )) l 12 cu(u 11 )s(u(u 31 )Àu(u 21 )) , C = l 31 cu(u 21 )s(u(u 31 )Àu 31 ) Where, s() represents sin () and c() donates cos (). Without considering the constrained force of the moving platform on each branch chain and according to the equation (2), the angle variable u 12 , u 22 , u 32 is represented by u 11 , u 21 , u 31 . The dynamic model of the spatial 3-DOF translation (3-RRC) parallel robot can be expressed as: Where, M =Ĵ the Coriolis force and centrifugal force matrix, the angle variables, velocity, and acceleration vectors of each driving link respectively. t = t 1 t 2 t 3 ½ T is the generalized moment of the system.
The reduced order dynamic equations of three branched chains are established by Lagrange method. The fixed platform O À xy is taken as the gravity zero potential energy surface. Each link is regarded as a rigid body, and the rotational inertia of each link around the center of mass is J i1 and J i2 (i = 1, 2, 3) respectively. The parameters of the equivalent rotational inertia matrix are obtained by solving the system kinetic energy equation 25 as follows: (l 11 + l 12 A cos (u 11 À u(u 11 ))) + 1 4 (m 11 l 2 11 + m 12 l 2 12 A 2 + m 22 l 2 22 D 2 + m 32 l 2 32 G 2 ) + m 0 (l 2 22 D 2 s 2 u(u 21 ) + l 2 32 G 2 c 2 u(u 31 ) + (l 11 su 11 + l 12 Asu(u 11 )) 2 ) When the equivalent rotational inertia of the system is obtained, the parameters in the Coriolis force and centrifugal force matrix can be obtained according to the Lagrange equation: By calculating the gravity potential energy of each link and moving platform, the gravity matrix can be expressed as follows: So far, according to the above matrix parameters, the dynamic equation of 3-RRC parallel robot without considering constraint can be established.

The complete dynamic equation of the constrained 3-RRC parallel robot
In the actual motion, the constrained force exists in the moving platform and each branch chain. Assume the system has m = m 1 + m 2 constraints, and the constrained equation can be expressed as: The equation (7) include all the usual varieties of ideal and non-ideal constraints. Differentiating equation (7) with respect to time, the following matrix form can be obtained: Where, A is a m 3 3 dimensional matrix and b is a m dimensional vector.
Due to the existence of constrained force, the system is not only affected by the active force, but also by the constrained force. Under the combined action, the motion of the system will be changed. The dynamic equation of equation (4) can be written as: Where, Q c = Q c 1 Q c 2 Q c 3 ½ T represents the constrained force of the interaction between the moving platform and the three branch chains.
According to D'Alembert's principle, the constrained force between the end of each branched chain and the moving platform can be expressed in two forms: ideal constrained force and non-ideal constrained force. The virtual work done by the ideal constrained force is zero, and the virtual work of the non-ideal constrained force is not zero. In this article, the non-ideal constrained force is the friction acted in the manipulator.
As shown in Figure 1, T is the ideal constrained force (normal force to the contact point between each branch chain and the moving platform), Q c nid = Q c nid1 Q c nid2 Q c nid3 ½ T is the non-ideal constrained force (tangential force to the contact point between each branch chain and the moving platform).
The U-K method gives the expressions of ideal generalized constrained force and non-ideal generalized constrained force in analytical form: And Where, B = AM À 1 2 and the superscript '' + '' are the Moore-Penrose generalized inverse matrix. The vector c is an unknown vector, and it can only be obtained by testing and comparing the dynamic system.
In totally, the complete dynamic equation of the constrained 3-RRC parallel robot can be written as: Design of the neural network terminal sliding mode controller Although the conventional sliding mode control is suitable for 3-RRC parallel robot, the system still has obvious chattering, large adjustment time, and low control accuracy. In order to reduce the adjustment time of the control system and solve the singular problem of the controller by switching the corresponding linear sliding mode surface, the terminal sliding mode control system is designed for the 3-RRC parallel robot. Considering that the angle variable of each drived link is a function of the driving link, the aim of position tracking control of parallel robot is to require the angle variable u i1 = u 11 u 21 u 31 ½ T of each driving link to track the desired angle variable u i1d = u 11d u 21d u 31d ½ T with high precision.
The tracking error is defined as: Where, e = e 1 e 2 e 3 ½ T The terminal sliding mode control surface can be designed as:  a, b(b . a) is a positive odd number, L 1 = diag (r 11 , r 12 , r 13 ) and L 2 = diag(r 21 , r 22 , r 23 ) are the positive diagonal matrix, and r 1i , r 2i are the adjustment coefficient of the positive terminal sliding mode surface.
Because the terminal sliding mode control has obvious chattering phenomenon, and considering the uncertainty of non-ideal constrained force, the universal approximation characteristic of neural network is used to approach the non-ideal constrained force Q c nid , which can effectively overcome the chattering phenomenon of the control system. The neural network terminal sliding mode control algorithm for the complete dynamic model of 3-RRC parallel robot is proposed.
The input of neural network is given by: According to the approximation theorem of RBF neural network, the desired neural network output is: Where, Á k k represents the Euclidean norm, c i represents the center vector of the Gaussian basis function of the hidden node, s i is the normalization constant of the hidden node and represents the width of the Gaussian basis function.
Â Ã T is the weight matrix of desired neural network; § i = 1 1 , 1 2 , 1 3 ½ T represents the desired approximation error of neural network.
The actual output of the RBF neural network is written as:f The design of the neural network terminal sliding mode controller is obtained as follows: Where, that the diagonal element in diag e a=bÀ1 À Á is 0, and the rest remains unchanged.
The stability of the neural network terminal sliding mode controller shown in equation (19) is analyzed below, and the Lyapunov function is selected as: , the derivative of the equation (20) can be obtained: When e i 6 ¼ 0, the second derivative of equation (14) can be written as: From equations (15), (20) and (22), it can be obtained: When e i = 0, equation (23) can be deduced similarly, which will not be repeated here.
In order to simplify equation (23), M À1 F x ð Þ and M À1 Q c nid are taken as: From equation (24), it can be obtained: is the weight of actual approximation,ṽ f (i) is the weight error between v f (i) and v Ã f (i) . From equation (25), it can be written as: The adaptive law is designed as: Then equation (23) can be expressed as: Substituting equation (27) into equation (28), one can get: According to the universal approximation theorem of neural network, it is existed that e i .0, the following equation can be obtained: There exists a small positive real number z i , which satisfies: From equations (29)-(31), it can be obtained: In the control system, take z = diag z 1 , z 2 , z 3 ð Þ and make z i \p i , the following conclusions can be drawn: Based on the above analysis, V is positive definite and _ V is negative definite. According to Lyapunov's global stability theorem, the controller of the proposed control system is globally stable at the equilibrium point.

Simulation experiment
In order to verify the correctness and effectiveness of the proposed control algorithm, taking the 3-RRC parallel robot in Figure 1 as the research object, the control algorithm designed in this paper is verified by simulation experiments with MATLAB.
It can be seen from Figure 1 that the end of three branch chains are connected with the moving platform, and the driving link and drived link are subject to motion constraints. According to equation (2), the angle variables u 12 , u 22 , u 32 are the functions of u 11 , u 21 , u 31 , and the motion constraints of u 11 , u 21 , u 31 are taken as: Take the second derivative of equation (34) to get the following equation: Equation (35) can be written in the matrix form of equation (8) By substituting each matrix in equation (36) and each matrix parameter in equation (4) into equation (11), a complete analytical expression of ideal constrained force can be obtained. Considering the uncertainty of non-ideal constrained force, the proposed neural network terminal sliding mode control algorithm is used to approximate the non-ideal constrained force Q c nid . Each link and moving platform of the 3-RRC parallel robot is regarded as a rigid body, and physical parameters and control parameters are shown in the Table 1: According to the complete dynamic model of 3-RRC parallel robot, the terminal sliding mode surface is constructed by introducing nonlinear function. This method not only improves the response speed of the control system, but also avoids the singularity of the controller. Considering the uncertainty of non-ideal constrained force and the chattering problem of terminal sliding mode control algorithm, the neural network Table 1. Physical parameters and control parameters.
From the above simulation results, the control algorithm proposed in this paper meets the control requirements, and the following three conclusions can be drawn: 1. In the stable stage of the angle position and non-ideal constrained force tracking of each link, the tracking accuracy of the angle position and non-ideal constrained force reaches the order of 10 22 , and the angle position relationship between link l 21 and link l 31 meets the constrained conditions, which proves the correctness and effectiveness of the dynamic model and control algorithm. 2. From each simulation curve, there is no chattering phenomenon in each simulation result, which proves that the control algorithm proposed in this paper overcomes the chattering phenomenon when using sliding mode control alone. 3. Combining the neural network with the terminal sliding mode control, this paper effectively realizes the high-precision approximation and tracking control of non-ideal constrained force in 3-RRC parallel robot, and makes the dynamic model of parallel robot more complete in practical application.

Conclusion
In order to realize the high-precision control of 3-RRC parallel robot, the complete dynamic model of 3-RRC parallel robot is established by combining Lagrange method and U-K equation. Considering the uncertainty of non-ideal constrained force and the chattering problem of terminal sliding mode control algorithm, the neural network method is used to adaptively adjust the gain of switching function and realize the universal approximation to unknown constrained force. Then the neural network terminal sliding mode control algorithm is proposed, and the stability of the control system is proved by Lyapunov theorem. Finally, the 3-RRC parallel robot is simulated and verified. The simulation results show that the tracking errors of each link and non-ideal constrained force reach the order of 10 22 , which effectively realizes the high-precision approximation and tracking control of angle position and nonideal constrained force in the 3-RRC parallel robot, and weakens the chattering phenomenon when using sliding mode control alone, so the correctness and effectiveness of the proposed dynamic model and control algorithm are verified. The dynamic modeling method that combining Lagrange and U-K equation is suitable for most multi-DOF mechanical systems, which has great popularization and application value.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.