# Simultaneous Prevention of Rotational and Translational Slip for a Humanoid Robot
## 4 Translational Slip Prevention
### ZMP Deviation  
According to the definition of ZMP in [25], the ZMP in the \(x\) direction, \(x_{z}\) can be calculated as  
\[x_{z}=[\sum_{i=0}^{n}m_{i}(\ddot{z}_{i}+g)x_{i}-\sum_{i=0}^{n}m_{i}\ddot{x}_{i }z_{i}-\sum_{i=0}^{n}I_{iy}\dot{\Omega}_{iy}]/\sum_{i=0}^{n}m_{i}(\ddot{z}_{i}+g) \tag{11}\]  
where \(n\) is the number of links; \(m_{i}\) is the mass of link \(i\); \((x_{i},y_{i},z_{i})\) is the coordinate of the mass center of link \(i\); \(I_{i}\) is the rotational inertial of link \(i\); \(\dot{\Omega}_{i}\) is the angular acceleration of link \(i\). In order to simplify calculations, the items \(\sum_{i=0}^{n}I_{iy}\dot{\Omega}_{iy}\) are ignored. Since a three mass model is utilized, the ZMP in the \(x\) direction as Equation (11) shows can be rewritten as  
\[ \begin{split} x_{z}=&[m(\ddot{z}_{c}+g)x_{c}-m\ddot{ x}_{c}z_{c}+m_{swg}(\ddot{z}_{swg}+g)x_{swg}-m_{swg}\ddot{x}_{swg}z_{swg}]\\ &/[m(\ddot{z}_{c}+g)+m_{swg}(\ddot{z}_{swg}+g)+m_{supg}]\\ =&[a(\ddot{z}_{c}+g)x_{c}-a\ddot{x}_{c}z_{c}+b(z_{ swg}+g)x_{swg}-b\ddot{x}_{swg}z_{swg}]\\ &/(g+a\ddot{z}_{c}+b\ddot{z}_{swg}).\end{split}  \tag{12}\]  
Here, we assume that \(\Delta t\) is the time interval and that \(\Delta x_{z}\) is the ZMP deviation. Equation (12) is discretized by the time interval, and the equation at the current time \(t(k)(k=0,1,2...N)\) is then shown as:  
\[ \begin{split} x_{z}=&[a(\ddot{z}_{c}(k)+g)x_{c}(k)- a\ddot{x}_{c}(k)z_{c}(k)+b(\ddot{z}_{swg}(k)+g)x_{swg}(k)-b\ddot{x}_{swg}(k)z_{ swg}(k)]\\ &/[g+a\ddot{z}_{c}(k)+b\ddot{z}_{swg}(k)].\end{split}  \tag{13}\]  
The dynamics balance equation at the next control period \(t(k+1)\) is derived as  
\[ \begin{split} x_{z}=&[a(\ddot{z}_{c}(k+1)+g)x_{c}(k +1)-a\ddot{x}_{c}(k+1)z_{c}(k+1)+b(\ddot{z}_{swg}(k+1)+g)x_{swg}(k+1)\\ &-b\ddot{x}_{swg}(k+1)z_{swg}(k+1)]/[g+a\ddot{z}_{c}(k+1)+b\ddot{ z}_{swg}(k+1)].\end{split}  \tag{14}\]  
Figure 5: Flowchart of the translational slip controller. After the extremely short time interval \(\Delta t\), the accelerations, CoM, and ZMP positions at the next control period can be obtained through the Taylor formula. Ignoring the quadratic and higher order terms of \(\Delta t\), the relation between each item after the short-term increment \(\Delta t\) is computed as  
\[ \begin{split}&\ddot{x}_{c}(k+1)=\ddot{x}_{c}(k)+\Delta\ddot{x}_{c}(k),\quad\ddot{x}_{sug}(k+1)=\ddot{x}_{sug}(k)+\Delta\ddot{x}_{sug}(k),\quad\dot{z} _{c}(k+1)=\dot{z}_{c}(k)+\Delta\ddot{z}_{c}(k)\\ & z_{c}(k+1)=z_{c}(k)+\Delta z_{c}(k),\quad z_{sug}(k+1)=z_{sug}( k)+\Delta z_{sug}(k),\quad x_{z}(k+1)=x_{z}(k)+\Delta x_{z}(k)\\ & x_{c}(k+1)=x_{c}(k)+\Delta x_{c}(k),\quad\dot{z}_{sug}(k+1)= \dot{z}_{sug}(k)+\Delta\dot{z}_{sug}(k),\quad x_{sug}(k+1)=x_{sug}(k)+\Delta x _{sug}(k).\end{split}  \tag{15}\]  
Then, substituting Equations (13) and (14) into Equation (15), the dynamics balance equations in the adjacent control periods is obtained as  
\[ \begin{split}&\Delta x_{z}(k)[g+a\dot{z}_{c}(k)+b\dot{z}_{sug}(k)]+ a\dot{x}_{c}(k)\Delta t[x_{z}(k)+\Delta x_{z}(k)][a\Delta\dot{z}_{c}(k)+b \Delta\ddot{z}_{sug}(k)]\\ &=a[\ddot{z}_{c}(k)+g]\dot{x}_{c}(k)\Delta t+a\Delta\ddot{z}_{c}( k)[x_{c}(k)+\dot{x}_{c}(k)\Delta t]-a[\ddot{x}_{c}(k)\dot{z}_{c}(k)\Delta t+ \Delta\ddot{x}_{c}(k)z_{c}(k)\\ &+\dot{x}_{c}(k)\dot{x}_{c}(k)\Delta t]+b\dot{x}_{sug}(k)\Delta t [\dot{z}_{sug}(k)+g]+b\Delta\dot{z}_{c}(k)[x_{sug}(k)+\dot{x}_{sug}(k)\Delta t] \\ &-b[\dot{s}\dot{w}\dot{g}_{c}(k)\dot{z}_{c}(k)\Delta t+\Delta \ddot{s}\dot{w}\dot{g}_{c}(k)z_{c}(k)+s\ddot{w}\dot{g}_{c}(k)\dot{x}_{c}(k) \Delta t].\end{split}  \tag{16}\]  
When ignoring the items \(\Delta\dot{z}_{c}(k)\), \(\Delta\dot{x}_{z}(k)\), \(\Delta\dot{z}_{sug}(k)\), and \(\Delta x_{z}(k)\), the relationship between the increments of the accelerations and the ZMP is expressed as  
\[