A Method of Foot Trajectory Generation for Quadruped Robots in Swing Phase to Optimize the Joint Torque

According to the basic motion requirements of quadruped robots, the mechanism of quadruped robot with 12 degrees of freedom is designed, and the dynamic model of single leg and the description equation of foot position are established. In order to solve the problem of the joint torque optimization of quadruped robots in swing phase, a method of generating the foot trajectory based on dynamics is proposed. Computer simulation results show that the proposed method can reduce the torque output of quadruped robot joints when the quadruped robots are in swing phase and prove the reliability of the proposed method for quadruped robot in the foot trajectory generation. Finally, because the leg structure of quadruped robot has the general characteristics of typical series linkage mechanism, it can also be extended to other series mechanisms with multiple connecting rods.


Introduction
Quadruped robots are highly adaptable to unstructured environments compared with wheeled and tracked mobile robots. Compared with biped and other less-legged robots, quadruped robots have more robust balanced gait. Quadruped robots have faster kinematic performance than hexapod and other multi-legged robots. Therefore, quadruped robots have high research and application value. The foot trajectory is the necessary and sufficient condition for the quadruped robot to adapt to the unstructured environment. The foot trajectory of the quadruped robots with better characteristics can make the quadruped robots have good dynamics and kinematics performance on the basis of fully adapting to the unstructured environment.
Many scholars have deeply studied the foot trajectory of quadruped robots, and put forward a series of foot trajectory description equations with certain characteristics. For example, the composite cycloidal foot trajectory proposed by Y.Sakakibara [1] satisfies the requirements of quadruped robot foot trajectory which the velocity and acceleration component of the forward and vertical direction is zero in the moment of landing and leaving the ground. Kyeong Yong Kim and Jong Hyeon Park [2] proposed a quadruped robot foot trajectory based on elliptical trajectory to realize the high-speed galloping of quadruped robot. Rong Xuefen [3] of Neishan University proposed a foot trajectory based on cubic polynomial and straight line combination. This method solves the defect of accelerating and decelerating the joint of quadruped robot in cycloidal trajectory, and reduces the output of joint torque to some extent. The trajectory based on cycloid is the most commonly used as the trajectory of quadruped robot [1,2,4,5,6,7,8]. The above methods do not consider the joint torque output as the constraint condition when they make the description of foot trajectory, thus neglecting the optimization of joint torque output in the process of quadruped robot from leg lifting to landing.
In order to reduce the joint torque output during the period from leg lifting to landing, and to realize more energy saving and more robust movement, a method for generating the foot trajectory is proposed in this paper. Firstly, the simplified dynamic model and foot position equation are established according to Lagrange equations, and the relationship between foot position equation and dynamic model is analysed. The workspace of the foot and the output torque diagram of the joint are drawn. According to the relationship between the position equation of the foot and the dynamic model, the foot trajectory curve is found. The contrasting analysis shows that the trajectory of the foot generated by this method can significantly reduce the joint output torque.

Leg Dynamics Model of a Dual-Degree-of-Freedom
On the basis of studying the physiological structure of tetrapods which can run at high speed, such as cheetahs and dogs, the model of quadruped robot with certain bionic structure has been proposed. For example, the 'Big Dog', which developed by Boston Dynamics Corporation, and the bionic cheetah robot developed by MIT University. These quadruped robot models basically satisfy the motion requirements of quadruped animals. According to the basic motion requirements of tetrapods, a 12-DOF quadruped robot model is designed in this paper. Each leg consists of three degrees of freedom, they are the lateral swing degree of hip joint, the front and rear swing freedom of thigh joint and the front and rear swing freedom of knee joint. The three degrees of freedom are responsible for the lateral swing of the quadruped robot, the front and back movement. They are connected by the rotating joints and driven by motors. The mechanism of a quadruped robot is shown in figure 1. The main motions of quadruped robot come from the thigh joint and knee joint, so the hip joint of quadruped robot which adjusts the side pendulum of fuselage is ignored. In addition, in order to simplify the calculation, the legs of quadruped robot are constrained in two-dimensional plane. Consider concentrating the mass of the thigh and calf at the end of the thigh and calf, as shown in figure 2.  figure 2, β 1 , β 2 are the rotation angle of the thigh and the calf, 1 , 2 are the length of the thigh and the calf, 1 , 2 are the assumed concentrated mass of the thigh and the calf, and (x, y)is the point of the foot in the coordinate system ,which is also the point on the trajectory curve of the foot. The dynamic equation of the above system can be obtained by Lagrange equation.
The kinetic energy of the system is: The potential energy of the system is: The Lagrange equation is: The torque of the thigh and knee is: The sum of joint torque is: Foot trajectory description point is: It can be seen that the variables of equation (6) and (7) can be completely constrained by the point of equation (8). in others words, all variables in equation (6) and (7) can be described by and its derivatives. It can be seen that the output optimization of joint torque can be realized by the foot trajectory optimization.

The solution of the equation
In the first section, the equation of foot point and the leg dynamics equation of quadruped robot are established. By comparing the parameters of the foot trajectory description equation (8) with the quadruped robot leg dynamics equation (7), we can see that the foot trajectory position description equation (8) can completely describe the quadruped robot leg dynamics equation (7). In all, equation (8) can describe the joint torque in equation (7). Joint torque output and foot position are closely related. The relationship between joint torque output and foot position can be solved by simultaneous equation (7) and equation (8). Assume ) sin( ), sin( We can get the equation (10) by introducing the equation (9) into the equation (7).
The expression of equation (10) can be obtained by solving equation (8). But the equation (8) is a quadratic equation, it is difficult to solve it. In this paper, a method of foot trajectory generation is proposed, which can avoid solving equation (8). The main ideas are as follows: firstly, according to the leg structure of quadruped robot, the range of joint rotation angle can be obtained, and the parameter range of joint rotation angle is assumed to be here, and the other structural parameters are shown in Table 1. From the Monte Carlo method, we can get the joint torque map and the workspace of the foot. Finally, we can get the trajectory curve of the foot in the workspace of the foot under the condition of the map of joint torque.

1.5
According to equation (8), the workspace of the foot is drawn by using Monte Carlo method in MATLAB. As shown in figure 3, the mechanism workspace in this paper is asymmetrical. The maximum operating range in the y direction is 0 m to -1 m, and in the x direction is -0.6 m to 0.4 m, which fully meets the requirements of the motion space of the quadruped robot. According to equation (10), the joint torque figure is drawn. In figure 4, it can be found that the torque output of the joint is infinite at some points, which shows that the mechanism is singular in the vicinity of these points. Because the actuator output force is limited, this part of the region can`t be used as the foot trajectory design area, it should be sacrificed, and finally the nonsingular workspace is obtained, as shown in figure 5.  By comparing figure5 and figure 3, we can find that the nonsingular workspace shown in figure 5 forgets the boundary region in figure 3. It is shown that the boundary region of the singular workspace is the singular region of the mechanism. These regions should be avoided in the design of foot trajectory. In others words, the foot trajectory cannot be contained in the region which is near the boundary in the singular workspace. In order to obtain a large step size and a certain height, the trajectory design is carried out in 65

Foot trajectory generation method
In the second section, the nonsingular workspace of the quadruped robot leg mechanism is determined, and the design area of the foot trajectory in the non-singular workspace is determined according to the requirements of the step size and the height of the foot. The foot trajectory will be generated in the foot trajectory design area. Firstly, the foot trajectory design area and the torque of the joint in the foot trajectory design area are given, as shown in figure 6. The joint output torque in figure 6 and the joint torque distribution in this area can be seen to be more uniform, which is more favorable to the joint force.

Figure 6. Foot trajectory design area and the output torque of joints
In the foot trajectory design area shown in figure 6, the trajectory curve is searched according to the principle of joint output torque optimization. The fundamental problem is to find a series of points satisfying the constraints. In the circular region with a certain step size as the radius, the minimum position of the joint torque is searched in the circular region, and the track point of the foot corresponding to the minimum position of the moment obtained in the next step is searched again. The algorithm flow chart is shown in figure 7 until the boundary of the foot trajectory design area is reached. Figure 7. The flow chart of foot trajectory algorithm The trajectory searched by the above process is actually a series of points, not an equation description. When the joints are moving, they can be directly obtained according to the inverse kinematics operation to obtain the required motion angles of the joints. It is no longer necessary to solve the foot trajectory description equation. Finally, the search points are drawn into the foot trajectory design area, as shown in figure 8. In figure 8, it can be seen that the track has a large step length of 0.65 m, the leg height is 0.06 m, and the leg height is slightly insufficient. The further work, that is, increasing the constraint of the leg lift height for further optimization, can meet the requirements of the leg lift height.  Figure 9 shows the joint output torque in the whole foot trajectory. Compared with the joint output torque in figure 6, it can be seen that the joint torque output after optimization search in the nonsingular region is greatly reduced. In figure 9, we can see that the maximum of the foot trajectory generated by the proposed method is 28 N / m, the minimum output torque is 10 N / m, the average output torque is 19.5 N / m, and the torque output is smooth and continuous. The maximum torque output is near the end of the foot trajectory.  Figure 9. The output torque of joints

Comparative analysis and extended application
The foot trajectory of quadruped robot based on cycloid is the most commonly used trajectory at present. In reference [5], an improved cycloidal foot trajectory is proposed, its equation is (11), (12). With the same step and leg height, the foot trajectory is shown in figure 10.
Where  is independent variable, and (x, y)is the point of foot trajectory. Figure 10. The cycloidal foot trajectory The joint output torque in the improved cycloidal foot trajectory proposed in [5] is shown in figure  11. As can be seen in figure 11, the output maximum torque of the improved cycloidal foot trajectory proposed in reference [5] is 39 N / m, the minimum output torque is 13.4 N / m, the average output torque is 22.4 N / m, and the joint torque output is smooth and continuous. The maximum torque output from the joint is near the beginning of the trajectory.  Finally, by the comparison of the above data, shown in the table 2, we can see that the maximum output torque from the method proposed in the paper is 11 N / m smaller than the improved cycloidal foot trajectory proposed in reference [5], the minimum output torque is 3.4 N / m smaller, the average output torque is 2.9 N / m smaller, which shows that the method proposed in this paper can significantly reduce joint torque and output. Table 2. Comparative analysis of the two methods

Item
Value(N/m) The maximum of joint torque 11 The maximum of joint torque 3.4 The average of joint torque 2.9 The dynamic model established in this paper is a typical two-degree-of-freedom series connecting rod system, and its dynamic model structure is the same for the multi-degree-of-freedom series multilinkage system. The end position and pose description equation of multi-link can also be established according to the principle of coordinate transformation. After obtaining the dynamic model of the multilink system and the terminal position and pose description equation, the method proposed in this paper can be used to design the end trajectory so that the output torque and the joint torque of the multi-linkage system can be optimized.

Conclusion
In this paper, a method for generating the foot trajectory of quadruped robot based on dynamic constraints is proposed. The relationship between joint rotation angle and foot position is established by kinematics, and then the leg dynamic equation of quadruped robot is established by Lagrange equation. A foot trajectory is generated by constraining the kinematics equation and dynamic equation of quadruped robot leg. Compared with the cycloidal trajectory, the output torque of joint is reduced under the same structure parameters. At the same time, the method can be extended to the multi-linkage seriesparallel mechanism system, such as the 6-DOF manipulator system, which has a great application prospect.