Modeling and Finite-Time Walking Control of a Biped Robot with Feet

This paper addresses the problemofmodeling and controlling a planar biped robot with six degrees of freedom,which are generated by the interaction of seven links including feet. The biped is modeled as a hybrid dynamical system with a fully actuated singlesupport phase and an instantaneous double-support phase. The mathematical modeling is detailed in the first part of the paper. In the second part, we present the synthesis of a controller based on virtual constraints, which are codified in an output function that allows defining a local diffeomorphism to linearize the robot dynamics. Finite-time convergence of the output to the origin ensures a collision between the swing foot and the ground with an appropriate configuration for the robot to give a step forward. The components of the output track adequate references that encode a walking pattern. Finite-time convergence of the tracking errors is enforced by using second-order slidingmode control.Themain contribution of the paper is an evaluation and comparison of discontinuous and continuous sliding mode control in the presence of parametric uncertainty and external disturbances. The robot model and the synthesized controller are evaluated through numerical simulations.


Introduction
The study of walking robots is a research area of great scientific and technological interest [1].A particular class of walking robots are bipeds, which are characterized for their mobility from two legs.The kinematics and dynamics of this kind of robots are complex, and the synthesis of efficient and robust controllers to achieve stable walking is a challenging task [2].This paper studies a planar biped robot that consists of seven links: two femurs, two tibias, two feet, and one torso.This structure of biped robot is the simplest that approximately reproduces the mechanism of human walking [2,3].
The modeling of biped robots as a system of multiple pendulums has been addressed from the simplest case in [4], where the robot is represented by only 3 links, with no knees nor feet.In order to analyze a model more similar to the human anatomy, the biped robot of 5 links has been one of the most studied ones in the literature, for instance, in [5,6].In such case, the robot has knees but not feet.
In the literature, several models of planar bipeds have been considered without feet, which means that the contact with the ground is assumed to be punctual; see, for instance, [5,6].However, feet play an important role in the whole walking process.Feet allow the robot to improve balance providing a supporting surface to distribute its weight.Examples of bipeds with feet can be found in [2,3,6].In the aforementioned references the modeled robots are bipeds whose motion is constrained to the sagitttal plane.This is a valid assumption in a biped robot, since the dynamics in the sagittal plane is basically decoupled from the dynamics in the frontal plane [2].Besides, essential components of the bipedal walking can be observed in the sagittal plane.
Different control techniques have been used for the walking control of biped robots.High gain linear control is proposed in [7], where the authors prove that exponential convergence of the closed-loop system is achieved.However, a high gain proportional-derivative control is not feasible due to the large magnitude of the generated control inputs.Extensive research on passivity-based control of biped robots is summarized in [8], where energetic functions are exploited to formulate a walking controller robust to some external disturbances but not to parametric uncertainty.It is well known that classical sliding mode control is a robust control technique [9], able to stabilize electromechanical systems subject to external matched disturbances and parametric uncertainty.Such properties have been exploited for the robust control of biped robots in [6,10,11].In [6], a first-order sliding mode control is proposed for an underactuated biped and its performance is evaluated for external disturbances.The authors of [10] compare a classical sliding mode controller with a pure computed torque controller, concluding the superiority of the first one.The robot model of [11] includes a double-support phase, in which a sliding mode controller regulates the robot's motion.
The previously referred to walking controllers using sliding mode control present the problem of the classical approach, the undesirable effect of chattering [9].Secondorder sliding mode control has been proposed in order to reduce the chattering effect of the classical approach [12].This kind of sliding mode control has been studied for robust control of second-order systems to achieve stabilization in finite-time, in particular for double integrator systems [13,14].Finite-time control of the biped's state variables is an important feature in order to achieve a stable walking cycle; all biped's state variables must converge to desired values before the occurrence of an impact between the swing foot and the ground at each step.In [15], the authors propose a nonlinear control with finite-time convergence, which has been applied for biped robots in [4,5].Second-order sliding modes can be achieved by using a discontinuous [13] or a continuous [14] control law.Both approaches have been proposed for the walking control of biped robots [16,17]; however, a comparison and robustness evaluation of both approaches have not been carried out.
In this paper, we detail the mathematical model of a 7link biped robot including feet.The biped is modeled as a hybrid system with a continuous fully actuated singlesupport phase and an instantaneous double-support phase modeled as a discontinuous transition of the velocities when the swing foot collides with the ground.The validity of the model is verified from the dynamic constraint given by the center of pressure.We propose a particular set of outputs to be controlled, which allows us to design a controller that transforms the model of the biped into a linear form.Secondorder sliding mode control is then used over the linearized system to ensure robust reference tracking in finite-time.The main contribution of the paper is an evaluation and comparison of both discontinuous and continuous secondorder sliding mode approaches in terms of robustness against parametric uncertainty and external disturbances.To this end, the complete model of the biped and the proposed walking control have been implemented in simulation using Python.
The paper is organized as follows.Section 2 summarizes the modeling hypotheses and states the addressed problem.Section 3 details the mathematical model of the 7-link biped robot.In Section 4, we describe the synthesis of a walking control for the 7-link biped.Section 5 shows results of the closed-loop system's performance through simulations using the derived mathematical model.In Section 6, we give conclusions and discuss some future work.

Modeling Hypotheses and Problem Statement
In this section we enlist a set of modeling hypotheses and we describe the main problem addressed in the paper.The following hypotheses regarding the robot are assumed: (HR1) It consists of 7 links of cylindrical geometry and homogeneous density distributed in a torso and two identical legs; each leg is composed of two links and one foot (see Figure 1).(HR2) It is planar and its motion is constrained to the sagittal plane, which is identified with a vertical plane.
Additionally, we assume that the bipedal walking satisfies the following hypotheses: (HW1) It consists of two successive phases: a fully actuated single-support phase (robot standing on one leg) and an instantaneous double-support phase (both feet on the ground).(HW2) During the single-support phase, the stance leg remains planar on the ground and without slipping.(HW3) In each step the swing leg moves forward from behind the stance leg to the front.(HW4) The walking is performed from left to right on a horizontal straight line representing the ground.
In this paper, we address the problem of deriving a model of a biped robot accomplishing the aforementioned hypotheses.From this model, we design a walking controller robust against parametric uncertainty and external disturbances, able to achieve convergence of a set of selected outputs in finite-time, before the occurrence of an impact of the swing foot with the ground for each step of the robot.z 0 x 0 y 0 O 0 q 1 q 2 q 3 q 4 q 5 q 6 P 1 Figure 2: Scheme of the 7-link biped robot showing the joints' positions (P 1 , . . ., P 5 ), angles of configuration ( 1 , . . .,  6 ), and fixed reference frame F 0 with origin  0 .

Model of a 7-Link Biped Robot
In this section, we detail the aspects related to the model of the biped robot under the assumptions described in the previous section.The model is developed in two parts.First, the robot dynamics in the single-support phase is modeled by a set of differential equations with inputs, which are obtained from the Euler-Lagrange formulation.Second, a model of the collision of the swing foot and the ground is presented as a set of algebraic constraints [2,5].The two-phase model representing the walking cycle of the 7-link biped is then written as a hybrid nonlinear system with impulsive effects [4,5].

Lagrangian Dynamics of the Robot.
Each joint of the robot has a torque   associated as shown in Figure 1.Then, the vector of input torques can be written as  := ( 1 , . . .,  6 ).Let us define a vector of generalized coordinates q := ( 1 , . . .,  6 ), which represents the robot's configuration.Thus, the robot has 6 degrees of freedom and is fully actuated.The angular positions   are measured as shown in Figure 2, with positive angles in a counterclockwise sense.The Euler-Lagrange equations can be written as follows: where L(q, q ) := K(q, q ) − P(q) is the difference between the kinetic energy K and the potential energy P due to the gravity force;   is the generalized force for each B  .The kinetic energy is given by K(q, q ) := , where Q  is the center of mass and   = (1/12)  (2  ) 2 is the moment of inertia of each B  (see Appendix A).The potential energy is given by P(q) := − ∑ 6 =1 (  g  Q  ), where g = (0, −  , 0), with   the gravitational constant.Euler-Lagrange equations (1) for the studied robotic system can be expressed in the secondorder form [18] B (q) q + C (q, q ) q + G (q) = A, (2) where B(q) is a positive definite symmetric matrix of 6 × 6, known as matrix of inertia, the vector fields C(q, q ) and G(q) include the centrifugal, Coriolis, and gravitational effects on the robot,  is the vector of input torques, and the matrix A ∈  6×6 (R) relates  with the vector of generalized forces .The matrix A is invertible given that the robot is fully actuated.See Appendix B for details of the terms involved in (2).Model (2) can be expressed in a state-space form as the following system of 12 first-order differential equations: where x := (q, q ) is the state vector and u := A =  is the control variable.The state-space of the system is defined as X := {x ∈ R 12 | q ∈ (−, ) 6 , q ∈ R 6 and ‖ q ‖ <  < ∞}, with  a positive scalar.Since we will introduce conditions for collision of the swing foot with the ground, the state-space is actually reduced to a subset of X of physically admissible configurations.

Collision Model.
The instantaneous double-support phase is modeled as a collision between the swing foot and the ground.To obtain a collision model, we consider the following hypotheses [19]: (HC1) The impact is modeled as a contact between two rigid bodies.
(HC2) The contact takes an infinitesimal time period.
(HC3) The swing foot makes a strictly parallel contact with the ground and there is no rebound and no slipping of the foot.
(HC4) The stance leg lifts from the ground without interaction.
(HC5) The external forces (e.g., ground reaction) during the collision can be modeled as impulses.
(HC6) The actuators (joint motors) cannot generate impulses; hence they can be neglected in the collision model.
(HC7) Due to the impulsive forces, the joint velocities might present a discontinuous change, not so in the configuration.
Since we consider a robot with feet, the contact of the swing foot with the ground implies the application of a distribution of forces in the sole of the foot.However, a valid simplification is to consider one resultant force and an external torque both acting in the swing foot's ankle at the instant of contact [2].Let us define P 5 (q) as the position of the swing foot's ankle with respect to the frame F 0 and P  (q) = (0, 0, 0, 0,  5 , 0) as the absolute angle of the swing foot measured as shown in Figure 2. We can introduce the effect of the impulsive external forces due to the collision in (2) as follows [20]: where J  5 := P 5 (q)/q is a 2 × 6 full rank matrix and J   := P  (q)/q is a vector in R 6 (these matrices are given in Appendix A). F  and   are vector-valued functions in R 2 and R, respectively, which denote the resultant external force and torque acting in the swing foot's ankle at the moment of impact (in form of Dirac delta functions).Considering (HC2), the integral of (4) during the infinitesimal time of the collision is given by where −   () , and q ± := q ( ± ),  − and  + being the instants before and after impact, which satisfy  + −  − → 0. Recall that by (HC7) the robot configuration does not change during the collision; thus q + := q( − ) = q( + ).From ( 5), the goal is to compute q + knowing q and q − .However, F  and   are also unknown.Since in  + the swing leg becomes the stance leg, hypothesis (HW2) implies that the translational and rotational velocities of the stance foot are null.Thus, after the impact, it is satisfied that Ṗ 5 ( + ) := J  5 q + = 0, Using ( 5) and ( 6), we can write a linear system to solve for q + , F  , and   , which can be expressed as follows: where Proposition 1. Linear system (7) has a single solution.
This proposition, whose proof is given in Appendix C, establishes that we can always compute a solution of (7) in terms of q − .The following lemma specifies the explicit solution of system (7).
Lemma 2. The closed-form of the solution of system (7) is given by where M 1 := J  5 B −1 (q)J   5 and M 2 := J   B −1 (q)J    are nonsingular matrices.
Proof.Solving for q + in (5), we have Premultiplying (10) by J  5 and by J   , we obtain respectively.Using (6), the left-hand sides of (11) become null.Besides, due to the form of J  5 and J   given in Appendix A, it can be verified that J  5 B −1 (q)J    = 0 2×1 and (J   B −1 (q)J   5 )  = 0 1×2 , which simplify the expressions in (11) to implying that Since B(q) is a positive definite matrix and J  5 and J   are full rank matrices, it can be verified that J  5 B −1 (q)J   5 = M 1 and J   B −1 (q)J    = M 2 are symmetric positive matrices and consequently they are invertible.Finally, replacing the solution for F  and   in (10) we obtain This result, along with the fact that q + = q − = q, allows us to determine the restart condition of the continuous dynamics in (3).To do so, we introduce a change of coordinates that represents the transformation of the swing leg to the stance leg and vice versa.By symmetry of the legs, this is done by relabeling the coordinates of q and q .We express that relabeling as a matrix D ∈  5×5 (R) acting on the first five coordinates of q and q such that DD = I 5×5 .Notice that the last coordinates of q and q , corresponding to the position and velocity of the torso, are not affected because they are independent of the legs disposal.Finally, the collision model, which gives the robot state after the impact x + := (q, q + ) in terms of x − := (q, q − ), can be written as where Δ 2 is defined in (9).Since the calculation is direct, an explicit expression of Δ is not given.However, the implicit function theorem implies that Δ is as smooth as the entries of Π in (7).Hence, we can conclude that Δ is analytic in x − .

Complete Model as a Hybrid
System.Now, we describe a form to represent the complete model of the biped taking into account the continuous part given by ( 3) and the discrete part given by ( 15).This kind of hybrid systems can be described as a system with impulsive effects [21].The following proposition establishes the complete model of the biped robot.
Proposition 3. The solution x() of the biped's model described by ( 3) and ( 15) corresponds to the solution of the system with impulsive effects: where x − () := lim ↗ x() and x + () := lim ↘ x() are, respectively, the left and right limits of the solution x(), Δ is given by (15), and with where P

𝑦 5 represents the height of the swing foot. See (A.5) in Appendix A for the explicit expression of
Roughly speaking, the solution trajectories of the hybrid model are specified by the single-support dynamics until the impact, which occurs when the state reaches the set S. Physically, this represents the collision between the swing foot and the walking surface.
In Section 4 we will focus on the design of a control law of the form u = (x) ∈ R 6 in order to yield a closed-loop system whose solutions produce an adequate walking profile.The closed-loop system can be written as a new system Σ 2 with impulsive effects: Closed-loop system (19) must satisfy the following hypotheses: (HS1) X ⊂ R  is open and simply connected.
(HS2) F : X → X is continuous and the solution of ẋ = F(x) for some initial condition is unique and has continuous dependence on initial conditions.
Hypothesis (HS2) implies that for some x 0 ∈ X there exists a solution of the system ẋ () = F(x) over a sufficiently short time interval.It is worth noting that the continuity of the closed-loop vector field F depends on the feedback control law and it will be remarked in Section 4.3 for different control laws.Hypothesis (HS3) implies that S is a smooth embedded submanifold of X. Hypothesis (HS4) guarantees that the result of the impact varies continuously with respect to the contact point on S. Hypothesis (HS5) ensures that the result of the impact does not yield immediately another impact event, since every point in Δ(S) is at a positive distance from S.

Dynamic Constraint.
The validity of the complete model is constrained to verify a condition on the center of pressure (CoP).The CoP represents the point in the stance foot polygon at which the resultant of distributed foot ground reaction acts [22].In our case of study, the resultant ground reaction R  is given by where L  and w  are the linear momentum and weights of each link B  , respectively.The sum of moments with respect to the point P 1 satisfies where  1 is the input torque applied in the stance foot's ankle and R   is the vertical component of the resultant ground reaction force.

Proposition 4. The validity of the model is verified if and only if
where  0 is the mean length of the stance foot's link.
The observance of condition (22) means that the stance foot will remain flat on the ground; the stance foot never rotates to be on heels or toes [22].Thus, the biped remains fully actuated along the walking.

Finite-Time Walking Control of the 7-Link Biped Robot
In this section, we present the design of a control law of the form u = (x) ∈ R 6 in order to yield a stable solution of system (16).At the same time, the solution must correspond to stable walking and must be consistent with hypotheses (HW1), . . ., (HW4) presented in Section 2.

Output Definition and System
Linearization.The generation of a stable robot walk is addressed by imposing a set of virtual constraints on the joint's positions in such a way that the torso is maintained nearly upright, the hips remain slightly in front of the midpoint between both feet, and the swing foot's ankle traces a parabolic trajectory.The virtual constraints are imposed on the robot by means of feedback control and, particularly, via an input-output linearization [23].The virtual constraints are codified in an output function y := h(q) from which a local diffeomorphism can be built in order to linearize the single-support dynamics (3).This is enunciated in the following lemma.
Lemma 5. Let h : R 6 → R 6 be an output function of system (3) defined as where P 3 and P 5 are the Cartesian coordinates of the hips and the swing foot's ankle, respectively (see Appendix A).The vector P 1 = (  ,   , 0) ∈ R 3 represents the Cartesian coordinates of the stance foot's ankle,  and  are constants such that 0 <  < 2 1 and 0 <  < 1, and the function  : R → R is given by where  is a constant such that 0 <  < 2 1 .Then T : R 12 → R 12 , defined as (q, q )  → (h (q) , h (q) q q ) := (y, ẏ ) , expresses a local diffeomorphism for each x in the set Proof.The Jacobian matrix of T with respect to x := (q, q ) is given by the following block matrix: Then, we have det which implies that J  is a nonsingular matrix for each x ∈ X  .Besides, h is at least two times continuously differentiable, and in consequence T is continuously differentiable.Hence, T : X  → R 12 defines a local diffeomorphism for each x ∈ X  .
The output definition corresponds to the following relationships:  1 and  2 control the horizontal and vertical positions of the swing foot, respectively,  3 controls the horizontal position of the hips, and  4 ,  5 , and  6 control the angular position of the stance leg's femur, the angular position of the swing foot, and the angular position of the torso, respectively.Remark 6.The parameter  allows setting the step size of the robot walking.The function  imposes that the position of the swing foot's ankle tracks a parabolic trajectory for each step.The parameter  establishes the maximum height of the swing foot (maximum of the parabolic trajectory) during each step.The parameter  allows the robot to adopt an adequate configuration at the impact of the swing foot with the ground.For instance,  = 0.5 imposes symmetry in the robot configuration at each step, such that the hips remain centered between both feet.A value  > 0.5 moves the hips in front of the midpoint between the feet, which is convenient to avoid the singularity (28), although the CoP also moves in front of the ankle.Thus,  must be defined taking into account the compromise of avoiding the singularity and keeping the CoP close to the ankle.Remark 7. As long as h(q) → 0 ∈ R 6 , the biped adopts an adequate configuration to give a step forward.Hence, the control objective is to achieve that the output vector y = h(q) converges to the origin.
Notice that the constrained state-space X  is open and simply connected.Thus, hypothesis (HS1) is satisfied.In order to verify whether the robot dynamics in the single-support phase is linearizable through the change of variable z := T(x) expressed in (25), it must be also accomplished that T(X  ) contains the origin [23].This is proved next, first by giving the analytical expression of the inverse of the diffeomorphism.Additionally, we have From that, we can obtain Let us define P  5 − P  3 :=   and P  5 − P  3 :=   , as shown in Figure 3, such that Once that  1 is known from (31), we can compute  3 in terms of the outputs  1 ,  2 ,  3 , and  4 as follows: where, according to Figure 3, ) . ( Taking   and   in terms of  3 and  4 from (32), we obtain Hence, On the other hand, from (25), the vector of rotational velocities is given by q = ( h (q) q ) Proposition 9.There exists x * ∈ X  such that T(x * ) = 0 ∈ R 12 .
Once it has been proved that T : X  → R 12 as defined in ( 25) is a diffeomorphism and that T(X  ) contains the origin, we can enunciate the following theorem, which supports the input-output linearization of the biped dynamics in the single-support phase.
Theorem 10.System (3) is linearizable in X  under the diffeomorphism T : X  → R 12 defined in (25).Moreover, the linearized system for the variable z := T(x) := (y, ẏ ) adopts the form where A  and B  are block matrices given by and k is an auxiliary control variable obtained via an assignment for u given by where (x) = (h(q)/q)B −1 (q) and (x) = C(x) + G(q) − B(q)(h(q)/q −1 )( 2 h(q)/q 2 )( q , q ).The matrices B, C, G are defined in (3) and h is as given in (23).
Proof.By Lemma 5 and Proposition 9 we have that T is a diffeomorphism and T(X  ) contains the origin.The time derivative of the change of variable z := T(x) using the chain rule yields Therefore, if u =  −1 (x)k + (x), with (x) and (x) as in the statement, then the above system can be expressed by The term (x) is nonsingular since h(q)/q is invertible for each x ∈ X  (see (28)) and B(q) is positive definite; therefore the product (h(q)/q)B −1 (q) is invertible and its inverse is given by Additionally, we have to verify the controllability of linearized system (41).Its controllability matrix is given by Since Besides, I 6×6 ], which implies that rank(K  ) = 12, and the linearized system is controllable.Hence, nonlinear system (3) is linearizable.
Notice that system (41) can be also expressed as a set of six decoupled double integrators 4.2.Second-Order Sliding Mode Control.Second-order sliding mode control, whose foundations can be found in [12], has been studied for the robust stabilization of double integrator systems; see, for instance, [13,14].A double integrator system can be written as where  represents a matched disturbance.As it was mentioned above, linearized system (41) is a set of six decoupled double integrators.A sufficient condition for the swing foot to collide with the ground is that each double integrator converges to the origin (  = 0, ż +6 = 0).In other words, for the biped to give one step forward, it is necessary that the flow of the system crosses the hypersurface S. In order to guarantee a finite-time crossing, for z of (41), we seek for a finite-time convergence to the origin, which can be accomplished by a second-order sliding mode controller.

Discontinuous Twisting Control.
In [13], it is proved that the so-called twisting control given by yields the origin ( 1 = 0,  2 = 0) of the double integrator (50), an equilibrium point globally asymptotically stable in finite-time for  2 >  1 .It is evident that control law (51) is discontinuous; hence, a small undesired effect of chattering appears [9,12], in addition to the large energetic effort required by the discontinuous control.However, thanks to the theoretical capability of switching at infinite frequency, discontinuous control (51) is robust against a large class of disturbances [12,13].

Continuous Twisting Control.
In order to alleviate the issues of the discontinuous twisting control, the following continuous second-order sliding mode control has been proposed in the literature [14] as a simplification of the controller proposed in [15]: where 0 <  < 1 and  2 >  1 .In [14] it has been proved that, by using control law (52), the origin of the double integrator (50) is an equilibrium point globally asymptotically stable in finite-time.In contrast to (51), control law (52) is continuous and for the biped control, it generates a continuous closedloop vector field F(x) of ( 19), satisfying hypothesis (HS2).This continuous control is robust against some disturbances; in particular vanishing perturbations satisfying a specific growth condition can be rejected [14].

Continuous Integral Twisting
Control.The continuous twisting control described above has limited robustness properties [14].To overcome such limitation, a continuous integral sliding mode control has been proposed in [24] and applied in [25] for control of an industrial emulator setup.This approach proposes to augment twisting controller (52) with a dedicated term that deals with disturbances.Basically, controller (52) acts as a nominal finite-time controller and it is coupled with an integral sliding mode based on the supertwisting algorithm [12].Thus, a robust continuous controller for the double integrator is given by where  results from the solution of ζ = ẋ 2 − V nom and 0 <  < 1,  2 >  1 ,  3 ,  4 > 0. Controller (53) is continuous due to the combination of two continuous controls.Moreover, due to the disturbance observation property of the supertwisting algorithm, this controller is able to reject even persistent disturbances [24].

Finite-Time Convergence of the Linearized System for
the Biped.We propose to exploit the robustness properties and finite-time convergence of the twisting control, in its discontinuous and continuous forms, in order to achieve an adequate convergence of the set of selected outputs (23) to y = ( 1 , . . .,  6 ) = 0, which generates a step of the robot, as highlighted in Remark 7. Recall that ẏ = ( 7 , . . .,  12 ).Theorem 11.Linearizing control (43) for system (3) yields the origin of linearized system (41), an equilibrium point globally asymptotically stable in finite-time under the assignment of auxiliary control v given by (for x = ( 1 , . . .,   ) ∈ R  , one considers sign(x) = (sign( 1 ), . . ., sign(  ))) where 0 ≤  < 1 and the matrices K  for  = 1, 2 are diagonal matrices given by The settling time of system (41) is given by where  1 , . . .,  6 are the settling times to the origin of each decoupled double integrator (49).
Proof.As stated in Theorem 10, the single-support dynamics of the biped (3) can be linearized through control (43) to obtain (41).This linearized system can be expressed as the set of six double integrators (49).When  = 0, the proof follows from Theorem 4.2 of [13], while for  ∈]0, 1[ the proof follows from Theorem 1 of [14].
Remark 12.Although the auxiliary control v (54) within the linearizing control u (43) yields the point x * of system (3), specified in Proposition 9, an equilibrium point globally asymptotically stable in finite-time, the initial conditions of system (3) must be constrained to X  , since this subset is the validity domain of the linearization of the system through the diffeomorphism T.

Considerations for Control Gains Tuning.
The following proposition states that, from an initial condition x 0 ∈ X  , there exists a finite-time  * at which the flow of system (3) crosses the hypersurface S (17).The value  * imposes a constraint for the settling time of the system's outputs.
Assume that  5 >  * with  * as in the previous proof; then    * (x 0 ) ∈ S for some x 0 ∈ X  .However, there is no certainty that  5 ( * ) =  5 ( * ) = 0, which means that the biped might not have an adequate configuration to give a step according to hypothesis (HC3) of Section 3.2.Thus, it is not sufficient to have the origin of system (41) asymptotically stable in finite-time to achieve stable walking of the biped and consistent with the hypotheses of Section 3.2.According to this observation, an adequate tuning of the control gain matrices K 1 , K 2 must be carried out, in such a way that the subsystems of (49) have settling times that allow the robot to adopt an adequate configuration at the moment of collision with the ground.In particular, the swing foot must be completely parallel to the ground at the moment of collision (HC3).
Thus, an adequate tuning of control gains must be carried out to ensure that the settling time of the variable  5 is lower than the settling times of  2 ,  3 ,  4 , and  6 , and in turn, the settling times of these variables are lower than the settling time of the horizontal position of the swing foot  1 .To achieve these conditions, we use the method proposed in [16,17] as an initial approximation.However, other important aspects must be also considered in the tuning process, for instance, reducing overshooting and oscillation of the angular positions and verifying the condition for the CoP (Proposition 4).

Robustness Analysis.
Robustness of twisting sliding mode control has been proved for the discontinuous version (51) in [13], for the continuous version (52) in [14], and for the continuous integral version (53) in [24].In all the cases, the robustness is justified for matched additive disturbances in a double integrator system as expressed in (50).In this section, we prove that uncertainty in the masses parameters of the biped robot appears as a matched additive disturbance in linearized system (41), in such a way that previous robustness results in the literature hold.
Proof.The matrix of inertia for system (3) is given by B(q,   ,   ,   ) = (/ q )(/ q )K(q, q ) (see Appendix B), where ) is the kinetic energy of the system.Since 2 .It follows that, under numerical deviations on the mass parameters, the kinetic energy turns into the following expression: The first two terms of the sum constitute the matrix of inertia with real parameters and the last two terms of the sum constitute an additive deviation.Then, the estimated matrix of inertia can be written as follows: B (q) := B (q, λ , λ , λ ) = B (q,   ,   ,   ) Similarly, using the definition of the Coriolis matrix C given in Appendix B, we have Since B(q, λ , λ , λ ) = B(q,   ,   ,   ) + B(q, ,   , (1/3) 1  2 1 , . . ., (1/3) 6  2 6 ), it follows that Ĉ (q, q ) := C (q, q , λ , λ , λ ) = C (q, q ,   ,   ,   ) Finally, the vector field G is given by G(q,   ,   ,   ) = (P(q)/q)  , where P(q) = − ∑ 6 =1   g  Q  is the potential energy of the system.For estimated masses, this energy is given by letting us conclude that Ĝ (q) := G (q, λ , λ , λ ) The proposition above allows us to decompose the estimated matrices B, Ĉ, and Ĝ as the sum of the real matrices B, C, and G plus some deviation matrices in terms of .Thus, we can show the effect of the parametric uncertainty on linearized system (41).For the next result, it is important to notice that the vector field h does not depend explicitly on parameters of masses   and inertias   .Thus, the vector field h is the same under deviation on these parameters.Proposition 15.Let λ =   +  be a vector of estimated masses.Under λ , the controller u defined in (43) transforms linearized system (41) into the following system: with Γ(, x) given by where , , Proof.From (43), the controller u under λ is given by By Proposition 14, B(q) = B(q,   ,   ,   ) + B  , Ĉ(q, q ) = C(q, q ,   ,   ,   ) + C  , and Ĝ(q) = G(q,   ,   ,   ) + G  , which gives where D  = B  ((h(q)/q) −1 )(k −( 2 h(q)/q 2 )( q , q ))+C  q+ G  .Under this control law, system (3) is given by being ^= k − ( 2 h(q)/q 2 )( q , q ).Linearized system (41) is obtained from the change of variables z = T(x).If z is derived with respect to  and using the above expression for ẋ , we can write The proposition above proves that the effect of parametric uncertainty in the masses and inertias over linearized system (41) is to generate a matched additive uniformly bounded disturbance.Therefore, previous robustness results in the literature for the three cases of twisting control hold.It is worth noting that a similar analysis can be done to show that a bounded impulsive external disturbance also produces an additive bounded disturbance on linearized system (41).

Simulation Results
In this section, we present numerical results from the solution of the bipedal walking model.In particular, we show the solutions for hybrid system (16) under the linearizing control law u defined in Theorem 10.We evaluate three different approaches to achieve finite-time convergence as stated in Theorem 11 from the auxiliary control k.The evaluated approaches are the discontinuous and continuous twisting controls of Sections 4.2.1 and 4.2.2, respectively, and the continuous integral twisting control of Section 4.2.3.Results are obtained from an implementation of the biped model and the walking control in Python, exploiting the symbolic capabilities of the library SymPy.We use the physical parameters (mass, inertia, and length) presented in Table 1, which are close to the average proportions of a human adult.
The walking parameters , , and  (see Remark 6) are chosen according to Table 2.For simplicity and to restrain the initial condition x(0) to X  (see Remark 12), in all the results, x(0) is taken near the value Δ(h −1 (0), 0) which physically corresponds to a step configuration.In all the next sections, we present results that physically correspond to 10 steps forward of bipedal walking.

Discontinuous Twisting Control (DTC).
The results of this section show the evolution in time of hybrid system (16) under the auxiliary control k defined in Theorem 11 with control parameters  = 0, K 1 = diag(0.32,0.08, 0.32, 0.24, 0.4, 0.4), and K 2 = diag(0.336,0.088, 0.336, 0.28, 0.416, 0.416).Since this controller yields a discontinuous closed-loop system, numerical problems appear during the integration process to obtain the system's trajectories.To overcome this issue, we use an approximation of the sign function as proposed in [26]: sign() = /( + ), with  = 10 −4 .Figure 4 shows the evolution in time of the output y() (a) and the CoP (b).In this case, an overestimation of 2% of the masses with respect to the real values is introduced in the controller, which similarly affects the inertias.Thus, the linearized system defined in Theorem 10 takes the form stated in Proposition 15.For the output function, we can observe a finite-time cross through the origin, which implies a collision between the swing foot and the ground.The control gains K 1 and K 2 were tuned in such way that the biped adopts an adequate configuration for the step before the collision (see Section 4.4).For the CoP, we can observe that the dynamic constraint CoP  ∈ [− 0 ,  0 ] is fulfilled through the whole walk (see Proposition 4) which means that the stance foot stays in planar contact with the ground.Note that all components of the output do not directly converge to zero, but they have an overshoot that generates no null velocities at the moment of impact with the ground.This behavior is intrinsic to the DTC and it is an undesirable effect because some peaks are generated in the CoP.
Figure 5 presents the evolution of the configuration variables  1 , . . .,  6 of the robot.Note the periodic behavior of all the variables.Moreover, we can see the periodic alternation between the variables  1 and  4 and between variables  2 and  3 , which shows the shifting between stance and swing phases for each leg.
Figure 6 shows the evolution of the output y() (a) and the CoP (b).For y(), we can say that it converges in finitetime to a point in a neighborhood of the origin, which means that the controller cannot overcome the persistent disturbance introduced by the parameters deviation.Another feature of the output is that none of its components have an overshoot, in contrast to Figure 4.This means that the swing foot contacts the ground in a smooth manner.Thus, the CoP in Figure 6(b) does not present the peaks appearing in Figure 4 and it remains inside the desired range.
Figure 7 shows the configuration variables  1 (tibia angle) and  2 (femur angle) against its derivatives.How, from  the initial condition, both trajectories converge to an apparent periodic orbit can be seen.In both cases, we can see the discontinuity introduced by the collision between the swing foot and the ground, which is modeled by Δ defined in (15).Figure 8 shows the evolution of the feet positions.Both feet follow the parabolic trajectory (24) that prevents the contact between the swing foot and the ground before the desired step size is reached.However the obtained step length does not accurately match the walking parameter  = 0.15 m.This is due to the fact that the output does not accurately converge to the origin in the presence of the parametric uncertainty.

Continuous Integral Twisting Control (CITC).
In this section, we present some results using the auxiliary control k defined in Theorem 11 with control parameters  = 0.9, K 1 = diag(3, 2, 3, 3.5, 2, 2), and K 2 = diag(3.01,2.1, 3.01, 3.51, 2.5, 2.5) and including the integral term as defined in (53), taking the same gains for the term V stc and η as 2.5 for each component of k.Once again, we consider a parametric deviation of +10% on the mass parameters.
Figure 9 shows the behavior of the output y() and the CoP for the integral controller.The output achieves a smooth convergence to the origin, in contrast to the result of Figure 6.This means that this controller is more robust than the one of the previous section.Thus, the biped attains a desired configuration at the moment of the collision with the ground.The constraint of the CoP is also satisfied using this case.
Figure 10 presents the evolution of the tibia and femur angles against their time derivatives.Similarly to the continuous twisting control, the trajectories seem to converge (in finite-time) to a presumed periodic orbit.
In Figure 11, we can see the evolution of the feet positions.In contrast to Figure 8, the trajectories followed by the feet accurately reach the desired step size  = 0.15 m even with the same level of parametric deviation.We found through several simulations that it was necessary to augment the control gains to maintain stability for large disturbances.However, an increase in the gains would imply a raise on the maximum values of |CoP  |.In order to include a larger parametric deviation and to consider an impulsive external disturbance (a push in the torso), we use higher gains for the matrices K 1 and K 2 , with the cost of not satisfying the constraint of the CoP.In spite of that, the following results allow us to show the effectiveness of the integral twisting control in rejecting effectively impulsive and persistent disturbances.
The results presented below are based on the solutions of the hybrid system considering a parametric deviation of +15% on mass parameters.Besides, a horizontal impulsive force is introduced on the center of mass of the torso with a constant magnitude of 30 N with a duration of 0.05 s applied at  = 7 s.
Figure 12 shows the evolution of the output y() (a) and the feet position (b).It can be seen that the output converges repeatedly to the origin in finite-time, providing an appropriate walking pattern at each step.At  = 7 s, the effect of the impulsive disturbance on the system and how the controller is able to correct the deviation produced can be visualized.For the feet, it can be seen that they follow the specified parabolic trajectories.The impulsive disturbance affects temporally these trajectories; however, the controller rejects the disturbance effect before the robot's swing foot collides with the ground.
In Figure 13, we present the evolution of the tibia and the femur angles  1 and  2 , respectively, against their time derivatives.How, from an initial condition, the trajectories approach an apparent periodic orbit can be seen.The impulsive disturbance is manifested with a large deviation from the aforementioned periodic orbits.However, as shown in Figure 12, the controller is capable of rejecting the disturbance, which implies that the trajectories return to the periodic orbit.Figure 14 (above) presents the walking motion of the biped robot as a sequence of stick figures over the ten steps.Figure 14 (below) displays some details of the walking motion during the time interval where the impulsive disturbance is applied.

Conclusions and Future Work
In this paper we have derived a complete model of a planar biped robot with six degrees of freedom and proposed a finite-time walking control by using second-order sliding mode control.The robot model is developed as a hybrid dynamical system with a continuous fully actuated singlesupport phase and an instantaneous double-support phase.The last one represents the discontinuous transition of the robot angular velocities when the swing foot collides with the ground.For the walking control, we have presented the synthesis of a controller based on an adequate selection of outputs, which are controlled to track adequate references that impose virtual constraints and encode a walking pattern.Finite-time convergence of the tracking errors is enforced, particularly, by using the twisting algorithm.We have evaluated and compared the performances of the walking control for discontinuous and continuous twisting control in the presence of parametric uncertainty and external disturbances.The robot model and the synthesized controller are evaluated through numerical simulations.Regarding our results, the continuous integral twisting control has shown the best performance in terms of robustness, smoothness of the system's solution, and walking speed.Although the discontinuous twisting control is well known to be robust, it requires values of control gains that might produce violation of the center of pressure (CoP) constraint.Besides, this control has intrinsic effects of overshoot and oscillation that are not desirable for bipedal walking control.
According to our results, we have realized that the dynamic constraint imposed by the CoP is really restraining, in the sense that the tuning of control gains must take it into account.As future work, we propose to explore the use of evolutionary algorithms to facilitate the tuning of control gains whereas robustness is ensured and the CoP constraint is satisfied.An alternative to alleviate that issue is to extend the model to allow the robot feet to rotate on heels or toes when the CoP constraint is not satisfied.In this work, we have presented a particular diffeomorphism to transform the system into a linear form; however different options can be generated.We chose the presented diffeomorphism because its validity domain can be given explicitly and in a simple form.This allows us to avoid singularities from an adequate selection of walking parameters.However, a complete comparison of different diffeomorphisms can be done as future work.Additionally, the proposed walking pattern, defined in terms of some tracked references, might be subject to optimization in terms of energy consumption.

Proposition 8 . 3 P 5 Figure 3 :
Figure 3: Geometry of the swing leg to compute  3 and  4 from P 3 and P 5 .

Figure 4 :
Figure 4: Output and CoP evolution for the DTC.

Figure 9 :
Figure 9: Output and CoP evolution for the CITC.

Figure 12 :
Figure 12: Output and tracking of parabolic reference for the CITC with impulsive disturbance.

Figure 13 :Figure 14 :
Figure 13: Orbits for  1 and  2 for the CITC with impulsive disturbance.

Table 1 :
Numerical values of the physical parameters.

Table 2 :
Numerical values for the walking parameters.