Abstract
Gait pattern generation has an important influence on the walking quality of biped robots. In most gait pattern generation method, it is usually assumed that the torso remains vertial during walking. It is very intuitive and simple. However, is the gait pattern of keeping the torso vertical the most efficient? This paper presents a gait pattern in which the torso has pitch motion during walking. We define the cyclic gait of a seven-link biped robot with multiple gait parameters. The gait parameters are determined by optimization. The optimization criterion is choosen to minimize the energy consumption per unit distance of the biped robot. In order to compare the energy consumption of the proposed gait pattern with the one of torso vertical gait pattern, we generate two sets of optimal gait with various walking step lengths and walking periods. The results show that the proposed gait pattern is more energy-efficiency than the torso vertical gait pattern.
Introduction
Compared with other types of robots, humanoid robots have better adaptability to the environment, strong obstacle avoidance ability, small moving blind area and good quality in line with human thinking habits. These have attracted great attention and in-depth research of scholars [1–8]. Because the development of biped robot is restricted by the development of mechanism, materials, computer technology, control technology, microelectronics technology, communication technology, sensor technology, artificial intelligence, mathematical methods, bionics and other disciplines, there is still a considerable distance from the real sense of anthropomorphism. There are still many problems to be solved in this field, such as walking stability, high-speed walking and reducing energy consumption. Because the robot consumes a lot of energy during walking, reducing energy consumption not only meets the requirements of environmental protection, but also is an important guarantee of the robot’s endurance time.
Gait is a kind of coordination relationship between joints in time and/or space when a robot is walking. Gait planning of biped robots not only depends on the ground conditions, lower limb structure and the control difficulty, but also must meet the requirements of motion stability, walking speed, mobility and so on. For this reason, a variety of methods for gait planning have been adopted.
Geometric constraint method based on ZMP stability criterion [9] is a common method of gait planning. Its core idea is to plan the trajectories of some key positions of the robot’s body, and then solve the equation to get the trajectories of joint angles. ZMP provides a stability criterion for gait planning by geometric constraint method. It is equivalent to the problem of walking motion satisfying this constraint. The advantage of this method is that if the desired ZMP is designed near the center of the stable region, the stability margin can be large. However, due to the limited changes of ZMP caused by hip motion, not all the expected ZMP trajectories can be achieved. In addition, in order to obtain the desired ZMP trajectory, the hip joint acceleration may need to be very large. In this case, due to the relatively large torso, energy consumption increases [10].
Another gait planning method is based on the energy optimization method [11,12, 11,12] which takes the gait stability as the constraint and takes the minimum energy consumption as the optimization objective. For example, Bassnnet et al. [13] use the parameter optimization technology based on spline function to synthesize walking pattern. The generalized coordinates are approximated by class C3 splines, which are fitted on the nodes uniformly distributed along the motion time. By connection conditions, the coefficients of spline polynomials are determined as linear functions of joint coordinates at nodes. These values are then treated as optimization parameters. Using the spline approximation, the main problem is transformed into a constrained nonlinear optimization problem.
This paper presents a gait pattern generation method for biped robots with the torso pitch motion. Based on the model of planar seven-link robot, the gait of the biped robot is generated by the method of energy optimization. Firstly, the trajectories of hip position, torso angle, ankle position and angle of swinging foot are designed as polynomial functions with some gait parameters. Then, the minimum total energy consumed by the joint actuators per unit distance is chosen as the optimization objective, and the gait parameters are determined by optimization. Finally, the stable walking gait of the biped robot is generated. We also provide a common gait pattern with torso vertical (GPTV), to compare the energy comsumption per unit distance with that of the gait pattern with torso pitch motion (GPTP). The difference between the proposed GPTP and common GPTV is the trajectories of the torso angle during double support phase (DSP) and single support phase (SSP).
The main contributions of this paper are as follows: Propose a gait pattern generation method of biped robot with the torso pitch motion, define the cyclic gait of biped robot with multiple gait parameters, choosing the minimum total energy consumed by the joint actuators per unit distance as the optimization objective, determine the gait parameters by optimization, and then generate the optimal gait; Comparing GPTP with GPTV, the optimization results show that the gait pattern proposed in this paper is more energy-efficiency, and the main contribution is that the ankle joint of GPTP consumes less energy than that of GPTV; By studying the energy consumption of the optimal gait in various walking periods, it is found that the longer the period of walking step is, the less energy is consumed. When walking period is more than a certain value, in our case is 1.1 s, the energy efficiency does not increase significantly. Therefore, this value can be considered as a optimal period; Although the parameters related to the torso motion with various periods and step lengths are different, the total trend is that during the DSP, the torso gradually leans forward, and during SSP, it gradually leans back.
The structure of the rest of this paper is as follows: the second section introduces the modeling of biped robot. In the third section, some gait parameters are designed to define the trajectories. Then, in the fourth section, the optimization of gait parameters is discussed. The optimization results of the optimal gait and the comparison between the proposed gait patttern and the common one with torso vertical are given and discussed in the fifth section. Finally, the sixth section summarizes the paper.
Biped robot modeling
This section mainly introduces the biped robot model, generalized coordinates, walking cycle and its dynamic equation. The model will be used for trajectory planning in Section 3.
Biped robot model
A seven-link planar bipedal robot with knee joints and feet can capture most of the features of bipedal walking. Therefore, we choose the seven-link planar biped robot as the model and plan its walking gait. The robot’s seven links include a torso, two thighs, two calves and two feet. The seven links are connected by six revolute joints: two hips, two knees and two ankles. Each joint has an actuator. Assuming that each link is rigid, and each joint does not consider friction.
The geometric dimensions of the robot and generalized coordinates are shown in Fig. 1. m i and l i represent the mass and length of link-i, respectively. d i represents the distance from the center of mass (CoM) of link-i to its lower joint. And I i represents the moment of inertia of link-i about the axis passing through the CoM of link-i and perpendicular to the sagittal plane.

Planar biped model and generalized coordinates representation.
The cyclic gait planned in this paper includes DSP and SSP, as shown in Fig. 2. The current step is from the beginning of DSP to the end of SSP. At the moment t = 0, the foot-1 landing horizontally in front of the foot-2, the DSP begins; during the DSP, the foot-1 keeps flat on the ground and the foot-2 rotates around its toe. At the moment t =T d , the foot-2 leaving the ground, the DSP ends and the SSP begins simultaneously; during the SSP, in order to avoid underactuation caused by the foot-1 rotating around its edge, the foot-1 is also required to remain flat on the ground, and the foot-2 swings from the back of the foot-1 to the front of the foot-1. At the moment t =T c , foot-2 landing in front of the foot-1, the SSP ends and the current step also completes. The next step begins simultaneously and two legs exchange their roles. The period of one step is T c , the duration of DSP is T d , and the duration of SSP is T c - T d . In order to reduce the impact of swinging foot landing and obtain a DSP after swinging foot landing, we assume that the velocity of swinging foot is equal to zero at the landing [14].

Walking cycle.
Generally speaking, nine degrees of freedom are needed to describe a seven-link planar biped robot. However, according to the definition of walking cycle in Section 2.2, foot-1 always keeps flat with the ground in current step, and the biped robot can be regarded as a rooted system. Therefore, the generalized coordinates can be described as q = [q1, q2, q3, q4, q5, q6] T as shown in Fig. 1. A coordinate frame is attached to the flat ground called the world frame, its origin is at the position of the foot-1 under the ankle. And counterclockwise is the positive direction of the angle. In this paper we assume the biped robot walks from left to right on level ground.
Based on Lagrange’s formula, the motion equation of SSP is written as following compact form:
Here M is symmetric and positive defined inertia matrix, C is the matrix related to centrifugal and Coriolis terms, G is the vector of gravity terms, τ = [τ1, τ2, τ3, τ4, τ5, τ6] T is the actuated joint torque vector, B is a constant matrix composed of ones and zeroes representing the contribution of the actuated joint torques.
During the DSP, it can be seen that the foot-2 is constrained on the basis of the motion equation of the SSP. The constraint equation can be expressed as
Here, the additional constraints x2 (q) and z2 (q) are the horizontal and vertical positions of the toe of the foot-2, respectively; L as the step length and laf is foot parameter as shown in Fig. 1. The equation of motion of the DSP is
We define a vector V h (t) = [x h (t) , z h (t) , θ (t)] T which denotes the hip joint position and the absolute angle of the torso with respect to the vertical line, and a vector Va2 (t) = [xa2 (t) , za2 (t) , β (t)] T which denotes the ankle joint position of foot-2 and the foot-2 angle measured by sole of foot-2 about the ground. If the hip trajectory V h (t) and ankle trajectories Va2 (t) are known, all joint angles of the biped can be determined by inverse kinematics. Hence, gait pattern can be denoted uniquely by the hip trajectory and ankle trajectory if we assume the knees of the biped robot bend forward like human beings. For this reason, we plan the hip and ankle trajectories in this section. Moreover, we also generate another gait pattern with torso vertical to compare the energy comsuption of two patterns. The only difference between our proposed gait pattern and another gait pattern is the torso angle trajectory about the vertical line.
As described in Section 2, a single step consists of a DSP and a SSP. The duration of each phase is an important parameter in bipedal motion. If the duration of the DSP is too short, the ZMP must be moved from the back foot to the front foot in a very short time interval. If the duration of DSP is too long, it is difficult to walk at a high speed. In the study of human walking, it is observed that the time interval of DSP is about 20% of the duration of one step. Therefore, in this paper, we specify that the duration of the DSP accounts for 20% of the walking cycle, that is, T d = 0.2T c .
Hip horizontal trajectory
The horizontal motion of hip will greatly affect the stability of biped robot. Small change in hip motion may lead to significant change in the dynamics of bipedal robots, and thus the biped loses its dynamic stability. Therefore, in our study, we will carefully deal with the hip horizontal trajectory of biped robot. There are four boundary conditions that must be satisfied for the horizontal trajectory of hip joint:
Because there are four constraints, four coefficients are used to satisfy the constraints, and the other three coefficients can be freely selected. Here, we choose a0, a1, a3, a4 as the constraint coefficients, a2, a5, a6 as the free coefficients. Given a set of free coefficients, a2, a5, a6, constraint coefficients a0, a1, a3, a4 can be determined by a2, a5, a6 and constraint Equation (4).
In fact, the vertical motion of hip joint will also affect the walking efficiency of biped robots. However, this is not the focus of this study, so we still adopt the most commonly used constant hip height. The trajectory of z
h
(t) are described as follows:
In order to explore a better way of torso angular motion, we design the trajectories of the absolute angle of the torso with respect to the vertical direction, θ (t), in the DSP and SSP as two third-order polynomials:
Constant coefficients b
i
(i = 0,1,2,3) are determined by the following boundary conditions:
Here,
The foot angle is defined as the angle between the foot sole and the horizontal direction, and the counterclockwise direction is positive.
At the beginning of DSP, the angle of foot-2 is zero. Then the foot-2 rotates around its toe, and the angle of the foot-2 reaches its extreme value q
b
at the end of DSP. Then foot-2 leaves the ground and becomes a swinging foot. As time going on, when foot-2 lands at the end of the current step, its angle becomes zero again. During DSP and SSP, the trajectory of foot-2 angle can be designed as two third-order polynomials:
Constant coefficients c
i
(i = 0,1,2,3) are determined by the following boundary conditions:
Here q b is also a gait parameter to be determined by optimization.
During DSP, foot-2 rotates around its toe, so the horizontal and vertical trajectories of foot-2 ankle are determined by the angle of foot-2. During SSP, foot-2 swings freely in the air, and its ankle joint trajectory can be described as a polynomial satisfying some constraints. In order to plan the trajectory of ankle joint of foot-2 during SSP, three specific positions are considered. They are the ankle position at the beginning of SSP, the highest position of foot-2 ankle and the ankle position at the end of SSP. Therefore, the horizontal and vertical trajectories of ankle joint of foot-2 are designed as
and
Constant coefficients d i (i = 0,1,2,3) are determined by the following boundary conditions:
Constant coefficients e i (i = 0,1,2,3) are determined by the boundary conditions:
And constant coefficients e i (i = 4,5,6,7) are determined by the boundary conditions:
Here z m is the maximum height of ankle joint of foot-2 at time t = T m during SSP, z m = 0.14 m is specified in this paper.
It is noted that the trajectory of xa2 (t) satisfying (13) can only ensure the continuity condition of position and velocity at t =T d . It is also noted that the trajectories of za2 (t) satisfying (14) can only ensure the continuity of position and velocity conditions at t = T d and t = T m . There are acceleration discontinuities for xa2 (t) at t = T d and for za2 (t) at t = T d and t = T m . If the acceleration continuity conditions are satisfied at t = T d and t = T m , a higher order polynomial have to be designed. However, higher-order polynomials will cause unnecessary oscillations in the trajectories of xa2 (t) and za2 (t), resulting in unexpected collisions between the swinging foot and the ground during the SSP. After trade-off consideration, we choose the interpolation polynomials of formula (13) and formula (14).
In Section 3, some gait parameters are not determined. This section describes how to determine these parameters through optimization method. The gait parameters to be optimized include
Objective function
Energy consumption is the key index to measure the walking performance of biped robot. The lower the energy consumption, the longer the walking distance of biped robot. Therefore, the goal of this paper is to minimize the energy consumption of the robot per unit distance. The objective function is described as:
Here x is the vector of optimization parameters,
We use ZMP criterion to ensure the stability of biped robot. ZMP can be calculated using the following formula [10]:
To ensure the walking stability of biped robot, ZMP should always be in the support polygon where the robot foot contacts the ground. Therefore, the following inequality should be satisfied.
In addition, when calculating the knee angle according to the position of hip joint and ankle joint, in order to obtain the real solution, the following inequality should be guaranteed:
When the ankle position and hip position are known, inverse kinematics can be used to calculate the relevant knee joint angle. Next we will calculate the angular velocity and acceleration.
Define a vector r (t) = [x
h
(t) , z
h
(t) , θ (t) , xa2 (t) , za2 (t) , β (t)]
T
, each component of this vector has been discussed in Section 3. According to kinematic relationship, r (t) can be expressed as a function of q = [q1, q2, q3, q4, q5, q6]
T
. Its derivative with respect to time is:
Differentiating Equation (24) once more yields:
Then, the following angular acceleration can be obtained:
After knowing the generalized coordinates, velocities and accelerations, the joint torque can be calculated by the inverse dynamic equation.
In SSP, it is extremely simple to obtain joint torques, because matrix B in equation (1) is a sixth-order identity matrix.
In DSP, due to two additional constraints, the biped robot model has four degrees of freedom and six independent actuators, so it is overactuated. For a given state and acceleration, the solution of joint torque is not unique. Let Γ = [F2t, F2n]
T
be the constraint forces compatible with constraint (2). We can get the joint moment and constraint forces through the constraint condition (2). To this end, the generalized coordinates can be divided into two parts: the unconstrained coordinates q
nc
∈ R4 and the constrained coordinate q
c
∈ R2. Generalized coordinates can be expressed as:
Here, I ∈ R4×4 is an identity matrix.
Multiply the dynamic Equation (1) from the left by H
T
and note that JH = 0 to obtain.
Note that (31) has four equations, but six unknowns τ = [τ1, τ2, τ3, τ4, τ5, τ6]
T
, so the solution of Equation (31) is not unique. Among all the solutions, we choose the solution with the least sum of squares.
In order to simulate the gait pattern generation method, the physical parameters of biped robot model are based on our laboratory prototype. The prototype is 1.57 m high with a total mass of about 40 kg. It has 23 degrees of freedom. Table 1 lists the physical parameters of the biped robot. Its geometric parameters are close to that of a 15-year-old teenager.
Physical parameters of the biped robot
Physical parameters of the biped robot
In this paper, Matlab 2018b genetic algorithm toolbox is used to determine the gait parameters of different patterns. The optimization goal is to minimize the energy consumption of biped robot walking unit distance. The objective function is Equation (18), the inequality constraint is (21), (22).
To save the space of the paper, this section only shows the optimal gait with a period of 0.8 s and a step length of 0.35 m. According to the trajectory planning in the Section 3 and the optimization algorithm in the Section 4, the parameters related to the torso angle in the gait parameters are θ0 = -0.0166rad,

Trajectory of torso angle.

Trajectories of joint angles.

Joint torques.

ZMP trajectory.
Roughly speaking, as shown in Fig. 3, torso angle is negative during walking, that is to say, the torso keeps learning forward to a certain extent. At first, the torso leans forward until a specific time to recover some momentum; after that, the torso leans backward to balance the momentum of swing leg.
As shown in Fig. 5, the joint torques are very small and have little changes, except for the ones of the ankle joint and hip joint of the support leg. This is consistent with the physical fact that the support leg supports the weight and inertia of the torso and the swinging leg. The torque of each joint is discontinuous when SSP and D switch, which is caused by the acceleration discontinuity of some joints at that momont.
In Fig. 6, the area enclosed by the blue line is the area of the support polygon formed by the feet in stance in the x-axis direction. The red line is the ZMP trajectory. It can be seen that the ZMP trajectory is always in the stable region, so the gait pattern generation method proposed in this paper can guarantee the stability of the robot walking.
In order to verify whether the gait pattern proposed in this paper can improve the walking efficiency. We compare GPTP proposed in this paper with the common GPTV during walking. The difference among the two gait patterns is the angle of the torso. Other gait parameters, such as hip joint, ankle joint and swinging foot angle, are planned in the same way. In order to make the results more convincing, we generate the optimal gaits of two gait patterns in various walking periods and walking step lengths, respectively, and compare the total energy consumption of two gait patterns in various situations.
Energy consumption in various periods
In order to study the energy consumption in various walking periods, we fixed the walking step length and changed the walking period. In this study, we specify a fixed step length of L = 0.35 m, and walking periods of T = 0.6 s, 0.7 s, 0.8 s, 0.9 s, 1.0 s, 1.1 s and 1.2 s respectively.
The energy consumptions per unit distance of the biped robot for two gait patterns in various walking periods are shown in Table 2. It can be seen from Table 2 that: When the step length is L = 0.35 m, the walking periods are T = 0.6 s, T = 0.7 s, T = 0.8 s, T = 0.9 s, T = 1.0 s, 1.1 s and 1.2 s, the energy consumptions per unit distance of GPTP are 100.7413, 90.0152, 80.1037, 76.9493, 69.3160, 67.5846 and 67.4591, respectively; the energy consumptions per unit distance of GPTV are 109.7318, 95.8594, 84.7701, 81.3571, 75.9085, 74.5460 and 74.3610, respectively. Obviously, the energy consumption of the GPTP is less than that of GPTV. Through simple calculation, the energy consumption per unit distance of GPTP is 8.19%, 6.10%, 5.50%, 5.42%, 8.68%, 9.34% and 9.28% less than that of GPTV, respectively. And the average energy saving is about 7.50%. With increase of walking period, also decrease of walking speed, energy consumption per unit distance decreases. This is the higher the walking speed, the greater the joint torques required. When walking period is more than a certain value, in this researh is 1.1 s, the energy efficiency does not increase significantly. Therefore, the ‘optimal’ period is 1.1 s for the biped model of this paper.
Energy consumption of two gait patterns with various periods when L = 0.35 m
Energy consumption of two gait patterns with various periods when L = 0.35 m
In order to study the energy consumption of three gaits with various step lengths, we change the step length without changing the walking period. In this study, we specify a fixed period of T = 0.8 s, with step lengths of L = 0.25 m, 0.30 m, 0.35 m, 0.40 m, 0.45 m and 0.50 m, respectively.
The energy consumptions per unit distance of bipedal robot for two gait patterns in various walking step lengths are shown in Table 3. It can be seen from Table 3 that:
When the walking period is T = 0.8 s, the walking step lengths are L = 0.25 m, L = 0.30 m, L = 0.35 m, L = 0.40 m, L = 0.45 m, L = 0.50 m, the energy consumption per unit distance of GPTP is 61.7803, 67.6198, 80.1037, 97.4200, 112.1443 and 133.8113, respectively; the energy consumption per unit distance of GPTV is 64.6620, 72.2657, 84.7701, 104.7069, 121.4405 and 149.2804, respectively. Obviously, the energy consumption of GPTP is less than that of GPTV and of GPTF. Through simple calculation, the energy consumption per unit distance of GPTP is 4.46%, 6.43%, 5.50%, 6.96%, 7.65% and 10.36% less than that of GPTV, respectively. The average energy saving is about 6.89%. The greater the step length, the greater the energy consumption per unit distance. This is consistent with our intuition. When humans walk at a greater pace, they are more likely to feel tired.
Energy consumption of two gait patterns with various step lengths when T = 0.8 s
Energy consumption of two gait patterns with various step lengths when T = 0.8 s
We have obtained the total energy consumption per unit distance of GPTP is less than that of GPTV in above discussion. However, we do not obtain the information of energy consumption of each joint actuator. To this end, we illustrate energy consumption of each joint for two gait patterns with T = 0.8 s and L = 0.35 m, as shown in Fig. 7. Energy consumption of stance ankle of GPTP is much less than that of GPTV, and energy consumption of swing ankle of GPTP is a little less than that of GPTV. However, energy consumptions of stance knee and stance hip of GPTP are a little more than these of GPTV. Energy consumptions of swing hip and swing knee of GPTP are basically the same as these of GPTV.

Energy consumption of each joint for GPTP and GPTV with T = 0.8 s and L = 0.35 m.
In this paper, a gait pattern generation method of biped robots with torso pitch motion is proposed to study the influence of torso motion on the walking efficiency of biped robots. The cyclic gait of a biped robot is designed by defining the trajectories of the hip joint and swing ankle joint as polynomials with some gait parameters. Genetic algorithm is used to optimize the gait parameters, the total energy consumption of all joint actuators per unit distance of the robot is choosed as the optimization objective.
In order to verify whether the gait pattern proposed in this paper can improve the walking efficiency, we also define the common GPTV. We generate the optimal gaits with various walking periods and walking step lengths. According to the optimization results, the following conclusions can be drawn: 1) the gait pattern proposed in this paper is more energy-saving and the main contribution is that the ankle joint of GPTP consumes less energy than that of GPTV; 2) by studying the energy consumption of the optimal gait in various periods, it is found that the longer the period of walking step is, the less energy is consumed; 3) when walking period is more than a certain value, the energy efficiency does not increase significantly, this value can be treated as the optimal period; 4) the total trend of torso motion is that during the DSP, the torso gradually leans forward, and during SSP, it gradually leans back. This discovery also conforms to the law of human walking.
Footnotes
Acknowledgments
The authors acknowledge the Natural Science Foundation of China (Grant: 51375085).
