Planar Walking of a Five-Link Biped Robot over a Stepped Surface with Obstacles of Different Heights and Lengths

A problem of modeling biped locomotion is an actual and complex problem of modern control theory. In the present paper, we deal with a special case when a five-link biped robot with knees moves along a given stepped surface. We describe the robot motion by a hybrid system which consists of a system of ordinary differential equations at the single support phase and an algebraic relation at the double support phase. The main contribution of this paper is the construction of a periodic motion that satisfies a set of conditions inherent in human walking. The results of the paper will be useful to those who are interested in control theory applications.


Introduction
Control of biped locomotion plays an important role in nonlinear control theory and robotics, because biped robots are less picky about the walking surface compared to other types of mobile robots.From the other hand, the dynamics of biped mechanisms is more complicated due to the presence of the double-support phase which occurs when the end of the swing leg touches the walking surface.That is the reason why the biped locomotion is still the focus of many researchers around the world.The first results on modeling the motion of biped robots appeared in the late 1970s [1].The detailed research on mechanics of antropomorhic robots was conducted in [2] where the author proposed a new approach to the control of biped motion based on applying impulse actuators at the moments of impact.Novel techniques to solving various problems associated with the motion of biped robots were suggested in [3,4].General frameworks for modeling and control of biped robots were discussed in the reviews [5] and [6].
The most popular approach to biped walking control is based on the analysis of nonlinear systems with impulse effects [7].The approach allows us to construct periodic motions of biped robots and is based on defining a finite number of outputs whose equality to zero corresponds to the desired motion at each step.These outputs have to be stabilized so that convergence to zero is reached before the end of each step.For this purpose, either traditional PD control laws [8,9] or finite-time stabilizing controllers [7,10] can be successfully applied.Taking the state just before the beginning of the first step as an initial state, one should determine the initial state corresponding to a periodic motion of the robot.The above-mentioned approach has been applied to control the bipedal locomotion of various robots moving on various surfaces.In this regard, the following problems should be mentioned: running a 5-link 2D-robot on a Figure 1.Robot scheme horizontal plane [11], rising a 5-link 2D-robot on the stairs [12], walking a 5-link 3D-robot [13,14], and moving a 5-link 2D-robot on a surface with one periodically repeating obstacle [15].It is worth noting that a topological approach to generating families of walking gaits for 2D and 3D biped robots has been proposed in [16].
In the present paper, we demonstrate how the approach proposed in [7] can be applied to construct a periodic motion of a 5-link biped robot on a surface that includes three periodically repeated obstacles.

Robot model. Problem statement
We consider a planar biped walker cosisting of a torso and two legs with knees (see Fig. 1).The biped walker is thus a 5-link robot having seven degrees of freedom.Actuating torques are applied between the torso and the hips as well as between the hips and the lower legs.In what follows, we will use the following notations: L is the length of each link; m t , m h and m l are the masses of the torso, the hip and the lower leg, respectively; p t is the distance between the mass center of the torso and the hip joint; p h is the distance between the mass center of the hip and the hip joint; p l is the distance between the knee and the mass center of the lower leg; J t , J h and J l are the moments of inertia of the torso, the hip and the lower leg, respectively.The torques applied between the torso and the hips we denote by u 1 and u 2 ; the torques applied at the knees we denote by u 3 and u 4 (see Fig. 1).
The biped walker moves from left to right in the vertical plane over the surface consisting of periodically repeating horizontal sections and obstacles of different heights and lengths.One period of the walking surface is depicted in Fig. 2. We denote the height and the length of the ith obstacle by h i and l i , respectively, i = 1, 2, 3. We suppose that h

IC-MSQUARE-2023
Journal of Physics: Conference Series 2701 (2024) 012020 Figure 2. A period of the walking surface Thus, one period of the walking surface has length 7l 1 .The length l st of each step of the robot (i.e. the distance between the ends of the legs at the beginning of each step) is equal to l 1 .At the beginning of the first step, the end of the stance leg is located at the point A 1 .
Our goal is to construct a robot motion that possesses a number of features inherent in human walking: 1) The angle of torso inclination is small and approximately constant.
2) The hip joint is located midway between the ends of the legs.
3) The trajectory of the hip joint is approximately parabolic.
4) The trajectory of the end of the swing leg is approximately parabolic.The dynamics of a biped walker is represented by a system of ordinary differential equations at the single support phase and an algebraic relation at the double support phase.

Single support phase
At the single support phase, the end of one of the lower legs acts as a pivot.Therefore, at this phase, the robot has 5 degrees of freedom.As generalized coordinates for this phase, we use the angles q k , k = 11, 31, 32, 41, 42, counted counterclockwise as depicted in Fig. 1.

Outputs for the single support phase
For each single support phase, we will define a 4-dimensional output whose equality to zero corresponds to the motion satisfying the conditions 1)-4).First, we will consider a series of seven steps depicted in Fig. 3.Then, we will develop an algorithm for constructing a periodic motion over the surface that is a periodic continuation of the surface shown in Fig. 3. Let q di 11 be the desired angle of torso inclination for the ith step.The first component y i 1 of the output y i for the ith step can thus be chosen as It is evident that y i 1 ≡ 0 if and only if the condition 1) holds.The Cartesian coordinates of the hip joint, (X H , Z H ), and the end of the swing leg, (X 1 , Z 1 ), are expressed in the Cartesian coordinate system OX 2 Z 2 by the relations X H = L(sin q 42 + sin q 32 ), Z H = −L(cos q 42 + cos q 32 ), (3) To satisfy the condition 2), we require that the relation X H = (X 1 + X 2 )/2 should be met throughout each single support phase.Rewriting this condition in the form (X H − X 1 ) + (X H − X 2 ) = 0, we conclude that the second component y i 2 of the output y i should be chosen as where The remaining two components of y i are defined by the relations where Z di H (d 2 ) and Z di 1 (d 2 ) are the desired dependences of Z H and Z 1 on d 2 at the ith step.We will construct the functions Z di 1 (d 2 ) and Z di H (d 2 ) separately for each of the seven steps.All the functions Z di 1 (d 2 ) and Z di H (d 2 ) will be sought as polynomials of degree 2. Each polynomial must satisfy a given set of three conditions.To define these conditions, let us introduce the following notations: 1int is the desired intermediate value of Z 1 at the ith step.Note that all these heights are counted from the ground level.Note that intermediate values of Z H and Z 1 will be chosen for different values of d 2 depending on the step number.
Step 1.The first step is performed on the horizontal section of the surface (see Fig. 3).The values of Z 1 Hint and Z 1 1int will be given for d 2 = 0.The conditions on Z d1 1 (d 2 ) thus acquire the form As a result, we obtain The desired dependence of Z 1 on d 2 is depicted on Fig. 4.

IC-MSQUARE-2023
Journal of Physics: Conference Series 2701 (2024) 012020 The conditions on Z d1 H (d 2 ) are chosen as follows: Hence, Z d1 H (d 2 ) is determined by the relation Step 2. At this step, the end of the stance leg remains at the grond level, the end of the swing leg rises to the first obstacle (see Fig. 5), and the values of Z 2 Hint and Z 2 1int will be set at d 2 = l st /4.The conditions on Z d2 1 (d 2 ) have thus the form Hence, the function Z d2 1 (d 2 ) is determined by the relation The conditions on Z d2 H (d 2 ) have the form As a result, Z d2 H (d 2 ) is given by Step 3. At this step, the end of the stance leg remains on the first obstacle, the end of the swing leg rises to the second obstacle (see Fig. 6), and the values of Z 3 Hint and Z 3 1int will be given for d 2 = l st /4.The conditions on Z d3 1 (d 2 ) are, thus, chosen as The conditions on Z d3 H (d 2 ) are given by the relations Consequently, the function Z d3 H (d 2 ) acquires the form Step 4. At this step, the end of the stance leg remains on the second obstacle, whereas the end of the swing leg is transferred through the second obstacle and placed on the third obstacle (see Fig. 7).The values of Z 4 Hint and Z 4 1int will be set at d 2 = l st /4.The conditions on Z d4 1 (d 2 ) have thus the form As a result, the function Z d4 1 (d 2 ) is chosen as The conditions on Z d4 H (d 2 ) have the form Hence, the function Z d4 H (d 2 ) is given by the relation Step 5.At this step, the end of the stance leg remains on the third obstacle, and the end of the swing leg goes down from the second obstacle to the third one (see Fig. 8).The values of Z 5 Hint and Z 5 1int will be given for d 2 = −l st /4.The conditions on Z d5 1 (d 2 ) are chosen as The function Z d5 1 (d 2 ) acquires the form The conditions on Z d5 H (d 2 ) are chosen as Step 6.At this step, the end of the stance leg remains on the third obstacle, whereas the end of the swing leg goes down from the third obstacle to the ground level (see Fig. 9).The values of Z 6  Hint and Z 6 1int will be set at d 2 = −l st /4.The conditions on Z d6 1 (d 2 ) have the form It follows that the function Z d6 1 (d 2 ) can be chosen as The conditions on Z d6 H (d 2 ) have the form Hence, the function Z d6 H (d 2 ) is given by the relation Step 7. At this step, the end of the stance leg remains at the ground level, and the end of the swing leg goes down from the third obstacle to the ground level (see Fig. 10).The values of Z 7  Hint and Z 7 1int will be given for d 2 = −l st /4.The conditions on Z d7 1 (d 2 ) are chosen as The function Z d7 H (d 2 ) should satisfy the conditions Hfin .
As a result, Z d7 H (d 2 ) is given by the relation

Finite-time stabilization of the outputs
Our next goal is to stabilize the outputs y i , i = 1, . . ., 7, of system (2).To solve this problem, we firstly need to find the relative degree of the outputs y i , i = 1, . . ., 7 [17].To this end, we will differentiate each component of the output y i along trajectories of system (2) until at least one of the controls appears.Differentiating the function y i 1 = q 11 − q di 11 along trajectories of systems (2), we get Since ÿi 1 contains u k , we stop differentiating y 1 i and proceed to differentiating the components y i 2 .Since y i 2 = d 1 + d 2 , i = 1, . . ., 7, we have to calculate the derivatives of d 1 and d 2 along trajectories of system (2).Recall that d 1 and d 2 are given by the relations (5).Hence, ḋ1 = L( q41 cos q 41 + q31 cos q 31 ) = L(x 9 cos x 4 + x 7 cos x 2 ), ḋ2 = L( q42 cos q 42 + q32 cos q 32 ) = L(x 10 cos x 5 + x 8 cos x 3 ).( 6) We observe that d 1 and d 2 do not depend on u k .Therefore, ẏi 2 = ḋ1 + ḋ2 does not depend on u k too.Calculating the second derivatives of d 1 and d 2 along trajectories of system (2), we obtain d1 = L(−x 2 9 sin x 4 − x 2 7 sin x 2 + ẋ9 cos x 4 + ẋ7 cos x 2 ), d2 = L(−x 2  10 sin x 5 − x 2 8 sin x 3 + ẋ10 cos x 5 + ẋ8 cos x 3 ).
Replacing ẋj , j = 7, 8, 9, 10, with the right-hand sides of the respective equations of system (2), we have We see that d1 and d2 depend on u k .It can be easily checked (for example, using MATLAB) that the functions ÿi 2 , i = 1, . . ., 7, also depend on u k .Let us consider the components Recall that Z H and Z di H (d 2 ) are given by the expressions where a i H , b i H , c i H are some constants.Therefore, calculating the first derivative of y i 3 along trajectories of system (2), we obtain Since ḋ2 does not depend on u k (see ( 6)), the functions ẏi 3 do not depend on u k too.Differentiating ẏi 3 along trajectories of system (2), we get ÿi 3 = L(x 2 10 cos x 5 + x 2 8 cos x 3 + ẋ10 sin x 5 + ẋ8 sin We know that ẋ8 , ẋ10 and d2 (see (7)) depend on u k .It can be easily checked (for example, using MATLAB) that the functions ÿi 3 , i = 1, . . ., 7, also depend on u k .Therefore, we may move on to the components are determined by the relations where a i 1 , b i 1 , c i 1 are some constants, calculating the derivatives of y i 4 along trajectories of system (2) yields ẏi 4 = L(−x 7 sin x 2 + x 8 sin x 3 − x 9 sin x 4 + x 10 sin x 5 ) − 2a i We know (see ( 6)) that ḋ2 does not depend on u k , therefore the functions ẏi 4 do not depend on u k too.Calculating the second derivative of y i 4 along trajectories of system (2), we obtain ÿi 4 = L(−x 2 7 cos x 2 + x 2 8 cos x 3 − x 2 9 cos x 4 + x 2 10 cos x 5 − ẋ7 sin x 2 + ẋ8 sin x 3 − ẋ9 sin x 4 + ẋ10 sin x 5 ) . Since ẋ7 , ẋ8 , ẋ9 , ẋ10 and d2 (see (7)) depend on u k , the functions ÿi 4 depend on u k too (it can be checked directly using MATLAB).
Based on the above calculations, we can conject that the relative degree of the outputs 2) for all i = 1, . . ., 7. To prove this conjecture, we have to rewrite the expressions for the second derivatives of y i k , k = 1, . . ., 4, in the form where E i (x) is a 4 × 1-column and G i (x) is a 4 × 4-matrix whose entries can be calculated using MATLAB and are not given here due to cumbersomeness.It can be shown using MATLAB that all the matrices G i (x), i = 1, . . ., 7, are nonsingular for all feasible robot configurations.Therefore, we conclude that the relative degree of the outputs y i = (y i 1 , y i 2 , y i 3 , y i 4 ) T is equal to (2, 2, 2, 2) for all i = 1, . . ., 7.
Introducing the new inputs T , i = 1, . . ., 7, by the relation we rewrite (8) as a set of double integrators Our goal is to stabilize the zero equilibrium point.It should be noted that convergence to zero must be reached in a finite time, less than or equal to the duration of the step.In this case, the outputs will be reproduced with good accuracy, at least towards the end of the step.One of the approaches to finite-time stabilization was proposed in [18].A detailed explanation of how to apply this approach to solving the stabilization problem for biped robots can be found, e.g., in [7].We only give the final expression [18] for the stabilizing controller for system (10): and ε j > 0, α ∈ (0, 1) are the parameters adjusting the time of convergence to zero.The finite-time stabilizing controller has thus the form Since all the matrices G i (x) are nonsingular, it follows from ( 9) that the original input u can be expressed via the new input v i at the ith step by the formula Replacing the new input v i with the finite-time stabilizing controller (11), we obtain Replacing u with ( 12) in ( 2), we obtain a closed-loop system whose output y i converges to zero in a finite time.Choosing α and ε j , we can achieve convergence to zero in a time, less than or equal to the duration of the step.

Double support phase
A double support phase is a phase of the robot locomotion when the swing leg impacts the walking surface.Following [7], we assume that each double support phase satisfies a series of hypotheses: -the impact is instantaneous, -the external forces acting from the walking surface are impulsional, -during the impact, the velocities change instantaneously, whereas the position of the robot does not change, -the torques applied at the joints are not impulsional, -the stance leg does not rebound or slip at impact, -the stance leg rises from the walking surface without interaction.The double support phase requires seven degrees of freedom.Besides the angles q i , i = 11, 31, 32, 41, 42, we will use the Cartesian coordinates (X 2 , Z 2 ) of the end of the stance leg.Let q e = (q 11 , q 31 , q 32 , q 41 , q 42 , X 2 , Z 2 ) T .It has been shown in [7,8] that, under the above hypotheses, the velocities q+ e just after impact and the velocities q− e just before impact are connected by the relation where F = (F X , F Z ) T is a two-dimensional vector representing the force acting on the swing leg at the moment of impact, D(q) is a positive-definite 7 × 7-matrix with the entries Dij = D ij , i, j = 1, . . ., 5,
In the above, q − stands for the angular coordinates just before impact.
It can be shown that the matrix D(q − ) −E T (q − ) E(q − ) Θ is nonsingular.Hence, the system (13) has a unique solution The first five components of the solution ( 14) are the velocities q+ just after impact.Finally, we have to take into account that, during the impact, there is a change in the role of the legs, i.e. the swing leg becomes the stance one and vice versa.Therefore, the state of the robot x + just after impact and the state of the robot x − just before impact are connected by the relation The overall model for biped robot locomotion is a hybrid system of the form where S = (q, q) : Z 1 (q) = Z i 1fin , X 1 (q) > 0 , i ∈ {1, . . ., 7} is a step number, and where Let us show that the velocities q− at the end of the seventh step are functions of the only parameter which can be chosen as Ẋ− H (i.e. the horizontal component of the velocity of the hip joint before the seventh impact).Due to the choice of the control law, the derivatives of the functions y 7 j , j = 1, . . ., 4, along trajectories of system (2) closed by u 7 (x), vanish to the end of the seventh step.Therefore, the equalities ẏ7 j = 0, j = 1, . . ., 4, hold at the end of the seventh step.Let us supplement these equalities by the expression Ẋ− H = L( q32 cos q − 32 + q42 cos q − 42 ) where Ẋ− H is given and q32 , q42 are unknowns.As a result, we obtain a system of linear algebraic equations with respect to q− : This system can be rewritten in the matrix form: where It can be checked that the matrix M (q − ) is nonsingular, therefore for each Ẋ− H the system (19) has a unique solution Combining ( 18) and (20), we obtain the full state of the robot at the end of the seventh step: This state is unique for any given value of Ẋ− H .

Algorithm for constructing a periodic motion
As we have shown above, the state of the robot at the end of the seventh step is unique, the value of Ẋ− H would only be given.The problem of constructing a periodic motion can thus be reduced to the problem of finding such a value of Ẋ− H that coincides with the value of ẊH just before the seventh impact calculated by using the hybrid model (16) closed by the stabilizing control (12).To solve this problem, we modify the algorithm proposed in [15] for the case when the robot moves over the surface with obstacles of different heights and lengths.We present this algorithm below.

8) Compare Ẋ−
H and ẊH (t 7 ).If they coincide (with some small accuracy), then we have found Ẋ− H corresponding to a periodic motion.Otherwise, choose another Ẋ− H and return to 1).

Simulations
For simulations, we have chosen the following values of parameters.The lengths of all links are equal to L = 1 m.Other mechanical characteristics are presented in Table 1.Moment of inertia (kg•m 2 ) J t = 6.5 J h = 2.5 J l = 0.8 Position of the center of mass (m) p t = 0.5 p h = 0.5 p l = 0.5 The characteristics of obstacles have been chosen as follows: l 1 = 1 m, h 1 = 0.4 m, h 2 = 0.6 m, h 3 = 0.2 m.We have taken the desired value of torso inclination as q di 11 = −π/10 rad for all i.The other parameters for the desired trajectories are presented in Table 2.It is obvious that the equality Z 1 Hin = Z 7 Hfin should be met.The parameters α and ε j in (12) have been chosen as α = 8/9, ε j = 1/9, j = 1, . . .  .Plots of q 1 , q 31 , q 32 , and q 41 versus time; units of radians Figure 12.Plots of q 42 and velocities versus time; units of radians (for q 42 ) and radians per second (for velocities)

Figure 3 .
Figure 3.A series of seven steps

Figure 4 .
Figure 4.The desired dependence of Z 1 on d 2 at Step 1

7 Figure 5 .Figure 6 .
Figure 5.The desired dependence of Z 1 on d 2 at Step 2

Figure 7 .
Figure 7.The desired dependence of Z 1 on d 2 at Step 4

9 Figure 8 .
Figure 8.The desired dependence of Z 1 on d 2 at Step 5

Figure 9 .Figure 10 .
Figure 9.The desired dependence of Z 1 on d 2 at Step 6

, 4 .
Using the proposed algorithm, we have established the value of Ẋ− H corresponding to a periodic motion: Ẋ− H = 1.1419 m•s −1 .The plots of the angles, the velocities and the controls over 28 steps (i.e. 4 periods) are presented in Fig. 11-13.

Table 1 .
Mechanical characteristics of the robot

Table 2 .
Parameters for the desired trajectories