# Anti-Slip Gait Planning for a Humanoid Robot in Fast Walking
## 2 Dynamics Model  
As a ratio of a leg's mass to the total mass of the robot increases, the effect of the legs' motion states on the overall motion state increases. Therefore, the inverted pendulum model that treats the robot as a mass point no longer works. To this end, [PERSON] et al. proposed a gravity compensation inverted pendulum model (GCIPM), which conducts calculations after separating the swing leg's mass from the total mass of the robot, thus increasing calculation accuracy [22]. [PERSON] et al. further proposed a three-mass model for the humanoid robot, which divided the robot into a body, support leg and swing leg, and the adopted mass of these three parts to calculate the zero-moment point (ZMP) of the robot, which resulted in a smaller ZMP error and a walk mode with higher efficiency [23; 24]. However, in his model, the legs' motion states were affected by the state of the body and feet in turn, increasing the computational complexity. In fact, shanks and feet have much greater effects on the whole body's dynamics than thighs due to their longer distances from the trunk. Therefore, we proposed a new 3D three-mass model to simulate the dynamics. As shown in Figure 2, the 3D three-mass model divides a robot into three parts: the inverted pendulum, the swing leg and the support leg. The mass of the chest, head, arms, hips and thighs of the robot (namely the part in the red dotted rectangle in Figure 1) is considered to be all focused on the end of the inverted pendulum, which is recorded as the mass of the inverted pendulum \(m_{pend}\). We do not consider the relative motion between any two parts that constitute the inverted pendulum, so as to eliminate interference factors. The mass of the shank and foot is considered to be focused on the center of the ankle, which is recorded as the mass of the swing leg \(m_{swg}\) or the mass of the support leg \(m_{sup}\). In order to reduce the amount of calculation, it is assumed that there is no kinematic constraint between the legs and the inverted pendulum. \(m_{total}\) is the total mass of the robot, namely \(m_{total}=m_{pend}+m_{swg}+m_{sup}\). The ground's reactive force is the only external force the model is subjected to and it generates a moment \(M_{total}\) at an arbitrary point \(P\left(x_{p},y_{p},z_{p}\right)\):  
\[M_{total}=M_{pend}+M_{swg}+M_{sup} \tag{1}\]  
Take the moment to the inverted pendulum as an example, its vector expression is:  
\[M_{pend}=m_{pend}\overset{\cdots}{p_{pend}}\cdot\overrightarrow{P_{pend}} \tag{2}\]  
where \(\overset{\cdots}{p_{pend}}\) is inverted pendulum's velocity vector and \(\overrightarrow{P_{pend}}\) is a displacement vector from \(P\) to \(P_{pend}\), which represents the CoM of inverted pendulum. Then \(M_{pend}\) is decomposed into 3 components in 3 axes respectively:  
\[M_{x}^{pend}=-m_{pend}\ddot{y}_{pend}\big{(}z_{pend}-z_{p}\big{)}+m_{pend}\big{(} z_{pend}+g\big{)}\big{(}y_{pend}-y_{p}\big{)} \tag{3}\]  
Figure 2: 3D three-mass model. The robot is divided into 3 parts: the inverted pendulum, the swing leg and the support leg. There is no kinematic constraint between the legs and the inverted pendulum. \(Z\)\(M\)\(P\)\(  
\[M_{y}^{pend}=m_{pend}\ddot{x}_{pend}\Big{(}z_{pend}-z_{p}\Big{)}-m_{pend}\Big{(} \ddot{z}_{pend}+g\Big{)}\Big{(}x_{pend}-x_{p}\Big{)} \tag{4}\]  
\[M_{z}^{pend}=-m_{pend}\ddot{x}_{pend}\Big{(}y_{pend}-y_{p}\Big{)}+m_{pend}\ddot{y }_{pend}\Big{(}x_{pend}-x_{p}\Big{)} \tag{5}\]  
and \(M_{swg}\) is decomposed similarly:  
\[M_{x}^{swg}=-m_{swg}\ddot{y}_{swg}\Big{(}z_{swg}-z_{p}\Big{)}+m_{swg}\Big{(} \ddot{z}_{swg}+g\Big{)}\Big{(}y_{swg}-y_{p}\Big{)} \tag{6}\]  
\[M_{y}^{swg}=m_{swg}\ddot{x}_{swg}\Big{(}z_{swg}-z_{p}\Big{)}-m_{swg}\Big{(} \ddot{z}_{swg}+g\Big{)}\Big{(}x_{swg}-x_{p}\Big{)} \tag{7}\]  
\[M_{z}^{swg}=-m_{swg}\ddot{x}_{swg}\Big{(}y_{swg}-y_{p}\Big{)}+m_{swg}\ddot{y }_{swg}\Big{(}x_{swg}-x_{p}\Big{)} \tag{8}\]  
Set the center of the ankle of the support leg to be the origin O and let point \(P\) coincide with O.