
Research on humanoid robots has become one of the most active topics in the field of robotics. Compared with other types of robots, the unique feature of a humanoid robot lies in its ability to walk in a manner similar to humans, which provides remarkable flexibility and adaptability in real-world environments. Stable walking is the most fundamental behavioral capability of a humanoid robot, and the key to achieving this stable, human-like walking is gait planning. The NAO robot is a typical humanoid robot developed by Aldebaran Robotics, and in this thesis I focus on the motion control and gait planning of the NAO humanoid robot. The main contributions of this work include kinematic modeling, parameterized gait generation, multi-objective optimization of walking parameters, and simulation verification using virtual prototyping.
1. Introduction and Background
The study of humanoid robots has attracted extensive attention because it integrates electronics, computer science, mechanical engineering, materials science, sensor technology, control theory, and artificial intelligence. A humanoid robot represents the highest level of mechatronic integration and serves as a benchmark for a nation’s research capability in intelligent and automated systems. Since the 1960s, many countries have invested heavily in humanoid robot development. In particular, Japan has been a pioneer: the first biped robot WAP-1 was developed by Professor Kato in 1969, followed by the WABOT-1 in 1973, which achieved static walking. Honda later introduced the P2 and P3 prototypes, and eventually the ASIMO humanoid robot, which achieved dynamic walking at speeds up to 2.7 km/h and running at 6 km/h. Sony’s QRIO and SDR series robots demonstrated entertainment-oriented biped locomotion with fall recovery. In Europe, the BIP2000 and Johnnie robots contributed to high-speed walking research. In the United States, MIT and other institutions developed humanoid platforms such as COG and Kismet, focusing on human-robot interaction and facial expressions.
In China, humanoid robot research began in the 1980s. The National University of Defense Technology developed the KDW series biped robots, and the “Pioneer” robot was unveiled in 1988. Harbin Institute of Technology created the HIT series, and Beijing Institute of Technology developed the BHR-1 humanoid robot, which could walk stably and adapt to terrain changes. Tsinghua University produced the THBIP-I humanoid robot with 32 degrees of freedom, capable of walking on flat ground and climbing stairs. These developments demonstrate the rapid progress of humanoid robot technology in China.
Gait planning is the core problem in humanoid robot control. The main approaches include model-based methods using inverted pendulum models, zero moment point (ZMP) based methods, human motion capture methods, passive dynamic walking methods, energy optimization methods, and multi-link model methods. Among these, ZMP-based planning is the most widely used for ensuring dynamic stability. In this thesis, I adopt the ZMP criterion as the stability measure and use a three-step planning methodology to generate smooth and feasible gaits for the NAO humanoid robot.
2. Kinematic Modeling of the Humanoid Robot
Kinematic analysis is the foundation for robot motion control. The humanoid robot is modeled as a spatial linkage composed of rigid links connected by revolute joints. The NAO humanoid robot has 25 degrees of freedom in total. Its lower body contains 11 degrees of freedom: the hip has two degrees of freedom per leg (pitch and roll) plus a shared yaw-pitch joint between the two hips, the knee has one pitch joint per leg, and the ankle has two degrees of freedom per leg (pitch and roll). This arrangement allows the humanoid robot to perform stable walking in three-dimensional space. The link lengths and joint ranges are summarized below.
| Link | Joint | Mass (g) | Length (mm) | DOF |
|---|---|---|---|---|
| Torso | — | 2967.12 | 211.5 | 1 |
| Thigh | Hip | 520.25 × 2 | 100 | 3 × 2 |
| Shank | Knee | 291.525 × 2 | 102.9 | 1 × 2 |
| Ankle | Ankle | 134.15 × 2 | — | 2 × 2 |
| Foot | — | 164.77 × 2 | 45.19 | — |
The Denavit–Hartenberg (D-H) convention is used to build the coordinate frames on each link of the humanoid robot. Each homogeneous transformation matrix from link \(i-1\) to link \(i\) is given by:
$$
T_i^{i-1} =
\begin{bmatrix}
\cos\theta_i & -\sin\theta_i \cos\alpha_{i-1} & \sin\theta_i \sin\alpha_{i-1} & a_{i-1} \cos\theta_i \\
\sin\theta_i & \cos\theta_i \cos\alpha_{i-1} & -\cos\theta_i \sin\alpha_{i-1} & a_{i-1} \sin\theta_i \\
0 & \sin\alpha_{i-1} & \cos\alpha_{i-1} & d_i \\
0 & 0 & 0 & 1
\end{bmatrix}
$$
Here, \(\theta_i\) is the joint angle, \(d_i\) is the link offset, \(a_i\) is the link length, and \(\alpha_i\) is the link twist. The D-H parameters for the lower body of the humanoid robot are listed in the following table.
| Link \(i\) | \(\alpha_{i-1}\) (rad) | \(a_{i-1}\) (mm) | \(\theta_i\) (rad) | \(d_i\) (mm) |
|---|---|---|---|---|
| 1 | 0 | 0 | \(\theta_1\) | 0 |
| 2 | \(\pi/2\) | 0 | \(\theta_2\) | 0 |
| 3 | 0 | 102.9 | \(\theta_3\) | 0 |
| 4 | 0 | 100 | \(\theta_4\) | 0 |
| 5 | \(-\pi/2\) | 0 | \(\theta_5\) | 0 |
| 6 | \(-\pi/2\) | 0 | \(\theta_6\) | 0 |
| 7 | \(\pi\) | 50 | \(\theta_7\) | 0 |
| 8 | \(-\pi/2\) | 0 | \(\theta_8\) | 0 |
| 9 | \(-\pi/2\) | 0 | \(\theta_9\) | 0 |
| 10 | 0 | 100 | \(\theta_{10}\) | 0 |
| 11 | 0 | 102.9 | \(\theta_{11}\) | 0 |
| 12 | \(\pi/2\) | 0 | \(\theta_{12}\) | 0 |
By multiplying the transformation matrices from the base frame to the ankle frame, I derive the forward kinematics equation for the humanoid robot lower limb. The position of the ankle with respect to the hip frame can be expressed as:
$$
\mathbf{T}_{\text{hip}}^{\text{ankle}} = \mathbf{T}_1^0 \mathbf{T}_2^1 \mathbf{T}_3^2 \mathbf{T}_4^3 \mathbf{T}_5^4 \mathbf{T}_6^5
$$
After simplification, the ankle position coordinates \(P_x, P_y, P_z\) are obtained as:
$$
\begin{aligned}
P_x &= \cos\theta_1 \left[ 102.9 \cos(\theta_2+\theta_3) + 100 \cos\theta_2 \right] \\
P_y &= \sin\theta_1 \left[ 102.9 \cos(\theta_2+\theta_3) + 100 \cos\theta_2 \right] \\
P_z &= 102.9 \sin(\theta_2+\theta_3) + 100 \sin\theta_2
\end{aligned}
$$
The inverse kinematics problem is essential for gait planning: given the desired position of the ankle and the hip, we need to compute all joint angles. For the humanoid robot, the knee angle \(\theta_3\) is determined by the distance between the hip and ankle using the law of cosines.
Let \(l_a = 100\) mm be the thigh length, \(l_c = 102.9\) mm the shank length, and \(r\) the distance from the hip joint center to the ankle joint center:
$$
r = \sqrt{P_x^2 + P_y^2 + P_z^2}
$$
Then the knee angle is:
$$
\theta_3 = \pi – \arccos\left( \frac{l_a^2 + l_c^2 – r^2}{2 l_a l_c} \right)
$$
Similarly, the ankle pitch angle \(\theta_4\) and ankle roll angle \(\theta_5\) can be derived from the geometry of the triangle formed by the hip, knee, and ankle. Finally, the hip yaw angle \(\theta_1\) is obtained from the projection of the hip-to-ankle vector onto the horizontal plane:
$$
\theta_1 = \operatorname{atan2}(P_y, P_x)
$$
The complete set of inverse kinematic equations for the humanoid robot can be written as a system of algebraic equations. In this work, I used a numerical iterative method based on the Jacobian matrix to solve the inverse kinematics for the lower body, which gives smooth joint angle trajectories for the planned foot and hip motions. The Jacobian matrix \(\mathbf{J}\) maps the joint velocities \(\dot{\mathbf{q}}\) to the end-effector twist \(\mathbf{v}\):
$$
\mathbf{v} = \mathbf{J} \dot{\mathbf{q}}
$$
The numerical algorithm minimizes the position and orientation error between the current and desired poses:
$$
\mathbf{q}_{k+1} = \mathbf{q}_k + \mathbf{J}^+ ( \lambda \mathbf{e}_p + \mu \mathbf{e}_o )
$$
where \(\mathbf{e}_p\) and \(\mathbf{e}_o\) are the position and orientation errors, and \(\lambda, \mu\) are convergence factors. This method is robust and avoids the problem of multiple solutions that often occurs in closed-form inverse kinematics for a humanoid robot.
3. Parameterized Gait Planning
3.1 Basic Concepts of Gait
Gait planning for a humanoid robot involves determining the motion of each joint such that the robot walks stably. Key terms include the single support phase (one foot on the ground), double support phase (both feet on the ground), step length \(H\), step height \(Z_1\), hip height \(Z_2\), walking cycle \(T\), and hip lateral displacement \(Y\). A complete walking cycle consists of two single support phases and two double support phases. Static walking refers to walking where the robot’s center of mass remains above the support polygon at all times, while dynamic walking requires consideration of inertial forces and zero moment point (ZMP). The ZMP is defined as the point on the ground where the resultant ground reaction moment is zero. To maintain stability, the ZMP must always lie within the support polygon formed by the feet.
The ZMP location can be computed from the robot dynamics as:
$$
x_{\mathrm{zmp}} = \frac{\sum m_i ( \ddot{z}_i + g ) x_i – \sum m_i \ddot{x}_i z_i – \sum I_i \ddot{\theta}_i }{\sum m_i ( \ddot{z}_i + g )}
$$
where \(m_i\) is the mass of link \(i\), \((x_i, z_i)\) is its center of mass position, \(I_i\) is its moment of inertia, and \(\ddot{x}_i, \ddot{z}_i\) are the accelerations. In this thesis, I used a preview-like approach by designing the ZMP trajectory to be constant within the support polygon, then generating the center-of-mass trajectory accordingly.
3.2 The Three-Step Planning Method
To generate a smooth and natural walking gait for the humanoid robot, I adopt a three-step planning approach.
First, the walking path and body posture are designed. I use a parallel gait in which the feet remain parallel to the ground and the torso remains upright throughout the whole walking cycle. This simplifies the planning because only the lower limbs need to be considered.
Second, the inverse kinematics are applied to compute all joint angles from the desired foot and hip trajectories. Since the hip and ankle positions are known at each time step, the knee and other joint angles are uniquely determined.
Third, the gait trajectories are refined using polynomial interpolation to ensure velocity and acceleration continuity. The whole walking process is divided into three phases: starting, cyclic walking, and stopping. During the starting phase, the humanoid robot bends its knees and shifts the center of mass to the support foot, then lifts the swing foot. The cyclic phase is the regular repetitive stepping motion. The stopping phase brings the robot back to the nominal standing posture.
3.3 Trajectory Planning for the Ankle
The ankle trajectory of the swing foot is crucial for avoiding collisions with the ground. To achieve zero velocity and zero acceleration at the beginning and end of the single support phase, I use a quintic polynomial interpolation. The vertical ankle trajectory \(Z_a(t)\) is expressed as:
$$
Z_a(t) = a_5 t^5 + a_4 t^4 + a_3 t^3 + a_2 t^2 + a_1 t + a_0
$$
The constraints are:
$$
\begin{cases}
Z_a(0) = 0 \\
Z_a(T_1) = 0 \\
Z_a(T_1/2) = Z_1 \\
\dot{Z}_a(0) = 0 \\
\dot{Z}_a(T_1) = 0 \\
\ddot{Z}_a(0) = 0
\end{cases}
$$
Solving for the coefficients yields a smooth vertical foot trajectory that reaches the step height \(Z_1\) at mid-swing. Similarly, the forward trajectory \(X_a(t)\) is divided into two segments. From \(t=0\) to \(T_1/2\), the foot accelerates from zero to half the step length; from \(T_1/2\) to \(T_1\), it decelerates to the full step length. The constraints for the first segment are:
$$
\begin{cases}
X_a(0) = 0 \\
X_a(T_1/2) = H/2 \\
\dot{X}_a(0) = 0 \\
\dot{X}_a(T_1/2) = 0 \\
\ddot{X}_a(0) = 0 \\
\ddot{X}_a(T_1/2) = 0
\end{cases}
$$
and for the second segment they are:
$$
\begin{cases}
X_a(T_1/2) = H/2 \\
X_a(T_1) = H \\
\dot{X}_a(T_1/2) = 0 \\
\dot{X}_a(T_1) = 0 \\
\ddot{X}_a(T_1/2) = 0 \\
\ddot{X}_a(T_1) = 0
\end{cases}
$$
These polynomials guarantee that the ankle velocity and acceleration vanish at both the take-off and touchdown instants, thereby reducing impact and ensuring smooth motion of the humanoid robot.
3.4 Trajectory Planning for the Hip
The hip trajectory also affects the stability and naturalness of the humanoid robot walk. In the sagittal plane, the hip moves forward at a nearly constant speed. Laterally, the hip shifts from one side to the other to maintain balance. I design the lateral hip trajectory \(Y_h(t)\) using a quintic polynomial over one full walking cycle that includes both single and double support phases. The physical constraints are that the lateral velocity is zero at the transition instants and the hip displacement follows the step pattern. The polynomial form is:
$$
Y_h(t) = b_5 t^5 + b_4 t^4 + b_3 t^3 + b_2 t^2 + b_1 t + b_0
$$
with constraints mirrored to produce a continuous and smooth periodic lateral motion. The vertical hip height is kept constant at \(Z_2\) throughout the cyclic phase to maintain an upright posture. This parameterized representation allows us to adjust the gait easily by changing \(T, H, Z_1, Z_2, Y\), and \(Y_1\).
3.5 Joint Angle Trajectories
Once the ankle and hip trajectories are specified, the inverse kinematics equations yield the joint angles for both legs. In my simulations, I assumed the following nominal gait parameters:
| Parameter | Value |
|---|---|
| Single support time \(T_1\) | 0.5 s |
| Double support time \(T_2\) | 0.25 s |
| Step length \(H\) | 120 mm |
| Step height \(Z_1\) | 20 mm |
| Hip height \(Z_2\) | 180 mm |
| Hip lateral displacement \(Y\) | 30 mm |
| \(Y_1\) | 15 mm |
Using MATLAB, I computed the joint angle profiles for both legs over a two-second walking period. The result showed that the joint angles changed smoothly without abrupt jumps, indicating that the three-step planning method produces a feasible gait for the humanoid robot. The ZMP trajectory generated from the planned motion was compared to an ideal constant ZMP path inside the support polygon. Although the planned ZMP followed the ideal path closely, there was a slight lag in the vertical direction, which motivated the optimization step described in the next section.
4. Multi-Objective Optimization of Walking Parameters
4.1 Optimization Variables and Constraints
The quality of a humanoid robot gait can be measured by three conflicting criteria: stability, energy consumption, and walking speed. In this thesis, I optimize the walking parameters \(T\) (cycle time), \(H\) (step length), \(Z_1\) (step height), \(Z_2\) (hip height), \(Y\) (hip lateral displacement), and \(Y_1\) (lateral displacement in the single support phase). The parameter constraints are:
$$
\begin{cases}
0.5 \le T \le 1 \ \text{s} \\
0 < H < 312 \ \text{mm} \\
0 < Z_1 < 20 \ \text{mm} \\
180 \le Z_2 \le 202.9 \ \text{mm} \\
0 \le Y < 100 \ \text{mm} \\
-50 < Y_1 < 50 \ \text{mm}
\end{cases}
$$
4.2 Objective Functions
Stability objective: The stability measure \(S\) is the sum of squared differences between the planned ZMP and the ideal ZMP at sampled times. Let \((x_{\mathrm{zmp},k}, y_{\mathrm{zmp},k})\) be the planned ZMP and \((x_{\mathrm{ideal},k}, y_{\mathrm{ideal},k})\) the ideal ZMP at sample \(k\). Then:
$$
S = \sum_{k=1}^{N} \left( x_{\mathrm{zmp},k} – x_{\mathrm{ideal},k} \right)^2 + \left( y_{\mathrm{zmp},k} – y_{\mathrm{ideal},k} \right)^2
$$
A smaller \(S\) means the actual ZMP is closer to the center of the support polygon, indicating better stability.
Energy objective: The energy consumption is approximated by the sum of the absolute joint torques required during one gait cycle. Since the most active joints are the hip, knee, and ankle pitch joints, I define the energy cost as:
$$
E = \sum_{i=1}^{3} \int_{0}^{T} | \tau_i(t) \dot{\theta}_i(t) | \, dt
$$
Here \(\tau_i\) and \(\dot{\theta}_i\) are the joint torque and angular velocity of the \(i\)-th joint. To keep the computation tractable, I simplified the model using the torso and leg masses. The minimization of \(E\) leads to a more energy-efficient gait for the humanoid robot.
Speed objective: Walking speed is the ratio of step length to cycle time, \(v = H/T\). Since the optimizer seeks minimization, I define the speed objective as the reciprocal of the walking speed:
$$
f_v = \frac{1}{v} = \frac{T}{H}
$$
Minimizing \(f_v\) maximizes the walking speed.
4.3 Genetic Algorithm Implementation
Genetic algorithms (GAs) are well suited to this problem because they can handle nonlinear, multi-objective optimization with multiple local optima. A GA operates on a population of candidate parameter sets, using selection, crossover, and mutation to evolve toward better solutions. The flowchart of the GA used in this work is standard: initialize population, evaluate fitness, select parents, apply genetic operators, generate offspring, and repeat until convergence. The population size was set to 100, with a maximum of 100 generations, crossover probability 0.7, mutation probability 0.01, and a generation gap of 0.95.
The multi-objective GA finds a set of Pareto-optimal solutions where no single solution is strictly better than another in all objectives. The Pareto front is shown in the result. From these solutions, I selected one representative optimal parameter set as follows:
| Parameter | Optimal value |
|---|---|
| \(T\) (s) | 0.7 |
| \(H\) (mm) | 79.8 |
| \(Z_1\) (mm) | 20.14 |
| \(Z_2\) (mm) | 185 |
| \(Y\) (mm) | 35.9 |
| \(Y_1\) (mm) | −26.5 |
| \(S\) (mm²) | 211.54 |
| \(E\) (N·mm·s) | 5801.296 |
| \(f_v\) (s/mm) | 0.007 |
The convergence history of the three objectives is shown in the figure (not reproduced here). The objective values decreased rapidly for energy and stability, while the speed reciprocal decreased slightly, confirming that the GA effectively minimizes all three criteria.
The optimized ZMP trajectory was compared with the ideal one. The match was significantly better than before optimization, with only small deviations around the heel strike instants. This indicates that the optimized gait parameters enable the humanoid robot to maintain a large stability margin while walking efficiently and reasonably fast.
5. Virtual Prototyping and Simulation
5.1 CAD Modeling and ADAMS Setup
To validate the optimized gait, I built a simplified three-dimensional model of the humanoid robot lower body in Pro/ENGINEER. The model includes the two thighs, two shanks, and two feet with dimensions and masses matching the actual NAO robot parameters. I then imported the model into ADAMS, a multi-body dynamics simulation software, where I defined revolute joints at the hip, knee, and ankle with their respective motion ranges. The desired joint angle trajectories were converted into STEP functions and applied as motions to the joints. The simulation duration covered one complete walking cycle, including starting, cyclic stepping, and stopping phases.
5.2 Simulation Results and Validation
The ADAMS simulation demonstrated that the humanoid robot could perform a stable walking motion. The stick-figure animation showed the robot leaning slightly to the stable leg, lifting the swing foot to the specified height, and placing it forward without colliding with the ground. The sequence of motion at different time instants confirmed the expected behavior: weight shift, single support, double support, and weight transfer.
I extracted the joint angular velocity curves for the right leg from ADAMS and compared them with the planned theoretical angular velocities. The simulation curves closely matched the theoretical ones, with only small dynamic deviations due to the inertia and gravity effects. The differences are within acceptable bounds, which proves the kinematic model and the gait planning are consistent. Similarly, the joint angle trajectories from the simulation were plotted against time. The smooth curves confirm that the humanoid robot’s joints operate within their physical limits and that no singularities or excessive accelerations occur.
Additionally, the ankle displacement trajectory obtained from ADAMS was compared with the desired polynomial trajectory. The heel and toe positions followed the planned foot trajectory accurately, with a maximum error of less than 2 mm. The hip lateral displacement also matched the planned sinusoidal-like curve. These comparisons validate the correctness of the inverse kinematics and the effectiveness of the GA-based parameter optimization.
Furthermore, the simulation provided the ground reaction forces and the ZMP trajectory. The ZMP was computed from the contact forces between the feet and the ground. During the whole walking cycle, the ZMP remained inside the convex hull of the supporting foot (or feet), proving that the humanoid robot maintained dynamic stability. The margin measured from the ZMP to the edge of the support polygon was always positive, with the minimum margin occurring at the transition from double support to single support, as expected.
The simulation results confirm that the proposed gait planning framework—comprising kinematic modeling, polynomial trajectory generation, multi-objective genetic optimization, and dynamic simulation—can produce a stable and natural walking pattern for the NAO humanoid robot. This virtual prototyping approach provides a cost-effective and safe way to test control algorithms before physical implementation.
6. Conclusion and Future Work
In this thesis, I have systematically studied the motion control of a humanoid robot, focusing on the NAO platform. The main achievements are as follows.
First, I built a complete kinematic model of the humanoid robot’s lower body using the Denavit–Hartenberg method. I derived the forward and inverse kinematics equations that relate joint angles to foot and hip positions. A numerical Jacobian-based inverse kinematics algorithm was implemented to compute joint angles from Cartesian trajectories, which proved to be robust and accurate.
Second, I proposed a three-step gait planning method based on the ZMP stability criterion. Using quintic polynomial interpolation, I generated smooth ankle and hip trajectories that ensure zero velocity and acceleration at the boundaries. The parameterized gait representation allows easy adjustment of step length, height, cycle time, and hip lateral shift. The planned joint angle profiles were smooth and feasible, and the ZMP remained inside the support polygon.
Third, I formulated the gait optimization problem with three conflicting objectives: stability margin, energy consumption, and walking speed. A genetic algorithm was used to solve this multi-objective optimization problem and provide a set of Pareto-optimal solutions. One representative solution was chosen, which significantly improved the ZMP tracking and reduced energy consumption while maintaining a reasonable walking speed.
Finally, I created a virtual prototype of the humanoid robot lower body using Pro/ENGINEER and ADAMS. The optimized joint trajectories were implemented as motion drivers, and the dynamic simulation demonstrated stable walking. The simulated joint angles, angular velocities, and foot trajectories matched the planned ones with small errors, validating the effectiveness of the entire approach.
Future research directions include extending the kinematic model to include the torso and arms, so that arm swing and upper-body posture can be coordinated with the lower-body gait to improve stability and naturalness. Another direction is to incorporate adaptive control strategies that allow the humanoid robot to recover from external disturbances or uneven terrain. Real-time implementation on the physical NAO robot would also be a valuable next step, using the optimized gait parameters as feedforward signals and adding sensor feedback for balance correction. Finally, the optimization framework could be extended to include multiple gait primitives such as turning, climbing stairs, and stepping over obstacles, making the humanoid robot more versatile in real-world environments.
The results presented in this thesis contribute to the broader goal of achieving human-like, efficient, and stable locomotion for humanoid robots, which is essential for their deployment in service, healthcare, education, and disaster response applications.
