Abstract
This work investigates locomotion efficiency optimization and adaptive path following of snake-like robots in a complex environment. To optimize the locomotion efficiency, it takes energy consumption and forward velocity into account to investigate the optimal locomotion parameters of snake-like robots controlled by a central pattern generator (CPG) controller. A cuckoo search (CS) algorithm is applied to optimize locomotion parameters of the robot for environments with variable fractions and obstacle distribution. An adaptive path following method is proposed to steer the snake-like robot forward and along a desired path. The efficiency and accuracy of the proposed path following method is researched. In addition, a control framework that includes a CPG network, a locomotion efficiency optimization algorithm, and an adaptive path following method is designed to control snake-like robots move in different environments. Simulation and experimental results are presented to illustrate the performance of the proposed locomotion optimization method and adaptive path following controller for snake-like robots in complexity terrains.
1. Introduction
Inspired by biological snakes, snake-like robots have received significant attention to take the place of human work in some special situations such as exploration, monitoring, and surveillance tasks [1]. Similar to the stability and flexibility of biological snakes, snake-like robots can be used in challenging environments [2].
Since the first snake-like robot was developed by Hirose in 1972, many researchers have developed many snake-like robots with different mechanisms. Some snake-like robots are configured with active joints and passive wheels such as robots in [3, 4]. Some snake robots are connected by some joints that can bend, lengthen, and shorten, such as robots in [5, 6]. Some snake-like robots are made up by active joints and active wheels, such as robots in [7, 8]. Some snake robots are consisted of active wheels and passive joints [9]. Some robots are combined by joints and crawlers [10].
Several control approaches for robots with many degrees of freedom (DOFs), such as quadruped robot and snake-like robot, have been proposed in literatures [11, 12]. In the past years, researchers find that the central pattern generator (CPG) inside the spinal cord could generate rhythmic locomotion without sensory feedback or regulation signals from brain [13]. Matsuoka was a pioneer of CPG research and he proposed the first practical model in 1987 [14]. In the past years, CPG was successfully used to control robots, especially in control for bionic robot such as snake-like robots [15]. Rhythmic locomotion, such as lateral undulation and sidewinding, can be controlled by a CPG network connected by neuron oscillators [16, 17]. In [18], a double-chain Hopf CPG network is used to control serpentine and sidewinding gaits of a snake robot. In [19], a unified neural oscillator network is researched to control three different types of locomotion by adjusting several parameters. Smooth transition and autonomous locomotion control methods are investigated in [20–22]. However, some important performances such as locomotion efficiency and path following accuracy of snake-like robots are not considered in these studies.
There are many studies aiming at analysing and optimizing the locomotion efficiency of snake-like robots. The extremely important problem that should be solved is the locomotion efficiency of robots. In [12], three different gaits of a snake-like robot are analysed based on its dynamic model. The tradeoff between locomotion speed and energy efficiency is studied for several gaits. In [23], the relationships among the gait parameters, energy consumption, and forward velocity of different gaits for underwater snake robots are investigated, and the most efficient motion pattern is selected by empirical rules according to simulations.
In [24], gait parameters are optimized to stabilize the head joint and speed of a snake-like robot. However, the energy efficiency is not taken into account. In [25], a genetic algorithm is adopted to select parameters of serpentine gait parameters for a snake robot, but other performances are not considered except the speed of the robot. In [26], forward speeds of amphibious snake-like robots are optimized by the Powell’s method. However, the frequency of locomotion is not taken into account in the optimization algorithm [26]. A framework is researched to optimize locomotion of underwater snake robots and their energy efficiencies are investigated in [27]. To the best of our knowledge, there is no general optimization framework for snake-like robots in a random environment with different fractions and obstacles.
To realize the practicability of snake-like robots in various tasks, their path following in unknown terrains has been researched. In [28], a dynamic feedback controller is proposed to control the orientation of a snake robot to a desired angle. The theoretical approaches are validated through experimental results in [29]. In [30], a planar snake-like robot can move forward and traverse the reference path with a desired velocity controlled by a feedback control strategy that enforces virtual constraints. In [31], path following of snake robots is researched by using approximate dynamic programming and neural networks.
Inspired by the path following control of vessels on the sea in [32, 33], an integral line of sight (LOS) path following controller is designed to control an underwater snake-like robot go along a straight line based on a dynamic model in [34]. However, some of its key parameters are chosen arbitrarily. It is thus difficult to realize efficient and accurate path following due to the mechanism complicacy and high degree of freedoms of snake-like robots.
In this work, a double-chain Hopf GPG is used to replace the sine function to generate joint reference functions to avoid sudden transition of locomotion. To reduce energy consumption and extend autonomous working hours of snake-like robots, optimization of locomotion efficiency is considered. The energy consumption and forward speed are taken into account to investigate the optimal gait parameters. To explore the effect factors of locomotion efficiency, we have conducted various simulations. The simulation results show that the frequency and amplitude of a CPG controller are relevant to the efficiency. To find the most efficient gait parameters combination of the Hopf CPG, a CS algorithm is used to find the optimal gait parameters for different environment. An adaptive path following approach is proposed to improve the accuracy and the efficiency of path following. The approach is used to control a snake-like robot following curves and straight lines in narrow spaces with disorderly obstacles. Position, direction and forward velocity, efficiency, and error accumulation of snake-like robots are taken into account in the control of path following. In addition, a control framework includes a Hopf CPG network, an exponentially stable controller, a locomotion efficiency optimization algorithm, and an adaptive path following method. This work also includes more accurate and detailed simulation and experiment results about efficiency optimization and adaptive path following in complex environments.
This paper is organized as follows. The mathematical model of a snake-like robot and a CPG network used in this paper are presented in Section 2. Relations among locomotion efficiency, gait parameters, and environment factors are studied and the locomotion efficiency is optimized by the CS algorithm in Section 3. An adaptive LOS path following controller is proposed in Section 4. Extensive simulations are conducted to verify the efficiency and accuracy of the proposed path following method in Section 5. Finally, Section 6 concludes the paper.
2. Mathematical Model
Mathematical model of snake-like robot has attracted much attention [34, 36, 37]. In this paper, we briefly present the mathematical model of a snake-like robot that will be used in efficiency optimization and path following control. Our control design is based on the model presented in [36].
2.1. Mathematical Model of Snake-Like Robot
As shown in Figure 1, the snake-like robot is connected by links. The head position is , orientation of link is , and pitch angle of joint is . The mass of a link is set as and the moment of inertia of a link is defined as . To simplify computation, the center of mass (CM) is assumed to locate at its center point. Other notations and equations of the mathematical model of the robot in this paper are the same as those in [36].

In this dynamic model, viscous friction is assumed to act only on the CM of a link. The friction act of link is calculated aswhere and are viscous fraction coefficients between links and the ground in the tangential and normal directions, respectively. In this paper, the snake-like robot is connected by 10 links, the length of a link is , and the mass of a link is . The ground is flat and fraction coefficients are and . The rotation matrix of link is defined asThe model can be written in the standard form of a control-affine system by defining , , , , and . Thus we havewhere and are computed byand matrices and are defined in [36].
The joint dynamics of a snake-like robot is given by . The new control input of the model is defined according to the exponentially stable joint controller: Reference joint angle of joint is defined aswhere is amplitude, is frequency of reference joint functions, and is the phase offset that affects the shape of a snake-like robot by changing the number of -shapes. The relation between the shape and can be given aswhere is the number of -shape in the horizontal plane and is the number of links.
However, actuators will be damaged if the snake-like robot is controlled by (7) directly when the reference function transits suddenly. To avoid jerky movements and physical damages of actuators, the CPG controller is applied to generate reference functions of joints.
2.2. Dynamic Model and Topological Structure of CPG Network
Some neural oscillator models were used to control the snake-like robots in recent years, such as Kuramoto oscillator model [38], Van Der Pol oscillator [16], and Hopf oscillator model [39]. However, the Kuramoto model needs big calculation and the Van Der Pol model converges slowly. Hence, the Hopf neural model is used to control a snake-like robot in this work due to its stability and fast convergence. The dynamics of a Hopf oscillator is given aswhere , is the radius of a limit cycle, is the convergence rate to the limit cycle, and decide the center of the limit cycle of the Hopf oscillator, and oscillate around and respectively, is a bifurcation parameter of the Hopf oscillator and in this paper, is accepted as the output signal, and the offset of the signals of is decided by . Solutions of and are sinusoidal in steady states. In this paper, notations and parameters of dynamics of the Hopf oscillator follow those in [35].
In this paper, the Hopf CPG network is connected by two series of Hopf oscillators. As shown in Figure 2, the left column (blue) and the right column (red) oscillators control horizontal and vertical movement snake-like robot, respectively. Parameters , , , and shown in Figure 2(a) are connection weights among neighboring oscillators, and in Figure 2(b) is the phase offset between two neighboring oscillators. The phase difference between horizontal and vertical oscillator is set as . Dynamics of the Hopf CPG network are given aswhere and are outputs of horizontal and vertical oscillators, respectively. and control the frequency and amplitude of the limit cycle. The rotation matrix is computed bywhere and are reference values of the yaw actuators and pitch actuators of joint . In this paper, reference angles of joint are computed by

(a)

(b)
As known from previous literatures, CPG signals change suddenly and discontinuously when parameters change abruptly. That leads to unstable locomotion and damage to motors of joints. Hence, we use the smooth gait transit method proposed in our previous work [35] to avoid sudden transition. The smooth transit function is defined aswhere amplitude and offset are computed aswhere and are predifined and desired values of , , and are the start and the end time of parameter changing.
3. Efficiency Optimization for Snake-Like Robots in Different Environments
As known from previous literatures [16–19], the Hopf CPG network is capable of controlling the rhythmic locomotion of snake-like robots. Nature snakes can always adjust their body shapes to move efficiently in different terrains. In order improve the adaptability of snake-like robots to complex environments, the lateral undulation locomotion with several combinations of CPG parameters and fractions is discussed. Herein, eight representative environments are investigated to obtain the efficient locomotion. Snake-like robots controlled by different CPG parameters are simulated to find out the connection between CPG parameters and robot locomotion efficiency.
3.1. Locomotion Efficiency Gait Parameters
To evaluate the locomotion efficiency of snake-like robots, we take their speed and energy consumption into account. To simplify the optimization objective, we compute locomotion efficiency as follows: where is the torque of the actuator of joint and is the distance of the snake-like robot moving in one period. is arbitrary time and , where is a period of locomotion. is the sum of squares of torques of all joints from to . It is the energy consumption in one period.
In this paper, different gaits are controlled by a Hopf CPG controller. The controller combined with the efficiency critic function (20) can generate uniform outputs with desired amplitudes and phase differences without additional adjustments.
To explore the relation between locomotion efficiency and parameters, locomotion controlled by different gait parameters in the same flat ground with tangential fraction and normal fraction is simulated. We simulate 12 proportional combinations of frequency and amplitude , and other parameters are constants. From the simulations results of Table 1, locomotion efficiency is affected by and of the CPG network. Thus, the relevant amplitude and frequency can be adjusted to obtain the efficient locomotion.
3.2. Locomotion Efficiency of Snake-Like Robots in Different Environments
Frictions in normal and tangential directions are important for lateral undulation of snake-like robots. To find out the relation between frictions and locomotion efficiency, we simulate eight different situations with the same locomotion parameters. In the eight situations, fractions in tangential and normal directions are set as (0.1, 0.3), (0.1, 0.4), (0.1, 0.5), (0.1, 1), (1, 3), (1, 4), (1, 5), and (1, 10), respectively. The first four situations are set with same friction coefficient in the tangential direction and increasing friction coefficient in the normal direction. The last four situations are set with ten times friction coefficient of the first four situations in tangential and normal directions.
As shown in Table 2, locomotion efficiencies are different in eight situations. It can be found that the efficiency is proportional to the fraction ratio . The locomotion efficiencies are similar to the same fraction .
Except for the fraction, a snake-like robot demonstrates different performances in different environments with different slop and different passable widths. As shown in Figure 3, a snake-like robot should transit body shape and locomotion flexibly to cross the cluttered environment covered with obstacles. The optimized efficiency locomotion parameters are selected from computing a large number of combinations of locomotion parameters. However, the optimized velocity is slow and the computation is too complex. It is necessary and significant to take advantage of an intelligent optimization algorithm to optimize parameters fast when we face a complex environment.

3.3. Parameter Optimization Using CS Algorithm
Traditional parameter selection method selects desired parameters by comparing all combinations of the amplitude and the frequency in the allowed ranges. To optimize the locomotion parameters fast and effectively, the CS algorithm [40–42] is used to explore the suitable optimal amplitude and frequency while the snake-like robot is moving in a new environment. The optimization algorithm used in this research is inspired by the obligate brood parasitic behaviour of some cuckoo species in combination with the flights behaviour of some fruit flies. The optimization objection is maximized locomotion efficiency in (20), to given ranges of these parameters.
As shown in Figure 3, the width of the whole-shape of a snake-like robot should be less than the width of a passable path. The amplitude of the whole-shape is decided by the width of a path, and is relevant to in (7). The ranges of should be derived according to the width of passable path to guarantee that snake-like robot to crosses a passable path without colliding obstacles on both sides of the latter.
In order to guarantee the constringency of searching, the optimal individual retention method is accepted in the CS algorithm. New values of our interested parameters are searched by using the CS algorithm aswhere and is the step size, which is related to the scales of the optimization problems and should be greater than zero.
In this paper, is set just according to the scale of amplitude to reduce the computation complexity since the values of and are approximate. is computed by . The product means the entry wise multiplication of two vectors. The step length of Ley flight is computed by a Ley distribution: while the Ley distribution has an infinite variance with an infinite mean.
4. Adaptive LOS Path Following Control
To optimize the accuracy and efficiency of path following of a snake-like robot executing special tasks in a narrow space, we propose an adaptive path following control scheme. As shown in Figure 4, an adaptive control frame is formed by a CPG locomotion generator, a direction controller based on the adaptive LOS guidance law, locomotion regulator, and an energy efficiency critic component. A closed-loop control scheme based on the LOS law and the efficiency critic element is summarized to adjust the locomotion of a snake-like robot adaptively according to energy efficiency in different terrains. In the control scheme, information of environment including fractions and slop is measured by sensors, and appropriate locomotion parameters including and are selected by using the CS algorithm according to efficiency. The selected locomotion parameters are transported to the CPG network that generates reference swing angles of joints, and torques of actuators of the robot are computed by the exponentially stable controller as (6). The modules of the control scheme are presented in above sections.

4.1. LOS Guidance Law
In this paper, a LOS guidance law is applied to the curve path following of a snake-like robot. As shown in Figure 5, the tangent line of a reference path at point which is the nearest point to the CM of a snake-like robot is the desired path. The distance from the CM of a robot to is defined as , which corresponds to the cross track error, and the direction angle of the snake-like robot is represented by .

The path following control objective is to control a snake-like robot to converge to a reference path and subsequently move along the path at nonzero forward velocity. The objectives of path following can be formalized aswhere is an analytic function of a reference path. Snake-like robots cannot track a reference path flawlessly due to the oscillatory gait pattern. Our control objectives imply that the CM snake-like robot can have steady state oscillation around the reference path.
In this section we study LOS path-following control for snake-like robots as shown in Figure 5. Their reference orientation is computed using the LOS guidance law aswhere is the look-ahead distance that influences the convergence rate to the desired path, is the position of the CM of the robot, and is the nearest point in the reference path to the CM of the robot. As known from Section 2, the direction of the robot can be controlled by phase offset . Therefore, we can steer the heading direction according to the LOS angle in (26), and the joint angle offset is computed aswhere controller gain and heading direction are
4.2. Adaptive Path Following Based on LOS
Previous studies on path following of snake-like robots have focused on undulation locomotion with constant gait parameters in a stable environment, and gain in (29) and look-head distance in (26) are fixed. The error accumulation and the energy efficiency of path following are not to be considered. Although snake-like robots can follow reference paths in a stable environment, it is hard to guarantee their path following performances of in complex environments especially when they face some uncertain factors such as fractions and distribution of obstacles.
To adapt to complex environments, this work proposes an adaptive path following approach for snake-like robots. In this path follow approach, gain and look-ahead distance are adjusted adaptively according to the relation between their position and orientation. To control them to follow desired paths accurately and efficiently in different situations, we analyse their characteristics when they move in eight situations. Taking an example of following reference path , it can be divided into eight typical different situations according to the relative position of their CM to the reference path and the difference value between and as shown in Figure 6.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)
After analysing these situations, we find that several factors are influential to values of and including the difference between the CM of a robot and the reference path and difference between and . Taking these influential factors into account, adaptive parameters and are computed bywhere and are initial values of and and and are constants that influence the amplitude of oscillation of a snake-like robot around the reference path. These parameters can be adjusted according to width and the requirements of following accuracy. In this paper, parameters are set as , , , , , , , , , , and .
Energy efficiency and error accumulation are taken into account beside the control objectives (26)-(28). The oscillation of a snake-like robot around the reference path is also considered. The error accumulation can be computed as
5. Evaluation
To test the performance of the locomotion efficiency optimization method proposed in Section 3 and the adaptive LOS path following control scheme described in Section 4, we have conducted extensive simulations. The dynamic model and parameters of a locomotion controller of a snake-like robot are set in Section 2, and the reference angles of active joints are generated by the CPG network as described in Section 3.
5.1. Locomotion Efficiency Optimization in Complex Environment
In this simulation, the locomotion parameters of a snake-like robot in a complex environment are optimized by the CS algorithm. The parameters of the robot and control parameters are the same as before. When the robot moves in a new environment, the ground fraction is measured and the scales of amplitude and frequency are derived according to the space width. Then, the optimal combination of and is selected via the CS algorithm. The step size is and in the CS algorithm. As shown in Table 3, gait parameters of the robot are optimized by the CS algorithm in eight situations with different fractions. As shown in Figure 7, the gait parameters of the robot are selected by the combination method that chooses combinations of amplitude and frequency at random, where and . Compared with random combination method, the CS algorithm improves the accuracy and the speed of parameter optimization.

5.2. Adaptive Path Following of the Snake-Like Robot
The simulation is actualized in Matlab R2016b in a computer running Windows 10. The dynamics model is computed by the ode45 solver with a relative and absolute error tolerance of . The model is simulated with the controller given by (6), and controller gains are and . Reference angles of joints are computed by (7) and gait parameters are set as , , and .
Using the proposed path following method in Section 4, a snake-like robot is controlled to follow the reference path including a horizontal straight line and a sine curve. As shown in Figure 8, snake-like robot controlled by our approach moves forward and along with the horizontal line more accurately compared with using the LOS path following method. As shown in the Figure 8(b), the error accumulation is reduced with the adaptive path following method proposed in this paper. As shown in Figure 8(c), the efficiency of the robot controlled by proposed the method is predominant compared with the traditional LOS path following method. As shown in Figure 9, snake-like robot controlled by our approach moves forward and along with the sine curve path more accurately compared with using the classical LOS path following method. As shown in the Figure 9(b), the error accumulation is reduced with the adaptive path following method proposed in this paper. As shown in Figure 9(c), the efficiency of the robot controlled by proposed the method is predominant compared with the traditional LOS path following method. The simulation results are proposed to show that the position of the robot converges nicely to the reference horizontal straight line and sine curve paths.

(a)

(b)

(c)

(a)

(b)

(c)
To verify the proposed method, a simulator is implemented in Virtual Robot Experimentation Platform (V-REP EDU Version), as shown in Figure 10. In the simulation, we modify the structure and control method based on the model of University of Castilla la Mancha. We equip a pair of passive wheels for each link to realize anisotropic friction between the robot and the ground. The actuators are installed on the horizontal and vertical joints to imitate natural snakes swinging from side to side. Inside V-REP, we choose the bullet as the physics engines and set the time step at 50ms. The locomotion parameter optimization and adaptive path following methods are used in this simulation. The sine transition method is used to avoid sudden changes while locomotion parameters adjusting. As shown in Figure 10, there are some irregular obstacles in the environment and the robot through different-width paths adaptively by adjusting locomotion parameters. As shown in Figure 10(a), the passable path is narrow and the amplitude of the robot is small. The amplitude of the robot is transited adaptively according to the width of path, as shown in Figures 10(b) and 10(c).

(a)

(b)

(c)

(d)
Extensive prototype experiments are conducted to demonstrate that our method can adjust locomotion parameters adaptively and steer a snake-like robot toward and along the desired path. Our snake-like robot is connected by five pitch modules and five yaw modules. Each module is equipped with a steering gear (SC5115). The steering gear can rotate between and the angles of steering gears can be read by their potentiometers. Modules communicate with each other via RS485 bus. To increase surface friction, our snake-like robot is covered with plastic sheeting. As shown in Figure 11, the snake-like robot adjusts its body shape adaptively while moving across the narrow path with some irregular obstacles on both sides. As shown in Figure 11(a), the path in front of the robot is complex and distributed with some irregular obstacles on sides, and widths of path is different. As shown in Figure 11(b), the path is narrow and the robot moves toward with a small amplitude. As shown in Figure 11(c), the path is wider and the robot adjusts amplitude according to the path and selects corresponding frequency optimized energy efficiency. As shown in Figure 11(d), the path becomes narrow and the robot reduces the amplitude and selects efficient frequency. In this experiment, the robot can be controlled to go toward and along the desired horizontal line in the middle of the road and keep efficient locomotion using parameters according to paths and optimized by the CS algorithm.

(a)

(b)

(c)

(d)
6. Conclusion and Future Works
In this paper, a Hopf CPG network is used to replace the serpentine function to generate reference functions of joints of a snake-like robot to improve the smooth degree of control signal. To improve the energy efficiency of such robots in different environment, a CS algorithm is used to optimize locomotion parameters of the Hopf CPG network. An adaptive path following controller based on the improved LOS guidance law is designed to improve the adaptability of the robot to a complex environment with variable fractions and path widths. The adaptive LOS path following law is combined with a locomotion efficiency optimization system and CPG controller to steer the robot to the reference path accurately and efficiently. Simulation and experimental results show that the proposed methods optimize robot locomotion efficiency and steer the robot moving along with desired paths including straight and curve paths.
As for future work, we will equip more sensors on the snake-like robot and intend to study adaptive control and multiobjective locomotion optimization of the robot for more complex environment. In particular, the proposed adaptive efficiency optimization and path following control approach will be used to other 3-D gaits of snake-like robots.
Data Availability
Some key codes and dates of my paper can be accessed by https://github.com/zhang3dong/Adaptive-path-following-of-snake-like-robots.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work is supported by the National Natural Science Foundation of China (Grant nos. 51575034, 91748102, and 91848103), State Key Laboratory of Robotics (2018-O15), and State Key Laboratory of Digital Manufacturing Equipment and Technology (DMETKF2018021).
Supplementary Materials
The supplementary video includes simulation and prototype experiment of our snake-like robot moves in a complex environment controlled by methods proposed in this paper. (Supplementary Materials)