TSM-Based Adaptive Fuzzy Control of Robotic Manipulators with Output Constraints

This paper proposes an adaptive control scheme based on terminal sliding mode (TSM) for robotic manipulators with output constraints and unknown disturbances. The fuzzy logic system (FLS) is developed to approximate unknown dynamics of robotic manipulators. An error transformation technique is used in the process of controller design to ensure that the output constraints are not violated. The advantage of the error transformation compared to traditional barrier Lyapunov functions (BLFs) is that there is no need to design a virtual controller. Thus, the design complexity of the controller is reduced. Through Lyapunov stability analysis, the system state can be proved to converge to the neighborhood near the balanced point in finite time. Extensive simulation results illustrated the validity of the proposed controller.

To handle the problem of output constraints, many techniques have been developed [18][19][20][21]. In [22], a robust adaptive neural network (NN) control is utilized to guarantee the prescribed performance of the multiple-input multiple-output (MIMO) systems. In [23], a barrier Lyapunov function is used to guarantee the output constraints, which provides more flexibility and reduces the requirements for prerequisites. For nonlinear system, an optimal control strategy which transforms the constrained system into a novel one without output constraints is proposed in [24]. In [25], an adaptive neural network tracking control is proposed for robotic manipulators subjected to output constraints. e output constraints of some systems are not immutable; thus, to handle this problem, an asymmetric barrier Lyapunov function is used in the design process of the controller in [26]. Recently, a new robust control is developed in [27]. is control method first converts the output constraints into the error constraints. en, an error transformation technique is employed, which changes the constrained error system into an unconstrained system. Intelligent controls have been widely used to cope with model uncertainty due to their approximation ability. According to combine fuzzy system or neural network with adaptive control, online parameters estimation can be realized, which improves the feasibility of the control scheme [28][29][30][31][32][33][34]. A novel adaptive fuzzy controller is presented to guarantee the stability of closed-loop system in [35]. For a class of uncertain MIMO nonlinear systems in the discretetime form, a control strategy that uses higher order neural networks to approximate the desired controllers is proposed in [36]. An adaptive neural network scheme considering unknown output hysteresis is studied in [37], which used only two learning parameters so that the computational burden is greatly reduced. In [25], two neural networks are utilized in the controller: one is used to approximate the unknown dynamic model, and the other is used to approximate the error of the input dead zone.
Sliding mode control (SMC) is widely used in motion control, because of its simple algorithm and good robustness [38]. With the development of sliding mode control technology, there are many new sliding mode control schemes. In [39], a radial basis function (RBF) neural network sliding mode control scheme is used to realize the asymptotic stability of rigid robotic manipulators, in which RBF neural network is used to estimate unknown dynamics. An integral sliding mode adaptive control scheme is proposed to realize system signals uniformly ultimately bounded in [40]. A second-order sliding mode control algorithm is presented in [41]. Fast terminal sliding mode control schemes are used to control the single input single output system (SISO) and the robotic manipulators, respectively, in [42,43]. Both have achieved fast and high-precision tracking performance. For dual-inertia driving systems, an adaptive control scheme combining sliding mode with prescribed performance function is proposed in [44]. ere are many papers that use terminal sliding mode to control the manipulators, but few researches on the manipulators with output constrains and model uncertainty are carried out. And most of the existing methods to solve the problem of output constrains are using barrier Lyapunov function. ese methods need to design additional virtual controllers, which will increase the complexity of the controller.
To better solve the trajectory tracking problem of a class of manipulators with output constrains and model uncertainty, a novel adaptive fuzzy control scheme that combines error transformation with finite time sliding surface is designed. Using the fuzzy logic system to approximate model uncertainty can improve tracking performance. e problem of output constraints is solved by introducing an error transformation function.
is error transformation function changes the output constraints into the error constrains. erefore, not only can it be ensured that the output constraints are not violated, but also the transient response can be improved. e error after conversion is used in the sliding mode surface, and the convergence of the system is proved by the Lyapunov stability theorem. e main contributions are summarized as follows: (1) To prevent the contravention of output constraints, the error transformation is used in the controller design. e introduction of virtual controller is avoided which reduces the cost of calculation. At the same time, the effect of transient response is improved.
(2) Modify the sliding mode surface. e transformed error is applied to the sliding surface, which guarantees that system output constraints not only are not violated but also achieve the steadystate error converge to near the balanced point in finite time.
In what follows, first, the dynamic model, fuzzy logic system, and error transformation are presented, followed by the derivation of the controller. en, the stability analysis and mathematical proof are given. e paper ends with some comparative simulations and conclusions.

Dynamic Model of the Robotic
Manipulator. An n-degree-of-freedom robotic manipulator with unknown disturbance can be described as where M(q) denotes the symmetric positive definite inertia matrix, C(q, _ q) represents the Coriolis/centripetal torque, G(q) is the gravity torque, τ d denotes the unknown external disturbances, τ is the control input torque, and q is the angular position.
In practice, due to modeling error, physical parameter perturbation, and other factors, the system model always has uncertainty; thus, the following formula holds: where M 0 , C 0 , and G 0 denote the nominal part of the model and M n , C n , and G n denote the mode uncertainty. e control problem is to design a control law to ensure the system output state q can track the desired q d and to guarantee the constraints are not violated simultaneously. In order to verify the feasibility of proposed control scheme, the following assumptions are given.
Assumption 3 (see [46]). e reference trajectory q d and its first two time derivatives _ q d , € q d are bounded. Moreover, the angular position q and speed _ q are measurable.

Fuzzy Logic
Systems. e fuzzy system can be used to approximate unknown nonlinear function due to their universal approximation ability. e advantage of fuzzy system is that it can use linguistic information effectively 2 Computational Intelligence and Neuroscience [47]. e structure of fuzzy system is shown in Figure 1. e design steps of fuzzy system are as follows [16]: (3) Using the fuzzy inference engine and the defuzzifier, the fuzzy system can be obtained as denotes the Gaussian membership function. c ik and b ik denote the center and the width of the Gaussian function, respectively.
For clarity, we now arrange (3) into the following form: where Θ � [y 1 , . . . , y l ] T is the free parameters and Φ(x) is given as erefore, a nonlinear function can be expressed as where ε is the approximation error which satisfies ‖ε‖ ≤ ‖ε‖; ε is a positive constant.

Error Transformation.
To realize the control goal, we first define the tracking error as where denotes the target trajectory, and e 1 can be expressed as [e 11 , e 12 , . . . , e 1n ].
Lemma 1 (see [27]). Consider an Euler-Lagrange system. If the initial error satisfies e i (0) < k b i , ∀i � 1, . . . , n and the transformed error variables are bounded, then the closed-loop error is bounded and the output of system x 1i remains bounded by the imposed output constraints, e.g., To ensure the constraints are not violated, we use an error transformation as [27].
is method changes the output constraints into error constraints and it can be expressed as where k * d i is defined in assumption 1, k o i are the output constraints of the output q i , and k b i are the error constraints. ey are shown in Figure 2.
For the next stability analysis, the error transformation variable z 1 is defined as where P 1 (e 1 ) is a symmetric diagonal matrix, defined as where p i are positive constants that we need to design. e 1 i are the tracking errors on i th robot joint and defined in (7). e time derivative of z 1 in (9) can be calculated as where P 2 (e 1 ) is a symmetric diagonal matrix, which is obtained by extracting common factors from the two rightmost items in (11) and can be expressed as Computational Intelligence and Neuroscience

Controller Design
According to the above conversion of errors, the original system with output constraints is transformed into an unconstrained system. By Lemma 1, we just need to design a controller to ensure the variable z 1 is bounded so that the system can track the desired trajectory and the output constraints are not violated. e control structure is shown in Figure 3. A terminal sliding mode variable is defined as where k 1 is a positive constant. a 2 � (p/q) is satisfied p < q and p and q are coprime positive odd numbers. sig a (·) � | · | a sgn(·), and sgn(·) denotes the signum function.
Differentiating (13), we can get Multiplying (14) by M 0 (q), one has where F(q, _ q, € q d , e 1 , _ e 1 ) � M€ q d + M n € e 1 + G(q) + C(q, _ q) _ q − C(q, _ q)r is the unknown dynamics. e nonlinear dynamics function F(q, _ q, € q d , e 1 , _ e 1 ) is continuous and thus it can be approximated by a FLS as where Θ is the optimal constant parameter vector. Φ(·) is the fuzzy basis function. Z � [q, _ q, € q d , e 1 , _ e 1 ] is the input vector. ε is the approximation error of the FLS, which satisfies ‖ε‖ ≤ ‖ε‖.  Figure 2: Error transformation. 4 Computational Intelligence and Neuroscience en, substituting (16) into (15), the open-loop error system can be obtained as e optimal parameter vector Θ cannot be obtained in practice. us, the estimation Θ replaces Θ in the process of designing the controller. us, the estimation of the nonlinear function can be expressed as e fuzzy system parameter Θ can be updated by the following adaptive law: where Γ is a positive gain matrix and σ denotes the forgetting factor.

Remark 1.
e adjustment of learning gain Γ needs to balance rapidity and stability. A large Γ will improve the adaptation speed, but will lead to high-frequency oscillations in the control response. Conversely, a small Γ will suppress high-frequency oscillations, but will reduce the adaptation speed. e forgetting factor is a positive constant, which is usually chosen as a small value. e role of forgetting factor is to improve the robustness to bounded disturbance and to accelerate the adaption speed.
A TSM-based controller is designed to obtain the convergence of system state. Based on (17) and subsequent stability analysis, the control law τ is designed as where k and β are positive constants that designed by designer. r 2 � (m/n) is satisfied m < n and m and n are coprime positive odd numbers. Substituting (20) into (17), the closed-loop tracking error system can be obtained as where Θ is the error between ideal value and estimated value.

Remark 2.
Contrary to conventional TSM control scheme, e.g., [46], the error transformation is used in the controller to prevent the contravention of output constraints. is error transformation technique changes the output constraints into error constraints. Consequently, the transient response is improved. Compared with barrier Lyapunov function, the advantage of error transformation is that the virtual variables are not designed.

Stability Analysis
Lemma 2 (see [48]). If a Lyapunov function V(x) is bounded and its derivative _ V(x) ≤ − λV(x) + C, where λ and C are positive constants, then the solution x is bounded.
Lemma 3 (see [43]). For a second-order system like (1), if there is a positive definite function V(x) and parameters λ 1 , λ 2 > 0, 0 < c < 1, v ≥ 0 satisfies the following inequality: then the system state can converge to the compact set Ω, defined by and the upper bound of convergence time T satisfies e main conclusions of this paper can be summarized as follows.

Theorem 1. Consider robotic dynamic system (1), with bounded assumptions and initial conditions; TSM-based adaptive fuzzy controller is given as (20), as well as adaptive law (19):
(1) e closed-loop system is ultimately uniformly bounded and the output constraints are not violated (2) e tracking error e 1 converges to neighborhood near the zero point in finite time

Proof
(1) A positive definite Lyapunov function is chosen as e time derivative of (25) is Computational Intelligence and Neuroscience where (19) and (21) are used. According to average value inequality, we can get Substituting (27) and (28) into (26), we can obtain where ρ and C are positive constants defined as To ensure that ρ > 0, gains k are selected to satisfy According to Lemma 2, it can be concluded that r and Θ are bounded. From expression (13), we can infer thatz 1 is bounded. Further, based on Lemma 1, it can be concluded that the error of the system is bounded and the output constrains are not violated.
(2) A positive definite Lyapunov function is chosen as Differentiating (32), we can get where ρ 1 , ρ 2 , and c are positive constants defined as Based on Lemma 3, auxiliary variable r can converge to the region Ω r defined as where Y is defined as And the upper bound of convergence time is as follows: Once sliding mode variable reaches the sliding surface r � 0, (12) can be expressed as Another positive Lyapunov function is designed as After derivative (39), one has Substituting (38) into (40), we can obtain where κ 1 � λ min P 1 (e 1 ) is a positive constant. According to Lemma 3, the upper bound of convergence time of error variable e 1 is as follows: Based on (37) and (42), position tracking error converges to neighborhood near the zero point in finite time and convergence time T satisfies All the proof has been completed.
Mode uncertainties M n , C n , G n are set as M n � 0.01M 0 , C n � 0.02C 0 , G n � 0.01G 0 . e initial states q 1 , q 2 , _ q 1 , _ q 2 are set as q 1 � q 2 � 0.005 and _ q 1 � _ q 2 � 0. e control goal is to make the output q track the target trajectory q 1d � q 2d � 0.3 sin(t). e output constraints are set as k o1 � k o2 � 0.305.
To verify the validity of the proposed control scheme, there are two controllers that are used as comparison in the following: (1) AFTSM: this is the controller proposed in this paper. e parameters of TSM controller are given as k � [20; 20], k 1 � [5; 5], β � [5; 5], α 2 � (5/7), r 2 � (7/11). e parameters of error transformation are imposed as p 1 � p 2 � 1. For fuzzy approximator, the initial values of free parameter are all set as 3. e fuzzy learning gain parameters Γ � [10,10], and the adaptive parameter σ should be set as a small value [0.01, 0.01], because a large value will suppress the adaptive speed.
Remark 3. Sliding mode parameter 0 < a 2 < 1 in (13) will lead to singular problem. So, in the simulation process, use subsection function φ(e) instead of original sig a 2 e. e subsection function φ(e) is designed as φ(e) � |e| a 2 sgn(e), s � 0 or s ≠ 0, |e| > χ, where χ is a sufficiently small and bounded positive constant. a 2 � (p/q) is satisfied p < q and p and q are coprime positive odd numbers. l 1 � (2 − a 2 )χ a 2 − 1 and l 2 � (a 2 − 1)χ a 2 − 1 . e simulation results are shown in Figures 4-12. Figure 4 indicates that the above two control schemes all can track desired trajectory q d . But it can be clearly seen that the AFTSM with error transformation gives smaller error and better tracking performance. Figure 5 indicates that the tracking errors of proposed controller and TSM all can converge to the neighborhood near the balanced point in finite time. Compared with AFTSM, the convergence rate of TSM is slower than AFTSM, and the transient performances are inferior to AFTSM. Moreover, the output constraints are not limited. e FLS approximation error is shown in Figure 6. It can be seen from the picture that the nonlinear function is well approximated by fuzzy logic system. e norms of fuzzy adaptive weights are shown in Figure 7, from which we can get that the fuzzy weights are bounded. Figure 8 gives the tracking errors under different initial conditions. From the figure, it can be seen that the convergence time is different for different initial state q. e absolute value of the initial state q is smaller; the convergence speed is faster. e discontinuity of sign function sgn(·) can cause system chattering. In order to reduce the chattering of the system, the hyperbolic tangent function ϖ(s, ρ) � ((e ρs − 1)/(e ρs + 1)) is used instead of the sign function. By choosing appropriate parameter ρ, the chattering phenomenon and the tracking performance of the system can be balanced. Here, choose ρ as 2. Comparing Figure 9 with Figure 10, it  Computational Intelligence and Neuroscience can be seen that the hyperbolic tangent function can reduce chattering. To verify the robustness of the system to different disturbances, we added three disturbance comparison groups in the simulation. e three groups are set as d1 � [tan(t) + 0.7; tan(t) + 0.7], d2 � [0.4 + 2 sin(t)cos(t); e results are shown in Figure 11; from the picture, one can find that the system still maintains good tracking performance in response to different disturbances. Figure 12 is the     Computational Intelligence and Neuroscience position tracking of step function. e selection of the initial state of the system should ensure that the initial error is satisfied |e 1 | < k b . It can be seen from the figure that AFTSM still has a good tracking effect for the step response. Computational Intelligence and Neuroscience

Conclusions
In this paper, we developed a TSM-based fuzzy adaptive control scheme for robotic manipulators with output constraints and unknown disturbances. An error transformation is used to solve the problems of output constraints. e transient response of the system is improved simultaneously. Fast terminal sliding mode can improve convergence speed and reduce chattering. erefore, the errors converge to the neighborhood near the balanced point in a very short time.
To verify the effectiveness of the proposed scheme, two control schemes are used as a contrast in simulation. e simulation results show that the proposed control method possessed enhanced robustness and better tracking performance.

Data Availability
e experiment data used to support this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.