A grid gradient approximation method of energy-efficient gait planning for biped robots

In this article, an energy-efficient gait planning algorithm that utilizes both 3D body motion and an allowable zero moment point region (AZR) is presented for biped robots based on a five-mass inverted pendulum model. The product of the load torque and angular velocity of all joint motors is used as an energy index function (EIF) to evaluate the energy consumption during walking. The algorithm takes the coefficients of the finite-order Fourier series to represent the motion space of the robot body centroid, and the motion space is gridded by discretizing these coefficients. Based on the geometric structure of the leg joints, an inverse kinematics method for calculating grid intersection points is designed. Of the points that satisfy the AZR constraints, the point with the lowest EIF value in each network line is selected as the seed. In the neighborhood of the seed, the point with the minimum EIF value in the motion space is successively approximated by the gradient descent method, and the corresponding joint angle sequence is stored in the database. Given a distance to be traveled, our algorithm plans a complete walking trajectory, including two starting steps, multiple cyclic steps, and two stopping steps, while minimizing the energy consumption. According to the preset AZR, the joint angle sequences of the robot are read from the database, and these sequences are adjusted for each step according to the zero-moment-point feedback during walking. To determine the effectiveness of the proposed algorithm, both dynamic simulation and walking experiment in the real environment were carried out. The experimental results show that compared with algorithms based on the fixed body height or vertical body motion, our gait algorithm has a significant energy-saving effect.


Introduction
Bipedal robots have human-like structures and appearances, which can adapt to the human environment, and are ideal robots for replacing human work. In the past 50 years, research institutions and scholars at home and abroad have carried out much research on biped robots and have achieved remarkable progress. 1,2 For example, humanoid robot HRP-4 can drive vehicles in the middle of the road, 3 and ATLAS can traverse obstacles and climb stairs. 4 Bipedal walking is the most important and challenging problem in research on biped robot motion. According to different research ideas, the proposed biped walking methods can be divided into three approaches. One is to utilize high-speed optical motion capture systems to obtain data on human motion according to external characteristics of human walking and apply these features to the generation of robot motion modes. 5,6 The other approach is to use a central pattern generator to simulate the neural network control of human walking to generate rhythmic signals, thereby solving the problem of robot gait generation. [7][8][9] The third approach is to simplify the biped robot into a linear inverted pendulum model consisting of a point mass and a massless telescopic leg [10][11][12][13] or a cart-table model consisting of a table without mass and a cart driving on the table with all the mass concentrated in it. 14 At present, the structural complexity of existing biped robots is much less than that of humans, which indicate that gait methods based on human characteristics and central pattern generators have limitations. Researchers prefer to adopt the method that involves simplifying the biped robot model. The accuracy of the simplified model determines the accuracy of the control effect. Based on the single-mass inverted pendulum model and considering the weight of the legs, Shimmyo et al. proposed biped walking pattern generation using preview control based on a three-mass model. 15 Luo and Chen presented a three-mass angular momentum model 16 and a five-mass momentum model 17 using model predictive control to obtain better motion control accuracy. However, as model complexity increases, model nonlinearity increases and gait control becomes more difficult. Considering that the leg mass of the motor-driven biped robot is mainly distributed according to the position of the motor, the five-mass model, which includes five mass points representing the body, legs, and feet, is regarded as the best tradeoff.
To simplify the complexity of the algorithm used in gait control for biped robots, constraint conditions for the robot body are introduced, which cause unnatural walking motions, consume large amounts of energy, and limit the operation time of battery-powered robots. 18 Hong et al. allowed vertical body motion and alleviated the problem of bending knee joints. 19 Shin and Kim further removed constraints on the motion trajectory, which improved walking speed and reduced actuator energy consumption. 20 If the robot body is allowed to move with more degrees of freedom, a better control effect can be expected. In this article, the bipedal body center of mass is allowed to move in three dimensions.
Fewer constraint conditions result in an increase in parameter space in gait control. It would be optimal if a solution could be found by artificial intelligence. Dau et al. applied a genetic algorithm to optimize the seven key parameters defining the hip and foot trajectories. 21 Elhosseinia et al. designed a whale optimization algorithm with a random parameter "a" and weight parameter "C" to find the optimal setting for the hip parameters. 22 Wu and Li used fuzzy logic to control the dynamic gait pattern generator of a humanoid robot, resulting in better responses to external force disturbances. 23 Wright and Jordanov summarized the commonly used intelligent approaches to robot locomotion control. 24 Generally, the range and accuracy of parameters need to be included in the optimization algorithm. This article presents a hierarchical optimization algorithm, that is, the grid computing method, to find the best region in a large range of parameter value spaces. Then, the gradient approximation method is used to find the optimal gait parameters for the robot with high accuracy.
The rest of this article is organized as follows. In the second section, we describe the simplified biped robot model and formulate the problem of gait planning. The third section focuses on the gait planning algorithm from two aspects: optimal minimization of energy consumption and real-time motion planning. According to the algorithm in this article and various control methods proposed in the related literature, the fourth section presents the simulation and experimental results for the performance analysis of the proposed algorithm. In the fifth section, the algorithm is summarized, and possible follow-up work is presented.

System structure
The humanoid robot used in this article has two arms and two legs, thereby imitating the walking motion of the human body. Each leg has five degrees of freedom (DoFs), including two DoFs at the hip, one DoF at the knee, and two DoFs at the ankle, and the joint vector can be expressed as q ¼ ½ q 1 q 2 Á Á Á q 10 T . The forward, lateral, and vertical directions of the robot are defined as the x-axis, y-axis, and z-axis, respectively. The origin in the global coordinate system is located at the midpoint of the two legs when the robot is upright. The structure of the experimental robot is shown in Figure 1. Four force-sensing resistor (FSR) sensors are installed under the sole of each foot to measure the distribution of force on the feet. The parameters for the body and right leg are summarized in Table 1, and the parameters for the left leg are the same as those for the right leg.
In general, some constraints are needed to simplify the scope of an analysis of robot walking. The proposed walking gait assumes the following conditions: (a) The upper body remains upright at all times. The pitch rotation of the human trunk is small, within 3 , 25 and energy consumption increases as the trunk is leaned forward. 26 Therefore, most relevant research studies 4,5,10-23 have shown that this assumption is acceptable. (b) Both feet are always parallel to the ground. Most common humanoid robots have no toes and cannot utilize the toes to improve driving the lifting and planting of the feet. 27,28 (c) One step of duration T contains a double support phase (DSP) T DSP and a single support phase (SSP) T SSP and defines the duty ratio of the DSP as s T DSP T . In the process of human walking, s is approximately 15-25% 25 ; s ¼ 25% was selected for the algorithm proposed in this study.

Zero moment point equations
Among various dynamic stability standards for biped robots, the most widely used technique is the zero moment point (ZMP). 29 The ZMP is the point on the ground where the horizontal component of the total moment generated by gravity and inertia forces is zero. The five mass points of the biped robot are the body b, the left leg lu, the left foot ld, the right leg ru, and the right foot rd, and they constitute set P c ¼ b; lu; ld; ru; rd f g . The positions of the six joints form a position set R l ¼ r lh ; r lk ; r lf ; r rh ; r rk ; r rf È É . These positions are shown in Figure 2.
At ZMP position r ZMP ¼ ½x ZMP ; y ZMP ; 0 T , the resultant moment M ZMP is generated by the resultant ground reaction force F. The resultant moment M s is exerted on the robot body due to gravity and inertia of all centers of mass (CoMs). The moment balance equation for r ZMP is expressed as Here, n ¼ [0,0,1] T is the ground-surface unit normal vector, g ¼ [0,0,-g] T is the gravitational acceleration vector, g ¼ 9.80 m/s 2 , and I i and € q i are the rotational inertia and angular acceleration at position i, respectively. Kajita et al. proved that the influence of € q is small and can be ignored. 10 By substituting equations (2) and (3) into equation (1), the simplified ZMP equations are

Allowable zero moment point region
Modeling errors inevitably exist when modeling biped robots. Hong et al. set the ZMP trajectory near the centerline of the support foot to achieve the greatest stability during walking, 11 but this is not an energy-efficient method. In the region of the support foot, some edge Hip width 0.08 m l 1 Link length from q 1 to q 2 0.04 m l 2 Link length from q 2 to q 3 0.085 m l 3 Link length from q 3 to q 4 0.075 m l 4 Link length from q 4 to foot 0.04 m l f l Foot length 0.12 m l f w Foot width 0.06 m regions are drawn out to compensate for the modeling errors, 20 and the ZMP trajectory is located in the allowable ZMP region (AZR) of the middle subregion of the support foot. This is a better method for balancing modeling errors and walking efficiency. For a biped robot with foot length l f l and foot width l f w , the step length is s, and the y-axis distance between the two feet is w. The AZR when the left foot (LF) is supporting and the right foot (RF) is swinging is shown in Figure 3. The AZR during the first DSP is a hexagon with (r 1 , r 2 , . . . r 6 ), that during the SSP is a square with (r 3 , r 4 , r 5 , r 6 ), and that during the second DSP is a hexagon with (r 5 , r 6 . . . r 10 ). In our gait planning algorithm, h i AZR ¼ l al =l f l and h w AZR ¼ l aw =l f w are used to represent the unit values of the AZR subregions on the x and y axes, respectively, h l AZR takes a constant value, so the default is

Energy consumption index function
The energy consumption E of a biped robot can be divided into two parts: the energy consumption E m for robot motion and the energy consumption E a for nonmotion. E m is the main component of E, which is the integral of the instantaneous power consumption vector p m ðtÞ for all joint motors over time t. E a is used for sensors, controllers, and so on. Their power P a is relatively stable during operation and can be expressed as a linear function of time. E can be described by In general, E m can be significantly reduced through gait trajectory optimization, 30 which is suitable for evaluating the performance of the gait algorithm. For biped robots with many motors, it is difficult to accurately measure p m (t). p m (t) is equal to the sum of the output power consumption p 2 (t) and subsidiary electrical loss p loss (t); p 2 (t), its main component, can be calculated by multiplying the motor output torque t 2 (t) and angular velocity _ q ðtÞ. 31 When the robot is moving, t 2 (t) is used to overcome the load moment t g (t) formed by all CoMs on the motor rotor, . . t 10 (t)] T and t i (t) can be written as follows where m ¼ ½ m b m lu m ld m ru m rd T is the CoM vector, l i ðtÞ is the effective distance vector between m and the i'th rotor, and C i ðtÞ is the 5 Â 5 diagonal matrix describing the proportion of m acting on the rotor. It is assumed that the sampling period t s of the control system is small enough between the two sampling points with In general, the joint motors of the robot carry out cyclical motion with the period N, and even if gravity and the direction of motion are the same, most robots are not able to regenerate energy. Therefore, we define the energy consumption index function E for the gait algorithm as follows

Problem definition
Based on the previous analysis, our energy-efficient gait planning problem can be formulated as follows: (a) Given the step length and AZR of a biped robot, find the optimal gait parameters, that is, the parameters that minimize E, while allowing 3D body motion and satisfying the constraints in "System structure" section. (b) For a goal distance d of bipedal walking, control the value of h for the AZR in real time, thereby minimizing the total energy consumption of the complete gait trajectory, including two starting steps, multiple cyclic steps, and two stopping steps.

Gait planning algorithm
Overview (a) In the gait planning optimization (GPO) algorithm, given the step length set S and the AZR set H for bipedal walking, 18 parameters are represented by the body trajectory s 2 S, and the range U s of the parameters is gridded. After the inverse kinematics calculation, the parameter subset R s satisfying the stability and physical constraints is obtained, and the seed set P h s meeting the h 2 H requirement is selected from R s . Then, in the neighborhood of p 2 P h s , the joint angle sequence with minimum E is obtained by iterative calculation according to the gradient descent method and stored in an offline database. The GPO algorithm takes a long time and is suitable for offline operation. It completes the calculation of S and H and copies the offline database to the online database, which is called in real time in the gait synthesis (GSYN) algorithm. (b) Given the required walking distance d and the value of h for the AZR, the GSYN algorithm plans the step sequence S* to achieve the minimum E. Each step length s i 2 S Ã and initial valueĥ of the AZR are removed in turn, and the online database is queried to obtain the motor angle sequence g i for gait control. By inputting g i into the joint controllers, the robot can walk. During walking, according to the foot pressure set F i , the real-time ZMP trajectory is calculated. In the AZR control, the deviation between r ZMP and r AZR is calculated from r AZR , which is required for stability, and the PI correction method is used to correct h i , optimizing the tradeoff between low energy consumption and robustness of robot motion.

Gait planning optimization algorithm
The GPO algorithm is used to generate a low-energy joint angle sequence g n s for gait control; this is the core of our proposed algorithm. According to the accuracy requirements of bipedal walking, the range in step length, from minimum to maximum, is discretized to constitute the set S. H selects several levels from the interval [0,1] to adapt to different robustness requirements. The GPO algorithm selects the elements s and h from S and H, respectively, to calculate the distribution gradient and obtain g n s for the minimum E.
Gridding method. Our proposed gridding method is a process of discretizing multidimensional parameters by appropriate intervals, constructing parameter space grids, and then calculating the value of the function for each gridded line intersection point. If the walking step length is s, the robot body b performs a 3D cyclic motion satisfying the constraint (a) in "System structure" section, and the position r b ðnÞ ¼ ½ x b ðnÞ y b ðnÞ z b ðnÞ T can be expressed by a Fourier series of finite terms as follows where N is the gait period, ! 0 ¼ p=N , n ¼ 1; 2; Á Á Á ; 2N , and r b ðnÞ are represented by the parameters a k jk ¼ 1; 2; Á Á Á ; 18 f g . If a k 2 ½d k ; u k is discretized according to the interval k and its range is the set A k ¼ d k ; d k þ k ; d k þ 2 k ; Á Á Á ; u k f g , then the intersection set U s formed by the gridding method is the Cartesian product of A k , that is, Inverse kinematics calculation. To utilize the parallel acceleration of the GPU, the inverse kinematics algorithm is designed for the geometric structure of the robot leg. Without loss of generality, suppose that the robot starts walking during the DSP with the left leg in front and the right leg in the rear; then, the right leg swings forward. The starting position of the RF rf is r rf ð0Þ ¼ ½ 0 0 0 T , and the motion satisfies constraint (c) in "System structure" section; then, the motion trajectory of r rf ðnÞ ¼ ½ x rf ðnÞ y rf ðnÞ z rf ðnÞ T is where w s is the step width, h s is the step height, N is the gait cycle, N 1 ¼ N =8, and N 2 ¼ 7N =8. Cyclic bipedal walking has the property of symmetry, and the LF trajectory is r lf ðnÞ ¼ ½ x rf ðn þ N Þ þ s Ày rf ðn þ N Þ z rf ðn þ N Þ T . Given r b ðnÞ, according to constraint (a) in "System structure" section, the right hip joint trajectory is r rh ðnÞ ¼ r b ðnÞ À ½ 0 0:5l h l b T . Figure 4 shows the geometric relations between the joint angles of the robot leg.
Combining r h ¼ ½r rh ; r lh and r f ¼ ½r rf ; r lf that need to be calculated, the process for obtaining the inverse kinematics solution presented in this article is shown in Algorithm 1.
Generally, U s has a large number of elements. Considering the locomotion characteristics of r b ðnÞ, unreasonable elements in U s can be excluded, thus reducing the number of inverse kinematics calculations needed. Common characteristics of r b ðnÞ include the following (a) x b ðnÞ increases predictably during bipedal walking. (b) y b ðnÞ is convex during RF swing N and concave during LF swing N.
(c) z b ðnÞ increases predictably and then decreases predictably during N. (d) During walking, the given r h ðnÞ and r f ðnÞ distance are less than the leg length, that is, Seed extraction. For 8a 2 U s , the map a ! qð0Þ; qð1Þ; f Á Á Á ; qðN Þg is formed by inverse kinematics calculation, and then, the corresponding ZMP trajectory can be obtained. R s U s , where a s 2 R s , is defined, which satisfies the following: (a) Physical constraint: for a s ! q s ðnÞ, maxjq s ðnÞÀ q s ðn À 1Þj t s q max , where n ¼ 1; 2; Á Á Á N , and q max is the maximum angular velocity of the joint motors.
(b) ZMP condition: the ZMP trajectory corresponding to a s satisfies the stability requirement.
The wider AZR consumes less energy but yields less walking stability. 20 In gait control of the biped robot, multiple h values are taken to constitute the set H. The dynamic adjustment of h during walking can achieve a better compromise between energy consumption and stability. The element a h s in R s that meets the requirement of h is used to calculate Eða h s Þ according to equation (7). If the range of Eða h s Þ contains a finite number of convex sets, the seed set P h s ¼ p 1 ; p 2 ; Á Á Á ; p L f g , where p l 2 P h s , satisfies the following: (a) There is a linear relationship between the number of seeds L and the number of parameters. That is, L n 1 þ n 2 þ Á Á Á þ n 18 , where n k is the number of a k values in 8a h s and k ¼ 1; 2; Á Á Á ; 18. (b) The energy consumption of the same column grid is the lowest. Namely, Gradient optimization. Obviously, the seed p l 2 P h s is a gridded intersection in U s . If Eðp l Þ of p l ¼ ½a 1 a 2 Á Á Á a 18 achieves convexity in adjacent grids, then the search space L l ¼ B 1 Â B 2 Â Á Á Á B 18 is formed with p l as the center and d l ¼½d 1 d 2 ÁÁÁ d 18 as the search interval, where B k ¼ a k À d k ; a k þ d k f g and k ¼ 1; 2; Á Á Á ; 18. For x 2 L l , the inverse kinematics and E are calculated. If x Ã satisfies Eðx Ã Þ ¼ min EðxÞjx 2 L l f gand its ZMP meets the requirements of h, then taking the gradient The specific calculation process is shown in Algorithm 2.
Given p l , Algorithm 2 is progressive in the finite grid neighborhood, according to d l , so it must converge. In the algorithm, e is the approximation accuracy of E. After all, p l is calculated, the seed with the minimum E can be used to obtain the optimal gait g h s corresponding to s and h.

Gait synthesis algorithm
For a given walking distance d, there is a sequence S Ã ¼ s 1 ; s 2 ; Á Á Á ; s c f gwith minimum E. To make the walking process smooth, both s 1 and s 2 are planned as starting steps, both s cÀ1 and s c are stopping steps, and s m is a cyclic step, where m ¼ 3; 4; Á Á Á ; c À 2. We let s 1 ¼s c , s 2 ¼s cÀ1 , 8s m cover equal distances and d b ¼ 2s 1 þ 2s 2 be controlled in 1*2s m , that is, s m < d b 2s m . When s m is known, the calculation of s 1 and s 2 is shown in equation (10) If the robot's walking starts and ends with two feet standing side by side, the AZR is required to be h, E h s ðs m Þ is the energy consumption of cycle step s m , E h b ðs 1 Þ is the energy consumption of starting step s 1 , and E h e ðs c Þ is the energy consumption of the stopping step s c . Then, the total Figure 5, when the robot moves initially, the AZR should use a smallerĥ to ensure robustness during walking, but such walking will consume more energy. 32 The GSYN algorithm uses closed-loop control to query gait trajectory g i from the database according to the s i and h i of each step. While the robot is walking, the ZMP data r ZMP ðnÞ are calculated from the feedback FSR data F i ðnÞ 33 and sent to the AZR controller to calculate h iþ1 .

As shown in
In the AZR controller, the time T s of each step is taken as the control period, that is, T s ¼ N t s , which includes the underactuated SSP and the overactuated DSP, which are applicable to different algorithms. 34 As shown in equation (9), N 1 < n < N 2 is the SSP, and both 1 n N 1 and N 2 < n N are the DSP. We let the AZR position during the i'th step satisfy robot walking stability as r AZR (n). During the DSP, the AZR control algorithm requires r ZMP (n) to be located in the AZR. During the SSP, the algorithm requires x ZMP (N 1 þ1) ! x AZR (N 1 þ1), x ZMP (N 2 ) x AZR (N 2 ), and h iþ1 is calculated from the deviation e i in the Y direction, that is where y ZMP ðnÞ ¼ P c n j¼1 y j i ðnÞf j i ðnÞ 0 P c n j¼1 f j i ðnÞ, y j i ðnÞ, and f j i ðnÞ 2 F i ðnÞ correspond to the sensor position and pressure in the Y direction, respectively. For the SSP, c n ¼ 4, and for the DSP, c n ¼ 6. When y AZR ðnÞ ! 0, c o ¼ 1; when y AZR ðnÞ < 0, c o ¼ À1.
The incremental PI regulator with transfer function where Dh iþ1 ¼ k P ðe i À e iÀ1 Þ þ k P T S T I e i . Because ðe i À e iÀ1 Þ easily causes high frequency interference, the first-order inertia link GðsÞ ¼ 1 T L sþ1 is introduced to smooth its output, so that where

Experimental evaluation
According to the structure of the biped robot described in "System structure" section, a 3D simulation model is constructed in Webots to evaluate our proposed algorithm. In the GPO algorithm, we take S ¼ fsjs ¼ 1; 2; Á Á Á 13g and H ¼ fhjh ¼ 0:1; 0:2; Á Á Á 1g and calculate the gait trajectory g n s from their combination. Taking s ¼ 10 as an example, r b (n) is described by a k , as shown in equation (8), where N ¼ 16, k ¼ 0:2 cm, and k ¼ 1, 2, . . . 18; r rf (n) is shown in equation (9), where w s ¼ 8 cm and h s ¼ 1 cm. Using the features extracted from r b (n), the number of effective grid elements is 1 763 449 134, and the inverse kinematics calculation is carried out with Algorithm 1. According to the physical constraints and ZMP conditions in "Seed extraction" section, 17 024 963 elements of R s are obtained, and the seeds corresponding to different h are selected.
When h ¼ 0:8, the number of seeds selected is L ¼ 102, as presented in Table 2, where k is the label of a k , and n Ã k is the actual number of seeds obtained by removing the repeatedly selected seeds. P k & P 0:8 10 and contains n Ã k seeds, and E min ðP k Þ is the minimum E of seeds in P k . To obtain a gait with lower energy consumption, gradient optimization is performed twice with Algorithm 2 with d 1 k ¼ 0:05 cm and d 2 k ¼ 0:01 cm. E 1 min ðP k Þ and D 1 % and E 2 min ðP k Þ and D 2 % are the minimum values of E and the percent reduction in E in the two calculations, respectively. The E min curve of p 1 *p 20 in the gradient optimization calculation is shown in Figure 6. In the first gradient optimization calculation, 8p l 2 P 0: 8 10 , E 1 min ðP 0:8 10 Þ ¼ 182:3 mJ, and the results are marked with "*." In the second calculation, E 2 min ðP 0:8 10 Þ ¼ 178:4 mJ, and the results are marked with "*." To compare the performance of different algorithms, the fixed hip height (FHH) is taken as the FHH algorithm, 16 the   figure that compared with that of both FHH algorithm and VHH algorithm, the E distribution of our algorithm is more balanced, and the total energy consumption value is lower.
According to the GPO algorithm, 8s m 2 S and 8h ¼ H, the calculated E Ã min is shown in Figure 8. Obviously, as the value of h decreases, the required E Ã min gradually increases to achieve the same s.
In the GSYN algorithm, if d ¼ 100 cm and 8s m 2 S, according to equations (10) and (11), J h s ðSÞ can be calculated, as shown in Figure 9, where h ¼ 0:2; 0:3; Á Á Á ; 1, and s m ¼ 10 cm, J h s ðSÞ is the minimum in the same column data. In this case, c ¼ 8, s 1 ¼ 3 cm and s 2 ¼ 7 cm, that is, S Ã ¼ 3; 7; 10; 10; 10; 10; 10; 10; 10; 10; 7; 3 f g . If we let h ¼ 0.8 and set the starting and stopping positions of walking to be two feet standing side by side, the swing length of the RF is L rf ¼ f3, 17,20,20,17,3g, and the swing length of the LF is L lf ¼ f10,20,20,20,20,10g. The two 3-cm elements in L rf correspond to the starting step and stopping step, respectively, where E 0:8 b ð3Þ ¼ 65:2 and E 0:8 e ð3Þ ¼ 66:8 m J. There are two 17-cm elements in L rf and two 10-cm elements in L lf , which correspond to the case when the movement distance of the swing foot is unequal before and after it becomes the support foot. From equation (11), J 0:8 s ð10Þ ¼ 1:8967 J, where E 0:8 a ð10Þ ¼ 515:9 mJ. The gait array for each step g i ¼ [q 1 q 2 . . . q 16 ], which is obtained from the database, is used to control the     joint motion of the robot, where i ¼ 1, 2, . . . 13. The dynamic simulation of the corresponding biped robot walking is shown in Figure 10, and the black dots in the figure are the trajectory of r b ðnÞ. According to the above simulation data, the actual robot walking experiment is shown in Figure 11.
In the experiment, we set d ¼ 100 cm,ĥ ¼ 0:5, T S ¼ 1:6 s, k P ¼ 0:875, T I ¼ 3:2 s, T L ¼ 1:6 s, and we set y AZR ðnÞ along the h ¼ 0: 8 sideline during the SSP. The initial conditions for walking are e 0 ¼ e À1 ¼ 0 and h 0 ¼ĥ ¼ 0:5. The h value of the AZR controller is stable at 0:8 after the third step. The calculation data are presented in Table 3, where the data in parentheses in the column titled s i correspond to the movement distance of the swinging leg in front of and behind the support foot, E h s is the energy consumption calculated according to the actual h i , and E 0:5 s is the energy consumption value whenĥ ¼ 0:5. It is calculated that J h s ð10Þ ¼ 1:929 and J 0:5 s ð10Þ ¼ 2:195J ; that is, the AZR controller adjusts h i to reduce the energy consumption by 12:13%.

Conclusion
In this article, we have proposed a gait planning algorithm for biped robots that improve the energy efficiency of robot walking. The algorithm has universal applicability for different forms of biped robots. The following conclusions can be drawn from the theoretical analysis and experimental results: (a) The motor-driven robot has a dispersed mass, and the established five-mass robot model describes the physical characteristics of the robot better than other models. To balance the great computational complexity caused by the multimass model, we designed an energy consumption function with load torque as the main parameter; it could calculate the energy consumption index of the biped robot quickly during the simulation. (b) In the process of gridding the parameter space with the GPO algorithm, it is required that no grid has multiple peaks. If the appropriate mesh gap is selected, this method is suitable for optimizing most systems. During gradient approximation with the GPO algorithm, the step size of the successive approximations is determined according to the accuracy requirements. When the mesh size is large, the mesh can be meshed again to accelerate the approximation process. GPO requires many calculations during the optimization process. Using a GPU to accelerate the calculation can help determine the optimal value quickly. With the advancement of computer science, compared with many random optimization algorithms, our algorithm will show increasingly superior performance. (c) Given the walking distance of the robot, the GSYN algorithm plans the whole motion process, including the starting step, the intermediate steps, and the stopping step, while minimizing the energy consumption. In the process of robot walking, the algorithm adjusts the gait parameters according to the feedback ZMP data, and the AZR is set to overcome perturbations due to modeling and environmental errors. The algorithm can optimize the tradeoff between low energy consumption and high robustness and solve the problem of walking in biped robots with highly nonlinear characteristics.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.