Terminal super-twisting sliding mode based on high order sliding mode observer for two DOFs lower limb system

In this paper, a novel backstepping terminal super-twisting sliding mode (TSTSM) with high order sliding mode observer (HOSMO) is proposed to control the two degrees of freedom (DOFs) Serial Elastic Actuator (SEA), inspired by a lower limb of humanoid robots. First, the dynamic model, extended from our previous study, is presented for developing the control algorithm. Secondly, the backstepping technique is utilized to separate the overall system into two subsystems. One of the challenges of SEA is to deal with the evident oscillations caused by the elastic element, which might lead to the degrading performance of load position control. In order to reduce this adverse effect, a TSTSM is proposed to control the position tracking of two subsystems. The advantages of TSTSM are the finite-time convergence despite the bounded perturbation and the dramatic reduction of the chattering phenomenon. To construct and implement the TSTSM controller, it requires the knowledge of all states, which is not available in the current lower limb system setup. Therefore, a HOSMO is utilized to estimate the unknown states. Finally, experiment results are carried out to assess the effectiveness of the proposed controller and compare it with those of different control schemes.


Introduction
Ever since the past, the art of replicating artificial human body parts has been developed for various purposes: physiology research, missing body parts for human replacement, humanoid robot manufacture, and many more. As the technology and health-care system advance, the demand for more biologically accurate artificial limbs for prosthetic and humanoid robots is growing extremely fast. One of the most critical aspects of making artificial limbs is to mimic the soft, flexible characteristics of a human's joint. Even though numerous choices of actuators are available such as electric motors, hydraulic actuators, and pneumatic actuators, the stiffness property of the actuators prevents these actuators from imitating the human joint in reducing the contact force. One of the solutions to address this drawback is to incorporate an elastic element into the mechanism, see Refs. [1][2][3][4][5] and the references therein. The combination of an elastic element with a stiff actuator is also known as the compliant actuator design. An alternative approach is to utilize an impedance control scheme to reduce the impact of the external forces, as proposed in some research about humanoid robots and manipulators. [6][7][8][9] Among those solutions, the Serial Elastic Actuator (SEA) design that was initially proposed by Pratt and Williamson 10 has gained much attention in the robotics field over the year. [11][12][13][14][15][16] This innovative design enables the actuator to be more flexible in humanoid robot applications since it replicates the elastic tendon in the human body. By utilizing the SEA design, many humanoid robots and bio-inspired robots have successfully demonstrated their smooth motion capabilities. [17][18][19][20][21][22][23] Nevertheless, the development of SEA still remains a considerable challenge.
Traditionally, a simple control scheme such as PID is implemented to control the SEA system. [24][25][26] However, the stability of the PID control scheme might be degraded due to the large amplitude of friction and backlash. This problem can be alleviated by utilizing the feedback of positions and velocities. [27][28][29][30][31] To further enhance the robustness, disturbance observer (DOB) is employed in many research. [32][33][34] Since the SEA is a nonlinear system, the sliding mode control (SMC) is a suitable control scheme because of its robustness and simple design. 35,36 Despite the asymptotic stability in the traditional SMC, it is well-known that as the system dynamic gets closer to equilibrium, the rate of convergence becomes slower, which means the states of the system may never reach equilibrium in finite-time. To solve the aforementioned problem, terminal sliding mode control (TSMC) was first proposed in 1992. 37 The controller was based on the concept of a terminal attractor introduced in the study of neural networks. 38 From then on, it has been utilized significantly in various literature [39][40][41][42] and even in SEA applications. 43 In our previous study, 44 an event-trigger sliding mode control was proposed for two DOFs humanoid robot's lower limbs consisting of two SEA links connected in series. The experimental results have demonstrated that the elastic element induces evident oscillation. The adverse oscillation of the primary SEA joint affects the position adjustment of the secondary SEA joint and vice versa. Consequently, the lumped oscillation of the two SEA links eventually leads to the control system's instability. Moreover, the utilization of the sign function for the SMC gave rise to the chattering phenomenon. As a result, this phenomenon triggers the lumped oscillation caused by the two SEA links, which can cause severe instability. Therefore, a different control scheme based on the sliding mode is required to attenuate the chattering phenomenon and provide finite-time convergence. So far, many methodologies have been proposed in the literature to reduce the chattering phenomenon. One of the traditional solutions is to replace the discontinuous sign function with the saturation and sigmoid function, [45][46][47] which is known as the boundary layer method. However, the control system may lose robustness to the disturbances as the sliding trajectories are constrained to the vicinity. 48 Another drawback is that it also increases the tracking errors in the steady-state. 49 Another alternative method, such as the disturbance estimation method, can be implemented to reduce the chattering phenomenon. For instance, Shtessel et al. 50 developed a control scheme with an asymptotic disturbance observer to achieve continuous control input. In Kuang et al., 51 Du et al. 52 an equivalent control based on non-smooth control without using any switching term is chosen to control the discrete-time system. This control scheme demonstrated that it is able to alleviate the chattering problem. Recently, one of the most important approaches in SMC is to utilize the super-twisting algorithm (STA). [53][54][55][56][57][58][59] The ability to generate a continuous control signal is one of the prominent features of STA, thus reducing the overall chattering phenomenon. The STA is also a powerful tool in providing finite-time convergence to the origin of the sliding variables s and _ s. Moreover, the terminal sliding mode control is wellknown for its finite-time convergence of the state variables, which has been discussed in various research. Therefore, by combining the TSMC and STA, one can get the finite-time convergence of the state variables while alleviating the chattering phenomenon.
Since the implementation of the STA requires the knowledge of all states, whereas our current humanoid robot's lower-limb system only provides information regarding the position, it is crucial to obtain the other states through an observer. Real-time differentiators (observers) have played a vital role in many output feedback control designs, 60,61 such as the backward Euler method and spline interpolation technique. 62,63 Among those, a high-gain observer is probably the most well-known approach to obtain the unknown states because of its simplicity and capability. 64,65 Although the advantages of the high-gain observer are obvious, it is also sensitive to small high-frequency noises and has a drawback called the peaking effect: as the gains rise to infinity, the maximal output value during the transient also grows infinitely. 66 To deal with the bounded uncertainties, a type of observer which is based on sliding mode (SMO) was introduced in Edwards and Spurgeon 67 and is widely used in further research because of its finite-time convergence. [68][69][70] In recent years, a new generation of observers based on STA has been developed, 66,71,72 which is actually a second-order case of the high-order observer. This type of observer inherits the properties of the STA, providing robustness and convergence in finite time in the presence of disturbance. [73][74][75] The main objective of this paper is to propose the backstepping TSTSM to control the two DoFs SEA inspired by a lower limb of humanoid robots. The proposed controller can deal with the perturbation caused by the elastic elements while guaranteeing that the states will converge in finite time and offering chattering attenuation. A high-order sliding mode observer (HOSMO) is also utilized to provide the required fullstates feedback.
This paper is organized as follows. Section 2 gives the dynamic model of the 2 DOFs SEA-inspired humanoid robot's leg. Section 3 shows the design process of the backstepping TSTSM based on HOSMO for the two SEA links. Section 4 details the experimental setup and demonstrates the obtained experimental results.
Finally, further analysis and discussion are given to clarify the experimental results.

System modeling
The SEA inspired by the lower limb system is taken from our previous study. 44 The dynamical modeling for the two SEA links in Figure 1 is given as follows: where d is a positive constant, the joint angle vector In which F R1 , F R2 , N 1 , N 2 , and the inertia matrix M are calculated as follows: Varied angles g 1 and g 2 are calculated as follows: The explanation of all the above symbols is shown in Table 1.
By defining (1) is further divided into two subsystems as follows: Backstepping terminal super-twisting SMC based on HOSMO

Backstepping process
Considering the system of equation (1), the motor voltage U v is defined as the control input, and the joints' angle u is defined as the system output. The objective is to build a suitable control input U v for the system of equation (1) to track the reference trajectories To achieve this objective, the controller design process is illustrated as follows: Step 1: A virtual control input u v ¼ D u v1 u v2 ½ T is designed for the system of equation (4) using a terminal super-twisting SMC based on HOSMO to drive u to u d .
Step 2: The difference between x 3 and u v is defined as the new error variables. Then the control input U v is built for the system of equation (5) to drive the new error variables to zero.
are the state variables for the femur SEA system interconnected to the hip joint, whereas are the state svariables for the tibia SEA system interconnected to the knee joint. Consider the dynamic system for the hip joint of the femur SEA F 1 : The HOSMO dynamic systems to estimate _ y 1 and _ y 3 are given by the following form: whereŷ i is the estimated state variable for the hip joint system (i = 1, ::, 4). y a ,ŷ b are additional state variables. y 6 is the estimated state variable of the knee joint's angular velocity. z 1 , z 2 , z 3 , z 4 , z a , z b are the correction terms. Let us define the error variables as follows: The correction terms are chosen in the same manner given in the literature 75 : where k 1 , k 2 , k 3 , k 4 , k a , k b are positive constants. Then, the HOSMO error dynamics for the two subsystems can be written as: where Df x1 =f x1 y 1 ,y 5 ,y 2 ,y 6 ð Þ À f x1 =f x1 y 1 ,y 5 ,y 2 ,y 6 ð Þ Àf x1 y 1 ,y 5 ,ŷ 2 ,ŷ 6 ð Þ _ e 3 = 2k 3 e 3 j j  where DF R =F R1 y 5 ,y 2 ,y 6 , _ y 2 , _ y 6 ð Þ À F R1 =F R1 y 5 ,y 2 ,y 6 , _ y 2 , _ y 6 ð Þ ÀF R1 y 5 ,ŷ 2 ,ŷ 6 ,ŷ : 2 ,ŷ : 6 D _ r 1 = _ r 1 y 1 ,y 5 ,y 2 ,y 6 ð Þ À r : 1 = _ r 1 y 1 ,y 5 ,y 2 ,y 6 ð Þ À_ r 1 y 1 ,y 5 ,ŷ 2 ,ŷ 6 ð Þ Let us define r a =Df x1 +g x1 y 1 ,y 5 ð Þd, r b =DF R1 + dD _ r 1 , e a =2ŷ a +r a , e b =2ŷ b +r b , where r a and r b are considered as perturbation terms.
u v1 = g À1 x1 Àf x1 y 1 , y 5 ,ŷ 2 ,ŷ 6 ð ÞÀz 2 Àŷ a + € u 1d À m 1ê2 À h 1 g 1 e 1 j j g 1 À1ê 2 + u 1 U v1 = F R1 y 5 ,ŷ 2 ,ŷ 6 ,ŷ : 2 ,ŷ in which u 1 , u 2 is proposed as follows: The convergence time is given as the procedure given in the literature 78 : Proof of Theorem 1. Substituting the control inputs of equation (19) into equation (18), it yields: Combining equations (15)- (18), the dynamic of the hip joint of the femur SEA can be deduced as follows: _ e 1 =ŝ 1 À m 1 e 1 À h 1 e 1 j j g 1 sign e 1 ð Þ+e 2 s : 1 =m 1 e 2 +h 1 g 1 e 1 j j g 1 À1 e 2 À a 1ŝ1 j j _ e 3 =ŝ 2 À m 2 e 3 À h 2 e 3 j j g 2 sign e 3 ð Þ+e 4 s : 2 =m 2 e 4 +h 2 g 2 e 3 j j g 2 À1 e 4 À a 2ŝ2 j j The error dynamics Y 1 , Y 2 were shown to converge to zero in the previous section. Therefore, we can substitute e 2 = e 4 = 0 into G 1 , G 2 since the trajectories of the subsystems G 1 and G 2 cannot escape to infinity in finite time. 79 Subsequently, G 1 and G 2 can be rewritten as: In the second step of the proof, a stability analysis of equation (24) is performed. Let us consider a generalized system: To analyze the stability of equation (25), a candidate Lyapunov function candidate is chosen as 80,81 : By taking the first-order derivative of the Lyapunov function candidate, it can be obtained as follows: where Q= 2al+8av 2 À8bv ÀlÀ4v 2 À2av+2b ÀlÀ4v 2 À2av+2b 4v ! satisfying the algebraic Lyapunov equation (ALE): To guarantee that Q is positive definite, a and b must satisfy the following conditions: Recall the standard inequality for quadratic forms: where j k k 2 2 = s j j + v 2 By utilizing equation (32), equation (28) becomes: Equation (31) gives us the fact that j 1 j j4 j k k 2 , combining with Equation (33) it yields: From equation (34), it can be concluded that the trajectory of s in equation (25) converges to zero in finite time. By implementing the same manner for equation (24), it can be easily seen thatŝ 1 =ŝ : 1 =ŝ 2 =ŝ : 2 = 0 in finite-time, which further implies that the error dynamics in equation (24) become: This implies that both the errors e 1 and e 3 will converge to zero in finite-time, as shown in equation (21).
The block diagram for the whole controller is shown in Figures 2 and 3.

Experimental setup and results
The experimental setup is utilized to validate the proposed controller, as shown in Figure 4. Two SEA links assist the hip joint and knee joint. The SEA mechanism is powered by a DC motor. The rotational motion of the motor shaft is transmitted through a gear drive to establish the prismatic motion of the SEA. This motion, in turn, is transformed into rotational motion in the joints. To measure the angular position of the two joints, linear membrane potentiometers are installed to measure the linear position of the SEA, which is then calculated into angular position by trigonometric constraint of the SEA mechanism. Additionally, another potentiometer is installed onto the nut to measure the deformation of the elastic element -the spring, which is shown in Figure 5.
First, the desired trajectories are defined as step functions to demonstrate the performance of the controller with u 1d = 0, t41:     The sampling time is chosen as t s = 0:005s, the experiment time is processed as 10s. The control and physical parameters of the system are given in Tables 2 and 3. The position tracking of the step trajectory is shown in Figure 6. The actual angular positions of the joints are represented by the solid blue line while the red dotted line represents the reference trajectories. It can be seen that both of the joints converged to the reference trajectories. However, because of the oscillation nature of the springs in both joints, the combined oscillation makes the fluctuation in u 2 ( Figure 6(b)) more prominent than in the case of u 1 (Figure 6(a)). It is also noteworthy that the current mechanical setup of the membrane potentiometers caused the feedback to be disturbed heavily because the pressure on the surfaces of the potentiometers caused the surfaces to be worn out in a short amount of time, creating grooves on them. Ultimately, this leads to a heavily disturbed signal even when there are no control inputs which can be seen clearly at between 0 and 1.8 s in Figure 6. Moreover, the backlash of the joints contributed greatly to the fluctuation in u 2 , a small force exerted by the spring mechanism in the SEA may cause the joints to move, leading to inaccuracy in position tracking ( Figure 6). As for the sliding surfaces, despite some initial overshoot, they managed to reach zero after approximately 3.2 s. The HOSMO successfully estimated the angular velocities in Figure 7 and the estimation errors also converged to zero, as shown in Figure 8. Regarding the control inputs shown in Figure 9, despite the presence of Àa 1ŝ1 j j 1 2 signŝ 1 ð Þ and Àa 2ŝ2 j j 1 2 signŝ 2 ð Þ functions in equation (20), they are continuous functions of time as opposed to the traditional control input ÀKsign(s) which is not derivable and thus is discontinuous. However, because there are discontinuous functions under the integral, which are À Ð t 0 b 1 signŝ 1 ð Þdt and À Ð t 0 b 2 signŝ 2 ð Þdt, therefore, the chattering phenomenon is not eliminated but attenuated.
To quantitatively evaluate the effectiveness of the proposed controller, we conduct two other different control schemes, traditional SMC and TSMC. The desired trajectories are defined as u 1d = 0:1 Ã sin pt ð Þ+ 0:11 and u 2d = 0:05 Ã sin pt ð Þ+ 0:25. The sampling time is chosen as t s = 0:005s, the experiment time is processed as 10s. The control and physical parameters are again taken from Tables 2 and 3.
The experimental results comparison of SMC, TSMC, and the proposed controller are illustrated in Figure 10. The solid blue line represents the actual angular position of the joints, and the red dotted line represents the reference trajectories. The desired trajectory of the hip joint is easily achieved by all three control schemes, as shown in Figure 10(a) to (c). Despite the initial overshoot, the TSTSM successfully alleviated the chattering phenomenon, producing a smoother trajectory compared to the other two control schemes. From the observation, one can see that the tracking of the knee joint is much more difficult to achieve, as  shown in Figure 10(d) to (f). As seen in Figure 10(d) and (e), the trajectory of the knee joint suffered significantly from the combined perturbation (the chattering phenomenon and the vibration of the springs), resulting in chattered outputs. On the other hand, Figure 10(f) shows that the effect of the combined perturbation is reduced dramatically, thus providing the trajectory smoother. The sliding surfaces and the error of HOSMO are shown in Figures 11  to 13, respectively. The error of the HOSMO converges to zero, as shown in Figure 8. The final control input still suffers from slight chattering, as shown in Figure 14.
Since the TSTSM require the selection of many control parameters, as shown in equations (17) and (20), we have illustrated various responses of hip joint angle u 1 with different control parameters as shown in Figure 15 to make the process more intuitive. In the figures, the constant reference trajectory is represented by the red dash line, while the actual trajectories of other scenarios are represented by the continuous lines. Overall, the terminal parameters m 1 and h 1 in the first sliding surface of equation (17) affect the converging rate of the state u 1 . Higher m 1 makes u 1 converge to the reference trajectory quickly as shown in Figure 10(a), the actual trajectory was able to converge to the reference trajectory at around 1.6 s for m 1 = 80 while it took the case where m 1 = 1 approximately 2.5 s. However, the state suffers from the overshoot if m 1 is too high. As for h 1 , it can be seen that a high value can reduce the overshoot, but the stability of the system may be compromised (h 1 = 80) as shown in Figure 10(b). Regarding the parameters for the control input in   equation (20), the parameter a 1 greatly affects the tracking performance, as shown in Figure 10(c). In the case where a 1 = 1, it is impossible for the controller to drive the state to the reference trajectory. The tracking performance becomes better as a 1 increases (a 1 = 50), but if the parameter is too large it will amplify the chattering phenomenon (a 1 = 90). Figure 10(d) shows that a small value of b 1 increases the time needed for the state to reach the desired trajectory. On the other hand, raising b 1 to a certain threshold will reduce the    convergence time, if b 1 passes this threshold then the system may suffer from overshooting with no additional benefit as shown in the case where b 1 = 600.

Conclusion
A backstepping terminal super-twisting sliding mode (TSTSM) controller based on a high-order sliding mode observer (HOSMO) is proposed to control the two DoFs SEA inspired by a humanoid robot's leg. The HOSMO provides the finite-time convergence of the estimated states, thus eliminating the need for additional sensors. With the obtained estimated states, the main controller successfully drives the states of the overall system to the reference trajectories, while the source of perturbation originating from the combination of the chattering effect and the oscillation of the elastic element is also reduced significantly. The effectiveness of the proposed controller is clearly shown when compared with other control schemes. Experimental results are presented to show the feasibility of the proposed controller. In the future, further studies about how effective the HOSMO is in comparison with other observers will be made. Additionally, the backlash problem in the SEA needs to be addressed as it affects the system heavily.