Abstract
Although quite a few central pattern generator controllers have been developed to regulate the locomotion of terrestrial bionic robots, few studies have been conducted on the central pattern generator control technique for amphibious robots crawling on complex terrains. The present article proposes a central pattern generator and feedforward neural network-based self-adaptive gait control method for a crab-like robot locomoting on complex terrain under two reflex mechanisms. In detail, two nonlinear ordinary differential equations are presented at first to model a Hopf oscillator with limit cycle effects. Having Hopf oscillators as the basic units, a central pattern generator system is proposed for the waveform-gait control of the crab-like robot. A tri-layer feedforward neural network is then constructed to establish the one-to-one mapping between the central pattern generator rhythmic signals and the joint angles. Based on the central pattern generator system and feedforward neural network, two reflex mechanisms are put forward to realize self-adaptive gait control on complex terrains. Finally, experiments with the crab-like robot are performed to verify the waveform-gait generation and transition performances and the self-adaptive locomotion capability on uneven ground.
Keywords
Introduction
Central pattern generator (CPG) is a biological concept that represents the neural networks, which spontaneously generate the rhythmic movements for both invertebrate and vertebrate animals, such as breathing, chewing, swallowing, digesting, and walking. 1 Because the rhythmic oscillation of CPGs depends on the internal information inside neurons and the interconnection information among neurons, the cyclic movements can be produced under the support of only very simple and nonrhythmic input signals or even without the help of sensory feedback. 2 The biological CPGs are a system of distributed neural networks. Thus, they can provide distributed control for rhythmic activities and gait transitions such as the switches from walk to trot and then to gallop. 3,4 Four types of main biological CPG models have been proposed in the past years, 2 including the coupled nonlinear oscillator models, 5 the neuron-based biophysical models, 6 the simplified neuron-based connectionist models, 7 and the neuromechanical models. 8
In the past years, CPGs have been acting as a bridge that connects the biology and robotics together. In fact, most locomotion of robots is also rhythmic, thus the concept of CPG has been extended into the field of robotics to construct artificial neural networks that produce the biologically inspired rhythmic gaits of the robotic body, legs, and/or arms. 3,4 Artificial CPGs, as a type of new technology, are more robust than the conventional model-based and behavior-based methods in robotic locomotion controlling, because CPGs always have the limit cycle behavior, which can rapidly generate stable rhythmic patterns even after a transient perturbation. Therefore, the studies on artificial CPGs have been an active subject in the field of robotic locomotion controlling. The abovementioned CPG models have been generalized to control the locomotion of various robots. Ijspeert et al. 9 presented a spinal cord model for an amphibious salamander robot and realized the transition from swimming to walking. Kimura et al. 10 designed a CPG neural system to make a quadruped robot walk stably on irregular terrain in an outdoor environment. Wu and Ma 11 realized the creeping locomotion of a snake-like robot adaptive to environment change by the method of CPG controlling. Santos and Matos 12 developed a CPG controller that can generate omnidirectional locomotion for the quadruped Artificial Intelligence Robot (AIBO) platform through the coupling between the swing and flap oscillators. Nor and Ma 13 proposed a CPG-based locomotion control method that can produce a smooth transition of the body shape of a snake-like robot. Using the CPG method, Vonasek et al. 14 put forward a novel high-level motion planning technique for modular robots operating in rough terrain. Tutsoy 15 applied the CPG-based reinforcement learning algorithm to keep a robot leg at upright balance. Yang 16 presented a graph theory and path matrix-based unified method to generate the CPG network for different configurations of an underwater self-reconfigurable robot. Li et al. 17 put forth a new controller algorithm based on CPG-zero moment point to realize the smooth gait planning and stability control for a quadruped robot.
Among the abovementioned four types of biological CPGs, the most widely used type in robotic movement controlling is the coupled nonlinear oscillator, CPG. A large number of oscillator-based robotic CPG models have been constructed in these years. 18 –22 Grzelczyk et al. 23 investigated the prototype, control system architecture, and controlling of the hexapod legs with the CPG oscillator describing the nonlinear stick-slip-induced vibrations. Cristiano et al. 24 put forth a new control strategy for phase resetting of the rhythmic signals generated by CPG networks based on Matsuoka’s oscillator and applied it in locomotion control of a biped robot. Using Matsuoka’s neural oscillators as the basic units, Chung et al. 25 proposed a new dual-CPG architecture for the adaptive gait control of the hexapod moving in complex terrains. Tran et al. 26 presented a novel CPG model for controlling quadruped walking robots using new oscillators that are constructed on a recurrent neural network. Huang et al. 27 constructed a hierarchical CPG structure for 3-D walking control, where a main oscillator was used to adjust other oscillators. Ajallooeian et al. 28 designed an alternation-based CPG model to control the multidimensional robotic trajectory generation by altering the behavior of an oscillator through two nonlinear maps.
Although so many oscillator-based robotic CPG models have been constructed, most of them can be traced back to either the model of Matsuoka or that of Kimura. Matsuoka 29,30 first presented a CPG using a network of oscillators with mutually inhibitory and excitatory connections. The output waveforms of the Matsuoka CPG are determined by not only the inner parameters of each oscillator but also their connection weights. By introducing several additional reflex feedbacks, Kimura et al. 10 and Fukuoka et al. 31 improved the functions of the Matsuoka oscillators and then proposed a CPG model that consists of a network of oscillators. The validity and accuracy of the Kimura CPG model were verified by some successful gait control experiments on a quadruped robot named Tekken. Besides the Matsuoka and Kimura oscillators, the Hopf and phase oscillators are also frequently used in robotic movement control. 32 –34 In this aspect, the Hopf oscillators have three advantages. 26 Firstly, the output waveforms always have harmonic sine/cosine shapes, which are insensitive to the changes of the inner parameters. Secondly, the swing phases and stance phases of the robotic legs can be independently controlled. Thirdly, because the amplitude and frequency are independent from each other, they are suitable for applications in higher level controllers. The advantage of the phase oscillators is that they can always produce stable phase entrainments because they only contain the phase transition information of the robotic locomotion. 35
Now, most CPG controllers have been developed to regulate the locomotion of terrestrial bionic robots. Few studies have been conducted to apply the CPG technique in the locomotion control of amphibious robots. In order to mimic fish-like undulating propulsion, Ding et al. 21 and Yu et al. 36 designed a CPG-based control architecture consisting of coupled oscillators and successfully used it to control the swimming gaits of an amphibious robot propelled by modular fish-like propelling units and a pair of hybrid wheel-propeller-fin mechanisms. In order to control the manipulation of a multi-link amphibious robot in extreme environments, Matsuo et al. 37 proposed a CPG-based biomimetic neural system that is sufficiently robust and strong to cope with disturbance and breakdowns. Ijspeert and Crespi 38,39 presented a locomotion controller based on the biological concept of CPGs together with a gradient-free optimization method and employed it to optimize the gait of an amphibious snake/lamprey robot online. To the best of our knowledge, only the abovementioned articles have devoted to the CPG controlling of amphibious robots. The existing CPG-based gait controlling methods in this field have two insufficiencies. First, recurrent neural networks are used in the existing CPG systems and this generally leads to low execution efficiency due to the recurrent treatment of the controlling signals. Second, obstacles are not considered, 37 –39 or, although obstacles are considered, the obstacle-surmounting methods are not clearly described. 21,36 In the present work, a CPG-based self-adaptive gait controlling method is proposed for a crab-like robot locomoting on complex terrain. Compared with the existing articles, the present article has two novelties: (a) a more efficient feedforward neural network (FFNN), rather than the conventional recurrent one, is constructed and incorporated into the CPG system, and (b) two new reflex mechanisms are proposed for the self-adaptive gait control of the crab-like robot on complex terrain with obstacles. The whole article is organized as follows. Section “The Hopf oscillator” presents the theoretical model for a Hopf oscillator. Section “Hopf oscillator-based CPG system for a crab-like robot” constructs a CPG system for the crab-like robot. Section “Feedforward neural network” presents an FFNN to map the CPG signals with the joint angles. Section “Two reflex mechanisms for self-adaptive gait control on complex terrains” proposes two new reflex mechanisms for self-adaptive control on complex terrains. Section “Experiments” performs some experiments. Section “Concluding remarks and future work” concludes the present work.
The Hopf oscillator
Because they are insensitive to environmental perturbations, the Hopf oscillators always have stable limit cycles. In addition, the frequencies and amplitudes of the output signals of Hopf oscillators can be independently modulated. These properties make Hopf oscillators applicable for the locomotion control of mobile robots. In this section, they are employed to construct the CPG controller for a crab-like robot.
Theoretical model and limit cycle behavior
As shown in Figure 1, each Hopf oscillator consists of two linearly coupled neurons, one being the excitatory neuron and the other the inhibitory one. Each neuron is subjected to the nonlinear self-feedback, the external feedback, and the regulatory signals.

The model of a Hopf oscillator.
The oscillator shown in Figure 1 can be formulated as
where
Equation (1) is a system of nonlinear ordinary differential equations, which can be numerically solved using the fourth-order Runge–Kutta method. The numerical solutions of

The limit cycle of the Hopf oscillator.
Two-coupled Hopf oscillators and their output signals
Figure 3 shows two inter-coupled Hopf oscillators. The state vector of oscillator 1 is

Two inter-coupled Hopf oscillators.
where
In order to get stable gait generation and transition during the CPG-based control of multi-legged robots, the output signals of different oscillators should have the same frequency and amplitude. For this purpose, the coupling and rotation matrices should be defined as
where
Based on equations (3) and (2), the nonlinear differential equations for the two inter-coupled oscillators can be obtained as
The output signals can be determined by numerically solving equation (4).
Hopf oscillator-based CPG system for a crab-like robot
In the CPG-based locomotion controlling of multi-legged robots, each leg is generally controlled by an oscillator. In order to realize stable gait generation and transition, there are two basic requirements: (a) different oscillators should have the same oscillation frequency and amplitude and (b) a fixed phase-angle difference should be maintained between the two oscillators on any two neighboring legs. From “Two-coupled Hopf oscillators and their output signals” section, it is inferred that these requirements can be met just by the oscillator inter-coupling. Generally, different gaits have different phase-angle differences and thus different values of
In this section, six Hopf oscillators are employed to construct a CPG system as shown in Figure 4 for a crab-like robot with six legs. On each leg, there is a CPG consisting of a single oscillator. All the six CPGs, as a whole, are called the CPG system. The inter-coupling between any two neighboring oscillators is used to meet the requirements of oscillation frequency, amplitude, and phase-angle difference. Here, there are three control signals, ω, μ, and β, from the top level of the CPG system. They are used to regulate the cycle, step size, and gait type, respectively. Each CPG has two output signals,

The CPG system for a crab-like robot with six legs. CPG: central pattern generator.
The theoretical model of the CPG system is
where i (i = 1, 2,…, 6) is the number of the
As shown in Figure 5(a), a waveform gait is used to control each robotic leg. There are two phases in this gait, one being the swing phase and the other the stance one. The time consumed in each swing phase is fixed, while that consumed in the stance phase can be adjusted by varying the stance parameter β. In Figure 5(b), β = 0.5 and the two phases have the same duration. Generally, larger β leads to longer duration for the stance phase. As shown in Figure 6, the locomotion speed and the gait type can be changed just by varying the value of β. As β varies, the time duration of each stance phase is enhanced, while that of the swing phase keeps unchanged, when the stable locomotion state is achieved.

The waveform and output signals of the CPG on a leg. (a) The leg and waveform. (b) The output signals of the CPG on the leg. CPG: central pattern generator.

The stance and swing phases in four different gaits (green blocks: stance phases; white blocks: swing phases). (a) β = ½. (b) β = 2/3. (c) β = 3/4. (d) β = 5/6.
Feedforward neural network
The rhythmic signals generated by the CPG system cannot be directly applied to control the joints of the robotic legs, because the CPG rhythmic signals are sinusoidal curves with fixed cycle and amplitude but the variation curves of the joint angles are frequently nonsinusoidal. Therefore, it is necessary to establish a one-to-one mapping relation between the CPG rhythmic signals and the joint angles. In this section, an FFNN is constructed for this purpose. Figure 7 shows the network structure of the tri-layer FFNN for a leg with three joints. There are eight neurons in the hidden layer and three in the output one. x and y are the two rhythmic signal inputs by the CPG.

The structure of the FFNN. FFNN: feedforward neural network.
Two reflex mechanisms for self-adaptive gait control on complex terrains
In this section, a self-adaptive reflex motion is proposed for the robotic legs to walk on complex terrains. For this purpose, an infrared sensor is installed at the end of each leg (see Appendix 1 for the specifications of the sensor). The sensor outputs high-level electric signals if the leg is in the stance phase. It yields low-level electric signals when the leg is swing. By checking the infrared signals, the CPG system can activate two kinds of reflex motions to help the legs walk adaptively on complex terrains.
If a high-level signal occurs in the swing process of a leg, it can be inferred that an obstacle such as a raised platform is encountered (see Figure 8(a)). In this case, this leg stops swing and waits there until all the other swing legs finish their swing processes. Then, the leg on the obstacle begins to make a second swing (see Figure 8(a)).

Two kinds of typical reflex motions. (a) The first kind of reflex motion on a raised platform. (b) The second kind of reflex motion over a pit.
If a low-level signal occurs at the end of the swing process of a leg, it can be inferred that the leg is over a pit (see Figure 8(b)). In this case, the reflex mechanism is triggered by the CPG controller in such a way that this leg stops swing and hangs there until all the other swing legs finish their swing processes. Then, the foot hanging over the pit continues to go down vertically until the bottom of the pit is reached (i.e. a high-level signal occurs). After that, the leg begins to try a second swing process. The control flow of the two kinds of reflex motions is given in Figure 9.

The control flow of the two kinds of basic reflex motions.
Finally, it deserves noting that the leg sometimes has to make a series of continuous reflex motions in order to go across an obstacle or pit. Figure 10 shows two examples of continuous reflexes for a robotic leg.

Schematic diagrams for the continuous reflex motions of a robotic leg. (a) Continuous reflex motions on an obstacle. (b) Continuous reflex motions over a pit.
For the convenience of controlling the reflex motions, the motion range between the lower and upper limit positions of the end point of each leg is divided into n equal subintervals (see Figure 11). The height of each subinterval is

Subintervals of the motion range.
where
where

The output electric level of the infrared sensor.
By checking the output electric level of the infrared sensor, the sequence number λ is determined and then the position of the end point is finally obtained.
Experiments
Experimental setup
In this section, we use a six-legged crab-like robot (see Figure 13) developed by our research team to build an experimental platform. The robot mainly consists of three parts: the main body, the legs, and the PC104 embedded mainboard. Each leg has three joints that are driven by digital steering motors.

The six-legged crab-like robot.
As illustrated in Figure 14, the experimental platform also includes three main parts: the host computer, the PC104 embedded controller, and the robot. The Tornado software [Version 4.4.2] is installed in the host computer for the purposes of programming, debugging, and displaying. Based on the Transmission Control Protocol (TCP)/ Internet Protocol (IP), Tornado performs the communication between the target server in the computer and the target agent procedure in the controller and transmits the compiled procedure into the PC104.

The schematic diagram of the experimental platform.
The PC104 mainboard is actually embedded on the main body of the robot. It has the VxWorks operation system, which runs the FFNN mapping procedure, the CPG gait generation procedure, and the self-adaptive control procedure.
The actuators and sensors are functional modules of the robot. As the actuator, a steering motor is installed on each joint of the legs. It receives control commands (i.e. RS232 signals) from the PC104 through serial port 0 and then actuates the associated joint. As the sensing element of the self-adaptive control system, an infrared sensor is installed at the end of each leg. It tests the complex terrain using the method described in “Two reflex mechanisms for self-adaptive gait control on complex terrains” section and then transfers the high-/low-level electric signals to the PC104 through the digital port. A rotary encoder is fixed on the ground and connected to the main body of the robot through a rope wheel. It measures the real-time velocity of the robot and sends the associated pulse signals to the PC104 through the digital port. A tilt angle sensor is installed on the main body of the robot. It tests the attitude information of the main body, including the pitching, yawing, and rolling angels and then inputs the corresponding RS232 signals into the PC104 through serial port 1.
Experimental terrain conditions
In the present work, the following different kinds of experiments are conducted to verify the effects of the theoretical model: (a) waveform-gait generation experiments, (b) waveform-gait transition experiments, and (c) self-adaptive control experiments. The gait generation and transition experiments are performed on a horizontal desktop with no obstacle, as shown in Figure 15(a). The self-adaptive control experiments are done on two kinds of complex terrains. At first, some books with different thicknesses are randomly put on the desktop to act as obstacles (see Figure 15(b)), and then two rubber plates are employed to form a wavy terrain on the ground (see Figure 15(c)).

Three different kinds of terrain conditions employed in experiments. (a) Horizontal desktop. (b) A book acting as an obstacle. (c) Wavy terrain formed by rubber plates.
Experimental results
Waveform-gait generation experiments
The gait type is actually determined by the value of the stance parameter β. In this section, four typical values of β (i.e. 1/2, 2/3, 3/4, and 5/6) are chosen to perform waveform-gait generation experiments. Both the electric level signals produced by the infrared sensors and the locomotion velocity of the robot are measured. Then, the obtained experimental results are employed to validate the CPG-based control method for waveform-gait generation.
In the case of β = 2/3, Figure 16 gives six snapshots showing the representative postures of the robot, and Figure 17 illustrates the electric level signal output by the infrared sensors. It can be observed from Figure 17 that in the β = 2/3 gait, the swing sequence of the legs is leg 6 → leg 1 → leg 4 → leg 5 → leg 2 → leg 3, and a motion cycle is approximately 1.5 s. These experimental results are consistent with the theoretical ones, demonstrating the feasibility of the present CPG-based waveform-gait generation method.

Waveform-gait generation experiments (

Electric level signals output by the infrared sensors.
In addition, Figure 18 shows the velocities of the robot measured in the above four gaits. The curves of velocity versus time oscillate remarkably due to various random factors such as the vibration of the main body and legs and the flexibility of the rope of the rotary encoder. Due to this reason, we consider the average velocity here. For each gait, the average velocity is calculated based on the measured data and then is further used to make comparison with its theoretical value (see Figure 19). A quite good consistency between the experimental and theoretical data is observed in Figure 19, which again verifies the validity of the present CPG-based waveform-gait generation method.

Velocities measured in four gaits.

The curves of average velocity.
Waveform-gait transition experiments
According to the CPG-based control theory, different gaits of the robot can be switched just by changing the value of the stance parameter β. When β varies from 1/2 to 2/3, Figure 20 shows some typical snapshots to demonstrate the transition process from gait I to II and then to III. Experiments indicate that the whole gait transition process is stable and the variation of the velocity of the main body is continuous. Therefore, smooth waveform-gait transition can be achieved just by changing the stance parameter.

Waveform-gait transitions.
Self-adaptive control experiments
When the robot walks on complex terrain, the undulation of the ground may give rise to vibration of the main body. For this reason, two reflex motions are proposed in “Two reflex mechanisms for self-adaptive gait control on complex terrains” section to realize stable self-adaptive locomotion in undulated regions. Next, experiments are performed to verify the self-adaption effects of the two reflex motions. Two different kinds of complex terrains are employed in the experiments. First, some books are randomly put on a horizontal desktop to act as obstacles. Second, two rubber plates are used to form a wavy terrain on the horizontal ground. The self-adaptive controlling effects in the first case are satisfactory, but those in the second case are not so good. Therefore, the experimental results in the first case are provided and analyzed in this section, while the experimental video in the second case is given as Online Supplementary material of the present article.
In the first case, when a robotic leg steps on a book, the associated infrared sensor yields a high-level electric signal. Then, the first kind of reflex motion (see Figure 8(a)) is actuated and the leg adapts itself to this situation by switching its locomotion trajectory to make a second swing. In this way, the robot successfully goes onto the book. When a robotic leg steps down a book, the second kind of reflex motion (see Figure 8(b)) is triggered by the low-level electric signal of the corresponding infrared sensor. As a result, the leg tries a second swing and the robot stably goes down from the book at last. In the whole process, the robot not only moves in a stable manner but also roughly follows the planned path (Figure 21).

Experiments of reflex motions. (a) Leg 1 on the book. (b) Leg 5 on the book. (c) Leg 4 on the book.
Figure 22 shows the variation curves of the joint angles of legs 1, 5, and 4. From these curves, the two kinds of reflex motions of these three legs can be clearly identified. Specifically, leg 1 steps onto the book at about 1.9 s and steps down at about 3.3 s. Leg 5 gets onto the book at about 4.4 s and gets off at about 5.5 s. Leg 4 goes onto the book at about 7.6 s and goes down at about 8.8 s.

Variation curves of joint angles.
In addition, the pitching and rolling angels of the main body are also measured during the experimental process. Figure 23 shows the variation curves of these two angles versus time in two cases, one with reflex motions while the other without. It is clearly observed that the angle curves vary more stable in the case of reflex motions.

The curves of the pitching and rolling angles versus time. (a) The pitching angle. (b) The rolling angle.
Concluding remarks and future work
The biologically inspired CPG control method is presented for a crab-like robot with six legs. The nonlinear ordinary differential equations are formulated at first for a Hopf oscillator with limit cycle effects. Then, a Hopf oscillator-based CPG system is constructed for the waveform-gait generation and transition control of the six-legged robot. A tri-layer FFNN is also established to map the CPG rhythmic signals with the joint angles. Further, two reflex mechanisms are proposed to realize self-adaptive gait control on complex terrains. Finally, an experimental platform is constructed based on the crab-like robot and the CPG controller. Experiments are performed to verify the waveform-gait generation and transition performances and the self-adaptive locomotion capability on uneven ground. It is demonstrated that the robot can not only successfully achieve the waveform-gait generation and transition but also stably realize self-adaptive locomotion on the complex terrain formed by randomly scattered books.
In the present work, we are mainly concerned with the CPG-based control for the waveform-gait generation and transition and the self-adaptive control for waveform gaits on complex terrains. The obtained results lay a foundation for the related future work. Besides the locomotion on the ground, the crab-like robot may also need to have the capability of swimming. Next, a future work of our research team is to extend the present CPG method for the generation and transition of swimming gaits. In addition, the present article only provides experimental results on horizontal desktop and complex terrain formed by randomly scattered books or wavy rubber plates. The tests should be more detailed, using different obstacles, a greater number of obstacles, and different path lengths. Comparison between the robot’s practical path and the expected or desired path should also be made in these tests. These are also the future work of our research team.
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: This work was supported by National Natural Science Foundation of China under grants 51409058 and 51305088, National Basic Scientific Research Program of China under grant B2420110014, Postdoctoral Science Foundation of Heilongjiang Province of China under grant LBH-Z15035, and National Natural Science Foundation of Heilongjiang Province under grants E2016017 and F201205.
Supplemental material
Supplementary material for this article is available online.
Appendix 1
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
