# Adaptive Fuzzy Sliding Mode and Robust Tracking Control for Manipulators with Uncertain Dynamics

Authors: Sanxiu Wang
Journal: Complexity
 (2020)

---

## Abstract

In response to the issue of the trajectory tracking control problem of manipulators with uncertain parameters and external disturbance, an adaptive fuzzy sliding mode robust control algorithm is proposed. Sliding mode control (SMC) is adopted to perform robotic manipulator trajectory tracking control. Then, a fuzzy logic system is used for adaptive adjustment of switching gain of the SMC and to reduce the buffeting problem. Next, compensation is made by using the robust controller in consideration of the impacts of unmodeled dynamics and external disturbance. The simulation experiment on a two axes robotic manipulator shows that, with the proposed control method, the sliding mode control input signal is kept smooth, and the manipulator has high trajectory tracking precision.


---

## Body

## 1. Introduction

The multijoint robotic manipulator system is strongly coupled, time-variant, and nonlinear. In the recent years, the high-precision control of a manipulator has attracted wide attention from the academia and the industrial circle. A series of achievements have been made in the research on the trajectory tracking of the manipulator’s joint space. Control algorithms such as sliding mode control [1–3], adaptive control [4–6], robust control [7, 8], and iterative learning control [9] have been proposed. Among them, the sliding mode control algorithm is simple and highly robust to parameter changes and disturbance, making it especially suitable for high-precision tracking control of nonlinear systems such as a robotic manipulator. However, high-frequency buffeting exists in SMC, and the vibration degree is affected by the switching gain. Normally, in order to ensure system stability, ample switching gain is selected, which aggravates the buffeting in sliding mode control. Such buffeting may cause the existence of unmodeled high-frequency components in the system or even cause system instability.To overcome the chattering problem of sliding mode control, various methods have been proposed in the literature, among which the well-known method is to apply a saturation function to the SMC control gain when the sliding surface is located in the boundary of the sliding hyperplane [10, 11]. This method is simple; however, it cannot guarantee the output convergence. That is to say, there is a nonzero steady-state error in the output. Another common method is to use a disturbance observer to estimate and compensate the external disturbance and uncertainty, so as to solve the chattering problem of sliding mode control [12, 13]. However, it has high accuracy only for constant or slow changing disturbances. Another way to solve the chattering problem of sliding mode control is to apply fuzzy logic control. In the compact set, fuzzy control can approach any continuous function due to its characteristic of universal approximation and does not depend on the system model [14, 15]. So, it has gained wide applications in robot adaptive control. Thus, in this paper, a new adaptive fuzzy SMC algorithm is proposed for robotic manipulators. The adoption of the fuzzy logic system in adjusting the switching gain of SMC in an adaptive way can effectively eliminate the buffeting of the sliding mode control algorithm. At the same time, considering that uncertain parameters, unmodeled dynamics, and external disturbances will reduce the control performance of the system [16–18], a robust controller is used to compensate these uncertainties and achieve accurate tracking of the manipulator.Additionally, most industrial robotic manipulators complete tasks within the task space through terminal actuators, and their expected trajectory is also described using the task space. So, to implement joint space control, it is necessary to convert the task space coordinate of the robotic manipulator into the joint space. Then, through high-performance joint space tracking control algorithm, the high precision tracking control of the manipulator is achieved.The organization of the paper is as follows. The model descriptions are given in Section2, including conversion between the task space coordinate and joint space angle position and manipulator dynamics model. The design of the control algorithm is detailed in Section 3, and an adaptive fuzzy sliding mode controller and robust controller are constructed. Simulation results are presented in Section 4. Finally, conclusions constitute Section 5.


## 2. Model Descriptions

Trajectory tracking in the task space refers to the tracking of the the desired trajectory by the end effector. However, as the actuators of most manipulators are installed on the manipulator body and their joints, the tracking of the trajectory of the manipulator within the joint space is to track the given expected joint angles of the manipulators one by one. Thus, in order to achieve control in joint space, the trajectory of the task space should be firstly converted into that of joint space.


### 2.1. Conversion between the Task Space Coordinate and Joint Space Angle

The movement coordinate at the terminal of the robotic manipulator in the task spacex,y is converted into the two-joint angle position q1,q2 [19].According to Figure1, the following formulas can be obtained:(1)x=l1cosq1+l2cosq1+q2,y=l1sinq1+l2sinq1+q2.Figure 1
Two-link robotic manipulator.Adding the square ofx and that of y, we get(2)x2+y2=l12+l22+2l1l2cosq2.Thus, the following formula can be obtained:(3)q2=cos−1x2+y2−l12−l222l1l2.Takep1=arctany/xx≥0 or p1=π+arctany/xx<0, p2=arccosx2+y2+l12−l22/2l1x2+y2, then(4)q1=p1−p2,q2>0,p1+p2,q2≤0.


### 2.2. Manipulator Dynamics Model

A robotic manipulator is a kind of complex MIMO control system, with the characteristics of being nonlinear and time-varying. Its dynamic equation is described as follows [20]:(5)Mqq¨+Cq,q˙q˙+Gq=τ+d.Here,q means the joint position and q˙, q¨ mean joint velocities and accelerations, respectively; inertia matrix Mq∈Rn×n, which is symmetric positive definite; Cq,q˙∈Rn×n means the centrifugal and Coriolis force matrix; and Gq∈Rn×1 means the gravity matrix. d∈Rn means the external disturbance and τ∈Rn means the control torque vector or control input of each joint.The manipulator dynamics model has the following dynamics characteristics [20, 21]:Characteristic 1: the symmetric positive definite torqueMq is consistent and bounded for all values of q. For existing positive numbers κm and κM, that satisfies the following formula:(6)0<κmI≤Mq<κMI.Characteristic 2:∀υ∈Rn, and the skew symmetric matrix Mq−2Cq,q˙ meets the following relationships:(7)υTMq−2Cq,q˙υ=0.Characteristic 3: for allq∈Rn, the Gq is always bounded.


## 2.1. Conversion between the Task Space Coordinate and Joint Space Angle

The movement coordinate at the terminal of the robotic manipulator in the task spacex,y is converted into the two-joint angle position q1,q2 [19].According to Figure1, the following formulas can be obtained:(1)x=l1cosq1+l2cosq1+q2,y=l1sinq1+l2sinq1+q2.Figure 1
Two-link robotic manipulator.Adding the square ofx and that of y, we get(2)x2+y2=l12+l22+2l1l2cosq2.Thus, the following formula can be obtained:(3)q2=cos−1x2+y2−l12−l222l1l2.Takep1=arctany/xx≥0 or p1=π+arctany/xx<0, p2=arccosx2+y2+l12−l22/2l1x2+y2, then(4)q1=p1−p2,q2>0,p1+p2,q2≤0.


## 2.2. Manipulator Dynamics Model

A robotic manipulator is a kind of complex MIMO control system, with the characteristics of being nonlinear and time-varying. Its dynamic equation is described as follows [20]:(5)Mqq¨+Cq,q˙q˙+Gq=τ+d.Here,q means the joint position and q˙, q¨ mean joint velocities and accelerations, respectively; inertia matrix Mq∈Rn×n, which is symmetric positive definite; Cq,q˙∈Rn×n means the centrifugal and Coriolis force matrix; and Gq∈Rn×1 means the gravity matrix. d∈Rn means the external disturbance and τ∈Rn means the control torque vector or control input of each joint.The manipulator dynamics model has the following dynamics characteristics [20, 21]:Characteristic 1: the symmetric positive definite torqueMq is consistent and bounded for all values of q. For existing positive numbers κm and κM, that satisfies the following formula:(6)0<κmI≤Mq<κMI.Characteristic 2:∀υ∈Rn, and the skew symmetric matrix Mq−2Cq,q˙ meets the following relationships:(7)υTMq−2Cq,q˙υ=0.Characteristic 3: for allq∈Rn, the Gq is always bounded.


## 3. Control Algorithm Design

In this part, a control algorithm containing SMC, adaptive fuzzy control, and robust control is designed for robot trajectory tracking. The control structure of the proposed method is shown in Figure2.Figure 2
Diagram of the proposed sliding mode robust control system.


### 3.1. Design and Analysis of the Self-Adaptive Fuzzy SMC

In the actual robot system, parameter perturbation is inevitable. When the parameters of the object cannot be obtained accurately, we useM^q to estimate the inertia matrix Mq; C^q,q˙ is used to estimate the centrifugal and Coriolis force matrix Cq,q˙; and G^q is used to estimate the gravity matrix Gq.Let(8)Mq=M^q+ΔMq,Cq,q˙=C^q,q˙+ΔCq,q˙,Gq=G^q+ΔGq,where ΔMq means estimation error of the inertia matrix, ΔCq,q˙ means estimation error of the Coriolis force matrix, ΔGq means estimation error of the gravity matrix.Then, define the sliding function as follows:(9)s=e˙+Λe.Here, tracking errore=qd−q. qd means expected trajectory of the joint; q means actual tracking trajectory; and Λ means a diagonal matrix with the positive definite constant.Choosing the auxiliary signalq˙r and q¨r is described as follows:(10)q˙r=q˙−s=q˙d−Λe,(11)q¨r=q¨−s˙=q¨d−Λe˙,where q˙d and q¨d mean expected joint speed and accelerations, respectively.According to the theory of sliding mode control, the controller is designed as follows:(12)τ0=M^qq¨r+C^q,q˙q˙r+G^q−As−Ksgns.Here,K and A are positive definite matrixes.By combining formulas (10) and (11) and substituting formula (12) into the robot dynamic equation (5), we obtain the following relationship:(13)Mqq¨+Cq,q˙q˙+Gq=Mqq¨r+s˙+Cq,q˙q˙r+s+Gq,=M^qq¨r+C^q,q˙q˙r+G^q−As−Ksgns+d.Based on formula (8), the following formula can be obtained:(14)Mqs˙+Cq,q˙+As=ΔMqq¨r+ΔCq,q˙q˙r+ΔGq+d−Ksgns=Δf−Ksgns,where Δf=ΔMqq¨r+ΔCq,q˙q˙r+ΔGq+d means unmodeled terms and disturbance terms.We choosing the Lyapunov function as follows:(15)V=12sTMqs.Taking the derivative of the expression and substituting formula (7) into the result, we get(16)V˙=sTMqs˙+12sTM˙qs.Substituting formula (13) into the abovementioned expression, we get(17)V˙=sTMqs˙+12sTM˙qs=sT−Cq,q˙+As+Δf−Ksgns+Cq,q˙s,=sT−As+Δf−Ksgns=sTΔf−Ksgns−sTAs.Suppose thatΔf is bounded and satisfies the relationship Δf≤K; then,(18)V˙=sTΔf−Ksgns−sTAs≤−sTAs≤0.So, the system is stable.Although the sliding mode controller is simple and effective, buffeting constitutes the main problem to be solved in the sliding control law. Also, the switching gainK is the main reason for the buffeting problem. The larger the value of K is, the more obvious the buffeting will appear. K is used to compensate for the impact of external disturbance. For sufficient compensation, an enough large value of switching gain is required, which further aggravates the buffeting of the system.In order to solve the buffeting problem caused by the SMC with fixed gain, a self-adaptive fuzzy scheme is added to the conventional SMC. The fuzzy controller is used for adjustment of the switching gain in an adaptive manner so that the switching gain of SMC can be adjusted with time so as to improve the buffeting problem.Based on the product reasoning method and the central average antifuzzy controller, the fuzzy control system is designed for adaptive adjustment of switching gainK of the SMC. Let K=k1,…,ki,…,knT, where ki denotes the fuzzy system’s ith output.The output of the fuzzy system is described as follows:(19)yx=∑l=1my¯l∏i=1nμFilxi∑l=1m∏i=1nμFilixi=ξTxθ,where θ=y1,…,ymT means the parameter vector, ξx=ξ1x,…,ξmxT means the regression vector, and m means the number of fuzzy rules.Define(20)ξlx=∏i=1nμFilxi∑l=1m∏i=1nμFilxi.As can be seen from formula (18), in order to satisfy V˙≤0, let sTK≥0, s=s1,…,si,…,snT, and sTΔf−sTKsgns≤0. Then, si and ki should take the same positive and negative symbols, and si, ki shall change by following the identical trend.For the fuzzy system, we choosesi and switching gain ki as the input and output, whose value is described by using five variables. The fuzzy inference rule is shown as Table 1.Table 1
Fuzzy inference rule.
siPMPSZONSNMPM/NM: positive/negative mediumPS/NS: positive/negative smallZO: zerokiPMPSZONSNMThe membership function used to represent the fuzzy set is chosen as follows:(21)μFxi=exp−xi−ασ2.Theith output of the fuzzy system is expressed as follows:(22)ki=∑l=1my¯lμFlsi∑l=1mμFlsi=ξkiTsiθki.Takingki==ξkiTsiθki as the approximated value of Δfi and in view of the universal approximation theorem, there exists ωi>0 to satisfy the following:(23)Δfi−ξkiTsiθki≤ωi.The adaptive law is selected as follows:(24)θ˜˙ki=siξkisi.Then, based on the switching gain adjusted by the adaptive fuzzy control, the SMC is expressed as follows:(25)τ0=M^qq¨r+C^q,q˙q˙r+G^q−As−K^.


### 3.2. Adaptive Robust Controller Design

In this part, for unmodeled dynamics and external disturbancesd, a robust control item is designed to eliminate their effects.The robust controller is designed as follows:(26)τr=−β2βs+εs,where ε>0 means a tiny constant and β means the upper limit for disturbance and uncertainties, which satisfy the following:(27)Δf≤β=ρμ,where ρ=max1,e,e2 is a coefficient vector; μ is an uncertainty term of the system, and its value adopts the following adaptive algorithm for auto adjustment:(28)μ^˙=μ˜˙=−γρs,where γ means a matrix with a positive definite constant and meeting the following relationships: μ˜=μ^−μ, β˜=β^−β, and β^=ρμ^,β˜=ρμ˜.Thus, the adaptive robust controllerτr can be further described as follows:(29)τr=−ρμ^2ρμ^s+εs.In summary, the overall control scheme is as follows:(30)τ=τ0+τr.


## 3.1. Design and Analysis of the Self-Adaptive Fuzzy SMC

In the actual robot system, parameter perturbation is inevitable. When the parameters of the object cannot be obtained accurately, we useM^q to estimate the inertia matrix Mq; C^q,q˙ is used to estimate the centrifugal and Coriolis force matrix Cq,q˙; and G^q is used to estimate the gravity matrix Gq.Let(8)Mq=M^q+ΔMq,Cq,q˙=C^q,q˙+ΔCq,q˙,Gq=G^q+ΔGq,where ΔMq means estimation error of the inertia matrix, ΔCq,q˙ means estimation error of the Coriolis force matrix, ΔGq means estimation error of the gravity matrix.Then, define the sliding function as follows:(9)s=e˙+Λe.Here, tracking errore=qd−q. qd means expected trajectory of the joint; q means actual tracking trajectory; and Λ means a diagonal matrix with the positive definite constant.Choosing the auxiliary signalq˙r and q¨r is described as follows:(10)q˙r=q˙−s=q˙d−Λe,(11)q¨r=q¨−s˙=q¨d−Λe˙,where q˙d and q¨d mean expected joint speed and accelerations, respectively.According to the theory of sliding mode control, the controller is designed as follows:(12)τ0=M^qq¨r+C^q,q˙q˙r+G^q−As−Ksgns.Here,K and A are positive definite matrixes.By combining formulas (10) and (11) and substituting formula (12) into the robot dynamic equation (5), we obtain the following relationship:(13)Mqq¨+Cq,q˙q˙+Gq=Mqq¨r+s˙+Cq,q˙q˙r+s+Gq,=M^qq¨r+C^q,q˙q˙r+G^q−As−Ksgns+d.Based on formula (8), the following formula can be obtained:(14)Mqs˙+Cq,q˙+As=ΔMqq¨r+ΔCq,q˙q˙r+ΔGq+d−Ksgns=Δf−Ksgns,where Δf=ΔMqq¨r+ΔCq,q˙q˙r+ΔGq+d means unmodeled terms and disturbance terms.We choosing the Lyapunov function as follows:(15)V=12sTMqs.Taking the derivative of the expression and substituting formula (7) into the result, we get(16)V˙=sTMqs˙+12sTM˙qs.Substituting formula (13) into the abovementioned expression, we get(17)V˙=sTMqs˙+12sTM˙qs=sT−Cq,q˙+As+Δf−Ksgns+Cq,q˙s,=sT−As+Δf−Ksgns=sTΔf−Ksgns−sTAs.Suppose thatΔf is bounded and satisfies the relationship Δf≤K; then,(18)V˙=sTΔf−Ksgns−sTAs≤−sTAs≤0.So, the system is stable.Although the sliding mode controller is simple and effective, buffeting constitutes the main problem to be solved in the sliding control law. Also, the switching gainK is the main reason for the buffeting problem. The larger the value of K is, the more obvious the buffeting will appear. K is used to compensate for the impact of external disturbance. For sufficient compensation, an enough large value of switching gain is required, which further aggravates the buffeting of the system.In order to solve the buffeting problem caused by the SMC with fixed gain, a self-adaptive fuzzy scheme is added to the conventional SMC. The fuzzy controller is used for adjustment of the switching gain in an adaptive manner so that the switching gain of SMC can be adjusted with time so as to improve the buffeting problem.Based on the product reasoning method and the central average antifuzzy controller, the fuzzy control system is designed for adaptive adjustment of switching gainK of the SMC. Let K=k1,…,ki,…,knT, where ki denotes the fuzzy system’s ith output.The output of the fuzzy system is described as follows:(19)yx=∑l=1my¯l∏i=1nμFilxi∑l=1m∏i=1nμFilixi=ξTxθ,where θ=y1,…,ymT means the parameter vector, ξx=ξ1x,…,ξmxT means the regression vector, and m means the number of fuzzy rules.Define(20)ξlx=∏i=1nμFilxi∑l=1m∏i=1nμFilxi.As can be seen from formula (18), in order to satisfy V˙≤0, let sTK≥0, s=s1,…,si,…,snT, and sTΔf−sTKsgns≤0. Then, si and ki should take the same positive and negative symbols, and si, ki shall change by following the identical trend.For the fuzzy system, we choosesi and switching gain ki as the input and output, whose value is described by using five variables. The fuzzy inference rule is shown as Table 1.Table 1
Fuzzy inference rule.
siPMPSZONSNMPM/NM: positive/negative mediumPS/NS: positive/negative smallZO: zerokiPMPSZONSNMThe membership function used to represent the fuzzy set is chosen as follows:(21)μFxi=exp−xi−ασ2.Theith output of the fuzzy system is expressed as follows:(22)ki=∑l=1my¯lμFlsi∑l=1mμFlsi=ξkiTsiθki.Takingki==ξkiTsiθki as the approximated value of Δfi and in view of the universal approximation theorem, there exists ωi>0 to satisfy the following:(23)Δfi−ξkiTsiθki≤ωi.The adaptive law is selected as follows:(24)θ˜˙ki=siξkisi.Then, based on the switching gain adjusted by the adaptive fuzzy control, the SMC is expressed as follows:(25)τ0=M^qq¨r+C^q,q˙q˙r+G^q−As−K^.


## 3.2. Adaptive Robust Controller Design

In this part, for unmodeled dynamics and external disturbancesd, a robust control item is designed to eliminate their effects.The robust controller is designed as follows:(26)τr=−β2βs+εs,where ε>0 means a tiny constant and β means the upper limit for disturbance and uncertainties, which satisfy the following:(27)Δf≤β=ρμ,where ρ=max1,e,e2 is a coefficient vector; μ is an uncertainty term of the system, and its value adopts the following adaptive algorithm for auto adjustment:(28)μ^˙=μ˜˙=−γρs,where γ means a matrix with a positive definite constant and meeting the following relationships: μ˜=μ^−μ, β˜=β^−β, and β^=ρμ^,β˜=ρμ˜.Thus, the adaptive robust controllerτr can be further described as follows:(29)τr=−ρμ^2ρμ^s+εs.In summary, the overall control scheme is as follows:(30)τ=τ0+τr.


## 4. Simulation Analysis

For the sake of demonstrating the validity and superiority of the control algorithm designed in this paper, simulation analysis is carried on the two-link manipulator. The specific expression for its dynamic equation is as follows:(31)M11M12M21M22q¨+C11C12C210q˙+G1G2=τ+d,where M11=m1s12+m2l12+s22+2l1s2cosq2+I1+I2, M12=M21=m2s22+l1s2cosq2+I2, M22=m2s22+I2, C11=−2m2l1s2q˙2sinq2, C21=−C12=m2l1s2sinq2, and G1=2m2l1s2gcosq1+q2+m1s12+m2l12+m1l1s1−m1l12gcosq1, G2=2m2l1s2gcosq1+q2.The simulation parameters of the manipulator are shown in Table2.Table 2
Simulation parameters of the two-link manipulator.
m1/kg0.8s1/m0.125m2/kg0.8s2/m0.125l1/m0.25I1/kg⋅m20.05l2/m0.25I2/kg⋅m20.05g/m/s29.8Select the task space desired trajectoryxd=−0.25cosπtmmyd=0.2−0.2cosπ/2tmm. The initial position is xd0yd0=−0.250T. Select the functions dx=sinπt and dy=sin2πt for disturbance of both joints.For the sake of implementing the tracking control in the joint space, based on the content described in Section 2.1, the expected trajectory and the initial joint angle of the joint are obtained by the inverse solution.The sliding mode controller parameters are chosen asΛ=diag10,10,A=diag150,150. The robust controller parameters are γ=2andε=0.01. Select the fuzzy membership function as shown in Figure 3.Figure 3
Membership function.First, conduct simulation by adopting the traditional SMC based on the fixed gain and SMC based on adaptive fuzzy gain adjustment so as to reflect the effect of switching gain adjustment by using fuzzy adaptive control on the improvement of sliding mode control buffeting. The adaptive gain changes of the two joints are shown in Figure4.Figure 4
Adaptive gain variation of two joints.In order to better compare the effect of sliding mode adaptive gain and fixed gain, for fixed gain, we adopt three differentK values (K=2;K=15;K=100). The sliding mode control input signal chattering phenomenon of two joints with three different K values is shown in Figures 5 and 6. Figures 7 and 8 show the sliding mode control input signal with adaptive gain.Figure 5
Control input of link 1 (fixed gain).Figure 6
Control input of link 2 (fixed gain).Figure 7
Control input of link 1 (adaptive gain).Figure 8
Control input of link 2 (adaptive gain).From the figures, we can see that the SMC input signal with fixed gain has obvious chattering, and the larger the K, the more obvious the chattering, while adoption of SMC based on fuzzy adaptive gain adjustment can effectively improve the chattering phenomenon and keep the input signal smooth.The adaptive fuzzy sliding mode robust controller proposed in this paper is used for trajectory tracking of the two-joint manipulator. The simulation results are demonstrated in Figures9–14. Among them, Figure 9 shows the position tracking of both joints. Figure 10 displays the tracking error of both joints. Figure 11 shows the velocity tracking of both joints. Figure 12 displays the velocity tracking error of both joints. Figure 13 displays the tracking trajectory at the terminal of the task space for the robotic manipulator. Figure 14 displays the pose trajectory of the manipulator.Figure 9
Position tracking of two joints.Figure 10
Position error of two joints.Figure 11
Velocity tracking of two joints.Figure 12
Velocity error of two joints.Figure 13
Trajectory tracking in the task space.Figure 14
Pose trajectory.It can be seen from the simulation results that the proposed robotic manipulator control method enjoys high trajectory tracking precision. In addition to the initial stage when there is a minor tracking error, it basically ensures high-precision tracking with tracking error being zero. Simulation error values of two axes are shown in Table3.Table 3
Simulation error table.
AxisPosition error (mm)Velocity error (mm)x-axisMax0.08890.8656Mean0.00360.0312Rms0.01160.1146y-axisMax0.08893.9522Mean0.00360.1370Rms0.01160.5227


## 5. Conclusions

This article proposes an adaptive fuzzy sliding mode robust trajectory tracking control algorithm for the robotic manipulator with uncertain parameters and external disturbance. The algorithm combines SMC tracking controller, switched gain adaptive fuzzy controller, and robust control algorithms to compensate for modeling error and disturbance, weakens the buffeting of SMC, and ensures high precision of robot trajectory tracking. The simulation results carried on a two-link robotic manipulator demonstrate the validity and superiority of the proposed method.



---

*Source: 1492615-2020-07-25.xml*