Analysis of worm-like locomotion

Nature is a storehouse of great ideas, which are mostly so well planned, that engineers can apply them directly via examining, understanding and imitating the natural working principles. Snakes and worms can be found in almost every region of our planet. Their success is mainly based on the simple construction of their body and their robust locomotion technique. Snakes and worms move their body periodically, to generate propulsive force and get forward, using the interaction with the surrounding environment. The aim of this work is the analysis of a particular worm-like locomotion technique through numerical simulations. The worm is modeled by a multibody system containing lumped masses constrained to each other by ideal rigid rods. The periodic motion of the worm body is achieved via the use of an artificial muscle-like actuator system. The results and experiences can be exploited in future work when a worm-like robot will be built for exploration and rescue purposes.


Introduction
Limbless animals, like snakes, worms and caterpillars, are present in almost every region of Earth because of the expediency of their body and locomotion technique.Their locomotion technique is based on the periodic movement of their body.Their only need to get forward is some contact force arising from the environment, so they can move on the ground, under the ground, or even in fluids.Their flexible body makes them proper to accept heavy terrains.This section describes a possible sorting of worm-like locomotion techniques, and summarizes the main characteristics of autonomous and undulatory locomotion based on the literature [1][2][3][4][5].

Different types of worm-like locomotion techniques
The locomotion of limbless animals seems to be very similar, but if we inspect them better, several distinguishable variants of the motion techniques can be recognized [2,5].The following sorting of locomotion technique of limbless animals (see Fig. 1) is not a biologically correct sorting but it can be used well for engineering considerations.
1 Worm movement: This locomotion technique is based on the periodic alteration of the diameter and the length of the body (peristaltic), when a waveform travels along the worm body opposite to the direction of locomotion.This locomotion strategy is very efficient in narrow spaces (e.g., below the ground), because the deformation of the diameter is negligible from the viewpoint of space demand, and the main deformation is the length alteration, which generates a propulsive force to move the worm forward (see Fig. 1a.) 2 Caterpillar movement: The locomotion of the caterpillar can be divided into four different stages.Let us consider the distended status of the caterpillar as initial status, when both endpoints grasps the ground.In the second stage the creature forms a wave, so its rear endpoint moves and then it grasps the ground.In the fourth stage the frontal part moves, and finally the caterpillar gets to the initial status again, but in a farther location.An essential feature of this motion technique is that the worm clamps the ground with its frontal part, rear 3 Snake movement: Snakes perform quite complex three dimensional wriggling movement on the surface of the ground.
The structure of the scales on their skin is very important because of the anisotropic friction coefficient.The arising friction force propulses them forward.(Fig. 1c.) In this work we focus on a mixture of the above explained locomotion techniques as it is explained in section 2.

Autonomous motion systems, locomotion
Our purpose is to examine an efficient worm-like locomotion system.Thus we cannot go on until we determine what is locomotion.The proper definition of locomotion seems to be simple to provide, but its exact mathematical definition needs thorough theoretical background.Most of the existing definitions agree that locomotion is something about the displacement of the center of gravity, because this specific point can describe the position of a system quite well.But from the viewpoint of the source of displacement and the sorting of locomotion systems, there are several variants.
Based on the work of J. Steigenberger [6] we obtained the definition of locomotion, and classified our worm model in the family of locomotion systems.According to his work [6] our worm model belongs to the autonomous locomotion systems because it has internal drives, explained in section 2.4, and during the time of the locomotion (t 0 , t 0 + T ) there are only non-driving external forces.Furthermore, neither the center of mass nor any material point remains fixed or runs a cycle in space on that time interval.The non-driving external force is the contact force between the contact points of the worm and the ground.We use only periodic internal drives, thus the locomotion of our wormmodel is undulatory locomotion according to [6].
2 Mechanical model Fig. 2. shows the planar mechanical model of a simple worm-like system.The model consists of lumped masses P i ; i = 1..N with mass m, connected to each other through N − 1 ideal rigid rods without inertia.The modeling of the contact with the ground, the bending stiffness and actuation of the worm body are detailed in the subsequent sections.

Parametrization
Because of the complexity of the mechanical system, we apply redundant set of coordinates, which is widely used in case of multibody systems [7].We choose more system coordinates (non-minimum set of descriptor coordinates) than degrees of freedom (DoF) and we introduce geometric constraints, thus these coordinates are dependent.The Cartesian coordinates of lumped masses can be arrayed in the descriptor coordinate vector q: The dynamical model can be written in the form of a differentialalgebraic equation (DAE), which is adopted from [7]: where M(q) ∈ R 2N×2N is the positive definite mass matrix, C(q, q, t) ∈ R 2N is the vector of forces arising partly from the dynamics of the system (in general, it can include Coriolis or centrifugal terms) and from active forces (springs, dampers and time dependent terms arising from the actuation).Q(q) ∈ R 2N is the vector of gravitational forces.The matrix ϕ ϕ ϕ q (q) = ∂ϕ ϕ ϕ(q)/∂q ∈ R (N−1)×2N is the constraint Jacobian associated with the geometric constraint vector ϕ ϕ ϕ(q) ∈ R (N−1) .λ λ λ is the vector of Lagrange multipliers associated with ϕ ϕ ϕ(q).

Constraints
The geometric constraint equation (3) represents the constant length L i of the rigid rods connecting the lumped masses.For the sake of simplicity, the geometric constraints are considered to be scleronomic, this means that the length L i of each rod is constant.However, it would be possible to vary the lengths in order to achieve lengthwise actuation.The geometric constraint vector is the following: The constraint Jacobian ϕ ϕ ϕ q (q) can be algorithmically computed in closed form.

Stiffness and damping added to the worm body
For the realistic behavior of the model, some stiffness and damping need to be added to the chain-like model.We define an integrated torsional stiffness and torsional damper element, which produce the torque: where k is the torsional stiffness and b is the damping parameter and ψ i is the relative angle of two neighboring rods as shown on Figure 3 and 5a.After the calculation of τ i the problem is its representation in terms of the dependent coordinates q defined in (1).In planar cases, a torque can be replaced by an equivalent pair of forces, F and −F, of equal magnitude and opposite directions [7].Applying this, the torque τ i acting on rod i and i − 1 can be substituted by forces as Fig. 3. shows.The derived generalized forces are included in matrix C of the equation of motion (2).To compute the torque, ψ i has to be defined.It would be easy to calculate from the following formula, as [7] recommends: with | r i−1 |= L and | r i |= L. Angle ψ i can be calculated by the arccos() function.However, this function is interpreted in the interval [−1, 1] and, because of the numerical rounding problems, the simulations often result values out of this range and the calculation fails.A possible solution is the use of the atan2 function as follows where atan2 is the two-argument variation of the arctangent function and avoid the problem of division by a small number.Equation (7) gives the four quadrant arctangent of the arguments r i,ξ and r i,ζ .Here, r i,ξ and r i,ζ are the ξ and ζ direction components of r i respectively.To get components ξ and ζ we need to create the rotation matrix R i which rotates r i−1 into the local coordinate system (ξ; ζ) from the global system (x; z).R i can be created from the direction and normal vector of r i−1 : To calculate the torque according to equation ( 5), the angular velocity ψi has to be known as well.This can be done using the correlation of the velocity between points P i and P i+1 : where ω ω ω i = [0 0 φi ] T is the angular velocity vector, and ϕ i is the absolute angle of the rod, connecting point P i to P i+1 , measured from the horizontal direction, as it is shown in Fig. 3. From equation ( 9) the angular velocity φi of each rod is expressible, and from this we can obtain the relative angular velocity ψi = φi − φi−1 .This calculation method is a little bit more complex, when the distance of the neighboring points P i−1 and P i is not constant, but time dependent.To generalize the previous calculation for time dependent (rheonomic) geometric constraints, equation ( 9) can be rewritten in the following form: Using equation (10) for the calculation of the relative angular velocity, we can implement the mechanical model with time dependent rod length L i (t).Also, the modeling of peristaltic movements needs the time variability of the rod lengths.

Actuation of the worm
The worm locomotion is achieved by the periodic motion of its body, and this periodic motion is generated by periodic internal drives.We mimic artificial muscles between the neighboring segments, and this causes the motion of the worm.The effect of the artificial muscle is simply achieved by offsetting the intensioned angle of the torsional springs with a pre-defined value ψ 0 i .This working principle is similar to the real skeletal muscles [8].The design and the representation of angle ψ 0 i set by a servo motor can be seen in Fig. 5b.The offset ψ 0 i of the intensioned angle modifies the torque arising form the torsional spring and damper: τi where ψ 0 i is given by a pre-defined periodic control function of time t and segment index i as: where A is the amplitude of the offset, ω is the angular frequency, ϑ is the phase shift.We can pre-stress the springs with arbitrary periodic control function (e.g., sine waves).With proper magnitude and phase of the periodic control function (12) the worm takes up wave form and the periodically stresses and relaxes the torsional springs, which generates a moving wave along the worm body.In appropriate conditions the moving wave propulses the worm forward as it can be seen on Fig. 4.

Contact with the ground
As we mentioned in section 1.2, the contact with the environment is essential in case of autonomous locomotion systems.We only consider the contact with plane, horizontal surface with Coulomb friction.
One possible approach for the handling of the contact between the ground and the particles of the worm is to calculate the impulsive dynamics related to the impact between the particles and the ground.In this approach the equation of motion of a general dynamical system M q + C(q, q) = f can be reformulated for the case of the impulsive dynamics as M( q+ − q− ) = I f .Using this equation the velocity q+ after the impact can be calculated, if we suppose that the velocity q− before the impact and the impulse I f of the external forces are given.
Instead of the above explained method, we consider finite dynamical modeling approach.The contact force can be split into two parts; the normal component F g,i is originated from the elastic connection of each particle and the ground, the tangent component F f,i is the friction force.This friction force propulses the locomotion system forward.The free body diagram (F.B.D.) of one lumped mass and the ground is shown in Fig. 5c, where K i and K i+1 are constraint forces transmitted by the rods.The elastic connection is modeled with spring k g and damping element b g in the ground.
When the lumped mass contacts the ground, the normal component of the contact force F g,i is computed for every lumped mass from the governing equation of the Kelvin-Voigt element: The connection is interrupted in the simulation every time when the F g,i has sign reversal.The friction force is calculated as F f,i = µF g,i sgn( ẋi ); ẋi 0 and it is checked in every time step if adherence has occurred.If so, an event handling is called and coefficient of static friction µ 0 is used.

Numerical simulation
We used the hyper-matrix form of the Lagrangian equation of the first kind [7] to solve the equation of motion ( 2) and ( 3), because the submatrices can be derived in closed form.In order to transform the differential algebraic system (2) and (3) into ODE form, we need to differentiate the constraint equation ( 3) twice with respect to the time: Expressing the acceleration of the system coordinates q from φ ϕ ϕ = 0 (see ( 15)), the hyper-matrix form of the Lagrangian equation can be formulated as: Simulating the worm numerically, we may observe that the solution of the equation of motion ( 16) is numerically unstable.This is caused by the aggregation of the numerical rounding errors.In Fig. 6 it can be seen that the simulation of two lumped masses connected with a rigid rod can become unstable, because the constraint equation expressed on the acceleration level (15) satisfies the original constraint equation ( 4) only with quickly growing numerical error (see Fig. 6c).To solve this problem we used the Baumgarte stabilization method, which complements (15) with two stabilization terms [9]: The resulting system can be considered as a 1DoF damped oscillatory system (Fig. 6b.), which can hold the error between a given range like a PD controller as it can be seen in Fig. 6c.With the Baumgarte stabilization, (16) takes the following form: The proper choice of the parameters α and β is very important.A wrong parameter set can cause that the stabilized system is far away from the original mechanical system behavior, or it still remains unstable.We follow the recommendation of [10] for choosing a stable parameter set.

Optimization
The aim of the optimization is to gain a proper parameter set that allows us to build a feasible prototype for experiments.Naturally, the speed of the worm is to be maximized. Period.Polytech.Mech.Eng.

62
Zoltán Juhász, Ambrus Zelei To determine an effective locomotion of the worm-model within the engineering optimum, we used two different methods to optimize the parameters of the worm-model.The model has many parameters for example: the mass m, the number of the lumped masses N, the damping b and stiffness k of the torsional elements and the four parameters A, ω, ϑ, c of the control wave of the artificial muscles (12) explained in section 2.4.According to structural considerations, the mass and the number of the lumped masses is fixed, and the parameters of the ground are set to be realistic.Hence, we inspect 5 parameters with simply scanning a certain range of parameters.This method is based on the subdivision of chosen parameter ranges and the calculation of all the possible combinations of the discrete parameter values.After this procedure, 5 dimensional parameter diagrams can be drawn, and the observation of the global effect of the parameter changes is possible, so the range of parameters can be tighten.We also tried mathematical optimization functions (fsolve, fminsearch) built in the Matlab Optimization Toolkit.With these functions we have done a constrained optimum searching.All methods resulted the same parameter values.
Simulating the behavior of the model with the resulting pa-rameter set, it could be observed that the system starts with a large transient oscillation.Therefore, we multiplied the control wave (12) with the following function of time: Due to this, the control torques are slowly rising at the beginning of the simulation.With this new control wave, after a final optimization step we get a much better locomotion characteristic with the following parameters:

Conclusion
After inspecting the behavior of limbless animals, a model of an autonomous worm-like locomotion system has been developed.The advantage of the model is that it is quite simple and contains only lumped masses and rigid rods, so the equation of motion can be generated in closed form with the proper algorithms.Because of the algorithmic derivation of equations of motion, the generalization of the model to be spatial is straightforward.
The contact of the lumped masses with the ground was modeled considering two phenomenon: the dry friction and the elastic behavior.With this, the impulsive dynamics related to the impact between the particles of the model and the ground is considered and simulated as finite dynamics.
For the sake of simplicity, the geometric constraints are considered to be scleronomic, but deduction of the mathematical model can be generalized for explicitly time dependent geometric constraints, too.
In this work two optimization methods were applied, and an optimal and feasible parameter set was determined for the control with an artificial-muscle-like actuator system.
To sum up, the worm-like movement was successfully simulated and optimized with a multybody model.In future works, testing of other control techniques, like peristaltic, or direct torque driving will be studied.Finally, a prototype is planned to be built.

Fig. 3 .
Fig. 3.The angle of neighboring rods, and the force from stiffness and damping