Gait Planning and Anti-Push Control for Biped Humanoid Robots

Biped humanoid robots have been a central research topic in robotics for decades due to their potential to operate in human-centered environments. Compared with wheeled or tracked robots, humanoid robots possess superior adaptability to stairs, uneven terrain, and narrow passages. However, their complex mechanical structure and hybrid dynamic nature make stable locomotion and disturbance rejection challenging. In this dissertation, I focus on developing a stable gait planning algorithm based on the linear inverted pendulum model (LIPM) and an anti-push control strategy based on the capture point theory. The proposed methods are first verified in a V-REP simulation environment and then implemented on a physical small-scale humanoid robot with 20 degrees of freedom. I also investigate the robot’s response to external pushes and design a recovery controller that adjusts the foot placement and step timing to restore a desired motion state. The results demonstrate that the proposed gait planner produces smooth and stable walking on various ground surfaces, and the anti-push controller enables the robot to maintain balance after moderate impulsive disturbances.

1. Introduction and Motivation

The development of humanoid robots has progressed significantly over the past few decades. Early robots such as planar bipeds were capable of simple hopping and walking, while modern platforms like Atlas and ASIMO exhibit remarkable agility and dynamic balance. Nevertheless, small-scale humanoid robots still face critical limitations in both locomotion speed and adaptability. Most existing small humanoid robots use static walking patterns based on the zero-moment point (ZMP) criterion, which ensures that the robot’s ZMP stays within the support polygon. While this approach is straightforward and safe, it results in slow and conservative motions. Moreover, such robots typically lack the ability to respond to unexpected external forces, such as pushes, without falling.

In contrast, dynamic walking based on the linear inverted pendulum model allows a humanoid robot to move more naturally and efficiently. The LIPM abstracts the robot as a point mass concentrated at the center of mass (COM) and a massless telescopic leg that maintains a constant COM height. This model simplifies the planning of COM trajectories and provides a basis for analyzing orbital energy and capture points. In this work, I adopt the LIPM as the theoretical foundation for gait planning and extend it to an anti-push algorithm using the capture point framework.

The main contributions of this thesis are as follows. First, I construct a 20-degree-of-freedom humanoid robot model and derive the forward and inverse kinematics analytically. Second, I design a gait planner that separately plans the COM motion in the coronal and sagittal planes using the inverted pendulum equations. Third, I improve the swing foot trajectory to reduce landing impact and increase stability. Fourth, I validate the gait algorithm both in simulation and on a physical robot across different floor conditions. Finally, I develop an anti-push controller based on capture point and orbital energy theory, and I demonstrate its effectiveness in simulation by comparing the robot’s behavior with and without the controller.

2. Kinematics of the Humanoid Robot

To control a humanoid robot, it is essential to understand the mapping between joint angles and the pose of the end effectors (feet and torso). Kinematics is divided into forward kinematics and inverse kinematics. Forward kinematics computes the position and orientation of the foot or torso given the joint angles, while inverse kinematics determines the joint angles required to achieve a desired foot pose relative to the torso.

In this work, the robot has two legs with six degrees of freedom each, and the torso contains additional joints for the arms and head. Since the arms and head are kept at fixed positions during walking, I focus on the leg kinematics. Each leg chain can be modeled as a series link from the hip to the ankle. The inverse kinematics solution is derived analytically using the geometry of the leg.

Let the hip be located at a distance \(D\) from the origin (torso center), with thigh length \(A\) and shank length \(B\). The position of the ankle relative to the hip is expressed in the ankle coordinate frame as:

$$ \mathbf{r} = (r_x, r_y, r_z)^T $$

Then the distance between the hip and ankle is:

$$ C = \sqrt{r_x^2 + r_y^2 + r_z^2} $$

The knee angle \(q_5\) is obtained from the law of cosines:

$$ q_5 = \pi – \arccos\left( \frac{A^2 + B^2 – C^2}{2AB} \right) $$

The ankle pitch and roll angles are then calculated as:

$$ q_6 = \operatorname{atan2}\left(-r_x, \sqrt{r_y^2 + r_z^2}\right) – \alpha $$
$$ q_7 = \operatorname{atan2}(r_y, r_z) $$

where \(\alpha\) is an auxiliary angle derived from the triangle formed by the hip, knee, and ankle.

After solving the ankle angles, the remaining hip joint angles are computed by comparing the rotation matrix of the ankle frame with the desired orientation. The complete set of joint angles for the right leg is obtained using the above procedure, and the left leg is solved analogously. This analytical approach is efficient and accurate enough for real-time control.

The forward kinematics is used to verify the computed joint angles and to estimate the COM position from measured joint angles. The homogeneous transformation matrix for each joint is multiplied along the kinematic chain to obtain the ankle position relative to the torso.

3. Linear Inverted Pendulum Model

The linear inverted pendulum model is a common abstraction for bipedal walking. It assumes that the entire mass of the robot is concentrated at the COM, which moves on a horizontal plane at constant height \(H\). The leg is massless and can change length freely, but the contact point with the ground (the foot) is fixed during the single support phase. The resulting dynamics are linear, which makes the model analytically tractable.

Consider a coordinate system where the foot support point is at the origin and the COM position along the walking direction is \(x(t)\). The horizontal force acting on the COM is proportional to the horizontal displacement and the gravitational force, giving:

$$ m \ddot{x} = \frac{mg}{H} x $$

Defining the natural frequency \(\omega = \sqrt{g/H}\), the equation becomes:

$$ \ddot{x} = \omega^2 x $$

The solution is a hyperbolic function:

$$ x(t) = x_0 \cosh(\omega t) + \frac{v_0}{\omega} \sinh(\omega t) $$

$$ \dot{x}(t) = x_0 \omega \sinh(\omega t) + v_0 \cosh(\omega t) $$

where \(x_0\) and \(v_0\) are the initial position and velocity of the COM. This model describes the COM trajectory during a single support phase, assuming that the foot contact point remains at the origin.

For planning purposes, I decompose the three-dimensional walking motion into two perpendicular planes: the coronal plane (lateral direction, x-axis) and the sagittal plane (forward direction, y-axis). The COM height is kept constant, so the vertical direction does not require a dynamic model.

4. Gait Planning Based on the Inverted Pendulum Model

4.1 COM Trajectory in the Coronal Plane

In the coronal plane, the robot alternates its support foot between left and right. The distance between the two feet is denoted by \(D\). During one complete walking cycle with period \(T\), the COM moves from one side to the other and back. For the second half of the cycle, say when the right foot is the support, the initial position is at \(x = -D/2\) and the initial velocity is \(v_0\). At the end of the half cycle, the COM returns to \(x = -D/2\) with velocity \(-v_0\). Substituting these boundary conditions into the inverted pendulum solution yields:

$$ -\frac{D}{2} \cosh\left(\frac{\omega T}{2}\right) + \frac{v_0}{\omega} \sinh\left(\frac{\omega T}{2}\right) = \frac{D}{2} $$

Solving for \(v_0\):

$$ v_0 = \frac{D \omega (1 – \cosh(\omega T/2))}{2 \sinh(\omega T/2)} $$

The COM trajectory in the coronal plane is therefore a smooth periodic curve that passes through the center line with maximum velocity and reaches zero velocity at the extremes.

4.2 COM Trajectory in the Sagittal Plane

In the sagittal plane, the robot moves forward by a step length \(F\) per cycle. During the support phase, the COM starts at a position \(F/4\) behind the support foot and ends at \(F/4\) ahead of it. Applying the inverted pendulum equation over the half-cycle yields:

$$ \frac{F}{4} = -\frac{F}{4} \cosh\left(\frac{\omega T}{2}\right) + \frac{v_0}{\omega} \sinh\left(\frac{\omega T}{2}\right) $$

Hence,

$$ v_0 = \frac{F \omega (1 + \cosh(\omega T/2))}{4 \sinh(\omega T/2)} $$

These equations provide the initial velocity for the forward motion, and the complete COM trajectory is then computed analytically.

4.3 Swing Foot Trajectory

During walking, the swing foot must lift off the ground, move forward, and place down. In the coronal plane, the lateral position of the swing foot is a constant (the distance between the feet). In the sagittal plane, the foot moves from \(-F/4\) to \(F/4\) during half a cycle. A sinusoidal profile is often used to ensure smooth acceleration and deceleration:

$$ y_{sw}(t) = \frac{F}{2} \sin\left(\frac{\pi t}{T}\right) – \frac{F}{4} $$

In the vertical direction, the foot must rise to a maximum height \(H_0\) and then return to ground level. A simple sinusoidal trajectory is:

$$ z_{sw}(t) = H_0 \sin\left(\frac{2\pi t}{T}\right) $$

However, this trajectory produces a non-zero landing velocity, which can cause impact forces and destabilize the robot. To improve stability, I modify the vertical trajectory using a composite function. The swing phase is divided into two parts: the first half uses a sine function that starts with high slope (fast lifting), and the second half uses a shifted sine function that ends with zero slope (soft landing). The modified trajectory is:

$$ z_{sw}(t) = \begin{cases} H_0 \sin\left(\frac{2\pi t}{T}\right), & 0 \le t \le \frac{T}{4} \\ \frac{H_0}{2} \sin\left(\frac{4\pi t}{T} + \frac{\pi}{2}\right) + \frac{H_0}{2}, & \frac{T}{4} \le t \le \frac{T}{2} \end{cases} $$

This curve ensures that the swing foot leaves the ground quickly and approaches the ground with near-zero vertical velocity, reducing the impact on the COM.

4.4 Inverse Kinematics for Joint Angles

Once the COM trajectory and the swing foot trajectory are determined, the position and orientation of each foot relative to the torso are known at every time step. The inverse kinematics solver described in Section 2 computes the twelve leg joint angles. These angles are then sent to the servo motors in the physical robot or to the virtual model in simulation.

5. Simulation Setup and Gait Verification

I implemented the gait planner in a simulation environment using ROS (Robot Operating System) and V-REP. The humanoid robot model used for simulation is a TALOS robot with a height of 0.65 m and a mass of 5.386 kg. The geometric and inertial parameters are listed in the following table.

Parameter Value
Total height 0.65 m
Total mass 5.386 kg
Thigh length 0.136 m
Shank length 0.136 m
Foot length × width 0.16 m × 0.14 m
COM height 0.36 m
Degrees of freedom 20

The control architecture is shown in the following flowchart: a gait planner generates the reference COM and foot trajectories, an inverse kinematics module converts these trajectories into joint angles, and the resulting angles are sent to the robot simulator or the physical robot. A feedback loop reads the actual joint angles and computes the real COM position for monitoring.

The walking cycle time \(T\) is set to 1.6 seconds, the step length \(F\) is 0.1 m, and the foot distance \(D\) is 0.132 m. The sampling period is 20 ms. The simulation result shows that the robot walks forward stably. The COM height remains almost constant during the walk, but there is a noticeable fluctuation at the moment of foot landing. To quantify this, I recorded the vertical COM trajectory before and after the improvement of the swing foot profile.

The following table compares the maximum deviation of the COM height from the desired constant height for the original and improved trajectories.

Trajectory Maximum COM height deviation
Original sine swing 0.012 m
Improved composite swing 0.006 m

The improved trajectory reduces the vertical COM deviation by nearly 50%, indicating a significant reduction in landing impact. The robot’s walking motion becomes smoother and more stable in simulation.

6. Physical Implementation and Experiments

I then implemented the gait planner on a physical TALOS humanoid robot. The physical robot has the same dimensions and degrees of freedom as the simulation model. I used only the leg joints for walking; the arm joints were fixed to reduce complexity. The joint angles computed from the inverse kinematics were sent to the servo motors via a controller board.

One practical issue encountered was that the servo motors lacked sufficient torque to perfectly follow the desired trajectories, especially at high speeds. This caused the ZMP to shift unexpectedly and slightly degraded the walking stability. To mitigate this problem, I applied a numerical compensation to the commanded joint angles. The compensation was determined by measuring the steady-state error of each joint at different speeds and adding a correction term proportional to the desired angular velocity. This simple feedforward compensation helped the robot maintain a more accurate posture throughout the walk.

I tested the robot on three different ground surfaces: a hard wooden table, a hard carpet, and a rubber mat. The robot walked successfully on all three surfaces. The following table summarizes the experimental conditions and outcomes.

Surface type Friction level Walking test Stability rating
Hard wooden table Medium Pass Good
Hard carpet Low Pass Good
Rubber mat High Pass Excellent

The COM trajectory in the coronal plane was recorded by reading the joint encoders and applying forward kinematics. The measured trajectory closely matched the theoretically planned sinusoidal shape, with only a small transient deviation during the first step. This confirms that the LIPM-based gait planning method is effective on the real robot.

To test the robustness of the gait without an anti-push algorithm, I applied an external force of 3 N in the lateral direction and 4 N in the backward direction during walking in simulation. The robot was able to maintain balance after two steps, but its walking direction changed. When the force magnitude was increased to 10 N, the robot inevitably fell during the single support phase. This demonstrates that the basic gait planner has some inherent robustness against small disturbances, but it is not sufficient for larger pushes.

7. Anti-Push Control Based on Capture Point

7.1 Orbital Energy and Capture Point

To improve the robot’s ability to recover from external pushes, I employed the concept of orbital energy and capture points. The orbital energy of an inverted pendulum is defined as:

$$ E = \frac{1}{2} m \dot{x}^2 – \frac{mg}{2H} x^2 $$

where \(x\) is the horizontal COM position relative to the support foot and \(\dot{x}\) is the COM velocity. In a conservative system, the orbital energy remains constant. For a static biped robot standing with zero velocity at the origin, the orbital energy is zero. When the robot is pushed, its orbital energy becomes positive, and the robot must relocate its foot to a point where the COM can be brought to rest again. This point is called the capture point.

For an instantaneous push with no stepping time, the capture point position is given by:

$$ x_{cp} = \frac{v_p}{\omega} $$

where \(v_p\) is the COM velocity immediately after the push. However, in reality, the robot cannot step instantly. If the stepping time is \(t_p\), the COM moves during this interval. The capture point must be computed based on the predicted COM state at the landing moment. The motion of the COM during the step is governed by the inverted pendulum equation, and after some algebra, the capture point is found as:

$$ x_{cp} = x_{com}(t_p) + \frac{\dot{x}_{com}(t_p)}{\omega} $$

where

$$ x_{com}(t_p) = x_0 \cosh(\omega t_p) + \frac{v_0}{\omega} \sinh(\omega t_p) $$
$$ \dot{x}_{com}(t_p) = x_0 \omega \sinh(\omega t_p) + v_0 \cosh(\omega t_p) $$

If the robot places its foot exactly at \(x_{cp}\), its orbital energy becomes zero after the foot lands, and the robot returns to a static equilibrium.

7.2 Capture Point for Moving States

For a moving robot, the desired orbital energy is not zero but a non-zero constant corresponding to the desired walking speed. When the robot is pushed, the orbital energy changes to a new value. The goal is to take a step that brings the orbital energy back to the desired value. Let \(E_0\) be the nominal orbital energy during normal walking, \(E_1\) be the orbital energy after the push, and \(E_2\) be the orbital energy after the next step. We require \(E_2 = E_0\). The recovery step must have an appropriate step length and landing position.

During the single support phase, the COM motion can be divided into an acceleration phase (when the COM moves away from the support foot) and a deceleration phase (when the COM moves toward the support foot). If the robot is pushed forward, the acceleration phase distance \(x_{acc}\) must be reduced and the deceleration phase distance \(x_{dec}\) must be increased. This can be achieved by shortening the current step period and by placing the new foot farther forward.

The relationship between the orbital energy change and the step adjustment is:

$$ E_2 = E_1 + \frac{m \omega^2}{2} \left( x_{acc}^2 – x_{dec}^2 \right) $$

Thus, by adjusting \(x_{acc}\) and \(x_{dec}\), the controller can tune the orbital energy back to the desired level.

7.3 Anti-Push Control Algorithm

The proposed anti-push algorithm is executed as follows.

1. Monitor the instantaneous orbital energy of the robot in both the sagittal and coronal planes. If the difference between the current energy and the nominal energy exceeds a threshold \(\Delta E\), a push event is detected.

2. At the moment of push detection, record the COM position and velocity as \((x_p, v_p)\).

3. Compute the desired landing position of the next step using the capture point formula for the moving state. The stepping time \(t_p\) is initially set to a nominal value (e.g., 0.6 s).

4. Check whether the desired landing position is within the robot’s kinematic reach. If it exceeds the maximum reachable distance \(x_{\lim}\), set the landing position to \(x_{\lim}\). If not, use the computed position.

5. If the robot uses \(x_{\lim}\) and still has excess orbital energy after completing the step, update the state and repeat the algorithm. Otherwise, the robot returns to its desired gait.

7.4 Simulation Implementation

I implemented the anti-push controller in the V-REP simulation environment for the scenario of standing in place (marching in place). The robot was commanded to perform a stationary stepping motion. The external push was applied at \(t = 1.35\) s with a force of 30 N in the lateral direction and 40 N in the backward direction. The step recovery time was set to \(t_p = 0.6\) s. The following table shows the simulation parameters.

Parameter Value
Push force in x-direction 30 N
Push force in -y direction 40 N
Push application time 1.35 s
Recovery step time 0.6 s
Nominal gait period 1.6 s

The COM trajectory in the sagittal plane shows that after the push, the robot deviates backward but then recovers within one step. The lateral trajectory also returns to its periodic pattern. The vertical COM trajectory remains nearly constant, confirming that the recovery step does not induce significant impact.

For comparison, the same robot without the anti-push controller was simulated under the same push disturbance. In that case, the robot fell immediately after the push. The following table compares the outcomes.

Controller Push magnitude Outcome
No anti-push 50 N Fell
Anti-push 50 N Recovered and continued stepping

When the push force was increased to 150 N in the backward direction, the robot could not recover within the fixed time \(t_p=0.6\) s because the desired foot placement exceeded the maximum reachable distance. The robot fell, as shown in the simulated COM trajectories. This indicates that the current algorithm has a limited disturbance rejection capability. A larger push requires either a shorter stepping time (faster leg movement) or a larger reachable workspace.

7.5 Discussion and Future Improvements

The anti-push algorithm based on capture point theory provides a systematic way to recover from moderate external disturbances. However, there are several limitations. First, the stepping time \(t_p\) is fixed; future work could optimize \(t_p\) based on the magnitude and direction of the push. Second, the controller does not explicitly compensate for the robot’s body tilt caused by the push. Adding a tilt-angle feedback loop would improve robustness. Third, the current implementation is validated only in simulation. Implementing the anti-push controller on the physical humanoid robot would require accurate real-time estimation of COM position and velocity, which can be obtained from joint encoders and an IMU.

The gait planning and anti-push algorithms presented in this thesis can be extended to more complex tasks such as walking on sloped surfaces, climbing stairs, or navigating through crowded environments. A depth camera or LiDAR could provide environmental information to adjust foot placements proactively. Moreover, the capture point method can be integrated with model predictive control for longer-horizon planning.

8. Conclusion

In this thesis, I presented a complete framework for gait planning and anti-push control of a small-scale humanoid robot. The gait planner uses the linear inverted pendulum model to generate smooth COM trajectories in the coronal and sagittal planes. The swing foot trajectory is designed with a composite function that reduces landing impact. The inverse kinematics solver translates the desired foot poses into joint angles for the twelve leg joints. The proposed gait is validated both in a V-REP simulation and on a physical humanoid robot. The robot walks stably on hard wood, carpet, and rubber surfaces, demonstrating the robustness of the planner.

For anti-push control, I derived the capture point for static and moving states using orbital energy analysis. The controller detects a push by monitoring the orbital energy and adjusts the next foot placement to restore the desired energy level. Simulation results show that the robot can recover from a 50 N impulsive push while marching in place, whereas the same robot without the controller falls. The method is limited by the maximum reachable foot position and the fixed recovery time, but it proves the feasibility of incorporating disturbance rejection into small humanoid robots.

Future work will focus on adaptive step timing, integration of full-body dynamics, and physical implementation of the anti-push controller. I believe that the combination of LIPM-based gait planning and capture-point-based recovery will contribute to the development of more agile and resilient humanoid robots for real-world applications.

Scroll to Top