# Online Foot Location Planning for Gait Transitioning Using Model Predictive Control
## 5 Results  
### Simulation Setup  
The proposed UPMPC is validated based on the simulation platform of MIT [21]. The simulation environment is shown in Figure 4 below. It is based on Ubuntu 18.04. MIT's Mini Cheetah is used [5] as the verification model for the algorithm. In which the robot with 12 degrees of freedom weighs 9 kg [5], the friction between the foot and the ground is 0.4. All of the joints are motor driven and torque controlled. LCM is used for communication between the simulation environment and the control interface. LCM is lightweight real-time communication software [22]. In this paper, qpOASES [23] is used as a solver for the QP problem. qpOASES is specifically used to solve the MPC quadratic optimization problem. The walking gait chosen in this paper is two-beat walking, so the diagonal leg of walking, trotting and flight trotting can be equated to a virtual leg. At this point, the quadruped robot is equivalent to a bipedal robot. Furthermore, the LIP model can be applied. The control frequency of UPMPC is 0.5 kHz. During the simulation experiments, the control parameters of MPC are kept constant. The prediction length of MPC method is 10 steps in all three gaits. The time length of each step is 0.03 s. The prediction time is 0.3 s and the control frequency is 33 Hz. The prediction length of UPMPC is three steps. The time length of each step is 0.03 s. None of the parameters of the HF or UPMPC are changed during the motion. The periods of walking, trotting and flight trotting are 0.6 s, 0.42 s and 0.3 s, respectively. The duty cycle of walking, trotting and flight trotting are 0.6, 0.5 and 0.3, respectively. Each gait transitioning interval is 3 s. The swing leg is planned with a Bessel curve. Figure 5 shows the COT [24] of three gaits. COT is used to indicate the energy consumption level of the quadruped robot. Figure 4: The model in simulation environment is the Mini Cheetah. The real-time in the upper left corner indicates the time of the real world. The sim-time represents the time in the simulation environment. The rate denotes the simulation rate. Figure 5: COT of walking, trotting and flight trotting at different speeds, respectively. The three curves in Figure 5 represent the different gaits. The horizontal axis coordinate corresponding to the rightmost end of each curve indicates the maximum speed that can be achieved at the current gait. According to the curves in the image, the energy consumption at various speeds for different gaits is variable. To reduce energy consumption or to meet task requirements, the robot needs to transitioning between multiple gaits. Because gait transitioning is performed at multiple speeds, the experiment is divided into five parts to verify the performance of UPMPC:  
* Transitioning between three gaits at the speed of 0.4 m/s;
* Transitioning between three gaits at the speed of 0.8 m/s;
* Transitioning between trotting and flight trotting at the speed of 1.2 m/s;
* Transitioning between trotting and flight trotting at the speed of 1.6 m/s;
* Movement of trotting gait using the UPMPC  
At 0.4 m/s, walking has lower energy consumption. Higher than this speed, the energy consumption of trotting is lower than walking. Transitioning between trotting and walking at this speed can complete the transitioning of energy consumption smoothly. At this time, flight trotting energy consumption is higher, but can have greater acceleration. Flight trotting is indispensable when the robot wants to accelerate quickly from low speed to high speed. Therefore, it is of great importance to perform the transitioning between the three gaits. At 0.8 m/s, it is the approximate speed at which the trotting and flight trotting COT curves appear to intersect. Greater than this speed, flight trotting energy consumption is less than trotting energy consumption. Flight trotting can accelerate to very fast speed in the short time while walking can ensure posture stability at a certain speed.