Page 1

Swing leg retraction helps biped walking stability

M. Wisse*, C. G. Atkeson†, D. K. Kloimwieder†

* Delft University of Technology, www.dbl.tudelft.nl, m.wisse@wbmt.tudelft.nl

†Carnegie Mellon University, www.cs.cmu.edu/∼cga

Abstract—In human walking, the swing leg moves backward

just prior to ground contact, i.e. the relative angle between

the thighs is decreasing. We hypothesized that this swing leg

retraction may have a positive effect on gait stability, because

similar effects have been reported in passive dynamic walking

models, in running models, and in robot juggling. For this study,

we use a simple inverted pendulum model for the stance leg. The

swing leg is assumed to accurately follow a time-based trajectory.

The model walks down a shallow slope for energy input which

is balanced by the impact losses at heel strike. With this model

we show that a mild retraction speed indeed improves stability,

while gaits without a retraction phase (the swing leg keeps moving

forward) are consistently unstable. By walking with shorter steps

or on a steeper slope, the range of stable retraction speeds

increases, suggesting a better robustness. The conclusions of this

paper are therefore twofold; (1) use a mild swing leg retraction

speed for better stability, and (2) walking faster is easier.

Index Terms—Swing leg trajectory, dynamic walking, biped,

swing leg retraction

I. INTRODUCTION

In human walking, the swing leg moves forward to maximal

extension and then it moves backward just prior to ground

contact. This backward motion is called ‘swing leg retraction’;

the swing foot stops moving forward relative to the floor

and it may even slightly move backward. In biomechanics

it is generally believed that humans apply this effect (also

called ‘ground speed matching’) in order to reduce heel strike

impacts. However, we believe that there is a different way

in which swing leg retraction can have a positive effect on

stability; a fast step (too much energy) would automatically

lead to a longer step length, resulting in a larger energy loss

at heel strike. And conversely, a slow step (too little energy)

would automatically lead to a shorter step length, resulting in

less heel strike loss. This could be a useful stabilizing effect

for walking robots.

The primary motivation to study swing leg retraction comes

from our previous work on passive dynamic walking [15], [4],

[18]. Passive dynamic walking [11] robots can demonstrate

stable walking without any actuation or control. Their energy

comes from walking downhill and their stability results from

the natural dynamic pendulum motions of the legs. Interest-

ingly, such walkers possess two equilibrium gaits, a ‘long

period gait’ and a ‘short period gait’ [12], [5]. The long

period gait has a retraction phase, and this gait is the only

one that can be stable. The short period gait has no swing

leg retraction. This solution is usually dismissed, as it never

provides passively stable gaits.

More motivation stems from work on juggling and running,

two other underactuated dynamic tasks with intermittent con-

tact. The work on juggling [14] featured a robot that had to hit

a ball which would then ballistically follow a vertical trajectory

up and back down until it was hit again. The research showed

that stable juggling occurs if the robot hand is following a well

chosen trajectory, such that its upward motion is decelerating

when hitting the ball. The stable juggling motion required no

knowledge of the actual position of the ball. We feel that the

motion of the hand and ball is analogous to that of the swing

leg and stance leg, respectively. Also analogous is the work

on a simple point-mass running model [16]. It was shown that

the stability of the model was significantly improved by the

implementation of a retraction phase in the swing leg motion.

It has been suggested [13] that this effect also appears in

walking.

In this paper we investigate the stabilizing influence of the

swing leg retraction speed just prior to heel strike impact. We

use a Poincar´ e map analysis of a simple point-mass model

(Section II). The results are shown in Section III, including a

peculiar asymmetric gait that is more stable than any of the

symmetric solutions. Section IV reports that the results are

also valid for a model with a more realistic mass distribution.

The discussion and conclusion are presented in Sections V and

VI.

II. SIMULATION MODEL AND PROCEDURE

The research in this paper is performed with an inverted

pendulum model consisting of two straight and massless legs

(no body) and a single point mass at the hip joint, see Fig. 1.

Straight legged (‘compass gait’) models are widely used as an

approximation for dynamic walking [7], [6], [9], [8], [5].

φ

g=1

γ

θ

m=1

l=1

swing leg

retraction

Fig. 1. Our inverse pendulum model, closely related to the ‘Simplest Walking

Model’ of [5].

A. Stance leg

The stance leg is modeled as a simple inverted pendulum

of length 1 (m) and mass 1 (kg) (Fig. 1). It undergoes

Proceedings of 2005 5th IEEE-RAS International Conference on Humanoid Robots

0-7803-9320-1/05/$20.00 ©2005 IEEE295

Page 2

gravitational acceleration of 1 (m/s2) at an angle of γ following

the common approach to model a downhill slope in passive

dynamic walking. It has one degree of freedom denoted by θ,

see Fig. 1. The foot is a point and there is no torque between

the foot and the floor. The equation of motion for the stance

leg is:

¨θ = sin(θ − γ)

which is integrated forward using a 4thorder Runge-Kutta

integration routine with a time step of 0.001 (s).

(1)

B. Swing leg

The swing leg is modeled as having negligible mass. Its

motion does not affect the hip motion, except at the end of

the step where it determines the initial conditions for the next

step. A possible swing leg motion is depicted in Fig. 2 with

a dashed line. As is standard with compass gait walkers, we

ignore the brief but inevitable foot scuffing at midstance.

01234

0.6

-0.4

-0.2

0

0.2

time (s)

5

0.4

Exact swing motion

is irrelevant

Nominal heel strike

Continued motion

if heel strike is delayed

Range of stable

retraction speeds

Swing leg retraction

Nominal motion

of stance leg θ

This paper addresses linearized

stability; the width of this region

is very small, unlike the drawing.

φ and θ (rad)

Nominal motion

of swing leg φ

Fig. 2.

region (hatched area) for retraction speeds. Only the swing leg trajectory

around heel strike is important; the swing leg by itself has no dynamic effect

on the walking motion other than through foot placement.

The figure shows an example trajectory and it shows the stable

The swing leg motion at the end of the step is a function

of time which we construct in two stages. First we choose

at which relative swing leg angle φ (See Fig. 1) heel strike

should take place, φlc. This is used to find a limit cycle (an

equilibrium gait), which provides the appropriate step time,

Tlc. Second, we choose a retraction speed˙φ. The swing leg

angle φ is then created as a linear function of time going

through the point {Tlc,φlc} with slope˙φ.

C. Transition

The simulation transitions from one step to the next when

heel strike is detected, which is the case when φ = −2θ. An

additional requirement is that the foot must make a downward

motion, resulting in an upper limit for the forward swing leg

velocity˙φ < −2˙θ (note that˙θ is always negative in normal

walking, and note that swing leg retraction happens when

˙φ < 0). In our simulation, we use a third order polynomial

to interpolate between two simulation data points in order to

accurately find the exact time and location of heel strike.

The transition results in an instantaneous change in the

velocity of the point mass at the hip, see Fig. 3. All of the

velocity in the direction along the new stance leg is lost in

collision, the orthogonal velocity component is retained. This

results in the following transition equation:

˙θ+=˙θ−cosφ

in which˙θ−indicates the rotational velocity of the old stance

leg, and˙θ+that of the new stance leg. At this instant, θ and φ

flip sign (due to relabeling of the stance and swing leg). Note

that in Eq. 2 φ could equally well be replaced with 2θ.

(2)

φ

θ-

θ+

φ

.

.

Fig. 3. At heel strike the velocity of the point mass is redirected. All velocity

along the length of the new stance leg is lost, so that˙θ+=˙θ−cosφ.

The instant of transition is used as the start of a new step

for the swing leg controller; in the case that a disturbance

would make step n last longer than usual, then the start of the

swing leg trajectory for step n + 1 is postponed accordingly.

Thus, although the swing leg motion is a time-based trajectory

independent of the state of the stance leg, it does depend on

foot contact information for the start of the trajectory.

D. Finding limit cycles

The model exhibits a limit cycle if the initial conditions of

step n+1 are exactly equal to those of step n. For this model,

the only independent initial conditions are the stance leg angle

(θ) and its velocity (˙θ). The motion of the swing leg is fully

trajectory controlled; we assume that it accurately follows the

desired trajectory.

The first step of finding a limit cycle is to guess initial

conditions that are near a hypothesized limit cycle, either

through experience or by starting from a known limit cycle for

similar parameter values. This provides initial guess {θ0,˙θ0}.

Then a Newton-Raphson gradient-based search algorithm is

applied on the difference between {θ0,˙θ0} and the initial

conditions of the next step, which we obtain through forward

simulation. The search algorithm terminates when the norm of

the difference is smaller than 1e−9. The search algorithm uses

a numerically obtained gradient J which is also used for the

stability analysis as described in the next paragraph. Note that

this procedure can find unstable as well as stable limit cycles.

296

Page 3

E. Poincar´ e stability analysis

The stability of the gait is analyzed with the Poincar´ e

mapping method, which is a linearized stability analysis of the

equilibrium gait. The Poincar´ e mapping method perturbs the

two independent initial conditions and monitors the effect on

the initial conditions for the subsequent step. Assuming linear

behavior, the relation between the original perturbations at step

n and the resulting perturbations at step n + 1 is captured in

the Jacobian matrix J, as in:

?

If the magnitudes of both of the eigenvalues of J are smaller

than 1, then errors decay step after step and the gait is stable.

The eigenvalues could have imaginary parts, as was the case

for the passive model [5], but in the model with trajectory

control they have no imaginary parts.

∆θn+1

∆˙θn+1

?

= J

?

∆θn

∆˙θn

?

(3)

F. Nominal gait

We have chosen the steady passive gait with a slope of γ =

0.004 rad as a basis of reference for walking motions. For the

passive model, γ is the only parameter, and for γ = 0.004 there

exists only one unstable equilibrium gait (the ’short period

solution’) and one stable equilibrium gait (the ’long period

solution’). We use the latter as our reference gait. The initial

conditions and the step time of that gait are listed in Table I.

TABLE I

INITIAL CONDITIONS AND STEP TIME FOR STEADY WALKING OF THE

PASSIVE WALKING MODEL AT A SLOPE OF γ = 0.004 RAD. NOTE THAT

THE INITIAL VELOCITY FOR THE SWING LEG˙φ IS IRRELEVANT FOR OUR

STUDY, BECAUSE THE SWING LEG MOTION IS FULLY TRAJECTORY

CONTROLLED.

θ

0.1534 rad

0.3068 rad

-0.1561 rad/s

0.0073 rad/s

3.853 s

φ = −2θ

˙θ

˙φ

step time

III. RESULTS

A. Nominal limit cycle

For the given gait of Table I on a given slope of γ = 0.004

rad, the only parameter that we can vary is the retraction speed

˙φ; how fast is the swing leg moving rearward (or forward,

depending on the sign) just prior to heel strike. This parameter

has no influence on the nominal gait, but it does change the

behavior under small disturbances as captured by the Poincar´ e

stability analysis. Note that the swing leg will follow a fixed

time-based trajectory independent of the disturbances on the

initial conditions.

The stability results are shown in Fig. 4; the eigenvalues

of J on the vertical axis versus the retraction speed˙φ at the

horizontal axis. A positive value for˙φ indicates that the swing

leg keeps moving forward, a value of zero means that the

swing leg is being held at the heel strike value φ = 0.3068

-0.2-0.18-0.16-0.14-0.12-0.1-0.08-0.06-0.04-0.020

-1

-0.5

0

0.5

1

retraction speed φ (rad/s)

|λ|

.

stable retraction speeds

Fig. 4.

is indicated with eigenvalues of J on the vertical axis. The walking motion is

stable if the eigenvalues are between -1 and 1. The horizontal axis contains

the retraction speed˙φ. A positive value for˙φ indicates that the swing leg

keeps moving forward, a value of zero means that the swing leg is being held

at the heel strike value φ = 0.3068 and so the foot comes down vertically.

A negative value for˙φ indicates the presence of a retraction phase. Stable

gaits exist for retraction speeds between -0.18 and +0.009 rad/s. In words, this

graph shows that relative hip angle should be decreasing around the instant

that heel strike is expected.

The graph shows the range of stable retraction speeds. The stability

and so the foot comes down vertically. A negative value for

˙φ indicates the presence of a retraction phase.

Fig. 4 shows that stable gaits emerge for retraction speeds

of −0.18 <˙φ < 0.009, and that the fastest convergence will

be obtained with˙φ = −0.09 since the maximum absolute

eigenvalue is minimal at that point. In other words, swing leg

retraction is not necessary for stable walking, but errors will

definitely decay faster if the swing leg motion does include a

retraction phase. Also, even though some forward swing leg

motion (˙φ > 0) is allowable, this would make the walker

operate very close to instability characterized by a rapidly

growing eigenvalue.

An interesting data point is˙φ = 0. One of the eigenvalues

there is zero (λ1= 0); any errors in the initial condition θ will

be completely eliminated within one step, because it is certain

that the step will end with φ = 0.3068 as the swing leg will be

held at that value until heel strike occurs. The other eigenvalue

can also be calculated manually. Although the derivation is a

little more involved, the result simply reads λ2= cos2φ. A

system with˙φ = 0 is dynamically equivalent to the ‘Rimless

Wheel’ [10], [2].

B. The influence of step length

We repeat the stability analysis of the previous subsection

still using the same slope γ = 0.004 but varying the step length

of the gait. For example, we chose a much faster and shorter

step starting with θ0 = −0.1317. The limit cycle belonging

to that value starts with˙θ0 = −0.17 while the step time is

2s (this is what we tuned for). The resultant eigenvalues are

shown in Fig. 5. Clearly there is a much larger range of stable

retraction speeds, at the cost of slightly slower convergence.

The optimal retraction speed is˙φ = −0.71 which produces

eigenvalues of 0.8, i.e. errors decrease 20% per step.

297

Page 4

-1.6-1.4-1.2-1-0.8-0.6-0.4-0.20

-1

-0.5

0

0.5

1

retraction speed φ (rad/s)

|λ|

.

stable retraction speeds

1.5

-1.5

Fig. 5.

stable retraction speeds.

A faster walking motion (T = 2 s) leads to a much larger range of

Fig. 6 provides an overview of the effect of step length on

stable range of retraction speeds and the optimal retraction

speed and accompanying eigenvalues. The stable range de-

creases for larger step lengths until it is zero for φ = 0.3155.

Above that value no limit cycles exist, because the energy

supply from gravity cannot match the large impact losses. Near

this value, the walker is operating dangerously close to a state

in which it does not have sufficient forward energy to pass

the apex at midstance, resulting in a fall backward. The main

conclusion from this graph is that it is wise to operate well

away from a fall backward, i.e. walk fast!

step length φ

0.240.25 0.260.270.28 0.290.3 0.310.32

retraction speed φ

.

-3

-2

-1

0

Stable retraction speeds

Optimal retraction

speed

For γ = 0.004

Fig. 6.

floor slope of γ = 0.004. The gray area shows that shorter steps are better.

The graph also shows the retraction speed with the smallest eigenvalues.

Effect of step length on the range of stable retraction speeds for a

C. The influence of the slope angle

The influence of the slope angle is similar to the that of the

step length. A steeper slope provides more energy input and

thus the resultant gait is faster, an effect similar to decreasing

the step length. Fig. 7 shows how the range of stable retraction

speeds depends on the slope angle, for the nominal step length

φ = 0.3068.

D. Asymmetric gait is more stable

The results in the previous sections show that the retraction

speed can change the eigenvalues, but it doesn’t ever seem to

obtain eigenvalues of all zeros. The explanation is simple; the

system uses one control input (the swing leg angle φ at heel

strike) with which it must stabilize two states (stance leg angle

θ and its velocity˙θ). Although this mismatch cannot result

slope angle γ

retraction speed φ

.

Stable retraction speeds

Optimal retraction speed

0 0.0020.0040.006 0.0080.010.012

-3

-2

-1

0

For φ = 0.3068

Fig. 7.

step length of φ = 0.3068. The gray area shows that steeper slopes (and thus

faster steps) are better. The graph also shows the retraction speed with the

smallest eigenvalues.

Effect of floor slope on the range of stable retraction speeds for a

in ‘deadbeat control’ (all eigenvalues zero) within a single

step, it should be possible to find a deadbeat controller for a

succession of two steps. Here we present such a controller for

our nominal situation of γ = 0.004 and φ = 0.3068.

The previous solutions were all symmetric, i.e. the trajectory

of the swing leg was the same each step. We found that a

purposefully induced asymmetric gait can result in eigenvalues

of all zeros. The swing leg trajectories (one for leg 1 and

another for leg 2) are shown in Fig. 8. Leg 1 always goes

to φ = 0.3068 and does not have a retraction phase (i.e. the

foot comes straight down). Leg 2 always follows a trajectory

with a retraction speed of˙φ = −0.125245. If one calculates

the eigenvalues over a series of steps of Leg 1 - Leg 2 -

Leg 1 (or more), all eigenvalues are zero. This means that any

disturbance will be completely eliminated after three steps of

this asymmetric gait.

01234

0.6

-0.4

-0.2

0

0.2

time (s)

φ and θ (rad)

5

0.4

Step lengths

are the same in

undisturbed

walking

Retraction speed = 0

Jump is artifact

due to relabeling

stance swing leg

Step 1

Step 2

Retraction speed = -0.125

786

θ

θ

φφ

Fig. 8.

two eigenvalues of zero.

An asymmetric gait can lead to two-step deadbeat control, i.e. to

Preliminary research suggests that this ‘deadbeat’ solution

even pertains to large errors, although that requires a non-

constant retraction speed. We intend to investigate such large-

error solutions in the future. Note that in steady gait, the

motion of the swing legs is asymmetric (one retracts and

the other does not) but the step length and step time are

still symmetric. Also note that due to the asymmetry, the

eigenvalues cannot be divided up into ‘one-step’ eigenvalues.

298

Page 5

IV. AUTOMATED OPTIMIZATION ON A MORE REALISTIC

MASS DISTRIBUTION ALSO RESULTS IN SWING LEG

RETRACTION

The theoretical results in the previous section are based on

a point mass model for walking. One of the main assumptions

there is that the mass of the swing leg is negligible. Obviously,

in real walking systems this is not true. The reaction forces

and torques from a non-massless swing leg will influence the

walking motion. In our experience, the main effect is energy

input. Driving the swing leg forward also pumps energy into

the gait. A benefit of this effect is that a downhill slope

is no longer required, but the question is whether it breaks

the stabilizing effect of swing leg retraction. Or, even if it

does still help stability, whether the stability gain outweighs

the added energetic cost for accelerating the swing leg. We

study these questions using a model with a more realistic

mass distribution, based on a prototype we are currently

experimenting with [1] (Fig 9). The swing leg trajectory is

optimized both for stability and for efficiency.

c

l

g

w

m, I

Fig. 9.

mass distribution based on the experimental robot, see Table II.

Our current experimental biped and a straight-legged model with

TABLE II

PARAMETER VALUES FOR A MODEL WITH A MORE REALISTIC MASS

DISTRIBUTION IN THE LEGS.

gravity

floor slope

leg length

leg mass

vertical position CoM

horizontal position CoM

moment of inertia

g

γ

l

m

c

w

I

9.81 m/s2

0 rad

0.416 m

3 kg

0.027 m

0 m

0.07 kgm2

The model (Fig. 9) has the same topology as our initial

model (Fig. 1). However, instead of a single point mass at

the hip, the model now has a distributed mass over the legs,

see Table II. The swing leg follows the desired trajectory with

reasonable accuracy using a PD controller on the hip torque:

T = k(φ − φdes(t)) + d˙φ

with gain values k = 1500 and d = 10. The swing leg

trajectory is parameterized with two knot points defining

the start and the end of the retraction phase (Fig. 10). The

trajectory before the first knot point is a third order spline

which starts with the actual swing leg angle and velocity just

after heel strike. The trajectory between the two knot points

is a straight line. This parametrization provides the optimizer

(4)

with ample freedom to vary the retraction speed, the nominal

step length, and the duration of the retraction phase.

01234

0.6

-0.4

-0.2

0

0.2

time (s)

5

0.4

3th order spline

φ (rad)

knot point 1 (φ1, t1)

knot point 2 (φ2, t2)

knot point 0

(uses actual

post-impact

φ and φ)

.

Fig. 10.

knot points (four parameters).

The desired trajectory for the swing leg is parameterized with two

The optimization procedure is set up as follows. The model

is started with manually tuned initial conditions, after which a

forward dynamic simulation is run for 20 simulated seconds.

The resulting motion is then rated for average velocity and

efficiency:

cost = Σ20s(wTT2+ wv(˙ x − ˙ xdes)2+ wv˙ y2)

with the weight for the torque penalty wT = 0.1, the weight

for the velocity penalty wv = 1, and the desired forward

velocity ˙ xdes = 0.3, summed over a trial interval of 20 s.

During the motion, random noise with uniform distribution is

added to the hip torque. In this way, the model is indirectly

rated for robustness; if the noise makes the walker fall, then

the resultant average walking velocity is low and so the penalty

for not achieving ˙ xdesis high.

A simulated annealing procedure optimized the cost func-

tion of Eq. (5) by adjusting the four knot point parameters

for the swing leg trajectory. Fig. 11 shows that for a wide

range of noise levels and initialization values, the optimization

procedure consistently settles into gaits a retraction phase.

These results fully concur with the theoretical results for the

model with massless legs. Therefore, we conclude that the

analysis is valid and the conclusions hold: walk fast and use

a mild retraction speed.

(5)

V. DISCUSSION

This work was limited to a small error analysis. Our future

work consists of analyzing the effect of the swing leg motion

when under large disturbances, i.e. an analysis of the basin

of attraction must be added to the present linearized stability

analysis [18]. We also intend to investigate the effects of an

increased model complexity by adding knees, feet, and an

upper body.

Observations of the gait of our previously developed

passive-based walking robots [17] show that they all walk with

299