# Leg Trajectory Planning for Quadruped Robots with High-Speed Trot Gait
## 3 Results
### Experiment  
The hardware configuration of the single leg platform main consists of a PC, a controller (C6015, Beckhoff), two motor drives (G-SOLTWII10/200 EE1, Elmo), two frameless motors (127P1, 380W, Allied Motion), and rotary magnetic encoders (RMB20 SC13 BC10, Renishaw), as shown in Figure 17. The controller has a dual-core CPU of 1.92 GHz with a rapid data computing capability. Moreover, the size of the controller is only 96 mm x 91 mm x 41 mm, which can greatly save space. The custom driven unit with a frameless motor with high torque density was specific designed, which significantly reduces the weight of the leg structure. Additionally, this motor can provide a sufficient torque of 21 Nm for high-speed running and jumping. Considering that the legs will bear periodic impact load during movement, magnetic encoders were used in the leg that can separate the encoder from the rotating shaft and avoid damage caused by the impact between the encoder and the shaft. During the high-speed locomotion of the quadruped robot, its legs need to swing periodically and quickly, so the legs need to complete a swing trajectory in a very short time, which requires that the control cycle time be short enough to follow the trajectory [24]. Therefore, both the controller and drives need to have high real-time computing ability and high signal transmission speed. Therefore, an EtherCAT bus was chosen from PC to driver. The EtherCAT bus has a high transmission rate, and the control cycle time can reach the level of a microsecond, which can meet the high real-time requirement of the movement of the leg. The control program was designed by TwinCAT 3 which can provide abundant modules to realize different kinds of motion control in Visual Studio. The Beckhoff C6015 controller has a dual-core structure, which can process different data in parallel, and the communication between the two cores is simple and efficient. Therefore, one of the cores can be used for trajectory selection and trajectory  
Figure 16: Simulation results with Webots for the height of the center of mass (CoM). Figure 17: The hardware configuration. planning, and the other core can be used to send command signals to the motor to ensure real-time movement of the legs. The experimental platform was constructed as shown in Figure 18. The NDI Optotrak Certus was used to trace the endpoint of the leg to measure the actual trajectories of the two schemes (\(V_{desire}\) = 2 m/s). The marker was fixed on the endpoint of the foot. The experimental results are shown in Figure 19, from which we can see that the leg can trace the desired trajectory. Whether the movement is stable and the power consumption is low are directly related to the efficiency of the trajectory design. For evaluating the efficacy of two trajectory planning methods, during the test, the voltage and current of the battery, the angular velocity of the motors, and the torque output of the motors in two schemes were sampled simultaneously. Also, the following Formulas (27) and (28) were used to calculate the consumption power. Finally, the power consumption can be obtained as shown in Figure 20, and the energy consumption is compared in Table 3. In particular, the time traces of the energetics of legs swing with V\({}_{\text{desired}}\) = 2 m/s for two schemes can be found in Figure 21.  
\[\textit{Battery power}=\sum_{ \begin{subarray}{c}2\textit{ motors}U\times I \end{subarray} } \tag{27}\]  
Figure 19: The desired and actual trajectory with \(V_{desired}\) = 2 m/s. (**a**) The trajectory of the scheme I.  
Figure 18: Experimental platform. (**a**) One leg experimental platform. (**b**) Trajectory measurement with Optotrak sensor. \[