Abstract
This article deals with using of geometric mechanics at modeling mixed mechanical locomotion systems. In introductory part, the division of locomotion systems and reduced motion equation, which create the mathematical model of the system, is analyzed. Further we devoted to example of mixed locomotion system—two-link snake. We created the mathematical model of this example, simulated this system, and represented other tools of geometric mechanics.
Keywords
Introduction
Mathematical modeling is interesting for engineers in the process of designing devices and systems. Thus, engineers should be able to create description of the system to be able to predict the system behavior before its realization. The classical modeling of multibody systems (e.g. Lagrangian mechanics) leads to complicated equations of motion and these equations are often not suitable for control design. In this article, we focused on tools of geometric mechanics that provide a better tool for creating motion equations and better understanding of their dynamics.
At writing this article, we were inspired by the works of Hatton and Choset, 1,2 Ebetiuc and Harald, 3 Shammas et al., 4 and Karavaev and Kilin, 5 who devoted mathematical modeling of locomotion systems using geometric mechanics. The locomotion of system is based on change of system shape that provides total motion of system as we can see in Figure 1 on motion of cat. In the work of Lipták et al., 6 we devoted three-link snake-like robot. This three-link snake-like robot belongs to the category of principally kinematic systems. We dealt with the proposal of gait for sidewinding movement of snake for ensuring maximal net motion.

Scheme of locomotion principle.
In this article, we show the locomotion on example of two-link snake-like robot. This snake belongs to different category—mixed systems; it has a different mathematical model and different way of creating its model. Here is used a different gait that generates the lateral movement of snake and we describe modes how the two-link snake moves only using one action variable.
Generalized mixed mechanical locomotion system
Generalized mixed locomotion system represents a simple mechanical system that has n-dimensional configuration space with trivial principal fiber bundle structure Q = G × M, where G is l-dimensional fiber space with Lie group structure and M is m-dimensional base (shape) space that is subjected to k nonholonomic constraints. These systems should apply the following: 1. Its Lagrangian consists only of kinetic energy
where M(q) is n × n mass matrix that defines metric bases on kinetic energy.
2. Nonholonomic constraints that act to mechanical system are expressed in Pfaffian form
where ω(q) is k × n matrix that describes nonholonomic constraints.
3. Lagrangian and nonholonomic constraints are G-invariant (with respect to actions of Lie group)
where Φg is action of Lie group to Q and TqΦg is lifted action on tangent bundle TQ.
4. Nonholonomic constraints are linearly independent, that is, none of nonholonomic constraints are a linear combination of other nonholonomic constraints. 7
In general, reduced motion equations of generalized mixed systems consist of three types of equation
Equation (6) is called as reconstruction equation and is used to solve body fiber velocities ξb (or word fiber velocities

Block diagram of reduced motion equations.
By defining other conditions to dimension of fiber and base subspace and number of nonholonomic constraints, we get subtypes of locomotion systems presented in the following table (Figure 3).

Subtypes of generalized mixed locomotion systems. 7
In this article, we will discuss one subtype of generalized mixed mechanical systems—the mixed mechanical system. We will show how to build the mathematical model (reduced motion equations) for chosen mechanical system (the two-link snake) and how to control the system by method of gait proposal.
Mixed mechanical locomotion system
Mixed mechanical locomotion systems that belong to generalized mixed locomotion systems apply the following: These systems have at least one nonholonomic constraint. They have maximally about one nonholonomic constraint less than the dimension of fiber space, that is, 0 < k < l, where l is the dimension of fiber space and k is the number of nonholonomic constraints. They are mechanical systems that do not have enough nonholonomic constraints to define span of group space.
7,8
The locomotion of two-link snake will be created by changing the angle size α1. The position and orientation of two-link snake in-plane is described using three fiber variables (x, y, θ) ∊ SE(2) and configuration space of snake has the form
This two-link snake (Figure 4) belongs according to the dimension of base space to the category of purely dynamic systems, because its base space is one-dimensional. But to build the reconstruction equation except nonholonomic constraints, we need to use also generalized momentum, because the number of nonholonomic constraints k = 2 is smaller than the dimension of fiber space l = 3. Because of this, the two-link snake is included to the category of mixed mechanical systems.

The simplified model of two-link snake.
Nonholonomic constraints and Lagrangian
In this section, we need to derive nonholonomic constraints and the Lagrangian of two-link snake and review their G-invariance.
For two-link snake, we have two nonholonomic constraints, which we derive using adjoint action. The body velocity of the mass center of the first link has the form
In order to calculate the body velocity of the second link in its center of mass, at first we have to determine the body velocity of the end of the first link as is shown in Figure 5 1

Showing of individual frames of two-link snake.
Other velocities are determined by the same manner
For the first and second links of snake, we have no-slip condition in the y-direction expressed in body coordinates
and these conditions can be rewritten into Pfaffian form
Using lifted action TeLg, these two nonholonomic constraints (16) and (17) can get the form in world coordinates
Nonholonomic constraints are not linearly dependent, that is, they are G-invariant.
The simplified shape of Lagrangian will be expressed with respect to coordinates x and y, taking into account the different lengths of links L and R, thus also weights mL and mR and the inertia of individual links JL and JR . Different lengths of links were chosen because of nonzero resulting torque after acting input variable in the joint as we can see in Figure 6. In the case of cyclic gaits with the same length of links, there would be no locomotion of the two-link snake because the resulting torque would be equal to zero.

Showing of propulsive force F and individual torques ML and MR acting to two-link snake.
The Lagrangian of snake has the form
and now we verify the G-invariance of Lagrangian using left action of Lie group Φg and lifted action TqΦg
After substituting Lie group and lifted action to the Lagrangian equation (21), we get the same form of Lagrangian, that is, Lagrangian is G-invariant
Reconstruction equation
When Lagrangian and nonholonomic constraints are G-invariant, then reduced Lagrangian and reduced nonholonomic constraints are expressed as 1,7
where I is the local form of locked inertia tensor in body coordinates, A is the local form of mechanical connection, and
Reduced Lagrangian for two-link snake is
At first, we must determine kinematic distribution Dq using nonholonomic constraints according to relation 9 –11
where a, b, and c are coefficients at group variables
The tangent bundle to the orbits of SE (2) action is given by
The intersection between tangent bundle to group orbits and distribution of constraints is section Sq (Figure 7)

The intersection between tangent bundle and distribution. 9
The nonholonomic momentum can be constructed by selecting section Sq that has the form as a bundle over Q. Because section Sq is one-dimensional, this section can be determined as
and is invariant under group action SE on Q. The nonholonomic momentum of two-link snake is 9
Nonholonomic constraints (16) and (17) and nonholonomic momentum (33) we express in Pfaffian form
and then we create the reconstruction equation of snake-like robot
where
Momentum evolution equation
In this part, we will express the equation describing momentum evolution. We get this equation based on relation 9
Because of simplifying momentum, we establish the new variable scaled momentum defined as 7
where f is the integrating factor of the first-order differential equation. Then, the momentum evolution equation has the following form
for our example
Thus, the reconstruction equation will have a new form
where
The final form of the reconstruction equation for two-link snake is
or expressed by world velocities
Representation of local connection using vector fields
The local connection A of snake is shown using vector fields in MATLAB because individual expressions of connection are complicated and do not provide insight into system behavior. We analyze shape of arrows of local connection with shape of generated gait that provides the locomotion of system. 12 –14 Individual parameters of snake links we get from SolidWorks are as follows: L = 0.162 m, R = 0.486 m, mL = 0.0526 kg, mR = 0.07488 kg, JL = 0.01022 kgm2, and JR = 0.0199 kgm2.
The gait ϕ that generates lateral movement of snake has the form
Angular rotation of joint we get by differentiating angular rotation according to time
After defining the form of gait, we can show gait to individual vector fields.
From the following figures, we can deduce how the snake will move in individual coordinates x, y, and θ. We proceed according to the following rules: When arrows of vector field Vector field of Arrows of vector field

The vector field of local connection

The vector field of local connection

The vector field of local connection
Now we express the reconstruction equation and momentum equation of two-link snake using block diagram (Figure 11) and show the courses of individual components during one period (Figure 12).

The block diagram of reconstruction equation expressed in the body velocities.

The courses of individual components.
In the following, Figure 13 shows the lateral movement of snake simulated in SolidWorks.

The lateral movement of snake with shown trajectory of mass center.
The distance that snake moves at lateral movement during one period is 83.86 mm where extension of the second link causes the increase in travelled distance. In the reverse configuration when the first link is longer than the second link, movement direction is reverse because the final momentum has a reverse orientation.
Height and gamma functions of two-link snake
The position change expressed in the body velocity for coordinates x, y, and θ is equal to the sum of geometric and dynamic phase shift 7,15,16
where
I
GEO is equal to the volume under functions that we call the height functions. These height functions are marked as
At gamma functions, we analyze the same features as at height functions, that is, symmetry, signs of areas, and limitlessness. In this case, the volume under gamma functions is meaningless, because the dynamic phase shift is time integral and no volume integral as in the case of geometric phase shift. 7
At first, we determine gamma functions for fiber directions x, y, and θ
and show them in MATLAB (Figures 14 to 16). These functions help us also to design gaits and show singular areas in the base space.

The gamma function G 1.

The gamma function G 2.

The gamma function G 3.
In the previous figures (Figures 14 and 16), we can see that the chosen gait guaranteed maximum shift in the direction of coordinate x but also θ since the individual courses are identical.
The position change in individual directions for two-link snake will be expressed only using the dynamic phase shift and these changes of position we get using the following relations
When we want to achieve the position change expressed in the world velocity, then it is sufficient to use the reconstruction equation of movement (44) expressed in the world velocities and proceed by the same manner.
Movement simulation of two-link snake at different modes
In the previous subchapters, we processed and confirmed the situation with validity of the following theorem: If lengths of links are different and time integrals of the base variable in both directions are the same (sinusoid represents that the course of the base variable has the same frequency during whole period), then the final phase shift is different from zero.
Now we confirm the situation by simulation the movement of the two-link snake in SolidWorks where it will apply: If lengths of links are the same and time integrals of the base variable in both directions are the same, then the final phase shift is equal to zero. The gait ϕ generating lateral movement of snake in this case will have the form as in equation (45). The distance travelled by snake at lateral movement during one period is zero, while the snake deflects only from one side to other side (Figure 17).

The lateral movement of snake with trajectory of mass center during some periods.
Finally, we confirm the situation: If lengths of links are the same and time integrals of the base variable in both directions are different, then the final phase shift is different from zero. The gait ϕ in this case will be (Figure 18)

The rotation angle α1 with shown half periods for lateral movement.
And then the rotation velocity is (Figure 19)

The rotation velocity
The travelled distance at this way of movement is 17.84 mm (Figure 20).

The lateral movement of snake at new form of gait.
Reduced base dynamic equation
In the previous subchapters, the case was solved where base velocities represented an ideal source of velocity, that is, at increasing load, the velocities had the constant course (Figure 21).

The load characteristics of velocity source.
Now we will consider the case when the base variable changes by the influence of load. The snake will be controlled by torque and therefore we should also use the reduced base dynamic equation (8) where its solutions are base variables. Then, these base variables we substitute to reconstruction equation and get fiber velocity
Matrix of reduced mass is determined according to relation 7
Then, the reduced dynamic equation has the form
Conclusion
The aim of the article is to show tools of geometric mechanics at creating the mathematical models. The main advantage of geometric mechanics compared with analytical mechanics (e.g. Lagrangian mechanics) is the mathematical model consisting of n − l second-order differential equations (reduced base dynamic equation) and l first-order differential equations (reconstruction equation), where at Lagrangian mechanics, we have n second-order differential equations and l first-order differential equations. The next advantage is showing of local connection by vector fields that help us at predicting movement of robotic systems. Geometric mechanics applies that the reconstruction equation does not influence the reduced base dynamic equation. We chose one type of generalized mixed locomotion systems. The two-link snake from category—mixed locomotion system was used as an example. For this system, a mathematical model consisting of the reconstruction equation and momentum equation where we considered action variable as ideal source of velocity was created. In this case, the reconstruction equation is no longer composed only of kinematic part but also of dynamic one. We simulated the movement of this system and presented height and gamma functions, where height functions are equal to zero because the base space is only one-dimensional. Finally, the reduced base dynamic equation for the case of controlling using torque was also determined.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The work has been accomplished under the research projects no. VEGA 1/0872/16 “Research of synthetic and biological inspired locomotion of mechatronic systems in rugged terrain.”
