# Whole-Body Motion Generation for Balancing of Biped Robot
## 5 Simulation
### Comparative Analysis  
To quantitatively evaluate the performance of the proposed whole-body motion generation framework, a comparative analysis was conducted against two baseline controllers: a simple ZMP tracking controller based on MPC and an MPC combined with CP control (CP+MPC). The proposed framework is denoted as CP+MPC+MC. All controllers were tasked with generating simple walking motions under identical conditions. The following analyses focus on ZMP tracking accuracy and angular momentum and velocity of robot body characteristics.  
Figure 24 illustrates the COM trajectories in the \(x\) and \(y\) directions for each controller, alongside the reference ZMP, dashed black line. While the controllers generally follow the desired path, CP+MPC-based frameworks (blue and red lines) exhibit smoother COM motion with less deviation from the reference ZMP steps, particularly in the \(y\)-axis, compared to MPC alone.  
Figure 21: Comparison of inertia tensor between arm usage.  
Figure 23: Phase plot during obstacle stepping.  
The ZMP tracking performance is further detailed in Figure 25. Across all metrics--mean absolute value (MAV), root mean square (RMS), peak value, and standard deviation (SD)--the CP+MPC-based controllers consistently demonstrate lower ZMP tracking errors in both \(x\) and \(y\) axes. Notably, the inclusion of CP control significantly reduces the errors compared to the MPC-only approach. This indicates enhanced stability and precision in ZMP tracking with the CP control framework.  
The stability of the generated gaits is also visualized through phase plots of COM position versus velocity, as shown in Figure 26. Frameworks incorporating the CP controller (CP+MPC and CP+MPC+MC) result in compact and consistent limit cycles for both \(x\) and \(y\) axes, suggesting a more stable gait pattern compared to the wider and more dispersed trajectories produced by MPC alone.  
Figure 24: COM positions of each control framework.  
Figure 25: Comparison of ZMP tracking performance.  
calculation and thus may be less reliable as a sole indicator, nonetheless showed an overall decreasing trend.  
Furthermore, when the momentum controller was utilized, CP+MPC+MC, a notable change in the angular velocity of the body was observed compared to using only CP+MPC. The MAV of angular velocity decreased by approximately 20.3% in the roll and 4.9% in the pitch, while the peak angular velocity decreased by about 19.9% in the roll and 33.8% in the pitch. Although the MAV and peak angular velocity in the yaw slightly increased by 5.9% and 7.0%, respectively, the substantial improvements in the roll and pitch directions clearly indicate an enhancement in balancing performance due to the arm motion.  
In summary, these comparative analyses demonstrate that the proposed whole-body motion framework (CP+MPC+MC) achieves more stable and precise locomotion. The CP control enhances ZMP tracking and COM stability. Meanwhile, the momentum controller, by generating active arm motion, not only further reduces angular momentum but also leverages the resulting larger inertia tensor to minimize angular velocity, thereby improving overall balance and robustness.