Adaptive Fuzzy Backstepping Sliding Mode Control for a 3-DOF Hydraulic Manipulator with Nonlinear Disturbance Observer for Large Payload Variation

: The paper proposes an adaptive fuzzy position control for a 3-DOF hydraulic manipulator with large payload variation. The hydraulic manipulator uses electrohydraulic actuators as primary torque generators to enhance carrying payload of the manipulator. The proposed control combines backstepping sliding mode control, fuzzy logic system (FLS), and a nonlinear disturbance observer. The backstepping sliding mode control includes a sliding mode control for manipulator dynamics and a PI control for actuator dynamics. The fuzzy logic system is utilized to adjust the control gain and robust gain of the sliding mode control (SMC) based on the output of the nonlinear disturbance observer to compensate the payload. The Lyapunov approach and backstepping technique are used to prove the stability and robustness of the whole system. Some simulations are implemented, and the results are compared to other controllers to exhibit the e ﬀ ectiveness of the proposed control.

Conventionally, electric actuators (EAs) are utilized as primary torque generators in each joint of the manipulator because of owning properties such as excellent accuracy and controllability but suffer from the possibility of sparking [19]. Besides, this approach is not effective when the manipulator operates in wide force/torque range. Pneumatic actuators (PAs) are another potential candidate to replace the electric actuators because of its characteristics [20]. The main advantages of the PAs can be revealed as quick response, high power-to-weight, and power-to-volume ratios [21]. However,

Manipulator Analysis
The hydraulic robot is illustrated in Figure 1. Each part of this manipulator is driven by a hydraulic rotary actuator (HRA) controlled by using servo valve. The behavior of the manipulator via actuator dynamic is analyzed elaborately.

Dynamics Manipulator
The dynamics of the robot with a degree of freedom can be expressed as: M q q C q q q G q F q F q τ τ where 3 , , q q q R ∈   are position, angular velocity, and angular acceleration vectors of each joint, respectively, 3 3 ( ) M q R × ∈ is the symmetric and positive definite matrix of inertia, 3 3 ( , ) C q q R × ∈  denotes the Coriolis and Centrifugal term matrix, 3 ( ) G q R ∈ is the gravity term, τ is torque acting on joints, 3 is a diagonal matrix of viscous and dynamic friction coefficients, ( ) n s F q R ∈  is the vector of unstructured friction effects such as static friction terms, load τ denotes the torque load induced by an external payload. However, the dynamics of the manipulator is difficult to determine clearly because of the mass distribution, and oscillation in the process of operation. Then the Equation (1) is re-written as: M q q C q q q G q d τ τ where ˆ( ) ( , ) ( ) M q q C q q q G q + +    represent the estimated terms and can be assumed to be known is the vector of any generalized input because of uncertainties, disturbances, or un-modeled dynamic. The detailed structure of the ˆ( ), ( , ), ( ) M q C q q G q  is discussed in Appendix A. Unlike conventional manipulator, the last link of our proposed hydraulic manipulator employs cylinder to load heavier object. The torque acting on the joint is essentially induced by the force

Dynamics Manipulator
The dynamics of the robot with a degree of freedom can be expressed as: where q, . q, .. q ∈ R 3 are position, angular velocity, and angular acceleration vectors of each joint, respectively, M(q) ∈ R 3×3 is the symmetric and positive definite matrix of inertia, C(q, . q) ∈ R 3×3 denotes the Coriolis and Centrifugal term matrix, G(q) ∈ R 3 is the gravity term, τ is torque acting on joints, F d ∈ R 3×3 is a diagonal matrix of viscous and dynamic friction coefficients, F s . q ∈ R n is the vector of unstructured friction effects such as static friction terms, τ load denotes the torque load induced by an external payload. However, the dynamics of the manipulator is difficult to determine clearly because of the mass distribution, and oscillation in the process of operation. Then the Equation (1) is re-written as: . q +Ĝ(q) + d = τ + τ load (2) whereM(q) ..
. q +Ĝ(q) represent the estimated terms and can be assumed to be known (Appendix A), d = ∆M(q) .. q + ∆C(q, . q) . q + ∆G(q) + F s . q + ∆F d . q ∈ R 3 is the vector of any generalized input because of uncertainties, disturbances, or un-modeled dynamic. The detailed structure of thê M(q),Ĉ(q, . q),Ĝ(q) is discussed in Appendix A. Unlike conventional manipulator, the last link of our proposed hydraulic manipulator employs cylinder to load heavier object. The torque acting on the joint is essentially induced by the force generated by the cylinder then the relationship between the rotational motion of the joint and the translational motion of the actuator is investigated. The architecture of the last link is illustrated in Figure 2.
Appl. Sci. 2019, 9, x 4 of 29 generated by the cylinder then the relationship between the rotational motion of the joint and the translational motion of the actuator is investigated. The architecture of the last link is illustrated in Figure 2. The correlation between the motion of the actuator in the actuator space and the motion in joint space can be derived by: where d0 is the initial length in case of maximum retracting; the positive direction in the actuator space is chosen for extracting the piston. d3 denotes the position of the end-effector under the motion of the cylinder, d1 and d2 are fixed length of the hinge joints.
To obtain the correlational velocity between the actuator and the joint motion, taking the derivation respect to time, the Equation (3) results into: 2  3  3  3  3  3  3  3  3  3  1  2  1 2  3 sin cos where Ja3 (q3) is a Jacobian matrix of the 3rd joint. Thus, a torque acting on this joint can be derived as: The completely correlational motion between the actuator and the joint motion is described by: where ( ) denotes position vector of the actuator in actuator space.

The Dynamic of the Electro-Hydraulic Actuator
The schematic of the EHA is described in Figure 3. The dynamic is presented by the following equation: where is an inertia mass of the link ith, , , ia ia ia q q q   are the angular position, velocity, and acceleration of the actuator which have a same movement as each link of the manipulator, _ is a coefficient of the viscosity friction, represents uncertainty parameters such as friction or disturbance, _ is an arbitrary load torque on the actuator ith, and _ is torque applied on the link ith of the manipulator, same as Equation (2). _ is produced by: The correlation between the motion of the actuator in the actuator space and the motion in joint space can be derived by: where d 0 is the initial length in case of maximum retracting; the positive direction in the actuator space is chosen for extracting the piston. d 3 denotes the position of the end-effector under the motion of the cylinder, d 1 and d 2 are fixed length of the hinge joints.
To obtain the correlational velocity between the actuator and the joint motion, taking the derivation respect to time, the Equation (3) results into: where J a3 (q 3 ) is a Jacobian matrix of the 3rd joint. Thus, a torque acting on this joint can be derived as: The completely correlational motion between the actuator and the joint motion is described by: where (q 1a q 2a d 3 ) T ∈ R 3 denotes position vector of the actuator in actuator space.

The Dynamic of the Electro-Hydraulic Actuator
The schematic of the EHA is described in Figure 3. The dynamic is presented by the following equation: where J i is an inertia mass of the link ith, q ia , . q ia , .. q ia are the angular position, velocity, and acceleration of the actuator which have a same movement as each link of the manipulator, b act_i is a coefficient of the viscosity friction, d act_i (q ia , . q ia , t) represents uncertainty parameters such as friction or disturbance, τ load_i is an arbitrary load torque on the actuator ith, and τ hydraulic_i is torque applied on the link ith of the manipulator, same as Equation (2). τ hydraulic_i is produced by: where A q ia is the radian displacement of the rotary actuator, A i(i=1,2) are an area of the bore side and rod side of the cylinder, respectively. P i(i=1,2) = [P i1 · · · P i3 ] T are pressure in chamber 1 and chamber 2 of each actuator, respectively.  The pressure in each chamber can be computed by [44]: where is the volume of chamber 1, is volume of chamber 2, and are the initial volumes of the two chambers, β is the Bulk modulus, is the leakage volume between the two chambers, is the flow rate supplied by the hydraulic source to the forward chamber, and is the returned flow rate from the backward chamber. Both and are driven by position of the spool inside the servo valve.
The equation expressed in relation between and and displacement of the spool are presented in [45][46][47]: where xv is the valve displacement, ω is the spool valve area gradient, ρ is the density of the fluid, Cd is the discharge coefficient, Ps and Pr are the supply and return pressure, respectively. The dynamic of the valve was presented in [48,49]: Since relates to the input voltage, and if neglecting servo-valve dynamics [50], we can assume approximately that an input signal u is a linear function and directly proportional to the spool position [42] , i.e., v v where v k is a positive constant and u is the control input voltage. The pressure in each chamber can be computed by [44]: where V i1 = V i01 + A i q is the volume of chamber 1, V i2 = V i02 − A i q is volume of chamber 2, V i01 and V i02 are the initial volumes of the two chambers, β is the Bulk modulus, q leak is the leakage volume between the two chambers, Q i1 is the flow rate supplied by the hydraulic source to the forward chamber, and Q i2 is the returned flow rate from the backward chamber. Both Q i1 and Q i2 are driven by position of the spool inside the servo valve. The equation expressed in relation between Q i1 and Q i2 and displacement of the spool are presented in [45][46][47]: where x v is the valve displacement, ω is the spool valve area gradient, ρ is the density of the fluid, C d is the discharge coefficient, P s and P r are the supply and return pressure, respectively. The dynamic of the valve was presented in [48,49]: Since x v relates to the input voltage, and if neglecting servo-valve dynamics [50], we can assume approximately that an input signal u is a linear function and directly proportional to the spool position [42] x v , i.e., where k v is a positive constant and u is the control input voltage. For convenient controller design, the dynamic equation of the system should be performed in state space. The variables (x v , q, P L ) should be considered because of the state of the system. Defining the state variables as: Hence: .
where (15) can be rewritten as follows: .

Remark 2.
In practice, ξ 1 (P 1 , U) and ξ 2 (P 2 , U) are both seldom zero when the system is operating smoothly since P 1 and P 2 are rarely close to P s , and P r . In the seldom case that ξ 1 (P 1 , U) and ξ 2 (P 2 , U) equal to zero (e.g., due to the noise in P 1 and P 2 ) it is set to a small positive number to avoid the problem of dividing zero.

Cascade Control
In this paper, the proposed control is divided into two subsystems based on cascade control. In the outer loop, sliding mode control is employed to cope with the manipulator dynamic and generate desired torque for the hydraulic actuator, whereas the inner loop control using non-linear PI is utilized to run the actual torque induced by the EHA under the presence of the uncertainties and the highly nonlinear terms. The overview of the proposed control is illustrated in Figure 4.
Step 1: The sliding mode control for the manipulator dynamics.

Definite state variable errors
, where x 1d and x 2d ∈ R 3×1 are the desired angular position and velocity, respectively. The sliding variable vector s 1 = [s 11 s 12 s 13 ] T ∈ R 3×1 is chosen as follows: where λ = diag(λ 1 , . . . , λ 3 ) is a positive-definite matrix. The reference state of the manipulator is defined as: The derivative of the sliding variable with respect to time is expressed as follows: .
Replacing (17), (18), and (19) into the 2nd equation of (16) yields: The desired torques are chosen as follows: Appl. Sci. 2019, 9, x 7 of 29 The desired torques are chosen as follows:  The reaching law is designed as: By adding the proportional rate , the state is forced to approach the switching manifolds faster when 1 s is large. The sign function is defined by: Define the torque error vector To prove the stability and robustness of the manipulator, the Lyapunov candidate function is chosen as follows: The derivative of the Lyapunov functions is presented as follows: Putting the Equations (21), (24), and (25) into Equation (26) can yield to: The sliding variable, s1, will converge to zero when the derivative of the Lyapunov function is a negative semi-definite function. To satisfy this condition, a robust control for the hydraulic dynamic is developed to guarantee that the torque error, s2, is bounded by ε .
Step 2: Designing the control, to guarantee the torque error is as small as possible. The differential of the torque error is derived as: The reaching law is designed as: where . By adding the proportional rate term −K 1 s 1 , the state is forced to approach the switching manifolds faster when s 1 is large. The sign function is defined by: Define the torque error vector To prove the stability and robustness of the manipulator, the Lyapunov candidate function is chosen as follows: The derivative of the Lyapunov functions is presented as follows: .
The sliding variable, s 1 , will converge to zero when the derivative of the Lyapunov function is a negative semi-definite function. To satisfy this condition, a robust control for the hydraulic dynamic is developed to guarantee that the torque error, s 2 , is bounded by ε.
Step 2: Designing the control, to guarantee the torque error is as small as possible. The differential of the torque error is derived as: The control vector is chosen as where is a robust gain diagonal positive d 2 matrix of the sliding mode control s 2 , and the sign function sgn(s 2 ) is defined by: Considering the Lyapunov function candidate: The derivative of the Lyapunov function (31) is: .
Replacing (29) and (27) into (32), the derivative of the Lyapunov function can be rewritten as follows: As shown in (33), ). It means that s 1 and s 2 are bounded. Let function P v2 = s T Because V 2 (s 1 (0), s 2 (0)) is a bounded function, and V 2 (s 1 (t), s 2 (t)) is nonincreasing and bounded, so: Additionally, . P v2 is also bounded, by Barbalat's lemma [51], it can be shown that lim t→∞ t 0 P V2 (τ)dτ = 0 and the sliding variable constants are chosen to satisfy the Hurwitz theorem.
They mean that the vector s 1 (t), s 2 (t), e 1 (t) and e 2 (t) will converge to zero as t → ∞ .

Adaptive Fuzzy Logic System
In practice, the manipulator works under the presence of payload variation, uncertainties, or unmodeled parameters that affect the dynamic manipulator. The controller normally is structured so that the manipulator can work stably within a permissible range. Out of this range, the system is unstable. This issue can be solved by using the high gain method with the large value of feedback gains which will cover the range of the uncertainties. In this way, for instance, disturbances or noise is amplified as well, or the chattering phenomenon appears [52] that make robot oscillate during the working process, degrades the performance of the system, and may lead to instability. Then to obtain accurate tracking performance and satisfy the work condition, the fuzzy logic control whose rules depended on the control objective is designed. First, to reflect the effect of the payload, let us rewrite the Equation (21): where K * 1 = K 1 + K m , and K m are the positive definite matrices. K 1 and η are adjusted based on the motion of the tracking error and its changing rate whereas K m is directly depended on the payload attached at the end-effector so that the control signal can adopt the performance.
The linguistic fuzzy rules are defined in the following form: where N is the total number of rules, K represents for the tuned gains feedback, A i 1,2 and B i are the linguistic variables of the fuzzy sets characterized by fuzzy membership functions. The fuzzy control rules can be represented as the mapping of the input linguistic variables e(t) and  Table 1 [38]. In this study, triangular membership functions are considered as shown in Figures 5 and 6. The value of η is calculated as: Appl. Sci. 2019, 9, x 9 of 29 working process, degrades the performance of the system, and may lead to instability. Then to obtain accurate tracking performance and satisfy the work condition, the fuzzy logic control whose rules depended on the control objective is designed. First, to reflect the effect of the payload, let us rewrite the Equation (21): , and Km are the positive definite matrices. 1 and K η are adjusted based on the motion of the tracking error and its changing rate whereas Km is directly depended on the payload attached at the end-effector so that the control signal can adopt the performance.
The linguistic fuzzy rules are defined in the following form: where N is the total number of rules, K represents for the tuned gains feedback, 1, 2 and ; the control strategy is described in Table 1 [38]. In this study, triangular membership functions are considered as shown in Figure 5 and Figure 6. The value of η is calculated as:    (c) The second part of the fuzzy logic system is attached for adjusting gain to satisfy the changing of the payload. Based on the change in acceleration because of a sudden change in inertia, the torque induced on each link is changed, thus leading to the variation in the state error. Then, the scaling gains affected by the load torque is designed to adapt to the system working operation. (payload) Under the presence of the external load, the compensated torque generated by the secondary fuzzy logic system is attached to boost the control signal. In this research, we consider that the external payload attached to the end-effector will beget the external torque. The force then is identified by using a non-linear disturbance observer [41,42]. Then we suggest a method to estimate the external payload for the compensator. In such a way that the trackability issue incurred from loading external mass is improved. The mass of the payload is assumed to be distributed in the interval from 4 to 50 kg. Then the load torque is observed and added to compensate the control input  Table 2. The triangular membership functions are described in Figure 7 for the change of load torque and Figure 8 for the adaptive gains. The second part of the fuzzy logic system is attached for adjusting gain to satisfy the changing of the payload. Based on the change in acceleration because of a sudden change in inertia, the torque induced on each link is changed, thus leading to the variation in the state error. Then, the scaling gains affected by the load torque is designed to adapt to the system working operation.
Under the presence of the external load, the compensated torque generated by the secondary fuzzy logic system is attached to boost the control signal. In this research, we consider that the external payload attached to the end-effector will beget the external torque. The force then is identified by using a non-linear disturbance observer [41,42]. Then we suggest a method to estimate the external payload for the compensator. In such a way that the trackability issue incurred from loading external mass is improved. The mass of the payload is assumed to be distributed in the interval from 4 to 50 kg. Then the load torque is observed and added to compensate the control input signal.  Table 2. The triangular membership functions are described in Figure 7 for the change of load torque and Figure 8 for the adaptive gains.

Nonlinear Disturbance Observer
The disturbance observer (DO) is normally used to estimate and eliminate the effect of external disturbance from the environment or some internal disturbance insider the system such as friction. The advantages of the disturbance observer are briefly shown in [41,42]. In this study, the DO is used to observe the change of the external payload considered as an external disturbance.
Since the external disturbance cannot be measured, hence according to [15], this estimated parameter is computed by: whered ∈ R 3×1 is an estimated disturbance, z∈ R 3×1 is an auxiliary variable used to cancel out an acceleration measurement in the term M(q) ..
q, function p is chosen as: where α is a constant depending on the maximum velocity of the third link.

Nonlinear Disturbance Observer
The disturbance observer (DO) is normally used to estimate and eliminate the effect of external The auxiliary variable z can be obtained from: where L(q, The proof of the stability of the DO can be deduced from [42].

Simulations
In this part, some numerical simulations and comparison are implemented to evaluate the effectiveness of the proposed algorithm by using the MATLAB/Simulink program. The mechanical parameters and hydraulic parameters used for simulating are shown in Tables 3 and 4, respectively. In our simulations, discrete time with the fixed step is 10 −4 s and the Runge-Kutta method is used for the approximate calculation of some differential problems. We investigate performance of the manipulator in three case studies with the same condition: the initial value of the three joints is [ 0.1 0.6 0.8 ] T (rad), and the initial velocity of the three joints are all zero; the external payload varies in the interval [5,20] kg and is shown in Figure 9; and the time for simulating is 20 s. The comparison between sliding mode control (SMC), fuzzy sliding mode control (FSMC), and adaptive fuzzy sliding mode control (AFSMC) are utilized. The white noise is added to illustrate uncertainty parameters and verify the proposed method.

Simulations
In this part, some numerical simulations and comparison are implemented to evaluate the effectiveness of the proposed algorithm by using the MATLAB/Simulink program. The mechanical parameters and hydraulic parameters used for simulating are shown in Tables 3 and 4, respectively. In our simulations, discrete time with the fixed step is 10 −4 s and the Runge-Kutta method is used for the approximate calculation of some differential problems. We investigate performance of the manipulator in three case studies with the same condition: the initial value of the three joints is [0.1 0.6 0.8] T (rad), and the initial velocity of the three joints are all zero; the external payload varies in the interval [5,20] kg and is shown in Figure 9; and the time for simulating is 20 s. The comparison between sliding mode control (SMC), fuzzy sliding mode control (FSMC), and adaptive fuzzy sliding mode control (AFSMC) are utilized. The white noise is added to illustrate uncertainty parameters and verify the proposed method.      Case study 1: The desired trajectory of the three joints is supposed to be tooth saw profile created by input shaping. The desired trajectory of the three joints and the responses while using three methods are described in Figure 10. The role of the proposed controller is validated at the time when the external payload is applied. The error of the AFSMC is the smallest, in which the smallest overshoot is at the time the payload changed, compared with that of the FSMC and SMC. The load torques estimated by using disturbance observer are depicted in Figure 11. And the control input signals which are constrained in the interval [−15, 15] (V) are performed in Figure 12.
Case study 1: The desired trajectory of the three joints is supposed to be tooth saw profile created by input shaping. The desired trajectory of the three joints and the responses while using three methods are described in Figure 10. The role of the proposed controller is validated at the time when the external payload is applied. The error of the AFSMC is the smallest, in which the smallest overshoot is at the time the payload changed, compared with that of the FSMC and SMC. The load torques estimated by using disturbance observer are depicted in Figure 11. And the control input signals which are constrained in the interval [-15, 15] (V) are performed in Figure 12. Case study 1: The desired trajectory of the three joints is supposed to be tooth saw profile created by input shaping. The desired trajectory of the three joints and the responses while using three methods are described in Figure 10. The role of the proposed controller is validated at the time when the external payload is applied. The error of the AFSMC is the smallest, in which the smallest overshoot is at the time the payload changed, compared with that of the FSMC and SMC. The load torques estimated by using disturbance observer are depicted in Figure 11. And the control input signals which are constrained in the interval [-15, 15] (V) are performed in Figure 12.  Case study 2: In this case, sine function signals are used as the desired performance. The three joints trajectory are designed as: (degree) q 2d = 40 sin( πt/5 − π/2 ) + 60 (degree) q 3d = 60 sin( πt/5 − π/2 ) + 90 (degree) (45) In this case study, the sinusoidal signals are used as a smooth function to investigate the feedback states. The tracking performance of the three joints are described in Figure 13, the load torques estimated are depicted in Figure 14 and the control input signals are depicted in Figure 15. As can be seen in Figure 14, no matter how changed the load torques is, the DO can estimate its change for the compensation.
In this case study, the sinusoidal signals are used as a smooth function to investigate the feedback states. The tracking performance of the three joints are described in Figure 13, the load torques estimated are depicted in Figure 14 and the control input signals are depicted in Figure 15. As can be seen in Figure 14, no matter how changed the load torques is, the DO can estimate its change for the compensation.
In this case study, the sinusoidal signals are used as a smooth function to investigate the feedback states. The tracking performance of the three joints are described in Figure 13, the load torques estimated are depicted in Figure 14 and the control input signals are depicted in Figure 15. As can be seen in Figure 14, no matter how changed the load torques is, the DO can estimate its change for the compensation. Case study 3: This last simulation is implemented in task space (Cartesian co-ordinate). The endeffector is controlled to track the ellipse curve. The desired trajectory based on the working space of the robot in 3D space is supposed to be: The Jacobian matrix is expressed in Appendix B. The responses of the end-effector in 3D space and the responses of the three joints are described in Figure 16, the movement of the end-effector in x, y, and z directions are depicted in Figure 17 and the behavior of the end-effector in Cartesian space in shown in Figure 18. The load torques estimated are depicted in Figures 19 and Figure 20 shows the control input signals of the three joints. Case study 3: This last simulation is implemented in task space (Cartesian co-ordinate). The end-effector is controlled to track the ellipse curve. The desired trajectory based on the working space of the robot in 3D space is supposed to be: The Jacobian matrix is expressed in Appendix B. The responses of the end-effector in 3D space and the responses of the three joints are described in Figure 16, the movement of the end-effector in x, y, and z directions are depicted in Figure 17 and the behavior of the end-effector in Cartesian space in shown in Figure 18. The load torques estimated are depicted in Figures 19 and 20 shows the control input signals of the three joints. Case study 3: This last simulation is implemented in task space (Cartesian co-ordinate). The endeffector is controlled to track the ellipse curve. The desired trajectory based on the working space of the robot in 3D space is supposed to be: The Jacobian matrix is expressed in Appendix B. The responses of the end-effector in 3D space and the responses of the three joints are described in Figure 16, the movement of the end-effector in x, y, and z directions are depicted in Figure 17 and the behavior of the end-effector in Cartesian space in shown in Figure 18. The load torques estimated are depicted in Figures 19 and Figure 20 shows the control input signals of the three joints.     In the three case studies, the payload suddenly changes to 20 kg at the 5th second and drops to 5 kg and zero at the 10th and 15th second, respectively. The change of the payload results in changing in the external loads torque. As can be seen in Figures 11, 14, and 19 corresponding to the three case studies, the torques load can be observed and its profile correspond to that of the payload. The observed torques load of the second joint are similar to that of the third joint because of the same motion in the space. Owing to the fuzzy rules described in Table 2, the observed torques load can track the actual one, thus calculating and compensating the control signals. Herein only the magnitude of the torques load is considered because neither of the values of torques load are negative or positive, they all affect the tracking performance of the system. With the adaptive law for torques load compensation, the AFSMC can exhibit and achieve the best performance in comparison with conventional SMC and FSMC. The conventional sliding mode scheme can adopt the robustness; however, the trackability is degraded due to the changing parameters affecting indirectly the manipulator dynamics. When applying the fuzzy logic system, the control signals can be partially compensated, and with the use of compensator inherited from using disturbance observer (DO), the exerted torques load have been observed and the trackability is improved significantly. In the three case studies, the payload suddenly changes to 20 kg at the 5th second and drops to 5 kg and zero at the 10th and 15th second, respectively. The change of the payload results in changing in the external loads torque. As can be seen in Figure 11, Figure 14, and Figure 19 corresponding to the three case studies, the torques load can be observed and its profile correspond to that of the payload. The observed torques load of the second joint are similar to that of the third joint because of the same motion in the space. Owing to the fuzzy rules described in Table 2, the observed torques load can track the actual one, thus calculating and compensating the control signals. Herein only the magnitude of the torques load is considered because neither of the values of torques load are negative or positive, they all affect the tracking performance of the system. With the adaptive law for torques load compensation, the AFSMC can exhibit and achieve the best performance in comparison with conventional SMC and FSMC. The conventional sliding mode scheme can adopt the robustness; however, the trackability is degraded due to the changing parameters affecting indirectly the manipulator dynamics. When applying the fuzzy logic system, the control signals can be partially compensated, and with the use of compensator inherited from using disturbance observer (DO), the exerted torques load have been observed and the trackability is improved significantly.

Experimental Setup
To verify and compare with the simulation, the proposed algorithm is applied on the real 3-DOF hydraulic manipulator. The hardware connection is depicted in Figure 21. The dash lines stand for the data derived from the system, and the solid lines stand for the command signal from the computer. The hardware setup includes the computer (PC) for data processing, the hydraulic supply for the manipulator, and the 3-DOF hydraulic manipulator communicating with the PC via terminal 68 LPR and the PCIE Card (PCIE-6363). The hydraulic manipulator supplied by the hydraulic system is driven by electro-hydraulic actuators equipped with incremental rotary encoders E40H6-5000-3-V-5 to measure the movement. The data read from encoders is then processed by the MATLAB program via PCIE card. After processing, the command signal from the computer is sent to the system to drive the servo valve amplifier SVA-R-1, thus generating the manipulator to follow the desired trajectory.

Experimental Setup
To verify and compare with the simulation, the proposed algorithm is applied on the real 3-DOF hydraulic manipulator. The hardware connection is depicted in Figure 21. The dash lines stand for the data derived from the system, and the solid lines stand for the command signal from the computer. The hardware setup includes the computer (PC) for data processing, the hydraulic supply for the manipulator, and the 3-DOF hydraulic manipulator communicating with the PC via terminal 68 LPR and the PCIE Card (PCIE-6363). The hydraulic manipulator supplied by the hydraulic system is driven by electro-hydraulic actuators equipped with incremental rotary encoders E40H6-5000-3-V-5 to measure the movement. The data read from encoders is then processed by the MATLAB program via PCIE card. After processing, the command signal from the computer is sent to the system to drive the servo valve amplifier SVA-R-1, thus generating the manipulator to follow the desired trajectory.

Experiment Results
In the experiments, we consider three case studies. The parameters of the system are same as defined in Tables 3 and 4. The initial of the three joints is set when the actuators reaches the limited position (maximum extend for cylinder and maximum angular position for rotary actuators). The parameter of the sliding surface mentioned in Equation (17) is λ = diag (35,30,25), and the parameters of the robust terms in Equation (21) are K 1 = diag (40,40,40) and η = diag (1.8, 1.8, 1). The values of K 1 and η are different from the simulation because the real system has many uncertainties because of its structure and the different drivers used to run the manipulator, the gain is scheduled such that the system can operate smoothly. All the controller gains are kept same in the three case studies.
Case study 1: Sinusoidal signal and no load verification. The desired trajectory is set as: In this case study, no load is attached into the end-effector. Therefore, the comparison is implemented between the conventional back-stepping slide ding mode control (BSMC) and fuzzy back-stepping sliding mode control (FBSMC). The response of the three joints is described in Figure 22.
Case study 2: The desired trajectory is set as same sinusoidal signal as the first case study, but 5 kg external payload is attached. The response of the three joints is depicted in Figure 23.

Experiment Results
In the experiments, we consider three case studies. The parameters of the system are same as defined in Tables 3 and 4. The initial of the three joints is set when the actuators reaches the limited position (maximum extend for cylinder and maximum angular position for rotary actuators). The parameter of the sliding surface mentioned in Equation (17) is λ = diag (35,30,25), and the parameters of the robust terms in Equation (21) 1.8, 1). The values of K1 and η are different from the simulation because the real system has many uncertainties because of its structure and the different drivers used to run the manipulator, the gain is scheduled such that the system can operate smoothly. All the controller gains are kept same in the three case studies. Case study 1: Sinusoidal signal and no load verification. The desired trajectory is set as: In this case study, no load is attached into the end-effector. Therefore, the comparison is implemented between the conventional back-stepping slide ding mode control (BSMC) and fuzzy back-stepping sliding mode control (FBSMC). The response of the three joints is described in Figure  22. Case study 2: The desired trajectory is set as same sinusoidal signal as the first case study, but 5 kg external payload is attached. The response of the three joints is depicted in Figure 23.  (e) (f) Case study 2: The desired trajectory is set as same sinusoidal signal as the first case study, but 5 kg external payload is attached. The response of the three joints is depicted in Figure 23.  Case study 3: Step signal is applied instead of using smooth signal like the two above case studies or tooth saw profile like in the simulation. The controller parameters are still kept same as the original value setup above. The response of the system is shown in Figure 24.
Appl. Sci. 2019, 9, x 25 of 29 Case study 3: Step signal is applied instead of using smooth signal like the two above case studies or tooth saw profile like in the simulation. The controller parameters are still kept same as the original value setup above. The response of the system is shown in Figure 24. As can be seen in the three case studies, depicted from Figure 22 to Figure 24 , especially in the second and third case studies (Figures 23 and 24), the response of the three joints is quite similar with the simulations, in which the errors when employing adaptive fuzzy back-stepping sliding mode control (AFBSMC) is the smallest compared with that of the fuzzy back-stepping sliding mode control (FBSMC) and back-stepping sliding mode control (BSMC). The error of the third joint in case of load and without load is quite similar. This can be explained as the short length of the third joint gets less affected from the load. But because of the length in the second link and dynamics coupling torque between the third and the second link, the error of the second joint is a little greater than that of when no load affected. When utilizing AFBSMC, the error decreased significantly. Same profile in the first joint in comparison between with and without load.

Conclusions
In this study, the behavior of the 3-DOF hydraulic manipulator including actuator has been analyzed. The tracking motion of the manipulator was investigated under the presence of the external As can be seen in the three case studies, depicted from Figure 22 to Figure 24, especially in the second and third case studies (Figures 23 and 24), the response of the three joints is quite similar with the simulations, in which the errors when employing adaptive fuzzy back-stepping sliding mode control (AFBSMC) is the smallest compared with that of the fuzzy back-stepping sliding mode control (FBSMC) and back-stepping sliding mode control (BSMC). The error of the third joint in case of load and without load is quite similar. This can be explained as the short length of the third joint gets less affected from the load. But because of the length in the second link and dynamics coupling torque between the third and the second link, the error of the second joint is a little greater than that of when no load affected. When utilizing AFBSMC, the error decreased significantly. Same profile in the first joint in comparison between with and without load.

Conclusions
In this study, the behavior of the 3-DOF hydraulic manipulator including actuator has been analyzed. The tracking motion of the manipulator was investigated under the presence of the external payload. This main issue is handled by using adaptive fuzzy sliding mode control based on backstepping (BSP) control scheme. It employs the advantages of the SMC in reducing the order system, strong robustness against perturbation, and BSP control in solving both the problem of stabilization and tracking trajectory. The disturbance observer technique is employed to observe the change in the external torques induced by the variation of the external payload. Then the adaptive fuzzy logic scheme is used to adopt to the work condition. Some simulations and experiments have been given with the added noise and compared between the conventional backstepping sliding mode control, fuzzy back-stepping sliding mode control with the proposed algorithm to verify the robustness and stability of the algorithm in motion tracking. The results proved that the proposed control can improve the behavior of the 3-DOF hydraulic manipulator under the vastly changed payload, which occurs during operation in practice.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix B
According to the manipulator structure in Figure 1, following the Denavit-Hartenberg parameters [1], the parameters and its dynamics are defined, and the kinematic equation of the end-effector is calculated as: (l 2 s 2 + l 3 s 23 )c 1 (l 2 s 2 + l 3 s 23 )s 1 l 2 c 2 + l 3 c 23 , c ij = cos(i + j =)c i c j − s i s j , s ij = sin(i + j) = c i s j + s i c j (i = 1, 2, 3; j = 1, 2, 3) .
Then taking derivative with respect to time, the velocity and Jacobian matrix can be obtained as: