The adaptive neural network fuzzy sliding mode control for the 3-RRS parallel manipulator

In order to improve the high-precision tracking control of angle variables and the sliding mode equivalent control part for the 3-RRS parallel manipulator, an adaptive neural network fuzzy sliding mode control algorithm with self-adjusting switching gain is proposed. Firstly, considering the uncertainty of the constrained force between derived links and the moving platform, the complete dynamic model including ideal and non-ideal constrained force is established by combining with the Udwadia-Kalaba(U-K) equation and Lagrange method. Secondly, the neural network sliding mode controller is designed to realize the approximate solution of the sliding mode equivalent control part. At the same time, in order to reduce the chattering phenomenon of the neural network sliding mode controller, a fuzzy adjustment rule of switching gain is designed to better compensate for the uncertain terms. And then the stability of the control system is proved by the Lyapunov method. Finally, the proposed control algorithm is simulated on the 3-RRS parallel manipulator. The simulation results show that the chattering phenomenon is overcome. The high-precision control of angle variables and the sliding mode equivalent control part is realized.


Introduction
Parallel manipulator has many advantages, 1,2 such as high motion accuracy, large stiffness, high loadto-weight ratio, good dynamic performance, easy to control, and so on, which form a complementary relationship with serial manipulator in automation applications. Therefore, the parallel manipulator has been widely used in industrial fields such as aviation, machining, medical devices. In recent years, the 6-DOF parallel manipulator is more studied due to its outstanding advantage in static stiffness. However, the performance in the workspace and machining accuracy has disappointed the scholars. In many cases, 2-5 DOFs parallel manipulator could satisfy the actual requirements. This kind of parallel manipulator with less than 6-DOF is called lower-mobility parallel manipulator. 3 The lower-mobility parallel manipulator has high practical value and great application potential because of its few driving elements, low cost and compact structure. Many scholars have successively carried out research on lower-mobility parallel manipulator, especially the 3-DOF parallel manipulator, such as the famous Delta, 3-RRR, 3-RPS, and so on.
The dynamic model of parallel manipulator is the basis of dynamic characteristics research and system motion control. The research methods of parallel manipulator dynamics mainly include the Newton-Euler equation, 4 D'Alembert-virtual displacement principle, 5 Lagrange equation, 6 Kane method, 7 and screw theory. 8 Based on the Newton-Euler method, Yang et al. 9 studied the inverse dynamics of a space parallel manipulator with two translational DOFs and one rotational DOF. Song 5 obtained the joint driving torque and dynamic model by eliminating the virtual displacement in the dynamic equation of 3-PUU parallel manipulator according to the virtual work principle in the form of D'Alembert. Yen and Lai 10 derived the effective dynamic equation of a 3-DOF translational parallel manipulator by using Lagrange and D'Alembert equation. Cheng and Shan 7 deduced the dynamic model of 3RRR + 1PS space parallel manipulator based on Kane equation, which provided a theoretical basis for the structural parameter and control system design of driving links. Jaime 8 established the inverse dynamic model of 4-PRUR parallel manipulator according to the screw theory and virtual work principle.
Although the above dynamic modeling methods have been widely used in the engineering field, the analytical expression of non-ideal constrained force could not be obtained when considering the constrained force in the system. Udwadia-Kalaba theory [11][12][13][14][15] is an important research achievement in Lagrangian mechanics in recent two decades, which provides the motion equation of multi-body system under constraints. The main contribution of the theory could be divided into two parts: on the one hand, the basic motion equation of the ideal constraints is proposed according to the D'Alembert and Gauss principle; On the other hand, considering the non-ideal constrained force could not satisfy the D'Alembert principle, the basic motion equation is improved and the analytical expression is added.
Based on the above research situation, this paper takes the 3-RRS parallel manipulator as the research object. Considering the uncertainty of the constrained force between derived links and the moving platform of the 3-RRS parallel manipulator, the complete dynamic  model including ideal and non-ideal constrained force  is established by combining with the U-K equation and  Lagrange method. The complete dynamic model could  provide theoretical support for realizing the highprecision control of angle variables and the sliding  mode equivalent control part. 3-RRS parallel manipulator is a complex nonlinear system with multi-variable coupling and time-varying, and it is difficult to establish an accurate dynamic model. In addition, the conventional linear controller is difficult to achieve high precision control due to the uncertainties of model parameters, load disturbance, friction and many other uncertain factors. Because the sliding mode control does not require an accurate dynamic model and the parameters selection is not strictly. Furthermore, the sliding mode control system has the advantages of fast response speed, no overshoot and simple physical implementation. So the sliding mode control method is widely used in the control system of the parallel manipulator. Zhu et al. 16 designed a sliding mode control algorithm for the new parallel manipulator, which had strong robustness to uncertainty and interference, and realized the high-precision real-time control of the parallel manipulator. Boudjedir et al. 17 proposed a hybrid nonlinear proportional differential sliding mode controller (NPD-SMC) for trajectory tracking of the Delta parallel manipulator. Su et al. 18 proposed a sliding mode control method based on dynamic model of the Delta parallel manipulator to realize the robust trajectory tracking of uncertain model parameters.
When the sliding mode control is used alone for the parallel manipulator, the discontinuous switching characteristics of the control system will inevitably cause chattering due to the switching function. 19,20 At present, many scholars have done a lot of research to weaken the chattering phenomenon and put forward many solutions from different perspectives. Schenk et al. 21 extended the sliding mode controller through feedforward dynamic inverse control for the redundant cable-driven parallel manipulator, which reduced the workload of the sliding mode controller and weakened the chattering phenomenon. Vo et al. 22 designed a disturbance observer based on sliding mode control to identify and compensate for the disturbance, which greatly reduced the gain of the required switching function, weakened the chattering phenomenon and improved the tracking performance. Wang et al. 23 proposed a controller composed of sliding mode control, fuzzy control, and low-pass filter to reduce the highfrequency chattering control signal in the sliding mode control. Yang et al. 24 introduced fuzzy logic to adjust switching function gain so that the gain could change with the interference. It has been successfully applied to the 2-DOF manipulator, which has higher accuracy and less chattering than the sliding mode controller with fixed gain. Yu and Yao 25 used a genetic algorithm to optimize the nonsingular sliding mode surface and control parameters for the 6-DOF parallel manipulator, which reduced the chattering phenomenon and improved the convergence speed. Guoqin et al. 26 proposed a novel sliding mode control method which used RBF neural network to optimize its switching gain for a 2-DOF redundant parallel robot. It was shown from the comparison of the simulation and experimental results with the fixed-gain sliding mode control that the proposed RBF neural network sliding mode control had smoother control volume. Le et al. 27 proposed a novel chattering free neuro-sliding mode controller for the trajectory tracking control of two degrees of freedom parallel manipulators which had a complicated dynamic model, including modeling uncertainties, frictional uncertainties and external disturbances.
It can be seen from the above research that only one intelligent control algorithm combined with sliding mode control can achieve the purpose of reducing chattering, but the input torque of the control system still has a small chattering phenomenon.
In this paper, an adaptive neural network fuzzy sliding mode control algorithm with self-adjusting switching gain is proposed to realize the high-precision of angle variables and modeling uncertainty. Based on the complete dynamic model of the 3-RRS parallel manipulator, the neural network sliding mode controller is designed to realize the approximate solution of sliding mode the equivalent control part. When the neural network sliding mode controller is used alone, the control system has small chattering. In this paper, a fuzzy controller is added to the neural network sliding mode controller, and a fuzzy adjustment rule of switching gain is designed, which adaptively adjusts the switching gain according to the generalized distance. The uncertainty is compensated and the chattering phenomenon of the control system is eliminated, and then the stability of the control system is proved by Lyapunov method.
The rest of this article is organized as follows: firstly, based on the U-K equation, the analytical expressions of ideal and non-ideal constrained force for the constrained mechanical system are obtained. In the next section, taking the 3-RRS parallel manipulator as the research object, considering the constrained force between the moving platform and drived links, the complete dynamic model of the 3-RRS parallel manipulator is derived. Then, for the constrained dynamic equation, an adaptive neural network fuzzy sliding mode control algorithm with self-adjusting switching gain is proposed, and the stability of the control system is proved by the Lyapunov theorem. Finally, taking the 3-RRS parallel manipulator as the simulated object, the high-precision control of angle variables and the sliding mode equivalent control part are realized, which verifies the effectiveness of the control algorithm proposed in this paper.

Udwadia-Kalaba equation
If a mechanical system consists of s particles, then the system displacement at any time t could be expressed by the generalized coordinate vector u 2 R n , and its corresponding generalized velocity and acceleration vectors are _ u, € u 2 R n respectively. Under the unconstrained condition, the motion equation of the mechanical system can be expressed as: Where, M u, t ð Þ 2 R n 3 n is called inertia matrix, and Q _ u, u, t À Á 2 R n include gravity, external force and Coriolis force. Suppose the mechanical system is constrained by a group l, the constrained equation 14 is written as: Where, m m\n ð Þ is the number of constraints, A ls ð Þ : R n 3 R ! R and c l ð Þ : R n 3 R ! R are firstorder continuous. By rewriting the constrained equation, the matrix form of the constrained equation can be written as follows: By differentiating equation (2), the second-order form of the constraint can be obtained: Take: Therefore, equation (4) is expressed in matrix form as: The force is the only reason to change the motion of the mechanical system. When considering the constrained force, the mechanical system will be subject to additional constrained force Q c 2 R n in addition to the action of the active force to ensure that the constrained equation is established, and the system will carry out the desired motion under each force action. Therefore, the motion equation of the constrained system can be given by: The constrained force consists of two parts, one is the ideal constrained force and the other is the nonideal constrained force. According to D'Alembert's principle, the virtual work done by the ideal constrained force is zero and the non-ideal constrained force is not equal to zero. Therefore, the constrained force can be expressed as: The Udwadia-Kalaba method has given the expressions of ideal and non-ideal generalized constrained force in the analytical form 12 : and Where B=AM À 1 2 and the superscript '' + '' denotes the Moore-Penrose generalized inverse matrix. The vector c is a known value obtained according to the physical characteristics of non-ideal constrained force, which needs to be obtained through experiments.

The complete dynamic equation of the 3-RRS parallel manipulator
Taking the 3-RRS parallel manipulator as the research object, the manipulator is shown in Figure 1. 3-RRS parallel manipulator is composed of a moving platform P 1 P 2 P 3 , three branch chains A i B i P i (if there is no special description, i and j in this paper are taken as 1,2,3) and a static platform A 1 A 2 A 3 . Each branch chain consists of two parts, one is the driving link A i B i and the other is the drived link B i P i . The moving platform is connected with each drived link through spherical pair (S pair). The static platform and drived links are all connected with driving links through revolute pair (R pair). The axis of revolute pair in A i is parallel to the axis of revolute pair in B i .
In the 3-RRS parallel manipulator, A i B i and B i P i are homogeneous links, with lengths L i1 =(l 11 , l 21 , l 31 ) T and L i2 =(l 12 , l 22 , l 32 ) T , masses m i1 =(m 11 , m 21 , m 31 ) T and m i2 =(m 12 , m 22 , m 32 ) T , motion angle variables u i1 =(u 11 , u 21 , u 31 ) T and u i2 =(u 12 , u 22 , u 32 ) T respectively. The centroid coordinates of links are (x i1c , y i1c , z i1c ) T and (x i2c , y i2c , z i2c ) T respectively. In the motion process, three driving links move independently under the desired motion and drive three drived links to revolute, so as to drive the moving platform to rotate in two directions and move in one direction. Therefore, taking the motion angle variable u i2 as a function of the input angle variable u i1 , the relationship of the following equation can be obtained: In Figure 1, the moving and static platform of the 3-RRS parallel manipulator are equilateral triangles. The moving coordinate system P À xyz is established at the mass center of the moving platform and the static coordinate system O À XYZ is set up at the mass center of the static platform. Among them, the origin P and O of the coordinate system are located at the geometric center of the moving and static platform respectively, and the distances from the geometric center to each vertex are PP i =r and OA i =R respectively. The axes z and Z are perpendicular to the moving and static platform.
The axes x and X are perpendicular to edges P 2 P 3 and A 2 A 3 , and the axes y and Y are parallel to edges P 2 P 3 and A 2 A 3 respectively. The inertia moment of components A i B i and B i P i around their centroid are J i1 and J i2 , and the mass of the moving platform is m 0 . The position coordinate of the centroid and attitude parameter are (x p , y p , z p ) T and (a, b, g) T respectively. The inertia matrix of the moving platform relative to each axis of the P À xyz coordinate system is J x , J y , J z respectively. Without considering the constrained force between the moving platform and each drived link, the kinematic energy and potential energy of the 3-RRS parallel manipulator can be expressed as follows: Ã T is the angle velocity vector of each driving link.Ĵ ii andĴ ij are the equivalent inertia moment, which are closely related to the size, mass and configuration change of the manipulator, and the expression can be written as: Considering the uncertain disturbance term caused by modeling error and external interference, the dynamic model of 3-RRS parallel manipulator can be obtained by deriving u 11 , u 21 , u 31 and _ u 11 , _ u 21 , _ u 31 of equation (11) respectively and substituting them into equation (12): Where, M=Ĵ Coriolis force or centrifugal force matrix, G= G 1 G 2 G 3 ½ T donates the gravity vector matrix, € u i1 = € u 11 € u 21 € u 31 Â Ã T represents the angle acceleration vector of each driving link, t= t 1 t 2 t 3 ½ T is the generalized force of the system and t d = t d1 t d2 t d3 ½ T is the uncertain disturbance term caused by modeling error and external interference.
In the equation, the parameters of the Coriolis force and centrifugal force matrix are: The static platform is taken as the gravity zero potential energy surface, and the gravity matrix is: According to the U-K equation, the constrained force can be divided into ideal constrained force and non-ideal constrained force. Therefore, the complete dynamic model of 3-RRS parallel manipulator can be obtained from equations (8) and (14): As shown in Figure 1, ½ T represents the ideal constrained force is mainly the reaction force perpendicular to the contact surface between the moving platform and the drived link, and ½ T donates the non-ideal constrained force is mainly the friction force of the contact surface between the moving platform and the drived link.

Design of the adaptive neural network fuzzy sliding mode controller
Design of the neural network sliding mode controller It can be seen from equation (11) that the angle variable u i2 = u 12 u 22 u 32 ½ T of the derived link can be represented by the angle variable u i1 = u 11 u 21 u 31 ½ T of the driving link, so the control system only realizes high-precision control for the angle variable of each driving link.
If u i1d = u 11d u 21d u 31d ½ T 8 is the desired angle of the driving link, the error is: Where, e= e 1 e 2 e 3 ½ T 8 Take the sliding mode function as: Where, T , L=diag(r 1 , r 2 , r 3 ) is the positive diagonal matrix and r 1 , r 2 , r 3 is the slope of the sliding surface.
The equation can be calculated from equations (18) and (19): After solving the first-order differential of equation (20), both sides of the equation are multiplied by the mass matrix M. Substituting equation (17) in equation (20) and simplifying it, we can get: For equation (21), suppose that: Where T is the value of the sliding mode equivalent control part. According to equations (21) and (22), the sliding mode controller is designed as follows: Where, P=diag( p 1 p 2 p 3 ), K=diag( k 1 k 2 k 3 ), p i .0, k i .0, k i is the switching gain of sliding mode control. sgn(s)= sgn(s 1 ) sgn(s 2 ) sgn(s 3 ) is a symbolic function.
Because the calculation of F(x) needs to obtain the accurate dynamic model of the controlled object, and Q c nid needs to be calculated by actual experimental test. The calculation error of F(x) is often large in practical engineering, which seriously affects the performance of the control system. In this paper, the RBF neural network is used to approximate F(x), and then the approximate value of non-ideal constrained force F(x) is obtained through the approximate solution of Q c nid , so as to realize the control without the accurate dynamic model of the controlled object.
The basis function adopts Gaussian function, and the ideal input and output algorithm of the RBF neural network is: Where, x is the network input. c i represents the center vector of RBF function, and s i donates the center vector of RBF function T represents the weight matrix of ideal neural network. z= z 1 , z 2 , z 3 ½ T donates the ideal approximation error of neural network.
The input value of the network is x= e _ e u i1d _ u i1d € u i1d Â Ã T . Suppose that the weight estimation error of the neural network isṽ, so the weight of the neural network in actual approximation isv=v Ã Àṽ.
Â Ã T is the actual approximation value of RBF neural network to F(x), the actual output of RBF neural network is obtained: Therefore, the sliding mode controller can be designed as the neural network sliding mode controller according to equations (23) and (25), the equation can be expressed as follows: Design of the adaptive neural network fuzzy sliding mode controller In the neural network sliding mode controller of equation (26), the switching gain K sgn(s) is used to compensate for the uncertain disturbance caused by modeling error and external interference, which could ensure the existence condition of the sliding mode. Due to the obvious chattering phenomenon of the neural network sliding mode controller, the fuzzy adjustment rules of switching gain are designed to make the adaptive adjustment weaken the chattering phenomenon and better compensate for the uncertainty.
The distance between the current motion point and the sliding mode surface is defined as the generalized distance, which is represented by d i . The switching gain of k i in the sliding mode control is adjusted in time according to the generalized distance d i . d i is the input rule and k i is the output rule. By analyzing the fuzzy system and adjusting switching gain of the fuzzy rules, seven input fuzzy subsets A m = NB NM NS Z PS PM PB f g and four output fuzzy subsets B m = Z PS PM PB ½ are designed respectively, then seven fuzzy rules can be designed and described in the following Table 1.
Where, NB, NM, NS, Z represent negative large, negative medium, negative small and zero respectively. PS, PM, PB are expressed as small, middle and large respectively. The membership function used to represent the input and output fuzzy sets adopt the triangular membership function and Gaussian membership function. The product inference engine, singleton fuzzifier and central average defuzzifier are used to calculate the output. The output of the fuzzy system is: Further, q m k i is the fuzzy set center of the output k i , and m A m (d i ) is the triangular membership function and Gaussian membership function.
Since the number of input fuzzy subsets is 7, given , equation (27) can be converted into the following matrix form: In equation (28), each matrix can be specifically expressed as: From equations (26) and (28), the neural network fuzzy sliding mode controller can be designed as follows: Stability analysis of the control system Adjust the fuzzy rules before analyzing the stability of the proposed control algorithm. First, take W=K sgn(s)=diag(w 1 , w 2 , w 3 ), and the adjusted fuzzy rules are described as follows ( Table 2): According to the adjusted fuzzy rules, the neural network fuzzy sliding mode controller of equation (30) can be converted into the following equivalent controller: From equations (21), (22), (24), and (26), we can get: Take the vector H Ã w i formed by the fuzzy center of the fuzzy system output k i , so that H ÃT w i u w i (d i ) is the approximation of the ideal neural network approximation error z i . According to the universal approximation theorem of the fuzzy system, there is e i .0, which satisfies the following inequality: Then letH w i =H w i À H Ã w i andH w i is the approximation error of fuzzy system. Select Lyapunov function: Where, tr( ) is the trace of the matrix and H is a symmetric positive definite constant coefficient matrix, that is H=H T , H j j.0. According to the matrix theory, the real symmetric positive definite matrix has an inverse matrix, so H has an inverse matrix H À1 , and H À1 is also symmetric positive definite.
According to the characteristics of the manipulator: s T (M À 2C)s=0, then take the derivation of equation (34) and simplify it: According to the matrix relationship, it can be deduced that , then equation (35) can be simplified as: In order to stabilize the control system, the adaptive laws of neural network weight adjustment and fuzzy system output are designed respectively, which are shown in the following: Because v Ã is the ideal approximation weight and v Ã is constant, we have _ v Ã =0, then equation (37) can be obtained: Substituting equation (37) and (38) into equation (36), we can get: There is a vector set r=diag(r 1 , r 2 , r 3 ) composed of a small positive real number r i , which satisfies the following condition: Equation (39) can be simplified by equation (40): When p i .r i , equation (41) can be obtained: M and H À1 are symmetric positive definite matrices. It can be seen from equations (34) and (42), V is positive definite regular and _ V is negative definite. According to Lyapunov's global stability theorem, the system is globally asymptotically stable at the equilibrium point.

Simulation experiment and results
In order to prove the effectiveness of the proposed adaptive neural network fuzzy sliding mode control strategy, taking 3-RRS parallel manipulator as the simulated object, the feasibility of the control algorithm is verified by simulation experiments.
In Figure 1, the desired angle variables and motion constraints of driving links are set as follows: The second derivative of equation (43) can be obtained: € u 11 =À 0:25p 2 sin (0:25pt) € u 21 =À 0:125p 2 cos (0:25pt) According to the constrained equation (6), equation (44) can be written in matrix form: Take the 3-RRS parallel manipulator as a homogeneous rigid body, and set the physical parameters during simulation as shown in the Table 3: Through the physical parameters, each matrix of the dynamic equation of 3-RRS parallel manipulator can be obtained. Substituting the values of equation (45) and dynamic matrix into equation (9), the ideal constrained force can be calculated. Considering the dynamic modeling error and the uncertainty of nonideal constrained force, the proposed control algorithm is used to approximate the sliding mode equivalent control part.
The control parameters used in the simulation are shown in the Table 4: The structure diagram of the neural network fuzzy sliding mode control system proposed in this paper is shown in Figure 2: The fuzzy system membership function of the input and output fuzzy sets adopt the commonly used triangular membership function and Gaussian membership function, as shown in Figures 3 and 4.
Simulation results are shown in Figures 5to 9.    line represents the desired angle variables u i1d = u 11d u 21d u 31d ½ T of three driving links respectively, the blue dotted line is the actual angle tracking respectively, and the blue solid line represents the tracking error of three driving links. Figure 8 gives the control driving torque of three driving links. Figure 9 shows the RBF neural network approximation for the adaptive neural network fuzzy sliding mode control algorithm, the red solid line represents the value of the sliding mode equivalent control part, and the blue dotted line represents the RBF neural network approximation for the sliding mode equivalent control part. Table 5 presents the maximum tracking errors of angle variables and the sliding mode equivalent control part in the stable stage. The maximum value of the control driving torque are given as follows: Our simulation data are briefly summarized as follows: 1. The adaptive neural network fuzzy sliding mode control proposed in this paper realizes the highprecision tracking control of angle variables for each driving link, and the simulation results of angle variable u 21 and angle variable u 31 satisfy the constraints. 2. The simulation results show that there is no chattering phenomenon, which proves that the     control algorithm proposed in this paper overcomes the chattering phenomenon of sliding mode control. 3. The neural network in the control algorithm could better approximate the sliding mode equivalent control part. The control algorithm proposed in this paper realizes the highprecision control of the accurate model information for the 3-RRS parallel manipulator, which is also the outstanding advantage of this method.

Conclusion
The friction between motion pairs is easy to be ignored in the accurate dynamic modeling for the parallel manipulator. At the same time, the accurate dynamic model of parallel manipulator is difficult to obtain in practical engineering. Taking 3-RRS parallel manipulator as the research object, this paper established the accurate constrained dynamic model and proposed the corresponding adaptive neural network fuzzy sliding mode control algorithm. Firstly, the Lagrange method is simple and convenient for the transformation from dynamic analysis to control model, and the analytical expression of the constrained force is obtained by using U-K equation. Combining with the U-K equation and Lagrange equation, the complete dynamic model of 3-RRS parallel manipulator including ideal and non-ideal constrained force is established. In the basis of the complete dynamic model, the neural network sliding mode controller is designed to realize the approximation of the sliding mode equivalent control part. In order to weaken the obvious chattering phenomenon of the neural network sliding mode controller, the fuzzy adaptive adjustment rule of switching gain is designed to compensate the uncertainty, and the stability of the control system is proved by Lyapunov method. Finally, taking the 3-RRS parallel manipulator as the simulated object, the high-precision control of angle variables and accurate model information for each driving link is realized, which verifies the effectiveness and correctness of   the control algorithm proposed in this paper. The complete dynamic modeling method and control algorithm proposed in this paper are suitable for most constrained mechanical systems and have important engineering 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) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: