The Generation of a Stable Walking Trajectory of a Biped Robot based on the COG based-Gait Pattern and ZMP Constraint

The research works contained in this paper are focused on the generation of a stable walking pattern of a biped robot and the study of its dynamic equilibrium while controlling the two following criteria; the centre of gravity COG and the zero-moment point ZMP. The stability was controlled where the biped have to avoid collision with obstacle. The kinematic constraints were also taken into consideration during the walking of the biped robot. In fact, the generation of the walking patterns is composed of several stages. First, we used the Kajita method for the generation of the COG trajectory, based on the linear inverted pendulum LIPM during the simple support phase SSP and linear pendulum model LPM during double support phase DSP. After that, we used two 4spline function to generate the swing foot trajectory during the SSP and we used exact formulate for the foot trajectory during DSP. Finally, Newton's algorithm was performed (at the level of the inverse geometric model), in order to calculate the different joints according to the desired trajectories of the hip and the feet. Ground reaction forces were also determined from the dynamic model to satisfy the kinematic constraints on both feet of the biped. The generation of walking is done for two different speeds. To study the biped balance, ZMP generation algorithm was performed during the different walking phases and the results obtained for the two cases were compared. Keywords—Biped robot; COG; ZMP; stability; LIPM; LPM; walking gait


I. INTRODUCTION
Research in the field of humanoid robotics has generally focused on how to reproduce the stable human walking as faithfully as possible ( [1], [2]).Walking a biped robot at a certain speed and under certain constraints (roughness and inclination of the ground, carried additional weight, avoid collision with obstacle and performing some tasks) while keeping the stability of the biped is a challenge for researchers.On the work of [3] a novel method of Zero-Moment-Point (ZMP) compensation is proposed to improve the stability of locomotion of a biped, which is subjected to disturbances(carried an additional weight while walking and it walked up a 10• slope and walked down a 3• slope).The effectiveness of the method is verified on a humanoid robot, MANUS-I.
On the work of [4], a motion pattern generator of humanoid robots that walks on a flat plane, steps and a rough terrain was proposed.If the biped robot walks on a terrain other than a flat plane and/or if it exist a contact between the hand of the robot and its environment, some approximations should be introduced to judge the contact stability in association with the ZMP.In this paper, other conditions have been added to guarantee the stability of the robot.
Compared to other types of walking robots, bipedal walking is a much less stable activity than say four-legged walking, as multilegged robots have more footholds for support.Bipedal walking allows instead greater maneuverability, especially in smaller areas [3].
During the displacement of the biped robot, there are two types of stability characterizing the way of walking the biped; static stability and dynamic stability.The static stability is characterized by the fact that the walking robot always keeps its COG projected vertically inside the support polygon.Unlike, at the dynamic stability, the robot's COG leaves the support polygon for some periods of time and the robot is in imbalance during the step, when raising one of its legs [5].The problem of imbalance of the biped is posed generally at the level of the SSP.However, such imbalance periods of time must be short and the ZMP constraint must be controlled in order to avoid a possible fall of the robot.Previous research works has found a relationship between COG and ZMP to study the stability of walking robots.Several references have worked on the generation of stable walking of a two-legged walking robot based on the generation of the trajectory of the COG and controlling the dynamic constraints ZMP ( [6], [7]).
The generation of the walking cycle for walking robots can be classified according to three main approaches: Modelbased gait, Biological mechanisms-based gait and Natural dynamics-based gait [8].Our work is interested in the first method and more precisely on the approach of Centre of gravity based gait.
The structure of the paper is as follows: Section 2 describe the biped gait cycle.Section 3 represents static and dynamic constraints.Section 4 includes the different steps of generating www.ijacsa.thesai.org the robot's walking cycle.Section 5 describes the inverse dynamic modelling.Simulation results of stability control have been shown in Section 6.The conclusion is given in Section 7.

II. BIPED ROBOT GAIT CYCLE
The reproduction of a walking cycle for a walking robot is based on the generation of a step sequence.Each step is composed of two main successive phases SSP and DSP and an intermediate phase of impact.A race cycle, meanwhile, is a succession of SSP, flight, and impact phase.Depending on the duration of a step, SSP occupies the longest duration of time relative to the DSP (about 80% for the SSP versus 20% for the DSP).
Thanks to the complexity of the reproduction of a human walking cycle, most researchers simplify the gait cycle and studies have shown four essential configurations to generate a complete walking cycle: the first pattern contains one SSP and one DSP, the second one contain a consecutive phase of SSP, the third one contain one SSP and two sub-phases of DSP and the last pattern composed of two sub-phases of SSP and two sub-phases of DSP.Previous research has shown the importance of integrating a dual support phase into the biped cycle.The work of [9] compared the results obtained on the speed of the center of gravity and the trajectory of the ZMP for a walk with DSP and without it.He showed that for a cycle that contains only SSP, the discontinuity in COG velocity when the biped switches their feet and it becomes more unstable when it faces impulsive forces.The presence of the DSP ensures the continuity of the COG speed and improves the stability of the biped during the switching phase of two feet.

A. Unilateral Contact Constraint
During walking, the robot must maintain contact with the ground through the support points (one foot in single support phase and two feet in double support phase).Indeed, these points can neither penetrate on the ground nor leave it, and this can be expressed in the form of holonomic constraints as follows: With (x) represent the vector of the position constraints on the support foot and, With and represent the direct geometric model MGD of the support foot ankle and represent the support foot joint angle.
With represent the position of the hip, and represent the two joint angles of the support leg and and represent respectively the length of the thigh and the tibia.
The first derivation of equation ( 1) allows us to determine the speed constraint represented by the following equation: With J(x) represent the Jacobian matrix and ̇ represent the first derivation of the state vector.
The same calculation procedures were applied to determine the kinematic constraint on the swing foot during the DSP.The expression of the Jacobian matrix is the following: Where represent the swing foot joint angle, and represent the two joint angle of the swing leg, and represent respectively the high and the length of each foot.
Note: the two capital letters C and S respectively denote the two operators cosinus and sinus.We used these designations to reduce the size of the matrix.

B. The Non Slip Constraint
If we consider the robot's leg and the ground as being two solid bodies in contact then according to the principle of Amontons-Coulomb, There is no slip between these two bodies if the modulus of the tangential component is increased by a term proportional to the modulus of the normal component.This can be expressed by: With and denote the Lagrange multipliers ([10], [11]) for ground contact forces (normal and tangential, respectively).
is called friction coefficient of adhesion.It depends essentially on the nature of the materials in contact.

C. ZMP Constraint
The ZMP is defined as a point on the ground where the resultant ground reaction produces a zero moment along the x (front-back) and z (transverse) axes [12].
The ZMP is a dynamic balance criterion of bipedal robots and has been widely used in controlling the balance of biped robots: the main task of the control is to maintain the ZMP inside the support polygon to prevent the foot to switch.It is a defined criterion for checking the assumptions of contact with the ground, and thus managing the balance.It has many advantages: easy to understand and implement in a real robot, and taking into account the dynamics [13].
The main objective of our work is to generate a balanced walking of the biped robot following a well-defined trajectory under the constraint of avoiding an obstacle.It is for this reason that the trajectory of the ZMP must not leave the polygon of sustenance to guarantee the stability of our robot.www.ijacsa.thesai.orgAccording to the dimensions of the feet and the length of the step realized by the biped, during the running cycle, the imposed conditions on the trajectory of the ZMP are the following: -≤ P for SSP1 0 ≤ P for DSP ≤ P for SSP2 (10) With: is the length of the foot, P is the length of the step and is the real position of the ZMP.
With k is the articulation number of the biped, is the weight of each segment, , , ̈ and ̈ , designed respectively the position and the acceleration of the COG of each segment accordingly of the x and z axes, is the moment inertia of each segment, and ̈ is the acceleration of each joint.
The calculation of the ZMP is considered only according to the sagittal plane [14].

A. Trajectory Planning using LIPM and LPM
We are chosen to work with the walking pattern that contain one SSP and one DSP and the generation of the COG using the two methods LIPM and LPM consecutively during the SSP and DSP to generate the COG trajectory.For stable and smooth walking, double support phase is important.According to the biped locomotive, both legs are considered as an inverted pendulum during the SSP phase and a pendulum during the DSP phase.Several references have worked with this method to generate the trajectory of COG ( [15], [16], [9]).Figure 1 shows a walking pattern that contains a DSP.
To simplify the computing of the COG trajectory, the height of the COG is assumed fixed throughout the walking trajectory and the position of the COG coincides with the position of the hip.
The two following equations represent the trajectory and the speeds of the COG during the SSP phase: Where: and are two constants that have been determined from the initial and boundary conditions of the position and velocity of the COG and represent the characteristic frequency defined as follow: The two following equations represent the trajectory and the speeds of the COG during the DSP: We simulate the motion of the COG through the walking pattern using SIMULINK/MATLAB.The figure 2 shows the evolution of the cog trajectory and its speed as a function of time.The simulation is done for two SSPs and one DSP.As the figure shows, the integration of the DSP into the trajectory gait ensures the continuity of the COG velocity between the two phases.The velocity curve alternately follows deceleration during the SSP against acceleration during the DSP.Indeed, the robot speed decreases and the swing foot strike the ground smoothly which avoids the increase of the impulsive forces resulting from the shock between the robot's foot and the ground.The presence of the DSP improves the stability of the robot and the switching of two feet will be smoother.

B. The Motion of the Feet 1) Swing foot trajectory during SSP:
The phase of the SSP is defined by a single contact between the support foot and the ground.At the beginning of this phase the swing foot is in contact with the ground on the tip of the toe making an angle with the horizontal axis.During SSP, the oscillating foot moves forward while advancing one step.The support foot is in full contact with the ground and it does not leave it.So what interests us during this phase is the movement of the swing foot oscillating in the air while avoiding an obstacle.We used two piecewise 4 th spline functions to model this movement.The first function used to reproduce the displacement along the x-axis and the other along the z-axis.
Where F represents the function that model the x or z coordinates of the heel, ankle, or toe of the oscillating foot, 0 t , 1 t and ss t represent respectively the initial time of SSP, the time at which the biped have to avoid obstacle and the end time of SSP. and are constants determined by initial and boundary conditions.
The front foot is always flat to the ground during the SSP, so it is simple to determine coordinates of the heel, ankle and toe.
Figure 3 shows the motion of the swing foot during two successive SSP with switching of the two feet.
The three colors represent the positions of the heel, ankle and toe of the swing foot during the SSP and along the x-axis and the z-axis.The displacement of the swing foot along the x-axis shows the switching of two feet between the two phases.In fact at the end of the first step, the support foot is placed behind the swing foot.This is why the support foot coordinates at the beginning of the second step are lower than the one at the end of the first step (at the following step the support and the swing foot switch their positions) then it follows the same trajectory and it advances along the x-axis.The positions values of each point increase in function of time.The coordinates of the foot along the z-axis follows the same trajectory for the two steps.It modeling the motion of the swing foot during the SSP.The biped raises the swing foot and balances it forward to advance one step.The three curves increase as a function of time at the beginning of the SSP then it decrease and the value of the toe height becomes zeros at the end of the SSP (blue curve).At this moment the swing foot strikes the ground with the toe point and the DSP starts.

2) Feet trajectory during DSP:
The phase of DSP is the defined by the contact of the both feet with the ground.At the beginning of this phase the swing foot is in contact with the ground on the tip of the heel making an angle with the horizontal axis.The front foot is flat to the ground.During this phase the biped raise the heel of the front foot without leave the ground until it make an angle with the horizontal axis.The swing foot descends until it becomes flat to the ground.We determined the trajectory of two feet during the DSP phase using exact equations.
3) Feet orientation: The orientations of the two feet are obtained from the simple polynomials of second degree which serves to generate the values of two angles and as a function of time.
Figure 4 shows the values of the two angles as a function of time during the two steps (two SSPs and two DSPs).represents the angle of the swing foot and represents the angle of the support foot. the figure 5 shows that during SSP, the angle of the support foot q5 is zero (returns to the fact that the support foot is in full contact during SSP), and at the end of the double support phase the two angles are zero because the swing foot becomes in full contact with the ground and the supporting foot makes a rotation on the toe stop and starts to leave the ground.The two legs switch their positions and the second step starts.

C. Inverse Geometric Model using Newton's Algorithm
The resolution of the inverse geometric model MGI is used to find the joint coordinates of the two legs from the Cartesian coordinates of the hip and two feet.The position of the hip and the positions of each point of the foot (heel, ankle and toe) were determined in the preceding paragraphs.
We used Newton's algorithm to numerically solve the inverse geometric model.Newton's algorithm is an efficient algorithm used to find numerically a precise approximation of a zero (or root) of a real function of a real variable and used to solve non-linear systems, it consists in the specification of a calculation schema, in the form of a series of elementary operations obeying a determined sequence.For our case, to solve the MGI, Newton's algorithm can be presented briefly as follows: During the gait cycle and at each iteration, it receives at the input the positions of the hip and the ankle, then it calculates the length of the virtual leg L and it solves the system of non linear equations to find the right values of the two joint positions and for the front leg and and for the swing leg.The values of the joint coordinates are initialized at the beginning of the algorithm and the convergence of the algorithm is conditioned by a margin of error and by avoiding the positions of singularity.
Newton's algorithm is simulated on MATLAB and the simulation results give the following curves.
Figure 6 shows the evolution of the four angles of the two legs as a function of the time during the two steps.The values of the four angles were calculated by the Newton's Algorithm and it corresponds to the biped configurations (positions of the hip and the feet calculated previously).
The speeds of the four joints angles were calculated from the derivation of direct geometric model and they were subsequently used later for calculating the ZMPs throughout the biped walking cycle.The four curves are represented by figure 7.
Figure 8 shows the stick diagram of the walking pattern that contains one SSP and one DSP with the rotation of the swing foot at the toe stop.We have used direct geometric model to simulate the motion of the biped robot.The biped walks two steps with a speed of 0.23m/s.

V. DYNAMIC MODELLING
There are several formalisms for calculating the inverse dynamic model of a robot whose Euler-Lagrange formalism, the principle of virtual works and the Newton-Euler method.The choice of the Euler-Lagrange formalism simplifies the number of the inverse dynamic model computing in symbolic.
When the effort on the terminal organ is zero, Lagrange's equations are as follows: www.ijacsa.thesai.org Where L = E -U is the Lagrangian of the system, E represent the total kinetic energy of the system and U is the total potential energy of the system.
The resolution of the inverse dynamic model allows to determine the torques and forces (tangential and normal force) applied on both feet of the biped during the walking cycle according to positions, speeds and articular accelerations ( ̇and ̈).
With the method adopted and the Lagrange equation, the dynamic model can be written in the following form: Where M(X) is the inertia matrix, is defined as a positive symmetric matrix, ( ̇)represents the vector of the centrifugal and Coriolis effects of dimension (9X1), is the vector of the effects of gravity of dimension (9X1).
If we consider that both feet in full contact with the ground, we must consider the forces generated on both feet of the biped by the ground, the complete dynamic model becomes: Where A represents the actuation matrix of dimension (9X6), and represent the two Jacobian of contact on both feet, and are the ground interaction forces on each foot of the robot.

A. Resolution of the Inverse Dynamic Model in Simple Support
The SSP is defined by one foot in contact with the ground and the other foot in motion therefore free.The fixed foot arrives in flat impact and the swing foot takes off instantly, while swing foot in motion, the robot is in SSP.
During the SSP, the force on the swing foot is zero.The equation of the simplified dynamic model becomes.
The knowledge of the trajectory of the hip and q(t) makes it possible to determine entirely the vectors ̇ and ̈.
For the case of the SSP, the number of equations being equal to the number of unknowns, the resolution is directly possible and is put in the following form:

B. Resolution of the Inverse Dynamic Model in Double Support
During the DSP the two feet of the robots are in flat contact with the ground.The dynamic modelling of the robot must therefore take into account the efforts of the ground on both feet.The dynamic model is described by the equation 22.
In the DSP, the robot is in an over-actuated configuration.Indeed, 9 coordinates are needed to describe the configuration of the robot in a general case and the robot has 6 actuators.However, in the DSP, the conditions of contact of the two feet on the ground add 4 constraints.The degree of over-actuation is therefore 1.
There are two solutions to solve the dynamic model during the dual support phase: 1) Parameterization of the forces exerted on the swing foot by mathematical functions [17].
2) The internal resolution of these forces by an optimal control resolution [18].We adopted the first method to solve the dynamic model, the forces exerted on one of the feet requires expressing in an explicit form of time.We have chosen to fix the expression of the forces exerted on the foot 1 by a polynomial of order 2, = .
= ∑ (25 Subsequently, the resolution of the system is expressed by this equation: Where: ( B is an invertible square matrix of size (9X9).

C. Resolution of the Impact Model
The impact between two rigid bodies can be translated as a collision, which is modeled by an algebraic equation at the moment of impact.In the case of biped walking the impact phenomenon takes place at the end of the single support phase.It is characterized, under the assumption of rigid bodies, by a collision between the swing foot and the walking surface.
The joint velocities undergo sudden and instantaneous changes against the generalized coordinates after impact are the same as those before the impact.
After the consideration of certain hypotheses, the equation linking the ground forces to the robots' feet and its articular velocity before and after the impact is as follows: Where ̇ (Respectively ̇ ) represents the velocities before (respectively after) the impact.

VI. SIMULATION RESULTS
The computing of the ZMP values during the walking cycle of the biped robot is done according to the equation 11.
Figure 9 shows the curve of the ZMP before the regulation of the biped walking stability.However, Figure 10 reperesent the curve of the ZMP after the regulation of the biped walking stability.In fact, we have implemented an algorithm that calculates at each itération the value of the ZMP and it checks the stability conditions of the biped robot.According to the static and dynamic constraints and avoiding the singularity positions, the robot changes the value of the double support period and the running speed to bring the ZMP back inside the retention polygon and thus adjust the stability.
The polygon of sustenance is modelized by the curves in red.The biped walk is stable if the ZMP curve calculated during the walk cycle remains within the retention polygon.To ensure stability of the biped, we have to control the value of the ZMP and keep it within the bounds.The robot is generally in conditions of instability, especially during the SSP phase (only one foot in contact with the ground) while increasing its speed of movement, also the presence of an obstacle to avoid represents a disturbance for the stability of the biped.As the figure 9 shows, the ZMP leaves sustaining polygon when the biped starts to avoid collision with obstacle and it starts to rise the swing foot.This figure proves that the problem of biped imbalance is mainly located (in the conditions of a flat and non-ruthless ground) at the level of the SSP.
Figure 10 shows the effectiveness of our algorithm.The ZMP is still inside the polygon of sustenance.The robot keeps its balance throughout the cycle of walking and even the presence of an obstacle to avoid.

VII. CONCLUSION
In this paper, an algorithm for controlling the biped walking stability has been implemented.The simulation results of the ZMP have shown the effectiveness of this algorithm.A constraint (the presence of an obstacle to be avoided) is added for the disturbance of the balance of the biped.Indeed, the limits of the sustenance polygon change with the movement of the biped robot through the gait walking and the values of the ZMP always remain inside the convex surface which constitutes the sustenance polygon.
The ZMP is a criterion used for the control of the dynamic stability and presents one of the most used methods for the generation of a stable trajectory for a biped robot because the control of balance has a common advantage with the other methods used for trajectory generation.The disadvantage of this method is that the ZMP is not always applicable.Indeed, its use is restricted to flat ground.As a result, it is not suitable for climbing up / down stairs, or on uneven ground.In addition, the ZMP cannot handle the balance during the flight phases during the race movement where there is no contact between the robot and the ground.Finally, the multi-contact between the arms and the environment is not taken into account in the ZMP.In a series of papers, the authors and colleagues have developed new feedback control strategies [19].
As a perspective of our work, we will study other scenarios and add other constraints on the walking biped robot as the climbing up / down of a stairs, walk on snow ground, carry an additional weight or integrate a phase of flight.Depending on the type of constraint added, we will associate with the ZMP another criterion for the management of the balance.An appropriate control method will be implemented in a closed loop to control and correct the stability of the biped robot according to the different scenarios.

Fig. 3 .
Fig. 3.The Trajectory of the Ankle, toe and heel of the Swing Foot during 2Successive SSP Long the x-axis and z-axis.

Fig. 4 .
Fig. 4. The Swing Foot Angle as a Function of Time.

Fig. 5 .
Fig. 5.The Support Foot Angle as a Function of Time.

Fig. 6 .
Fig. 6.The four Angles of the Left and Right Legs Calculated by the IGM.

Fig. 7 .
Fig. 7.The Speed of the Four Angles.

Fig. 8 .
Fig. 8.The Displacement of the Biped Robot for Two Steps.