UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The...

59
UNIVERSITY OF CALIFORNIA Santa Barbara The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically Rough Terrain A Thesis submitted in partial satisfaction of the requirements for the degree Master of Science in Electrical and Computer Engineering by Min-Yi Chen Committee in charge: Professor Katie Byl, Chair Professor Joao Hespanha Professor Francesco Bullo December 2011

Transcript of UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The...

Page 1: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

UNIVERSITY OF CALIFORNIA

Santa Barbara

The Compass Gait with a Torso – Analyses and Control of Walking on

Stochastically Rough Terrain

A Thesis submitted in partial satisfaction of the

requirements for the degree Master of Science

in Electrical and Computer Engineering

by

Min-Yi Chen

Committee in charge:

Professor Katie Byl, Chair

Professor Joao Hespanha

Professor Francesco Bullo

December 2011

Page 2: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

The thesis of Min-Yi Chen is approved.

____________________________________________ Francesco Bullo

____________________________________________ Joao Hespanha

____________________________________________ Katie Byl, Committee Chair

November 2011

Page 3: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

iii

The Compass Gait with a Torso – Analyses and Control of Walking on

Stochastically Rough Terrain

Copyright © 2011

by

Min-Yi Chen

Page 4: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

iv

ACKNOWLEDGEMENTS

I owe my deepest gratitude to my advisor, Katie Byl, for all her guidance and

encouragement and for all the patience she had with me. I learned from her the

importance of independently thinking, and how to break down the problems into

small part, no matter how hard it looks like at first. I feel lucky to learn those things

early because it is not only important for a graduate student, but also for life in

general. I would also like to thank Joao Hespanha and Francesco Bullo, for being my

committee members and for all the advice and insights they gave me for the future

career path.

The robotics lab has been in a very supportive atmosphere; I would like to thank

all my lab mates for the inspiring discussions, inputs and suggestions for my research.

Thanks Hosein Mahjoubi and Giulia Piovan for always being available and helpful

while I have doubts on research. I would also like to thank all my friends who are so

generous and supportive that makes my life enjoyable in UCSB. Special thanks to

Bang-Yu Hsu, Chun-Hung Steven Lin, Chieh Lee, Emily Yi-Tung Hsu, Guilia Piovan,

Jill Tsai and Radha Vinod, for all the support that helped me go through those hard

times.

Finally, I would like to thank my parents who gave me the opportunity to study

aboard and always show their love and support to me. I would not be here without

your support and faithful in me.

Page 5: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

v

ABSTRACT

The Compass Gait with a Torso – Analyses and Control of Walking on

Stochastically Rough Terrain

by

Min-Yi Chen

Passive dynamic walking gaits have demonstrated significant promise for biped

robot locomotion, based on research of the compass gait model that exploits inverted

pendulum dynamics. The potential benefits include reduction of the number and

complexity of actuators required for walking on flat ground and of the energy

expended. Instead of having wheels, like a car or a tank, such robots walk with only

two point contacts on the ground, with the goal of negotiating a wider range of

terrain variability. Therefore, it is of interest to investigate the stability of dynamic

walking gaits with terrain variations. Our analyses show that stability on rough terrain

is significantly enhanced by including a torso, and correspondingly we emphasize new

methods to develop improved control strategies for the compass gait with a torso.

In this thesis, we quantify the stabilizing value of adding a torso to the standard

compass gait model, optimize a class of simple PD controllers on this walker to be

robust to unknown changes in upcoming terrain height by using hill-climbing

algorithm, and develop improved numerical tools for estimating the statistics of fall

events for rough terrain walking. Our results indicate that the torso walker can handle

Page 6: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

vi

unanticipated step changes in terrain of approximately 15% of leg length, and that our

statistical tools are effective for a 6-dimensional state space system, indicating

promise in addressing the curse of dimensionality in applying machine learning

techniques to rough terrain walking.

Page 7: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

vii

TABLE OF CONTENTS

I. Introduction .......................................................................................................... 1

A. Biped Walking ................................................................................... 1

B. Compass Gait ..................................................................................... 2

C. Dynamic programming ....................................................................... 3

II. Modified Mechanical Structure ............................................................................ 5

A. Models -- with and without a Torso ................................................... 5

B. Equation of Motion ............................................................................ 6

III. Stability Investigation for Single Perturbation ..................................................... 8

A. Limit Cycle, Poincaré map and Fixed Point ......................................... 8

B. Stability Evaluation ............................................................................ 9

C. Single Perturbation ........................................................................... 10

D. Optimal Controller ........................................................................... 13

1. Walking on Level Ground ........................................................... 13

2. Change in Terrain Slope .............................................................. 16

IV. State Space Analysis ........................................................................................ 20

A. Stochastically rough terrain .............................................................. 20

B. Distinguishable Poincaré map ........................................................... 21

C. Low-dimensional state representation ............................................... 22

D. Failure Modes .................................................................................. 28

E. Metastability ..................................................................................... 29

Page 8: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

viii

1. Probability State Transition Matrix ............................................. 29

2. Eigenvalues and Eigenvectors of TT̂ ........................................... 31

V. Stability Estimation Walking on Rough Terrain.................................................. 33

A. Results from Monte Carlo Trials ...................................................... 33

1. Initial Controller ......................................................................... 33

2. Optimal Controller ..................................................................... 36

B. Average Number of Steps Taken ...................................................... 38

VI. Summary .......................................................................................................... 39

A.Conclusion ........................................................................................ 39

B.Discussion and Future Work .............................................................. 40

References ............................................................................................................. 42

Appendix ............................................................................................................... 44

A. Equation of Motion of the Compass Gait model with a Torso ........... 44

B. Impact equation of the Compass Gait model with a Torso ................ 46

C. Pseudo code: Impact detection ......................................................... 47

Page 9: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

ix

LIST OF FIGURES

Figure 1. (a) The Compass Gait Biped Model and (b) with a Torso. Simulations

parameters: mh = 15kg, m = 5kg, L = 0.5m, r = 1m, mt = 10kg (mt and L are

valid for the compass gait with torso, only) ....................................................... 5

Figure 2. Path taken during hill-climbing algorithm for optimal torso control. The

algorithm starts with θ3des = 4° and θ2des =-10°, and follows the local gradient to

a locally-optimal solution θ3des = 67°, θ2des =-24°. We have included patches of

the local surface along the paths for max(Δh+) (top surface, in red) and max(Δh-)

(in blue) to demonstrate that the max uphill and downhill single-step

perturbations vary smoothly throughout the search ......................................... 15

Figure 3. The one-step motion of the torso walker during its optimal gait. The PD

controller moves the swing leg forward rapidly during walking, resulting in high

ground clearance (i.e., 15% of the leg length), as shown ................................. 16

Figure 4. Poincaré states for the torso walker lie on a thin manifold in a 5D space, and

three of the five states can each be represented as function of the other two. To

illustrate this, the plots above show X2 (swing leg angle, in blue), X3 (torso angle,

in red), and X6 (torso angular velocity, in green). Note that X1 is by definition

Page 10: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

x

zero for our Poincaré sections. Units on the z-axis are degrees and deg/s, as

appropriate ..................................................................................................... 23

Figure 5. Poincaré states visited during Monte Carlo trials. Red points show the next,

(randomly selected) upcoming step height during Monte Carlo trials. Blue points

are the last steps before falling down in each trial. The maximum possible one-

step uphill limit, max(Δh+), is shown in green. Note that failures occur from

“dangerous” regions of state space, where the green ceiling of points is low .... 25

Figure 6. Performance for the upright torso walker. (a) Data from the Monte Carlo

trials (b) Sparse set of points used to build an approximate transition matrix of

the dynamics. (c) the max(Δh+) (largest uphill step) and max(Δh-) (downhill)

one-step perturbations are shown for each point in the sparse set ............... 26,27

Figure 7. Starting at each of three, different initial conditions, shown in the leftmost

images above, the probability mass function (PMF) is shown after taking 1, 5, 10

and 20 steps on stochastically rough terrain. ................................................... 34

Figure 8. (a) The conditional probability of failing on the next step, as a function of

X4 and X5. (b) The probability of being at any given state, after initial conditions

(IC) are forgotten. (c) and (d) The total probability of a failure occurring from

each state on any one step, after IC are forgotten. (d) magnifies (c) around the

Page 11: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

xi

“tail” area. Magenta points show actual failures in our Monte Carlo simulations;

they are grouped at the tail, as expected. ......................................................... 35

Figure 9. (a) All the states from Monte Carlo trials. The red points indicate the states

before falling down (b) The probability mass distribution (PMF) for the optimal

torso walker (c) The probability mass distribution (PMF) for the optimal torso

walker in a 3D viewpoint ........................................................................... 36,37

Figure 10. Expected number of steps before fallen, as a function of terrain variability.

Solid and dashed lines show estimates based on transition matrix eigenvalues for

the upright (θ3des = 4°) and optimal (θ3des = 67°) walkers, respectively. Points

show averages from Monte Carlo trials ........................................................... 38

Page 12: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

1

I. Introduction

A. Biped Walking

Two central goals in bipedal robot locomotion are energy efficiency and stability

of walking gaits. However, it’s challenging to achieve both goals at the same time. In

our work, we investigate the coupled dynamics and the stability of dynamic walking

systems subject to terrain variations, using appropriate tools. We seek models that are

simple enough to yield general principles, but not so simple that they seriously limit

the control capabilities of the system. In particular, we hypothesize that understanding

the effects of a single perturbation on a limit-cycle behavior is not sufficient in

predicting failure rates or in providing guarantees of stability for walking models on

stochastically rough terrain. This thesis studies the following three challenges in

bipedal locomotion: Identifying simple yet capable models for biped walking,

quantifying and optimizing their stability on rough terrain, and addressing problems of

high dimensionality [1] using machine learning techniques.

Researchers have demonstrated stable biped gaits in purely passive mechanical

devices [2, 3] toward developing more efficient walking systems. A variety of

powered robots has also been designed using an extension of the principles of the

passive dynamic walking (PDW) [4], and investigations of the energetic of various

powered robots [5, 6] certainly seem to indicate that there are significant energetic

benefits in exploiting passive dynamic elements in bipedal robots.

Page 13: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

2

B. Compass Gait

The compass gait (CG) walker [7, 8, 9] has been investigated broadly as a

fundamental model to understand the dynamics of biped gaits. Although this model

demonstrates a stable limit cycle, it is also very sensitive to terrain variations. Several

problems related to its walking gait on the rough terrain have been investigated,

including the stability of the compass gait model on rough terrain[17], the passive CG

models [11] and control strategies for actuated CG models to improve stability [10,

12, 13]. Recent work on this problem has also been tested on a real-world robot

designed to capture the essential dynamics of the CG model [14, 15, 16]. Despite

these efforts, the compass gait with a passive ankle (no ankle torque) can negotiate

only mildly rough terrain, e.g., height changes on the order of 1-2% of leg length for

blind walking [15, 17]. The point foot hold was used in our model to ensure the

inverted pendulum lands at the right position without worrying the position of the

center of pressure. This underactuated structure also helps reducing the energy

consumption of the robot because most of the energy is dissipated through the motor

at the ankle in a fully actuated robot. For example, Honda ASIMO has to deal with

the problem of durability at the ankle under large torque.

In this thesis, we address the issue of improving stability on rough terrain by

studying a walking model with an additional degree of freedom – a torso – based on a

hypothesis that effectively decoupling the twin problems of adding energy at each step

and of achieving adequate ground clearance for uphill obstacles will require at least

two control actuations. Our model of the torso walker can handle step changes in

Page 14: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

3

terrain of up to 15% of leg length during blind walking on stochastically rough terrain.

However, in order to negotiate greater step change in height, the energy dissipation at

each step of steady state walking for the optimal bent torso walker is 10 times greater

than that of steady state walking for the upright torso walker.

C. Dynamic programming

The analysis of step-to-step dynamics becomes more challenging as the

complexity of our walking model increases. We present an approach to extend the

analyses developed in [17] using Dynamic Programming (DP)1. This method has

shown some potential in developing effective tools for analysis and optimization of

control policies for low-dimensional system such as the compass gait walker. For

example, in [10], an approximate optimal control policy is developed for an actuated

CG walker with a torque at the hip, and in [17], the dynamics of walking are analyzed

using a step-to-step transition matrix. However, the meshing employed to discretize

state space indicates a potential limitation to the dimensionality of the system, where

it can be only used in low-dimensional systems, typically three dimensions or fewer.

One approach was presented in [18] to extend meshed DP techniques to higher-

dimensional models of walking, dividing the control problem into a set of nearly-

decoupled subsystems by exerting different constraints. Since our low-level

controllers for swing leg and torso angle tend to restrict the step-to-step dynamics of

the system to a region near a thin, 2-dimensional manifold within this larger space, a

Page 15: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

4

sparse set of discrete points in a five-dimensional state space can be selected by only

considering a 2-dimensional space to extend the analyses developed in [17].

The rest of the thesis proceeds as follow. Chapter II introduces the compass gait

both with and without a torso. Chapter III introduces Poincaré methods for

evaluating the stability for dynamic systems with periodic solutions, compares the

performance of heuristically-tuned controllers in recovering from single-step

perturbations for each model, and describes methods and results for a hill-climbing

optimization. Chapter IV outlines the Poincaré analyzes techniques we use, and

analyze the metastable dynamics of the system when walking blindly on stochastically

rough terrain, via an extension of the techniques in [17] to higher-order systems. We

also briefly present experimental simulation results, toward verifying the validity of

various simplifications made throughout in Chapter V. Finally, we conclude and

discuss directions for future work in Chapter VI.

1 A recursive method for solving complex problems by identifying a group of

subproblems, tackling them one by one, and combining the optimal solutions of the subproblems to finally obtain an optimal solution for the complete problem.

Page 16: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

5

II. Modified Mechanucal Structure

We first introduce the mechanical structure of the compass gait with and with a

torso, and the hybrid system characteristics for both of them. Since from [9], it seems

reasonable to hypothesize that an upper body may be used to improve stability of

rough terrain walking, we present techniques to quantify the extent to which this is

true by using the model proposed in this Chapter. More details for these techniques

will be explained in Chapter III.

A. Models – with and without a Torso

Fig. 1. (a) The Compass Gait Biped Model and (b) with a Torso. Simulations parameters: mh =

15kg, m = 5kg, L = 0.5m, r = 1m, mt = 10kg (mt and L are valid for the compass gait with torso,

only) .

The classic (non-torso) compass gait model is depicted in Figure 1 (a). It consists

of two rigid links, connected by a frictionless, revolute joint at the common point

called the hip. Additionally, there are three point masses: two on the legs (m) and one

(a) (b)

Page 17: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

6

on the hip (mh). The end of each leg can be considered as a tip, providing an

unactuated point contact pivot on the ground. Note that all angles shown in Figure 1

are measured clockwise with respect to vertical. For each simulation in this thesis, the

classic CG walker is actuated by a single torque actuator at the hip, and a low-level,

PD controller is used to regulate the inter-leg angle, 21 . Although a passive

compass gait walker may have stable limit cycle gaits for some downhill slopes, an

actuator is required for successful walking on level ground or rough terrain.

The compass gait with a torso, shown in Figure 1 (b), is developed from the

compass gait model. This model includes a third rigid link attached to the hip and

ending at a point mass mt. The CG model with a torso has two actuators at the hip;

one provides torque between the swing leg and the torso and the other provides

torque between the stance leg and the torso. Although the torso walker has a second

actuator, the degree of underactuaction of the model is still one, which is the same as

the classic CG, due to the passive ankle joint.

B. Equations of Motion

The walking dynamics can be separated into two phases: a continuous single

support phase in which only the stance leg contacts the ground, and an instantaneous

double support phase in which the preceding swing leg becomes the stance leg for the

next step. The general form of the equations of motion of the support phase can be

written as BuGCD , ; see Appendix A for detailed expressions.

Page 18: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

7

The low-level controllers we use to regulate torso and swing leg angle are both

PD controllers, which operate only during the single support phase. As for the ground

collision, it is assumed to be perfect inelastic and instantaneous, so the equation of

motion at impact (see Appendix B) can be derived using the principle of conservation

of angular momentum. Also, we assume that the swing leg will retract automatically

when taking a step forward and extend automatically before impact happens. The

pseudo code for impact detection is in Appendix C. Equations of motion for both the

compass gait with and without a torso can also be found in [9].

Page 19: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

8

III. Stability Investigation for Single Perturbation

As an initial step in analyzing the stability of walking on rough terrain with various

changes in height at each step, we compare the performance of the CG with and

without a torso for having only one single perturbation on flat terrain. The greater the

single-step change in height one can successfully negotiate during blind walking on

flat terrain, the better the performance one has. Based on these single-perturbation

tests, we will later focus on the torso walker as a more promising candidate for rough

terrain walking. Our methods for stability evaluation are introduced first, and then the

results of our initial simulation tests for the CG models are explained in detail.

A. Limit Cycle, Poincaré map and Fixed Point

For some nonlinear systems, such as the Acrobot and Pendubot, stability can be

evaluated by the convergence of the states to an equilibrium. The mechanical

structures of the two systems are both double-linked pendulums, with only one link

attached to the base. Each of them has one actuator, at the joint which connects the

two links (elbow or “hip”), and at the joint which is attached to the base (shoulder or

“toe”), respectively. During the continuous, single-support phase, the compass gait is

modeled as a double-link pendulum, identical to the Acrobot. However, during stable

forward walking, the dynamics of the CG model do not converge to a single

equilibrium point in state space, and the same is true for the compass gait with a torso.

The reason for the non-existence of an equilibrium is the hybrid dynamic

characteristics. The equations of motion of the system consist of two different phases

Page 20: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

9

that pose constraints on the states to start at the same one after every impact, in

steady state. Periodic state trajectories thus appear, and a different effective method is

required for evaluating the stability of our system.

A limit cycle is an isolated periodic orbit on the phase portrait that shows the

existence of a periodic solution of the dynamic system. It is defined to be stable if all

neighboring trajectories approach the limit cycle as time approaches infinity. For the

stable gaits of the CG model, the state trajectories are either period-N or chaotic [8],

where N indicates the number of steps taken before one state converges to itself in

steady state. However, since period-N gaits with N larger than 1 only appear while

walking on down-sloped terrain, the period-1 gait is the case that exists for all flat

terrain with different slopes and thus is the only case considered in our experiments.

To further simplify the analysis, we select a certain snapshot, which is also called the

Poincaré section, and study the convergence of states on the Poincaré map. Note that

the Poincaré section is a certain lower dimensional subspace of the state space, and

the Poincaré map, which includes the information mapping state n to state (n+1), is

the intersection of a periodic orbit in the state space with a Poincaré section. The state

that all the stable initial conditions converge to on the Poincaré map is called the fixed

point. For period-1 gait, the fixed point can be found at each step.

B. Stability Evaluation

To examine the stability of the CG/CG with a torso, the most trivial method is to

check if the robot is still walking after simulating a large number of steps. However,

this becomes computationally expensive because we might need to test thousands of

Page 21: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

10

steps to make sure that it won’t fall down at the next step. Instead of doing this, we

can simulate only 100 steps to verify the existence of the stable limit cycle by

checking 52

int 10 pofixedXX when walking on flat terrain, which is the same as

checking the asymptotic stability of the states in our single perturbation experiments.

The number of steps and convergence threshold were chosen empirically. The

Poincaré Section was chosen at post-impact, as this is one of the natural choices. For

walking on a rough terrain, where no fixed point exists, due to the successive

perturbations, one obvious way to test the stability is by simulating large number of

steps. This is known as Monte Carlo simulation. However, our walking experiments

on the stochastically rough terrain show that the robot always falls down in the end.

This motivates the need of developing more systematic techniques to analyze the

stability of system in state space, which will be discussed in detail in Chapter IV.

C. Single Perturbation

Toward verifying our hypothesis that the stability of the compass gait on rough

terrain can be improved by adding a torso, we simulated the compass gait models

both with and without a torso on a long stretch flat terrain with only a single step

change in height, Δh. In these experiments, we use the model in Fig. 1 and the

proportional-derivative (PD) gains below in Table 1.

Page 22: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

11

Table 1. Coefficients used for low-level PD control of joints

PD controller CG CG + torso: torso and swing leg

CG + torso : torso and stance leg

Kp 100 100 18 Kd 10 10 9

The proportional and derivative gains, Kp and Kd, that regulate the (relative)

interleg angle of the classic compass gait model are the same values used in regulation

of the absolute swing leg angle in the CG model with a torso. We use a desired

interleg angle of 20° for the compass gait model, which is the optimal choice for

maximizing the positive perturbation height this classic model can handle. To

compare a similar step-size for the torso walker, we selected a desired absolute angle

to be -10° for the swing leg (θ2, positive clockwise; θ1= -θ2 at impact on level ground)

of the CG with a torso. Note briefly that we found the performance of the classic CG

to be much better when relative, not absolute, swing leg angle is regulated, while the

torso walker performs better when commanding absolute swing angle as it negotiates

more step change in height at the optimal commanded angles. Therefore, in this initial

benchmarking, we chose to regulate swing leg angle as best fit each dynamic model:

interleg for the classic CG, and absolute for the torso walker. We tested both an

“upright” torso angle of 4° for the torso CG, which is optimal when θ2des is

constrained to be -10°, and an optimal θ2des and θ3des combination, found as described

further on, in Section D. For each trial in our single perturbation experiments, we

start each walker at its fixed point for level-ground walking. We perform successive

trials on both models for a range of positive step changes, Δh+, and negative step

change Δh-, increasing the magnitude by 0.001 [m] until the robot can no longer

Page 23: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

12

converge to the fixed point – and falls down. Noted that all the Δh are therefore

approximate and conservative values because the discrete change in the height of the

terrain and the resolution of ode45 in MATLAB.

As shown in Table 2, the maximum step change in height (Δh) that the compass

gait with and without a torso is capable of negotiating, i.e., the ability of the compass

gait to negotiate an unseen step height change in terrain, was improved by adding a

torso. The desired interleg angle is 20° for the compass gait model, and the absolute

desired torso and desired swing leg angles are 4° and -10°, respectively, for the

“upright torso” walker, and are 67° and -24° for the optimal “bent torso” walker.

Table 2: Single-Perturbation Capabilities of CG Walking Models max(Δh) Compass Gait

(no torso) Compass gait with a torso

Upright Torso Bent Torso (Optimal) max(Δh+) 0.011[m] 0.026[m] 0.151[m]

max(Δh-) -0.026[m] -0.659 [m] -0.427[m]

Performance of the torso depends highly on the combination of desired swing and

torso angles that are commanded. In Table 2, we show results for both an “upright”

and “bent over” set of angles for the torso walker. Recall that PD set points for the

upright walker were selected to match the step length of the optimal classic CG

model for level-ground walking. For the upright torso model, the maximum positive

step change in height that could be negotiated, or max(Δh+), was about 2.5 times that

of the two-link CG, and the maximum negative step change in height, max(Δh-),

increases in magnitude by a factor of 25. Once an optimal set for θ2des and θ3des is used,

Page 24: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

13

the largest single perturbation the torso walker can handle is over 13 times larger than

it is for the classic compass gait. The optimal values for θ2des and θ3des were found

using a hill-climbing algorithm described in Section D.

D. Optimal Controller

1. Walking on Level Ground

A hill-climbing search [19] was used to find the optimal combination of values for

θ2des and θ3des to maximize the overall step height, uphill or downhill, that might be

randomly encountered during blind walking. Pseudo code for the algorithm is given

below. In practice, as shown in Table 2, the limiting perturbation size going uphill,

max(Δh+), was always smaller in magnitude than max(Δh-). Thus, our algorithm

effectively seeks only to maximize max(Δh+). To initiate the algorithm, we fixed θ2des

at -10° and searched using with 1° step intervals for the value of torso angle, θ3des,

that maximizes max(Δh+). The resulting initial pair of PD set point angles is 4° for

θ3des, and -10° for θ2des. In each trial, the initial conditions used for the walker

dynamics are the fixed point on flat terrain for the corresponding θ2des and θ3des of the

controller. In the pseudo code, 2des and 3des are the optimal θ2des and θ3des that have

been found thus far. The search is illustrated in Figure 2.

HILL-CLIMBING PSEUDO CODE

function: find optimal θ2des and θ3des to maximize max(Δh+)

initialization: 102des , 43des , and 03last2 last ,

Page 25: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

14

max(Δh+) = max(Δh+)saved = 0.026 [m]

while ( last22des ) or ( last33des )

last22des , last33des

for ]1,0,1[2des2 des

for ]1,0,1[3des3 des

find new max(Δh+) for these set point angles

if max(Δh+) >= max(Δh+)saved

max(Δh+)saved ← max(Δh+)

2des2 last , 3des3 last

;

des22des , des33des

end

end

end

returns locally-optimal 2des and 3des .

Page 26: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

15

Fig. 2. Path taken during hill-climbing algorithm for optimal torso control. The algorithm starts

with θ3des = 4° and θ2des =-10°, and follows the local gradient to a locally-optimal solution θ3des = 67°,

θ2des =-24°. We have included patches of the local surface along the paths for max(Δh+) (top surface,

in red) and max(Δh-) (in blue) to demonstrate that the max uphill and downhill single-step

perturbations vary smoothly throughout the search.

Although the hill-climbing search finds only a locally optimal solution for θ2des and

θ3des, we notice that the values of both max(Δh+) and max(Δh-) vary smoothly. It

therefore seems likely that the locally-optimal solution may also be globally optimal;

however, we can only guarantee that the solution gives a conservative bound on the

true performance possible by the torso compass gait walker. The motion of the

Page 27: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

16

optimized system during steady-state walking on level ground is shown in Figure 3.

Note that the swing foot (in blue) scuffs the ground in our animation. We assume this

leg is retracted somewhat during swinging to avoid collisions with the terrain.

Fig. 3. The one-step motion of the torso walker during its optimal gait. The PD controller

moves the swing leg forward rapidly during walking, resulting in high ground clearance (i.e.,15% of

the leg length), as shown.

2. Change in Terrain Slope

To further investigate the potential of the torso walker on generalized rough

terrain, of which we might have knowledge of the average upcoming slope over time,

we used the same gradient-based search algorithm to find optimal combinations of

θ2des and θ3des for a total of five different terrain slopes. The desired (des) torso angle

and swing leg angle that is locally optimal for negotiating one Δh+ are shown in Table

3. For each desired torso angle listed, the range in [] brackets indicates values for

which max(Δh-) and max(Δh+) remain nearly identical (flat), and the number outside

the [] is the optimal one obtained from testing smaller discrete height in change. The

column of actual torso angle provides the range observed during a steady state

Page 28: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

17

bobbing motion. See Fig. 3 as an illustration of actual torso motion. The actual range

for the swing leg angle indicates the range of overshoot caused by the PD controller.

All the numbers for angles are rounded off.

Table 3: Single-Perturbation Capabilities of CG with a Torso on Terrain with Different Slopes

Terrain

Slope(deg) Δh [m], wrt steady-

state slope value Torso angle (deg) Swing leg (deg)

des actual des actual

8 [-0.629,0.034] 84 + [-5,5] [88,92] -22 -27 – -23 4 [-0.495,0.096] 73 + [-4,5] [82,90] -24 -31 – -25 0 [-0.427,0.151] 67 + [-2,1] [79,90] -24 -32 – -25 -4 [-0.349,0.203] 63 + [-6,6] [81,95] -24 -33 – -24 -8 [-0.266,0.251] 62 + [-4,3] [76,94] -24 -34 – -23

Note that there is only one matched swing leg angle for each torso angle to

generate the maximum max(Δh+). Although the optimal commanded (desired) torso

angle is 67°, the corresponding actual torso angle swings between 79° and 90°, so

that the torso is bent quite close to horizontal, as illustrated in Figure 3, as opposed to

the more upright posture depicted in Figure 1 (b). Also, it is interesting to note that

the optimal desired swing leg for a bent posture walker is larger in magnitude than for

near-upright walking (see Table 2). Although the bent torso walker appears to be able

to negotiate greater step change in height and its walking speed is almost twice that of

the upright torso walker, the energy dissipation is 10 times as great. This indicates

that there is a trade-off between energy efficiency and walking stability on rough

terrain.

In our results, the torso CG model can withstand an isolated perturbation of up to

15% of leg length, providing some support to our initial hypothesis that a torso may

improve walking stochastically rough terrain. Thus, we focus on analyses of the torso

Page 29: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

18

walker on terrain that varies in height at every step for the rest of our work. Before

continuing, however, we have two brief but important comments. First, column 2 (Δh)

in Table 3 lists heights with respect to the anticipated (steady-state) slope that is listed

in column 1 (terrain slope), and so the numbers may look a bit misleading. As shown

in Table 4, for each desired (des) torso angle and swing leg angle that is locally

optimal to negotiate one (terrain) Δh+, which is the difference in height relative to a

constant slope of the magnitude given in the column of terrain slope, the absolute Δh+

contains the absolute height difference between the stance leg and swing leg at the

step change on the terrain. Note that the absolute Δh+, versus (terrain) Δh+, do not

vary quite so significantly.

Table 4: Total Δh+ and energy in Single Perturbation Experiment

Terrain Slope(deg)

Optimal angle(deg)

Δh+ [m]

Absolute Δh+ [m]

Total Energy(Steady State) [Joul]

θ3des θ2des E(Xpost) E(τ1)+

E(τ1)- E(τ2)+

E(τ2)- ∆E

8 84 -22 0.034 0.094 290 40 0 6 -4 42 4 73 -24 0.096 0.134 305 37 -1 13 -8 41 0 67 -24 0.151 0.151 318 33 -7 20 -11 35 -4 63 -24 0.203 0.160 329 30.43 -14 26 -14 28 -8 62 -24 0.251 0.154 337 30.02 -25 32 -19 18

In addition, the total energy at post impact state (E(Xpost)) increases when

slope decreases, which matches our expectation because the gravity helps adding

energy into the system at each step going downward. They also show that the walker

is more susceptible to uphill perturbations after local periods of walking uphill for

some time, which leads nicely to our second comment: falls during rough terrain

walking may not require a step height as great as the 15.1 cm single-step perturbation,

Page 30: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

19

because insufficient energy makes it become vulnerable to fall. Most particularly, we

anticipate more falls after local periods of uphill walking lasting for multiple steps.

Page 31: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

20

IV. State Space Analysis

Next, we study our controlled torso walkers on stochastic terrain, where the

change in height at each step is drawn from a probability distribution. All experiments

in this chapter were performed to analyze the dynamics of the upright torso

configuration, with a commanded torso angle of 4. Our goal is to represent the step-

to-step dynamics of rough terrain walking via a compact transition matrix, which can

be analyzed to predict the long-term behavior and stability of a particular walker-

terrain combination. The details of our simulations, analyses, and results are explained

in the sub-sections that follow.

A. Stochastically rough terrain

Our experiments in this section study the upright torso walker. In initial

simulations, the relative change in height of terrain at each step, Δh, is drawn from a

Gaussian distribution with zero mean and a standard deviation of 0.005 [m], i.e.,

0.5% of leg length. This noise level was chosen based roughly on max(Δh+) from

Table 2, such that the probability of any single Δh event exceeding max(Δh+) was

quite rare (i.e., 5). This was experimentally determined to be an “interesting” level of

noise, such that the walker will generally take around 1000 steps or so between

failures: long sequences of steps can be recorded, but fall events can also be observed

during Monte Carlo trials.

The compass gait with a torso, shown in Figure 1 (b), has six state variables,

which we define in a state vector, X:

Page 32: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

21

TTXXXXXX ],,,,,[],,,,,[ 321321654321

Recall that θ1 is the angle of the stance leg, θ2 is the angle of the swing leg, and θ3

is the angle of the torso.

B. Distinguishable Poincaré map

When walking on perfectly level ground, the controlled torso walker has a stable

gait with a periodic orbit through state space, which can be analyzed using a Poincaré

map. We employ a similar step-to-step mapping analysis for rough terrain walking.

On flat ground, it is typical to select the “post-impact” state (as a new leg begins a

continuous stance phase) as the state of interest with which to build a Poincaré map.

In such situations, with the ground always defined to have a known, constant slope

value, and with both feet in contact with the ground post-impact, only 5 additional

states are necessary and sufficient to fully define the post-impact state. For example,

given the interleg angle and a known ground slope, both 1 and 2 are defined.

In our rough terrain walking experiments, however, considering only the interleg

angle will create ambiguity between the states – different sets of θ1 and θ2 can have

the same interleg angle due to the fact that two legs do not touch the ground at the

same height during impact on rough terrain. Therefore, a Poincaré Section is instead

taken at the time snapshot that the stance leg passes vertical position, i.e., when X1 =

0. The only cases in which such a state did not exist in our simulations were due to

imminent failure (falling backward) of the walker, and, fortunately, such events simply

map to a failure state in our simulations, regardless.

Page 33: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

22

C. Low-dimensional state representation

As shown in Figure 4, the states on the Poincaré Map all tended to fall on or near

a thin manifold within the five-dimensional Poincaré Section. Moreover, three of the

five states could each be expressed as a function of X4 and X5. In other words, only X4

and X5, seem to be necessary to uniquely define the entire state on the Poincaré Map.

As a result, we chose to represent the Poincaré state using only two states: the

angular velocity of the stance leg (X4) and of the swing leg (X5).

Page 34: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

23

010

2030

4050

-150-100

-50

050

-15

-10

-5

0

5

10

X4 (deg/s)X5 (deg/s)

0 10 20 30 40 50

-150-100

-500

50

-15

-10

-5

0

5

10

X5 (deg/s)X4 (deg/s)

Fig. 4. Poincaré states for the torso walker lie on a thin manifold in a 5D space, and three of the

five states can each be represented as function of the other two. To illustrate this, the plots above

show X2 (swing leg angle, in blue), X3 (torso angle, in red), and X6 (torso angular velocity, in green),

versus X4 (angular velocity of the stance leg) and X5 (angular velocity of the swing leg), respectively.

Note that X1 is by definition zero for our Poincaré sections. Units on the z-axis are degrees and deg/s,

as appropriate.

Page 35: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

24

We wish to represent the step-to-step dynamics of rough terrain walking by using

an efficient distribution of sparse, discrete points along our 2D manifold of Poincaré

states. We hope to demonstrate that such a simplified representation can still be

reasonably accurate in describing the system dynamics, providing a promising tool in

analyzing walking gaits. To select a sparse set of Poincaré states, we performed 30

Monte Carlo trials in which the torso walker began at the fixed point for zero-slope

terrain. Each simulation ran until the walker eventually fell down.

Figure 5 shows the next randomly-selected upcoming step height (z-axis) as a

function of Poincaré states (X4, X5) for these particular Monte Carlo trials. Successful

steps are shown in red, and steps resulting in failure are in blue. The green points

show the one-step limit in terrain height change that can be negotiated for any given

(X4, X5) state visited during walking, v.s. the X4 – X5 plane. These limits were obtained

empirically, by testing successively larger step heights from each visited state.

Page 36: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

25

0 10 20 30 40 50 60 70-200

-100

0

100-3

-2

-1

0

1

2

3

X4(deg/s)X5(deg/s)

step

hei

ght c

hang

e(cm

)

Fig. 5. Poincaré states visited during Monte Carlo trials. Red points show the next, (randomly

selected) upcoming step height during Monte Carlo trials. Blue points are the last steps before falling

down in each trial. The maximum possible one-step uphill limit, max(Δh+), is shown in green. Note

that failures occur from “dangerous” regions of state space, where the green ceiling of points is low.

The sparse set of (X4, X5) points we chose to create our transition matrix of the

dynamics is shown as a set of green points in Figure 6(b). We began by iteratively

selecting points from our set of visited states (shown in red) one-at-a-time. Points

were selected randomly, such that no new point fell within a given distance metric of

any previously selected point. Then, we systematically simulated the step-to-step

dynamics from each sparse point, for step heights from -2.7 cm to +2.7 cm, at 1 mm

spacing. In the course of these tests, we also expanded our sparse mesh whenever

necessary, to ensure no mesh point transitioned to a new state that exceeded our

Page 37: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

26

distance metric. This explains why the green points in Figure 6(b) go beyond the

range of the red ones from Monte Carlo trials in Figure 6(a). The new points

correspond to multi-step periods of downhill walking. Since potential energy can be

supplied going one step down, the states transit toward the direction for higher

angular velocities of the stance leg and the swing leg. Furthermore, all states starting

at the same initial condition transit to the states along one single curve on the 2D

manifold (X4, X5). In the case of multi-step periods of significant uphill step heights,

the walker would simply fall down, going to an absorbing failure state. Thus, the

mesh only grew in one general direction.

0 10 20 30 40 50 60 70-140

-120

-100

-80

-60

-40

-20

0

20

X4 (deg/s)

X 5 (deg

/s)

Fig. 6. Performance for the upright torso walker. (a) Data from the Monte Carlo trials

(a)

Page 38: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

27

0 10 20 30 40 50 60 70-140

-120

-100

-80

-60

-40

-20

0

20

X4 (deg/s)

X 5 (deg

/s)

0 10 20 30 40 50 60 70-100

-50

0

-80

-60

-40

-20

0

20

X4 (deg/s)X5 (deg/s)

step

hei

ght c

hang

e(cm

)

Fig. 6. Performance for the upright torso walker (b) Sparse set of points used to build an

approximate transition matrix of the dynamics. (c) the max(Δh+) (largest uphill step) and max(Δh-)

(downhill) one-step perturbations are shown for each point in the sparse set.

(c)

(b)

Page 39: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

28

D. Failure Modes

Figure 6(c) shows max(Δh) values for our sparse mesh points. The largest

max(Δh+) value is about 0.026 [m], compared to the max(Δh-), which is at least -0.65

[m] in magnitude. The fact that max(Δh+) is so much smaller in magnitude than the

max(Δh-) reemphasizes our earlier comments that improved walking intuitively

depends on increasing max(Δh+).

Figure 5 in fact gives a closer view of the upper limit shown in Figure 6(c). Note

that there are two distinct regions within the ceiling of green points shown. For states

with higher kinetic energy, i.e., larger magnitude angular velocities, the limit is nearly

flat at around 2.6 cm. The failure mode here corresponds to a lack of sufficient swing

leg clearance. Unlike the optimal walking gait shown in Figure 3, the upright torso

gait simply never gets its swing leg foot high enough to clear a step change in terrain

of more than about 2.7 cm. The walker is “tripping forward” for failures that occur in

this region.

By contrast, at states with lower kinetic energy, where angular velocities

approach zero, the swing leg can clear terrain, but the stance leg never successfully

goes past vertical. The failure events here correspond to “falling backward”. See the

Figure 6(a) to better visualize this region, in which both leg velocities approach zero.

Reaching this region typically occurs because a walker has traveled uphill for several,

successive steps.

Page 40: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

29

E. Metastability

Let us assume that each new relative change in height is selected from a particular

Gaussian distribution with zero mean and some particular standard deviation. Since

the probability of the next step height change is drawn from a Gaussian distribution,

there is always finite (non-zero) probability any given step will cause failure, and so

the walker is guaranteed to eventually fall, with probability one. However, the system

may still demonstrate exceptionally long-living periods of continuous walking. Such

long-living behaviors before eventual failure are not strictly stable, but they are well-

described as metastable [17] dynamics. To examine the metastability of the system,

we will analyze a state transition matrix for the dynamics of rough terrain walking.

This matrix is built using our sparse set of observed Poincaré states along with data

from trials (described earlier) in which we simulate what happens from each state, for

discrete heights ranging from -2.7 to 2.7 cm. We will in fact build transition matrices

for each of several magnitudes of noise, to calculate the expected number of step to

failure, which is the criterion for metastability, as a function of the level of noise.

1. Probability State Transition Matrix

For each value of terrain noise, that we wish to examine, we calculate a

probability transition matrix, T̂ , by using equations (1) and (2) below:

2/

2/

)(hi

hi

h

hhiH dhfhf

(1)

)(ˆ1

hfTT H

n

ih

(2)

Page 41: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

30

where fH is a probability mass function, and fh is the probability density function of

the Gaussian distribution with the desired variance to be examined. TΔh is the state

transition matrix at the corresponding step height change Δh, with an extra “fallen

down” state included along with our sparse (X4,X5) points. Each element ijT in hT

and T̂ contains the probability of going from state i to state j. Once a walker enters

the fallen state, it remains fallen, so that falling down is represented as an absorbing

failure state. Hence, the last row of TΔh is always [0,0,…,0,1], representing fallen

states transition to fallen states with probability one. In our simulations, 110 sparse

states were selected and step-to-step transitions were simply mapped to the nearest

neighbor node. Note that we also tested more sophisticated weighting strategies,

notably barycentric weighting for an irregular mesh of the sparse points, but results

were not significantly different in either case. Thus, we focus on the more simple,

nearest-neighbor approach in this presentation.

The probability transition matrix can be used to estimate the probability of being

at any neighborhood of interest in state space after n steps of walking on

stochastically rough terrain, as shown in equation (3).

nTpp ˆ [0] [n] TT (3)

Here, p[n] is the state distribution vector of the system; it is a vector containing

the probability of being at any mesh state at the nth step, and can be calculated given

any initial state distribution vector, p[0].

2. Eigenvalues and Eigenvectors of TT̂

Page 42: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

31

We can decompose any initial state distribution vector, p[0], into a sum of the

eigenvectors of TT̂ , which is the transpose of the transition matrix, as:

)1()1(00 , ]0[ NNj VkVSp (4)

otherwise , 0

; jn , 10jS (5)

where k is the initial weight constant vector, N is the number of the selected states,

and V contains all the eigenvectors of TT̂ in columns. 0jS is a vector representing a

particular, known initial state for the walker, before taking the first step. Note that it

is also completely valid to assume a probability distribution for the initial condition,

rather than a particular state; the derivation below is identical in either case.

The probability mass function (PMF) for each mesh state (the jth from total 110

states) after n steps can be found from the state distribution vector, nS , as shown in

equation (6),

kVS nn (6)

where λ is a diagonal matrix with the eigenvalues of

TT̂ ,λi , 1321,1,,3,2,1 NNi ,along the diagonal. λ1 will

always be 1 since it is the eigenvalue of the absorbing state. In other words, once you

are in an absorbing state, you remain there with probability one. For systems that

demonstrate long-living behaviors, the magnitude of the second-largest eigenvalue is,

correspondingly, only slightly less than 1. If the third and lower eigenvalues are not

Page 43: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

32

very close to unity as well, then the expected mean number of steps to failure for the

system can be approximated as:

)1(1 2failM (7)

This theory is discussed in much greater detail in [17].

Page 44: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

33

V. Stability Estimation Walking on Rough Terrain

A. Results from Monte Carlo Trials

1. Initial Controller

For the upright torso walker, walking on terrain where σ = 0.005[m], we find that

λ2 = 0.9992 and λ3 = 0.81 in our simulations. This corresponds to an expected

average of about 1,000 steps before failure, for initial conditions that are well-

represented within the second eigenvector (e.g., in a particular neighborhood about

the fixed point for walking). Figure 7 shows how rapidly initial conditions are

“forgotten” for this system. After 10 steps, the PMF of our discretized system has

nearly converged a steady-state value.

Page 45: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

34

Fig. 7. Starting at each of three, different initial conditions, shown in the leftmost images above,

the probability mass function (PMF) is shown after taking 1, 5, 10 and 20 steps on stochastically

rough terrain. The similarity toward the right side indicates that initial conditions are rapidly

forgotten as the dynamics evolve toward a probabilistic distribution for metastable walking. (Sigma

is 5mm in this case.)

Most falls for the walker are expected to occur from low-energy regions of state

space, where the walker (as previously discussed) cannot successfully pivot forward

on its passive ankle to complete a step, as illustrates in Figure 8. The average step

height causing failure in these trials (in which =5mm) was around 1.7cm,

considerably lower than the single-perturbation limit of 2.6cm, listed in Table 3. As

Page 46: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

35

we anticipated, the mixing effects of rough terrain walking result in failures due to

multi-step events – most particularly, to multiple uphill perturbations in a row.

0 0.5 1 1.5-3

-2

-1

0

1

X4 (rad/s)

X 5 (rad

/s)

0 0.5 1 1.5-3

-2

-1

0

1

X4 (rad/s)0 0.5 1 1.5

-3

-2

-1

0

1

X4 (rad/s)

Monte Carlo data

0.1 0.2 0.3 0.4 0.5 0.6

-0.2

0

0.2

0.4

X4 (rad/s)

X 5 (rad

/s)

Monte Carlo data

Fig. 8. (a) The conditional probability of failing on the next step, as a function of X4 and X5. (b)

The probability of being at any given state, after initial conditions (IC) are forgotten. (c) and (d) The

total probability of a failure occurring from each state on any one step, after IC are forgotten. (d)

magnifies (c) around the “tail” area. Magenta points show actual failures in our Monte Carlo

simulations; they are grouped at the tail, as expected.

(a) (b) (c)

(d)

Page 47: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

36

2. Optimal Controller

We also created a family of transition matrices for the optimal PD-controlled

torso walker (θ3des = 67°, θ2des = -24°) for various different levels of noise. Our

methods were similar to those described in modeling the upright walker, except that

we skipped the painstaking step of simulating each, particular step height for each,

particular element in the mesh and instead only post-processed data from initial

Monte Carlo trials (with sigma of 5cm) to create each matrix.

0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1.5

-1

-0.5

0

0.5

1

X4 (rad/s)

X 5 (rad

/s)

(a)

Page 48: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

37

0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1.5

-1

-0.5

0

0.5

1

X4 (rad/s)

X 5 (rad

/s)

0 0.5 1 1.5 2-2

0

20

2

4

6

x 10-3

PM

F

X4 (rad/s)X5 (rad/s)

Fig. 9. (a) All the states from Monte Carlo trials. The red points indicate the states before falling

down (b) The probability mass distribution (PMF) for the optimal torso walker (c) The probability

mass distribution (PMF) for the optimal torso walker in a 3D viewpoint.

(b)

(c)

Page 49: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

38

B. Average Number of Steps Taken

Figure 10 compares steps-to-failure with results from Monte Carlo trials. It is not

practical to use Monte Carlo trials to verify all cases here, but the agreement we find

in cases we did test is very encouraging, since it is not obvious that our sparse set of

points, representing (X4,X5) only, could accurately capture the step-to-step walking

dynamics here.

10-1

100

101

100

105

1010

1015

std dev in h (cm)

Av.

# s

teps

to fa

ilure

Upright walker: Est. from 2

Upright walker: Monte CarloOptimal walker: Est. from 2Optimal walker: Monte Carlo

Fig. 10. Expected number of steps before fallen, as a function of terrain variability. Solid and

dashed lines show estimates based on transition matrix eigenvalues for the upright (θ3des = 4°) and

optimal (θ3des = 67°) walkers, respectively. Green and yellow points show the averages from Monte

Carlo trials.

Page 50: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

39

VI. Summary

A. Conclusion

In this thesis, we identify and analyze a simple but effective model for biped

locomotion on stochastically rough terrain. First, we compare the relative

effectiveness of a compass gait model with versus without a torso. Using

heuristically-tuned controllers for both systems, we find the torso walker can handle a

single-step perturbation that is 2.5 times greater than our standard CG model. As our

second contribution, we optimize low-level controllers for torso angle and swing leg

motion, improving performance significantly (5 times) over our heuristic initial

controller.

Previous research has documented that the largest uphill step an optimized CG

walker can handle is at most on the order of 2% of leg length [10, 15]. Our optimized

torso CG can handle a single step perturbation of about 15 cm for a 1-meter leg. On

stochastically rough terrain, where terrain height varies at each step and the walker is

in a stochastic limit cycle, failures can occur due to lower step changes; however, it

can still handle uphill or downhill steps of at least 10% of leg length. As in the case of

the heuristic controller, the increase in terrain roughness that the optimal walker with

a torso can negotiate is more than five times larger than the upright torso walker.

Finally, we develop meshing techniques to capture the step-the-step dynamics of a

six-dimensional system. We use an eigenanalysis of this transition matrix to examine

the stochastic stability of controlled torso walkers.

Page 51: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

40

B. Discussion and Future Work

Our discretized, low-dimensional modeling of walker dynamics is in part

developed as a step toward facilitating the use of dynamic programming in studying

and further optimizing the control of robot walking. We have presented some

promising steps toward the analysis of higher-order dynamic systems, but there are

still several directions we plan to explore in future work. Of particular interest, we

seek improved methods for using limited and/or real-world data from a robot to

develop both transition matrix approximations and to estimate the terrain disturbance

which results in failure across the regions of state space that are visited.

Tentatively, we believe this might potentially be done with two small-scale sets of

experiments. One set would involve mildly rough stochastic terrain; this would be

used to generate a sparse set of discrete points in state space and corresponding

transition matrix describing step-to-step dynamics. Our plots of probability mass

distribution in Section IV use this basic approach, except that the experiments here

are performed in simulation, rather than on an actual robot.

A second set would involve steady state walking on a slope, followed by one

particular step change in height. Here, the goal would be to approximate the green

“ceiling” of possible next Δh, as shown in Figure 5, for other systems. Intuitively,

regions in state space corresponding to lower kinetic energy (i.e., velocities closer to

zero) have a lower “ceiling”, and we can travel toward these regions by walking uphill

for several steps. Conversely, walking downhill tends to pump energy into the system,

as one would expect. The future work related to this method could be analyzing the

Page 52: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

41

dynamic system after adding an impulse on the tip of the stance leg along the axial

direction after impact, which is also the natural mechanism of human walking. This is

of interest because the energy can be compensated by the impulse at each step, thus

enable the torso walker to overcome the falling down case of pivot forward and

increase the stability walking on rough terrain. Exact details of such a method remain

as open problem.

The third set could be an extension experiment of the optimal controllers on

different terrain slopes. It is of interest (1) to analyze the performance of the torso

walker walking on a rough terrain with both changes in terrain slope and step changes

in height and (2) to develop control strategies for switching between low-level

controllers based on perceived information for several limited steps ahead on the

terrain.

Finally, we note that it is interesting that the optimal torso angle for blind walking

on rough terrain is nearly horizontal. Humans walk with an upright posture, while our

walker looks more reminiscent of a bird such as an ostrich or emu. It would be

interesting to investigate the relative stability of models approximating the mass

distribution and joint trajectories from data captured from both humans and large

birds using our eigenanalysis techniques.

Page 53: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

42

References

1. R. Bellman, Dynamic Programming. Princeton University Press, 1957.

2. T. McGeer, “Passive dynamic walking,” International Journal of Robotics Research, vol. 9, pp. 62–82, April 1990.

3. M. J. Coleman and A. Ruina, “An uncontrolled toy that can walk but cannot

stand still,” Phys. Rev. Letters, vol. 80, pp. 3658–3661, 1998.

4. S. H. Collins, A. Ruina, R. Tedrake, and M.Wisse, “Efficient bipedal robots based on passive-dynamic walkers,” Science, vol. 307, pp. 1082–1085, February 18 2005.

5. A. D. Kuo, “Energetics of actively powered locomotion using the simplest

walking model,” Journal of Biomechanical Engineering, vol. 124, pp. 113–120, 2002.

6. S. H. Collins and A. Ruina, “A bipedal walking robot with efficient and human-like gait,” Proc. IEEE International Conference on Robotics and Automation, Barcelona, Spain, Apr 2005.

7. A. Goswami, B. Espiau, and A. Keramane, “Limit cycles and their stability in

a passive bipedal gait,” in Proc. of IEEE International Conference on Robotics and Automation (ICRA), pp. 246–251, 1996.

8. A. Goswami, B. Thuilot, and B. Espiau, “A study of the passive gait of a

compass-like biped robot: symmetry and chaos,” International Journal of Robotics Research, vol. 17, no. 12, 1998.

9. E. R. Westervelt, J. W. Grizzle, C. Chevallereau, J. H. Choi, and B. Morris, Feedback Control of Dynamic Bipedal Robot Locomotion. CRC Press, Boca Raton, FL, 2007.

10. K. Byl and R. Tedrake, “Approximate optimal control of the compass gait on rough terrain,” in Proc. IEEE International Conference on Robotics and Automation (ICRA), 2008.

Page 54: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

43

11. J. L.-S. Su and J. B. Dingwell, “Dynamic stability of passive dynamic walking on an irregular surface,” Trans. of the ASME, vol. 129, no. 6, pp. 802–810, 2007.

12. T. Erez and W. D. Smart, “Bipedal walking on rough terrain using manifold control,” Proc. International Conference on Intelligent Robots and Systems (IROS), pp. 1539–1544, 2007.

13. C. M. Hubicki, “Energy-economical heuristically based control of compass gait walking on stochastically varying terrain,” Master’s thesis, Bucknell Universitiy, 2011.

14. F. Iida and R. Tedrake, “Minimalistic control of a compass gait robot in rough

terrain,” in Proceedings of the IEEE/RAS International Conference on Robotics and Automation (ICRA), IEEE/RAS, 2009.

15. F. Iida and R. Tedrake, “Minimalistic control of biped walking in rough

terrain,” Autonomous Robots, vol. 28, no. 3, pp. 355–368, January 7 2010.

16. I. R. Manchester, U. Mettin, F. Iida, and R. Tedrake, “Stable dynamic walking over uneven terrain,” The International Journal of Robotics Research (IJRR), vol. 30, March 2011.

17. K. Byl and R. Tedrake, “Metastable walking machines,” International Journal

of Robotics Research, vol. 28, pp. 1040–1064, August 1 2009.

18. E. C. Whitman and C. G. Atkeson, “Control of a walking biped using a combination of simple policies,” in Proceedings of the IEEE International Conference on Humanoid Robots, (New Orleans, LA), pp. 520–527, Dec 2009.

19. S. J. Russell and P. Norvig, Artificial Intelligence: A Modern Approach.

Prentice Hall, 2nd ed., 2003.

Page 55: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

44

Appendix

A. Equation of Motion of the Compass Gait model with a

Torso

The EOM of CG with a torso can be expressed in a general form:

BuGCD ,

Where

2

31

21

2

312122

0cos

041cos

21

coscos21

45

2

LmrLm

mrmr

rLmmrrmmm

D

tt

tht

00sin

00sin21

sinsin210

131

1212

3312212

rLm

mr

rLmmr

C

t

t

) (θLgm

θgmr

mmmgr

G

t

th

3

2

1

sin

sin21

23sin

110

101

B

Page 56: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

45

3

2~

let ,

333333

222222

3

2~

desdes

desdes

des

desdes KdKp

KdKp

The magnitude of the input torque is determined by the affine relationships

between unit torque and the angular accelerations: 2ˆ1ˆ~~~~ eeoffdes ba

,

where

10~ ,

01~

01~

),(~

12ˆ

111ˆ

1

BDBDBGCD

GCD

eoffe

off

offdeseebaba

u ~~~~10

01

1

2ˆ1ˆ

Page 57: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

46

B. Impact equation of the Compass Gait model with a Torso

The Impact Equation of CG with a Torso can be expressed in a general form:

QQ

Where

0041

0cos

cos41

2

231

3222

11

mr

LmrLm

rLmLmmrq

Q tt

tt

312122

11 coscos41 rLmrmmmmrq tth

041cos

21

0cos

cos1cos241

221

2

232

32212

11

mrθθmr

LmrLm

rLLmmrq

Q tt

t

32222

212

11 cos45cos

21 θrLmrmrmmrθθmrq tth

Page 58: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

47

C. Pseudo code: Impact detection

Q: state with six dimensions

X: the absolute horizontal position

Y: the absolute vertical position

Function: find the impact state Qhit

Initialization: constStep, simulating T secs to get the state vector: Qout,

For Yhip> Yterrain & Xswing > Xstance

if Q1st-collision exists

if Ypre-1st-collision < Yterrain

Qcollision = Q2nd-collision for ( Q2nd-collision exists

& Ypost-2nd-collision < Yterrain)

else

Qcollision = Q1st-collision ;

end

if Qcollision exists & Xcollision { Xterrain-height-change-interval} & constStep

Qcollision = Qnext-collision for Qnext-collision exists

and Ypost-next-collision < Yterrain

end

Interpolate Qout to find Qhit as Qhit(1) > 0 (having a successful step)

End

If Qhit doesn’t exist

Page 59: UNIVERSITY OF CALIFORNIA The Compass Gait with a Torso ...katiebyl/papers/Chen_MSThesis.pdf · The Compass Gait with a Torso – Analyses and Control of Walking on Stochastically

48

The robot falls

end

Returns Qhit, fall

Note: To obtain the correct impact point on the ground, the absolute resolution

and the relative resolution of ode45 function are both being set as 10-6. The number is

determined heuristically to obtain a precise height within error smaller than 10-4 [m]

while doing the experience for the discrete terrain change in height.