## ABSTRACT

Many quadrupedal mammals transition from a four-beat walk to a two-beat run (e.g. trot), but some transition to a four-beat run (e.g. amble). Recent analysis shows that a two-beat run minimizes work only for animals with a small pitch moment of inertia (MOI), though empirical MOI were not reported. It was also unclear whether MOI affects gait energetics at slow speeds. Here, I show that a particular normalization of the pitch moment of inertia (the Murphy number) has opposite effects on walking and running energetics. During walking, simultaneous forelimb and hindlimb contacts dampen pitching energy, favouring a four-beat gait that can distribute expensive transfer of support. However, the required pitching of a four-beat walk becomes more expensive as Murphy number increases. Using trajectory optimization of a simple model, I show that both the walking and slow running strategies used by dogs, horses, giraffes and elephants can be explained by work optimization under their specific Murphy numbers. Rotational dynamics have been largely ignored in quadrupedal locomotion, but appear to be a central factor in gait selection.

## INTRODUCTION

Despite their incredible morphological diversity, cursorial quadrupedal mammals typically use stereotyped gaits. As speed increases, mammals commonly transition from a four-beat walk at slow speeds to a two-beat trot or pace (where beats are distinct contact events). We see the 4→2 pattern across disparate families, such as equids (horses; Barrey, 1999), canids (dogs; Jayes and Alexander, 1978), bovids (sheep and gazelle; Jayes and Alexander, 1978; Leach and Cymbaluk, 1986; Pennycuick, 1975), camelids (dromedaries; Dagg, 1974) and antilocaprids (Dagg and Vos, 1968).

This pattern appears surprising from an energetic perspective. A simple accounting of energetic cost in gait is to consider only positive work as costly, and to approximate leg contacts as collisions acting on the centre of mass (COM; Ruina et al., 2005). While there are other sources of metabolic cost, e.g. from isometric force (Kushmerick and Paul, 1977) or rapid changes in force (Doke and Kuo, 2007), the collisional, work-centric perspective explains many phenomena in locomotion, including the pre-heelstrike pushoff in bipedal walking (Kuo, 2002), the smooth trajectory of gibbon brachiation (Bertram et al., 1999), why individuals use a flatter running gait in reduced gravity (Polet et al., 2018), and the leg sequence in transverse galloping (Ruina et al., 2005).

The point–mass collisional perspective posits that frequent, evenly spaced collisions are better than infrequent, irregular collisions for a given speed and stride length. To optimize work, a quadruped should use as many contacts as possible during a stride; a pronk costs twice as much as a trot, which costs twice as much as a four-beat tölt (Fig. 1; see Appendix 1 for a simple derivation).

- (·)
^{−}value before applied impulse

- (·)
^{+}value after applied impulse

- COM
centre of mass

*D*stride length

*D*′non-dimensional stride length (

*D*/*L*_{H})*E*_{rot}rotational kinetic energy

*E*_{trans}translational kinetic energy

*g*gravitational acceleration

- GRF
ground reaction force

*I*pitch moment of inertia

*Î*Murphy number ≡

*I*/(*mL*^{2})*L*half shoulder-hip distance

*L*_{H}hindlimb length

*m*body mass

*m*′_{F}mass bias toward forelimbs

- MOI
moment of inertia

*n*number of contacts in a stride

*P⃗*impulse at limb

*P⃗*_{R}reaction impulse

- 𝒫
_{Ntot}normalized negative power

- 𝒫
_{tot}instantaneous net actuator power

*t*time (s)

*T*stride time

*T̂*non-dimensional stride time [

*T*√(*g*/*L*)]*T*^{′}non-dimensional stride time [

*T*√(*g*/*L*_{H})]*T*_{c}time between successive contacts

*U*mean horizontal speed

*U*′non-dimensional mean horizontal speed [

*U*/√(*gL*_{H})]*V*vertical component of COM velocity at touchdown

*W*_{stride}positive work in a stride

*W*_{tölt}positive work for tölting over one stride

*W*_{trot}positive work for trotting over one stride

- α
torso angle to horizontal at touchdown

- ω
mean rotational speed

Why, then, do so many mammals trot? It is unlikely that a slow, four-beat running mode is physically impossible for trotters, when ‘gaited’ horses have been bred to exhibit such gaits. Notable examples are the tölt of the Icelandic horse (Biknevicius et al., 2004), the amble of the American saddlebred horse, and the running walk of the Tennessee walking horse (Hildebrand, 1965). Given the few morphological differences between gaited and non-gaited breeds, it seems less likely that natural populations are physically constrained from performing a four-beat run, and more likely that they reject it (whether through behavioural, developmental or evolutionary mechanisms; e.g. Andersson et al., 2012).

In a recent article, Usherwood (2020) resolved the paradox by considering the energy of pitching the body. Assuming ground-contact forces are axial to the leg, then foot contact in a four-beat gait induces pitching, but a two-beat gait can avoid it. The question, then, is when do the energetics of pitching outweigh the energetics of COM translation? When pitching energetics dominate, trotting should minimize cost (positive work), and when translation dominates, tölting should.

*m*is body mass,

*I*is body pitch moment of inertia (MOI) about the COM, and

*L*is half the shoulder–hip distance. This dimensionless MOI (called hereafter the ‘Murphy number’ for expediency and in honour of its discoverer), is exactly the ratio of the change in translational to rotational kinetic energy imparted to a free object by a generating impulse perpendicular to

*L*(Appendix 3). For <1, more rotational energy is imparted than translational, and the opposite is true for >1 (Fig. 2).

This insight might point to why some mammals deviate from a two-beat run at moderate speeds. Elephants and many primates use a four-beat amble at a slow run (Ren and Hutchinson, 2008; Schmitt et al., 2006); giraffes and ring-tailed lemurs transition directly from a walk to a canter (Dagg and Vos, 1968; O'Neill, 2012). >1 implies either that a significant portion of an organism's mass lies outside its torso or that some mass is positioned a large distance away from the COM (relative to hip–shoulder length). It seems plausible that the large heads of elephants, the long and/or massive tails of some primates, and the long necks of giraffes might push their Murphy numbers beyond unity, but this was not tested by Usherwood (2020).

While rotational dynamics and the Murphy number would seem to rectify the two-beat running paradox, it raises another question: why is quadrupedal walking typically four-beat? A mammal using a four-beat walk exhibits pitching of the back (Griffin et al., 2004; Loscher, 2015). If these rotational energies are large, should the same arguments for the trotting–tölting tradeoff not apply?

Four-beat walking benefits from distributed contacts interspersed with passive vaulting phases, where the system dynamics in stance resemble a four-bar linkage (Usherwood et al., 2007). To maintain passive vaulting, a pitching torso is necessary, and the pitching direction must be reversed on each transfer of support. This means angular momentum must be absorbed and resupplied with every step. (It is possible that the braking impulse freely transfers some of the rotational energy into translation, though for simplicity this is assumed small.) The orientation of the body at transfer of support is predetermined by the geometry of the four-bar linkage, which is independent of the body's mass or MOI. Likewise, if step length and speed are predetermined, then the time between hindlimb and forelimb transfer of support is independent of MOI. As the average rotational speed is independent of MOI, pitching energy should be proportional to MOI – not inversely proportional, as in running (Fig. 2).

We would therefore expect the Murphy number to have the opposite effect on the energetics of walking as compared with running. At large , a two-beat walk should be favoured to avoid costly pitching at the expense of larger COM collisions. At low , the work-minimizing strategy should be to distribute contacts in a four-beat walk, but switch to a pitch-free two-beat run at higher speeds – the common 4→2 pattern.

However, mammals that avoid two-beat running typically do not avoid four-beat walking; the walking gaits of elephants, giraffes and ambling primates appear to be four-beat (Ren and Hutchinson, 2008; Basu et al., 2019a; Schmitt et al., 2006; Young et al., 2007). It is possible that their gait transition patterns are explained by subtle dynamical effects overlooked by these heuristic arguments.

In this paper, I examine the energetics consequences of changing Murphy number and speed through trajectory optimization of a simple quadrupedal model with a work-based cost function. I also use published data to test the hypothesis that Murphy number is a predictor of differences in gait choice between quadrupedal mammals. Finally, using the results of the model, I highlight interesting consequences of Murphy number on optimal ground reaction forces, and why point–mass dynamics are insufficient to explain quadrupedal walking.

## MATERIALS AND METHODS

### Computational modelling and optimization

The quadrupedal model is planar and based on the methodology of Polet and Bertram (2019). Legs are massless prismatic actuators; limbs cannot generate torque about their respective attachment points to the torso. For simplicity, limb lengths are equal to inter-limb spacing (2*L*), and the COM is located halfway between the forelimbs and hindlimbs.

There are a few noticeable differences between the present simulation methodology and that of Polet and Bertram (2019). First, the analysis is constrained to symmetrical gaits. Optimal gaits are computed using trajectory optimization (direct collocation) over the half stride cycle. A full stride cycle can be generated by repeating the solution in the second half of the cycle, while swapping actuation between left and right limbs. As the body is fully symmetrical about the torso centre, torso pitch angle can be as high or low as ±π, and I do not impose a limb excursion angle constraint. Some bipedal solutions emerged as locally optimal on occasion. These were eliminated from the analysis *post hoc*.

Following Polet and Bertram (2019), the present model uses an objective combining limb work with a penalty proportional to the integral of force–rate squared and complementarity violation terms. The force–rate penalty is a computational regularization term to smooth otherwise impulsive work-minimizing solutions. It was not chosen to fit empirical data; rather, it was chosen to be as small as possible while still achieving practical computational times. Its normalized penalty coefficient is 3×10^{−5}, 100 times smaller than the value used in Polet and Bertram (2019). Because of the impulsivity of the solutions, and their approximation via smooth piecewise functions, forces often exhibited fluctuations about zero before and after contact events. To mitigate this, outputs that converged on a solution were subject to an additional mesh refinement step, which interpolated additional collocation points midway between existing points. This refined mesh served as the input guess for an additional round of optimization.

Like the model of Polet and Bertram (2019), the present trajectory optimization setup uses complementarity constraints to allow the optimizer to determine the stepping sequence. Optimizations were carried out with *hp*-adaptive quadrature in GPOPS-II (v.2.3; Patterson and Rao, 2014) and the NLP solver SNOPT (v.7.5; Gill et al., 2005, 2015).

A non-dimensional stride length and mean horizontal speed were defined as *D*′=*D*/*L*_{H} and *U*′=*U*/√(*g**L*_{H}), respectively, where *L*_{H} is hindlimb length (equal to 2*L* in the model). These correspond to a common normalization seen in the literature (Alexander and Jayes, 1983). The prime superscript (·)′ and the hat diacritic denote variables normalized by hindlimb length or half inter-limb spacing, respectively.

*D*′ was determined from

*U*′ through an empirical relationship for walking cursorial mammals (Alexander and Jayes, 1983):

Had stride length not been specified as a function of speed, the optimizer would have chosen minimal stride lengths to minimize work (in the absence of a swing cost or step-frequency penalty; Kuo, 2001). Grid points were selected between 0.25≤*Î*≤10 and 1.5≤*T*′≤4. The latter represents the lowest and highest stride times observed by Alexander and Jayes (1983) among cursorial mammals. *T*′=*D*′/*U*′ was used as the target input to the model, as it determines running energetics more directly than speed (Appendix 2).

An initial search took place at grid points on *T*′=0.25 intervals, and *=*0.25, 0.5, 0.75, 1, 1.25, 2, 5 and 10. Afterwards, grid points were added close to identified transition zones between gaits. Fifty initial guesses were used for each *T*′>2.5 condition, while 100 initial guesses were used for *T*′≤2.5. Convergence was difficult at the slowest speeds (*T*′=4), and several outliers were identified as isolated gaits of a certain number of beats surrounded by solutions with a different number of beats. To these solutions, another 50 guesses were added to better converge to the optimal solution. Initial guesses were formed by selecting from a uniform random distribution across each decision variable's range at 16 uniformly spaced grid points.

*post hoc*by looking at peak negative power during the stride. Defining a beat as peak negative power is consistent with the collisional gait perspective, which points to mechanisms of energy loss and approximates them as impulsive events (Ruina et al., 2005; Bertram and Hasaneini, 2013). Setting normalized (negative) power as:where is instantaneous net power from all actuators and

*t*is time, the number of beats was the number of local maxima in . If two maxima were less than 0.03

*T*apart, the greater maximum among them was counted as a single beat. This method eliminated some noise while selecting only the largest events of energy loss as a ‘beat’. Though it is somewhat arbitrary, the shape of gait ‘zones’ is fairly robust to changes in tolerance (see Appendix 4 and Fig. S1 for results using other tolerances).

Limb contact for a given limb was defined as its ground reaction force (GRF) >0.01*mg*. Walking was defined as having a duty factor >0.50 in at least one pair of limbs (fore or hind), and running as all other cases. Although this distinction aligns with Hildebrand's use of the terms ‘walk’ and ‘run’ for symmetrical gaits (Hildebrand, 1965), there are examples in nature of ‘grounded running’ where the COM bounces as in a run, but duty factors exceed 0.5 (Usherwood et al., 2008; Ren and Hutchinson, 2008).

### Calculation of empirical moments of inertia

Pitch MOIs about the COM during standing were derived from values reported in the literature (Table 1). Alexander (1980) measured whole-body MOI for an Alsatian dog directly and reported the normalized value along with body mass. The reference length (not reported by the author) was derived from fig. 12 in Jayes and Alexander (1978), which Alexander (1980) used as a reference. Whole-body MOI for the Dutch warmblood was calculated from Buchner et al. (1997) using fig. 1 from that study as a guide for limb and head orientation.

For the elephant and giraffe, no direct MOI measurements are available, but some studies report estimates using 3D models. Ren and Hutchinson (2008) provide measured masses and estimated MOI for elephants. The shoulder–hip length was calculated by scaling their reported limb lengths to fig. 1 in Ren et al. (2008). Estimated MOI was also derived for a horse and giraffe from Henderson and Naish (2010). Shoulder and hip locations were estimated by comparing their fig. 1 with skeletal drawings or mounts. COM position was assumed to lie along the shoulder–hip line, and its bias towards the forelimbs (*m*′_{F} in Polet and Bertram, 2019) was determined from calculations using Buchner et al. (1997) for the horse (*m*′_{F}=0.50) and ground reaction forces from Basu et al. (2019a) for the giraffe (*m*′_{F}=0.65). The horse MOI was used to ground-truth the estimation method of Henderson and Naish (2010), and yielded =0.80, similar to the empirical value of 0.82 (Table 1).

## RESULTS

Fig. 3A shows optimal gaits at parameter combinations of *Î* and *U*′. Optimal gaits generally fall into four large regions. At high *Î*, four-beat runs and two-beat walks are optimal. At low *Î*, the reverse is true. While the cutoff between two- and four-beat runs is approximately *Î*≈1, as predicted by Eqn 2, the transition *Î* for four-beat to two-beat walking increases from about *Î*=1.2 at the highest walking speeds to *Î*=2.3 at the slowest speeds examined. The zone where a two-beat walk is optimal forms a wedge in the upper-left corner of the plot, with the transition speed from two-beat walk to four-beat run increasing as Murphy number decreases.

A quadrupedal robot with ≈0.6 (Xi et al., 2016) is predicted to transition directly from a four-beat walk to two-beat run. Horses and dogs exhibit ≈0.8, and are likewise predicted to use a four-beat walk and two beat run. Elephants have very close to 1. Here, a four-beat gait approximately optimizes work regardless of speed, except at 0.8<*U*′<1.1 and 4.3. The giraffe has the most extreme Murphy number of all the mammals investigated here. The optimizer predicts three gaits as speed increases: a four-beat walk for *U*′<0.26, a two-beat walk for 0.26<*U*′<0.70, and a four-beat run when *U*′>0.70.

Fig. 3B–E shows GRF for four walking solutions at *U*′=0.31 (see also Movie 1). During transfer of support of the forelimbs (red), hindlimb stance forces increase when =0.75 (black arrow), decrease when =1.5 and do not change at all when =1. Two-beat walking exhibits no such response (Fig. 3E), as both hindlimbs and forelimbs transfer support simultaneously.

At the most extreme Murphy number investigated here (=10), three ‘flavours’ of four-beat runs emerge (Fig. 3F–H; see also Movie 2). When *U*′=0.50, the optimal solution is to vault over a hindlimb in single stance (represented by the double-hump GRF), transfer to single stance on a forelimb, and repeat the pattern. When *U*′=0.88, a hybrid pattern is optimal, with vaulting in hind and bouncing in fore (the bouncing pattern indicated by the single-hump GRF). At higher speeds, alternating single-stance bouncing phases are optimal.

## DISCUSSION

Four-beat walking was optimal at low , while four-beat running was optimal at high (Fig. 3A), supporting the hypothesis that Murphy number has opposite effects on which gaits minimize positive work in walking and running. In both walking and running, there is a tradeoff between distributing collisions between multiple contacts (favouring four-beat gaits) and avoiding work to pitch the body (favouring two-beat gaits). During running, the possible energetic losses from pitching decrease as Murphy number increases, while in walking, these losses increase with Murphy number (Fig. 2).

At Murphy numbers typical of dogs and horses (≈0.8), the tradeoff means it is optimal to use a four-beat walk and two-beat run, as these animals generally do. Indeed, even a quadrupedal robot with a small Murphy number finds the same 4→2 beat transition to be optimal (Xi et al., 2016).

For Murphy numbers close to 1, corresponding to elephants, the tradeoff seems to favour a four-beat gait regardless of speed. The only exceptions are 0.8<*U*′<1.1 and 4.3, where a two-beat run is predicted. In reality, elephants only use four-beat gaits, and it is difficult to distinguish their transition from walking to running (Ren and Hutchinson, 2008). Anecdotally, elephants can run as fast as *U*′≈3.5 for short distances (Andrews, 1937; cited in Howell, 1965), while self-selected speeds from *U*′=0.9 to 1 are rare and involve relatively high variability in limb phase (Hutchinson et al., 2006). The two-beat gaits predicted in this model for =1 are at or near speeds elephants tend to avoid. For speeds more commonly used by elephants, four-beat gaits are correctly predicted.

The giraffe has the most extreme Murphy number by far of all the mammals investigated here. It also has unusual gait patterns, exhibiting only the walk, canter and gallop, with no intermediate trot (Innis, 1958; Dagg and Vos, 1968; Pennycuick, 1975). The optimization predicts a sensible walk–run transition point of *U*′≈0.70, which is close to the slowest running speed observed in giraffes (*U*′≈0.8) by Basu et al. (2019b).

However, Fig. 3A predicts that giraffes should have two distinct walking gaits: a four-beat walk at slow speeds (*U*′<0.26) and a two-beat walk at higher speeds (0.26<*U*′<0.70). Walking giraffes exhibit a mean hindlimb–forelimb phase offset of 0.14 (range 0.09–0.2: Loscher, 2015; Basu et al., 2019a), above the 0.0625 limit for a pace given by Hildebrand (1965). These observations of a four-beat gait are for an extremely slow normalized speed (0.14<*U*′<0.30), closely matching the region where the work-minimizing model predicts a four-beat walk (Fig. 3A). Is there any evidence of giraffes using a two-beat walk at intermediate speeds?

The walk of the giraffe has been described in two-beat terms, including ‘rack-like’ (Innis, 1958) or as a pace (Dagg, 1960). However, without quantifying the phase relationship or speed at which these observations were made, it is not clear whether these represent the same gait quantified as four-beat in other studies (Basu et al., 2019a; Loscher, 2015). It seems difficult to elicit walking speeds above *U*′=0.3 for giraffes in captivity (Christian et al., 1999; Basu et al., 2019a). Indeed, Innis (1958) reports that wild adult giraffes seem to use only two modes: a ‘leisurely’ walk or a fast run. This leaves a large gap (0.3<*U*′<0.8) where giraffe gait has not been quantified, approximately where Fig. 3A anticipates a transition to a two-beat walk.

We should not place too much weight on the model's exact quantitative predictions in this case. Giraffes occupy a region of –*U*′ space where subtle changes in MOI can have profound changes on 4→2 walk transition speed. Added to the fact that is highly sensitive to *L* (a 5% change in *L* can lead to a 10% change in ), the predicted four-beat to two-beat walk transition could vary substantially with measurement error. The two-beat walk to four-beat run transition speed, however, is less sensitive to choice of under this work-centric optimization model.

While the model correctly predicts the absence of a two-beat run, giraffes do not use the predicted symmetrical four-beat run either, instead opting for a three-beat canter or four-beat gallop. While the present symmetrically constrained model could not reproduce these asymmetrical gaits, a collision-based analysis predicts that a canter should be optimal at intermediate running speeds for a long-limbed animal with a high Murphy number, such as a giraffe (Usherwood, 2020).

### Changes in walking strategy with Murphy number and speed

An interesting effect in walking can be observed as Murphy number increases. During transfer of support on one set of limbs (e.g. the hind pair), the leg at the opposite end of the body (e.g. forelimbs) will exhibit increased reaction force if <1 and decreased reaction force if >1 (Fig. 3B–D). Why does this occur?

An impulse at the hindlimbs simultaneously causes the body to translate upwards and pitch down. Depending on how much the impulse causes rotation versus translation, the net effect at the instant of the impulse may be to push the forelimbs up or down. For <1, an impulse at the hips causes the shoulders to descend; at >1, the same impulse causes the shoulders to ascend; and at =1 the shoulders remain (momentarily) stationary (Fig. 2).

During walking, it is advantageous for the vaulting limb to maintain its length; a change in length while providing axial force implies that the limb is performing work. The strategy, then, is for the vaulting limb to cancel the force it feels from the limbs undergoing transfer of support. For <1, double-stance contact induces a downward force on the vaulting limb, which can respond by increasing its applied force to maintain its length and perform no work (Fig. 3B).

For >1, double-stance induces an upward force on the vaulting limb. The vaulting limb therefore responds by reducing its applied force, maintaining its length (Fig. 3D). At some large , this strategy will fail; the vertical joint reaction force induced on the vaulting limb exceeds its upward GRF (∼0.5*mg*). This constraint does not seem to govern the transition to two-beat walking, however. =1.5 and *U*′=0.3 is near the border between four-beat and two-beat walking (Fig. 3A), yet the vaulting limb only reduces its applied force by 0.2*mg* (Fig. 3D).

The transition from two-beat walking to four-beat running occurs at lower speeds as the Murphy number increases (Fig. 3A). The four-beat ‘running’ solution at *U*′=0.5 and =10 demonstrates why (Fig. 3F; see also Movie 2). The solution is to perform a single-limb vault over forelimbs, then hindlimbs, and repeat this pattern. This solution is feasible because the Murphy number is so extreme that the body barely pitches during single stance, even though it is supported only at one end.

As we increase Murphy number, we approach the limit where any pitching can be effectively ignored. In this limit, we expect all gaits to be four-beat; it is analogous to a point mass biped with half the stride length. At slow speeds, a point mass biped should use a vaulting walk to minimize work (Srinivasan and Ruina, 2006). With an extra set of legs, it can reduce contact losses by taking twice as many steps per stride (similar to the solution observed in Fig. 3F). At intermediate speeds, a point-mass biped should use a hybrid gait: a pendular run with single-leg contacts (Srinivasan and Ruina, 2006); again, adding two legs means we simply halve the stride length. The simulation discovers a similar hybrid gait (Fig. 3G) – reminiscent of the slow tölt (Biknevicius et al., 2004). The same logic applies to impulsive running, the minimal-work high-speed gait for a point-mass biped, resulting in a familiar fast tölt (Fig. 3H). The extreme case of =10 has sufficient pitching energies that a two-beat walking gait is optimal at slow speeds (Fig. 3E); as we further increase , we expect the four-beat transition speed to decrease.

### Conclusions

Contact forces axial to a quadruped's legs pitch its body, unless compensated by a counter-torque. The Murphy number parameterizes the tendency of these contacts to pitch the body versus accelerate the COM. Large Murphy numbers result in less energy going into pitching versus translation by single limb contact. As a result, four-beat running is favoured to minimize positive work, because it reduces the collisional cost of changing COM momentum. At lower Murphy numbers, the opposite is true, and more oscillation of the COM is worth the price to avoid costly pitching. Two-beat and four-beat running are equally favoured close to =1, matching an analysis by Usherwood (2020).

However, Murphy number has the opposite effect on walking energetics, due to the geometric constraints of four-beat walking and the ability of the vaulting limb to counteract some of the effects felt by transfer of support at the opposite pair of limbs. Altogether, the work-based model correctly predicts the walking and slow running gaits selected by dogs, non-gaited horses, elephants and a quadrupedal robot. It also correctly predicts that giraffes should use a slow four-beat gait and avoid trotting at high speeds. It does not (nor can it) predict a canter as the slow-running gait of choice for giraffes, and predicts that giraffes should use a two-beat walking gait at intermediate to fast walking speeds (for which there are currently no data).

Point-mass collisional dynamics predict that all quadrupedal gaits should be four-beat with alternating single stance contact. It is only by considering pitching dynamics that other gaits emerge as work-optimal solutions. Except for some specialized gaits – trotting, cantering and possibly transverse galloping (Ruina et al., 2005) – the net torque about the COM is appreciable and energetically costly. Furthermore, these non-pitching gaits may be commonly used precisely because pitching would otherwise be extremely costly. Pitching may be so important energetically, that the best solution is often to render it absent.

### APPENDIX 1

#### Collisional work of one-, two- and four-beat running in a point-mass model

*V*) is lost at contact. Lost energy must be resupplied by positive work, at a cost proportional to

*mV*

^{2}/2 with every foot contact. How many contacts should a quadruped use? The time between contacts is given by ballistics as

*T*

_{c}=2

*V*/

*g*. Given a stride period

*T*, the touchdown speed then depends on the number of contacts

*n*during a stride as

*nT*

_{c}=

*T*(assuming contacts of infinitesimal duration). The touchdown speed is thus

*V*=

*g*

*T*/(2

*n*); we can therefore sum across all contacts to get the positive work required in a stride:As total positive work in the stride is inversely proportional to

*n*, the quadruped should use as many contacts as possible. What is the relative cost of a two-beat running gait (e.g. trot) versus a four-beat running gait (e.g. tölt)? From Eqn A2:

This is the central paradox from the point-mass collisional perspective. Because of the additional contacts, a four-beat gait should always be cheaper than a two-beat gait, but the latter is often preferred.

### APPENDIX 2

#### Analytical derivation of four-beat versus two-beat running work in a distributed mass model

The recent article by Usherwood (2020) gives considerable insight into the energetics of quadrupedal running. It relied on an assumption that the body remains horizontal, i.e. that time between contacts is infinitesimally short. However, the rotation imparted by an impulse at the hindlimbs can perhaps be mitigated by making contact when the body is at an angle to the horizontal. Do Usherwood's (2020) claims hold when finite pitching is considered?

First, we assume that at any given contact, all kinetic energy due to vertical translation is lost immediately and passively, and that the actuation is impulsive and perfectly pseudoelastic (that is, it resupplies exactly the lost energy back into the system, following Ruina et al., 2005). The energetic cost is exactly the resupplied energy, or the positive work of the actuators. We also assume that all actuation is vertical; this is consistent with work-minimizing running gaits on point-mass systems, where any fore–aft actuation needlessly decelerates and then reaccelerates the COM (Ruina et al., 2005). Consequently, the horizontal velocity is immaterial, and the only kinematic parameter to provide is the stride period *T*.

*I*and an even mass distribution between the forelimbs and hindlimbs, with a hind-to-fore distance of 2

*L*. Contact occurs at a pitch angle α and, because of the symmetry of our organism, we can set an equal and opposite contact angle for the next limb contact (Fig. A1). Therefore, the time between contacts must satisfy:Note that in this section, I use trotting and tölting to refer to generalized symmetrical two- and four-beat running gaits, respectively.

*P*at the forelimbs creates a change in linear momentum of

*P*=

*m*(

*V*

^{+}−

*V*

^{−}), where (·)

^{−}and (·)

^{+}denote a variable before and after the impulse is applied, respectively. With the assumption that all kinetic energy is lost at contact, we can set

*V*

^{−}=0. We have also defined

*V*

^{+}=

*V*

_{tölt}, and so:This same impulse generates a change in angular momentum. The component perpendicular to the body axis is

*P*cosα, and so the change in angular momentum is

*LP*cosα=

*I*(ω

^{+}−ω

^{−}). Again, with the assumption that all kinetic energy is lost at contact, and by defining ω≡ω

^{+}, we have:Solving for

*P*in Eqns A6 and A7 and equating, we get:We insert Eqn A8 into Eqn A5 to get a constraint on α:If we define two non-dimensional parameters ≡

*I*/

*mL*

^{2}and ≡

*T*√(

*g*/

*L*), then Eqn A9 simplifies to: is normalized stride period and is the Murphy number. Eqn A10 tells us that as →∞, α→0 for a given ; in other words, a very large moment of inertia will involve no pitching of the body, as we would expect. For a given finite , a short stride period (→0) also results in α→0; in other words, we can use the small angle approximation if we assume is sufficiently short, as we might expect in a fast running gait.

*T*and Eqn A8 for ω in terms of and α. Inserting these values into Eqn A11, we get:The first term is due to translation and depends only on the stride time (given gravity and mass). The second term is due to energy going into rotation, and now depends on stride time and the relative values of

*I*,

*m*and

*L*. Recognizing the first term as Eqn A4, we can simplify to:Using the small angle approximation (justified from Eqn A10 for a short stride period), the equation simplifies to:which is Eqn 2. It tells us that leg contacts in four-beat running at small Murphy numbers generate large rotational energy that must be absorbed at the next contact. Trotting has the advantage of eliminating pitching completely, but at the cost of fewer leg contacts.

Fig. A2 shows log_{10}(*W*_{trot}/*W*_{tölt}) over a range of stride times and moments of inertia. The changeover at =1 holds for . As continues to increase, tölting remains optimal over trotting for some Murphy numbers <1, until about =6, where tölting is always optimal regardless of Murphy number.

For large stride times, costs due to vertical velocity discontinuities become extremely expensive, while the body's rotational velocity is relatively low; both these factors favour tölting. While running at such large stride times is not common (the slowest stride times in walking mammals are at ≈6; Alexander and Jayes, 1983), this analysis illustrates that other factors come into play at slow speeds that may make a pitching gait more favourable at small . As shown in the Results, here a four-beat walk is optimal.

### APPENDIX 3

#### The relationship between the Murphy number and kinetic energy

*L*from the COM, has a component that is perpendicular to the moment arm. This component results in a translational velocity of the COM

*V*and rotational velocity ω. We would like to know the ratio between the translational and rotational kinetic energy imparted to the body:Eqn A8 applies with =

*V*and α=0. Substituting into Eqn A15:

Therefore, the Murphy number is exactly the ratio of the translational to rotational kinetic energy imparted by the component of the impulsive force perpendicular to the moment arm.

### APPENDIX 4

#### Sensitivity analysis for gait detection tolerances

To detect beats, two tolerances were set: minimum peak height (set at 0.3 times maximum negative power) and minimum distance between peaks (set at 0.03*T*). Fig. S1 shows how different tolerances affect the shape of gait zones. Only slow speeds – especially at low – are greatly affected by changes in tolerances. One solution at =1.1 and *U*′=0.9 is also affected. At slow speeds, some solutions exhibited multiple peaks in negative work in short succession at transfer of support. With low tolerances, these peaks are counted as unique beats, leading to six- and eight-beat walks. The majority of the parameter space is unaffected by changes in tolerance.

##### Interpolation scheme for gait zones

Because simulations were time intensive, I inferred beat number for missing solutions from surrounding solutions at combinations of and *U*′. However, standard interpolation schemes generally assume continuous numerical data, whereas the data here are discrete (for example, a 1.5-beat gait has no meaning here, nor does a three-beat cycle for a symmetrical solution). Instead, I used an interpolation scheme based on data points immediately surrounding the missing data. The algorithm was as follows. (1) For a missing point, find its immediate surrounding values. (2) If all surrounding values are equal to each other (*x*), with some possibly missing, then replace the current missing point with *x*. Otherwise, leave the point as missing and move on to step 1 for the next missing point. (3) Once steps 1 and 2 have iterated over the initial set of missing points, find all remaining missing points. For each of the remaining missing points, find its immediate surrounding values. (4) If all surrounding values are equal to each other (*x*), with the exception of up to one point, then fill the missing point with *x*.

This algorithm fills in missing data by matching them to the discrete gaits of their neighbours. All missing data points completely enclosed by a certain gait type would match that gait type, while missing data at gait transition zones would not be filled unless surrounded overwhelmingly by one gait type. I do not claim that this algorithm is a good general-purpose data-filling tool. The reader can judge from Fig. 3 whether it filled data satisfactorily for this study.

For minimum peak distance=0.03 and minimum peak height=0.3, simulations were completed to fill the entire space at a satisfactory resolution, without any missing points. For the tolerance sensitivity analysis (Fig. S1), the algorithm could not discern some solutions at gait transitions, and those data points remain blank.

## Acknowledgements

I would like to thank Jim Usherwood for inspirational discussions on this topic, John Bertram and Ryan Schroeder for helpful comments on early drafts, and Jessica Theodor for providing computational resources.

## Footnotes

**Funding**

This work was partially funded through the University of Calgary Silver Anniversary Graduate Fellowship.

**Data availability**

The code and dataset supporting this article are available from Zenodo: https://doi.org/10.5281/zenodo.4292640

## References

*J. Zool.*

*J. Zool.*

*Nature*

*Nat. Hist.*

*Vet. J.*

*J. Exp. Biol.*

*PeerJ*

*J. Exp. Biol.*

*J. Exp. Biol.*

*Equine Vet. J.*

*J. Biomech.*

*Fossil Rec.*

*J. Mammal.*

*Camelus dromedarius*)

*J. Zool.*

*J. Zool.*

*J. Exp. Biol.*

*SIAM Rev.*

*User's Guide for SNOPT 7.5: Software for Large-Scale Nonlinear Programming*

*Center for Computational Mathematics Report CCoM 15-1*,

*J. Exp. Biol.*

*J. Theor. Biol.*

*Science*

*Speed in Animals: Their Specialization for Running and Leaping*

*J. Exp. Biol.*

*Giraffa camelopardalis*, in the Eastern transvaal

*Proc. Zool. Soc. Lond.*

*Canis familiaris*) and sheep (

*Ovis aries*)

*J. Zool.*

*J. Biomech. Eng.*

*J. Biomech. Eng.*

*J. Physiol.*

*Am. J. Vet. Res.*

*Proc. R. Soc. B: Biol. Sci.*

*Kinematische Anpassungen zur Kollisionsreduktion im Schritt vierfüßiger Lauftiere*

*Trotting and Bounding in a Simple Planar Model*

*PhD thesis*

*Lemur catta*), with implications for the scaling of locomotor costs

*Am. J. Phys. Anthropol.*

*hp*-adaptive gaussian quadrature collocation methods and sparse nonlinear programming

*ACM Trans. Math. Softw.*

*Connochaetes taurinus*) and other animals

*J. Exp. Biol.*

*PLoS Comput. Biol.*

*J. Exp. Biol.*

*Loxodonta africana*) and Asian (

*Elephas maximus*) elephants reveal a smooth gait transition at moderate speed

*J. R. Soc. Interface*

*J. Exp. Biol.*

*J. Theor. Biol.*

*J. Exp. Biol.*

*Nature*

*J. Exp. Zool. Part A: Ecol. Integr. Physiol.*

*J. Exp. Biol.*

*J. Exp. Biol.*

*Int. J. Robot. Res.*

*Cheirogaleus medius*) and patas monkeys (

*Erythrocebus patas*)

*J. Hum. Evol.*

**Competing interests**

The author declares no competing or financial interests.