# Online Foot Location Planning for Gait Transitioning Using Model Predictive Control
## 5 Results
### UPMPC vs. HF
Gait transitioning is accomplished with less foot-end force and less posture oscillation. UPMPC shows a great advantage over HF in completing the gait transitioning between trotting and walking. Figure 6: The figure shows the posture and GRFs of trotting in a gait transitioning to walking at 0.4 m/s. The number 1 in (**a–d**) indicate gait transitioning occuring. The horizontal coordinate of the number 1 in the diagram represents the exact time of the transitioning. The transitioning process is: trotting (0–27.6 s), walking (27.6-final). (**c,d**) Only capture the GRFs near the transitioning point to facilitate analysis of the forces, so the transitioning time is not consistent with (**a,b**). All data in the plots are from the same dataset. (**a**) Posture change using the HF at 0.4 m/s gait transitioning. (**b**) Posture change using the UPMPC at 0.4 m/s gait transitioning. (**c**) Change in forward force at 0.4 m/s during gait transitioning. (**d**) Change in lateral force at 0.4 m/s during gait transitioning. (**e**) Comparison of the peak values of roll, pitch and yaw for the two methods after transitioning. The numbers 1, 2 and 3 on the horizontal axis in the graph represent roll, pitch and yaw, respectively. (**f**) Comparison of peak values after transitioning for forward and lateral forces under both methods. The numbers 1 and 2 on the horizontal axis in the diagram represent forward and lateral forces, respectively. Figure 7 is the posture change during gait transitioning between flight trotting and walking at 0.8 m/s. The transitioning points are marked by the numbers 1, 2, 3, 4 and 5 in the figure. In Figure 7a, the change of roll using UPMPC is basically consistent with HF. All have oscillation after the transitioning. In Figure 7b, the numbers 1, 2, 3, 4, 5 show the peak of the posture after the gait transitioning. A distinct difference between the two methods can be seen in in Figure 7b. In this figure, the peak of roll using the UPMPC is smaller than that of the HF, except for the fourth gait transitioning. The location of the foot chosen by the UPMPC enables a smaller roll peak after transitioning. This indicates that the quadruped robot with the UPMPC is more stable after switching. The number 6 represents the mean of absolute value of the roll. Smaller mean of the absolute values can indicate that the quadruped robot is more stable throughout the whole transitioning process. In Figure 7b, the mean of absolute value of roll using the HF is significantly larger than that using the UPMPC. The roll with the less oscillations over the whole time has the small mean of the absolute values. Combining the mean of absolute value and the peak values, the UPMPC has better control over roll. In Figure 7c, the curves of the two methods overlap highly. In Figure 7d, both the peak values and the mean of absolute value of pitch at the gait transitioning using UPMPC are smaller. Therefore, the UPMPC has better control of the pitch. In Figure 7e, yaw drifts regardless of the foot location planning method. As the number of transitioning accumulates, the yaw drift of UPMPC is smaller than that of the HF in Figure 7e. UPMPC has better control of yaw during gait transitioning. Comparing Figure 7b,d, the good control of yaw by UPMPC does not come at the expense of roll and pitch. Figure 8 is the foot-end force change during gait transitioning between flight trotting and walking at 0.8 m/s. Figure 8a,c show the force planned by MPC for the foot-end of the left front leg during the transitioning process. In Figure 8b, the force peaks of the UPMPC are significantly smaller in the second, third and fourth gait transitioning. The HF has a slightly smaller force peak in the first and fifth gait transitioning. It is not possible to distinguish exactly which method has the smaller mean of absolute values. The forward forces required by the robot are nearly the same for both methods over the whole time. In Figure 8d, the peak using the HF is smaller than that of UPMPC over the whole time.