Next Article in Journal
An Improved Whale Migration Optimization Algorithm for Cooperative UAV 3D Path Planning
Previous Article in Journal
New Binary Reptile Search Algorithms for Binary Optimization Problems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Walking Pattern Generation Through Step-by-Step Quadratic Programming for Biped Robots

School of Mechanical Engineering and Automation, Northeastern University, Shenyang 110819, China
*
Author to whom correspondence should be addressed.
Biomimetics 2025, 10(10), 654; https://doi.org/10.3390/biomimetics10100654
Submission received: 5 September 2025 / Revised: 23 September 2025 / Accepted: 26 September 2025 / Published: 1 October 2025
(This article belongs to the Section Locomotion and Bioinspired Robotics)

Abstract

The control of a biped robot is a challenging task due to the hard-to-stabilize dynamics. Generating a suitable walking reference trajectory is a key aspect of this problem. This article proposes a novel method of generating walking patterns for biped robots. The method integrates the double support phase and the single support phase into one step, and uses this step as the unit for trajectory generation through quadratic optimization with terminal constraints based on the Linear Inverted Pendulum Model, enabling us to shorten the optimization horizon while still generating natural walking trajectories. Moreover, by restricting the position and acceleration of the center of mass (COM) in the vertical direction, an excessive constraint is formed on the Zero Moment Point (ZMP) to offset the nonlinear effects of the COM’s vertical motion on the ZMP. This allows the COM of the robot to change in the vertical direction while maintaining the linearity of the optimization problem. Finally, the performance of the proposed method is validated by simulations and experiments of walking on flat ground and stairs using a position-controlled biped robot, Neubot.

1. Introduction

The control of a biped robot is a challenging task due to its difficult-to-stabilize dynamics. Generating a suitability walking reference trajectory is a key aspect of this problem [1]. The walking trajectory mainly includes the motion trajectories of both feet and the center of mass (COM). To ensure the robot walks stably, the Zero Moment Point (ZMP) determined by the COM state needs to be located within the support polygon, which is the convex hull of the contact points between the feet and the ground. Due to the alternating contact of the two feet with the ground, the support polygon experiences step-like changes when the swinging leg lands or the supporting leg lifts up. However, the change in the COM is continuous, so when planning the COM trajectory, it is necessary to predict these step-like changes in advance to meet the ZMP stability criterion. Kajita et al. [2] generated the trajectory of the COM through preview control of the ZMP, which anticipates future foot placements to optimize stable and efficient motion. This approach was further developed into Model Predictive Control (MPC) to achieve even more stable walking motions under strong perturbations [3,4,5]. However, to ensure the reliability of this method, the preview horizon is set to at least two step periods, which increases computational costs.
Khadiv et al. [6] argue that it is not necessary to optimize walking over several steps to ensure gait viability and show that it is sufficient to merely select the next step timing and location. And enforcing a reasonable terminal constraint (i.e., a constraint on the COM’s state at the end of the optimization horizon) can ensure capturability, which can be used to shorten the predictive horizon. The Munich University Johnny robot [7] enforced a terminal constraint on the position of the COM at the end of the next two steps. The Honda Asimo robot [8] imposed cyclicity of motion by constraining the divergent component of the dynamics at the end of the next step, which was a true capturability constraint. The walking and running motion generation scheme implemented in the Toyota Partner robot [9] imposed cyclicity of motion through both the position and velocity of the COM. In this article, we impose a terminal constraint on the position, velocity, and acceleration of the COM at the end of the current step, meaning that the walking trajectory is generated within a single step period. When the terminal constraints are properly set, a refined walking trajectory can be optimized.
When using quadratic optimization to generate walking trajectories, there are primarily two approaches to handle the ZMP. One approach is to include the ZMP in the objective function to minimize the deviation of the ZMP from the center of the foot sole [2,10,11], or to align the ZMP trajectory with a reference trajectory from heel to toe [12,13,14]. However, the specified reference points and trajectories often do not match the natural walking pattern, and there is no strict guarantee that the ZMP will remain within the support surface. Another approach is to include the ZMP in the constraint conditions, thus strictly satisfying the ZMP criteria. The support polygon expands during the transition from the single support phase to the double support phase, resulting in corresponding changes to the ZMP boundary conditions. However, despite this, refs. [15,16] only considered the single support phase during the whole walking process. This is because the ZMP movement constraints applied in the single support phase are more restrictive and the sampling time can be large enough to omit the double support phase in the predictive framework. But ignoring the ZMP in the double support phase can cause the acceleration of the COM to be discontinuous and lack naturalness. In this article, we propose a novel step period that includes both single and double support phases to generate a continuous moving ZMP trajectory.
To efficiently generate walking patterns, simplified dynamic models have been developed to approximate complex robot systems, with the Linear Inverted Pendulum Model (LIPM) being the most widely used [17]. However, to ensure the system remains linear, the LIPM confines the COM to a horizontal plane, as the relationship between the vertical COM state and the ZMP is nonlinear. To enable variations in the COM height, some work [18,19,20] incorporated nonlinear components and used the Sequential Quadratic Programming (SQP) method to solve the Nonlinear Model Predictive Control (NMPC) problem, generating the walking trajectory. Reference [21] treated the nonlinear components as time-varying quantities and formulated the preview control problem as a Linear Quadratic Regulator (LQR) problem for time-varying linear systems to generate walking trajectories. Whereas the above methods achieve variations in the COM height by increasing computational costs, ref. [22] bound the nonlinear component within suitable extreme values. By ensuring that the ZMP constraints were satisfied at these extreme values, it guaranteed that all intermediate values also satisfied the constraints. This method converted the nonlinear problem into a linear one by overly constraining the ZMP. But in [22], the selection criteria for extreme values were not specifically explained. Additionally, the nonlinear component was constrained as a whole without specific consideration of its individual variables. In this article, we impose boundary constraints on the vertical state of the COM, including its position and acceleration, according to the robot’s motion conditions. This ensures the optimization problem remains linear while accommodating variations in COM height.
In this article, we focus on the generation of walking patterns. The main contributions of this work are as follows.
(1)
We propose a novel step period that includes both single and double support phases, and generate walking trajectories in units of a step by imposing terminal constraints. This approach allows us to shorten the optimization horizon while still generating natural walking trajectories.
(2)
We impose boundary constraints on the vertical state of the COM, ensuring the linearity of the optimization problem while allowing for variable COM height.
The rest of this article is organized as follows. Section 2 introduces the motion model and the novel step. In Section 3, the generation of walking patterns for flat ground is introduced. In Section 4, the generation of walking patterns with variable COM height is introduced. In Section 5, we introduce the whole control frame. In Section 6, the method is demonstrated by numerical comparisons, simulations, and experiments conducted on the robot Neubot, as shown in Figure 1. Finally, Section 7 sets out the conclusions for this article.

2. Preliminaries

2.1. Motion Model and Constraints

In biped robot systems, the combination of nonlinear, underactuated, and high-dimensional dynamics results in a particularly challenging control problem. Therefore, reduced-order models, such as the LIPM for walking [23] and the Spring-Loaded Inverted Pendulum (SLIP) model for running [24], have been widely applied for controlling the locomotion of legged robots. In this article, we contract the robot to a point mass (i.e., COM) and disregard the inertial effects caused by rotations of its various parts. When only considering the horizontal motion of the COM, the dynamic system along the X-axis can be expressed as
d d t x x ˙ x ¨ = 0 1 0 0 0 1 0 0 0 x x ˙ x ¨ + 0 0 1 u x   d d t x ¨ = u x
where x is the position of the COM on the X-axis, and u x denotes the input of the system.
To ensure the robot walks stably, it is sufficient for the Center of Pressure (COP), also known as the ZMP, to lie within the support polygon. Therefore, the constraint condition is
p x = 1 0 z p z z ¨ + g x x ˙ x ¨   p x S
where p x is the ZMP position on the X-axis, which can be considered as the output of the dynamic system; z and p z represent the vertical heights of the COM and the support foot, respectively; g is the gravity acceleration; and c is the support polygon.
In the above, only the horizontal position of the COM along the X-axis is expressed, but the same applies to the horizontal position along the Y-axis.

2.2. A Step Period with Double Support

In this article, the generation of walking patterns is conducted in units of steps. Here, we will first introduce the concept of a novel step. In [25], the gait cycle of a human limb can be divided into different phases, as shown in Table 1. According to this, the support period of one leg can be divided into three stages, namely, initial double support (IDS), single support (SS), and terminal double support (TDS), as shown in Figure 2. A step period, as defined in this article, comprises the latter half of the prior support period (i.e., SS1 and TDS) and the first half of the following support period (i.e., IDS and SS2), as shown in Figure 3. The support period is primarily for motion planning of the COM in the lateral plane, while the step period is mainly for motion planning of the COM in the sagittal plane. It should be emphasized that the origin of the robot coordinate frame is defined beneath the center of the current supporting foot, as shown in Figure 1, and the trajectory is generated in robot frame {R} and analyzed in world frame {W}.

3. Walking Pattern Generation for a Step

In this section, we generate motion patterns for a robot walking on flat ground, with the assumption that the COM height remains constant. Therefore
p z = 0   z = z c     ( constant )   z ¨ = 0
And then Equation (2) can be written as
p x = 1 0 z c g x x ˙ x ¨
Building upon this premise, quadratic programming is employed to generate the COM motion trajectory in the sagittal plane within a step period. Similarly, in the lateral plane, the COM motion trajectory is determined using quadratic programming over a support period.

3.1. Quadratic Programming Within a Step

First, a walking pattern generation for sagittal plane is described. The dynamic Equations (1) and (2) at discrete time t k can be reformulated in a discrete form for the controller interval t , as
x ^ k + 1 = A x ^ k + B u x k   p x k = 1         0         z c / g x ^ k
where
x ^ k = x ( t k ) x ˙ ( t k ) x ¨ ( t k ) ·   u x k = u x ( t k )
A = 1 t t 2 / 2 0 1 t 0 0 1 ·   B = t 3 / 6 t 2 / 2 t
We compute the input u x k of the dynamic system (5) that minimizes the following function over a step period:
min u x 0 , u x 1 , u x n 1 k = 0 n 1 α 2 u x k 2 + β 2 x ¨ k 2 + γ 2 x ˙ k x ˙ k r e f 2 s . t .               x ^ k + 1 = A x ^ k + B u x k               p x k = 1 0 z c / g x ^ k               p x l i m p x k p x l i m t k SS 1               p x l i m p x k p x f o o t _ n e x t + p x l i m t k DS               p x f o o t _ n e x t p x l i m p x k p x f o o t _ n e x t + p x l i m t k SS 2               x ¨ n = 0               x ˙ n = x ˙ n r e f               x n = p x f o o t _ n e x t
where n is the horizon length in a step period, p x f o o t _ n e x t is the next foothold point in the X-axis, and p x l i m represents the support range of the feet in the X-axis.
In Equation (6), the first term avoids jitter in the forces acting on the COM, the second term minimizes the forces acting on the COM, and the third term makes the COM velocity approach the reference velocity. The first constraint represents the system’s state equation. The second to fifth constraints ensure that the ZMP remains within S throughout the entire step period. The sixth and seventh constraints impose constraints on the terminal state of the step period, ensuring that the COM arrives directly above the next foothold point p x f o o t _ n e x t with the desired velocity x ˙ n r e f at the end of a step period. These constraints also ensure that the ZMP is located at p x f o o t _ n e x t by the end of the step period. When the robot needs to stop, x ˙ n is set to 0. After determining u x k with Equation (6), the trajectory of the COM along the X-axis can be obtained using Equation (5).
Similarly, the trajectory of the COM along the Y-axis can be obtained by
min u y 0 , u y 1 , u y n 1 k = 0 n 1 α 2 u y k 2 + β 2 y ¨ k 2 + γ 2 y ˙ k 2 s . t .                 y   ^ k + 1 = A y ^ k + B u y k               p y k = 1 0 z c / g y ^ k               p y l i m ( 1 ) s p y k ( 1 ) s p y f o o t _ l a s t + p y l i m t k IDS               p y l i m p y k p y l i m t k SS               p y l i m ( 1 ) s p y k ( 1 ) s p y f o o t _ n e x t + p y l i m t k TDS               y ¨ n = 0                 y   ˙ n = 0               y n = p y f o o t _ n e x t / 2
where s indicates whether the support is from the left or right foot, with s = 0 for left foot support and s = 1 for right foot support. p y f o o t _ l a s t and p y f o o t _ n e x t represent the positions of the last and the next support foot along the Y-axis, respectively. It should be noted that the seventh constraint is only used as a constraint when the robot needs to stop. And the eighth constraint ensures that the COM is positioned at the center between the two supporting feet along the Y-axis at the end of the support period.
During the double support phase, the constraint polygon for the ZMP defined by the third constraint and the fifth constraint is larger than the support polygon. However, the subsequent results show that the ZMP still remains within the support polygon.

3.2. Foot Placement

In generating the COM trajectory, the position of the next support foot ( p x f o o t _ n e x t , p y f o o t _ n e x t ) is involved. It is determined by
p x f o o t _ n e x t = v x d T
p y f o o t _ n e x t = 2 v y d T + ( 1 ) s d
where T represents the duration of a step period and a support period, which remains constant throughout the walk. v x d and v y d are the desired walking speeds of the robot in the X-axis and Y-axis directions, respectively. And d is the length of the robot pelvis (the default step width).

4. Walking Pattern Generation with Height Variation

In the previous section, we generated a trajectory for robots walking on flat ground with the COM constrained to a fixed height. In this section, we will remove this constraint and generate a walking pattern that allows for variable COM heights.

4.1. Constraints on the ZMP with Variable COM Height

When the robot’s COM moves at a constant height, as shown in Figure 4a, the ground reaction force f passing through the ZMP balances with the gravity compensation force M g and the acceleration force M x ¨ . When the COM has an acceleration in the vertical direction, the change in ZMP is as shown in Figure 4b. When the COM moves in the vertical direction, the change in ZMP is as shown in Figure 4c. Therefore, by limiting the range of the COM’s position and acceleration, we can determine the range of ZMP variation and maintain the stability of the robot by ensuring that the boundary values of ZMP remain within the support polygon. In this manner, we can vary the COM height while preserving the linearity of the optimization problem, though it may excessively restrict the ZMP.
Next, determine the boundary values of the ZMP. Equation (5) can be written as
p x z , z ¨ = x z p z z ¨ + g x ¨
This function only considers the influence of z and z ¨ on the ZMP position. And the range of the variables z and z ¨ is defined as
z m i n z z m a x z ¨ l i m z ¨ z ¨ l i m
So, when x ¨ 0 ,
p x z m a x , z ¨ l i m p x z , z ¨ p x z m i n , z ¨ l i m
And, when x ¨ 0 ,
p x z m i n , z ¨ l i m p x z , z ¨ p x z m a x , z ¨ l i m
During the trajectory optimization process, simultaneously consider both (11) and (12), without determining the sign of x ¨ .

4.2. Quadratic Programming with Height Variation

After obtaining the boundary value of ZMP determined by the variation range of the COM’s position and acceleration in the vertical direction, the three-dimensional trajectory of the COM can be generated. First, determine the COM’s trajectory along the X-axis and Z-axis by
min u x 0 , u x 1 , u x n 1 u z 0 , u z 1 , u z n 1 k = 0 n 1 α 2 ( u x k 2 + u z k 2 ) + β 2 ( x ¨ k 2 + z ¨ k 2 ) + γ 2 ( x ˙ k 2 + z ˙ k 2 )   s . t .               x ^ k + 1 = A x ^ k + B u x k               z ^ k + 1 = A z ^ k + B u z k               p x k z , z ¨ = x k z p z k z ¨ + g x ¨ k               p x l i m p x k z m a x , z ¨ l i m p x l i m t k SS 1               p x l i m p x k z m i n , z ¨ l i m p x l i m t k SS 1               p x f o o t p x l i m p x k z m a x , z ¨ l i m p x f o o t _ n e x t + p x l i m t k SS 2               p x f o o t p x l i m p x k z m i n , z ¨ l i m p x f o o t _ n e x t + p x l i m t k SS 2               x ¨ n = 0               x ˙ n = x ˙ n r e f               x n = p x f o o t _ n e x t
where, unlike (6), it includes the trajectory planning of COM in the Z-axis direction, and restricts the ZMP position according to (11) and (12) in the SS1 and SS2 phases. However, during the DS phase, the two supporting feet are not at the same height, which increases the difficulty of calculating the ZMP. To simplify the approach, no constraints are applied to the ZMP during this phase, similar to [5] And it should also be emphasized that when the robot needs to stop, x ˙ n is set to 0.
Secondly, determine the trajectory of COM in the Y-axis direction by
min u y 0 , u y 1 , u y n 1 k = 0 n 1 α 2 u y k 2 + β 2 y ¨ k 2 + γ 2 y ˙ k 2 s . t .                 y   ^ k + 1 = A y ^ k + B u y k               p y k = y z k p z z ¨ k + g y ¨               p y l i m p y k p y l i m t k SS               y ¨ n = 0               y   ˙ n = 0               y n = p y f o o t _ n e x t / 2
where the second constraint takes into account the change in z k and z ¨ k , which are derived from (13). Similarly, the fifth constraint is only used as a constraint when the robot needs to stop.

5. Overview of the Control Framework

Figure 5 shows the overall framework of the robot, primarily focusing on the generation of the COM trajectory for a plane or stairs. First, based on the given walk parameters such as walking period T , walking speeds v x and v y , and step height h s , generate the foot trajectory F t r a and the foothold C O P . Secondly, based on walk parameters and C O P , generate COM trajectory C O M . For a plane, (6) optimizes the trajectory C O M x for the X-axis, (7) optimizes the trajectory C O M y for the Y-axis, and C O M z is constant. For stairs, (13) optimizes the trajectories C O M x and C O M z for the X-axis and Z-axis, respectively, and (14) optimizes the trajectory C O M y for the Y-axis. Third, the desired joint angles q d are obtained through the inverse kinematics to realize the desired C O M and F t r a . Lastly, perform position control on the robot at the joint level by control angles q c and measure angles q m .

6. Method Demonstrations

6.1. Numerical Comparison

To intuitively show the advantage of our proposed walking pattern generation method, numerical comparisons were implemented. We used three different methods to generate the COM trajectory along the X-axis within one step based on the LIPM. The specified walking parameters are detailed in Table 2.
These three methods utilized the same objective function as shown in (6) but differed in the constraints applied, as follows:
Method 1: Optimize the COM trajectory over a two-step horizon without terminal constraints or the double support phase.
Method 2: Optimize the COM trajectory over a one-step horizon with terminal constraints, as shown in (6), but without the double support phase.
Method 3: Optimize the COM trajectory over a one-step horizon with terminal constraints and the double support phase, as shown in (6). And the proportions for the three stages SS1, DS, and SS2 are 10%, 80%, and 10%, respectively, based on the human gait analysis reported in [25], which reflects the typical durations of single support and double support phases during walking.
By setting the initial, desired, and terminal speeds to 0.375 m/s, the COM trajectory was optimized using these three methods. The resulting COM velocities are shown in Figure 6, and the resulting COM accelerations are shown in Figure 7. Figure 6 illustrates that due to the terminal constraints on the COM state, both Method 2 and Method 3 achieve the desired speed of 0.375 m/s at the end of one step. In contrast, Method 1 deviates from the desired speed at the end of one step. Furthermore, due to the presence of the double support phase, Method 3 deviates less from the desired speed within one step compared to Method 1 and Method 2. As shown in Figure 7, there are abrupt changes in acceleration in Method 1 and Method 2, due to the instantaneous exchange of the support leg with the swing leg. In Method 3, however, there is a smooth transition in acceleration during the double support phase, moving smoothly from the acceleration state to the deceleration state.
When the initial velocity decreases to 0.05 m/s and the desired and terminal velocities are maintained at 0.375 m/s, the velocity of the generated COM trajectory is as shown in Figure 8. At the end of a step, Method 3 is able to reach the desired speed, while Method 1 deviates significantly from the desired speed. In addition, it can be found that Method 1 will be in a divergent state in the two steps. For Method 2, optimization did not converge, and no COM trajectory was generated. This is because the initial speed is small, and the COM cannot achieve a sufficient speed during the acceleration phase to meet the terminal constraints.
In conclusion, comparing Method 1 and Method 2 reveals that reasonable terminal constraints can achieve an ideal COM trajectory while shortening the optimized horizon. Furthermore, adding a double support phase to Method 2 transforms it into Method 3. Compared to Method 2, Method 3 demonstrates the capability to achieve a smooth transition of acceleration which is crucial for the stability of the robot.

6.2. Walk Simulation on Flat Ground

In the Webots simulation environment, we conducted simulations of walking on flat ground.
The first simulation is the robot walking in a straight line along the X-axis, as shown in Figure 9. The step length is 0.15 m in the first half and increases to 0.18 m in the second half, with a speed transition process in between. The specified walking parameters are detailed in Table 3.
Figure 10 illustrates the COM and ZMP trajectories generated through step optimization for different initial and terminal velocities. Figure 10a shows the step of the robot walking at an approximate uniform speed with a step length of 0.15 m. At 0 s, the COM and ZMP are both located in the middle of the support foot. Subsequently, they move forward at nearly the same speed. At 0.40 s, the ZMP reaches 0.05 m, which is the front edge of the support surface. Afterwards, the COM continues to move forward while the ZMP stays at 0.05 m. In this case, the COM can be regarded as performing linear inverted pendulum motion at the support point of 0.05 m. At 0.48 s, the robot enters the double support phase, and the ZMP begins to approach the COM. From 0.55 s to 0.65 s, the trajectories of the COM and ZMP almost coincide. Subsequently, the ZMP moves ahead of the COM, and the COM enters a deceleration state. At 0.72 s, the robot enters the single support phase, supported by the next foot, and the ZMP reaches 0.1 m, which is the rear edge of the next support surface. Then, the ZMP remains at this position until it coincides with the COM. Finally, the COM and ZMP move along almost identical trajectories to the middle of the next support foot.
Figure 10b shows the step of the robot startup phase. The ZMP lags behind COM in the early stage, putting COM in an accelerated state. This allows the robot to gain a certain speed. Figure 10c shows the step of the robot with variable speed and step length. The initial velocity is 0.125 m/s, the terminal velocity is 0.15 m/s, and the step length is 0.18 m. The shape of the COM and ZMP trajectories in this step is similar to those in Figure 10a. The difference is that in the early stage of this step, the ZMP is behind the COM. This is due to the COM needing to increase from 0.125 m/s to 0.15 m/s. Figure 10d shows the step of the robot walking at an approximate uniform speed with a step length of 0.18 m. Different from Figure 10a, in this step, the ZMP lingers longer at the edge of the support surface at 0.05 m and 0.13 m. This is due to the increase in step length, or more precisely, the increase in speed. Figure 10e shows the step of the robot stopping phase. In contrast to the process in Figure 10b in the later stages of this step, the ZMP is ahead of the COM, causing the COM to decelerate to zero. Finally, the COM and ZMP are both located in the middle of the support surface.
Furthermore, from Figure 10, it can be observed that the ZMP trajectory generated by the step optimization proposed in this article conforms the pattern of human walking. In the SS1 phase, the ZMP moves from the middle of the support surface to the front edge. During the DS phase, the ZMP shifts from the front edge of the support surface to the rear edge of the next foot support. In the SS2 phase, the ZMP moves from the rear edge of the next foot support to its middle. Here, the front edge of the support surface corresponds to the toes, and the rear edge corresponds to the heel. Additionally, the change in relative positions between COM and ZMP allows for flexible adjustment of COM velocity.
In the second demonstration, the robot performed diagonal walking, as shown in Figure 11. The specified walking parameters are detailed in Table 4. The distribution of foot placements and the trajectory of the COM and ZMP are illustrated in Figure 12. During the single support phase, the ZMP trajectory approaches the inner edge of the support surface, thereby reducing the lateral sway amplitude of the COM. In the double support phase, ZMP transitions from one support surface to another in an approximately straight trajectory, which is an ideal transition trajectory. Additionally, Figure 12 also illustrates that the COM trajectory is relatively smooth and closely follows the ZMP trajectory, which contributes to the stability of the robot.
It should be emphasized that during the startup phase, the COM moves in the lateral plane for half a step period before starting to move in the sagittal plane, which causes the ZMP to move along the Y-axis first. The opposite is true during the stopping phase. Additionally, in the final support period, the ZMP is discontinuous along the Y-axis and suddenly shifts to the left, as shown in Figure 12. This adjustment ensures that the COM moves further to the right, allowing it to come to a stop between the two feet at the end of this support period.
Figure 13 illustrates the COM and ZMP trajectories along the Y-axis during the first and second support periods. The first support period is for right foot support and is the startup phase. In the IDS stage, ZMP first moves left to allow the COM to gain speed to the right, then moves right to enter the right foot support surface to achieve the transition to SS. The second support period is for left foot support. At the beginning of the period, the COM has a velocity to the left, which makes the trajectory of ZMP relatively smooth. Additionally, at the end of these two support periods, the COM has shifted 0.03 m to the left relative to its initial position. This illustrates that the step optimization proposed in this paper enables the robot to have lateral movement capability.

6.3. Walking Simulation on Stairs

To validate the generation of walking patterns with height variation, the robot conducted a simulation experiment of climbing stairs, as shown in Figure 14. Figure 15 is a schematic diagram of COM motion trajectory with constraint. And the specified walking parameters are detailed in Table 5. Among them, the vertical range of COM motion is determined by the height of the step and the normal height of the COM.
Figure 16 illustrates the COM and ZMP trajectories along the X-axis for the first step. During the single support phase, the ZMP is constrained within the support surface and remains near the edge at certain moments. This demonstrates the reliability of over-constraining the ZMP during changes in COM height.
The motion trajectory of COM on the Z-axis is shown in Figure 17. During the start step, the COM accelerates; during the stop step, it decelerates; and in the other steps, the COM moves upward at a constant speed.
Figure 18 depicts the motion trajectory of the COM in the sagittal plane. In contrast to [26], this trajectory is not constrained to a straight line, making the movement of COM more flexible.

6.4. Walking Experiments

The step optimization algorithm proposed in this article has also been verified on the real position-controlled biped robot Neubot. Figure 19 shows the walking experiment. Figure 20 shows the stair climbing experiment.

7. Conclusions

In this article, we focus on the generation of walking patterns for biped robots, and propose a novel method to generate the trajectory of the COM based on LIPM using quadratic optimization. First, this method employs a novel step that includes both the single support phase and the double support phase, enabling smooth transitions of the ZMP between the support feet. Second, by applying terminal constraints to the optimization problem, trajectories can be generated in units of a step, thereby shortening the optimization horizon. Third, this method achieves variations in the COM height while maintaining the linearity of the optimization problem, through excessive constraints on the ZMP within the support polygon. Furthermore, the performance of the proposed method is validated by simulations and experiments on a position-controlled biped robot, Neubot. Initially, the robot walked in a straight line. In the start, stop, uniform speed, and variable speed steps, the robot was able to obtain ideal COM and ZMP trajectories. Next, the robot walked diagonally. The trajectories of the COM and ZMP were closely aligned, ensuring the stability of the robot’s movement. Finally, the robot climbed stairs, achieving changes in the height of the COM. In future work, we plan to implement online generation of robot walking patterns, aiming to improve the robot’s adaptability to uneven terrain and its robustness against external perturbations [27,28,29,30,31].

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/biomimetics10100654/s1, Video S1: Walking Pattern Generation through Step-by-Step Quadratic Programming for Biped Robots.

Author Contributions

Methodology, G.L.; Software, H.Z.; Investigation, Z.L. (Zeyang Liu); Supervision, Z.L. (Zhiguo Lu). All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article/Supplementary Material. Further inquiries can be directed to the corresponding author(s).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Erbatur, K.; Kurt, O. Natural ZMP trajectories for biped robot reference generation. IEEE Trans. Ind. Electron. 2009, 56, 835–845. [Google Scholar] [CrossRef]
  2. Kajita, S.; Kanehiro, F.; Kaneko, K.; Fujiwara, K.; Harada, K.; Yokoi, K.; Hirukawa, H. Biped walking pattern generation by using preview control of zero-moment point. In Proceedings of the IEEE International Conference on Robotics and Automation 2003, Taipei, Taiwan, 14–19 September 2003; Volume 2, pp. 1620–1626. [Google Scholar]
  3. Wieber, P.-B. Trajectory free linear model predictive control for stable walking in the presence of strong perturbations. In Proceedings of the IEEE-RAS International Conference on Humanoid Robots, Genova, Italy, 4–6 December 2006; pp. 137–142. [Google Scholar]
  4. Diedam, H.; Dimitrov, D.; Wieber, P.-B.; Mombaur, K.; Diehl, M. Online walking gait generation with adaptive foot positioning through linear model predictive control. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, Nice, France, 22–26 September 2008; pp. 1121–1126. [Google Scholar]
  5. Herdt, A.; Diedam, H.; Wieber, P.-B.; Dimitrov, D.; Mombaur, K.; Diehl, M. Online walking motion generation with automatic footstep placement. Adv. Robot. 2010, 24, 719–737. [Google Scholar] [CrossRef]
  6. Khadiv, M.; Herzog, A.; Moosavian, S.A.A.; Righetti, L. Walking control based on step timing adaptation. IEEE Trans. Robot. 2020, 36, 629–643. [Google Scholar] [CrossRef]
  7. Buschmann, T.; Lohmeier, S.; Bachmayer, M.; Ulbrich, H.; Pfeiffer, F. A collocation method for real-time walking pattern generation. In Proceedings of the IEEE-RAS International Conference on Humanoid Robots (Humanoids), Pittsburgh, PA, USA, 29 November–1 December 2007; pp. 1–6. [Google Scholar]
  8. Takenaka, T.; Matsumoto, T.; Yoshiike, T. Real time motion generation and control for biped robot-1st report: Walking gait pattern generation. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, St. Louis, MO, USA, 10–15 October 2009; pp. 1084–1091. [Google Scholar]
  9. Tajima, D.; Honda, R.; Suga, K. Fast running experiments involving a humanoid robot. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), Kobe, Japan, 12–17 May 2009; pp. 1571–1576. [Google Scholar]
  10. Nishiwaki, K.; Kagami, S. Online walking control system for humanoids with short cycle pattern generation. Int. J. Robot. Res. 2009, 28, 729–742. [Google Scholar] [CrossRef]
  11. Park, J.; Youm, Y. General ZMP preview control for bipedal walking. In Proceedings of the IEEE International Conference on Robotics and Automation, Rome, Italy, 10–14 April 2007; pp. 2682–2687. [Google Scholar]
  12. Englsberger, J.; Koolen, T.; Bertrand, S.; Pratt, J.; Ott, C.; AlbuSchaffer, A. Trajectory generation for continuous leg forces during double support and heel-to-toe shift based on divergent component of motion. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, Chicago, IL, USA, 14–18 September 2014; pp. 4022–4029. [Google Scholar]
  13. Yi, S.J.; Lee, D.D. Dynamic heel-strike toe-off walking controller for full-size modular humanoid robots. In Proceedings of the IEEE-RAS International Conference on Humanoid Robots, Cancun, Mexico, 15–17 November 2016; pp. 395–400. [Google Scholar]
  14. Hanasaki, S.; Tazaki, Y.; Nagano, H.; Yokokohji, Y. Running trajectory generation including gait transition between walking based on the time-varying linear inverted pendulum mode. In Proceedings of the IEEE-RAS International Conference on Humanoid Robots, Ginowan, Japan, 28–30 November 2022; pp. 851–857. [Google Scholar]
  15. Faraji, S.; Pouya, S.; Atkeson, C.G.; Ijspeert, A.J. Versatile and robust 3D walking with a simulated humanoid robot (Atlas): A model predictive control approach. In Proceedings of the IEEE International Conference on Robotics and Automation, Hong Kong, China, 31 May–7 June 2014; pp. 1943–1950. [Google Scholar]
  16. Ding, J.; Zhou, C.; Xin, S.; Xiao, X.; Tsagarakis, N.G. Nonlinear model predictive control for robust bipedal locomotion: Exploring angular momentum and com height changes. Adv. Robot. 2021, 35, 1079–1097. [Google Scholar] [CrossRef]
  17. Katayama, S.; Murooka, M.; Tazaki, Y. Model predictive control of legged and humanoid robots: Models and algorithms. Adv. Robot. 2023, 37, 298–315. [Google Scholar] [CrossRef]
  18. Van Heerden, K. Planning COM trajectory with variable height and foot position with reactive stepping for humanoid robots. In Proceedings of the 2015 IEEE International Conference on Robotics and Automation (ICRA), Seattle, WA, USA, 26–30 May 2015; pp. 6275–6280. [Google Scholar]
  19. Van, K. Heerden Real-time variable center of mass height trajectory planning for humanoids robots. IEEE Robot. Autom. Lett. 2017, 2, 135–142. [Google Scholar]
  20. Xie, Z.; Wang, Y.; Luo, X.; Arpenti, P.; Ruggiero, F.; Siciliano, B. Three-dimensional variable center of mass height biped walking using a new model and nonlinear model predictive control. Mech. Mach. Theory 2024, 197, 105651. [Google Scholar] [CrossRef]
  21. Ryu, K.; Yoo, J.; Back, J.; Park, I.-W. Preview control-based online walking pattern generation for biped robots with vertical center-of-mass motion. Int. J. Precis. Eng. Manuf. 2020, 21, 1653–1661. [Google Scholar] [CrossRef]
  22. Brasseur, C.; Sherikov, A.; Collette, C.; Dimitrov, D.; Wieber, P.-B. A robust linear MPC approach to online generation of 3D biped walking motion. In Proceedings of the IEEE-RAS International Conference on Humanoid Robots, Seoul, Republic of Korea, 3–5 November 2015; pp. 595–601. [Google Scholar]
  23. Ho, Y.-F.; Li, T.-H.S.; Kuo, P.-H.; Ye, Y.-T. Parameterized gait pattern generator based on linear inverted pendulum model with natural ZMP references. Knowl. Eng. Rev. 2016, 32, e3. [Google Scholar] [CrossRef]
  24. Yu, H.; Gao, H.; Deng, Z. Toward a unified approximate analytical representation for spatially running spring-loaded inverted pendulum model. IEEE Trans. Robot. 2021, 37, 691–698. [Google Scholar] [CrossRef]
  25. Grant, A.D. Gait analysis: Normal and pathological function. JAMA 2010, 304, 907. [Google Scholar] [CrossRef]
  26. Sato, T.; Sakaino, S.; Ohashi, E.; Ohnishi, K. Walking trajectory planning on stairs using virtual slope for biped robots. IEEE Trans. Ind. Electron. 2011, 58, 1385–1396. [Google Scholar] [CrossRef]
  27. Englsberger, J.; Ott, C.; Albu-Schäffer, A. Three-Dimensional Bipedal Walking Control Based on Divergent Component of Motion. IEEE Trans. Robot. 2015, 31, 355–368. [Google Scholar] [CrossRef]
  28. Joe, H.-M.; Oh, J.-H. A Robust Balance-Control Framework for the Terrain-Blind Bipedal Walking of a Humanoid Robot on Unknown and Uneven Terrain. Sensors 2019, 19, 4194. [Google Scholar] [CrossRef] [PubMed]
  29. He, Z.; Piao, S.; Leng, X.; Wu, Y. Uneven Terrain Walking with Linear and Angular Momentum Allocation. Sensors 2023, 23, 2027. [Google Scholar] [CrossRef] [PubMed]
  30. Kim, M.-J.; Lim, D.; Park, G.; Lee, K.; Park, J. A Model Predictive Capture Point Control Framework for Robust Humanoid Balancing Via Ankle, Hip, and Stepping Strategies. IEEE Trans. Robot. 2025, 41, 3297–3316. [Google Scholar] [CrossRef]
  31. Jeong, H.; Lee, I.; Oh, J.; Lee, K.K.; Oh, J.-H. A Robust Walking Controller Based on Online Optimization of Ankle, Hip, and Stepping Strategies. IEEE Trans. Robot. 2019, 35, 1367–1386. [Google Scholar] [CrossRef]
Figure 1. Neubot, a position-controlled biped robot. It has 12 degrees of freedom, stands at a height of 0.57 m, and weighs 3.1 kg.
Figure 1. Neubot, a position-controlled biped robot. It has 12 degrees of freedom, stands at a height of 0.57 m, and weighs 3.1 kg.
Biomimetics 10 00654 g001
Figure 2. A support period of one leg. The blue line represents the COM trajectory during the left-leg support period, the red line during the right-leg support period, and their overlap indicates the trajectory during the double-support period.
Figure 2. A support period of one leg. The blue line represents the COM trajectory during the left-leg support period, the red line during the right-leg support period, and their overlap indicates the trajectory during the double-support period.
Biomimetics 10 00654 g002
Figure 3. A step period for the COM in the sagittal plane. The blue line represents the COM trajectory during the left-leg support period, the red line during the right-leg support period, and their overlap indicates the trajectory during the double-support period.
Figure 3. A step period for the COM in the sagittal plane. The blue line represents the COM trajectory during the left-leg support period, the red line during the right-leg support period, and their overlap indicates the trajectory during the double-support period.
Biomimetics 10 00654 g003
Figure 4. Relationship between the COM’s motion and the ZMP: (a) the COM is maintained at a fixed height; (b) the COM has vertical acceleration; (c) the COM has height variation in the vertical direction. Arrows and dashed lines indicate the direction of the applied force.
Figure 4. Relationship between the COM’s motion and the ZMP: (a) the COM is maintained at a fixed height; (b) the COM has vertical acceleration; (c) the COM has height variation in the vertical direction. Arrows and dashed lines indicate the direction of the applied force.
Biomimetics 10 00654 g004
Figure 5. Overall control framework of biped robot for walking pattern generation.
Figure 5. Overall control framework of biped robot for walking pattern generation.
Biomimetics 10 00654 g005
Figure 6. The velocity trajectory for a step using different methods.
Figure 6. The velocity trajectory for a step using different methods.
Biomimetics 10 00654 g006
Figure 7. The acceleration trajectory for a step using different methods.
Figure 7. The acceleration trajectory for a step using different methods.
Biomimetics 10 00654 g007
Figure 8. The optimized velocity trajectory with an initial velocity of 0.05 m/s.
Figure 8. The optimized velocity trajectory with an initial velocity of 0.05 m/s.
Biomimetics 10 00654 g008
Figure 9. Simulation experiment for walking in a straight line.
Figure 9. Simulation experiment for walking in a straight line.
Biomimetics 10 00654 g009
Figure 10. The COM and ZMP trajectories for different steps: (a) the uniform speed step with an initial and terminal constraint velocity of 0.125 m/s, and a step length of 0.15 m; (b) the startup step with an initial velocity of 0 m/s, terminal constraint velocity of 0.125 m/s, and a step length of 0.15 m; (c) the variable speed step with an initial velocity of 0.125 m/s, terminal constraint velocity of 1.5 m/s, and a step length of 0.18 m; (d) the uniform speed step with an initial and terminal velocity of 0.15 m/s, and a step length of 0.18 m; (e) the stopping step with an initial velocity of 0.15 m/s, terminal constraint velocity of 0 m/s, and a step length of 0.18 m.
Figure 10. The COM and ZMP trajectories for different steps: (a) the uniform speed step with an initial and terminal constraint velocity of 0.125 m/s, and a step length of 0.15 m; (b) the startup step with an initial velocity of 0 m/s, terminal constraint velocity of 0.125 m/s, and a step length of 0.15 m; (c) the variable speed step with an initial velocity of 0.125 m/s, terminal constraint velocity of 1.5 m/s, and a step length of 0.18 m; (d) the uniform speed step with an initial and terminal velocity of 0.15 m/s, and a step length of 0.18 m; (e) the stopping step with an initial velocity of 0.15 m/s, terminal constraint velocity of 0 m/s, and a step length of 0.18 m.
Biomimetics 10 00654 g010
Figure 11. Simulation experiment of diagonal walking.
Figure 11. Simulation experiment of diagonal walking.
Biomimetics 10 00654 g011
Figure 12. The foot placement distribution, along with the COM and ZMP trajectories, for diagonal walking. Note that the support polygon is smaller than the actual foot surface for a safety margin.
Figure 12. The foot placement distribution, along with the COM and ZMP trajectories, for diagonal walking. Note that the support polygon is smaller than the actual foot surface for a safety margin.
Biomimetics 10 00654 g012
Figure 13. The COM and ZMP trajectories along the Y-axis for different support periods: (a) the first support period with an initial velocity of 0 m/s; (b) the second support period with an initial velocity of 0.28 m/s, which is the terminal velocity of the last support period.
Figure 13. The COM and ZMP trajectories along the Y-axis for different support periods: (a) the first support period with an initial velocity of 0 m/s; (b) the second support period with an initial velocity of 0.28 m/s, which is the terminal velocity of the last support period.
Biomimetics 10 00654 g013
Figure 14. Simulation experiment for walking on stairs.
Figure 14. Simulation experiment for walking on stairs.
Biomimetics 10 00654 g014
Figure 15. Schematic diagram of COM motion trajectory.
Figure 15. Schematic diagram of COM motion trajectory.
Biomimetics 10 00654 g015
Figure 16. The COM and ZMP trajectories along the X-axis for the first step.
Figure 16. The COM and ZMP trajectories along the X-axis for the first step.
Biomimetics 10 00654 g016
Figure 17. The COM motion trajectory along the Z-axis: (a) position, (b) velocity, and (c) acceleration.
Figure 17. The COM motion trajectory along the Z-axis: (a) position, (b) velocity, and (c) acceleration.
Biomimetics 10 00654 g017
Figure 18. The motion trajectory of COM in the sagittal plane.
Figure 18. The motion trajectory of COM in the sagittal plane.
Biomimetics 10 00654 g018
Figure 19. The experiment for walking in a straight line.
Figure 19. The experiment for walking in a straight line.
Biomimetics 10 00654 g019
Figure 20. The experiment for walking on stairs.
Figure 20. The experiment for walking on stairs.
Biomimetics 10 00654 g020
Table 1. A gait cycle of a human limb.
Table 1. A gait cycle of a human limb.
Stance 60%
Initial double stance10%
Single limb support40%
Terminal double stance10%
Swing 40%
Table 2. Walking parameters.
Table 2. Walking parameters.
Step PeriodStep LengthCOM HeightSupport RangeWithout Double SupportWith Double Support
0.8 s0.3 m0.8 s0.1 m0.4 s0.4 s0.32 s0.16 s0.32 s
Table 3. The parameters for walking in a straight line.
Table 3. The parameters for walking in a straight line.
Step PeriodStep LengthCOM HeightSupport RangeSS1DSSS2
1.2 s0.15 and 0.18 m0.27 m0.1 m0.48 s0.24 s0.48 s
Table 4. The parameters for diagonal walking.
Table 4. The parameters for diagonal walking.
Step Period v x v y COM HeightSupport RangeSS1DSSS2
1.2 s0.125 m/s0.025 m/s0.27 m0.1 × 0.05 m0.48 s0.24 s0.48 s
Table 5. The parameters for walking on stairs.
Table 5. The parameters for walking on stairs.
Step period T 1.8 s
COM normal height z n 0.27 m
Step height h s 0.07 m
Support range0.2 × 0.2 m
Acceleration limit z ¨ l i m 0.1 × 9.8 m / s 2
SS1Duration0.4 × T
p z 0
z m i n z n
z m a x z n + 0.5 × h s
DSDuration0.2 × T
SS2Duration0.4 × T
p z h s
z m i n z n + 0.5 × h s
z m a x z n + h s
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, G.; Lu, Z.; Zhang, H.; Liu, Z. Walking Pattern Generation Through Step-by-Step Quadratic Programming for Biped Robots. Biomimetics 2025, 10, 654. https://doi.org/10.3390/biomimetics10100654

AMA Style

Liu G, Lu Z, Zhang H, Liu Z. Walking Pattern Generation Through Step-by-Step Quadratic Programming for Biped Robots. Biomimetics. 2025; 10(10):654. https://doi.org/10.3390/biomimetics10100654

Chicago/Turabian Style

Liu, Guoshuai, Zhiguo Lu, Hang Zhang, and Zeyang Liu. 2025. "Walking Pattern Generation Through Step-by-Step Quadratic Programming for Biped Robots" Biomimetics 10, no. 10: 654. https://doi.org/10.3390/biomimetics10100654

APA Style

Liu, G., Lu, Z., Zhang, H., & Liu, Z. (2025). Walking Pattern Generation Through Step-by-Step Quadratic Programming for Biped Robots. Biomimetics, 10(10), 654. https://doi.org/10.3390/biomimetics10100654

Article Metrics

Back to TopTop