## 4 Simulation Results and Analysis
### Unknown Scenario Task  
In order to prove that the proposed algorithm can meet the requirements of the environmental adaptability of the quadruped robot, we also carried out an unknown scenario experiment. Under the condition that the robot was well trained with the 5\({}^{\circ}\) slope, the slope was changed to the one shown in Figure 16. The slope, called S-4, consisted of four sections, 5\({}^{\circ}\), 0\({}^{\circ}\), 9\({}^{\circ}\) and 0\({}^{\circ}\), and each section is 1.4 m, 1.4 m, 1.2 m and 1.4 m, respectively.  
Figures 17 and 18 show the center of gravity position and body orientation of the robot, respectively. Combined with Figures 17 and 18, it can be seen that the robot begins to climb the first slope in about 2.5 s, reaches the 0\({}^{\circ}\) slope in the second stage in about 5.6 s, climbs the 9\({}^{\circ}\) slope in the third stage in about 8.3 s, reaches the 0\({}^{\circ}\) slope in the fourth stage in about 15.1 s and, finally, stops on the slope. It also can be seen that the forward speed of the robot would decrease correspondingly when climbing the slope, and the higher the slope, the lower the speed. In addition, we can know from the figures that when the robot moves from one state to another state, the yaw angle of the robot will change greatly.  
Figure 14: The output of the cosine rhythm controller during movement in the scene in Figure 10.  
Figure 15: The center of gravity curve of the robot when using fixed cosine rhythm controller parameters.  
Figure 19 shows the output of the rhythm controller when the robot moves. We can see from the figure that except for the first step, the output state of the rhythm controller is basically the same from the second step to the fourth step. At this time, the robot was on flat ground or just started to climb the hill, and the controller outputted a pattern. At about 3.4 s, the robot was completely on the slope which was \(5^{\circ}\), the controller outputted another pattern. Then, the robot entered the \(0^{\circ}\) slope, and the output of the controller was the same as that of the robot in the flat ground motion until the robot reached the \(9^{\circ}\) slope, where the rhythm controller outputted the third pattern.  
Through this experiment, it can be proved that the algorithm proposed in this paper is robust and can make the robot cope with the change in the environment. Although the slope of \(9^{\circ}\) and the two uphill sections were never encountered before by the robot, it could still adapt to the changes well. In addition, we can see from Figure 19 that the rhythm controller can output different modes corresponding to different environments. Through the conversion between different modes, the robot can realize the adaptive movement of the environment.  
Figure 16: The slope called S-4, which has 4 sections. The first section is \(5^{\circ}\) uphill slope which is 1.4 m, as shown by the black line segment with arrows, the second section is a \(0^{\circ}\) slope which is 1.4 m, the third section is a \(9^{\circ}\) uphill slope which is 1.2 m, and the fourth section is a \(0^{\circ}\) slope which is 1.4 m.  
Figure 17: The robot’s center of gravity position when climbing S-4.