1 Introduction

Snake robots offer potential in assisting in areas such as fire-fighting, rescue missions and maintenance due to their high maneuverability and ability to move through tight spaces. These robots are able to bend and adapt to the form of the terrain on which they move. The most famous gaits used by snakes are lateral undulatory (serpentine), concertina, sidewinding and rectilinear locomotion [1,2,3,4,5,6,7,8,9,10]. Snake-like robots were introduced by Shigeo Hirose [1]. Since Hirose initial study, many snake robots are designed. Existing snake-like robot designs have different physical configurations and purpose. They mostly attempt to mimic locomotion of real snakes; however, some use non snake-like gaits [2,3,4]. Hasanzadeh and Akbarzadeh [2] presented a novel gait, forward head serpentine (FHS), for a two-dimensional snake robot. In their work, they used Lagrange’s method to obtain dynamic equation. Kalani and Akbarzadeh [3] restricted their attention to worm-like, vertical traveling wave locomotion and presented detailed kinematics and dynamics of a planar multi-link snake robot. They employed Lagrange’s method to obtain the robot dynamics. Furthermore, authors in [4] used Newton’s method to obtain dynamic equations of traveling wave locomotion. Saito et al. [5] constructed a snake robot without wheels. This robot has great potential to adapt to various environments at the cost of increased power consumption. They obtained total equations of motion for a multi-link snake robot traveling with serpentine locomotion. They also showed that the unsymmetrical body curve increases the robot’s performance. Ma [6] formulated the kinematics and the dynamics of a 2-D snake-like robot in closed form. The derived robot dynamics were used to analyze the 2-D creeping locomotion [6,7,8]. Ma et al. [9] also considered formulation of the kinematics and dynamics of a three-dimensional (3-D) snake robot and analyzed creeping locomotion. They investigated the motion efficiency of a sinus-lifting motion in comparison with normal creeping locomotion. The 3-D dynamics of a snake robot during locomotion across flat surfaces is considered in [9, 11,12,13,14]. A mathematical model of a 3-D snake robot with 2-d.o.f. revolute joints using the Newton–Euler’s algorithm is presented by Liljebäck et al. [11, 12].

Fig. 1
figure 1

a Using the virtual structure for orientation and positioning for our mobile snake-like robot, b generlized coordinateds on snake robot and c frames resulted from the Denavit–Hartenberg convention. In this figures, cylinders and cubes indicate revolute and prismatic joints, respectively

In addition to more popular dynamics methods, Gibbs–Appell’s formulation is relatively less used to derive the system dynamics. This method is similar to the Lagrange. However, unlike Lagrange equations which use velocity variables, Gibbs–Appell employs acceleration variables, that offers various advantages, such as simplifying dynamic equations, resulting in reduction of simulation time [15]. These properties are useful in deriving the snake formulation with high volume of symbolic computations specially for 3-D multi-link snake robot. Vossoughi et al. [10] presented a novel structure of a snake-like robot. He used the Gibbs–Appell’s method to derive dynamic equations for motion in a horizontal plane. To the best of author’s knowledge, no study exists on dynamics of a 3-D snake robot using Gibbs–Appell formulation.

This paper is organized as follows. In Sect. 2, the kinematics of a 3-D snake robot is developed and the displacement, velocity and acceleration of each link are calculated. In Sect. 3, the dynamics of the robot using Gibbs–Appell’s method is obtained. In Sect. 4, dynamics equations are coded in MATLAB and joints torques for the 3-D sidewinding locomotion are obtained. This section also presents SimMechanics simulation results. In Sect. 5, more details for the design of the FUM-Snake 5 robot is presented. In following experimental observations, to implement the same 3-D sidewinding locomotion as used in Sect. 4 is considered and snap shots of the FUM-Snake 5 locomotion is presented. Finally, Sect. 7 presents concluding remarks.

2 Kinematics model of a 3-D snake robot

In this section, kinematics of a 3-D snake robot with six cylindrical links is discussed. First, a virtual structure for orientation and position, VSOP, with an additional six degrees of freedom is added to the tail link of the robot. Next, Denavit–Hartenberg convention is used to derive the kinematics relationships. It should be noted that since we do not wish to generate workspace trajectory for the robot, the direct kinematics solution is sufficient.

The mechanism of a snake robot resembles the mechanism of conventional series robot manipulators. Thus, it would be reasonable to use conventional methods of robotics, presented in relevant textbooks, to model the snake robot. In general, one end of a robotic manipulator, is attached to ground. Therefore, any movement can be easily defined relative to this base point. However, mobile and snake robots do not have such a base or mounting point and their entire mechanism can freely move in three-dimensions or rotate around any possible axis in space. This problem is solved by introducing a virtual structure for orientation and positioning. This means that the six extra degrees of freedom, that make the snake robot free from being fixed to a base point, is accounted for by using six virtual links having zero mass and length at one end of the snake robot. As a result, a hypothetical base point can be added by assuming that this virtual structure is fixed at one end to ground. This fixed point is added at the origin of a fixed base coordinate system, indicating the robot absolute position. The resulting structure for the whole robot is shown in Fig. 1a. In this figure, the joints between each pair of links are universal. This is vital in order to obtain maneuverability in three dimensions. Using a universal joint between every two link makes the motion of the robot smoother while reducing the number of needed modules. Hence, the total degrees of freedom of a snake-like robot will be \(6 + 2(\text {n}-1)\), where n is the number of modules. Since the robot studied in this work has six links, its total degrees of freedom is 16.

As mentioned before, the kinematics relationships are derived using Denavit–Hartenberg, D–H. To use this method, we first attach the link frames to the links according to D–H convention. Fig. 1b shows the generalized coordinates, \({q}_{i}\) which are defined to obtained the kinematics equations. The resultant frame systems can be seen in Fig. 1c. Six frames, representing VSOP are all located at one point. Two frames having the same origin are used for representing each of the universal joints. We can now construct a transformation matrix that defines ith frame relative to the \({(i-1)}\)th frame as follows:

$$\begin{aligned} {}_{\phantom {i-}i}^{i-1}T=\left[ {\begin{array}{cccc} c\theta _{i} &{} -s\theta _{i} &{} 0 &{} a_{i-1}\\ s\theta _{i}c\alpha _{i-1} &{} c\theta _{i}c\alpha _{i-1} &{} -s\alpha _{i-1} &{} -s\alpha _{i-1}d_{i}\\ s\theta _{i}s\alpha _{i-1} &{} c\theta _{i}s\alpha _{i-1} &{} c\alpha _{i-1} &{} c\alpha _{i-1}d_{i}\\ 0 &{} 0 &{} 0 &{} 1\\ \end{array} } \right] \end{aligned}$$
(1)

where \(a_{i-1}\) is the distance from \({Z}_{i}\) to \({Z}_{i+1}\) measured along \({X}_{i}\), \(\alpha _{i-1}\) is the angle from \({Z}_{i}\) to \({Z}_{i+1}\) measured about \({X}_{i}\), \(d_{i}\) is the distance from \({O}_{i-1}\) (Origin of \({(i-1)}\)th frame) to \({O}_{i}\) (Origin of ith frame) measured along \({Z}_{i}\) and \(\theta _{i}\) is the angle from \({X}_{i-1}\) to \({X}_{i}\) measured about \({Z}_{i}\). In general, this transformation will be a function of the four link parameters. For any given robot, this transformation will be a function of only one variable, the other three parameters are fixed by its mechanical design.

Moreover, the homogeneous transformation matrix of coordinate system, {i} , in an arbitrary coordinate system, {j} , can be found by multiplication of the consecutive transformation matrices as follows:

$$\begin{aligned} {}_{i}^{0} T={}_{1}^{0} {T}{}_{2}^{1} {T\ldots {}_{\phantom {i-}i}^{i-1} T} \end{aligned}$$
(2)

Refer to Fig. 1, there are three prismatic joints having velocities and accelerations as:

$$\begin{aligned} i=0,1,2\left\{ {\begin{array}{l} {vel}_{i+1}={}_{\phantom {i+}i}^{i+1} R{vel}_{i}+\left[ {\begin{array}{ccc} 0 &{} 0 &{} \dot{q}_{i+1}\\ \end{array} } \right] ^{T} \\ {acc}_{i+1}={}_{\phantom {i+}i}^{i+1} R{acc}_{i}+\left[ {\begin{array}{ccc} 0 &{} 0 &{} \ddot{q}_{i+1}\\ \end{array} } \right] ^{T} \\ \end{array}} \right. \end{aligned}$$
(3)

where \(\dot{q}_{i}\) and \(\ddot{q}_{i}\) show the first and second derivative of generalized coordinates, respectively. Also, \({vel}_{i}\) and \({\mathrm {acc}}_{i}\) denote velocity and acceleration of ith frame. Moreover, kinematics parameters of revolute joints can be defined as:

$$\begin{aligned}&i=3,4,\ldots ,16\nonumber \\&\quad \times \,\left\{ \begin{array}{l} \omega _{i+1}={}_{\phantom {i+}i}^{i+1}R\omega _{i}+[ \begin{array}{ccc} 0&{}0&{}\dot{q}_{i+1} \end{array}]^{T}\\ \alpha _{i+1}={}_{\phantom {i+}i}^{i+1}R\alpha _{i}+{}_{\phantom {i+}i}^{i+1}R\omega _{i}\times [ \begin{array}{ccc} 0&{}0&{}\dot{q}_{i+1} \end{array}]^{T}+ [\begin{array}{ccc} 0&{}0&{}\ddot{q}_{i+1} \end{array}]^{T}\\ vel_{i+1}={}_{\phantom {i+}i}^{i+1}R(vel_{i}+\omega _{i}\times \alpha _{i})\\ acc_{i+1}={}_{\phantom {i+}i}^{i+1}R(\alpha _{i}\times a_{i+1}+ \omega _{i} \times (\alpha _{i}\times a_{i+1})+acc_{i} \end{array}\right. \nonumber \\ \end{aligned}$$
(4)

where \(\omega _{i}\), \(\alpha _{i}\), \({vel}_{i}\) and \({acc}_{i}\) denote angular velocity, angular acceleration, linear velocity and accelerations of frame {i}, respectively. Table 1 summarizes values for the Denavit–Hartenberg convention parameters of the snake robot.

Table 1 Denavit–Hartenberg parameters for a six-link three-dimensional snake-like robot

In this table, L is the length of each link. Moreover, values denoted by \(q\left( i \right) \) are generalized coordinates caused by the degrees of freedom of the robot. Note that \(q\left( 1 \right) ,q\left( 2 \right) \) and \(q\left( 3 \right) \) are in meter and describe the position at the tail of the robot, while the rests are angular positions and are in radian. In this paper, mass and length of all six links are considered to be the same.

Fig. 2
figure 2

The employed mass-spring-damper system to model the ground. Each link of the snake-like robot is regarded as infinitely thin rod with a revolute joint at each end

3 Dynamics modelling of 3-D snake robot

3.1 Ground modelling

A snake-like robot can be subjected to external forces in an arbitrary point along its structure, or to be exact, in the point that is in contact with the ground. This contact leads to normal and frictional forces on the links that are needed for the snake’s locomotion. The friction between the ground and links ensures that the robot is able to move forward. Each module is regarded as infinitely thin rod with a revolute joint at each end. The center of mass (center of gravity) is assumed to be exactly in the middle of each link. It is also presumed that the gravity, normal forces and frictional forces are only applied to the center of mass of each link.

The snake robot contact with the ground is modeled as a mass-spring-damper system. Since the ground is usually hard, the spring is assumed to be rather stiff. Dampers are also considered for this system to dampen the spring movement. Without attenuation of spring force, snake robot jumps up and down like a bouncing ball. Fig. 2 illustrates the model for the ground. Center of gravity (CG) of each link is subject to a normal force corresponding to the force of a spring with spring constant k, and a damper with damper constant d.

It is important to notice that links will be completely disconnected from the spring-damper system when the CG is raised above the surface. Since the origin of the base system is located at the ground level, it means that the normal force only applies to a center of mass, if the z-component of that mass center is less than zero. Please note that normal forces only act on those links which have mass (and length), that are links 6, 8, 10, 12, 14 and 16 not VSOP links (see Fig. 1c).

The normal forces that apply to each link can be calculated as:

$$\begin{aligned} N_{i}=\left\{ {\begin{array}{ll} 0&{}\quad P_{i,zCG} \ge 0\\ -k \times P_{i,zCG}-d \times V_{i,zCG} &{} \quad P_{i,zCG}< 0\\ \end{array} } \right. \end{aligned}$$
(5)

In which k and d are the spring and damper constants, respectively. i represents the link number, \(P_{i,zCG}\) is the z-coordinate position while \(V_{i,zCG}\) is the z-coordinate velocity of each CG point.

Biological snakes possess a characteristic that causes the tangential friction, i.e. the friction along the links, be less than the friction normal to the links. This indicates a tendency to slide forward instead of slipping sideways. Such properties are usually implemented on a snake-like robot by passive wheels or specially designed skins. Therefore, we assume that the friction applied to each link consists of two components, one component tangent to the link and one normal to it. Between the two common friction models, Coulomb and viscose, the viscous model is less complex than the Coulomb. Therefore, the viscose ground friction is employed as:

$$\begin{aligned}&\vec {F}_{i,n}=-\,C_{n}\times N_{i}\times \vec {V}_{i,n}\nonumber \\&\vec {F}_{i,t}=-\,C_{t}\times N_{i}\times \vec {V}_{i,t}\nonumber \\&\vec {F}_{i}=\vec {F}_{i,n}+\vec {F}_{i,t}+\left[ {\begin{array}{ccc} 0 &{} 0 &{} N_{i}\\ \end{array} } \right] ^{T} \end{aligned}$$
(6)

where \(\vec {F}_{i,n}\) and \(\vec {F}_{i,t}\) are normal and tangential friction forces, respectively, \(N_{i}\) is the exerted normal force acting on the corresponding CG and can be calculated using Eq. (5), \(\vec {V}_{i,n}\) and \(\vec {V}_{i,t}\) respectively are the velocity of link in normal and tangential directions, \(C_{n}\) is normal friction coefficient, \(C_{t}\) is tangential friction coefficient and i denotes number of the CG to which the friction forces are applied. Also, \(\vec {F}_{i}\) represents the resultant force that exerted on each link. Figure 3 shows the external forces that are applied to snake robot. As can be seen, we assume that friction and normal forces act on the gravity center of each link.

Fig. 3
figure 3

Schematic equivalent external forces on two link of snake robot

3.2 Gibbs–Appell method

In this section, a three-dimensional 6-link snake robot traveling in sidewinding locomotion is considered and its mathematical model representing the snake robot dynamics are obtained. The Gibbs–Appell’s method is used in deriving the dynamics equations. The snake robot is also modeled in SimMechanics toolbox of MATLAB. The derived dynamics equation is next verified by simulating the robot in SimMechanics software. The Gibbs–Appell’s method was discovered by Gibbs in 1879 and was studied in detail by Appell in an 1899 publication. It provides a minimal set of dynamical equations, which are applicable to systems with quasi-velocities and nonholonomic constraints [17, 18]. The general form of Gibbs–Appell is:

$$\begin{aligned} \frac{\partial S}{\partial \ddot{q}_{j}}=\varGamma _{j} \end{aligned}$$
(7)

where S is the Gibbs–Appell function, \(q_{i}\) and \(\varGamma _{j}\) are the general coordinates and generalize forces of the system, respectively.

The significant aspect of Gibbs–Appell function is that it allows us to evaluate it in terms of the same quantities as those used for the Newton–Euler’s equations of motion. The Gibbs–Appell function for each link in three-dimensional space is defined as:

$$\begin{aligned} S_{i}= & {} \frac{1}{2}m\left( \overline{acc}_{i,CG}\cdot \overline{acc}_{i,CG} \right) +\frac{1}{2}\bar{\alpha }_{i}\cdot \frac{\partial \bar{H}_{i,CG}}{\partial t}\nonumber \\&+\,\bar{\alpha }_{i}\cdot (\bar{\omega }_{i}\times \bar{H}_{i,CG}) \end{aligned}$$
(8)

where \(\bar{H}_{i,CG}\) is the angular momentum of each link about its center of gravity, \(\bar{\alpha }_{i}\) is the angular acceleration, \(\bar{\omega }_{i}\) is the angular velocity and \(\overline{acc}_{i,CG}\) is the linear acceleration. Also m is the link mass which is considered equal for all links and i denotes the number of robot links. Angular momentum of ith link can be represented as:

$$\begin{aligned} \bar{H}_{i,CG}=\left[ {\begin{array}{lll} I_{xx} &{} I_{xy} &{} I_{xz}\\ I_{xy} &{} I_{yy} &{} I_{yz}\\ I_{xz} &{} I_{yz} &{} I_{zz}\\ \end{array} } \right] \left[ {\begin{array}{l} \omega _{xi}\\ \omega _{yi}\\ \omega _{zi}\\ \end{array} } \right] \end{aligned}$$
(9)

where \(\omega _{xi}\), \(\omega _{yi}\) and \(\omega _{zi}\) are the angular velocity of ith links about x, y and z axis, respectively. Next by taking time derivative of Eq. (9), we have:

$$\begin{aligned} \frac{\partial \bar{H}_{i,CG}}{\partial t}=\left[ {\begin{array}{lll} I_{xx} &{} I_{xy} &{} I_{xz}\\ I_{xy} &{} I_{yy} &{} I_{yz}\\ I_{xz} &{} I_{yz} &{} I_{zz}\\ \end{array} } \right] \left[ {\begin{array}{l} \alpha _{xi}\\ \alpha _{yi}\\ \alpha _{zi}\\ \end{array} } \right] \end{aligned}$$
(10)

where \(\alpha _{xi}\), \(\alpha _{yi}\) and \(\alpha _{zi}\) are the angular acceleration of the ith links about x, y and z axis, respectively. Note that S is a scalar, so we obtain its value for a system by summing the contribution of each body as:

$$\begin{aligned} S_{}=S_{link1}+S_{link2}+\cdots +S_{link6} \end{aligned}$$
(11)

Moreover, \(\varGamma _{j}\) is defined as:

$$\begin{aligned} \varGamma _{j}=\delta W={\delta W}_{c.}+{\delta W}_{nc.} \end{aligned}$$
(12)

where \({\delta W}_{c.}\) and \({\delta W}_{nc.}\) are the virtual works that is done by conservative and non-conservative forces, respectively. To evaluate conservative forces, potential-energy function is used as:

$$\begin{aligned} V= & {} \sum \limits _{i=1}^6 {mg} P_{i,zCG}\nonumber \\ {\delta W}_{c.}= & {} -\frac{\partial V}{\partial q} \end{aligned}$$
(13)

where V is a scalar that represents the potential-energy of the whole system. On the other hand, contact forces and joints torques, should be account in non-conservative forces as:

$$\begin{aligned} {\delta W}_{nc.}=\sum \limits _{i=1}^6 {\vec {F}_{i}\cdot {\delta \bar{r}}_{i,CG}} +\sum \limits _{j=1}^{10} {\tau _{j}\cdot {\delta q}_{j}} \end{aligned}$$
(14)

where \(\bar{r}_{i,CG}\) is the position vector of center of gravity, \(\tau _{j}\) is the joints torques. Also i and j denote the number of the robot links and number of joints, respectively. By substituting Eqs. (11), (13) and (14) into Gibbs–Appell formulation, Eq. (7), the dynamic model for the \(n-\)link snake robot can be derived as:

$$\begin{aligned} M\left( q \right) \ddot{\vec {q}}+H\left( q,\dot{q} \right) +G\left( q \right) +F\left( q,\dot{q} \right) =\vec {\tau } \end{aligned}$$
(15)

where \(M\left( q \right) \) is the \(n\times n\) positive definite and symmetric inertia matrix, \(H\left( q,\dot{q} \right) \) is an \(n\times 1\) vector of centrifugal and Coriolis terms, \(G\left( q \right) \) is an \(n\times 1\) vector of gravity terms, \(F\left( q,\dot{q} \right) \) is an \(n\times 1\) vector represents friction forces and \(\vec {\tau }\) is an \(n\times 1\) vector of input torques. Also q, \(\dot{q}\), \(\ddot{q}\) and are generalized coordinates and their derivatives.

Fig. 4
figure 4

Flowchart of solution for the dynamics equations

Table 2 Simulation parameters
Fig. 5
figure 5

Joint torques: a Horizontall joint # 1, b vertical joint #1, c horizontall joint #2, d vertical joint #2, e horizontall joint #3, f vertical joint #3, g horizontall joint #4, h vertical joint #4, i horizontall joint #5 and j vertical joint #5

In this paper, the inverse dynamics of the snake robot is considered. In other words, desired time histories of relative angles of the adjacent links (\(q_{7},\ldots ,q_{16}\) and their derivatives) are supplied and generalized coordinates of VSOP (\(q_{1},\ldots ,q_{6})\) as well as required motor torques are obtained. Therefore, Eq. (15) can be rewritten as:

$$\begin{aligned} M_{16\times 1}\left[ {\begin{array}{l} \ddot{q}_1\\ \vdots \\ \ddot{q}_6\\ \ddot{q}_7\\ \vdots \\ \ddot{q}_{16}\\ \end{array} } \right] _{16\times 1}+H_{16\times 1}+G_{16\times 1}+F_{16\times 1}=\left[ {\begin{array}{l} 0\\ \vdots \\ 0\\ \tau _1\\ \vdots \\ \tau _{10}\\ \end{array} } \right] _{16\times 1}\nonumber \\ \end{aligned}$$
(16)

where \(\ddot{q}_{1},\ldots ,\ddot{q}_{6}\) and \(\tau _{1},\ldots ,\tau _{10}\) are the acceleration of VSOP generalized coordinates and required torques, respectively. These variables are unknowns and are calculated during the solution process. However, \(\ddot{q}_{7},\ldots ,\ddot{q}_{16}\) are the acceleration of known relative joint angles which are calculated using the sidewinding locomotion. To solve the Eq. (16), this equation is decoupled into two parts:

$$\begin{aligned}&\left[ {\begin{array}{ll} {}^{u}M_{6 \times 6}&{} {}^{u}N_{6 \times 10}\\ {}^{d}M_{10 \times 6}&{} {}^{d}N_{10 \times 10}\\ \end{array} } \right] \left[ {\begin{array}{l} \ddot{q}_{6 \times 1}^{{{\varvec{VSOP}}}}\\ \ddot{q}_{10 \times 1}^{{{\varvec{joints}}}}\\ \end{array} } \right] +\left[ {\begin{array}{l} {}^{u}H_{6 \times 1}\\ {}^{d}H_{10 \times 1}\\ \end{array} } \right] \nonumber \\&\quad +\left[ {\begin{array}{l} {}^{u}G_{6 \times 1}\\ {}^{d}G_{10 \times 1}\\ \end{array} } \right] +\left[ {\begin{array}{l} {}^{u}F_{6 \times 1}\\ {}^{d}F_{10 \times 1}\\ \end{array} } \right] =\left[ {\begin{array}{l} 0_{6 \times 1}\\ \tau _{10 \times 1}^{\textit{joints}}\\ \end{array} } \right] \end{aligned}$$
(17)

Therefore, Eq. (17) can be rewritten as:

$$\begin{aligned} \ddot{q}^{{{{\varvec{VSOP}}}}}= & {} -{}^{u} M^{-1}\left( {}^{u} N\ddot{q}_{}^{{{{\varvec{joints}}}}}+{}^{u} H+{}^{u} G+{}^{u} F \right) \end{aligned}$$
(18)
$$\begin{aligned} \tau ^{{{{\varvec{joints}}}}}= & {} {}^{d} {M\ddot{q}^{{{{\varvec{VSOP}}}}}}+{}^{d} {N\ddot{q}^{{{{\varvec{VSOP}}}}}+{}^{d} H+{}^{d} G+{}^{d} F} \end{aligned}$$
(19)

Equation (18) is a 6-dimensional linear equation of six unknown variables. By solving this equation, the acceleration parameters for VSOP (\({\ddot{q}}^{VSOP})\) are obtained. Next, Eq. (19) is used to obtain the joints torques (\({\tau }^{\textit{joints}})\). Subsequently, the VSOP kinematics parameters, \({q}^{VSOP}\) can all be obtained through integration. The complete parameters defining robot motion are now derived for the case when changes in body shape are known. Therefore, upon specifying changes in body shape, the necessary joint torques to generate the desired robot motion can be obtained (Fig. 4).

4 Computer simulation

In this section, sidewinding locomotion is simulated. Sidewinding is the use of continuous and alternating waves of lateral bending. In robotic application, sidewinding is realized by two waves, one ventral and one lateral that are out of phase. For an n-link snake-like robot with universal joints (having two perpendicular revolute joint between each pair of links), the relative joints angles change as:

$$\begin{aligned} \begin{array}{l} \varphi _{h}^{i}\left( t \right) =\alpha _{h}\sin \left( \omega _{h}t+\left( i-1 \right) \beta _{h} \right) +\gamma _{h}\\ \varphi _{v}^{i}(t)=\alpha _{v}\sin (\omega _{v}t+\left( i-1 \right) \beta _{v})+\gamma _{v} \end{array} \hbox {where} \; i=1,2,\ldots ,6\nonumber \\ \end{aligned}$$
(20)

where \(\varphi \) is relative joint angle (motor angle). Moreover, v and h indices are abbreviated forms of vertical and horizontal, respectively, that indicates the plane which joint operate on. In this study, the 6-links snake robot has 5 universal (5 vertical and 5 horizontal) joints. Equation (20) are used to generate the sidewinding motion [19]. Fixed variables used are:

$$\begin{aligned} \alpha _{h}= & {} 25^{\circ }\quad \omega _{h}=110^{\circ }/{\text {s}}\quad \beta _{h}=-50^{\circ }\quad \gamma =0^{^{\circ }}\nonumber \\ \alpha _{v}= & {} 25^{\circ }\quad \omega _{v}=110^{\circ }/{\text {s}}\quad \beta _{v}=-50^{\circ }\quad \gamma =0^{^{\circ }} \end{aligned}$$
(21)

Table 2 shows the parameters used for the simulation.

In order to verify the derived dynamic equation, the snake robot model prepared in SimMechanics toolbox of MATLAB package is used. Results obtained by the derived dynamic equation closely agree with those of SimMechanics. Therefore, it proves validity of the obtained dynamic equations. The changes in joint torques for all joints are shown in Fig. 5. Moreover, since the results are periodic, only the first five seconds are shown in each figure. As can be seen, the torque at the start of the motion, experiences a small hike. This is related to overcome inertial force to approach initial body shape.

In addition, joint torques are periodic and amount of maximum joint toques for joints 2, 3 and 4 are relatively higher than joint 1 and 5. This is because joint 2, 3 and 4 are the nearest joint to the gravity center of the entire snake robot. In other words, as joints get closer to the center of gravity, the required maximum torque increases.

Moreover, Fig. 5 indicates that because of gravity acceleration, vertical joints experienced more torques than corresponding horizontal joints.

Fig. 6
figure 6

FUM-snake 5

Fig. 7
figure 7

a Aluminum chassis of the robot’s module, b composite cases that cover each module, and c head module of the robot equipped with IP camera and LEDs

Fig. 8
figure 8

Control scheme of the robot

5 FUM-snake 5 robot design

FUM-Snake 5, shown in Fig. 6, is the fifth-generation snake robot designed in the FUM Robotics center. The first four robots were designed for planar motions like serpentine and traveling wave [2,3,4]. FUM-Snake 5 is designed to move in the 3-D space. It is made of eight links. Each link is made of an Aluminum chassis and covered with a composite case (Fig. 7a, b). All eight links have equal length and are attached to each other using a custom made universal joint. The robot in its fully flat configuration has width 140 mm, height 140 mm and length 1600 mm. The overall weight of the snake robot, including all motors and all other components is 6.7 kg. Dynamixel-RX64 servomotors that could provide a maximum of 5.3 N.m stall torque are used. The designed modules are shown in Fig. 7b. An IP camera is implemented inside the head module to send live video from the robot workspace to the user, Fig. 7c. Each link, has an internal control board, Fig. 8, that collect data from eight force sensors (load cell) which measure magnitude and direction of the exerted force to the link as well as eight IR sensors that measure distance from other objects in the environment. The positions of each servo are sent by RS232 serial communication to a micro controller, friendly ARM board, ARM9 (Mini 2440). As shown in previous work [4], the shape of the links is chosen to be curvilinear, which results in a significant lowering of the impact forces experienced by the robot during motion.

6 Experimental observations

The selection of the values for the motion variables alpha \((\alpha _{v,h}=25^{\circ })\) and beta (\(\beta _{v,h}=-\,50^{\circ })\) is due to the limitation of the custom made universal joints design that has a range of ± 30 degrees. Furthermore, the selection of the value for the motion frequency variable (\(\omega _{v,h}=110\,{\text {deg}}/{\text {sec}})\) is based on the speed limitation of the RX-64 motors. These limits lead us to find optimum number for fixed variable in Eq. (4) to have a high performance and elegant appearance of sidewinding locomotion as much as possible. In addition, despite the various efforts, we were not able to record neither the actual motor torques of the Rx-64 servo motors (cause: not capable of reporting consumed torque) nor reliable force magnitude of the eight force sensors of each link (cause: inappropriate force sensor that can’t measure force properly), to compare with theoretical results shown in Fig. 5. However, during the experiments we observed that motors closer to gravity center of the robot, repeatedly go into faults due to over current error, especially the motor number 4 and 5 which are related to the vertical plane motion. As current has a direct relationship with torque, it is concluded that the required torque is also increased. This finding is similar to our derived theoretical results. As shown in Fig. 5, the maximum torque experienced for the vertical motor joints 3 and 4 are significantly higher than the other motors. The progression of the snake robot in sidewinding locomotion is shown in Fig. 9.

Fig. 9
figure 9

Progression of the snake robot in sidewinding locomotion

7 Conclusion

In this study, design of the 3-D FUM-snake 5 is briefly discussed and kinematics, dynamics, simulation and experimental observation of the robot in sidewinding locomotion are represented in details. We first present the kinematics of the snake robot using Denavit–Hartenberg convention. Next, for the first time, the dynamics model of the snake robot is developed using the Gibbs–Appell method. The derived dynamics formulations are coded in MATLAB software. The sidewinding locomotion is considered and the required motor torques are calculated using the SimMechanics model. The theoretical formulation and the SimMechanics model is compared. Results indicate that the established kinematics and dynamics of the snake robot are reasonable. A 3-D snake robot, the FUM-Snake 5, is designed and its details are presented. The robot offers a novel shaped link that significantly minimizes the impact forces experienced by the robot. Experiments shows that when motors get closer to the gravity center, require more torques same as theoretical result. The theoretical derived equation in this paper can also be used to generate both 2-D (i.e. serpentine, concertina and traveling wave locomotion [2,3,4,5]) and 3-D snake motions (i.e. arc and helix rolling [20]).

The main contributions of this paper are detailed development of snake kinematics and dynamics equations of a 3-D snake based on Gibbs–Appell formulations, verification of the 3-D dynamic simulation using SimMechanics software, as well as design and construction of a snake robot having a novel shaped link. For our future work, we plan to extend the dynamics equations by considering external forces applied by obstacles as the snake moves through complex and cluttered environments.