A solvable walking model for a two-legged robot

We present a solvable biped walking model based on an inverted pendulum with two massless articulated legs capable of walking on uneven floors and inclined planes. The stride of the two-legged robot results from the pendular motion of a standing leg and the articulated motion of a trailing leg. Gaiting is possible due to the pendular motion conservation of energy and the alternating role of the legs, the standing and the trailing leg. The motion on uneven surfaces and inclined planes is possible by imposing the same maximal opening angle between the two legs in the transition between strides and the adaptability of the time of each stride. This model is solvable in closed form and is reversible in time, modelling the different types of biped motion. Several optimisation results for the speed of gaiting as a function of the robot parameters have been derived.


Introduction
Biped human walking and running is a complicated activity involving the coordination of complex motor, sensory and neural systems, [Holmes et al., 2006].The description of all these processes and their coordination is an enormous task demanding detailed knowledge of many biological processes, eventually some of them unknown.The ability of humans to walk requires a long process of learning by trial and error, ultimately associated with the adaptation of several neural mechanisms during human development.
Although the complexity of human walking, engineers, biologists, physicists, and mathematicians have joined efforts to build machines reproducing human movements and walking.Models describing the basic features of walking and running inspired the industry to create robots to perform some human activities [Adams et al., 2000].A simple search on the internet leads to different prototype machines mimicking jumping, walking, and running.
Two classes of models were created with entirely different dynamics to reproduce the effects of human walking and running.Walking mechanisms based on an inverted pendulum model were introduced by [Saunders et al., 1953, Alexander, 1976, Mochon and McMahon, 1981], while running models based on a springmass model were pioneered by [Blickhan,1989] and [McMahon and Cheng, 1990].These models have two articulated legs simulating the hip, knees, and feet, with many parameters.These models discussed different mechanisms for transferring kinetic and potential energies between steps.In all the cases, stride dynamics and control are computer-assisted, and all these models are non-solvable in closed form.For a generic comparative review of these models, we refer to [Geyer, 2005] and [Holmes et al., 2006].
Here, we introduce a simplified articulated two-legged robotic model with mass concentrated on the hip and feet motion is dynamically absent.This type of model mimics two-legged stilt walking.Some authors refer to this model as a kneed biped robot [Asano et al., 2004] or point foot robot [Hsu Chen, 2007].For this class of simpler robot models, the different approaches consider knees with mass and elaborated control systems [Asano et al., 2004, Hsu Chen, 2007, Makarenkov, 2020], and stochastically controlled robots [Su and Dingwell, 2007].In these models, stability is critical, and robots should have internal mechanisms for stability control and energy supply to restore the standing leg pendular energy.Moreover, the stride durations in horizontal surfaces are non-constant, and the mathematical models are non-solvable, making the derivation of generic dynamic properties and optimisation goals difficult.A two-segment robot model based on the inverted pendulum model and able to walk on inclined planes has been introduced by [Norris et al., 2008].However, due to the absence of articulated knees, this model fails to describe gaiting along uneven surfaces.So, we aim to build a solvable model for walking, leading to quantitative predictions about walking dynamics and adaptability to motion on uneven surfaces and inclined planes.
The model introduced here assumes that the energy loss is due to the inelastic contact of the trailing leg with the floor at the end of each stride, and spring-like actuation effects are not considered ( [Kuo, 2002]).The robotic leg must have an internal supply of energy that restores the pendulum energy, implying that phase space trajectories remain unchanged.We further imposed that the angle between the standing and trailing legs at the transition between consecutive strides is fixed, ensuring that gaiting in uneven terrains or inclined planes is possible without complex control mechanisms.
This paper is organised as follows.In section 2, we build the model for the movement of the two-legged robot along a horizontal flat surface, where the characteristics of the motion and optimisation results as a function of the robot parameter are derived.In section 3, the model is extended for the motion along uneven surfaces and inclined planes.In the final section, we summarise the conclusions of the paper.

Motion along a flat surface
In the inverted pendulum basic model of locomotion introduced here, the twolegged robot consists of a mass  simulating the hip and two massless articulated legs.One of the legs is the standing leg in contact with the floor, with a pendular movement, and the other articulated trailing leg makes the transition between strides, enabling gaiting.Between consecutive strides, the two legs interchange their roles.To fix parameters, the total length of each leg is ℓ, ℓ 1 is the distance from the hip to the knees, ℓ 2 is the distance from the knees to the point feet, and ℓ = ℓ 1 + ℓ 2 .In the following two subsections, we describe the motion of each leg separately.

The pendular motion of the standing leg
In figure 1, the succession of phases of locomotion of the two-legged robot is represented.The different stages of motion have the following characteristics: i) The motion starts at time  =  0 , with the standing leg 1 making the angle ( 0 ) =  0 > /2 with the horizontal direction, and 0 ≤ () ≤ .In the first phase of the movement, the initial angular speed of the standing leg 1 is such that ( 0 ) < 0, but its absolute value should be large enough for the leg to reach the vertical position at  = /2.We assume the motion is in the positive direction of the -axis.
Figure 1: Phases of locomotion of a two legged-robot along a horizontal line, in the positive direction of the -axis.(i) Starting position of the standing leg 1 at time  0 , making an angle  0 with the horizontal direction.(ii) Final position of the pendulum-like motion of the standing leg at time  1− .At the end of a stride, the transitions between legs are made with the fixed attack angle , with 0 <  < /2.During the first stride, phases i) and ii), the movement of the trailing leg 2 is not represented.iii) Starting time of the second stride at time  1+ , where the position of the trailing legs 2 is shown.At the time  1+ , the roles of the two legs are interchanged.iv) The second stride, showing the positions of the two legs at some instant of time  >  1+ .The articulated motion of the trailing leg 2 is described in subsection 2.2.
ii) Position of the standing leg at the transition time between strides at  =  1− >  0 , where the attack angle ( 1− ) = , with 0 <  < /2, is a fixed parameter.
Between times  0 and  1− , the movement of the standing leg is pendular.
iii) Position of the standing and trailing legs at the instant to time  =  1+ .The trailing leg upholds on the ground, making an angle  −  with the horizontal direction and the standing leg an angle .The trailing leg makes inelastic contact with the ground and dissipates energy.At time  =  1+ , the trailing leg becomes the standing leg (2 → 1) and vice versa (1 → 2).For the movement to be effective, the two-legged robot must have a source of energy to compensate for the energy dissipated in the inelastic shock with the ground so that the energy of the pendular movement is conserved.The angle  =  − 2 measures the relative maximal opening of the two legs during a stride.iv) Position of the standing and trailing legs at some time  >  1+ .The trailing leg has an articulated movement independent of the movement of the standing leg.During a stride, the leg segment ℓ 1 of the trailing leg moves in the direction of the motion, and the leg segment ℓ 2 makes a more complex movement that will be described in subsection 2.2.
In polar coordinates, the equation of motion of the standing leg during phases i) and ii) is which has a total energy where 0 ≤  ≤ ,  ∈ R and  is the acceleration of gravity.In the range of variation of , the differential equation ( 1) has only one unstable fixed point with coordinates (, ) = (/2, 0).As the inverted pendulum equation ( 1) is Hamiltonian, the energy is conserved, and the phase space curves have the equation  = ± √︁ 2 0 /(ℓ 2 ) − 2 sin /ℓ, where  0 is the initial energy of the two-legged robot.If  0 ≥ ℓ :=   , the phase space curves are defined for  ∈ [0, ].If 0 ≤  0 <   , the phase space curves are defined for  ∈ [0, arcsin( 0 /  ] ∪ [ − arcsin( 0 /  , ].In figure 2a), we show the phase space curves of the equation (1) of the inverted pendulum.
For the two-legged robot to start to move and reach the vertical position, the energy deposited in the initial conditions of the pendulum has to obey the condition  0 >   .To complete phases i)-iii) in figure 1, by (2), this energy condition leads to  10)-( 11)), and the direction of circulation in the phase space.The phase space curves with energy   = ℓ = 784 J, defining the limiting energy necessary for the existence of gaiting, are also represented.
In the case of planar motion and for simplicity, it can be assumed that  0 = ( − ), and therefore the condition (3) reduces to  2 0 > 2  ℓ (1 − cos /2), where  =  − 2.We now calculate the angular speed of the trailing leg at the instant of time  1+ .By (2), with  0 being the initial energy of the standing leg, by conservation of energy, the angular velocity of the trailing leg is where the angle ( 1− ) is measured relative to the contact point of the standing leg, and ( 1+ ) is measured relative to the contact point of the trailing leg.
If the initial conditions obey the inequality (3), due to the relationship (4), the robot has a periodic movement along the positive direction of the -axis (figure 2b).
By (2), the duration of one stride is where  = √︁ 2 0 /(ℓ 2 ) − 2/ℓ and  (, ) is the elliptic integral of the first kind.For the case  0 = ( − ), As each stride has length  0 = 2ℓ cos , the two-legged robot speed during a stride is In figure 3, we show the duration of the stride of the two-legged robot model along a horizontal surface, as a function of the energy  0 and its speed, for several values of the maximum opening of the legs .This shows that the speed of a stride increases as the energy  0 or the maximal opening angle  increases.In figure 4, we show the speed of the two-legged robot as a function of the opening of the legs , for several values of the initial energy  0 .So, for each initial energy  0 , there is an angular opening of the legs that maximises the speed of the two-legged robot.The greater the energy  0 , the smaller the angular opening of the legs to maximise the two-legged robot speed.
For gaiting to be effective, we must impose conservation of energy in the transition of the trailing leg to the supporting leg ( 1− →  1+ ).The two-legged robot must have an energy supply system to compensate for the energy lost during the impact with the floor of the trailing leg.This impact is assumed to be inelastic.
At the transition from the trailing to the standing leg, the velocity of the hip In the collision with the floor, energy is lost, and the component of v( 1− ) along the direction of the trailing leg 2 is absorbed by the ground (inelastic shock).At the instant of time  1+ , the direction of the trailing leg 2 is As the projection of v( 1− ) along d is v( 1− ).d, immediately after the shock of the trailing leg with the floor, the velocity of the mass  of the hip is So, and as ( 1− ) < 0, we have two cases In the first case, the hip velocity is in the direction of motion after the shock.Still, in the second case, the velocity is directed opposite to the motion.Thus, for the energy of the pendular movement to be conserved in the transitions between strides, it is necessary to compensate for the energy lost in the shock by some mechanism internal to the two-legged robot.Let   be the energy to be replenished in the transition between strides.
If (  ≥ 0,   ≥ 0), by ( 8), ( 9) and ( 4), then If (  < 0,   < 0), as the velocity after the impact has a direction contrary to the direction of the movement and, to maintain gaiting, it is necessary to supply to the mass  the energy (11) In figure 5, we show the energy   necessary to maintain a stride on a flat surface at the transition time  1− →  1+ , as a function of .Therefore, the larger the stride, the larger the energy replenishment.
Due to the structure of phase space orbits shown in figure 2b) and assuming that the energy supply is replenished at each stride, the two-legged robot model presented here is stable, as slight variations in the initial conditions and robot parameters lead to neighbouring closed trajectories in phase space.E p (J)

Trailing leg movement
In this model of a robotic leg, during phases i)-iii) of figure 1, the trailing leg has a movement that cannot collide with the floor, and its function alternates with the standing leg.We further impose that, during one stride, the movement of the foot tip of the trailing leg has three phases, as shown in figure 6.In the first phase, the foot of the trailing leg retracts in the opposite direction of motion, while the knee and hip progress in the direction of movement.In the second phase, the foot of the trailing leg moves in the direction of motion until the trailing leg is wholly stretched and makes an angle  relative to the standing leg.Finally, the foot of the trailing leg rotates backwards until the foot tip touches the ground.During this movement, the knee of the trailing leg always moves in the direction of motion.During one stride, the knee of the trailing leg has two phases.To describe the movement of the trailing leg during a stride, we consider the rotation matrix Let  0 (figure 1) be the initial time of a stride and ( 0 ,  0 ) the coordinates of the support point of the standing leg.The positions of the hip, knee and trailing leg foot tip are ( ℎ ,  ℎ ), (  ,   ) and (  ,   ), respectively.First phase of the movement of the knee of the trailing leg.During a stride, the first phase of the movement of the knee of the trailing leg has coordinates where  ℎ () =  0 + ℓ cos (),  ℎ () =  0 + ℓ sin () and () is solution of equation ( 1), for the initial condition  0 = ( 0 ) and ( −  0 ) ∈ [0,    ( 0 , ,  0 )].The angle  1 = ( + ) is the orientation of the trailing leg at the beginning of the stride, measured relative to the position of the hip (figure 6).The new parameter   < 1 describes the duration of the first movement of the knee of the trailing leg, measured as a fraction of the time of one step.Consider the new angle describing, at time  =    ( 0 , ,  0 ), the orientation of the segment ℓ 1 of the trailing leg, measured relative to the position of the hip.Thus, from the condition      ( 0 , ,  0 ) = ( 2 −  1 ) (figure 6), it follows that where   and  2 are determined by the choices of   and the remaining stride parameters.In figure 6, in dashed lines, we represent the first phase of movement of the knee of the trailing leg, calculated by ( 13)-( 15).First and second phase of the movement of the trailing leg foot tip.During the first phase of the movement of the foot of the trailing leg, its coordinates are where   1 < 0 is a parameter to be determined, the new parameter   is such that 0 <   <   , and The maximum angle of retraction of the foot of the trailing led, measured relative to the initial position of the standing leg, is Thus, from the condition   1    ( 0 , ,  0 ) =   , it follows that where   1 is determined by the choices of   ,   and the remaining stride parameters (figure 6).
In the time interval  −  0 ∈ [   ( 0 , ,  0 ),    ( 0 , ,  0 )] -second phase of the movement of the foot of the trailing leg, the foot of the trailing leg has the trajectory where In figure 6, the thick line represents the foot movement of the trailing leg foot tip, calculated through ( 16)-( 20).
Second phase of movement of the knee and third phase of movement of the foot of the trailing leg.In this case, the movement occurs during the time interval  −  0 ∈ [   ( 0 , ,  0 ), ( 0 , ,  0 )] and the knee has coordinates where Likewise, the movement of the foot has coordinates A sufficient condition for the effectiveness of a stride of the two-legged robot is that   1 () > 0, for every  ∈ ( 0 ,    ( 0 , ,  0 )], and   2 () ≥ 0, for every  ∈ [   ( 0 , ,  0 ),    ( 0 , ,  0 )].These two conditions depend on the choice of the stride parameters.There can be no retraction in the first phase of the foot tip of the trailing leg.By making a different choice of parameters, the foot movement of the trailing leg does not necessarily have a retraction movement (figure 7), although   < 0.
In any of the analysed cases, the two-legged robot motion on a flat surface is periodic and valid for all  ∈ R. To visualise the movement of the two-legged robot, in figure 8, we show the positions of the two legs during one stride on a flat surface.
In the Supplementary Material, we present a video of the motion of the twolegged robot on a horizontal surface (robot-flat.mp4),showing the reversibility of the motion.The stride is expected to adapt to the motion on uneven surfaces with the model just developed for horizontal surfaces.Thus, the minimum distance from the foot of the trailing leg to the floor has been analysed as a function of   and for various values of   and   .As shown in figure 9, in some cases, there is a choice of the parameters   ,   and   to keep the foot tip of the trailing leg away from the floor.

Motion on non-planar surfaces and inclined planes
To reach the final support position without touching the floor, the trailing leg is articulated at the knee (figures 7 and 8).The same model can be applied to consecutive strides on non-planar surfaces, described by continuous and differentiable functions  =  (), with  ∈ R, deviating slightly from the horizontal line.Let be the surface roughness parameter.Assume that   is less than the minimum distance from the foot of the trailing leg to the ground during the second phase of the movement of the foot of the trailing leg.That is, Imposing further that |  ()| < tan , for all  ∈ R, the standing leg can not have another contact with the floor except at the supporting point.Consider that the movement on a non-planar surface is described by a continuous and differentiable function  =  () ≥ 0, with |  ()| < tan .In the transition between strides, the two legs of the robot are supported on a non-planar floor, and the robot has the geometry of an isosceles triangle with angles such that  + 2 =  (figure 10).Let ( 0 ,  0 =  ( 0 )) be the initial coordinates of the foot of the standing leg.By a simple calculation, the side of the triangle opposite to the angle  has length ℓ  = ℓ √︁ 2 − 2 cos .Then, the initial coordinates of the foot of the trailing leg are where  02 is an angle dependent on the shape of the surface (figure 10), determined by the condition The angle  02 , determined for non-planar surfaces, replaces the angle  0 of the figure 1 (figure 10).Therefore, the initial angle of the trailing leg, measured relative to the hip position, is The motion of the robotic leg starts with the position of both feet determined by ( 26) -(28).At the beginning of each step, the angle  12 replaces the angle  1 in (13).By (3), for the movement to be feasible, we must have  2 02 > 2(1−sin  02 )/ℓ.Starting from the initial positions of the two legs with fixed , the movement proceeds according to the rules determined in the previous section.The time of a stride is estimated by (5), and there is a new stride time calculated during each stride.As, by ( 22), the coordinates of the trailing leg foot tip are (  3 (),   3 ()), with  ≥    ( 02 , ,  0 ), the foot tip hit the ground at the new instant of time  =   determined by the condition with  ≥    ( 02 , ,  0 ).Therefore, you can use the model from the previous section where the duration of strides   varies from stride to stride, depending on the shape of the surfaces.Consider a surface described by the function f where the roughness parameter (24) of this surface is   = .In figure 11, we show the gait movements on this non-planar surface.
In figure 12, we show the movement of the two-legged robot on inclined plane surfaces described by the function

Conclusions
The solvable walking model introduced leads to the following conclusions:  31), with  = 0.12.The parameters of the robotic leg are the same as in figure 11.
a) The articulated two-legged robot motion along a flat surface is possible provided that the initial angular speed of the standing leg obeys the condition  2 0 > 2  ℓ (1−cos /2), or, equivalently, that the initial pendulum energy obeys the condition  0 > ℓ, where  is the mass of the two-legged robot, ℓ is the length of the legs, and  is the acceleration of gravity.
b) The robotic leg must have an internal energy supply mechanism so that, in the transition between steps, the system receives the energy   , calculated in (10) and ( 11).The energy cost of walking after  steps is  0 + ( − 1)  .
c) The speed of the stride of the two-legged robot is where  is the elliptic integral of the first kind and  = √︁ 2 0 /(ℓ 2 ) − 2/ℓ.Under these conditions, gaiting is stable along horizontal surfaces, and the motion is reversible in time.d) For each value of the pendular energy  0 of the two-legged robot, there is a value of the opening angle  that maximises the robot speed (figure 4).Moreover, the larger the strides, the larger the energy necessary to maintain gaiting, and the greater the energy  0 , the smaller the angular opening of the legs to maximise the two-legged robot speed.
e) The articulated two-legged robot can move along continuous uneven surfaces and inclined planes, provided that the distance from the tip of the trailing leg to the ground during the second phase of the foot movement is larger than the roughness of the ground (24).The distance from the tip of the trailing leg to the ground can be adjusted by choosing robot parameters (figure 7).
In conclusion, the solvable model of a two-legged robot presented here realistically describes the different types of biped motion and allows for plasticity and adaptability of gaiting.This model is stable, as minor variations on the initial conditions and robot parameters lead to neighbouring closed trajectories in phase space.

Figure 2 :
Figure 2: a) Phase space curves of equation (1), for several energy values  =  0 .b) Periodic phase space curve of the standing leg obeying condition (3), with  = 9.8 ms −2 , ℓ = 1 m,  = 80 kg, initial energy  0 = 900 J,  = (/2 − 0.5) rad and  0 = /2 + 0.5 = ( − ) rad, which corresponds to the relative maximal opening of the two legs during a stride  = 1 rad= 57.3 • .The number 1 indicates the initial state of the standing leg, and the number 2 indicates its final state.The arrow indicates the instantaneous change of the trailing to the standing leg, the effect of the energy control mechanism (eq.(10)-(11)), and the direction of circulation in the phase space.The phase space curves with energy   = ℓ = 784 J, defining the limiting energy necessary for the existence of gaiting, are also represented.

Figure 3
Figure 3: a) Duration of a stride of the two-legged robot model along a horizontal surface as a function of energy  0 , calculated from (6), for several values of .b) Speed of a stride as a function of energy  0 , calculated from (7), for several values of .The simulation parameters are  0 = ( − ) = ( + )/2,  = 9.8 ms −2 ,  = 80 kg and ℓ = 1 m.

Figure 4 :
Figure 4: Speed of a two-legged robot as a function of the opening of the two legs , for several values of the initial energy  0 .The dashed line indicates the maximum value for the speed of the two-legged robot.The simulation parameters are  0 = ( − ) = ( + )/2,  = 9.8 ms −2 ,  = 80 kg and ℓ = 1 m.

Figure 6 :
Figure 6: Motion of a two-legged robot during one step.Thin lines represent the movement of the trailing leg.Dotted lines represent the movement of the standing leg.The three phases of the movement of the foot tip of the trailing leg are shown by thick lines.The dashed lines show the knee movement.The retraction and progression movements of the trailing leg foot tip are necessary to maintain a periodic planar motion so that the foot tip does not have contact with the floor.On flat surfaces, the duration of a stride is  ( 0 , ,  0 ).The first phase of the foot movement of the trailing leg has duration   , the second phase has duration (  −   ) and the third phase has duration (1 −   ).The simulation parameters are ( 0 ,  0 ) = (0, 0),  0 = 110 • ,  = 70 • ,  0 = 800 J,  = 9.8 ms −2 ,  = 80 kg, ℓ = 1 m, ℓ 1 = 0.5 m,   = 0.1,   = 0.8 and   = −40 • .

Figure 10 :
Figure 10: Position of the two-legged robot on a non-horizontal surface described by the function  =  () ≥ 0. When the two feet are simultaneously supported, the robotic leg forms an isosceles triangle with angles  and , where  + 2 = .The distance between the two feet are ℓ  = ℓ √︁ 2 − 2 cos .

Figure 12 :
Figure12: Temporal evolution of the position of the two-legged robot on a continuous and piecewise linear surface.The shape of the surface is described by the function (31), with  = 0.12.The parameters of the robotic leg are the same as in figure11.