# Head-Raising of Snake Robots Based on a Predefined Spiral Curve Method
## 2 Modeling of Head-Raising Motion
### Predefined Spiral Curve  
From the biological perspective, a snake's head-raising movement is irregular, and it is difficult to completely describe its shape using a mathematical model. Based on our observations, the shape of a snake after raising its head is similar to that of a spiral curve, as described in Figure 2. In addition, the spiral curve can ensure the stability of head-raising. Thus, describing the head-raising movement of a snake robot with a spiral curve is reasonable.  
\[\begin{array}{l}x_{s}(t)=at\sin(t+\varphi_{0})\\ y_{s}(t)=at\cos(t+\varphi_{0})\\ z_{s}(t)=ct\end{array} \tag{1}\]  
A regular spiral curve (Figure 3a) can be expressed as Equation (1). It cannot be utilized to guide the movement of the robot, and has to be modified, because it cannot ensure the stability of head-raising. Then, the predefined spiral curve (Figure 3b) is designed and its mathematical description satisfies Equation (2), where \(x_{l}(t)\), \(y_{l}(t)\), and \(z_{l}(t)\) represent the line part; \(x_{s}(t)\), \(y_{s}(t)\), and \(z_{s}(t)\) describe the spiral curve part; and \(a\), \(b\), and \(c\) are the adjustment coefficients of the spiral curve. The amplitudes of \(x_{s}(t)\) and \(y_{s}(t)\) change equally when \(a\) is changed and unequally when \(b\) is changed. The amplitude of \(z_{s}(t)\) is influenced by \(c\). \(\varphi_{0}\) is the initial phase of the sine and cosine functions, which correspond to the slope of the tangent vector for the initial point. \(n_{c}\) is the cycle number of the spiral curve. \(l_{link}\) and \(n\) are the length and number of the snake robot modules, respectively. \(t\) is the independent variable divided into three intervals, which correspond to the line part (defined by LP, interval is \((0,\hat{t}_{1})\)); the base of the  
Figure 2: The similar macro shapes of a snake (label 1), a spiral curve (label 2), the line segments model after the shape-fitting algorithm (label 3) and the simplified simulation model (label 4).  
spiral curve part, which is in contact with the ground (defined by BS, interval is \((\hat{t}_{1},\hat{t}_{2})\)); and the rest of the spiral curve (defined by RS, interval is \((\hat{t}_{2},\hat{t}_{3})\)). \(\varphi_{base}\) is the phase value of the second interval.  
\[\begin{array}{l}x_{l}(t)=x_{s}(\hat{t}_{1})\ \ \ t\in(0,\hat{t}_{1})\\ y_{l}(t)=y_{s}(\hat{t}_{1})-t+\ \hat{t}_{1}\ t\in(0,\hat{t}_{1})\\ z_{l}(t)=0\ \ \ t\in(0,\hat{t}_{1})\\ x_{s}(t)=ab(\hat{t}_{3}-t)\sin(t+\varphi_{0})\ \ \ t\in(\hat{t}_{1},\hat{t}_{2})\\ y_{s}(t)=a(\hat{t}_{3}-t)\cos(t+\varphi_{0})\ \ \ t\in(\hat{t}_{1},t_{2})\\ z_{s}(t)=0\ \ \ t\in(\hat{t}_{1},\hat{t}_{2})\\ x_{s}(t)=ab(\hat{t}_{3}-t)\sin(t+\varphi_{0})\ \ \ t\in(\hat{t}_{2},\hat{t}_{3})\\ y_{s}(t)=a(\hat{t}_{3}-t)\cos(t+\varphi_{0})\ \ \ t\in(\hat{t}_{2},\hat{t}_{3})\\ z_{s}(t)=ct-c\hat{t}_{2}\ \ \ t\in(\hat{t}_{2},\hat{t}_{3})\\ \hat{t}_{1}=nl_{link}\\ \hat{t}_{2}=\hat{t}_{1}+\varphi_{base}\\ \hat{t}_{3}=\hat{t}_{1}+2n_{c}\pi\end{array} \tag{2}\]  
The predefined spiral curve is composed of a line part and a spiral curve part, as shown in Figure 3b. The line and spiral curve parts constrain the initial and final head-raising postures of the snake robot, respectively. As shown in Figure 3, compared with the regular spiral curve expressed in Equation (1), the predefined spiral curve expressed in Equation (2) introduces parameter \(b\) to ensure that \(x_{s}(t)\) and \(y_{s}(t)\) change unequally, interval \((0,\hat{t}_{1})\) to construct LP, \((\hat{t}_{1},\hat{t}_{2})\) to construct BS, and \((\hat{t}_{2},\hat{t}_{3})\) to construct RS. Additionally, by substituting item \((\hat{t}_{3}-t)\) for \(t\), it can be ensured that \(x_{s}(t)\) and \(y_{s}(t)\) decrease as \(z_{s}(t)\) increases. Obviously, the predefined spiral curve is appropriate for ensuring stability during head-raising.