In this section, we derive the kinematic model along with the dynamic equations of motion of the snake robot in a Lagrangian framework. Moreover, we use partial feedback linearization to write the model in a simpler form for model-based control design.
In order to perform control design, we need to write the governing equations of the system in an implementable way. This is often done by choosing a local coordinate chart and writing the system equations with respect to (w.r.t.) these coordinates. According to the illustration of the snake robot in Figure 1, we choose the vector of the generalized coordinates of the N-link snake robot as , where q
i
with i∈{1,…,N−1} denotes the i th joint angle, θ
N
denotes the head angle, and the pair (p
x
,p
y
) describes the position of the CM of the robot w.r.t. the global x−y axes. Since the robot is not subject to nonholonomic velocity constraints, the vector of the generalized velocities is defined as . Using these coordinates, it is possible to specify the kinematic map of the robot. In this paper, we denote the first N elements of the vector x, i.e. (q1,…,qN−1,θ
N
), as the angular coordinates, and the corresponding dynamics as the angular dynamics of the system.
The geometry of the problem
The (N+2)-dimensional configuration space of the snake robot is denoted as , which is composed of the shape space and a Lie group which is freely and properly acting on the configuration space. In particular, the shape variables, i.e. q
a
=(q1,…,qN−1), which define the internal configuration of the robot and which we have direct control on, take values in . Moreover, the position variables, i.e. q
u
=(θ
N
,p
x
,p
y
), which are passive DOF of the system, lie in . The velocity space of the robot is defined as the differentiable (2N+4)-dimensional tangent bundle of as , where denotes the N-torus in which the angular coordinates live. The free Lagrangian function of the robot is invariant under the given action of on . The coupling between the shape and the position variables causes the net displacement of the position variables, according to the cyclic motion of the shape variables, i.e. the gait pattern. Note that for simplicity of presentation, in this paper, we consider local representation of embedded in an (2N+4)-dimensional open subset of the Euclidean space .
The forward kinematic map of the snake robot
Based on the kinematic parameters of the snake robot given in Figure 1, it is possible to write the coordinate representation of the forward kinematic map. The map between the absolute link angles θ
i
and the relative joint angles q
i
is given by
(1)
The position of the CM of the i th link w.r.t. the global x-y axes can be, respectively, given as
(2)
(3)
where 2l denotes the length of each link, and (px,0,py,0) denotes the tail position (cf. Figure 1). The linear velocities of the CM of the i th link w.r.t. the global x-y axes can be found by taking the time derivative of (2)-(3) which gives
(4)
(5)
Since all the links have equal length and mass, the position of the CM for the whole structure of the robot is defined as
(6)
To facilitate path following control of the CM of the snake robot, we replace the tail position (px,0,py,0) in (2)-(3) with the position of the CM of the robot (p
x
,p
y
) using the following change of coordinates:
(7)
(8)
Substituting (7)-(8) along with their time derivatives into (2)-(5) completes the derivation of the forward kinematic map of the snake robot w.r.t. the desired specified coordinate chart .
Equations of motion of the snake robot
The majority of the previous literature on snake robots and similar mobile multi-body robotic structures, such as eel-like robots, have derived the equations of motion of these robots with a Newton-Euler formulation, i.e. where the equations describing the linear and angular motion of individual links are written separately (see, e.g. [15],[16]). This is due to the fact that it is usually not straightforward to integrate the anisotropic external dissipative forces, i.e. ground friction forces, acting on these complex robotic structures into their Euler-Lagrange equations of motion. However, ground friction forces have been proved to play a fundamental role in snake robot locomotion (see, e.g. [16]). In this paper, we derive the equations of motion of the snake robot in a Lagrangian framework, i.e. treating the robot as a whole and performing the analysis using a Lagrangian function, which is simple to follow and better suited for studying advanced mechanical phenomena such as elastic link deformations [25], which might be insightful for future research challenges on snake robots. Moreover, we integrate the anisotropic friction forces into these equations using the Jacobian matrices of the links, which gives a straightforward mapping of these forces for the equations of motion.
Snake robots are a class of simple mechanical systems, where the Lagrangian is defined as the difference between the kinetic energy and potential energy of the system [26]. Since the planar snake robot is not subject to any potential field, i.e. , we may write the Lagrangian equal to the kinetic energy, which is the sum of the translational and the rotational kinetic energy of the robot:
(9)
where m and J denote the uniformly distributed mass and moment of inertia of the links, respectively. Using the Lagrangian function (9), we write the Euler-Lagrange equations of motion of the controlled system as
(10)
where i∈{1,…,N+2}, is the full column rank actuator configuration matrix, where e
j
denotes the j th standard basis vector in . Moreover, with stands for the generalized forces resulting from the control inputs. Furthermore, denotes viscous and Coulomb friction forces acting on (N+2) DOF of the system. The controlled Euler-Lagrange equations (10) can also be written in the form of a second-order differential equation as
(11)
where is the positive definite symmetric inertia matrix, denotes the generalized Coriolis and centripetal forces, and the right-hand side terms denote the external forces acting on the system. The fact that the inertia matrix is only a function of the directly actuated shape variables q
a
is a direct consequence of the invariance of the Lagrangian function (9) w.r.t. the position variables. Moreover, since rank[B(x)]<dim(x), the system is underactuated. This underactuation represents the lack of direct control on the head angle and the position of the CM of the robot.
The dynamic model (11) perfectly agrees with the equations of motion which are derived based on the Newton-Euler formulation in previous works (see, e.g. [16]). In order to validate the model, in the last section of this paper, we present simulation results which are obtained using the dynamic model (11) together with experimental results for the locomotion of the robot which are obtained using a physical snake robot. The agreement between simulations and experiments shows that the dynamic model (11) accurately represents the motion of the robot.
The ground friction model
In this subsection, both viscous and Coulomb friction models are used for capturing the essential properties of the anisotropic ground friction forces. For modelling the friction, we first define the rotation matrix for mapping from the global frame to the local frame of link i (cf. Figure 1) as
(12)
Using (4)-(5) and (12), the velocities of the links in the local link frames can be written in terms of the velocities of the links in the global frame as
(13)
where and denote the linear velocity of the CM of the i th link in the tangential (along link x-axis) and normal (along link y-axis) direction of the link, respectively. The total friction force acting on link i is defined as the sum of the viscous and Coulomb friction forces, which are denoted by and , respectively, as
(14)
Assuming equal friction coefficients for all the links, we write the model of the friction for each individual link i as
(15)
(16)
where i∈{1,…,N}, m denotes the mass of a link, g denotes the acceleration due to gravity, and μ
t
and μ
n
denote Coulomb friction coefficients in the tangential and normal direction of the link, respectively. Furthermore, c
t
and c
n
denote viscous friction coefficients in the tangential and normal direction of the link, respectively. Thus, we map the friction force acting on the i th link to the global x-y frame as
(17)
Finally, we can write τ
f
in (11) as
(18)
where
(19)
denotes the transpose of the Jacobian matrix of the CM of the i th link.
Remark 1.
As argued in [16], the motion of a snake robot with anisotropic viscous ground friction is qualitatively (but not quantitatively) similar as with anisotropic Coulomb friction. However, a viscous friction model is less complex w.r.t. control design and analysis. Accordingly, we employ a viscous friction model for the control design in this paper.
Partial feedback linearization of the dynamic model
A common method for control of mechanical systems is full-state feedback linearization. This approach is not applicable for snake robots due to the underactuation. However, it is still possible to linearize the dynamics of the actuated DOF of the robot, which is called collocated partial feedback linearization, and can simplify the analysis as well as the control design. A similar approach is considered in [16], but for the sake of completeness, we present the approach here. To this end, we separate the dynamic equations of the robot given by (11) into two subsets by taking , with and which were defined in the subsection describing the geometry of the problem:
(20)
(21)
where , , , and denote the corresponding submatrices of the inertia matrix, and . Furthermore, and include all the contributions of the Coriolis, centripetal, and friction forces. Moreover, denotes the non-zero part of the vector of control forces, i.e. . From (21), we have
(22)
Substituting (22) into (20) yields
(23)
For linearizing the dynamics of the directly actuated DOF, we apply the global transformation of the vector of control inputs as
(24)
where is the vector of new control inputs. Consequently, the dynamic model (20)-(21) can be written in the following partially feedback linearized form
(26)
with
(27)
(28)
where is a smooth scalar-valued function. It can be numerically shown that the value of β
i
is negative at any configuration . Furthermore, , f
x
, and f
y
denote the friction forces acting on θ
N
, p
x
, and p
y
, respectively ( also contains Coriolis forces besides the friction forces). For the aim of analysis and model-based control design, we write (25)-(26) in a more detailed form:
(30)
(31)
(32)
where the summation convention is applied in (30), and henceforth, to all the equations which contain repeated upper-lower indices (i.e. whenever an expression contains a repeated index, one as a subscript and the other as a superscript, summation is implied over this index [26]). The dynamical system (29)-(32) is in the form of a control-affine system with drift. In particular, the term
(33)
is called the drift vector field, which specifies the dynamics of the robot when the control input is zero. Furthermore, the columns of the matrix
(34)
are called the control vector fields, which enable us to control the internal configuration and consequently the orientation and the position of the robot in the plane.
Remark 2.
The last two rows of the control vectors in (34) are composed of zero elements. This implies that the control forces have no direct effect on the dynamics of the position of the CM of the robot, i.e. (31)-(32). Furthermore, the dynamics of the position of the CM are coupled with the dynamics of the directly actuated shape variables q
a
, i.e. (29), only through the friction forces. Accordingly, in the absence of the friction forces, the linear momentum of the robot is a conserved quantity, and the position of the CM of the robot is not controllable.