# A Bioinspired Gait Transition Model for a Hexapod Robot

Authors: Qing Chang; Fanghua Mei
Journal: Journal of Robotics
 (2018)

---

## Abstract

Inspired by the analysis of the ant locomotion observed by the high-speed camera, an ant-like gait transition model for the hexapod robot is proposed in this paper. The model which consists of the central neural system (CNS), neural network (NN), and central pattern generators (CPGs) can produce the rhythmic signals for different gaits and can realize the transition of these gait automatically and smoothly according to the change of terrain. The proposed model suggests the neural mechanisms of the ant gait transition and can improve the environmental adaptability of the hexapod robot. The numerical simulation and corresponding physical experiment are implemented in this paper to verify the proposed method.


---

## Body

## 1. Introduction

There is no doubt that the legged locomotion can improve the adaptability of the animals to the various kinds of terrains. To find out how to generate the coordinate and flexible gait, the leg mechanism and neural control system of the legged animals were systematic analyzed [1–4].The legged robots that aim at walking in the complex environment include biped robots [5], quadruped robots [6], and hexapod robots [7]. On the one hand, the mechanism of the robot leg is becoming much more complicated so as to realize proper gaits in different terrain [8]. On the other hand, the robot’s control system tends to get some inspiration from the animal’s locomotion neural system. It is found that the rhythmic locomotion of many animals is controlled by a series of the central pattern generator (GPG) and then the CPG is applied in the bioinspired robot control [9]. Many CPG models were used in hexapod robots to achieve desired locomotion. Rostro proposed a CPG model which is built of spiking neurons and can produce rhythmic signals for hexapod robots to realize walking, jogging, and running, but the rhythmic signals of different locomotion are produced separately [10]. Zhong proposed a CPG model for a novel hexapod robot whose legs can radially be free distributed around the robot body, the relevant parameters which decide the locomotion of robot are tuned according to the processed feedback information [11]. Arena provides a multitemplates approach to cellular nonlinear networks (MTA-CNN), and the templates of GPG can be reorganized by changing the synaptic connections, but this adjustment is rather complex and cannot be done online [12]. Ren proposed a CPG model with multiple chaotic central pattern generators with learning for the hexapod robot called AMOSII, and the model can change the connections of the generators to plan the locomotion for the malfunction compensation, but the connections must decide before locomotion [13]. The proposed CPG models above can produce kinds of gaits for hexapod robots, but how to achieve the transition between the different gaits is rarely considered by the previous works. For instance, Arena uses different templates to define gait, but every gait pattern is related to a predefined template, so the hexapod robot can only perform some predefined gait pattern.In this paper, inspired by the analysis of the ant locomotion observed by the high-speed camera, an ant-like gait transition model for the hexapod robot is proposed. The bionic gait transition model which can realize a smooth transition among regular gait consists of reconfigurable CPGs, the central neural system (CNS), and neural network (NN). CNS is responsible for acquiring environment information and determining the basic locomotion parameters such as velocity and direction. The NN is a three-layer perceptron neural network which can adjust the gait transition factorsfp (probing) and fs (sliding) real-time based on the velocity (V) and surface roughness of ground (S) acquired from CNS. The CPGs can reconfigure themselves according to the gait transition factors to realize a smooth gait transition among sliding gait, probing gait, and regular gait. The three parts mentioned above contribute to the desired gait transition that adapts to the variable environment. To verify the proposed model, numerical simulation and corresponding physical experiment were implemented in this paper.


## 2. Observation and Analysis of Ant Gait

### 2.1. Materials and Methods

The observation experiments were performed with several ants which were similar in size (11.3mm~11.8 mm). The ant was put inside of a transparent incubator when observed. A ruler that hanged in the middle of transparent was used as the passage in order to make the ant walk straightly. To stimulate the ant to walk, some nut was placed in the desired direction. The ants were filmed from three directions (above, front, and left) with MotinXtra HG-TH 100K digital high-speed camera ( Redlake corporation, USA) which can get images as 1000 frame/s at the resolution of 752×564 (see Figure1). To ensure the images’ quality, the image acquisition frequency was set as 500 frame/s. The images were recorded as AVI format at 24fps and then the converted films were analyzed frame by frame using the software Image-Pro Plus6.0 (Media Cybernetics, USA).Figure 1
Schematic of the experimental system.The gait was identified by distinguishing the posterior extreme position (PEP, lift-off) and the anterior extreme position (AEP, touch-down). The software Image-Pro Plus6.0 was used to capture the foot locomotion trajectory of ant from the movies (Figure2), and then the PEP and AEP could be found out easily. Frame-by-frame analysis accounts for an error of ±1frame (i.e., 2ms) when determining PEP and AEP. For convenience, continuous 250 frames were regarded as a section. Each section lasted for 0.5s and contained three to six steps according to the walking speed. The walking speed of each step can also be calculated.Figure 2
The foot trajectory of locomotion.Foothold pattern diagram is a useful tool to depict the gait in which the white bars represent the swing phase of a leg and the black bars represent the stance phase. If the leg’s number was defined as shown in Figure3, then the foothold pattern diagram of regular tripod gait is shown in Figure 4.Figure 3
The serial number of ant’s leg.Figure 4
The foothold pattern diagram of regular tripod gait.


### 2.2. Sliding Gait

The ruler remained horizontally when the four ants walked on it separately. A total of 20 effective sections were analyzed. Through observation, the exact regular gait as shown in Figure4 rarely emerged. However, most steps had a trend to behave like the idealized gaits. Hence, a deviation from ideal phase relationship during the swing by ±0.15 was tolerated. The section’s gait is assigned by the gait that appeared most in the section. According to the modifications above, there were 13 sections (65%) that performed the regular gait and 7 sections (35%) that performed the irregular gait. The distance between the start point and the end point was 50mm. Figure 5 shows the velocity where the sections began to be recorded.Figure 5
The mean velocity and the starting position of different gait sections.It can be seen clearly in Figure5 that the irregular gait mostly emerged at the beginning of the locomotion with a lower speed. With the increment of the speed, the irregular gait transited to the regular gait gradually and the speed of the regular gait tends to be stable after the transition. It can be concluded that this regular gait only appeared in low speed.The regular gait of insect was considered to be composed of the swing phase and stance phase. However, what surprised us was that in irregular gait the hind legs of ant represented a sliding mode named as sliding phase in this paper. And this irregular gait was called sliding gait. For example, when the ant was in sliding gait as shown in Figure6, the leg R3 slid on the surface of the ruler while the other five legs moved. And we could also find out that the abdomen of the ant kept very close to the ruler when R3 began sliding and then lifted up when R3 ended sliding.Figure 6
The left view and top view of sliding phase of leg R3.To have better understanding of the sliding gait, the left view of typical sliding gait was analyzed using Image-Pro Plus 6.0. In order to highlight the sliding phase of the hind leg, the section that we selected was cut to 123 frames, i.e., 246ms. The trajectories of the foot end of L1, R3, and L3 and the tips of the abdomen were depicted in Figure7. From the intuitive trajectories, we can see clearly that the hind legs L3 and R3 underwent one and two siding phases, respectively. At the same time, the other four legs walked normally, e.g., L1 in Figure 7, and the abdomen was close to the ruler as a result of lacking support from the hind leg. The abdomen lifted up gradually when the irregular gait almost came to an end.Figure 7
The trajectories of the foot end of L1, R3, and L3 and the tip of the abdomen.The precise step phrase can be distinguished by analyzing kinematic parameters such as joint angle and displacement of leg [11]. To acquire an accurate foothold pattern diagram of this section, the vertical and horizontal coordinate of the trajectories in the image coordinate system was exported to MATLAB. After data processing, the foothold pattern diagram of an irregular gait section was shown in Figure 8. Indeed, there was no significant sign that six legs walked in synchrony in sliding gait. However, if only the front and middle legs were taken into consideration, coordination among the four legs could be found easily. To some extent, the front and middle legs performed trot gait like quadruped animal. The duty factors (i.e., the fraction of time a leg spends on the ground relative to the step period) of hind legs (L3 54.9%, R3 51.2%) were far less than that of front and middle legs (L1 73.5%, R1 63.4%, L2 67.5%, and R2 81.3%), and this was convincing evidence that the hind legs contributed less to the locomotion compared with the other legs. The hind legs were mainly used to support the abdomen of the ant, so the abdomen lifted up when the irregular gait ended (see Figure 8).Figure 8
Foothold pattern diagram of the irregular gait.However, when the ruler was replaced by a rough board, the sliding gait disappeared. I supposed that the reason why ant performed the sliding gait is that the sliding gait could save the energy of locomotion since only two-thirds of the legs worked normally. But when higher speed was needed, the hind legs must join in to offer enough power. In addition, the sliding gait will not appear in the rough surface in case of hurt the hind legs while sliding.


### 2.3. Probing Gait

Apart from sliding gait, another kind of irregular gait was observed when ant crossed the obstacle (see Figure9), i.e., the number of steps performed by front legs (NR1=13, NL1=12) in this process was drastically higher than that of middle legs or hind legs (NR2=NL3=7, NR3=NL2=8). In addition, the step length of front legs tends to be smaller. Surprisingly, the middle and hind legs coupled with each other just like what the front and middle legs did during the sliding phase. The same phenomenon has long been discovered in stick insect, another arthropod, which is one of the best subjects in studying insect locomotion. These studies suggest that the front legs not only function as motion organs but also serve an additional function, for example, to probe the environment. So this gait is named probing gait in this paper.Figure 9
The snapshot of obstacle crossing.


### 2.4. Discussion

All legs coordinate with a certain frequency performing regular gait. Thus, CPG neurons of all legs couple with each other and send the control signals with same frequency and amplitude to the motor neurons. However, this coupling relationship is broken partially in some special cases such as sliding gait and probing gait. The hind legs or front legs decouple with the main locomotion cycle in sliding phase and probing gait. The hexapod can remain stable locomotion if the middle legs are in the normal state even if the front and hind legs are amputated or act as sensors. The CPG neurons of other legs can couple with the main CPG in regular gait and decouple with the main CPG in irregular gait through the regulation of central neural system (CNS).Some hypothesis can be drawn from the discussion above:(1)
The locomotion rhythm of some arthropod mainly depends on the main CPG that connect with middle legs. And without the participation of middle legs, none of the stable gaits, no matter regular or irregular, can be realized.(2)
The CPG neurons of the front leg and hind leg are able to couple or decouple with main CPG through the regulation of CNS. The regulation is rather smooth and will not affect the stability of locomotion.(3)
The regulation implemented by CNS is a real-time feedback process; therefore, the locomotion state and environment such as velocity and ground roughness will affect the regulation.(4)
The real-time regulation contributes to a proper gait that adapts to the variable environment.


## 2.1. Materials and Methods

The observation experiments were performed with several ants which were similar in size (11.3mm~11.8 mm). The ant was put inside of a transparent incubator when observed. A ruler that hanged in the middle of transparent was used as the passage in order to make the ant walk straightly. To stimulate the ant to walk, some nut was placed in the desired direction. The ants were filmed from three directions (above, front, and left) with MotinXtra HG-TH 100K digital high-speed camera ( Redlake corporation, USA) which can get images as 1000 frame/s at the resolution of 752×564 (see Figure1). To ensure the images’ quality, the image acquisition frequency was set as 500 frame/s. The images were recorded as AVI format at 24fps and then the converted films were analyzed frame by frame using the software Image-Pro Plus6.0 (Media Cybernetics, USA).Figure 1
Schematic of the experimental system.The gait was identified by distinguishing the posterior extreme position (PEP, lift-off) and the anterior extreme position (AEP, touch-down). The software Image-Pro Plus6.0 was used to capture the foot locomotion trajectory of ant from the movies (Figure2), and then the PEP and AEP could be found out easily. Frame-by-frame analysis accounts for an error of ±1frame (i.e., 2ms) when determining PEP and AEP. For convenience, continuous 250 frames were regarded as a section. Each section lasted for 0.5s and contained three to six steps according to the walking speed. The walking speed of each step can also be calculated.Figure 2
The foot trajectory of locomotion.Foothold pattern diagram is a useful tool to depict the gait in which the white bars represent the swing phase of a leg and the black bars represent the stance phase. If the leg’s number was defined as shown in Figure3, then the foothold pattern diagram of regular tripod gait is shown in Figure 4.Figure 3
The serial number of ant’s leg.Figure 4
The foothold pattern diagram of regular tripod gait.


## 2.2. Sliding Gait

The ruler remained horizontally when the four ants walked on it separately. A total of 20 effective sections were analyzed. Through observation, the exact regular gait as shown in Figure4 rarely emerged. However, most steps had a trend to behave like the idealized gaits. Hence, a deviation from ideal phase relationship during the swing by ±0.15 was tolerated. The section’s gait is assigned by the gait that appeared most in the section. According to the modifications above, there were 13 sections (65%) that performed the regular gait and 7 sections (35%) that performed the irregular gait. The distance between the start point and the end point was 50mm. Figure 5 shows the velocity where the sections began to be recorded.Figure 5
The mean velocity and the starting position of different gait sections.It can be seen clearly in Figure5 that the irregular gait mostly emerged at the beginning of the locomotion with a lower speed. With the increment of the speed, the irregular gait transited to the regular gait gradually and the speed of the regular gait tends to be stable after the transition. It can be concluded that this regular gait only appeared in low speed.The regular gait of insect was considered to be composed of the swing phase and stance phase. However, what surprised us was that in irregular gait the hind legs of ant represented a sliding mode named as sliding phase in this paper. And this irregular gait was called sliding gait. For example, when the ant was in sliding gait as shown in Figure6, the leg R3 slid on the surface of the ruler while the other five legs moved. And we could also find out that the abdomen of the ant kept very close to the ruler when R3 began sliding and then lifted up when R3 ended sliding.Figure 6
The left view and top view of sliding phase of leg R3.To have better understanding of the sliding gait, the left view of typical sliding gait was analyzed using Image-Pro Plus 6.0. In order to highlight the sliding phase of the hind leg, the section that we selected was cut to 123 frames, i.e., 246ms. The trajectories of the foot end of L1, R3, and L3 and the tips of the abdomen were depicted in Figure7. From the intuitive trajectories, we can see clearly that the hind legs L3 and R3 underwent one and two siding phases, respectively. At the same time, the other four legs walked normally, e.g., L1 in Figure 7, and the abdomen was close to the ruler as a result of lacking support from the hind leg. The abdomen lifted up gradually when the irregular gait almost came to an end.Figure 7
The trajectories of the foot end of L1, R3, and L3 and the tip of the abdomen.The precise step phrase can be distinguished by analyzing kinematic parameters such as joint angle and displacement of leg [11]. To acquire an accurate foothold pattern diagram of this section, the vertical and horizontal coordinate of the trajectories in the image coordinate system was exported to MATLAB. After data processing, the foothold pattern diagram of an irregular gait section was shown in Figure 8. Indeed, there was no significant sign that six legs walked in synchrony in sliding gait. However, if only the front and middle legs were taken into consideration, coordination among the four legs could be found easily. To some extent, the front and middle legs performed trot gait like quadruped animal. The duty factors (i.e., the fraction of time a leg spends on the ground relative to the step period) of hind legs (L3 54.9%, R3 51.2%) were far less than that of front and middle legs (L1 73.5%, R1 63.4%, L2 67.5%, and R2 81.3%), and this was convincing evidence that the hind legs contributed less to the locomotion compared with the other legs. The hind legs were mainly used to support the abdomen of the ant, so the abdomen lifted up when the irregular gait ended (see Figure 8).Figure 8
Foothold pattern diagram of the irregular gait.However, when the ruler was replaced by a rough board, the sliding gait disappeared. I supposed that the reason why ant performed the sliding gait is that the sliding gait could save the energy of locomotion since only two-thirds of the legs worked normally. But when higher speed was needed, the hind legs must join in to offer enough power. In addition, the sliding gait will not appear in the rough surface in case of hurt the hind legs while sliding.


## 2.3. Probing Gait

Apart from sliding gait, another kind of irregular gait was observed when ant crossed the obstacle (see Figure9), i.e., the number of steps performed by front legs (NR1=13, NL1=12) in this process was drastically higher than that of middle legs or hind legs (NR2=NL3=7, NR3=NL2=8). In addition, the step length of front legs tends to be smaller. Surprisingly, the middle and hind legs coupled with each other just like what the front and middle legs did during the sliding phase. The same phenomenon has long been discovered in stick insect, another arthropod, which is one of the best subjects in studying insect locomotion. These studies suggest that the front legs not only function as motion organs but also serve an additional function, for example, to probe the environment. So this gait is named probing gait in this paper.Figure 9
The snapshot of obstacle crossing.


## 2.4. Discussion

All legs coordinate with a certain frequency performing regular gait. Thus, CPG neurons of all legs couple with each other and send the control signals with same frequency and amplitude to the motor neurons. However, this coupling relationship is broken partially in some special cases such as sliding gait and probing gait. The hind legs or front legs decouple with the main locomotion cycle in sliding phase and probing gait. The hexapod can remain stable locomotion if the middle legs are in the normal state even if the front and hind legs are amputated or act as sensors. The CPG neurons of other legs can couple with the main CPG in regular gait and decouple with the main CPG in irregular gait through the regulation of central neural system (CNS).Some hypothesis can be drawn from the discussion above:(1)
The locomotion rhythm of some arthropod mainly depends on the main CPG that connect with middle legs. And without the participation of middle legs, none of the stable gaits, no matter regular or irregular, can be realized.(2)
The CPG neurons of the front leg and hind leg are able to couple or decouple with main CPG through the regulation of CNS. The regulation is rather smooth and will not affect the stability of locomotion.(3)
The regulation implemented by CNS is a real-time feedback process; therefore, the locomotion state and environment such as velocity and ground roughness will affect the regulation.(4)
The real-time regulation contributes to a proper gait that adapts to the variable environment.


## 3. Bioinspired Gait Transition Model

Inspired by the sliding gait and probing gait of ant, a bionic gait transition model for a hexapod robot (see Figure10) is put forward in this section. The bionic gait transition model which depends on the hypothesis proposed in section 3 can realize a smooth transition among regular gait, sliding gait, and probing gait.Figure 10
Prototype of the hexapod robot.


### 3.1. Model Configuration

As shown in Figure11, the gait transition model consists of CPGs, central neural system (CNS), and neural network (NN). As the core of the model, CNS is a charge of information acquisition and determines the basic locomotion parameters such as velocity and direction. The three parts mentioned above contribute to the desired gait transition that adapts to the variable environment. The NN is a three-layer perceptron neural network which can adjust the gait transition factors fp (probing) and fs (sliding) real-time based on the velocity (V) and surface roughness of ground (S) acquired from CNS. The CPG neurons of L2 and R2 couple with each other to generate the main CPG signal of locomotion. The frequency and amplitude of the CPG signal are regulated by CNS. The CPG neurons of other legs cannot only couple with L2 or R2 to obtain coordinate CPG signal for regular gait, but also decouple with L2 or R2 to realize irregular gait. Whether they couple with main CPG or not is decided by the discrimination results of NN.Figure 11
Schematic diagram of the model configuration.


### 3.2. Information Acquisition of CNS

The information used in our model includes the locomotion velocity and surface roughness of ground. Since middle legs participate in all gaits discussed in this paper, the velocity is calculated according to the step length and locomotion frequency of middle legs; for convenience, the velocity is normalized in(1)V=l×fvmaxwherel is the step length andf is the locomotion frequency of middle legs. vmax represents the max velocity that the robot can obtain.V is the normalized velocity with a value between 0 and 1.The surface roughness of ground is represented by the difference of contact force between the two front legs since the front legs are the first to contact with the unknown environment. After normalization, the surface roughnessS is expressed in (2)S=Fl-FrmaxFl,FrwhereFl and Fr are the contact force of legs L1 and R1, respectively, and max(Fl, Fr ) is the max value between Fl and Fr. S represents the normalized surface roughness of ground with a value between 0 and 1.The normalization of locomotion velocity and surface roughness of ground is the precondition of using a neural network to distinguish the desired gaits. Then the next step is to design a proper neural network to realize the classification function.


### 3.3. Neural Network (NN) Design

What can be ensured in our model is that the gaits are determined byV andS; however, this relationship is nonlinear. Therefore, the neural network is introduced in our model to achieve the nonlinear classification.It can be concluded from the experiment above that the sliding gait appears in smooth ground with a low speed. And when the ground becomes uneven, the gait will transit to probing. And in the rest of the time, the regular gait is represented. According to the partition rules mentioned above, the partition result is shown in Figure12. In this figure, the white area represents the sliding gait, the grey area represents the regular gait, and the black area represents the probing gait. Thus, the robot can obtain a proper gait corresponding to the locomotion state and environment.Figure 12
The figure of gait classification.To realize the gait classification shown in Figure13, a three-layer perceptron neural network is inducted. The perceptron neural network includes the input layer, the discriminating layer, and output layer. Normalized velocityV and surface roughnessS are introduced to the neural network through input layer and then discriminated by the five neurons of discriminating layer. The classification result is obtained through the output layer in the form of gait transition factors fp and fs.Figure 13
Diagram of perceptron neural network.The five neurons in the discriminating layer are divided into two rows. The neurons in the first row are used to partition the boundaries, and the neurons in second row implement logic operations of the partition result.wij, bij, and fij represent the weight, bias, and transmission function of thejth neuron which locates inith row. According to the boundary functions shown in (3), the parameters used in the perceptron neural network can be determined in Table 1. And the transmission functions are expressed in (4)-(5).(3)S-0.2=0V-0.4=0V+10S-6=0(4)fj1=-1,n<01,n≥0(5)fj2=0,n<01,n≥0Table 1
Parameters of perceptron neural network.
i=1,j=1 i=1,j=2 i=1,j=3 i=2,j=1 i=2,j=2 w i j [ 1,0 ] [ 0,1 ] [ 10,1 ] [ - 1 , - 1 ] [ 1,1 , 1 ] b i j -0.2 -0.4 -6 -1 -2After the classification of the perceptron neural network, whatever the state of the robot is, there will be a gait to correspond to. The gait is determined based on the gait transition factorsfp and fs; see Table 2. When transmitted to CPGs, the gait transition will affect the CPGs to generate the proper gait.Table 2
Relationship between gait and gait transition factors.
sliding regular probing f S 1 0 0 f p 0 0 1


### 3.4. Reconfigurable CPG Model

Though it has been widely accepted by the biologists that animals’ rhythmic locomotion is generated by CPGs in the lower central nervous system, different researchers have different ideas on how the CPGs works. Most of the theories about CPGs argue that CPGs consist of doubles of CPG neurons, the CPG neurons which may array in the chain [14] or in reticulation [15] are exactly the same, and they couple with each other to generate a cycle signal. Unlike most of the CPG model that has been proposed, the CPG neurons in our model are not exactly the same. The CPG neurons of L2 and R2 act as the main CPG to generate main CPG signal, and the other CPG neurons can couple or decouple with main CPG according to the gait transition factors. In other words, the CPGs model is reconfigurable. To have a good knowledge of the numerical expressions of our model, the CPGs are numbered as shown in Figure 14.Figure 14
The serial number of CPG neurons.The model proposed by Auke et al. [16] indicated the relationship between intrinsic amplitude, intrinsic frequency, and external stimulation; therefore variable and stable input can be obtained by adjusting the external stimulation. Adapting from this model, our CPG model is shown as follows.The CPG neurons of middle legs are implemented with the following differential equations:(6)θ˙2=2πv2+ω25sin⁡θ5-θ2-ϕ25r¨2=a2a24R2-r2-r˙2x2=r21+cosθ2θ˙5=2πv5+ω52sin⁡θ2-θ5-ϕ52r¨5=a5a54R5-r5-r˙5x5=r51+cos⁡θ5The CPG neurons of the front legs are expressed as follows:(7)θ˙1=2π1+fpv1+ω121-fpsin⁡θ2-θ1-ϕ12r¨1=a1a14R11+fp-r1-r˙1x1=r11+cos⁡θ1θ˙4=2π1+fpv4+ω451-fpsin⁡θ5-θ4-ϕ45r¨4=a4a44R41+fp-r4-r˙4x4=r41+cos⁡θ4Finally, the CPG neurons of hind legs are shown in(8)θ˙3=2πv3+ω321-fssin⁡θ2-θ3-ϕ23r¨3=a3a34R3-r3-r˙3x3=r31-fs1+cos⁡θ3θ˙6=2πv6+ω651-fssin⁡θ5-θ6-ϕ65r¨6=a6a64R6-r6-r˙6x6=r61-f61+cos⁡θ6whereθi and ri represent the phase and amplitude of the neurons and vi and Ri are the intrinsic frequency and intrinsic amplitude of neurons. ai is a positive constant which determines the speed that ri converges to Ri. Coupling weights ωij and phase biases Φij affect the couplings between oscillators. And the phase lag is determined by phase bias. Periodic and positive signal Xi represents the output produced by the CPG neurons.It can be seen clearly from the expressions of our model that the neurons of a middle legs couple with each other all the time, but whether the front or hind leg couple with the middle leg at the same side is decided by gait transition factorfp and fs.


## 3.1. Model Configuration

As shown in Figure11, the gait transition model consists of CPGs, central neural system (CNS), and neural network (NN). As the core of the model, CNS is a charge of information acquisition and determines the basic locomotion parameters such as velocity and direction. The three parts mentioned above contribute to the desired gait transition that adapts to the variable environment. The NN is a three-layer perceptron neural network which can adjust the gait transition factors fp (probing) and fs (sliding) real-time based on the velocity (V) and surface roughness of ground (S) acquired from CNS. The CPG neurons of L2 and R2 couple with each other to generate the main CPG signal of locomotion. The frequency and amplitude of the CPG signal are regulated by CNS. The CPG neurons of other legs cannot only couple with L2 or R2 to obtain coordinate CPG signal for regular gait, but also decouple with L2 or R2 to realize irregular gait. Whether they couple with main CPG or not is decided by the discrimination results of NN.Figure 11
Schematic diagram of the model configuration.


## 3.2. Information Acquisition of CNS

The information used in our model includes the locomotion velocity and surface roughness of ground. Since middle legs participate in all gaits discussed in this paper, the velocity is calculated according to the step length and locomotion frequency of middle legs; for convenience, the velocity is normalized in(1)V=l×fvmaxwherel is the step length andf is the locomotion frequency of middle legs. vmax represents the max velocity that the robot can obtain.V is the normalized velocity with a value between 0 and 1.The surface roughness of ground is represented by the difference of contact force between the two front legs since the front legs are the first to contact with the unknown environment. After normalization, the surface roughnessS is expressed in (2)S=Fl-FrmaxFl,FrwhereFl and Fr are the contact force of legs L1 and R1, respectively, and max(Fl, Fr ) is the max value between Fl and Fr. S represents the normalized surface roughness of ground with a value between 0 and 1.The normalization of locomotion velocity and surface roughness of ground is the precondition of using a neural network to distinguish the desired gaits. Then the next step is to design a proper neural network to realize the classification function.


## 3.3. Neural Network (NN) Design

What can be ensured in our model is that the gaits are determined byV andS; however, this relationship is nonlinear. Therefore, the neural network is introduced in our model to achieve the nonlinear classification.It can be concluded from the experiment above that the sliding gait appears in smooth ground with a low speed. And when the ground becomes uneven, the gait will transit to probing. And in the rest of the time, the regular gait is represented. According to the partition rules mentioned above, the partition result is shown in Figure12. In this figure, the white area represents the sliding gait, the grey area represents the regular gait, and the black area represents the probing gait. Thus, the robot can obtain a proper gait corresponding to the locomotion state and environment.Figure 12
The figure of gait classification.To realize the gait classification shown in Figure13, a three-layer perceptron neural network is inducted. The perceptron neural network includes the input layer, the discriminating layer, and output layer. Normalized velocityV and surface roughnessS are introduced to the neural network through input layer and then discriminated by the five neurons of discriminating layer. The classification result is obtained through the output layer in the form of gait transition factors fp and fs.Figure 13
Diagram of perceptron neural network.The five neurons in the discriminating layer are divided into two rows. The neurons in the first row are used to partition the boundaries, and the neurons in second row implement logic operations of the partition result.wij, bij, and fij represent the weight, bias, and transmission function of thejth neuron which locates inith row. According to the boundary functions shown in (3), the parameters used in the perceptron neural network can be determined in Table 1. And the transmission functions are expressed in (4)-(5).(3)S-0.2=0V-0.4=0V+10S-6=0(4)fj1=-1,n<01,n≥0(5)fj2=0,n<01,n≥0Table 1
Parameters of perceptron neural network.
i=1,j=1 i=1,j=2 i=1,j=3 i=2,j=1 i=2,j=2 w i j [ 1,0 ] [ 0,1 ] [ 10,1 ] [ - 1 , - 1 ] [ 1,1 , 1 ] b i j -0.2 -0.4 -6 -1 -2After the classification of the perceptron neural network, whatever the state of the robot is, there will be a gait to correspond to. The gait is determined based on the gait transition factorsfp and fs; see Table 2. When transmitted to CPGs, the gait transition will affect the CPGs to generate the proper gait.Table 2
Relationship between gait and gait transition factors.
sliding regular probing f S 1 0 0 f p 0 0 1


## 3.4. Reconfigurable CPG Model

Though it has been widely accepted by the biologists that animals’ rhythmic locomotion is generated by CPGs in the lower central nervous system, different researchers have different ideas on how the CPGs works. Most of the theories about CPGs argue that CPGs consist of doubles of CPG neurons, the CPG neurons which may array in the chain [14] or in reticulation [15] are exactly the same, and they couple with each other to generate a cycle signal. Unlike most of the CPG model that has been proposed, the CPG neurons in our model are not exactly the same. The CPG neurons of L2 and R2 act as the main CPG to generate main CPG signal, and the other CPG neurons can couple or decouple with main CPG according to the gait transition factors. In other words, the CPGs model is reconfigurable. To have a good knowledge of the numerical expressions of our model, the CPGs are numbered as shown in Figure 14.Figure 14
The serial number of CPG neurons.The model proposed by Auke et al. [16] indicated the relationship between intrinsic amplitude, intrinsic frequency, and external stimulation; therefore variable and stable input can be obtained by adjusting the external stimulation. Adapting from this model, our CPG model is shown as follows.The CPG neurons of middle legs are implemented with the following differential equations:(6)θ˙2=2πv2+ω25sin⁡θ5-θ2-ϕ25r¨2=a2a24R2-r2-r˙2x2=r21+cosθ2θ˙5=2πv5+ω52sin⁡θ2-θ5-ϕ52r¨5=a5a54R5-r5-r˙5x5=r51+cos⁡θ5The CPG neurons of the front legs are expressed as follows:(7)θ˙1=2π1+fpv1+ω121-fpsin⁡θ2-θ1-ϕ12r¨1=a1a14R11+fp-r1-r˙1x1=r11+cos⁡θ1θ˙4=2π1+fpv4+ω451-fpsin⁡θ5-θ4-ϕ45r¨4=a4a44R41+fp-r4-r˙4x4=r41+cos⁡θ4Finally, the CPG neurons of hind legs are shown in(8)θ˙3=2πv3+ω321-fssin⁡θ2-θ3-ϕ23r¨3=a3a34R3-r3-r˙3x3=r31-fs1+cos⁡θ3θ˙6=2πv6+ω651-fssin⁡θ5-θ6-ϕ65r¨6=a6a64R6-r6-r˙6x6=r61-f61+cos⁡θ6whereθi and ri represent the phase and amplitude of the neurons and vi and Ri are the intrinsic frequency and intrinsic amplitude of neurons. ai is a positive constant which determines the speed that ri converges to Ri. Coupling weights ωij and phase biases Φij affect the couplings between oscillators. And the phase lag is determined by phase bias. Periodic and positive signal Xi represents the output produced by the CPG neurons.It can be seen clearly from the expressions of our model that the neurons of a middle legs couple with each other all the time, but whether the front or hind leg couple with the middle leg at the same side is decided by gait transition factorfp and fs.


## 4. Numerical Simulation and Experiment

### 4.1. Simulation Conditions Setting

To satisfy the simulation requirement mentioned above, the simulation will last for 30 s and the normalized velocity V and surface stiffness S used in the simulation are shown in Figure15.Figure 15
Normalized velocity surface stiffness used in the simulation.
(a) (b)Then the parameters of the CPG model must be determined. From the expressions of CPG, we can see that the intrinsic frequency should be exactly the same in regular and sliding gait to generate the coordinate locomotion. Taking the electromechanical properties of the robot into consideration, the intrinsic frequency of all CPG neurons is set at 0.4 Hz in regular and sliding gait. In probing gait, the intrinsic frequency of front legs’ CPG neurons increases to 0.8 Hz to acquire more environmental information.Intrinsic amplitude hind legs’ CPG neurons in sliding gait transits to zero, and except for the above case all the CPG neurons have the same intrinsic amplitude. Since the velocity is proportional to intrinsic frequency and intrinsic amplitude of middle legs’ CPG neurons, the intrinsic frequency is constant, and then the intrinsic amplitude of middle legs’ CPG neurons must change according to velocity, so the intrinsic amplitude of CPG neurons is expressed in(9)Ri=0.03t+0.20<t≤200.820<tWhen talking about the phase difference of the two coupled oscillators, it is useful to introduce the phase differenceφ=θi-θj. The time evolution of the phase difference is determined by (10)φ.=fφ=θ˙i-θ˙j=2πvi-vj+2riωijsin⁡φ-ϕijWhen the oscillators synchronize,φ tends to be zero and φ0 can be figured out by(11)φ0=arcsin⁡πvi-vjRiωij+ϕijThe function has no solution ifπvi-vj/Riωij>1, which means that the oscillators will not oscillate. If πvi-vj/Riωij=1, the function has a single solution which is asymptotically stable and the oscillators will finally oscillate with that phase difference form any initial phase values. If πvi-vj/Riωij<1 the function has two solutions: one is stable and the other one is unstable, and we can judge the stability of the solutions by the value of(12)∂fφ0∂φ=Riωijcos⁡φ0-ϕijAnd if the value is positive, the solution is unstable, and if the value is negative, the solution is stable. The two oscillators will asymptotically synchronize to a phase difference corresponding to the sable solution. When the intrinsic frequency of both oscillators is the same, the phase difference is directly set by the phase biasΦij. But in probing gait vi is not equal to vj, so wij between the front leg and middle leg should be large enough to ensure πvi-vj/Riωij<1. The selected values of ωij and Φij are shown in Table 3. The last parameter ai is set as 10 to decrease the time that ri converges to Ri.Table 3
Value ofωij and Φij.
i=1,j=2 i=2,j=3 i=2,j=5 i=4,j=5 i=5,j=2 i=6,j=5 ω i j 30 10 20 30 20 10 Φ i j π π π π -π π


### 4.2. Simulation Results

The simulation is performed using MATLAB software when the simulation condition has been set. The gait classification result of the neuron network is shown in Figure16, and the final output of the gait transition model is expressed in Figure 17.Figure 16
The gait classification result of the neuron network.Figure 17
The output of CPG neurons.


### 4.3. Conversion of CPGs Signals to Control Signals

It can be seen from Figure17 that the CPGs signals are just a group of rhythm signals and not be able to control the robot’s motors directly. Therefore, some proper conversion must be implemented to obtain the control signals of the robot’s motors.See Figure18; each leg of the hexapod robot has three joints driven by DC motors, namely J1, J2, and J3. And motors of the robot are controlled by angular displacement, so the CPGs signals must be converted to angle signals. Then we will take a leg R1 for example. The tree joints are all revolute joints. And J1, which links body and coxa, rotates in both swing phase and stance phase, while the other two joints rotate only in swing phase.Figure 18
Structure diagram of a hexapod robot.The conversion process expressed in the following:(13)Yi1=K1∫0txi-1dt+c1(14)Yi2=K2xi-1+c2xi≥10xi<1(15)Yi3=K3xi-1+c3xi≥10xi<1where Yij represents the angular control signal of Ji. xi represents the output produced by ith CPG neuron andKi and ci are the gain and the bias of joint Ji.For the hexapod robot shown in Figure12, the value of Ki and ci is represented in Table 4.Table 4
the value ofKi and ci.
i=1 i=2 i=3 K i π 12 π 12 π 18 c i 0 π 6 π 2Then the CPG signal and corresponding angular control signals of leg R1 are shown in Figure19. The angular control signals of other legs can be obtained using the same method. The control system of the hexapod robot sends the angular control signals to the eighteen DC motors, and variable gaits can be realized.Figure 19
CPG and angular control signals of leg R1.


### 4.4. Experiment

To verify the model’s practicality, an experiment is implemented on the hexapod robot. The biological gait transition model is embedded in the CPU based on PC/104-Plus compliant architecture; the DC motors and sensors communicate with CPU through CAN bus. The angular control signals sent by CPU are processed by the Elmo drive before arriving at DC motors. In the experiment the hexapod robot moved from the ground to a slope with the proposed model and the screen of experiment is shown in Figure20. The hexapod transited the gait automatically to realize the locomotion on the uneven ground, which verifies the model’s practicability to some extent.Figure 20
The screenshot of the experiment.


## 4.1. Simulation Conditions Setting

To satisfy the simulation requirement mentioned above, the simulation will last for 30 s and the normalized velocity V and surface stiffness S used in the simulation are shown in Figure15.Figure 15
Normalized velocity surface stiffness used in the simulation.
(a) (b)Then the parameters of the CPG model must be determined. From the expressions of CPG, we can see that the intrinsic frequency should be exactly the same in regular and sliding gait to generate the coordinate locomotion. Taking the electromechanical properties of the robot into consideration, the intrinsic frequency of all CPG neurons is set at 0.4 Hz in regular and sliding gait. In probing gait, the intrinsic frequency of front legs’ CPG neurons increases to 0.8 Hz to acquire more environmental information.Intrinsic amplitude hind legs’ CPG neurons in sliding gait transits to zero, and except for the above case all the CPG neurons have the same intrinsic amplitude. Since the velocity is proportional to intrinsic frequency and intrinsic amplitude of middle legs’ CPG neurons, the intrinsic frequency is constant, and then the intrinsic amplitude of middle legs’ CPG neurons must change according to velocity, so the intrinsic amplitude of CPG neurons is expressed in(9)Ri=0.03t+0.20<t≤200.820<tWhen talking about the phase difference of the two coupled oscillators, it is useful to introduce the phase differenceφ=θi-θj. The time evolution of the phase difference is determined by (10)φ.=fφ=θ˙i-θ˙j=2πvi-vj+2riωijsin⁡φ-ϕijWhen the oscillators synchronize,φ tends to be zero and φ0 can be figured out by(11)φ0=arcsin⁡πvi-vjRiωij+ϕijThe function has no solution ifπvi-vj/Riωij>1, which means that the oscillators will not oscillate. If πvi-vj/Riωij=1, the function has a single solution which is asymptotically stable and the oscillators will finally oscillate with that phase difference form any initial phase values. If πvi-vj/Riωij<1 the function has two solutions: one is stable and the other one is unstable, and we can judge the stability of the solutions by the value of(12)∂fφ0∂φ=Riωijcos⁡φ0-ϕijAnd if the value is positive, the solution is unstable, and if the value is negative, the solution is stable. The two oscillators will asymptotically synchronize to a phase difference corresponding to the sable solution. When the intrinsic frequency of both oscillators is the same, the phase difference is directly set by the phase biasΦij. But in probing gait vi is not equal to vj, so wij between the front leg and middle leg should be large enough to ensure πvi-vj/Riωij<1. The selected values of ωij and Φij are shown in Table 3. The last parameter ai is set as 10 to decrease the time that ri converges to Ri.Table 3
Value ofωij and Φij.
i=1,j=2 i=2,j=3 i=2,j=5 i=4,j=5 i=5,j=2 i=6,j=5 ω i j 30 10 20 30 20 10 Φ i j π π π π -π π


## 4.2. Simulation Results

The simulation is performed using MATLAB software when the simulation condition has been set. The gait classification result of the neuron network is shown in Figure16, and the final output of the gait transition model is expressed in Figure 17.Figure 16
The gait classification result of the neuron network.Figure 17
The output of CPG neurons.


## 4.3. Conversion of CPGs Signals to Control Signals

It can be seen from Figure17 that the CPGs signals are just a group of rhythm signals and not be able to control the robot’s motors directly. Therefore, some proper conversion must be implemented to obtain the control signals of the robot’s motors.See Figure18; each leg of the hexapod robot has three joints driven by DC motors, namely J1, J2, and J3. And motors of the robot are controlled by angular displacement, so the CPGs signals must be converted to angle signals. Then we will take a leg R1 for example. The tree joints are all revolute joints. And J1, which links body and coxa, rotates in both swing phase and stance phase, while the other two joints rotate only in swing phase.Figure 18
Structure diagram of a hexapod robot.The conversion process expressed in the following:(13)Yi1=K1∫0txi-1dt+c1(14)Yi2=K2xi-1+c2xi≥10xi<1(15)Yi3=K3xi-1+c3xi≥10xi<1where Yij represents the angular control signal of Ji. xi represents the output produced by ith CPG neuron andKi and ci are the gain and the bias of joint Ji.For the hexapod robot shown in Figure12, the value of Ki and ci is represented in Table 4.Table 4
the value ofKi and ci.
i=1 i=2 i=3 K i π 12 π 12 π 18 c i 0 π 6 π 2Then the CPG signal and corresponding angular control signals of leg R1 are shown in Figure19. The angular control signals of other legs can be obtained using the same method. The control system of the hexapod robot sends the angular control signals to the eighteen DC motors, and variable gaits can be realized.Figure 19
CPG and angular control signals of leg R1.


## 4.4. Experiment

To verify the model’s practicality, an experiment is implemented on the hexapod robot. The biological gait transition model is embedded in the CPU based on PC/104-Plus compliant architecture; the DC motors and sensors communicate with CPU through CAN bus. The angular control signals sent by CPU are processed by the Elmo drive before arriving at DC motors. In the experiment the hexapod robot moved from the ground to a slope with the proposed model and the screen of experiment is shown in Figure20. The hexapod transited the gait automatically to realize the locomotion on the uneven ground, which verifies the model’s practicability to some extent.Figure 20
The screenshot of the experiment.


## 5. Conclusion

In this paper, inspired by the analysis of the ant locomotion observed by the high-speed camera, an ant-like gait transition model for the hexapod robot is proposed. The model which consists of central neural system (CNS), neural network (NN), and central pattern generators (CPGs) can adjust the gait automatically. The nonlinear gait classification is implemented by the three-layer article neural network which can realize arbitrary division of the objects. Obviously, this classification method can offer greater flexibility. Unlike of most CPG models, The CPGs in our model is reconfigurable; i.e., the couple relationship of the CPG neurons can adjust as required. Observations of some hexapod reveal that the CPGs structure in hexapod are not so immutable, and the CPG neurons have the ability to couple or decouple with certain neurons. Therefore, our CPG model satisfies the phenomenon well. And what is more, as a result of lacking definite meaning, the proper parameters of other CPG models are difficult to obtain, which reduces the practicality of their models. And the parameters in CPGs have the definite meaning and are more flexible to adjust compared with other CPG models. Fortunately, the problem mentioned above is conquered by our model. The three parts of the gait transition model can be regarded as a feedback control system, in which the external states are induced to determine the robot’s gait. Then the intelligent control of robot locomotion can be realized. The numerical simulation of the model was implemented successfully, and the smooth and desired gait transitions were acquired. The physical experiment verified the practicability of the proposed model.There is still something left to do in the future. A more detailed classification mechanism of gait is needed; the other factors which affect the gait transition of hexapod or other animals such as leg injuries are the key studies contents from now on. And how to extend our model to robots with four or eight legs is also what we are interested in.



---

*Source: 2913636-2018-09-03.xml*