12
arXiv:1509.02417v1 [cs.RO] 8 Sep 2015 Independent Study Option report, April 2015 MSc in Computing (Spec. in Artificial Intelligence) Imperial College London Central Pattern Generators for the control of robotic systems Author: Carlos GARCIA-SAURA Supervisor: Prof. Murray SHANAHAN Abstract Bio-inspired control of motion is an active field of research with many applications in real world tasks. In the case of robotic systems that need to exhibit oscillatory behaviour (i.e. locomotion of snake-type or legged robots), Central Pattern Generators (CPGs) are among the most versatile solutions. These controllers are often based on loosely-coupled oscillators similar to those found in the neural circuits of many animal species, and can be more robust to uncertainty (i.e. external perturbations) than traditional control approaches. This project provides an overview of the state-of-the-art in the field of CPGs, and in particular their applications within robotic systems. The project also tackles the implementation of a CPG-based controller in a small 3D-printed hexapod. Keywords Bio-inspiration, Robotics, Neuron-based oscillators, Computational models, Distributed motion control Contents Introduction 1 1 Computational Models of CPGs 2 1.1 Biological Neural Networks ............. 2 Controlling locomotion with synaptic gating 1.2 Coupled oscillator networks ............ 4 1.3 Incorporation of sensory feedback ....... 5 2 Experiments with a 3 DOF hexapod 7 2.1 Implementation of the CPG with Arduino . . 8 3 Results and Discussion 8 3.1 Smooth transitions between gaits ........ 9 3.2 Concluding remarks ................. 10 Acknowledgments 11 References 11 Introduction We live in an exciting time for robotics. The comput- ing revolution that made powerful processing technol- ogy widespread, has contributed to the rise of domestic 3D printers, and being able to manufacture customized structures at a low cost, actuate them with off-the-shelf hardware, and control them with computers, has proven to be a winning combination for robotics. New designs keep appearing each day, in many occasions taking in- spiration from nature; this is the case of snake-type or legged robots, among others. But biologically-inspired robots often have many de- grees of freedom that present as a true challenge for traditional control approaches (i.e. centralized systems that compute motion patterns globally and control an ar- ticulated robot at the joint level)[1]. Whilst it is possible to solve some of those problems for controlled environ- ments, many algorithms are simply not prepared for the real world[2, 3]. It is here where neuroscience is an- swering many questions, and we are starting to see real world robots that not only look like, but also interact with the environment just as living creatures do. The mechanisms behind higher level motion plan- ning in animals -cognition- have been a subject of re- search for many decades, but the exact way in which the brain operates is yet a subject of speculation. What we know is that evolution has developed efficient ways to abstract very complex locomotion patterns, and turn them into simple control signals that can be effortlessly handled by the brain[1, 2, 3]. Given the intrinsic peri-

Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

arX

iv:1

509.

0241

7v1

[cs.

RO

] 8

Sep

201

5Independent Study Option report, April 2015

MSc in Computing (Spec. in Artificial Intelligence)Imperial College London

Central Pattern Generatorsfor the control of robotic systemsAuthor: Carlos GARCIA-SAURA

Supervisor: Prof. Murray SHANAHAN

AbstractBio-inspired control of motion is an active field of research with many applications in real world tasks.In the case of robotic systems that need to exhibit oscillatory behaviour (i.e. locomotion of snake-typeor legged robots), Central Pattern Generators (CPGs) are among the most versatile solutions. Thesecontrollers are often based on loosely-coupled oscillators similar to those found in the neural circuitsof many animal species, and can be more robust to uncertainty (i.e. external perturbations) thantraditional control approaches.This project provides an overview of the state-of-the-art in the field of CPGs, and in particular theirapplications within robotic systems. The project also tackles the implementation of a CPG-basedcontroller in a small 3D-printed hexapod.

KeywordsBio-inspiration, Robotics, Neuron-based oscillators, Computational models, Distributed motion control

Contents

Introduction 1

1 Computational Models of CPGs 2

1.1 Biological Neural Networks . . . . . . . . . . . . . 2Controlling locomotion with synaptic gating

1.2 Coupled oscillator networks . . . . . . . . . . . . 41.3 Incorporation of sensory feedback . . . . . . . 5

2 Experiments with a 3 DOF hexapod 7

2.1 Implementation of the CPG with Arduino . . 8

3 Results and Discussion 8

3.1 Smooth transitions between gaits . . . . . . . . 93.2 Concluding remarks . . . . . . . . . . . . . . . . . 10

Acknowledgments 11

References 11

IntroductionWe live in an exciting time for robotics. The comput-ing revolution that made powerful processing technol-ogy widespread, has contributed to the rise of domestic3D printers, and being able to manufacture customizedstructures at a low cost, actuate them with off-the-shelf

hardware, and control them with computers, has provento be a winning combination for robotics. New designskeep appearing each day, in many occasions taking in-spiration from nature; this is the case of snake-type orlegged robots, among others.

But biologically-inspired robots often have many de-grees of freedom that present as a true challenge fortraditional control approaches (i.e. centralized systemsthat compute motion patterns globally and control an ar-ticulated robot at the joint level)[1]. Whilst it is possibleto solve some of those problems for controlled environ-ments, many algorithms are simply not prepared for thereal world[2, 3]. It is here where neuroscience is an-swering many questions, and we are starting to see realworld robots that not only look like, but also interactwith the environment just as living creatures do.

The mechanisms behind higher level motion plan-ning in animals -cognition- have been a subject of re-search for many decades, but the exact way in whichthe brain operates is yet a subject of speculation. Whatwe know is that evolution has developed efficient waysto abstract very complex locomotion patterns, and turnthem into simple control signals that can be effortlesslyhandled by the brain[1, 2, 3]. Given the intrinsic peri-

Page 2: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 2/12

odicity of locomotion, it is reasonable to think that neu-ral circuits do not need to explicitly control the positionof every articulation, but rather modulate higher levelparameters such as the amplitude or frequency of eachgait[4, 5].

Often involved in motion control, Central PatternGenerators (CPGs) are biological neural networks thatproduce rhythmic output patterns without the need forsensory feedback. This means that either individual neu-rons or the way they are connected to each other, canlead to oscillatory dynamics that are useful for variousbiological functions (i.e. walking gaits, respiration, oreven circadian rhythms). These oscillatory neural cir-cuits have been studied in many animals such as stickinsects and cockroaches[6], sea angels[7], fish[2, 8] andother vertebrates such as the salamander[4], cats[9] andmice[10]. In the case of vertebrates, CPG circuits in-volved in locomotion are often situated in the spinalcord.

These pattern-generating neural networks as observedin biology have inspired roboticists, and it has alreadybeen possible to replicate locomotion behaviours in manyrobot designs. Some examples are the salamander-inspiredPleurobot[4] from EPFL, quadrupeds likeLynx[9] fromthe same university, the worm-likeCube Revolutions[5]from Univ. Autonoma de Madrid, or the stick-insectrobotHector[11] from Bielefeld University.

1. Computational Models of CPGs

Controllers based on central pattern generators can in-deed be very robust against uncertainties in the environ-ment (i.e. autonomous stepping over an obstacle thatappears in the way)[12], but whenever a robot needsto interact with the real world, delays in its responsemay still have dramatic consequences. Thus, real timedecision-making is crucial for these sort of interactions,so detailed simulations of biologically realistic CPGs(i.e. spiking networks of Hodgkin-Huxley neurons) arefrequently deemed too computationally intensive for robotcontrol. Rather, simplified models of CPGs have beendeveloped in order to facilitate their real-world imple-mentation and to meet those strict timing requirements.

1.1 Biological Neural NetworksIn this section we are going to focus on CPG implemen-tations that remain close to biology by modelling thedynamics of neural networks for motion control.

The first model that we are going to study is theRulkov maptype neuron. Whilst they are more efficient

to compute than continuous time models, these neuronscan still exhibit rich spiking dynamics (see Fig. 1) thatallow for implementations of central pattern generatorsthat closely resemble data from experiments with realganglia[13].

Figure 1. Typical wave forms of the spiking-burstingbehaviour generated by theRulkov mapfor two differ-ent sets of parameters. From [13] by N.F. Rulkov.

The basic unit of a biological CPG is thehalf-centre,which consists in two neurons (or populations) that can-not generate rhythmic activity by themselves, but mayoscillate when coupled reciprocally (see Fig. 2).

Figure 2. CPG half-centre implemented with theRulkov map model. NeuronsR andP negotiate a com-mon rhythm through mutual inhibition, which resultsin anti-phase synchronization. The motoneuronM pro-duces a control signal (blue), an oscillation of the con-trolled joint. Reprint from [14] by F. Herrero Carron.

Page 3: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 3/12

A half-centre is said to work inescapemode if theoff neuron turns on afterescapingfrom inhibition, andsimilarly, thereleasemode means that the neurons turnon afterbeing releasedfrom inhibition. Variations inthe properties of each synapse can produce very differ-ent coalition results in a broad range: from the com-plete synchrony of firings (in counter-phase or coherentphase) to completely decoupled oscillations[1, 2, 3, 14,15].

In legged systems, for example, flexion and exten-sion of a joint should never occur simultaneously. Wecan achieve this by using pairs of CPG half-centres cou-pled in anti-phase to control them (see Fig. 3). As innature, flexor and extensor muscles alternate to achievefull oscillatory patterns.

We have already seen theRulkov map, but anotherneuron model that has been used in plenty of research inthis field is theleaky integratortype. This non-spikingmodel is based on a set of differential equations that arecapable of representing either individual non-spiking inter-neurons or the firing rate of a population[6, 10, 16].

Figure 3. (a) Two coupled half-centres, for the controlof flexion (V3) and extension (V4) of one of the jointsin a robot leg. Excitatory synapses are represented aswhite triangles, and inhibitory synapses with black cir-cles. Output wave forms (b) were obtained with theleaky integratorneuron model. The nature of the sen-sory input atV1 andV2 will be studied in further sections.Reprint from [6] by M.A. Klein et al.

1.1.1 Controlling locomotion with synaptic gatingCoupling between CPGs is often achieved with the di-rect excitation/inhibition of neurons between each os-cillatory source. Synaptic gating, however, allows forricher interactions, as it provides neurons with the abil-ity to dynamically alter the strength of some other synapsewithin the network. This means that it can either facil-itate or suppress the communication between two otherneurons. An example implementation that demonstratesthis effect is shown in Figure 4.

Figure 4. Gating effect of a context neuronCo. C isa control neuron that oscillates. Synaptic conductancescan be set in such way thatCo controls whether neuronsG1 andG2 operate within or outside their range, henceswitching their ability to propagate the activity fromCany further. In this case onlyG2 can conduct whenCo

is silent. But whenCo becomes active, it excitesG1

(allowing it to conduct) and inhibitsG2. Reprint from[6] by M.A. Klein et al.

These methods make it possible to achieve a widerange of modulations in the locomotive patterns pro-duced by a biological neural network[1, 2, 6]:

• The frequency of oscillation can be controlled byvarying the input current for neurons within a CPGhalf-centre.

• Gating the output of the CPG allows for amplitude-controlled oscillations.

• Also, an asymmetric modulation of the couplingsbetween two half-centres can produce variationsof the duty cycle.

Page 4: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 4/12

There are many examples of real-world robots thatuse CPG implementations based on biological neuralnetworks. TheRulkov mapneuron model has been demon-strated for the control of snake-type robots[14, 17] aswell as in robots with limited wheels that move by meansof oscillations[18]. Theleaky integratorneuron modelhas been used in robot controllers for quadrupeds[10]and insects[16].

Many other biological models are available[1, 3],and incorporating richer dynamics such asdecaying synapsesto these networks can also be useful to better replicatewhat is observed in nature[6].

1.2 Coupled oscillator networksAnother approach towards the implementation of cen-tral pattern generators in robots is to move away frombiology, and make use of mathematical models of syn-chrony such as theKuramotooscillators. Rather thantrying to explain rhythmogenesis, these models focus onthe study of the effects of inter-oscillator couplings, andassume the presence of underlying oscillatory mecha-nisms.

Even though the models are simple, it is still possi-ble to replicate many of the characteristics that appear innature. For instance,Salamandra roboticafrom EPFL(see Figs. 5 & 6) successfully demonstrated a smoothtransition between the walking and swimming gaits[4].

Figure 5. Connectivity within the controller ofSala-mandra robotica. The arrangement of oscillators mim-ics the spinal cord of a lamprey[2] where salamanderlimbs have been added. Sensory feedback is not incor-porated into the CPG in this case. Instead, each actua-tor has a PD controller that ensures an accurate motion.Reprint from [4] by A.J. Ijspeert et al.

The controller ofSalamandra roboticais very inter-esting indeed, as it was built upon four biological hy-potheses:

1. The salamander has a body CPG that spontaneouslyproduces traveling waves (swimming gait) suchas the one produced by the lamprey[2] when acti-vated with a tonic drive signal.

2. Limb CPGs have lower intrinsic frequencies thanthe segments or body oscillators.

3. When the limb CPG is activated, it forces thewhole system into walking mode. To achieve this,limb→ segmentcouplings are kept stronger thansegment→ segmentinterconnections.

4. Limb CPGs cannot oscillate at high frequencies,so they saturate at high levels of drive. The natu-ral swimming gait can then take over control.

Altogether, the resulting controller can efficientlyactuate two different gaits in a 10 DOF robot with onlyone input signal (see Fig. 6). The direction of loco-motion can also be controlled with an additional inputsignal that modulates the oscillations of each side of thespinal cord.

Figure 6. Gait transition from walking to swimming inSalamandra robotica, for one side of the spinal cord. Awalking gait arises at low levels of drive. When limb os-cillators saturate, the swimming gait takes over control.The red vertical markers show both a standing wave forwalking and a traveling wave for swimming. Reprintfrom [4] by A.J. Ijspeert et al.

For this study we wanted to better understand howthese oscillator networks worked at a lower level, but

Page 5: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 5/12

the ten degrees of freedom of the salamander robot dis-couraged a re-implementation. Instead, we found an-other project from the same laboratory: a fish robot withthree degrees of freedom (see Fig. 7).

Figure 7. Diagram of the CPG-based controller for a3 DOF fish robot. The three oscillatory centres controlone caudal and two pectoral fins. Sensory feedback willbe further discussed in the next section. Reprint from[8] by A. Crespi et al.

The CPG model for the fish robot is indeed muchmore simple than the one of the salamander, but on theother hand it can show in a more intuitive way basicconcepts such as oscillation coupling and rhythm nego-tiations (see Fig. 8).

Figure 8. CPG limit cycle for the fish robot. The up-per panel shows the output wave forms for the threereciprocally-coupled oscillators. Following random ini-tial conditions, the system quickly stabilizes into coher-ent synchrony. The steady state is also rapidly reachedafter adding random perturbations to the state variables(r,φ ,x) at t = 2s. Reprint from [8] by A. Crespi et al.

Among other robots that use mathematical modelsof synchrony in the form of coupled oscillator networks

are quadrupeds likeLynx[9] also from EPFL, andPneu-pard[19] from Osaka University.

1.3 Incorporation of sensory feedback

In the case of the fish robot, sensory feedback was incor-porated by directly modulating the parameters withinthe CPG according to predefined gaits. For instance, thefish robot has two light intensity sensors, one on eachside, that were used to achieve a photo-taxis behaviourwith a Braitenberg vehicle approach[8] (the oscillationof each pectoral fin is modulated by the light intensityperceived in the opposite side; this has the effect of therobot turning towards light sources in the environment).

Whilst such an approach can work well for simpleneural networks, a more interesting and biologically re-alistic method would incorporate sensory informationby encoding system-wide behavioural reflexes into thenetwork itself.

For instance, lets recall that both the salamanderand fish robot rely on PD controllers that ensure thateach motor joint reaches a target angle, calculated bythe pattern-generating network. Those PD controllersare indeed using information from rotation encoders atthe joint level, so why not directly incorporate that in-formation into the CPG instead? In nature, this sim-ple form of sensory feedback is at the muscular level,wherestrech or edgecells can sense muscle contrac-tions, and feed them back into the network. In humans,these cells play a very important role in the spatial per-ception of the body (proprioception). This approach isalso much more robust against uncertainty in externalperturbations than open loop CPG controllers.

However, until very recently this feedback conceptcould not be exploited in real robots due to the elevatedcost of high precision rotatory encoders. Instead, vir-tual stretch cell models (such as thelinear Hill mus-cle model) were developed in order to achieve realis-tic neuro-mechanicalsimulations. This concept is dis-cussed in Figure 9.

Other simple forms of sensory feedback arefootcontactsensors. Recent studies have shown that hairfibres present in the feet of rats (carpal vibrissae) be-have as contact sensors that influence the kinematics oflocomotion[20]. Whilst the incorporation of such feed-back into CPG networks is far from trivial, these kindof sensors have the advantage of greater simplicity andlower implementation cost than rotatory encoders.

Page 6: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 6/12

Figure 9. For a lamprey-like robot,A shows the forcesacting on link i: muscular torquesTi and Ti−1, waterforcesWi , and inner forces from neighbouring linksFi

andFi−1. In B we can see the schematic representationof three joints. Each spring-dampener assembly is usedto model a single muscle and its interaction with waterforces. The spring constants are changed by the activ-ity of the corresponding motoneuron in the CPG. Withthis model, it is possible for the network to change boththe total bending force and the local stiffness of eachsegment in the body. Reprint fom [2] by O. Ekeberg.

The last sensory input related to locomotion that de-serves a mention is the vestibular system. Placed inthe inner ear of most mammals, it plays an essentialrole in balance. One of the best examples is bipedalwalking, where equilibrium perception is seamlessly in-corporated into the neural mechanisms responsible formotion control. CPG-based robot controllers can alsobenefit from this form of input by using off-the-shelfaccelerometers.

As a final remark for this section, we must say thatCPGs often have many parameters that need to be finelyadjusted in order to achieve an efficient locomotion. Theautomatic entrainment of these models is still a subjectof research[21, 22, 23].

Though there is plenty of software available for thesimulation of robots, only few combine environment

physics with neuron dynamics. The free version ofAni-matLab1 provides a nice toolbox for basic experimenta-tion, but more powerful open-source tools such asneu-roConstruct2 andgeppetto3 are being developed thanksto the efforts of theOpenWorm4 project.

1http://animatlab.com/2http://www.neuroconstruct.org/3http://www.geppetto.org/4http://www.openworm.org/

Page 7: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 7/12

2. Experiments with a 3 DOF hexapod

For the experimental part of this study, we decided toimplement a CPG controller for a small 3D-printed hexa-pod robot5 (see Fig. 10). Since it has three degrees offreedom, it was the perfect candidate for a re-implementationof the controller presented in“Controlling swimmingand crawling in a fish robot using a central pattern gen-erator” by A. Crespi et al.[8]

Figure 10. Micro-hexapod used for the experiments.The robot is composed of eight 3D-printed parts (inwhite and green), nine screws, and three servomotors(blue). The three degrees of freedom consist in twopairs of mechanically-coupled legs at each side, andalso a middle joint that selects which of the sides makesground contact.

Our motivation for using the fish model as a ref-erence implementation was that its oscillatory networkmodel is very similar to the one employed inSalaman-dra robotica[4] from EPFL. With three degrees of free-dom instead of ten, the fish robot seemed like a betterchoice as a didactic exercise.

The CPG is built upon amplitude-controlled phaseoscillators derived from the Kuramoto model of syn-chrony. Next, we will show the set of differential equa-tions that define the network:

φi = ωi +∑j[ωi j r j sin(φ j −φi −ϕi j )] (1)

r i = ar(ar

4(Ri − r i)− r i) (2)

5Originally designed by Ijon Tichy:http://www.thingiverse.com/thing:5156/

xi = ax(ax

4(Xi −xi)− xi) (3)

θi = xi + r i sin(φi) (4)

Where:

• θi is the output angle of each oscillatory centre• φi , r i andxi are the state variables that encode the

variation in time of every phase, amplitude andoffset

• The control parameters for each oscillator areωi

(natural frequency),Ri (target amplitude) andXi

(target offset).• ar andax are constant positive gains for Eqns. (2)

and (3). In our case:ar = ax = 2 rad/s.• Finally, ωi j andϕi j are respectively the coupling

weights and phase biases that determine how os-cillator j influences oscillatori.

The only change we made to the original equationsin [8] was to replace the cosine function in Eqn. (4) witha sine. That way, the reference positions of the joints inthe hexapod robot -corresponding to zero offset- matchwith the lateral segments being perpendicular to the body,and with a flat position of the middle segment (the sameposture as in Fig. 10).

Equations (2) and (3) are critically-dampened second-order differential equations with stable fix pointsRi andXi respectively. With them it is possible to smoothlymodulate the amplitude and offset of the oscillations inreal time.

The three oscillatorsi = 1,2,3 correspond to themiddle, left and right joints of the robot respectively, forwhich the maximum oscillation amplitudes areAmiddle=12◦, Ale f t =Aright = 40◦. A schematic diagram with theemployed topology is shown in Figure 11.

As in Crepi’s article, each of the three oscillatorswere set to the same natural frequencies (ωi = ω). Ini-tially, the coupling parameters were set to:

ωi j = 0.5 [1/s] ∀i 6= j, ωii = 0.0 [1/s],ϕi j = 0.0 [rad/s] ∀i 6= j, ϕii = 0.0 [rad/s].

In other words: the network is fully connected, butthere are no self-couplings, and (originally) no phase bi-ases. With these parameters, the system converges intoa regime where the phases (state variablesφi) grow lin-early with a common rateω and zero phase differencebetween the oscillators.

For the robot hexapod, gait information would needto be encoded into the phase biasesϕi j . Since the orig-inal paper was instead modulating the target offsetsXi

Page 8: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 8/12

and amplitudesRi, our model usedRi exclusively as asmooth transition between the static state (zero ampli-tude orRi = 0◦) and motion, andXi was not necessary.

Figure 11. Diagram of the CPG-based controller imple-mented for the hexapod robot. A high level layer (red)modifies the control parameters in real time in order todetermine the gait. The three oscillatory centres (green)are coupled with constant weights. Their outputθi isfed into the PID controller of each servomotor.

With this topology it is possible to define the follow-ing walking gaits:

• Forward walking is achieved by settingω21 = ω31 = 0.5 [1/s], ωi j = 0.0 [1/s] otherwise,ϕ21 = π/2 [rad], ϕ31 =−π/2 [rad],

• Backward walking simply requires a shift in thephase couplings:ω21 = ω31 = 0.5 [1/s], ωi j = 0.0 [1/s] otherwise,ϕ21 =−π/2 [rad], ϕ31 = π/2 [rad],

• Clockwise rotation is achieved withω21 = ω31 = 0.5 [1/s], ωi j = 0.0 [1/s] otherwise,ϕ21 = π/2 [rad], ϕ31 = π/2 [rad],

• Finally, counter-clockwise rotation usesω21 = ω31 = 0.5 [1/s], ωi j = 0.0 [1/s] otherwise,ϕ21 = π/2 [rad], ϕ31 = π/2 [rad],

2.1 Implementation of the CPG with ArduinoThe robot is controlled using a a ZUM BT-328 board6,which is based on the Arduino7 platform. The ordinarydifferential equations of the oscillator model were im-plemented using theEuler method8, with the followingupdate rule:

f o r ( i n t i =0; i<N; i ++) {f l o a t sA d = cW[ i ] ;f o r ( i n t j =0; j<N; j ++)

sA d += w[ i ] [ j ] ∗ s r [ j ] ∗s i n ( sA [ j ] − sA [ i ] − a [ i ] [ j ] ) ;

new sA [ i ] = sA [ i ] + T ∗ sA d ;

f l o a t s r d d = a r ∗ ( ( a r / 4 ) ∗( cR [ i ]− s r [ i ] ) − s r d [ i ] ) ;

new sr d [ i ] = s r d [ i ] + T ∗ s r d d ;new sr [ i ] = s r [ i ] + T ∗ s r d [ i ] ;

f l o a t sx dd = ax ∗ ( ( ax / 4 ) ∗( cX [ i ] −sx [ i ] ) − sx d [ i ] ) ;

new sx d [ i ] = sx d [ i ] + T ∗ sx dd ;new sx [ i ] = sx [ i ] + T ∗ sx d [ i ] ;

}

f o r ( i n t i =0; i<N; i ++) {sA [ i ] = new sA [ i ] ;s r [ i ] = new sr [ i ] ;sx [ i ] = new sx [ i ] ;s r d [ i ] = new sr d [ i ] ;sx d [ i ] = new sx d [ i ] ;o u t p u t [ i ] = sx [ i ] + s r [ i ] ∗

s i n ( sA [ i ] ) ;}

WhereT is the time step for the Euler method. Inour setup, we used a value ofT = 0.01s.

3. Results and DiscussionThe hexapod implementation was a very useful test-bedfor its simplicity, and we could experiment with a widevariety of parameters. For instance, we setϕ23 = ϕ32 =π rad so that the legs at both sides of the robot nego-tiated a counter-phase rhythm. Locomotion was thenachieved by coupling one of the sides uni-directionallywith the middle segment (ω12= 0.5 [1/s], ω12= 0.0 [1/s],ϕ12 = π/2 [rad]).

6http://www.bq.com/gb/placa-zum-bt/7http://www.arduino.cc/8https://en.wikipedia.org/wiki/Euler_method

Page 9: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 9/12

Figure 12. The graph shows how the CPG network is capable of recovering from random perturbations. The upperpanel displays the CPG output (angles for each motor joint).The state variables for the central joint are plotted inthe lower panel. Vertical markers have been placed to signalthe points where the perturbations were introduced;these would correspond to interactions with the environment (i.e. an obstacle in the way).

Another effect that we evaluated was the ability ofthe CPG to synchronize even when each oscillator hada different natural frequency. In a centralized approachwith no couplings, slight variations of the intrinsic fre-quencies can lead to inconsistency in the gaits over time,due to phase drift. We could observe instead how theCPG corrected those slight phase differences seamlesslyin real time, even after perturbations had been appliedto the state variables (see Fig. 12).

3.1 Smooth transitions between gaitsWe also tried to achieve a similar gait transitioning ef-fect as the one in the salamander robot[4]. By settingdifferent natural frequencies for each oscillator, our in-

tention was to create multiple resonant states (gaits) thatarised at different levels of drive. At low frequenciesthe robot would for instance rotate in place, but upon afrequency increase a new forward gait would be negoti-ated among oscillators. Unfortunately we were not ableto make this work, so more experimentation (i.e. theincorporation of additional oscillators into the network)would be needed.

Such a topologically-based control approach wouldnot only be more realistic in biological terms, but alsomore interesting in regards to sensory input manage-ment. For instance, joint-level feedback would allowto detect collisions with obstacles in the ground, elicit-ing obstacle-avoidance behaviour and thus producing a

Page 10: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 10/12

Figure 13. Transitions between modes of locomotion for the 3 DOF hexapod robot. The CPG-based controller wasused in order to achieve smooth convergence into the desiredpattern after each change of parameters. The verticalbars att = 12s andt = 20s show the instants when locomotion parameters were updated.The amplitudes of eachCPG have been normalized with the following values:Ale f t = Aright = 40◦, Amiddle= 12◦.

more efficient locomotion.Rather than using a topological control approach,

we achieved smooth transitions between each gait usingthe same method as in the fish robot paper[8]. It basi-cally employs the stability properties of CPG networksto automatically negotiate oscillations after abruptly chang-ing their coupling parameters (see Fig. 13). This is avery simple method, but it demonstrates the flexibilityof CPGs for both high-level and low-level motor con-troller implementations.

3.2 Concluding remarksEvolution has developed biological neural networks withpattern-generating properties (CPGs) as an abstractionthat facilitates efficient locomotive behaviour in animals.Scientific research has later developed methods to em-ploy such abstractions in real-world problems.

This project has studied the applications of artificialcentral pattern generators in the field of robotics. Thestate-of-the-art has been reviewed, and the most usefultechniques have been shown, together with examples oftheir applications in real world robots. The project hasalso tackled the implementation of a CPG-based con-troller in an hexapod with 3 degrees-of-freedom, andsuccessfully demonstrated its ability to smoothly transi-

tion between various walking gaits. The robustness ofthe CPG has also been evaluated against random pertur-bations in the environment (c.f. Figs. 12 & 13).

Bio-inspired controllers based on central pattern gen-erators are already having a remarkable impact in robotics.Furthermore, given the latest advances in low-cost man-ufacture (a combination of 3D printing technology withof-the-shelf sensors and actuators), it will be very inter-esting to see what novel robot designs appear in the nearfuture.

Page 11: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 11/12

Acknowledgments

I would like to thank Professor Murray Shanahan forhis constant enthusiasm in neuroscience and insightfuladvice for this project.

References[1] Auke Jan Ijspeert. Central pattern generators for

locomotion control in animals and robots: A review.Neural Networks, 21(4):642 – 653, 2008. Roboticsand Neuroscience.

[2] Orjan Ekeberg. A combined neuronal and mechan-ical model of fish swimming.Biological Cybernet-ics, 69(5-6):363–374, 1993.

[3] Scott L. Hooper. Central pattern generators.Cur-rent Biology, 10(5):R176 – R179, 2000.

[4] Auke Jan Ijspeert, Alessandro Crespi, DimitriRyczko, and Jean-Marie Cabelguen. From swim-ming to walking with a salamander robot drivenby a spinal cord model.Science, 315(5817):1416–1420, 2007.

[5] F. Herrero-Carron, F.B. Rodrıguez, and P. Varona.Bio-inspired design strategies for central patterngenerator control in modular robotics.Bioinspira-tion & Biomimetics, 6(1):016006, 2011.

[6] MatthewA. Klein, NicholasS. Szczecinski, RoyE.Ritzmann, and RogerD. Quinn. Simulated neu-ral dynamics produces adaptive stepping and stabletransitions in a robotic leg. InBiomimetic and Bio-hybrid Systems, pages 166–177. 2014.

[7] Y. I. Arshavsky, T. G. Deliagina, G. N. Orlovsky,Y. V. Panchin, L. B. Popova, and R. I. Sadreyev.Analysis of the Central Pattern Generator for Swim-ming in the Mollusk Clione. Annals of the NewYork Academy of Sciences, 860(1):51–69, Novem-ber 1998.

[8] Alessandro Crespi, Daisy Lachat, Ariane Pasquier,and AukeJan Ijspeert. Controlling swimming andcrawling in a fish robot using a central pattern gen-erator.Autonomous Robots, 25(1-2):3–13, 2008.

[9] Peter Eckert, Alexander Sprowitz, Hartmut Witte,and Auke Ijspeert. Comparing the effect of dif-ferent spine and leg designs for a small, boundingquadruped robot. 2014. Dynamic walking 2014,Zurich, June 10, 2014 – June 13, 2014.

[10] Alexander Hunt, Manuela Schmidt, Martin Fischer,and RogerD. Quinn. Neuromechanical simulationof an inter-leg controller for tetrapod coordination.In Biomimetic and Biohybrid Systems, pages 142–153. 2014.

[11] Axel Schneider, Jan Paskarbeit, Mattias Schaeffers-mann, and Josef Schmitz. Hector, a new hexapodrobot platform with increased mobility - control ap-proach, design and communication. InAdvances inAutonomous Mini Robots, pages 249–264. SpringerBerlin Heidelberg, 2012.

[12] Fernando Herrero-Carron, Francisco B. Rodrıguez,and Pablo Varona. Studying robustness againstnoise in oscillators for robot control. InInterna-tional conference on automation, robotics and con-trol systems, pages 58–63, July 2010.

[13] Nikolai F. Rulkov. Modeling of spiking-burstingneural behavior using two-dimensional map.Phys-ical Review E, 65(4):041922+, April 2002.

[14] Fernando Herrero Carron. Novel central pat-tern generator elements for autonomous modularrobots. PhD thesis, Universidad Autonoma deMadrid, 2011.

[15] Fernando Herrero-Carron, Francisco de BorjaRodrıguez Ortiz, and Pablo Varona. Dynamicalinvariants for cpg control in autonomous robots.In ICINCO (2), pages 441–445. INSTICC Press,2010.

[16] NicholasS. Szczecinski, JoshuaP. Martin, RoyE.Ritzmann, and RogerD. Quinn. Neuromechanicalmantis model replicates animal postures via biolog-ical neural models. InBiomimetic and BiohybridSystems, pages 296–307. 2014.

[17] Joseph Ayers, Nikolai Rulkov, Dan Knudsen, Yong-Bin Kim, Alexander Volkovskii, and Allen Selver-ston. Controlling underwater robots with elec-tronic nervous systems.APPLIED BIONICS ANDBIOMECHANICS, 7(1):57–67, 2010.

[18] I Urziceanu, F Herrero-Carron, J Gonzalez-Gomez,M Nitulescu, F B Rodrıguez, and P Varona. Centralpattern generator control of a differential wheeledrobot. In Int. Conference on System Theory, Con-trol, and Computing (ICSTCC), pages 1–6, 2011.

[19] Andre Rosendo, Xiangxiao Liu, Shogo Nakatsu,Masahiro Shimizu, and Koh Hosoda. A combined

Page 12: Central Pattern Generators for the control of robotic systemsCentral Pattern Generators for the control of robotic systems — 2/12 odicity of locomotion, it is reasonable to think

Central Pattern Generators for the control of robotic syste ms — 12/12

cpg-stretch reflex study on a musculoskeletal pneu-matic quadruped. InBiomimetic and Biohybrid Sys-tems, pages 417–419. 2014.

[20] Thomas Helbig, Danja Voges, Sandra Niederschuh,Manuela Schmidt, and Hartmut Witte. Characteriz-ing the substrate contact of carpal vibrissae of ratsduring locomotion. InBiomimetic and BiohybridSystems, pages 399–401. 2014.

[21] DavidJohan Christensen, Alexander Sprowitz, andAukeJan Ijspeert. Distributed online learning ofcentral pattern generators in modular robots. InFrom Animals to Animats 11, pages 402–412. 2010.

[22] Fernando Herrero-Carron, FranciscoB. Rodrıguez,and Pablo Varona. Flexible entrainment in a bio-inspired modular oscillator for modular robot loco-motion. InAdvances in Computational Intelligence,volume 6692 ofLecture Notes in Computer Science,pages 532–539. Springer Berlin Heidelberg, 2011.

[23] Chengju Liu, Qijun Chen, and Danwei Wang. CPG-inspired workspace trajectory generation and adap-tive locomotion control for quadruped robots.IEEETrans Syst Man Cybern B Cybern, 41(3):867–880,June 2011.