# Online Foot Location Planning for Gait Transitioning Using Model Predictive Control
## 5 Results
### UPMPC vs. HF  
In this section, the peak value and the mean of absolute value are used to compare the advantages and disadvantages of the two methods. The peak value is able to reflect the stability of the posture after transitioning. Smaller peak indicates less posture oscillation and better stability. The mean of absolute value gives a better evaluation to the change in posture throughout the process and eliminates the effect of positive and negative values. A smaller mean of absolute value of the posture indicates that the quadruped robot recoversfrom postural oscillations more quickly after a gait transitioning or the change in posture is relatively small over the whole time. If the mean of absolute value is large, the quadruped robot is unable to return to a stable state more quickly after a gait transitioning, or has a large oscillation over the whole time. The numbers marked in the figures below are the times at which the gait transitioning takes place. The peak value used is the maximum value of the posture for the duration after the gait transitioning has occurred and before the next starts. There is a time delay between the peak values and the transitioning point, as the quadruped robot needs a very short amount of time after the gait transitioning to reach its most unstable moment. This part of the time is not negligible. Therefore, it will be seen that there is a lag between the time of the transitioning point and the time of peak values. Figure 6 is the gait transitioning between trotting and walking at 0.4 m/s. The gait transitioning using the HF in Figure 6a fails directly and using the UPMPC in Figure 6b succeeds despite facing a large posture oscillation. In Figure 6a, a large posture oscillation has happened during the gait transitioning but the foot location of the HF planning cannot cope with this situation. It makes the roll and yaw deviate more and more from the stable position, leading to the posture divergence and gait transitioning failure. The posture change is not so clear in Figure 6a,b. In Figure 6e, it becomes clear. In this graph the peak of the posture after the gait transitioning is shown. The numbers 1, 2 and 3 stand for roll, pitch and yaw, respectively. It is clear from Figure 6e that the gait transitioning using the HF faces a large posture peak after the transitioning and far exceeds that of the UPMPC. This is more than the controller can steadily control, making the system falter and the transitioning fail. In Figure 6b,e, with the controller unchanged, the UPMPC planned foot location effectively reduces the peak values of the posture comparing with the HF, allowing the posture to return to near the stable value. Even if the transitioning results in a large posture change, the UPMPC is able to help keep the robot moving stably by planning a good foot location. Figure 6c,d shows the foot-end force planned by MPC for the left front leg foot of the quadruped robot during the transitioning process. Figure 6f shows the comparison of the peak force at the foot end after transitioning. The difference in peak force is not so clear from Figure 6c,d. However, in Figure 6f, a huge difference is shown. The huge force may cause unnecessary vibration and instability. It is not desirable that the peak of the foot-end force is too large if the gait transitioning can be done. This is because it will have a large impact on the posture and affects the stability of the quadruped robot after gait transitioning. As can be seen from Figure 6f, the forces required by the robot using UPMPC are much smaller during gait transitioning. The quadruped robot regains stability in its posture by the combined effect of force and foot-end position. In Figure 6f, the HF uses a greater force to try to restore stability, but the gait transitioning still fails. In contrast, the UPMPC successfully completes the gait transitioning with less force. These would suggest that the foot location chosen by the UPMPC is far superior to the HF.