# Hierarchical Sliding Mode Algorithm for Athlete Robot Walking

Authors: Van Dong Hai Nguyen; Xuan-Dung Huynh; Minh-Tam Nguyen; Ionel Cristian Vladu; Mircea Ivanescu
Journal: Journal of Robotics
 (2017)

---

## Abstract

Dynamic equations and the control law for a class of robots with elastic underactuated MIMO system of legs, athlete Robot, are discussed in this paper. The dynamic equations are determined by Euler-Lagrange method. A new method based on hierarchical sliding mode for controlling postures is also introduced. Genetic algorithm is applied to design the oscillator for robot motion. Then, a hierarchical sliding mode controller is implemented to control basic posture of athlete robot stepping. Successful simulation results show the motion of athlete robot.


---

## Body

## 1. Introduction

Two-legged robot is an interesting topic which lasts for long time [1–3]. One of the classical forms of this type, humanoid robot, which only has solid links, can move or balance through ZMP method [4–6]. Anyway, this method is only appropriate with MIMO system which has the same number of inputs and outputs. One of the other disadvantages of ZMP is that the robot moves very slowly and unflexibly. In order to improve the flexibility of robot and energy saving capabilities, some authors [7–13] put elastic components for smooth dynamic motion. By these researches [7–13], robot is flexible when the feet of robot still exist. One approach suggested [14, 15] is to replace the leg and foot by an elastic leg. This approach makes the robot become the underactuated MIMO system, called athlete robot (AR). The AR robot study is based on the idea of elastic legs for disabled people (Figures 1 and 2). In the case of AR, solid legs are replaced by elastic legs and two torques are substituted by one torque (Figure 3). Ryuma Niiyama and his colleagues studied this class of robots but their efforts were focused on the experimental results and real biomechanical structure. The dynamic equations and control algorithm were not analyzed. This paper will present the dynamic equation of AR.Figure 1
Motion of disabled people with elastic legs.Figure 2
AR, University of Tokyo, Japan [14].Figure 3
Correlation between leg of solid robot and elastic leg of AR.Classical methods of ZMP control for humanoid robot [4–6] become useless for ARs due to structure of AR as a MIMO underactuated system. Some researches [16–18] simplified the complicated structure of two-legged robot into simple form: spring-load inverted pendulum (SLIP). Anyway, the SLIP model is not completely equivalent to the former MIMO model. Hence, the controller which is based on the former complicated model will be more reliable. Beside the opinion of control methods for MIMO underactuated nonlinear system [19], this paper also presents new idea that three proportional-controllers (P-controllers) are designed to transform AR to a SIMO system. Hence, it will be more convenient to use multiple control methods for SIMO underactuated system [20–23]. A basic method of hierarchical sliding mode (HSM) control algorithm for SIMO system, which was presented by Qian et al. [20], can balance a SIMO system. Other related works [21–23] used HSM to balance a specific SIMO system. Qian used mathematical methods to prove the stability of sliding surfaces of each layer in [20]. Despite the remarkable contribution in [20], there is still a boundary that control parameters “should” be in. Therefore, based on that boundary, genetic algorithm (GA) is used in our paper to find the appropriate control parameters. Also, GA is also used to design the prescribed trajectory of motion that defines a step of robot.The paper concludes five sections. The dynamic equations of AR are generated in Section2. Section 3 infers the mathematical transformation from MIMO underactuated nonlinear structure of AR into a SIMO one. Section 3 also presents application of HSM controller for that robot. Section 4 introduces simulation results. A conclusion in Section 5 ends the paper.


## 2. Mathematical Model

The elastic legs are designed to be able to self-balance when there is not external force on them (Figure4) and to accumulate elastic energy for motion. We introduce the following notations:(i)
Ci: mass center of link ii=1,5(ii)
Oi: (with i=1,2,3,4) connecting point of link i and link i+1(iii)
Ai: center of the curved part of elastic leg i=1,5(iv)
Di, Ei: two-edge points of elastic legs with coordinates: xDi,yDi and xEi,yEii=1,5(v)
Fi: middle point of elastic legs with coordinate: xFi,yFii=1,5(vi)
β=EiAiCi^: angle of curved part of elastic legsFigure 4
Self-balanced position of elastic legs.Main parameters of AR are described in Figure5 as follows:(i)
mi: mass of ii=1,2,3,4,5; m1=m5; m2=m4 (kg)(ii)
li: length of link ii=2,3,4; l2=l4; l3=0 (m)(iii)
α1: angle between link 1 and vertical axis, obtaining α1=C1O1y′^ (rad)(iv)
αi: angle between next link and link ii=2,3,4,5 (rad)(v)
Ii: inertial moment of link i (kgm2)(vi)
r: radius of hunch part (m)(vii)
k: rotational spring coefficient (Nm/rad)Figure 5
Mathematical model of AR.Behavior of elastic leg is determined by Castigliano’s Theorem [24] which provides a good tool for analyzing forces on curved components. AR can be regarded as an equivalent inverted pendulum in Figure 6 where the elastic legs are equivalent to springs.Figure 6
Equivalent pendulum model: (a) as linear spring and (b) as rotational spring.Consider Figure6(b) that describes the equivalent model of AR’s leg. The strain potential energy of system can be defined as(1)Pstrain=12kα12.Total potential energy of system is(2)P=g∑i=15miyCi+Pstrain.Kinetic energy of system is(3)K=∑i=15mi2x˙Ci2+y˙Ci2+Ii2α˙i2.Lagrange operator is(4)L=K-P.By using Euler-Lagrange method, dynamic equations will be(5)∂L∂αi-ddt∂L∂α˙i=τii=2,3,…,5∂L∂α1-ddt∂L∂α˙1=0.From (5), the dynamic model can be written as(6)Jαiα¨=Fαi,α˙i+τ,where α=α1α2⋯α5T, τ=0τ2τ3τ4τ5T, and the matrices J, F are calculated by MATLAB/Simulink simulation. New variables qi are defined to simplify forms of equation (Figure 7).Figure 7
Model of AR with variables are referenced to the vertical axis.Relation of variablesαi and qi is inferred in(7)α1=q1;α2=q1-q2;α3=q2+q3;α4=-q3-q4;α5=q5-q4q1=α1;q2=q1-α2;q3=α3-q2;q4=-q3-α4;q5=q4+α5.Also, denote by αid and qid the reference signal of variables αi and qi. Consider q0=const>0 the angle between one leg and the vertical axis when both legs touch the ground. Sample-time T is defined as period time of a step of robotMany authors [25–27] proposed several solutions for designing the oscillators for the motion of two-legged walking robots. Their methods are very complex and based on intuition and developed by simulations and experiments. In this paper, an algorithm is proposed based on GA.We consider the reference trajectories ofq1, q2, q3, q4, and q5 as q1d=q0=const, q2d=q0=const, q3d=0, q4d, q5d. Reference trajectories of q4 and q5 are described in Figure 9.CoordinatesxAj,yAj and xBj,yBj have to be selected through GA.


## 3. Control Algorithm

In order to use HSC algorithms, new variables will be defined as(8)ei=αi-αidi=1,2,…,5,where αd=α1dα2d⋯α5dT, e=e1e2⋯e5T.The dynamic model (6) is rewritten as(9)e¨=J-1F+J-100τ3τ4τ5T-α¨d+J-10τ2000T.A simply proportional controller for links 3, 4, and 5 is proposed(10)τi=Kpieii=3,4,5.Also, define(11)f=f1f2⋯f5T=J-1F+J-100τ3τ4τ5T-α¨d,b=b1b2⋯b5T,where b is the second column of matrix J-1.Substitute (10) and (11) into (9), and obtain (12)e¨=f+bτ2.By using the conventional change of control inputs (10), the dynamic model (6) is transformed in SIMO models in (12). The AR is a five-order system and it is impossible to calculate directly J-1 with just unknown variables due to its complexity and limitation of simulating software (MATLAB/Simulink) (only 25000 characters can appear on MATLAB window). Hence, exact dynamic equations cannot be described visibly. Anyway, simulation process has to be implemented following Figure 10.From (8) to (12), the error model will be(13)e¨i=fi+biτ2i=1,2,…,5.Equation (13) has the form of equation of a SIMO system. Therefore, a solution of using controller which is suitable for high-order SIMO system can be considered. This controller stabilizes variables ei→t→∞0. This leads to αi→t→∞αid.Hierarchical sliding mode of structure of hierarchical sliding surfaces is shown in Figure10.From the description in Figure11, sliding surfaces are chosen(14)si=ciei+e˙ii=1,2,…,5(15)Si=ai-1Si-1+sii=1,2,…,5,where ai-1=const and a0=S0=0.(16)Si=∑r=1i∏j=riajsri=1,2,…,5.Derivative (16) with respect to time yields(17)S˙i=∑r=1i∏j=riajs˙ri=1,2,…,5.From (14) and (15), we deduce that the ith layer SMC comprises the information of (i-1)th,(i-2)th,…,1st layer, and subsystem layer. Hence, define the ith layer sliding mode control law as(18)ui=ui-1+ueqi+uswii=1,2,…,5.Here, τ0=0. And uswi, ueqi is switching and equivalent control law for ith layer. Let(19)ueqi=-cie˙i+fibii=1,2,…,5Define Lyapunov function for ith layer as(20)Vi=Si22i=1,2,…,5Derive (20), and from (17), we obtain(21)V˙i=SiS˙i=Si∑r=15∏j=r5ajs˙ri=1,2,…,5.Derive (14), and substitute (14) and (18) into new results which is obtained by deriving (14), which yields(22)S˙i=∑l=1i∑r=1r≠li∏j=riajbrueql+∑l=1i∑r=1i∏j=riajbruswli=1,2,…,5.By considering stability of ith layer sliding surface, let(23)S˙i=-kiSi-ηisgnSiwhereki>0,ηi>0From (22) and (23), switching control law of ith layer can be obtained as(24)uswi=-∑l=1i-1uswl-∑l=1i=1∑r=1,r≠li∏j=riajbrueql-kiSi+ηisgnSi∑r=1i∏j=riajbri=1,2,…,5,and the final control law for controller is selected as(25)τ2=u5=∑r=15∏j=r5ajbrueqr-k5S5+η5sgnS5∑r=15∏j=r5ajbr.From general results in [20], we obtain Theorems 1 and 2 below.Theorem 1.
Consider that equations of error of system (9) are described in (13). If control law is chosen as (25) and ith sliding surfaces are identified as in (16), then Si is asymptotically stabilized.Proof.
The Lyapunov function ofith layer is chosen as in (20). From (23), we obtain(26)V˙i=SiS˙i=Si-kiSi-ηisgnSii=1,2,…,5.Integrating two sides of formula (21), we obtain(27)∫0tV˙idτ=∫0t-kiSi2-ηiSidτi=1,2,…,5.Consider(28)Vi0=Vit+∫0tkiSi2+ηiSidτ≥∫0tkiSi2+ηiSidτi=1,2,…,5.Therefore, we obtain(29)limt→∞∫0tkiSi2+ηiSidτ≤Vi0<∞i=1,2,…,5.According to Barbalat lemma, there exists(30)limt→∞kiSi2+ηiSidτ≤Vi0<∞i=1,2,…,5.From (30), it means that limt→∞Si=0. Hence, the ith sliding surface of Si is asymptotically stable.Theorem 2.
Consider that equations of error of system (9) are described in (13). If control law is chosen as (25) and ith subsystem sliding surfaces are identified as in (14), then si is asymptotically stabilized.Proof.
Assumesi is not asymptotically stabilized when conditions in Theorem 2 are satisfied(31)limt→∞si≠0i=1,2,…,5.Hence, from (16), we obtain(32)limt→∞Si=limt→∞∑r=1i∏j=riajsr=∑r=1i∏j=riajlimt→∞sr≠0i=1,2,…,5.Equation (32) contradicts Theorem 1. Therefore, we obtain(33)limt→∞si=0i=1,2,…,5and si is asymptotically stabilized.Theorems1 and 2 prove the stability of sliding surface. However, the stability of ei is not guaranteed. Therefore, searching algorithm, such as genetic algorithm (GA), is a solution to find appropriate control parameters in (25). In this case, GA is defined by population of 40 individuals. Each individual contains 24 chromosomes which include values of the following:(i)
Control parameters:a1, a2, a3, a4, a5, c1, c2, c3, c4, c5, η5, k5, Kp1, Kp2, Kp3(ii)
Trajectory parameters:xA4, xA5, xB4, xB5, yA4, yA5, yB4, yB5(iii)
Half-period time of a motion cycle (time for a step of AR):T (if AR moves fast, then T is chosen in the range: 0s≤T≤2s)The individuals chosen for crossover process have to satisfy the following conditions:(i)
AllyDi, yEi, and yFii=1,5 are positive for t=0→T.(ii)
0≤xAi≤xBi≤Ti=4,5.Fitness function of GA is defined as(34)J=1T∑i=15ζi2i=1,2,…,5,where ζi=qi-qdi.In GA process, the fitness function of GA is designed to evaluate the results after each loop of searching. If each link tracks trajectory, thenζi→0 and ∑i=15ζi2→0. However, sample time of step T is also chosen through GA. Only ∑i=15ζi2 cannot represent the ability of tracking trajectory in a period of time. Therefore, fitness function should be selected as J=1/T∑i=15ζi2. The detected result which generates smaller J from (34) will be considered as better.The GA process is shown in Figure12.In Figure12, firstly, 40 random couples were created. In each individual in couples, the structure of gene concludes encoded parameters of control system and reference trajectories (control parameters: a1, a2, a3, a4, a5, c1, c2, c3, c4, c5, η5, k5, Kp1, Kp2, Kp3, xA4, xA5, xB4, xB5, yA4, yA5, yB4, yB5). We denote a constant value Jmin to check if the result is best or not. Jmin will be updated if there is better value and the result that makes J<Jmin will be stored as the best result. After crossover couples, 80 new individuals are created. By checking the function J of each individual after each simulation, better individuals have more priority to become couples and have more offspring in next generation. Worse individuals have less priority to give their gene to next generation. The loop will continue until we want to stop the program.


## 4. Simulation Results

System parameters are selected as follows:γ1=0.1(m); γ2=1(m); r=0.2(m); γ3=r-γ1; γ4=γ2-r; m1=0.01(kg); m2=0.1(kg); m3=0.5(kg); I1=0.001(kgm2); I2=0.02(kgm2); I3=0.1(kgm2); l3=0(m); l2=0.7(m); g=9.81N/kgm2; k=0.2N/kgm2; T=1.01s; q0=π/8rad.Parameters of HSM controller in (25) are found by GA method as follows:a1=9.4; a2=6.94; a3=4.77; a4=1.67; a5=1.37; c1=6.9; c2=9.43; c3=3.02; c4=9.94; c5=4.18; η5=6.88; k5=9.83; Kp1=76.5; Kp2=43.3; Kp3=81.4.Parameters of reference trajectories in Figure9 are determined as follows:xA4=0.1213m; yA4=-0.3456rad; xB4=0.2526m; yB4=-0.5341rad; xA5=0.3536m; yA5=1.5080rad; xB5=0.9394m; yB5=-1.4923rad.Initial values of variables att=0s are specified in Figure 8. Motions of AR under HSM controller are described in Figures 13 and 19.Figure 8
Position of two legs. (a) Before the step and (b) after the step.Figure 9
Reference trajectoriesqjd(j=4,5).Figure 10
Simulation process.Figure 11
Hierarchical sliding surfaces structure for system which has one control input and five output variables.Figure 12
Flowchart of genetic calculation process.Figure 13
AR at representative time (a)t=0(s), (b) t=T=1.01(s), and (c) t=1.12(s). Number 1; curved part of elastic part of leg 2; number 2: linear part of elastic part of leg 2; number 3: link 4; number 4: link 2; number 5: linear part of elastic part of leg 1; number 6: curved part of elastic part of leg 1.
(a)
(b)
(c)From initial position (Figure13(a)), after a period time T, AR moves to a new position (Figure 13(b)). An additional time tadd=0.11(s) is needed to achieve the exact position of a final sequence. This additional time can be improved by GA techniques. Period time of a step which is T will be T+tadd. Trajectories of each link variables qi are shown in Figures 14–18.Figure 14
Trajectory ofq1 (rad).Figure 15
Trajectory ofq2 (rad).Figure 16
Trajectory ofq3 (rad).Figure 17
Trajectory ofq4 (rad).Figure 18
Trajectory ofq5 (rad).Figure 19
Motion description of AR. (a) From 0 s to 0.2 s. (b) From 0.2 s to 0.4 s. (c) From 0.4 s to 0.6 s. (d) From 0.6 s to 0.8 s. (e) From 0.8 s to 1 s. (f) From 1 s to 1.12 s.
(a)
(b)
(c)
(d)
(e)
(f)The walking motion of AR for a single step is shown in Figure19.From Figures14 to 18, after 1.12 s, AR finishes a step. However, in the operating process, qi does not track well the reference trajectories but the final positions are still close to the reference trajectories. Figures 13 and 19 also consolidate that reasoning. The motion of each link affects others significantly. Only motion of link 5 is less affected (Figure 24). Because links 3, 4, and 5 are controlled directly by P-controllers for each link (from (10)), they follow trajectories (Figures 22–24) more closely than link 1 or link 2 does. Anyway, the vibration exists in these figures due to the effect from other links. The response of link 1 and link 2 is not good at first but HSM signal finally leads links 1 and 2 to reference trajectories at the end of period of the step (Figures 20 and 21).Figure 20
Trajectory ofα1 (rad).Figure 21
Trajectory ofα2 (rad).Figure 22
Trajectory ofα3 (rad).Figure 23
Trajectory ofα4 (rad).Figure 24
Trajectory ofα5 (rad).


## 5. Conclusion

In the paper, the authors represent method of generating dynamic equations of AR with elastic legs through Euler-Lagrange. Due to the complexity of structure, dynamic equations cannot be visibly shown. But, simulation can still be implemented after each loop of simulation by general matrix form of AR. A method of using three P-controllers is introduced to transform MIMO nonlinear underactuated form of AR into a SIMO system. Then, the authors also propose HSM controller, which was well implemented for SIMO system, for motion of AR in one-step period. Although sliding surfaces in that method were proved to work well, a mathematical problem is not completely guaranteed. This led to difficulty in choosing exactly control parameters. GA is proposed to solve that problem. Along with selecting the acceptable control parameters, GA is also successfully used to design the reference trajectories for motion of each link. The success of this approach in control AR robot is consolidated through simulation.



---

*Source: 6348980-2017-12-06.xml*