Fuzzy Terminal Sliding Mode Control with Compound Reaching Law and Time Delay Estimation for HDU of Legged Robot

Hydraulic drive mode enables legged robots to have excellent characteristics, such as greater power-to-weight ratios, higher load capacities, and faster response speeds than other robots. Nowadays, highly integrated valve-controlled cylinder, called the hydraulic drive unit (HDU), is employed to drive the joints of these robots. However, there are some common problems in the HDU resulted from hydraulic systems, such as strong nonlinearity, asymmetry dynamic characteristics between positive and negative moving directions of the piston rod, and time-varying parameters. It is difficult to obtain the desired control performance by just using classical control methods such as the traditional PID control. In this paper, a position controller that combines fuzzy terminal sliding mode control (FTSMC) and time delay estimation (TDE) is proposed, in which FTSMC adopts a compound reaching law which combines the tangent function and the exponential reaching law. Moreover, the fuzzy control is introduced to adjust the parameters of the reaching law in real time to improve the adaptability of FTSMC. Based on FTSMC, the external uncertain disturbance of the HDU position control system is estimated by TDE, which ensures the simplicity of system modeling and the normal application of FTSMC. Finally, the control effects of the controller combining FTSMC and TDE are verified on the HDU performance test platform and the load simulation experiment platform. -e experimental results show that the proposed controller greatly improves the system position control performance and has a strong disturbance rejection ability and a good adaptability under different working conditions. -e above research results can provide an important reference and experimental basis for the inner loop of compliance control of legged robots.


Introduction
In recent years, robots have been more and more widely used in various industries and have become a hot spot of research, which attracts lots of scholars' attention. Robots can be mainly divided into wheeled robots [1], crawler robots [2], legged robots [3], snake robots [4], and spherical robots [5].
e legged bionic robot takes the legged animals as the bionic object, which has the characteristic of discontinuous support. However, they have very good adaptability to the unknown and unstructured environment. Especially, in recent years, it can replace humans to carry out those heavy, boring, and dangerous works if it employs the hydraulic drive unit (HDU) as the drive method. e advantages of small size and large output power make legged robots being widely used in the military and civilian field such as the transportation of military materials, antiterrorism or antiexplosion tasks, deep-sea exploration, and automobile assembly.
Each leg of this kind of robots has several degrees of freedom (DOFs) controlled by highly integrated valve cylinders, which is also known as theHDU [6,7]. However, the introduction of the HDU not only brings the advantages of the hydraulic system but also brings some common problems of the hydraulic system, such as strong nonlinearity, asymmetry dynamic characteristics of positive and negative moving direction of the piston rod, and time-varying parameters. In addition, because the robot often walks in different environments, such as cement ground, snow, and sand, it results in different load characteristics of the foot end and further increases the difficulty of control. For the motion control of hydraulic legged robots, the position closed-loop control and force closed-loop control are the most commonly used control methods for joint actuators. e system control performance of the position closed-loop control system determines the motion control performance of the whole robot. In engineering application, PID control and its related compensation methods based on the classical control theory are commonly used in the hydraulic system, but the control accuracy of the above methods hardly meets the requirements of robot's high control performance.
Based on the modern control theory, sliding mode control (SMC) can be adopted to the nonlinear control system and gradually applied to the position servo control in the hydraulic system because of its strong robustness, simple structure, and rapid responses. For the position control of the hydraulic manipulator, Liang et al. proposed a nonsingular fast terminal sliding mode, which is implemented as the nonlinear desired error dynamic to ensure fast convergence and high trajectory tracking accuracy [8]. For the control of an automotive suspension system using hydraulic actuators, Rath et al. introduced a high-gain observer, and based on this observer, a recursive derivative nonsingular higher-order terminal sliding mode controller is used to avoid singularity [9]. Cao et al. proposed a new nonlinear robust contouring control scheme for a planar manipulator. Continuous nonsingular terminal sliding mode control is integrated with the contouring control to obtain faster convergence performance and robustness of the overall system [10]. e above research studies effectively improve the sliding mode control performance in different aspects. However, there are still some problems. Considering the complexity of disturbance from environments in the actual motion process of the robot, the influence of the external disturbance on the system control cannot be ignored, and an accurate method should be found to approximate the external disturbance. e reaching law-based SMC is a suitable control method for engineering applications, which can reduce system chattering and significantly improve the control performance. Zhang et al. proposed a new self-adaptive reaching law sliding mode controller for the electrohydraulic shaking table system, which is combined with the selfadaptive controller to estimate the uncertain parameters of the system online to reduce the chattering of the system [11]. For the automatic gauge control system, Yin et al. designed a sliding mode variable structure control for Smith prediction monitoring AGC system based on double power reaching law, which solved the problem of serious time delay and mathematical model mismatch in the system [12]. However, the mathematical models of the reaching laws designed in the above references are very complex and difficult to be applied in practice. e most important thing is that the parameters of the above reaching laws are fixed and cannot be adjusted in real time according to the changes of system parameters and external disturbances.
In the previous research studies, the authors have done the following research works: first, the mathematical model of the HDU the nonlinear position control was established, and the sensitivity analysis of the parameters in the system was carried out. e influence degree of different parameters on the position control performance was obtained, and the integral-separated PI controller was designed to study the position control performance of the system, but it was found that only the integral-separated PI controller could hardly meet the requirements of high-performance control under different loads [6]. Secondly, aimed at the problem of position control performance under different loads, the dynamic compliance of the position control system was studied, and the compliance-reduced controller was designed.
e disturbance rejection performance of the HDU position control system was greatly improved, but the above controller could only improve the disturbance rejection performance when the position input was zero [13].
To solve the existing problems, a compound reaching law combining tangent function and exponential function is proposed in this paper, and the control parameters of the compound reaching law are adjusted by the fuzzy control. A fuzzy terminal sliding mode control (FTSMC) is developed by adjusting the parameters of the compound reaching law to reduce the traditional SMC chattering problem and increasing the speed of reaching the sliding surface and improving the adaptability of the controller. Based on FTSMC, the external uncertainties of the HDU position control system are estimated by time delay estimation (TDE), which ensures the briefness and effectiveness of FTSMC modeling. ese are the main contributions of this paper. Aimed at the above issues, this paper is organized as follows: first, the mathematical model of the HDU position control system and the state space expression based on the error variable are given. Second, a reaching law based on inverse tangent function is combined with the exponential reaching law to form a compound reaching law, and then SMC based on the compound reaching law is deduced. e parameters of the sliding mode surface are determined by the reduced-order equation. In addition, fuzzy control strategy is used to dynamically adjust the parameters of the compound reaching law. On this basis, the external disturbance term of the HDU position control system is estimated by TDE. Finally, the effect of the control method is verified on the HDU performance test platform and the load simulation experiment platform under different working conditions. show the quadruped robot prototype, the single leg hydraulic drive system, the HDU, and the 3D model of the single leg, respectively.

Introduction of the HDU Position
2 Complexity e block diagram of the HDU position closed-loop control system is shown in Figure 2, and the deduction is shown in Appendix.
In Figure 2, ω sv is the natural frequency of the servo valve, ζ sv is the damping ratio of the servo valve, K d � C d W ��� 2/ρ (K d is defined as the conversion coefficient in this paper), C d is the orifice flow coefficient of the spool valve, W is the area gradient of the spool valve, ρ is the density of hydraulic oil, p s is the system supply oil pressure, p 1 is the pressure of the cavity without the rod, p 2 is the pressure of the cavity with the rod, p 0 is the system return oil pressure, C ip is the internal leakage coefficient of the servo cylinder, C ep is the external leakage coefficient of the servo cylinder, A 1 is the area of the cavity without the rod, A 2 is the area of the cavity with the rod, β e is the effective bulk modulus, m t is the conversion mass (including the piston, the displacement sensor, the force sensor, the connecting pipe, and the oil in the servo cylinder), X r is the input position, K x is the position sensor gain, K I is the servo valve current gain, K a is the servo valve power amplifier gain, K is the load stiffness, B p is the load damping, F L is the load force, X v is the servo valve spool displacement, X p is the servo cylinder piston displacement, U g is the controller output voltage, Q 1 is the inlet oil flow, and Q 2 is the outlet oil flow. Figure 2, the expression of the output position of the HDU position control system is shown as follows (the deduction is shown in Appendix):

State Space Function of HDU. According to
e parameters vary with the motion direction of the cylinder, shown in Table 1.
the value of (C tcx P s /A 1 ) is small enough, and (5) K � 0.

Complexity
When the above five conditions are satisfied, the output position can be simplified as follows: where According to the above simplified process, the linearized HDU position control system can be shown in Figure 3.
According to Figure 3, the open-loop transfer function of the system is shown as follows: Equation (4) shows that the HDU can be simplified to a three-order system. x r is defined as the desired position. x p is defined as the actual output position.
Denote the state variables x p , and x 3 � € x p . e state function of the position control system is shown as follows: e position error e is defined as the state variable.
the following expressions are obtained as follows: According to equations (5) and (6), the expressions of the state space of the HDU position control system are shown as follows: where f � a 0 x r + a 1 _ x r + a 2 € x r + ẋ t r and w e is the external disturbance of the HDU. Figure 2: Transfer block diagram for the HDU position closed-loop control system. Table 1: Parameters vary with the motion direction of the cylinder.
Positive movement x p ≥ 0 Negative movement x p < 0

e Reaching
Law. An excellent reaching law can reduce the time of reaching process and the speed near the sliding mode surface to reduce the chattering. Commonly used reaching laws include the isokinetic reaching law, exponential reaching law, power reaching law, and general reaching law [14]. However, the above reaching laws still have the room for improvement. Both the overlarge reaching speed and the overlarge speed at the sliding mode surface result in strong chattering for the system. erefore, a reaching law with low chattering and short reaching time is really needed.
In this paper, a compound reaching law based on the inverse tangent function and the exponential approach law is designed as follows: where the adjustment principles of k 1 and k 2 are shown as follows: k 1 adjusts the reaching speed of the system when the system state is far from the sliding surface. Bigger k 1 results in a faster speed in the reaching process. k 2 adjusts the reaching speed of the system when the system state reaches the sliding surface. Bigger k 2 results in a slower reaching speed near the sliding mode surface, which makes the reaching smoother. Next, Lyapunov stability principle is used to briefly analyze the stability of the reaching law.
e Lyapunov function is selected as follows: e derivation of V(s) is shown as follows: Inserting equation (7) into (9), the following expression can be obtained: It can be seen from equation (11) that (dV(s)/dt) ≤ 0, and it shows that the proposed reaching law is gradually stable. e control performance of the isokinetic reaching law, exponential reaching law, power reaching law, and reaching law designed in this paper is compared by simulation. e parameters of different reaching laws are shown in Table 2.
e simulation models of different reaching laws are built in MALTAB/Simulink. e initial state of the reaching laws (s � 5) is given, and the reaching curves and the reaching speed are shown in Figure 4.
It can be seen from Figure 4 that compared with other reaching laws, the speed of the proposed reaching law is very slow when the state error is large, which results in a longer reaching time and makes the system response worse. When the state error is small, the curve is smooth, and the reaching speed is slow, which reduces the system chattering.
From the above analysis, we can see that the proposed reaching law has a slow speed under the working conditions with a large error, so the exponential reaching law with faster speed is combined with the proposed law. e new compound reaching law is shown as follows: e curves of the newly designed reaching law and the others are shown in Figure 5 when s � 5.
It can be seen from Figure 5 that the compound reaching law has a fast speed far from the sliding mode surface and a slow speed near the sliding mode surface, which achieves a short reaching time and better stability.

Design of SMC.
e linear sliding mode surface [14] is designed as follows: Proposed law ds dt � −k 1 a tan(k 2 |s|)sgn(s) k 1 � 10 , k 2 � 10 where c 1 and c 2 are constants and satisfy the following conditions: c 1 > 0 and c 2 > 0. e following expressions are obtained by combining equations (7), (12), and (13): e control law can be worked out by equation (13) as follows: e state functions of the sliding mode surface are shown as follows: On the sliding mode surface, s � 0, and the third-order system is transformed into a second-order system as the following expressions show: e characteristic equation of a general second-order system is shown as follows: where ζ is defined as the equivalent damping ratio of the reduced-order system and ω n is defined as the equivalent natural frequency of the reduced-order system. Comparing equations (16) and (17), the following expressions are obtained: c 1 � ω 2 n and c 2 � 2ζω n . When the system reaches the steady state with a steady error less than 2%, the relation between the adjust time t s and time constant T is shown as follows: c 1 and c 2 are shown as follows: It can be seen from equations (19) and (20) that c 1 and c 2 are determined by t s and ζ. According to the response characteristic of the second-order system, the sliding mode dynamic time can be changed by adjusting t s , the sliding mode dynamic response process can be changed by adjusting ζ, which can ensure that the control system has a good dynamic adjustment process, and its value normally meets 0.4 ≤ ζ ≤ 0.8. In this paper, ζ � ( � 2 √ /2).

Design of the Fuzzy Controller.
e parameters of the HDU and the disturbance have some characteristics such as time varying. erefore, the reaching laws with constant parameters cannot adjust the system with the change of environment, which restricts the application of the reaching law.
Although the proposed compound reaching law can reduce the reaching speed near the sliding mode surface, a large value of k 3 is preferred to be selected to improve the system response, which increases the system chattering.
To achieve a fast system response and reduce the system chattering, a fuzzy controller is designed to adjust the value of k 3 , which solves the conflict between the rapid response and the stability of the system. e proposed controller has one input and one output. e input is the switch function S, and the output is the value of k 3 . e seven fuzzy sets [15]of the switch function s are defined as follows: "positive-big (PB)," "positive-middle (PM)," "positive-small (PS)," "zero (ZR)," "negative-small (NS)," "negative-middle (NM)," and "negative-big (NB)." e four fuzzy sets of the exponent term of the reaching law k 3 are defined as follows: "positive-big (PB)," "positive-middle (PM)," "positive-small (PS)," and "zero (ZR)." ey are quantified to the fuzzy field as follows: s � −10, −5, 0, 5, 10 { }, e subordinating degree function of the switching function s is shown in Figure 6(a). e subordinating degree function of k 3 is shown in Figure 6(b). e fuzzy laws are shown in Table 3. According to the fuzzy laws established in Table 3, the defuzzification is conducted as follows: where k * 3 is defined as the output, ω j is defined as the subordinating degree function of the fuzzy subset, and u j is defined as the centroid of subordinating degree function. erefore, the equivalent control law of the proposed fuzzy-adaptive sliding mode controller is as follows:

Design of TDE.
Because of the complexity of the external disturbance, it is difficult to build an accurate model for the disturbance. e core idea of TDE is to estimate the unknown functions by using the control input and the time delay information of the state derivative, which make it fit for recognizing the external disturbance w e . Consider the following nonlinear system [16,17]: where X t � [x 1,t ,x 2,t , . . . , x n,t ] T is the state variable at time t and w t is the external disturbance at time t.
where w t−L is the external disturbance at time t − L, L is the sampling time of the controller. According to equations (23) and (24), the HDU external disturbance w e at time t is shown as follows: w e t ≈ w e t−L � _ e 3 t−L + a 0 e 1 t−L + a 1 e 2 t−L + a 2 e 3 t−L Combining FTSMC and TDE, the control law is shown as follows: Complexity

Introduction of the Performance Test
Platform. e experiments are conducted on two platforms. One is called the HDU performance test platform shown in Figure 7(a). e servo cylinder and the force sensor on the right constitute the load system. e specific hydraulic principles and electrical principles are not shown in this paper due to space limits; it can be found in the authors' previous research studies [18]. Another is called the load simulation test platform shown in Figure 7(b). A mechanism of 2 DOFs with the serial structure is included in the platform, which can load the robot single leg by the two HDU, respectively, in horizontal and vertical direction.

Experimental Plan.
To verify the performance of the controller proposed in this paper, experiments are conducted on the two platforms described in Section 4.1. e detailed experimental plan is shown in Tables 4 and 5. e left HDU is used to test the proposed control method. e right HDU is used to generate disturbance force. Many working conditions are studied in the experiment. Due to space limits, the results of two working conditions are shown in the paper.

Results of the HDU Performance Test Platform.
e experimental results of Table 4      performances of the integral separation PI controller, FTSMC, and FTSMC + TDE are compared in the following.
To show the effects of the proposed control method, the maximum error is selected as the evaluation index. e results are shown in Table 6.
It can be seen from position error curves in Figures 8-11 and data in Table 6 that, on the HDU performance test platform, there is large position error between actual position curves with the PI controller and desired position curves. After adopting FTSMC, the position error is reduced, and the reduction rates of maximum errors compared with the PI controller reach 47.00%, 47.20%, 42.50%, and 42.20%, respectively. At these conditions, it can be seen from the reduction rates of maximum errors that the maximum errors have a certain reduction. After adopting FTSMC + TDE, the reduction rates of maximum errors compared with the PI controller reach 64.30%, 62.70%, 62.10%, and 58.60%, respectively. Obviously, the reduction rates of maximum errors are more excellent, and all curves have no apparent buffeting after adopting FTSMC + TDE. 10 Complexity It can be seen from Figures 12 and 13 and Table 6 that, after adopting FTSMC, the reduction rates of maximum errors compared with the PI controller reach 61.00%, 61.00% under the working condition with constant input and disturbance force of different frequencies. After adopting FTSMC + TDE, the reduction rates of maximum errors compared with the PI  Table 4. Time t (s) Figure 13: Position error of working condition ⑥ in Table 4.   Table 5 are shown in Figures 14 and 15. e initial displacement of the piston rod is 25 mm. e performances of the PID controller, FTSMC and FTSMC + TDE are exhibited.
To show the effects of the proposed control method, the maximum error is selected as the evaluation index. e results are shown in Table 7.
It can be seen form position error curves in Figures 14  and 15 and data in Table 7 that, on the load simulation platform, after adopting FTSMC, the reduction rates of 12 Complexity maximum errors compared with the PI controller reach 58.00% and 61.40% under different working conditions without system buffeting. After adopting FTSMC + TDE, the reduction rates of maximum errors compared with the PI controller reach 69.50% and 69.60%. It is shown that FTSMC + TDE has excellent adaptability and can largely improve the system performance. From the above experimental results and analysis, FTSMC can reduce the traditional SMC chattering problem and increase the speed of reaching the sliding surface, TDE can estimate the external uncertainties of the HDU position control system, and FTSMC + TDE can improve the adaptability of the controller and accuracy of the system.

Conclusion
To improve the position tracing ability of the HDU, FTSMC + TDE is proposed and verified on the HDU performance test platform and the load simulation platform. Under different working conditions, the position control performance is studied and the following conclusions are achieved.
Firstly, a reaching law combined with inverse tangent function and exponential approach law is designed, which reduces the time to reach the sliding mode surface and decreases the speed near the surface. e parameters of the reaching law are adjusted by a fuzzy law in time. Experimental research studies show that the proposed controller makes the reaching process smoother and does not cause system buffeting under various working conditions. Secondly, the FTSMC + TDE can improve the control accuracy greatly compared with the PID controller or FTSMC. It proves that the controller has excellent adaptability under various working conditions.
Based on the contributions of this paper, the following research studies will be conducted in the future. Firstly, the application of the FTSMC + TDE in the whole robot system needs to be studied further. Secondly, the proposed controller is applied on the position control system. Whether this method can be applied on the force control system to improve the control performance remains to be studied.

Linear Model of the HDU Position Control System
Aimed at the HDU with the valve-controlled unsymmetrical cylinder, its transfer function of the position control system is established.
Transfer function between the displacement of the valve element and input voltage is shown as follows: X v U g � K I K a s 2 /ω 2 sv + 2ζ sv /ω sv s + 1 (1) Flow equation of the valve: Considering the pressure-flow nonlinear factors, the flow of the cavity without the rod is shown as follows: Link of valve-controlled asymmetric cylinder Link of servo valve Figure 16: HDU position control block diagram.
e flow of the cavity with the rod is shown as follows: (2) Flow continuous equation of the servo valve: e valve inlet flow and the volume of the cavity without the rod are shown as follows: e valve outlet flow and the volume of the cavity with the rod are shown as follows: (3) Force balance equation: e equation of output force and load force is shown as follows: (4) Sensor: e natural frequency of the selected position sensor is much bigger than the sampling frequency of the system. e transfer function is simplified to a proportion link shown as follows: Combining equations (A.1)-(A.7), the HDU position control block diagram is built as Figure 16. e above model includes many nonlinear parts which are not convenient to the application of the proposed control methods. From Figure 1, the HDU control system can be divided into two parts, the servo valve and the asymmetrical cylinder.
Linearization is briefly conducted for the two parts as follows: (1) Linearization of the servo valve: To set the parameters of the sliding mode controller, the servo valve is simplified to a proportional link: (2) Linearization of the asymmetrical cylinder: Define the area ratio of the cavity without the rod to the cavity with the rod of the servo cylinder as n: e load pressure P L of the servo valve is defined as follows: (A.10) e load flow Q L of the servo valve is defined as follows: In an unsymmetrical cylinder, the sectional area of the two cavities is different, which makes the cylinder perform different characteristics in different motion directions. erefore, two motion directions, x v ≥ 0 and x v < 0, are, respectively, considered. (A.14) Conduct Taylor series expansion to equations (A.14), and omit the high-order terms: where K q1 � (zQ L /zx v ) � c d w ����������������� � (2/ρ)(P s − P L /1 + n 3 ) and K c1 � −zQ L /zP L � c d wx v (( ������������������ (2/ρ)(P s − P L /1 + n 3 ) )/(2(P s − P L ))).

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

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