Adaptive Sliding Mode Control for a Robotic Manipulator with Unknown Friction and Unknown Control Direction

: This paper is aimed at addressing the tracking control issue for an n-DOF manipulator regardless of unknown friction and unknown control direction. In order to handle the above issues, an adaptive sliding mode control (ASMC) is developed with a Nussbaum function. The sliding mode control (SMC) in the proposed control guarantees the tracking problem and fast responses for the manipulator. Additionally, there are adaptive laws for the robust gain in the SMC to deal with the unknown external disturbance and reduce the chattering effect in the system. In practice, the mistakes in the connection between actuators and drivers, named unknown control direction, cause serious damage to the manipulator. To overcome this issue, the Nussbaum function is multiplied by the ASMC law. A Lyapunov approach is investigated to analyze the stability and robustness of the whole system. Finally, several simulations are implemented on a 3-DOF manipulator and their results are compared with those of the existing controllers to validate the advantages of the proposed method. novel adaptive SMC for an n-degree of freedom (DOF) robotic manipulator regardless of the existence of the unknown friction and unknown control direction. The proposed control is designed based on the SMC, adaptive switching gain laws, and Nussbaum function. The adaptive switching gain laws are investigated to regulate the robust gain of the SMC online. This approach helps in not only reducing the chattering effect but also deal with the time-varying external disturbance in the system. Moreover, a Nussbaum function is integrated into the adaptive SMC to manage the wrong control connection.


Introduction
For the past few decades, manipulators have been widely applied in many areas, such as drilling [1], deburring [2], and object grasping [3,4]. Due to large intrinsic nonlinearities, modeling errors, high couplings, and substantial parametric uncertainties in robot dynamics, control design for the manipulator has continued to be an exciting task for researchers. In order to obtain reasonable control performance, several robust advanced control methods have been developed, such as adaptive control, backstepping control [5,6], sliding mode control [7][8][9][10], and neural control [6,7].
Sliding mode control is well known as a robust control for nonlinear systems to deal with uncertainties [11]. The principle of SMC is based on discontinuous control to force the control system's error state variable toward zero. Therefore, this method has been developed in many application fields [12]. However, the challenge of this method is the chattering effect which is stimulated in situations of large control gain. This phenomenon can excite high-frequency dynamics and cause instability in the controlled system [13]. In order to overcome this issue, some methods, such as boundary layer methods [13][14][15] and disturbance approximators [16][17][18], have been integrated into SMC. In [13][14][15], the sign function in SMC was swapped with the sigmoid function, saturation function, and fuzzy logic system (FLS). Since these methods operate as low-pass filters, the chattering reduction and robustness should be traded off in these situations. Disturbance approximators [16][17][18] were used to estimate the disturbance and uncertainties and indirectly decrease the magnitude of the switching gain control and chattering phenomenon. In other approaches, switching gain adaptive laws [11,19] have been applied to SMC to adjust the switching gain regarding the uncertainties and disturbances without knowledge of them. In recent years, the unknown control direction [20][21][22], which is the wrong connection in the actuator, has been interesting to many researchers. The Nussbaum gain technique is well known as a control gain estimator for handling the unknown control directions and it was first presented in 1983 by Nussbaum in Systems and Control Letters. In [23], a fault-tolerant control conducted based on feedback linearization is combined with a Nussbaum gain function and an online parameter estimator for a hypersonic vehicle. In [24], a robust adaptive and fault-tolerant control scheme was developed from a novel PID-based faulttolerant controller with a Nussbaum-type function for a wind turbine. In [25], a command filter-based adaptive tracking controller was designed based on FLS, a command filter, and Nussbaum functions for a class of nonlinear systems with unknown control directions. In [26], Wang et al. developed an adaptive consensus tracking control based on some Nussbaum functions to manage the unknown control directions and the time-varying actuator faults simultaneously. In [27], Liu Y., etc. provided an adaptive fuzzy prescribed performance tracking control for a nonlinear switched stochastic system with unknown control directions. In this study, the adaptive controller also used a Nussbaum-type function to handle the control direction problem. From this literature, there has not been any study integrating the unknown control direction issue into the SMC design for a manipulator. Therefore, this is one of the motivations for our study.
This paper presents a novel adaptive SMC for an n-degree of freedom (DOF) robotic manipulator regardless of the existence of the unknown friction and unknown control direction. The proposed control is designed based on the SMC, adaptive switching gain laws, and Nussbaum function. The adaptive switching gain laws are investigated to regulate the robust gain of the SMC online. This approach helps in not only reducing the chattering effect but also deal with the time-varying external disturbance in the system. Moreover, a Nussbaum function is integrated into the adaptive SMC to manage the wrong control connection. Additionally, the stability and robustness of the whole system with the proposed control are analyzed by a Lyapunov theorem. Finally, some simulations are implemented on a 3-DOF manipulator and their results are compared with those of previous methods to demonstrate the superiority of the proposed control.
The rest of the paper is as follows: In Section 2, robotic dynamics and the preliminary are exhibited. In Section 3, the design procedures of the ASMC and the proposed control for the manipulator are presented and analyzed. Several simulations are presented in Section 4. Finally, several conclusions and future works are discussed in Section 5.

Manipulator Dynamics Description
The n-DOF manipulator dynamics are presented by: θ ∈ R n×1 , respectively, presents angular position, angular velocity, and angular acceleration vectors of each joint, M(θ) ∈ R n×n is the symmetric and positive definite matrix, C(θ, . θ) ∈ R n×n is the Coriolis and centrifugal matrix, G(θ) ∈ R n×1 is the gravity vector, τ derives the torque vector, B ∈ R n×n presents the unknown control direction which is a diagonal matrix, θ is a skew-symmetric matrix, defined as θ X = 0, and d(t) expresses the disturbance.
When we define x 1 = θ ∈ R n and x 2 ∈ . θ ∈ R n , (1) can be rewritten as follows: where u = τ expresses the control input vector. Assumption 1. The joint trajectoriesx 1d ∈ R n×n , x 2d ∈ R n×n , and .

Assumption 2.
We suppose that the external disturbance,d(t), is bounded and the inequality d(t) ≤ δ holds.
Control objective: Provide an advanced control for a manipulator under the presence of unknown friction and unknown control direction to not only guarantee the tracking requirements but also reduce the chattering effect in the control signal.

Nussbaum Function
A function N(ζ) can be called a Nussbaum-like function if it satisfies the following properties [28]: In this study, the Nussbaum function N(ζ) = e ζ 2 cos π 2 ζ is considered.
Lemma 1 ([29,30]). Let V(t) and ζ i (t) be smooth functions defined on 0, t f with V(t) > 0, for any t ∈ 0, t f , if the following inequality is satisfied: where g i is a non-zero constant and c 0 expresses some suitable constant, then V(t) ζ i (t) and t 0 . ζ i dτ must be bounded on 0, t f .

Adaptive Sliding Mode Control
Remark 1. This section presents an ASMC for the robotic manipulator under the existence of disturbance. The unknown control direction does not happen in this case. Therefore, B = I n×n .
e = x 1 − x 1d is the trajectory tracking error and x id presents the desired trajectory. A sliding mode surface is selected as follows: where λ = diag(λ 1 , λ 2 , . . . , λ n ) ∈ R n×n , (i = 1, 2) are positive definite matrices. The time derivative of the sliding surface is computed as Replacing (2) into (7), it is rewritten as follows: Based on assumption 2 and the sliding mode design procedure, an SMC can be designed as u = u eq + u r (9) where ..
is an equivalent control with k = diag([k 1 , . . . , k n ]) ∈ R n×n , and is used to ensure the stability of the system with the existence of the uncertainties, η = diag([η 1 , . . . , η n ]) ∈ R n×n expresses a diagonal positive matrix which is chosen for the condition η i ≥ |δ i |. The function is sign(x) = [sign(x 1 ), . . . , sign(x n )] T ∈ R n×1 . In practice, the external disturbance usually changes with respect to time, and the robust gains can cause the chattering effect when the robust gains are significantly larger than the external disturbance. In order to overcome this disadvantage, fast adaptive laws are developed to adjust the robust gain online with respect to the external disturbance. The robust control (11) is replaced by the equation below: The adaptive laws are selected as follows: where γ(t) = sign(|s i | − ε 1 ), κ ji (j = 1, 2; i = 1, . . . , n) are positive constants, ε 1 are predefined error boundaries, ε 1 = 10ε 2 ≥ 0. These adaptive robust gain laws do not need knowledge of the upper boundary of the external disturbance. The adaptive robust gains will rapidly grow and drive the sliding surface s i (i = 1, . . . , n) to the desired areas that are smaller than ε 1i . Otherwise, when the sliding variable stays in these regions, the gains will gradually reduce. From the property of the adaptive robust gain laws, the chattering effect is significantly reduced under the existence of the time-varying external disturbance. Theorem 1. When we consider the external disturbance in the robot manipulator with the known control direction described in (2), the sliding mode surface presented in (6), and the controller defined in (9), then the sliding variables,s i , are bounded. Additionally, the chattering effect is reduced significantly.

of 14
By applying the control laws (9) and skew-matrix property in (15), the result is presented as follows: .
Now, we take into account two adaptive cases: s ∞ ≥ ε 1 and s ∞ < ε 1 . In the first case, s ∞ ≥ ε 1 , the differential Lyapunov function is presented as follows: .
This result shows that V 1 is decreasing and bounded since 0 It means that the sliding variable s i reaches the small region of the sliding surface, i.e., |s i | ≤ ε 1 .
In the other cases, s ∞ ≤ ε 1 , it means that all sliding variables s i approach the regions |s i | ≤ ε 1 , and they may move in or leave the regions because . V 1 is not guaranteed to be semi-negative in the vicinity of the sliding manifold. If any sliding variable s i moves out of the region |s i | ≤ ε 1 , then . V 1 will become negative again. This result will force the variable to go back toward the sliding surfaces.
When all the sliding variables, s i , stay in the region |s i | ≤ ε 1 , the upper bound of the sliding variable is computed as follows: (18) is bounded, we have Based on (18) and (19), we obtain This means that Equation (21) means that sliding variables, s i , are ultimately uniform bounded. The upper boundary in (21) can be adjusted by the parameters κ 1 , κ 2 , ε 1 .

Proposed Control
The schematic of the proposed control presented in Figure 1 is developed from the adaptive SMC. Therefore, the proposed control can deal with the external disturbance and chattering effect. Moreover, a Nussbaum function is added in the adaptive SMC to overcome the unknown control direction in the robot system. upper boundary in (21) can be adjusted by the parameters 1 κ , 2 κ , 1 ε .□

Proposed Control
The schematic of the proposed control presented in Figure 1 is developed from the adaptive SMC. Therefore, the proposed control can deal with the external disturbance and chattering effect. Moreover, a Nussbaum function is added in the adaptive SMC to overcome the unknown control direction in the robot system.

Remark 2.
The proposed control is developed to overcome the unknown control direction which means that the signal of the control input gains can be nonpositive.
The proposed control is chosen as follows: Theorem 2. When we consider the external disturbance in the robot manipulator with unknown control direction described in (2), the SM surface presented in (6), the controller defined in (22), and the adaptive robust gain laws provided in (13), then the sliding variables, i s , are bounded and the unknown control direction is overcome. Consequently, the closed-loop system is proven to be semi-globally uniformly ultimately bounded (SGUUB).

Proof of stability
The stability of the whole system is proven by using the Lyapunov function (14), and the analysis is implemented as follows: The time derivative of the Lyapunov function (14) is presented as follows: By replacing the proposed control (22) into (24), the result is yielded as follows:

Remark 2.
The proposed control is developed to overcome the unknown control direction which means that the signal of the control input gains can be nonpositive.
The proposed control is chosen as follows: where u 0 = M(x 1 ) ..
Theorem 2. When we consider the external disturbance in the robot manipulator with unknown control direction described in (2), the SM surface presented in (6), the controller defined in (22), and the adaptive robust gain laws provided in (13), then the sliding variables,s i , are bounded and the unknown control direction is overcome. Consequently, the closed-loop system is proven to be semi-globally uniformly ultimately bounded (SGUUB).

Proof of Stability.
The stability of the whole system is proven by using the Lyapunov function (14), and the analysis is implemented as follows: The time derivative of the Lyapunov function (14) is presented as follows: .

Simulation Descriptions
In this section, two simulations on a 3-DOF manipulator are implemented to show the efficiencies of the proposed method. In the first simulation, the controllers are applied on the manipulator under the presence of the friction model and known control direction. In the second simulation, besides the friction model, the unknown control direction is taken into account in the manipulator dynamics. The simulation environment is MATLAB 2020a with a sampling time of 10 −3 s. The 3-DOF manipulator dynamics are mentioned in [5]. Their parameters are presented in Table 1.  The friction model in the manipulator dynamics consists of the viscous and Coulomb frictions, presented as follows: where b = 0.05I 3×3 (Nms/rad) and c = 0.05I 3×3 . The trajectory reference in the Cartesian coordination is presented as x d = 0.4 + 0.15 cos(0.2π)(m), y d = 0(m), z d = −0.15 cos(0.2π + π/2)(m), and the rotary angle around the z-axis is zero.

Simulation Comparisons
In order to demonstrate the advantages of the proposed control, the results of the proposed control are compared with those of the sliding mode control (SMC) and adaptive SMC (ASMC). The SMC is presented in (6), (9), (10) and (11). The ASMC is computed by (6), (9), (10), (12) and (13).

Remark 1.
The parameters of the three controllers are presented in Table 2. As the SMC is designed based on the manipulator dynamics, the ASMC is developed from the SMC and the proposed control inherits from the ASMC, so the parameters of the ASMC inherit from the SMC and the parameters of the proposed control inherit from the ASMC to maintain the fairness in comparisons. Table 2. Coefficients of the SMC, ASMC, and the proposed control.

Remark 2.
The data are multiplied with a constant to convert from radian units to degree units before they are plotted in the figures of Section 4.3.

Remark 3.
In order to improve the ability of the Nussbaum functions in control direction detection, the Nussbaum function in the simulation is modified as follows:

Simulation Results
In the first simulation case, the results in Figure 2 show the output performances at three joints of the SMC (blue line), the ASMC (black line), and the proposed control (red line), tracked to the reference signals. Figure 3 presents the error responses of the SMC with a blue line, the ASMC with a black line, and the proposed control with a red line. Figure 4 presents the control signal performance of SMC in Figure 4a, ASMC in Figure 4b, and proposed control in Figure 4c. These results show the effectiveness of the adaptive laws for robust gain in chattering suppression in the ASMC and the proposed controller.
before they are plotted in the figures of Section 4.3.

Simulation Results
In the first simulation case, the results in Figure 2 show the output performances at three joints of the SMC (blue line), the ASMC (black line), and the proposed control (red line), tracked to the reference signals. Figure 3 presents the error responses of the SMC with a blue line, the ASMC with a black line, and the proposed control with a red line. Figure 4 presents the control signal performance of SMC in Figure 4a, ASMC in Figure 4b, and proposed control in Figure 4c. These results show the effectiveness of the adaptive laws for robust gain in chattering suppression in the ASMC and the proposed controller.     Figure 5 shows the output responses of the 3-DOF manipulator with the proposed control with the wrong connection in actuator 1. These results show good tracking performances. Figure 6 presents the control signals of the proposed control at each joint of the manipulator. Comparing to Figure 4c, the control signal of joint 1 in Figure 6 has a different direction, which exhibits the wrong connection in actuator 1. Figure 7 plots the Nussbaum function at each joint to help the controlled system overcome the unknown control direction. The response of the Nussbaum function in Figure 7a changed from +1 to −1 to compensate for the connection issue in actuator 1.  . Figure 5 shows the output responses of the 3-DOF manipulator with the proposed control with the wrong connection in actuator 1. These results show good tracking performances. Figure 6 presents the control signals of the proposed control at each joint of the manipulator. Comparing to Figure 4c, the control signal of joint 1 in Figure 6 has a different direction, which exhibits the wrong connection in actuator 1. Figure 7 plots the Nussbaum function at each joint to help the controlled system overcome the unknown control direction. The response of the Nussbaum function in Figure 7a changed from +1 to −1 to compensate for the connection issue in actuator 1.     Figure 8 is the control responses   Figure 4c. The effectiveness is shown in Figure 9, which presents Nussbaum function responses at each joint with the wrong connection in actuator 1 and 2.
The results in Figure 9a,b turn from +1 into −1 to overcome the wrong connections.
In the final subcase, the wrong connection at all three actuators, B = diag −1 −1 −1 T , is considered. Figure 10 presents the control signals of the proposed controllers. The sign of the control responses of the proposed control in three actuators is different compared to the control responses in the normal case, as shown in Figure 4c. Additionally, Figure 11 shows the Nussbaum function responses which turn into −1 to help the proposed control to deal with the unknown control direction.
of the proposed controller. The results show that the control signals in actuator 1 and 2 are different directions when compared to the control signals in actuator 1 and 2 with the normal case in Figure 4c. The effectiveness is shown in Figure 9, which presents Nussbaum function responses at each joint with the wrong connection in actuator 1 and 2. The results in Figure 9Error! Reference source not found.a,b turn from +1 into −1 to overcome the wrong connections.
In the final subcase, the wrong connection at all three actuators, , is considered. Figure 10 presents the control signals of the proposed controllers. The sign of the control responses of the proposed control in three actuators is different compared to the control responses in the normal case, as shown in Figure  4c. Additionally, Figure 11 shows the Nussbaum function responses which turn into −1 to help the proposed control to deal with the unknown control direction. of the proposed controller. The results show that the control signals in actuator 1 and 2 are different directions when compared to the control signals in actuator 1 and 2 with the normal case in Figure 4c. The effectiveness is shown in Figure 9, which presents Nussbaum function responses at each joint with the wrong connection in actuator 1 and 2. The results in Figure 9Error! Reference source not found.a,b turn from +1 into −1 to overcome the wrong connections. In the final subcase, the wrong connection at all three actuators, [ ] ( ) , is considered. Figure 10 presents the control signals of the proposed controllers. The sign of the control responses of the proposed control in three actuators is different compared to the control responses in the normal case, as shown in Figure  4c. Additionally, Figure 11 shows the Nussbaum function responses which turn into −1 to help the proposed control to deal with the unknown control direction.

Conclusions
This paper was aimed at addressing the tracking control issue for an n-DOF manipulator with the existence of unknown friction and unknown control direction. To overcome these issues, an adaptive sliding mode control (ASMC) is developed with a Nussbaum function. The SMC in the proposed control ensures the tracking problem and fast responses for the manipulator. Additionally, there are adaptive laws for the robust gain in the SMC to deal with the unknown friction and suppress the chattering effect in the system. In practice, the mistakes in the connection between actuators and drivers, named unknown control direction, cause serious damage to the manipulator. To manage this issue, the Nussbaum function is multiplied by the ASMC law. A Lyapunov approach is investigated to analyze the stability and robustness of the whole system in theory. Finally, several simulations are implemented on a 3-DOF manipulator and their results are compared with those of the existing controllers to prove the advantages of the proposed method.

Conclusions
This paper was aimed at addressing the tracking control issue for an n-DOF manipulator with the existence of unknown friction and unknown control direction. To overcome these issues, an adaptive sliding mode control (ASMC) is developed with a Nussbaum function. The SMC in the proposed control ensures the tracking problem and fast responses for the manipulator. Additionally, there are adaptive laws for the robust gain in the SMC to deal with the unknown friction and suppress the chattering effect in the system. In practice, the mistakes in the connection between actuators and drivers, named unknown control direction, cause serious damage to the manipulator. To manage this issue, the Nussbaum function is multiplied by the ASMC law. A Lyapunov approach is investigated to analyze the stability and robustness of the whole system in theory. Finally, several simulations are implemented on a 3-DOF manipulator and their results are compared with those of the existing controllers to prove the advantages of the proposed method.
For future works, some experiments will be carried out to demonstrate the advantages of the proposed methods. The results in the paper can be used to conduct advanced fault-tolerant controllers for robotic manipulators.