The Mechanism of Yaw Torque Compensation in the Human and Motion Design for Humanoid Robots

When a humanoid robot walks fast or runs, the yaw torque is so large that the supporting foot slips easily and the robot may become unstable. The compensation for the yaw torque is important for fast humanoid walking and many studies have been focusing on yaw torque compensation. However, the issue of humanoid robot motion design that can make the movements of the robot more human-like, as well as guarantee the stability of the robot, has not been studied in-depth. In this paper, the mechanism of yaw torque compensating for human walking is firstly studied. Then we propose a method to compensate yaw torque for a humanoid robot through the motion of the arms and waist joint based on the human yaw torque compensation mechanism and ZMP stability citation. Finally, the effectiveness of the proposed method is demonstrated by the results from the simulation and walking experiments on the newly developed BHR humanoid robot.


Introduction
Over the past four decades, researchers have been working on developing a humanoid robot that can not only do tedious and dangerous work in the human living environment, but also communicate with people.However, achieving stable walking in the daily human environment is still a big challenge.To solve these difficulties, pattern generation and balance control have become popular in the field of humanoid robot, and great progress has been made [1][2][3][4][5][6].
Pattern generation provides a reference trajectory which ensures that a robot can walk steadily in an ideal environment, and balance control modifies the reference trajectory on the basis of information from all kinds of sensors fixed in actual robots.The early bipedal walking robots could only achieve static walking because they kept their projected point of Centre of Gravity (CoG) on the ground in their supporting polygon region.When the concept of Zero Moment Point (ZMP) was proposed, researchers began to propose methods of walking pattern synthesis based on ZMP [1][2][3][4][5][6][7], which can speed up the walking through controlling the position of ZMP instead of CoG.Many researchers have devised various approaches for walking humanoid robots [8][9].It is difficult to analyse the dynamic character of a walking robot because of the complexity of mathematical description, so most biped robots are based on the inverted pendulum model.A desired ZMP trajectory is usually designed in the supporting region.Some researchers have proposed a method which selects the optimal trajectory from many trajectories of the hip instead of planning the desired ZMP trajectory in advance [1].This method not only assures that the ZMP trajectory has a large stability margin, it also avoids the situation where there is no result derivable from the dynamics equation.
The aforementioned investigations assumed that there is no slip between the feet and the ground.When a humanoid robot walks fast or even runs, the yaw torque becomes so large that the supporting foot slips easily and the robot becomes unstable.Therefore, in order to avoid slips, different foot mechanisms have been devised to increase the coefficient of friction.In [10][11], arm swing during walking balances the yaw torques caused by swinging of the lower limbs.This idea was studied further with the same general conclusions [12][13].Some researchers added the movement of arms on the condition that the arms are not affected by any external forces but gravity, and they obtained a trajectory of "free" arms [14][15].A study on the reason for yaw torque generating was developed and a method to compensate yaw torque through rotating the waist joint was presented in [16].Following on from that, some others utilized the motion of trunk spin and arms swing to compensate the yaw moment respectively, and compared the two compensation methods from the energy consumption point of view [17].However, studies on the yaw torque compensation through the coupled and coordinated movement of arm and waist of the whole robot body are still very few.Hence, the issue of yaw torque compensation by more natural and coordinated motion of the whole robot body still needs much more detailed analysis.We sought methods to design the motion for a humanoid robot that can make the movements of the robot more human-like, as well as guarantee the stability of the robot.Humans, on the other hand, can effectively eliminate slips between the supporting foot and the ground by spontaneous body movements when walking or running.Therefore, we focus our research of the human mechanism of eliminating slips between the supporting foot and the ground caused by yaw torque.Then we design a humanoid walking pattern based on the analysis of the human yaw torque compensation mechanism.
The paper is organized as follows: the mechanism of yaw torque compensating for human walking is investigated in Section 2. In Section 3, a new trajectory generation method for arms and waist rotation of a humanoid based on the human walking mechanism and the stability citation is proposed.Simulation with LMS and experimental results are provided in Section 4. Finally, conclusions are given in Section 5.

Human Yaw Torque Compensation Mechanism
During the fast walking process of a human body, the yaw torque is pervasive due to the rapid swing of the swing leg.Some of the yaw torque is compensated by friction of the ground, and the rest is compensated by whole body's coordinated motion, especially the motion of the arms and waist joint.In this part, we focus on analysing the human mechanism for compensating the yaw torque.

Measuring Equipment and Experimental Approaches
To record the main joint angles of the human body, a motion capture system is designed based on optical track [18].The system consists of 12 optical cameras and 38 reverberation markers that are pasted on the surface of a subject's body.The system records the positions of all markers with the rate of 100 frames per second and the main angle of joints can be calculated by software.
We also construct a foot yaw torque measurement system to record the real yaw torque of the ankle joint of the human body at different walking speeds, as is shown in Figure 1.A 6-axis force and torque sensor is fixed between the sole and the upper board.The feet of the subject are fastened by fastener tapes on the upper board.We collect data from three subjects, two men and one woman (as shown in Figure 2).The physical parameters of three subjects are shown in Table 1.Two experiments are constructed using the measuring equipment mentioned above.
(1) The motion capture experiment The three subjects are requested to walk with different strides at different walking speeds ranging from 4km/h to 6km/h (the average walking speed of an adult is about 4km/h to 6km/h).The motion capture system is utilized to record the swing angle of the shoulder joint and the waist joint while the subjects are walking. (

2) The yaw torque measuring experiment
The three subjects are requested to walk at different speeds ranging from 4km/h to 6km/h, and they are requested to walk in different patterns: walking naturally, walking without arm motion, walking without waist motion and walking without arm and waist motion at the same time.The yaw torque measurement system is utilized to record the yaw torque of the ankle joint.Table 1.Physical parameters of three subjects

Kinematics Analysis of Arms and Waist Joint
The swing motion of arms is helpful to compensate the yaw torque.It is necessary to analyse the arm motion of human from the perspective of kinematics.Figure 3 shows that all together there are three markers located on the subject.One is located on his head, named mark A.
The other two are located on the shoulder and wrist joints with the name of mark B and mark C, respectively.The swing angle of the shoulder joint can be calculated by the angle between straight line AB and BC, and the length of subject's forearm and upper arm.The following conclusions can be drawn from Figure 4: 1.The angle trajectory of the shoulder joint show similar trends in the back-and-forth pattern.2. The magnitude of the angle trajectory grows as the step length becomes larger.
Walking experiments are also conducted at other walking speeds, and the magnitude of the angle trajectory has little relationship with the walking speed.
A digital motion capture system is also used to record the trajectory of the waist yaw joint.As shown in Figure 5, altogether four markers are located on the subject.Two markers are located on his left and right shoulder, and the other two are located on his left and right hip joint.The rotation angle of the waist joint can be calculated by the angle between straights line AB and CD.In this experiment, the subject is required to walk at different speeds ranging from 4km/h to 6km/h.Figure 6 shows the calculated rotation angle of the waist joint.The following conclusions can be drawn from Figure 6: 1.The rotation angle of the waist joint is periodic when a person is walking fast in a straight line.2. It is shown that the trajectory of the waist joint is similar to the sinusoidal signal.3. The joint of the waist becomes larger as the walking speed increases, and the same conclusions can be drawn with different subjects.

Yaw Torque Analysis of Arms and Waist Joint
The yaw torque curves of three subjects obtained by the aforementioned foot yaw torque measurement system have the same trends and characteristics.Figure 7 shows the yaw torque curve of one subject's right ankle at different speeds in Single Support Phase (SSP) under different walking conditions.We can draw the following conclusions from Figure 7: 1.The peak values of the yaw torque rise with the increase of walking speed.2. The motion of the arms and waist is of great help to compensate yaw torque in the walking process.The rotation of the waist can compensate about 10~30% of the yaw torque, and the arm motion can compensate about 20~50% of the yaw torque.
On the other hand, the yaw torque curve generated by the swing leg without arm and waist motion is represented by the blue line in Figure 7.According to equation M J  , the curve of the moment and that of the angle acceleration are the same in shape on condition that the moment of inertia keeps constant.Therefore, we consider that the trend of the yaw torque can reflect the trend of the swing leg's acceleration.We can also draw the conclusion that the swing leg first accelerates at the beginning of SSP and then slows down at the end of SSP, and that the yaw torque changes its sign in SSP.

Mechanism Analysis for Human Yaw Torque Compensation
Based on the analysis above, we can come to the conclusion that humans compensate the yaw torque generated by the swing leg through the arm and waist motion.
The angle of the arm and the waist are shown in Figure 4 and Figure 6, respectively.Figure 7 reflects the trend of swing leg's motion.The general law of the relationship between the motion of the arm, waist and that of the swing leg can be obtained through analysing these three figures.
The acceleration of the shoulder can be obtained through taking two derivatives of the angle joint in Figure 4.
Figure 8 shows the acceleration curve of the shoulder joint, the step length is 25cm, and the walking speed is 4km/h.Following that the acceleration decreases, then fluctuates near value B (about -25rad/s 2 ), which is nearly opposite to value A, finally it increases.In addition, we also find that the motion of the swing leg is similar to the swing arm with the opposite direction of the acceleration through analysing Figure 7 and 8.
On the other hand, we find that the frequency of the waist periodic rotation is the same as that of the swing leg, for example, the frequency is about 2HZ at a walking speed of 4km/h through comparing Figure 6 and Figure 7 (a).
To sum up the above, the human yaw torque compensation mechanism is as follows: 1.The motion of the arms and waist is helpful to compensate yaw torque in the walking process.2. The angle trajectory of the shoulder joint has similar trends in the back-and-forth pattern, and it grows as the step length becomes larger.3. The trend of the acceleration of the swing arm during one walking cycle can be described as follows: acceleration of the arm first increases, then fluctuates near value A. Then the acceleration decreases, then fluctuates near value B, which is nearly equal and opposite to the value A , finally it increases.4. The motion of the swing leg is similar to the swing arm with the opposite direction of the acceleration.5.The trajectory of the waist joint is similar to the sinusoidal signal with the same frequency of legs, and the angle of the waist becomes larger as the walking speed increases.

The Methodology of Motion Design for Humanoid Robot
Imposing the human joint angles of the arm and waist directly onto the humanoid robot is not practicable, since the robot does not have the same geometry and mass distribution as the human model.Furthermore, this approach will not create a feasible motion.To imitate the mechanism of human walking and make the movements of the robot more human-like, as well as compensate the yaw torque generated by the swing leg, we propose a method to design the motion of the humanoid robot's arm and waist based on both the human mechanism and the ZMP stability criterion.
The procedure adopted to design the arm and the waist motion for the humanoid robot is as follows: 1. Summing up the kinematic characteristics of the human arm and waist motion based on the gathered data analysis (as is described in section 2.4). 2. Design of angle trajectories for the arm and the waist of the humanoid robot imitating the kinematic characteristics of humans.3. Parameter setting according to the frictional constraints and the ZMP stability citation.4. Experiments on simulations and the BHR humanoid robot.

Yaw Torque Compensation with the Arm Motion
According to equation M J  , the trend of angle acceleration of the arms' motion can reflect the trend of the yaw torque generated by the swing arm on condition that the moment of inertia keeps constant.Therefore, it is practicable to plan the trajectory of the swing arm motion for the humanoid robot through planning the acceleration of the angle joint.Based on the analysis in the section 2.4, the process of the swing arm in the SSP can be divided into five stages.To imitate the human arm motion and simplify the calculation, the acceleration trajectory we designed for the shoulder joint is divided into five stages: the acceleration stage, the unchanged stage, the deceleration stage, the unchanged stage and the acceleration stage.Each stage can be described by a polynomial on the angle transformation of the shoulder joint.Assuming that the walking is accelerated and decelerated by a uniform jerk, the expression of the angle acceleration of the BHR's shoulder joint is given in formula (1). ) In the formula (1), j is the maximum value of the jerk which is decided by the limitation of the mechanical structure and the joint drive capability.a k is the coefficient of the jerk j .max a a represents the rated maximum value of the angle acceleration, which can be specified according to the limitation and the moving performance of the robot.
Approximate formula of the yaw moment compensation algorithm of the shoulder joint is given as shown in formula (5).
where arm m represents the mass of arm, arm L is the arm length, shoulder W represents the width of the shoulder.

Yaw Torque Compensation with the Waist Motion
Based on the research in section 2, the curve of the yaw joint of the human waist is similar to a sine wave, and the swing range of the shoulder joint increases with the increase of walking velocity.Therefore, we design the trajectory of the waist joint a sinusoidal signal, as is shown in formulae ( 6)to (7).
( ) sin where v is the walking speed of robot, w k is the coefficient of yaw angle, step T is the walking cycle, max w  is the maximum yaw angle of the waist joint.The expression of angular acceleration is shown in formula (8), which is obtained through taking second derivatives of formula (6).
( ) Formula ( 9) shows the constraint, max w a is the maximum angular acceleration of waist joint, which is specified according to the mechanical limitation and the moving performance of the robot.The approximate maximum compensation value generated by the rotation of the waist joint is shown in formula (10).

Frictional Constraint and Stability Citation
Assuming the distance between the right and left hips is hip d , the mass of the swing leg is leg m , and max f a is the maximum angular acceleration of the swing leg.Therefore, the yaw moment with respect to the support foot, which is caused by the swing leg, is shown in formula (11).If the compensation torque generated by the arms and waist joint is satisfied with formula (12), slips will not occur between the supporting foot and the ground.
where _ max arm M and _ max waist M represent the maximum value of the compensation torque generated by the arms and waist joint, respectively.max f T is the maximum net friction torque provided by the ground, and the method of calculating max f T can be referred to in [19][20][21].
Through solving the formulae (12), ( 9) and (3), the value ranges of the parameters a k and w k were obtained.In order to guarantee the stability of the humanoid motion, we use the ZMP criterion introduced in [22] to determine the value of a k and w k .We traversed a k and w k in the value ranges obtained above, and determined their value finally through taking the largest stability margin into account.The stability margin is the minimum distance between the ZMP and the boundary of the supporting polygon.The ZMP can be computed by the following equations: where ( zmp x , y zmp , 0) is the coordinate of the ZMP, n is the number of links, i m is the mass of link i, g is the gravitational acceleration and ( i x , i y , i z ) is the coordinate of the mass centre of link i on the absolute Cartesian coordinate system, i I is the rotational inertia of ling i, and i   is the angle acceleration of link I, which is an expression consisting of a k and w k .Through traversing all the possible values of a k and w k , the stability margin can be obtained, we choose the parameters that can generate the largest stability margin.In this way, the parameters of a k and w k can be determined.

Dynamics Simulation
Autodesk Inventor is used as a 3-D modelling tool and the simulation is completed using the dynamic analysis software LMS Virtual Lab.The model of the BHR is imported into the LMS motion module as shown in Figure 12.The walking process with and without the arm and waist swinging using the proposed method is simulated, as shown in Figure 13 (a) and Figure 13 (b).In Figure 13 (a), we import no motion for the shoulder and waist joint.While in (b), the joint angles of shoulder and waist joint obtained by the expressions we designed in section3 are imported.The speed of the BHR model is 4km/h during the simulation.Figure 13 shows that both of the walking processes can simulate stable walking.However, the robot without the motion of the arms and waist will rotate its body in SSP and deviate from a straight line.Figure 14 gives the yaw torque of the ankle joint of the right foot.It can be seen intuitively from Figure 14 that with the motion of the arms and waist joint the peak value of yaw torque reduces from -40Nm to -30Nm.
Simulation results show that: under the same walking conditions and the same trajectories of the lower limb, the yaw torque of the robot's ankle with the yaw torque compensation method we designed is smaller compared with no arm and waist motions, which can also indicate that the stability in SSP is enhanced to a large extent through using the presented method.

Walking Experiment
In this section a walking experiment on the BHR is conducted to examine the effectiveness of the proposed method when the robot walks in a flat field.The walking speed is 1.5km/h and the step time is 1.2 second.Two force-torque sensors are fixed on the soles of the BHR to measure the yaw torque generated by the friction of the ground.Both the arms and waist joint swing by the proposed method during the walking process.The supporting foot slips on the ground with the arms and waist joint stationary, while the BHR walks stably with arms and waist joint swinging by the proposed method during the walking process.As the rotation phenomenon of the upper body is hard to see in screen shots of the video during the walking experiment, we just give several screenshots in the case with the arm and waist joint swinging in Figure 15.
The comparison of yaw torques in the two cases is shown in Figure 16.It is obvious that the average yaw torque in the case of swinging arms and waist is much smaller than the case without arm motion.Therefore, the method is beneficial for avoiding rotation of the supporting foot, and the stability during the SSP is obviously enhanced.In this paper, we focus on compensating the yaw torque through the body coordinated motion consisting of arms and waist joint based on analysis on the human gait mechanism and ZMP stability citation.The contribution of this paper is as follows: 1.The digital motion capture system and the foot yaw torque measurement system are designed to analysis the mechanism of the human gait.2. The mechanism of human yaw torque compensation is presented and the general laws of the arm and waist motion of the human are summed up. 3. The method to compensate the yaw torque caused by the swing leg during the SSP is presented based on the analysis of the human yaw torque compensation mechanism.In addition, the trajectories of the arm and waist yaw joints are also designed based on kinematics and dynamics analysis of the human walking and the stability citation.The trajectories we designed are free of complex dynamic calculations for upper limbs.4. The effectiveness of the proposed method to compensate the yaw torque is confirmed by the results from the simulation and walking experiments conducted on the BHR.

Figure 3 .
Figure 3.Motion capture of the arm's angles Figure 4 shows one subject's angle trajectories of the right shoulder joint with different step length at the walking speed of 4km/h.The other two subjects' shoulder joint angle trajectories have the same trends and characteristics.

Figure 4 .
Figure 4.The angle of the shoulder joint

Figure 5 .
Figure 5.The angle of the waist joint

Figure 6 .
Figure 6.The angle of waist yaw joint

Figure 7 .
Figure 7. Yaw moment in different walking speeds

Figure 8 .
Figure 8.The angle acceleration of the shoulder jointThrough analysing the acceleration curve of the shoulder, we find the process of the swing arm in the SSP is similar to the square wave with fluctuation.The trend of the acceleration during one walking cycle can be described as follows: the acceleration of the arm first increases, then fluctuates near value A (about 25rad/s 2 ).Following that the acceleration decreases, then fluctuates near value B (about -25rad/s 2 ), which is nearly opposite to value A, finally it increases.In addition, we also find that the motion of the swing leg is similar to the swing arm with the opposite direction of the acceleration through analysing Figure7and 8.

1 T
represents the time of the acceleration changing time, and we can get 1 T through the equation 1 max a T a j  , f T represents the whole planning time.It is easy to get the expression and curve of the angular velocity  , and their figures are shown in Figure9-11.

Figure 9 .
Figure 9. Curve of angle acceleration

Figure 12 .Figure 13 .
Figure 12.Model of the BHR in LMS

Figure 15 .
Figure 15.Walking experiment on the BHR Two cases are experimented: (1) the BHR walks with the arms and waist joint keeping stationary to the trunk; (2)