Вы находитесь на странице: 1из 6

A CPG-Based Model for Gait Synthesis in Legged Robot Locomotion

J. Cappelletto1 , P. Estévez1 , J. C. Grieco1 , G. Fernández-López1 , M. Armada2

Universidad Simón Bolı́var, Grupo de Mecatrónica.
Sartenejas 1080-A. Miranda, Venezuela
Instituto de Automtica Industrial - CSIC. 28500 Madrid, Spain
email: cappelletto@usb.ve, jcgrieco@usb.ve

Abstract— In this paper it is described the implemen- cluding additional inputs to the FFNN, the leg trajec-
tation of a Central Pattern Generator for quadruped lo- tory can be modulated in order to control any specific
comotion using a feedforward neural network and am-
plitude controlled oscillators. The oscillators were used feature of the leg movements like step length, for exam-
to generate the phase references between legs, acting as ple.
pacemakers. The neural network subsystem was used to The work described in this paper proposes an archi-
perform an nonlinear space transformation from those
phase references into leg actuator’s space, thus providing tecture that uses ACPO as interleg coordination sub-
motor angle references for the motor controllers. This system, and a FFNN with sigmoidal transfer function,
subsystem is able to modulate the spatial trajectory of to transform the output of the previous system into an-
the tip of the leg, allowing further control actions be
taken by external system. A 3-DOF per leg quadruped gle references for the motor-actuated joints of each leg.
was used as mechanical platform, with reptile like con- This papers is organized as follows: Section II describes
figuration. Measurements were taken from the robot the robotic platform and software used for the exper-
platform accelerations and ground contact sensors, and
compared against those taken for an standard geometri-
iment, in order to evaluate the architecture here de-
cally described gait generator. scribed. The whole gait generator system is described in
Keywords— CPG, Quadruped, Gait, Neural Networks Section III, including the phse reference subsystem, the
neural network architecture and its training method.
Experimental results are shown and discussed in Sec-
I. Introduction tion IV and the final conclusions are given in SectionV.
Biological systems have been used as source of in-
spiration to solve several problems in the robotic field, II. Experiment description
ranging from animal behaviour to gait modeling. Nowa- As robotic platform it was used a small quadruped
days, it’s widely accepted that motion control process (240 x 190 mm) with reptile like leg posture, and 3-
is performed in the spinal chord by the Central Pat- DOF legs directly actuated by Futaba HS-475 servos.
tern Generator (CPG). Combining high level brain sig- For motor control a SSC-32 servo driver by Lynxmotion
nals with low level sensory feedback, this system is able was used. As sensors, there were used 4 Z-Axis ±1.5g
to coordinate the neuromuscular excitation in order to accelerometers (MMA1260D) and one 3-Axis ±1.5g ac-
achieve desired leg movements. Some authors have pro- celerometer (MMA7260Q) by Freescale. Four Flexiforce
posed to model the CPG using recurrent neural net- pressure sensors were also used in order to measure
works like those described by Beer et al.[3]. CTRNNs ground contact at the tip of each leg. Measures were
have the ability to model dynamical systems [7], but taken using a HC908GP32 microcontroller, and inmedi-
for legged robot locomotion they have been used under atly sent to the data adquisition software through serial
various architectures for different gait patterns, without link at a rate of 16 samples per second per channel. In
solving in a clear way the transition between those lo- Figure 1 it’s shown the robot configuration and sensors
comotion modes. In order to synthesize a CTRNN that placement.
models a CPG, Genetic Algorithms (GAs) are widely
used; but no analytical methods have been fully devel-
oped yet.
Another approach is the use of differential equations
to describe the dynamics of the locomotion system.
The amplitude controlled phase oscillators (ACPO) de-
scribed in [2] introduce a way to generate temporal ref-
erences for leg locomotion in quadrupeds, solving the
interleg coordination problem. By the use of an exter-
nal input, it is possible to make soft transitions between
different gait patterns without any change in the system
architecture. However, some additions are needed in or-
der to coordinate internal movements of each leg joint.
By the use of simple feedfoward neural networks
(FFNN) it is possible to perform nonlinear space trans-
formation, between different kinds of temporal refer- Fig. 1. Experimental quadruped platform
ences into any arbitrary choosen leg trajectory[6]. In-
For online robot operation using the architecture here dimensional value in (X, Y ) cartesian plane. The dif-
propososed, it was developed a specific purpose applica- ferential equation for one oscillator is given by:
tion using C++ for Win32. The same program was used
to perform the neural network training process and data q̇ = F (q) + p (1)
adquisition. It was also used Labview 7.1 to develop
where q̇ denotes the state vector for that oscillator,
another interface to control and measure the platform,
F (q) is the variable state function and p is the pertur-
with an implementation of an standard geometrically
bation to the oscillator system. Applying coordinate
described stable gait.
transformation from (X, Y ) cartesian space into polar
III. CPG architecture description coordinates (r, θ), we have that Eq. 1 becomes:

The central pattern generator is composed by two

main subsystems. The first one provides the temporal θ̇ = ω0 + pθ (2)
references for each leg, with phases differences given by ṙ = Fr (r, θ) + pr (3)
the gait mode. Those references are then modulated at
legs level by the spatial subsystem, that uses a neural Then, for two oscillators q1 and q2 the coupling rela-
network to transform two dimensional phase signals into tion is θd = θ2 −θ1 ≈ const. In [2] it is described how to
three dimensional reference for leg joints. The sepa- predict the temporal evolution for θd for two oscillators
ration into two subsystems allows this CPG model to and a given coupling relation. Also, it is proposed the
deal with changes in the mechanical platform. Beacuse base model for the ACPO:
gaits in walking machines are described by the phase
relations between leg signals, and the spatial trajectory      T
described by each leg, then the gait adaptation process ro ro
q̇ = g p −1 x−yω, g p −1 y−xω
can be done acting in the correct subsystem. Figure 2 x2 + y 2 x2 + y 2
illustrates the system diagram for the CPG architecture (4)
described. This system convergs to a limit cycle that describes
a perfect circle with radius ro and a natural frequency
ω. For the walking control of a quadruped are required
four oscillators, that being fully interconected yields to
the following set of equations:

q̇1 = FACP O (q1 ) + pc (q2 ) + pc (q3 ) + pc (q4 ) (5)

q̇2 = FACP O (q2 ) + pc (q3 ) + pc (q4 ) + pc (q1 ) (6)
q̇3 = FACP O (q3 ) + pc (q4 ) + pc (q1 ) + pc (q2 ) (7)
q̇4 = FACP O (q4 ) + pc (q1 ) + pc (q2 ) + pc (q3 ) (8)

pc (qi ) = λ [xi , yi ] (9)
where q̇ = FACP O (q), and pc (qi ) are the transfor-
mated perturbation vectors due to oscillators coupling.
Fig. 2. CPG system architecture Details on this equations set are described in [2]. By us-
ing the Eq. 10 it’s possible to achieve continuous tran-
sition for the coupling relations, and therefore different
Each subsystem is described and implemented as fol- walking modes with a single input parameter Pmode .
1 1
A. Temporal reference subsystem θR,1 = 1+ (10)
4 1 + e−20(Pmode −1.5)
This subsystem performs the phase references gen-  
1 2 1
eration for coordinated leg movements. It was im- θR,2 = (Pmode − 1) + (11)
plemented using amplitude controlled phase oscillators
4 1 + e−20(Pmode −1.5)
(ACPO), introduced by Buchli [2]. This method was 1 1
θR,3 = 1− (12)
preferred to those based in recurrent neural networks 2 1 + e−20(Pmode −1.5)
as nonlinear oscillators because it provides a simpler
approach to synthesize temporal signals, and less in- A.1 Support phase factor
put parameters are involved. The ACPO consists into While the ACPO provides a way to synthesize phase
oscillators, phase coupled through the differential equa- locked oscillators for each leg, it remains necessary to
tions that describe the temporal evolution of the system include the support phase factor β. This support factor
states. Each oscillator can be representated by its two is the quotient between the duration of support phase
τs , when the tip of the leg remains in contact with the
support surface, and the whole period for a single leg  
step τstep . The support factor β range goes between X
yi = σ  wj · Ij + θj  , i = 1, · · · , K (14)
0 and 1, being necessary a value greater than 0.75 for
statically stable gait in quadruped locomotion.
A compansion curve is applied to the normalized where yi is the output for each neuron, wij are the in-
phase for each leg state vector (r, θ), with β as input. terconection weights, Ij the neuron inputs and θj a bias
The compansion curve c(x, β) is composed by two lin- term. For our implementation there were used from 5
ear segmentes described by Eq. III-A.1. The resulting to 40 neurons for the hidden layer and 3 neurons for
curve is shown in Figure 3. the output layer, one for each leg motor. At input level
it has the two dimensional output vector of the tempo-
( x
2β x≤β ral subsystem. Figure 4 shows the general neural net-
c(x, β) = x 1


work architecture. This network structure is repeated
2(1−β) + 2 1− 1−β x>β
for each leg.

Fig. 4. Neural network architecture

Fig. 3. Compansion curve c(x, β)

The extra Control input allows trajectory deforma-
tion by training the network with the desired trajec-
After applying the compansion curve, each state vec- tory output for a given input value. A linear trans-
tor was transformated back to its (X, Y ) cartesian rep- formation stage is required to convert sigmoidal out-
resentation with the original radius (r) value and the puts values varying from 0 to 1, into motor angles using
new phase θc = c(θ, β). ymotor = m.x + b.

B. Spatial transformation subsystem B.2 FFNN training process

The nonlinear space transformation between phase In order to synthesize the wij and θj parameters for
references and motor angle references are performed by each neuron it was used the well known backpropaga-
a simple feedforward neural network. This subsystem tion training algorithm. Because the neural network is
allows to cope with leg kinematic, and modulate spa- used as waveform approximator, the training examples
tial leg trajectory. At this level, gait parameters like are obtanied applying the inverse kinematics of the leg
step length and trajectory height can be included and to a geometrically defined trajectory in R3 space. The
controlled at the network training process. complete training scheme is shown in Figure 5.
As reference trajectory it was used a rectangle de-
B.1 Feedforward Neural Network scribed by its length, heigth and separation to leg ref-
erence system center (Xo , Yo , Zo ).
The neural network here used had two layers: the hid-
The training process parameters are:
den layer and the output layer. Because the motor an- • Training method: Gradient descent backpropagation
gle reference is mechanically bounded between -90 and without momentum, one neuron adjust per iteration.
+90 degrees, it was used the standard logistic sigmoid • Error function: Least Mean Square (LMS) error for
function as neuron kernel: waveform approximation.
• Learning rate: 0.01
σ(x) = (13) • Number of iterations: from 500 thousands to 2.5 mil-
1 + e−x
The complete transfer function for each neuron is • Stop condition: LMS error for 100 output points lower
given by Eq. 14. then 1% or number of iterations reached.
Fig. 7. Gait generator with DF

IV. Experimental results

Following the neural network training process dis-
Fig. 5. Neural network training scheme cussed in Section III-B.2, there where obtained 3 dif-
ferent networks:
• NN3: Hidden layer (12 neurons), Number of itera-
tions (800.000)
• NN1: Hidden layer (25 neurons), Number of itera-
tions (800.000)
• NN2: Hidden layer (25 neurons), Number of itera-
tions (2.000.000)
For training example it was used a rectangle as shown in
Figure 6 with L = 65mm, H = 140mm, dH = 50mm.
For the compansion curve it was employed a support
factor β = 0.875. Then, each trained network was used
with the outputs coming from the ACPO subsystem. To
solve differential equations for the temporal subsystem
it was employed Euler technique, with an Euler step
of 0.002; the others ACPO parameteres were: r = 1,
g = 250, λ = 2, and ω = 2π. Using these parameters
Fig. 6. Rectangular reference trajectory the robot was operated online an measurements taken
from onboard sensors. In Figures (8)(9)(10) are shown
the sensors outputs waveforms for each trained neural
C. Geometrically described gait

In order to evaluate the CPG based model for lo-

comotion previously described, it was also developed
a geometrically described gait generator. This genera-
tor produces direct leg position references through time,
that are inmediatly converted into motor joints angles
with the inverse leg kinematics. The spatial references
are obtained with a linear ramp between 0 and 1 as
temporal signal, that allows to describe in a parametric
way the same rectangular trajectory shown in Figure 6.
The model includes a displacement factor (DF ) that
control the swing of the mechanical platform in the
(X, Y ) plane (parallel to ground surface). This factor
is used to increase the statical stability margin of the
robot, by approaching the geometrical center of the ro-
bot (gc) to the teorethical center of the support polygon
(pc). A DF = 0 implies that no swing action is taken,
and for DF = 1 produces that gc matchs pc. Figure
7 shows the gait generation using the geometrical de- Fig. 8. Sensors measurements for network NN1
scription and the displacement factor DF .
its frequency and amplitude was lower than the previ-
ous case. These vibrations are due to overfitting in the
training process; the number of hidden units is directly
related to the oscillation frequency beacuse each hidden
neuron increase the order of the whole neural network
as waveform approximator.
For the experiment with the geometrically (GEO) de-
scribed gait it was observed a more stable behaviour
due to the DF factor. Figure (11) and (12) shows the
values for the 3-Axis accelerometer and the 4 Z-Axis
accelerometers, respectively.

Fig. 9. Sensors measurements for network NN2

Fig. 11. 3-Axis accelerations measurements for GEO

Fig. 10. Sensors measurements for network NN3

Fig. 12. 4 Z-Axis accelerations measurements for GEO

During robot walking it was observed that the gen-
erated gait was marginally stable. For β values lower
than 0.8 the robot platform was not stable any more. Both figures shows accelerations within a range ap-
This can be explained by the presence of the neural net- proximated for the accelerations observed in the previ-
work, that tries to perform an approximation for the ous cases. However it must be pointed the presence of
rectangular waveform, but having difficulties with the some peaks for X axis accelerations, marked as P k in
corners. This produces that real support factor may be Figure 11. This behaviour can be controlled acting on
lower than the desired one, reducing the platform sta- DF parameter, because it acts directly on the XY plane
bility because the total support period for the four legs robot platform movement.
The sensors outputs show there is not significative V. Conclusions
difference in output range between the three trained In this work it was proposed and evaluated a new ar-
networks. However, during walking it was observed chitecture for CPG based quadruped robot locomotion.
that for networks with relatively high number of hidden This was done by the use of amplitud controlled phase
neurons, appeared a low level oscillation in the plat- oscillators and feedforward neural networks. It was also
form X − Y position. This ripple like behaviour it was tested a geometrically described gait in order to evalu-
also appreciated for low number of hidden neurons, but ate the effect of displacement factor DF during robot
locomotion, in order to increase stability margin.
Platform accelerations and ground contact measure-
ments were taken during online operation of robotic
platform. It was observed the effect of neural network
overfitting, that produced low amplitude oscillations
during walking. This is closely related to the number
of units in the hidden layer. Special care in this issue
is recommended to avoid stability problems in higher
speed walking modes.
Also it was pointed the effect that can have neural
network in support factor, reducing it due to waveform
approximation task. It is suggested to study another
neuron function kernels in order to reduce this problem.
By including additional control inputs to the network,
it could be possible to achieve a higher level control
for robot platform variables, like main body inclination
and weight distribution by the use of accelerometers and
ground contact sensors.

[1] D. J. Todd Walking Machines. An Introduction To Legged
Robotics, Kogan Page Ltd. 1985
[2] J. Buchli and Auke Jan Ijspeert, Distributed Central Pattern
Generator Model for Robotics Application Based on Phase
Sensitivity Analysis, In Proc. of 1st. Intl. Workshop Bio-
ADIT. 2004
[3] Hillel J. Chiel, Randall D. Beer, John C. Gallagher, Evolu-
tion and Analysis of Model CPGs for Walking: I. Dynamical
Modules, Journal of Computational Neuroscience 7, pp 99-
118 (1999)
[4] Fukuoka Y., Kimura H. and A. H. Cohen, Adaptive Dynamic
Walking of a Quadruped Robot on Irregular Terrain Based on
Biological Concepts, Intl. Journ. of Robot. Res. Vol 22, No.
3-4. 2003, pp 187-202
[5] H. Kimura, Y. Fukuoka, Y. Hada and K. Takase, Three-
Dimensional Adaptive Dynamic Walking of a Quadruped -
Rolling Motion Feedback to CPGs Controlling Pitching Mo-
tion, Proc. of ICRA 2002. pp 2228-2233
[6] J. Cappelletto, P. Estévez, W. Medina, L. Fermı́n, J. M. Bo-
gado, J. C. Grieco, G. Fernández-López, Gait Synthesis and
Modulation for Quadruped Robot Locomotion Using a Simple
Feed-Forward Network, Lecture Notes in Computer Science,
Vol. 4029, Jan 2006, Pages 731 - 739
[7] F-S Tsung: Modeling Dynamical Systems with Recurrent
Neural Networks, PhD Dissertation. Univ. of California, San
Diego. 1994