Interpretation of body-mounted accelerometry in flying animals and estimation of biomechanical power

An idealized energy fluctuation model of a bird's body undergoing horizontal flapping flight is developed, focusing on the biomechanical power discernible to a body-mounted accelerometer. Expressions for flight body power constructed from root mean square dynamic body accelerations and wingstroke frequency are derived from first principles and presented in dimensionally appropriate units. As wingstroke frequency increases, the model generally predicts a gradual transition in power from a linear to an asymptotically cubic relationship. However, the onset of this transition and the degree to which this occurs depends upon whether and how forward vibrations are exploited for temporary energy storage and retrieval. While this may vary considerably between species and individual birds, it is found that a quadrature phase arrangement is generally advantageous during level flight. Gravity-aligned vertical acceleration always enters into the calculation of body power, but, whenever forward acceleration becomes relevant, its contribution is subtractive. Several novel kinematic measures descriptive of flapping flight are postulated, offering fresh insights into the processes involved in airborne locomotion. The limitations of the model are briefly discussed, and departures from its predictions during ascending and descending flight evaluated. These findings highlight how body-mounted accelerometers can offer a valuable, insightful and non-invasive technique for investigating the flight of free-ranging birds and bats.


Introduction
Birds flap their wings in order to achieve weight support and locomotion [1][2][3]. Experiments using high-frame-rate video footage to monitor wing and body motions of birds or bats flying in wind tunnels have combined the findings with aerodynamic results and accelerometry to estimate overall energy expenditure during flight [4][5][6]. Such approaches have been experimentally valuable and theoretically illuminating, enabling the refinement of aerodynamic theory, but in studies involving free-ranging animals where trailing wires and heavy equipment cannot be used, ambulatory recording of body acceleration offers a viable and practical alternative. Accelerometry was initially restricted to wind tunnel work [7], but has now been miniaturized and demands relatively little electrical power. Commercially available micro-electromechanical transducers are now capable of faithfully recording high-frequency vibrations, offering a new means of studying the characteristics, kinematics and energetics of free-ranging avian flight [8,9] and, indeed, animal locomotion in general [10]. Because the long-term study of birds in the wild is becoming increasingly feasible, there is new scope to assess some of the difficult choices birds face during long-range migrations [11,12].
Traditional techniques for monitoring the metabolic rate or power input of freeranging vertebrates include doubly labelled water [13,14] and heart rate, f h , derived from electrocardiography [15,16]. The latter approach offers good temporal resolution but has historically necessitated calibration of f h against measurements of oxygen consumption, _ V O2 . However, the direct translation of f h to _ V O2 may now be possible for endotherms undergoing primary mode locomotion if augmented by knowledge of heart and body mass [17]. Accelerometry has a similar potential to monitor instantaneous biomechanical power output [18] during locomotion, and strong correlative relationships between body acceleration and _ V O2 have been found in animals running on treadmills [18,19]. As one might expect, body accelerations during flight are generally elevated compared with other forms of locomotion [14,[20][21][22]; however, a theoretical understanding of how body acceleration relates to the biomechanical power of flapping flight has not yet been elucidated. This study aims to address this by setting out a mathematical model that assists the interpretation of accelerometry data captured from birds during flight. Novel measures descriptive of flight kinematics, integral to this modelling, shall also be derived.
Instruments that log acceleration are, for practical reasons, generally attached to the torso of a flying animal. As wings are coupled to the body, this offers much promise as a noninvasive tool that can help estimate the biomechanical power (and indirectly or proportionally, the metabolic costs) associated with flight [18,19,23], with the potential to augment or replace existing methods [15,24]. Activity-related accelerations can be decomposed into the sum of dynamic and static accelerations which can be respectively derived by high-and low-pass filtering either in the time or the frequency domain. To date, biologists have found the dynamic component most informative with regard to correlations with energy expenditure. Two time-averaged measures of dynamic body acceleration (DBA) have been used when studying the energetics of animals [18,25]. Overall dynamic body acceleration (ODBA) is a running average of the L 1 -norm of the dynamic acceleration [10,18]. The variant using the L 2 -norm, which accurately encapsulates vectorial length, is known as vectorial dynamic body acceleration (VeDBA) [26,27]. An immediate difficulty with using any acceleration measure as a proxy for estimating biomechanical power in the absence of empirical calibration is that the fundamental units of acceleration, namely LT 22 , are different both to those of power, ML 2 T 23 , and those of mass-specific power, L 2 T 23 . Overcoming this inevitably requires the development of some theoretical model descriptive of the biomechanics of bird flight with respect to body acceleration.
Under the hypothesis that DBA is closely related to overall metabolic costs, accelerometry has been successfully applied to a wide variety of other animals [10]. Consequently, it is not unreasonable to expect that a correlation could also exist between DBA and the biomechanical power directly discernible using a body-mounted accelerometer (body power) during steady horizontal flight and the metabolic rates of birds during flight (subject to the additional uncertainties of the value for the mechanochemical conversion efficiency of muscle [28]). Therefore, the ansatz is adopted here that the kinetics of the body should reflect the kinetics of the wings, thereby ultimately allowing the biomechanical costs incurred during avian locomotion to be estimated. This work primarily focuses on the interpretation of data from accelerometers attached to the body of a flying bird in the absence of additional information, a constraint demanding the development of some mathematical model to theoretically bridge the divide between body vibrations and overall biomechanical costs. The relationship between decomposed vertical and horizontal dynamic accelerations, and the various components of the energy associated with the body are investigated, lateral components being neglected due to the symmetrical beating of the wings. Birds must find ways of contending with the weight of gravity when airborne and flapping flight demands significant energy expenditure [1,3]. Motions of the body on the vertical axis differ from motions within the horizontal plane as they involve changes in gravitational potential. Thus, if the biomechanical power during flight is to be estimated solely from accelerometry, then it is essential to pay heed to the direction of gravity and hence also the absolute orientation of the transducer. The ultimate aim of this work is to derive estimates of acceleration-based biomechanical body power during flapping flight from first principles, potentially leading to the future interpretation of accelerometry from flying animals without the need for direct calibration. Novel statistical measures derived here may also be informative of flight kinematics, pertaining to energetically significant transitions in the wingstroke frequency, such as the relative phase and amplitude of forward and vertical body oscillations.

Preliminaries
Due to the pulsatile character of avian flight associated with the periodic contraction of powerful wing muscles, the energy associated with each wingstroke is delivered sporadically. Efficient flight confers evolutionary advantages, so the effort required by a bird to flap its wings is likely to achieve useful goals such as forward propulsion against aerodynamic drag, the countering of gravity, changes in velocity, ascent/descent and general manoeuvring. The mechanical energy of a bird will fluctuate in time and in still air there is a metabolic cost when the total energy increases. When it decreases, the dissipation of mechanical energy into the surrounding air is used to accomplish these various flight goals [29]. In the absence of gravity and an atmospheric medium, the mean mechanical power required by a vibrating but dissipationless mechanical system is precisely zero, because the total energy of the system is constant at all times. However, energy will necessarily be transformed or exchanged between different elements of the system within individual vibration cycles. Birds, on the other hand, remain airborne and sustain forward momentum despite air resistance by doing mechanical work which they never recover. Notwithstanding this, birds may be able to temporarily store and retrieve energy within individual wingbeat cycles in a similar manner to an idealized dissipationless system, so this should be considered when developing the model, as such a mechanism may provide significant flexibility to execute flight more efficiently under certain circumstances.
We assume a triaxial accelerometer of negligible mass securely affixed to the body of a bird undergoing horizontal flight at a steady air speed. It has been known for several decades that, provided adequate consideration is given to harness design, accelerometers can be externally mounted to birds with negligible oscillation relative to the body [30]. Raw data from an accelerometer can be reoriented using mathematical transformations, an issue returned to later, so this analysis proceeds by taking the z-axis to be oppositely aligned to gravity and the y-axis to correspond to the direction of forward motion. An inertial frame of constant velocity comoving with the bird is considered. The majority of the power in the measured accelerations resides at the fundamental wingstroke frequency f, the angular frequency of the wingstrokes being v ¼ 2pf. This is a rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 crucial assumption, backed up by the acceleration power spectrum obtained via accelerometry experimentally collected from a flying pigeon, as presented in figure 1. Because power is concentrated at the fundamental frequency, the oscillations of the body in the vertical axis can be accurately approximated by a sinusoid with maximum excursion B relative to the mean altitude. The vertical displacement z and vertical velocity _ z therefore vary as follows: It is assumed that no energy is stored either elastically or as rotational kinetic energy, leaving the gravitational potential energy U ¼ m b gz, the kinetic energy associated with the vertical axis K z ¼ m b _ z 2 =2; and the kinetic energy associated with the forward axis K y ¼ m b _ y 2 =2 to be considered. Here, m b is the mass of the body of the bird, and g is the gravitational acceleration. The beating of both wings is assumed to always be in phase with one another. Because of the bilateral symmetry in birds, we neglect any kinetic energy associated with the x-axis.
The wings also have gravitational and kinetic energies (both vertical and horizontal). However, these are not directly estimable from a body-mounted accelerometer, so terms for these quantities are not explicitly included in the analysis. Instead, it is assumed that the activity detected by the accelerometer will, to a first approximation, be an attenuated reflection of the total biomechanical output of the bird. It is reasonable to think that energy associated with the wings can be subsumed into existing terms by constructive or destructive superposition. This follows from the fact that the addition of two arbitrarily scaled sinusoids of the same frequency, but different phase results in a rescaled sinusoid of the same frequency: ð2:3Þ where c ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi a 2 þ b 2 À 2ab cos f p and H is the Heaviside step function in which H( j) ¼ 1 if j ! 0, otherwise H( j) ¼ 0. It can be seen that the resultant sinusoid will generally have an intermediate phase shift.

Relative phase between vertical and horizontal oscillations of the body
Vibrations on both axes will exhibit simple harmonic motion with both K y and K z varying at the same frequency. However, before an expression for the variation in y can be written as a sinusoid, there is a need to carefully consider its relative phase u with respect to z. Even if the bird has considerable freedom to adjust the phase of its motion on the horizontal axis, arrangements that minimize the power required in order to sustain flight confer evolutionary advantages. Introducing a horizontal vibration amplitude A, the counterpart to B for the vertical axis, one can write The convention is adopted that neither A nor B can be negative. The total energy associated with the bird's body, E b (t), is During each wingstroke, the flight muscles of the bird must supply energy when E b is increasing. An important aspect of the present model is the assumption that when E b decreases, energy is irrecoverably lost to the environment and exploited so as to achieve propulsion and weight support. This can be compared with aerodynamic models which assume the kinetic energy of the wings is never recovered [31,32]. The mean power associated with the body, kP b l, can then be determined according to Consider, for now, the case in which A ¼ 0. One then has K y ¼ 0 and E b ¼ U þ K z . Gravitational potential energy attains a minimum at t ¼ p/v when z ¼ 2B and a maximum at t ¼ 0 when z ¼ B. At both these times, K z reaches its minimum of zero. Because sin 2 vt ¼ (1 2 cos 2vt)/2, the vertical kinetic energy varies sinusoidally at twice the frequency of the gravitational energy. Thus, E b (t ¼ p/v) is always a minimum. Although U is always a maximum at t ¼ 0, it is possible that E b is not a maximum at that time if K z thereafter increases more rapidly than U decreases. This possibility is apparent upon inspection of the time derivatives of E b , the roots of which correspond to stationary points: and € E b ðtÞj A¼0 ¼ m b Bv 2 ½Bv 2 cosð2vtÞ À g cosðvtÞ: ð2:10Þ power power spectrum, pigeon frequency Figure 1. A typical power spectrum derived from the Fourier decomposition of about 10 s of vertical axis accelerometry data captured by the authors at 400 s s 21 from the body of a freely flying homing pigeon during horizontal, straightline flight while returning to a loft. The peak at the fundamental wingstroke frequency (at around 6.5 Hz) dominates over that of higher harmonics, suggesting that the acceleration on the bird's body is not only periodic but essentially sinusoidal.
rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 Owing to the sin(vt) term, stationary points exist at t ¼ 0 0, so this stationary point is always a minimum. However, € E b ¼ m b Bv 2 ðBv 2 À gÞ for the stationary point at t ¼ 0, which corresponds to a maximum when v 2 , g/B and a minimum when v 2 . g/B. If both these are minima, additional stationary points occur when cos(vt) ¼ g/Bv 2 . Using cos(2vt) ¼ 2g 2 /B 2 v 4 2 1, one then finds that at those times € E b ¼ m b ðg 2 À B 2 v 4 Þ , 0, confirming that these points correspond to maxima of E b .
Therefore, when v 2 , g/B, the mean body power is simply However, when v . g/B, then due to the existence of a new maximum in E b at t = 0, E max b will exceed E b (0), and the mean power will inevitably rise. During intense flight, there will be a high wingstroke frequency, and for each wingstroke the variation in kinetic energy will increase and the variation in gravitational energy will decrease, allowing the variations in kinetic energy to become dominant. However, if it were possible to temporarily store some of the vertical kinetic energy as horizontal kinetic energy, and retrieve it later in the wingstroke cycle, then this elevated maximum in E b could be avoided, and the concomitant increase in power is eliminated.
The transition between the two regimes occurs at g ¼ Bv 2 , corresponding to the peak gravitational energy U max ¼ m b gB being equal to twice the peak vertical kinetic energy 2K max Clearly, if the total kinetic energy K yz ¼ K y þ K z did not fluctuate at all, then K z could be arbitrarily large without incurring any additional increase in mean power. The total kinetic energy is If K yz is constant, then its derivative must be zero at all times. It is apparent from this expression and (2.3) that K yz varies sinusoidally. The amplitude of these fluctuations vanishes when ð2:15Þ Because u is constant, this would demand that t is also constant. However, K yz can be zero, if the sin 2vt and the cos 2vt terms are simultaneously zero. One then finds that the cos 2vt term vanishes if sin 2u ¼ 0, which is satisfied when u ¼ np=2 ðn [ ZÞ. The sin 2vt term is zero when A 2 cos 2u þ B 2 ¼ 0, which yields u ¼ arccos(2B 2 /A 2 )/2. When u ¼ np, one has cos 2u ¼ 1 which must be rejected as it predicts A 2 ¼ 2B 2 . However, u ¼ (n + 1/2)p yields A 2 ¼ B 2 , which is acceptable. Therefore, for K yz to remain constant requires A ¼ B and u ¼ +p/2. This can be seen in the following A relative phase shift of +p/2 between the horizontal and vertical axes corresponds to what is commonly termed a quadrature phase arrangement. Only in this circumstance does it hold that K y is a maximum when K z is a minimum, and vice versa. This maximizes the potential for shuttling energy back and forth between the two axes, a useful property that the bird might be able to exploit to decrease its mean power. Although K y will be maximal at t¼ 0 and t ¼ p/v, because these maxima are equal, they have no effect on the difference In fact, this holds for any value of u because sin 2 x ¼ sin 2 (x þ p), but K yz is constant only when K y and K z are in antiphase. As the kinetic energies vary at double the fundamental wingstroke frequency, this occurs when u ¼+p/2.
While variations in K yz can be completely eliminated, it may not be necessary for the bird to do so because, as will be shown, the bird can in some cases also minimize power when A/B , 1 with excessive fluctuations in K z being completely tamed by smaller fluctuations in K y . This may be preferable as it reduces extraneous energy losses and ameliorates the vibrations transmitted to the head of the bird, which might otherwise make flight an unnecessarily uncomfortable experience compromising visual acuity [33]. Note also that if A/B . 1, then fluctuations in K y may not be adequately absorbed by fluctuations in K z .
Because birds are expected to have a maximum forward velocity at the end of the downbeat, the phase that makes _ yð0Þ maximal is chosen (u ¼ 2p/2). Hence, u can be eliminated from the expressions for y and _ y by writing The upbeat commences at t ¼ 0 when _ y is maximal. The body is then at its maximum height above the ground. The body and the wings are in antiphase on the vertical axis, and the same should also be approximately true of the forward axis. To summarize the findings of this section, power reduction is possible only when g/Bv 2 , 1 and is best achieved by a quadrature phase arrangement.

Quadrature phase flight
Unless expressly stated otherwise, the analysis now proceeds by assuming quadrature phase applies. In order to assess the biomechanical power in the body, one is interested in determining the maxima and minima (stationary points) of the body energy, necessitating looking for roots of the first-time derivative and inspecting their signs by taking the secondtime derivative. Both K yz and U vary sinusoidally but because they do not vary at the same frequency their sum is not a simple sinusoid, demanding that calculus be used. Body rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 energy now reads ð2:20Þ and the first derivative is Stationary points exist when either cos(vt) ¼ gB/v 2 (B 2 2 A 2 ) or sin(vt) ¼ 0. The first condition has real solutions only if v 2 ! gB/jB 2 2 A 2 j. When v 2 . g/B, the smallest value of A that prevents a maximum in E b from arising anywhere but at t ¼ 0 occurs when cos(vt) ¼ 1, from which the smallest value of A that minimizes the power can be determined. If this is an overriding consideration with the need to maintain visual acuity a secondary concern, this value of A would seem to be optimal: Note that A opt must be real (because v 2 . g/B) and because A 2 opt B 2 at all times, birds have no need to fly with A . B. Moreover, for given values of A and B, the optimum angular frequency comes to v opt ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi above which power can be reduced if A = 0. The optimum ratio of A/B ensures fluctuations in K y are sufficiently large to avoid excessive fluctuations in K z , its value depending only on the ratio v/v c : This is plotted in figure 2. The second derivative of the body energy is showing that the maximum at t ¼ 0 is then also a stationary point of inflection. Now, consider the stationary points that arise when cos(vt) ¼ gB/v 2 (B 2 2 A 2 ). Using the identity cos(2vt) ¼ 2cos 2 (vt) 2 1, one finds that . This satisfies the condition required for the stationary points to exist, establishing that those corresponding to cos(vt) ¼ gB/v 2 (B 2 2 A 2 ) , 1 must be maxima if A 2 , B 2 . Considering the alternative situation in which A 2 . B 2 , the sign of € E b must be positive if gB , v 2 (A 2 2 B 2 ). Hence, the stationary points at which cos corresponding to the maximum value of A at which power is minimized: This has a similar form to the earlier expression The bird has minimized its mean body power if A opt A A max or equivalently if v 2 , gB/jB 2 2 A 2 j. When this condition is satisfied and v 2 . g/B, flapping flight demands less power than when forward axis vibrations are absent altogether (A ¼ 0). For a fixed value of B, this is illustrated in figure 3.

Estimation of body power
The calculation of mean body power here involves the integration of E b only as it increases according to (2.8). This can be easily accomplished by subtracting the minima of only these times need be considered in order to determine the minima and maxima of the body energy variation. With reference to figure 4, it can be seen that there are three distinct cases to consider with stationary points located at the following times: rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 The body energy at t 0 and t 1 is simply When t ¼ t * , sin 2 (vt * ) is obtained as 1 2 cos 2 (vt * ): ð3:3Þ After some algebra, the total energy of the body when t ¼ t * is found to be This case corresponds to the shaded region in figure 3 and the central traces of figure 4 for which the calculation of mean power is particularly simple:

Case 2
This case corresponds to the zone below the shaded region in figure 3 (see also the uppermost trace in figure 4). The stationary point at t 0 is now a minimum and two new maxima arise at t ¼ t * . Recalling that in this case, B 2 . A 2 , the power is

Case 3
This case corresponds to the zone above the shaded region in figure 3 (see also the lowermost trace in figure 4). The stationary point at t 1 is now a maximum and new minima arise at t ¼ t * . One has A 2 . B 2 , and the power now comes to ð3:9Þ The poles appearing in the expressions for kP b2 l and kP b3 l as A ! B are avoided because when v 2 . gB/jB 2 2 A 2 j one has A 2 = B 2 . It is apparent that the results for cases 2 and 3 are equivalent but for the reversal of sign in the B 2 2 A 2 terms. Therefore, it would be acceptable to take the modulus of either expression without expressly checking whether A 2 . B 2 . In the limiting cases where gB ¼ v 2 jB 2 2 A 2 j, the prediction of case 1 coincides with that of case 2 or 3. For instance, when A ¼ A opt ¼ B ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi 1 À g=Bv 2 p then B 2 2 A 2 ¼ gB/v 2 and it can be seen that kP b2 l reduces to kP b1 l: The importance of correctly distinguishing between case 1 and cases 2 and 3 is stressed, because kP b2 l and kP b3 l overpredict the true power when gB . v 2 jB 2 2 A 2 j and kP b1 l underpredicts the true power when gB , v 2 jB 2 2 A 2 j.
The upper and lower limits to A/B each approach unity as v/v c ! 1 (see text).

Deriving body power using data from accelerometers
The root mean square (or r.m.s.) value of a quantity is a measure commonly used in physics and engineering and can lend itself to the description of DBA (table 1). As such, it offers an alternative to ODBA and VeDBA. The r.m.s. value of a discrete set of N dynamic single axis accelerations a dyn is a rms ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi a 2 dyn =N q , and that of a simple sinusoid such as ð3:11Þ Static and dynamic accelerations can be respectively derived from raw acceleration data using low-pass and high-pass filtering techniques. While the static acceleration is useful in determining the vertical, gravity-aligned axis, there are many circumstances where the direction of the forward axis is more ambiguous. However, birds will generally adjust the roll of their bodies during flight so that the static acceleration vector remains dorsally aligned. It is therefore likely that the r.m.s. value of the dynamic sway, € x rms , will be appreciably smaller than the r.m.s. value of the dynamic surge, € y rms . In principle, this allows for reorientation of accelerometry data during post-processing by application of a rotation matrix whose components can be inferred by analysis of the data. A method for achieving reorientation is outlined in appendix A. Estimates of the dynamic surge, € y rms , and the dynamic heave, € z rms , are readily obtained after high-pass filtering of the reoriented acceleration components. These relate to v, A and B as follows: These expressions conveniently obviate the need to double integrate acceleration data in order to obtain the values of A and B directly, which is generally challenging due to the baseline drift introduced when integrating. However, A and B each feature in the true-or-false test gB , v 2 jB 2 2 A 2 j that determines which expression for power is valid. Therefore, a reformulation of the discriminant is also desirable, and because € y rms =€ z rms ¼ A=B it It is therefore possible to determine, without knowledge of either A or B, nor indeed v, the regime in which the bird is flying. kP b1 l should be used when g€ z rms .
ffiffi ffi 2 p j€ z 2 rms À € y 2 rms j, otherwise kP b2,3 l is applicable. The critical frequency ratio, v/v c , can similarly be translated using (3.13) and the knowledge that It is also possible to express v/v opt using only r.m.s. accelerations:

Relative body power
According to this model, body power retains linearity with wingstroke frequency until, and as illustrated in figure 5, the angular frequency exceeds The expressions for kP b2 l and kP b3 l can be recast as It is now apparent that when v ) v 0 , the response becomes asymptotically cubic at higher wingstroke frequencies, i.e. kP b2,3 l /v 3 . However, at lower wingstroke frequencies, flight proceeds within the linear regime of (3.5). For case 1, it is possible to write kP b1 l ¼ mg 2 v=pv 2 c , allowing the ratio of kP b1 l/kP b2,3 l to be expressed in a particularly simple form The response is plotted in figure 6 and can be compared with figure 5 where the wingstroke frequency is expressed in units of v/v c . If v , v 0 , then the expression for kP b2,3 l is not physically meaningful, and the mean power is always given by kP b1 l. When v . v 0 , power can always be reduced, because the ratio kP b2,3 l/kP b1 l then exceeds unity. Furthermore, it grows without limit as v ! 1.
Power is always minimized when A ¼ B but it is interesting to know how the ratio kP b2,3 l/kP b1 l grows for other values of A/ B when v . v 0 . First, note that v 0 is related to v c according to The relative flight cost ratio kP b2,3 l/kP b1 l can be expressed either in terms of v/v 0 or A/B and v/v c :

ð3:26Þ
A colour-coded contour plot of this function is presented in figure 7 (online).

Non-quadrature phase
We reiterate that this modelling pertains to steady, horizontal flight. The possibility exists that departures from quadrature phase may be advantageous during ascent or descent, but the mathematics in such cases is considerably more involved. Nevertheless, these situations were numerically investigated under the assumption that A ¼ B with an additional power component representing the change in gravitational energy with time, whose mean value can be estimated using an altimeter or GPS device [34,35]. The results are presented in figure 8. It can be seen that predictions of the quadrature phase model are still accurately upheld in most circumstances involving realistic rates of ascent or descent. Although the optimal arrangement is never far from quadrature phase, the error is sensitive to the rate of ascent, and is asymmetrical in that it grows faster with descent than ascent. This is evident from the plot presented in figure 9. It has been reported that the power requirements of moderate ascending and descending flight in pigeons can be accurately estimated by summing the power required for level flight with the rate of change of gravitational potential [36]. Interestingly, the same study found that a discrepancy did arise for high descent rates but not for high climb rates, descent being clearly more expensive than anticipated. When flying steeply downwards at a descent angle of 2608, the pigeons flew at a horizontal velocity of 3.6 m s 21 and a vertical rate of descent exceeding 3 m s 21 . Hence, one possible explanation for this could be that flight costs during rapid descent are so minor and so rarely encountered that there is little need for birds to acquire biomechanical flexibility that would allow significant deviations from quadrature phase. However, this descent rate is more rapid than that which would be expected if the bird were simply gliding (typically no more than 2 m s 21 for a pigeon).
If more accurate estimates of biomechanical power are required then direct integration is an option, obtaining relative velocities and displacements for the forward and vertical axes from which the individual energy terms can be derived, combining this information with altitude data  Figure 9. The quadrature phase assumption potentially overpredicts the body power for ascending or descending flight. The error is plotted here for climb rates within the range +0.9 m s 21 , where the optimum phase appears to deviate linearly from u ¼ 2908 in figure 8. The model is relatively accurate for sustainable rates of ascent but errors grow rapidly for high rates of descent.
rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 (if available) to obtain body energy, and calculating power by numerically evaluating the mean rate of energy increase with time, being careful to ignore periods when the total energy of the bird is decreasing. This approach may offer improved precision, particularly when power is not all concentrated at the fundamental wingstroke frequency or when large departures from quadrature phase are expected.

Discussion
Despite the considerable complexities involved in flapping flight, by focusing on the consequences for the mechanical motions of the body, this oscillatory energy fluctuation model provides a useful initial step in theoretically underpinning the use of body-mounted accelerometers to estimate the relative costs of horizontal flapping flight in birds or bats. Acceleration-based proxies for the power detectable in the body of an animal during flight have been derived from first principles ((3.5), (3.7) and (3.9)) and in the appropriate units of ML 2 T 23 . Within these equations, the DBA formalism is encapsulated very naturally via r.m.s. acceleration ((3.14) and (3.15)), or aRMS. These expressions represent a substantial improvement over attempting to estimate the biomechanical energy expenditure or metabolic rate of flying animals from ODBA or VeDBA alone. The magnitude of ODBA varies with orientation, and different rescaling factors must be applied to single axis projections of ODBA and VeDBA if they are to be used to estimate € y rms or € z rms (appendix B). We point out that aRMS, which is more closely related to VeDBA than ODBA, is just as straightforward to calculate. Furthermore, aRMS may be more universally applicable in future mathematical and empirical studies of animal locomotion. DBA measures lack the units of power and so will always require a direct calibration against the rate of energy turnover. Their use in estimating the biomechanical costs of flapping flight has generally lacked a firm theoretical basis, pays no heed to sensor orientation relative to gravity, ascribes undue significance to accelerations in the horizontal plane and overlooks the significance of wingstroke frequency. As can be seen in (3.22), body power is rather sensitive at times to wingstroke frequency, so may in itself provide a valuable means of gauging flight effort independently of body power estimation. This analysis furnishes several novel parameters that may provide insights into the kinematics of flight. In particular, it predicts that there may be two regimes of flight with regard to power production and wingstroke frequency and that there may be a transition from slow to moderate intensity flight, when equation (3.23) and figures 6 and 7 suggest power savings may sometimes be possible. For steady horizontal flight involving sinusoidal vibrations on the forward and vertical axes, it has been shown that a quadrature phase arrangement is potentially advantageous. If flight strategies could exploit this, temporarily storing and retrieving energy during each wingbeat cycle, it might be possible for some species to avoid or curb what would otherwise be a third-order sensitivity in mean body power to wingstroke frequency. Due to the ubiquity of predators, the need to catch airborne prey and the general requirement for economy of locomotion, there may have been considerable evolutionary pressure for birds to waste very little energy at wingstroke frequencies exceeding v 0 .
Nevertheless, body-mounted accelerometry is not privy to the subtleties of wing flexion, angle of attack and feathering, so this model leaves open the possibility that birds have considerable scope to adjust their flight style without necessarily compromising efficiency. When birds are flying in the linear regime then equation (3.14), which reflects the costs of combating gravity, shows that only the vertical, gravity-aligned component of the acceleration should enter into the calculation of body power. Although forward accelerations become relevant to power estimation for the asymptotically cubic regime, equation (3.15) shows that their contribution to body power is subtractive. This somewhat counterintuitive need to subtract € y rms from € z rms in (3.7) stems from the fact that variations of gravitational energy do not always mask variations in kinetic energy. However, quadrature oscillations in K y tend to erase fluctuations in K yz , not reinforce them.
While the model directly considers vibrations only on the body of the bird, owing to mechanical coupling, the same kind of oscillations and trade-offs should also apply to the horizontal and kinetic components of the wings. However, because the centre of mass of the wings must travel a much greater distance during each wingstroke than the centre of mass of the body, for any given wingstroke frequency, fluctuations in wing kinetic energy grow quadratically with wingstroke excursion, but variations in wing gravitational potential grow only linearly. Therefore, the onset of the transition between the linear and asymptotically cubic flight power regimes might be generally expected to occur at a lower frequency for the wings than for the body. The kinematics of the wings, which cannot be directly measured by the accelerometer, should generally dominate the overall biomechanical costs of flight. Indeed, kinetic energy fluctuations might easily become a more important consideration than compensating for the gravitational energy losses of each wingbeat. If the gravity terms are neglected, then (3.7) and (3.9) simplify somewhat and predict kP b l % 4p 2 m b f 3 w jB 2 À A 2 j. This could be especially true of energetic highspeed flight, even though there may then be significant wing retraction and supination to avoid undue aerodynamic drag [37,38]. Because the forces involved in wing retraction tend to cancel on the body due to bilateral symmetry, the costs are hidden from body-mounted accelerometers. Hence, the ratio of perceived body power to true total biomechanical power might be somewhat reduced during intense flight for some species, which may well require the tailoring of flight models to each species in the future, following empirical observations and extensions of the modelling.
A number of other original summary statistics could prove useful to the interpretation of body-mounted accelerometry data obtained from flying birds. The ratio A/B may help to characterize the mode of flight performance and perhaps also evaluate the skill and dexterity of individual birds. With the possible exception of hovering flight when birds may be able to recoup some of the kinetic energy stored in the air during the previous half-stroke, flying animals generally have no means of recovering energy lost to the environment. However, vibrations on the forward axis offer convenient energy storage which may also be exploited to reduce pitching of the body. Many birds use various reflex mechanisms during flight to subdue head vibrations and thereby avoid vision impairment [33]. Body accelerations have a total amplitude ffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 small A/B can be approximated by v 2 B(1 þ A 2 /2B 2 ). Hence, the additional loss of visual acuity due to a small A/B ratio would be relatively imperceptible, implying little need for A/B ! 0.
The ratio A/B may also be particularly sensitive to effort in realistic situations, correlating with wingstroke frequency and increasing at higher forward velocities. The relative phase lag u between the vertical and forward axes may act as a marker of ascending or descending flight, or reflect efforts to synchronize wingstroke frequency with other birds during V-formation flight. We also expect the ratios v/v c , v/v opt and v/v 0 to be informative regarding flight intensity and flight efficiency. Collectively, these measures may also crudely encode hints as to the altitude at which the bird is flying. Due to the complexities of wing kinematics and anatomical constraints, it is very likely that no simple unifying pattern will adequately summarize all species, but departures from normality are often the most interesting aspects of biological research and so additional parameters can prove very useful in highlighting departures from non-conformity. Therefore, these flight variables may be particularly valuable in helping to unpick the challenges involved in flying efficiently. The static acceleration also offers a potentially illuminating variable for flying animals which has been largely ignored to date. Birds can sustain prolonged banking when circling or jostling for position within a cluster flock [39], and any drift in the mean direction of the momentum vector induces a non-gravitational contribution to the static acceleration. Thus, when the static acceleration deviates appreciably from gravity, it would suggest that the bird is not undergoing steady horizontal flight. However, the converse is not true, because one also expects the static acceleration to tally with gravity during steady non-banking ascending or descending flight. Therefore, the distribution and time variability of the static acceleration can be informative.
Dimensional considerations may allow the results obtained here to be extrapolated to some degree, particularly regarding the estimation of biomechanical power from accelerometry for aquatic animals. Due to the buoyancy afforded by water, the estimation of inertial costs for aquatic species during swimming is not encumbered by gravitational considerations [2]. This invulnerability to gravity suggests that the cost of swimming should correlate with the product of body mass, the period of the swimming stroke and some function of the square of the decomposed r.m.s. accelerations, dependent upon the anatomy of the species under consideration. Locomotion costs in terrestrial animals are likely to be more complex: weight support can either be provided continuously or episodically by the ground.
Naturally, there are limitations to what a body-mounted accelerometer alone can glean about flight. During freeranging flights, there could be circumstances where basic inferences may be misleading, particularly if the rate of ascent or descent is unknown. In addition, special care may be needed when attempting to disentangle the static and dynamic accelerations for birds using intermittent modes of flight such as flap-gliding or flap-bounding. Accelerometers cannot infer absolute velocities in any direction, and many birds exploit the assistance of thermals, following winds and airflow over uneven terrain, all of which are capable of drastically altering the power requirements of flight. Nevertheless, the present model offers a practical and non-invasive method of extracting from accelerometry a variety of parameters that could be informative concerning flight style and performance, while also providing an explicit procedure for determining biomechanical body power in free-flying birds which may be generally proportional to overall flight power. In the complex processes that transform the biochemical energy of birds into atmospheric vortices, turbulence and heat, aerodynamic costs lie downstream of the biomechanical costs. While it might eventually be possible to incorporate them within an extended model, the formidable challenges of contending with complicated wake patterns, vortex interactions and chaotic flow patterns continue to plague theoretical models, and quasi-static approximations to the Navier -Stokes equations commonly used in aerodynamic analysis inherently limit their accuracy and usefulness [40]. A more realistic near-term goal would be to broaden the present modelling to include wing kinematics and morphology. This will inevitably necessitate the input of anatomical information allowing the body power relationship to accommodate allometric differences between species and also address wing-propelled locomotion in the media of differing densities. Due to the intrinsic complexities, we anticipate that experimental data collected from a variety of species will be required. Birds are graceful aeronauts, skilfully adjusting their posture and technique in ways we have only started to perceive [41]. However, a battery of physiological, biomechanical and aerodynamic techniques can augment and refine one another when quantifying flight costs. These complementary approaches to studying avian energetics hold much promise in arriving at a more unified understanding of the compromises involved when animals fly-whether they are foraging for food, migrating, chasing airborne quarry or evading predators. Appendix A. Reorientation during post-processing When flying in a straight line, the static acceleration a s ¼ ð a 1 ; a 2 ; a 3 Þ, where a k represents the time-averaged mean of the kth accelerometer channel, should equal the gravitational acceleration, g. When this does not hold, it is possible that the bird is turning, undulating, bounding or flying through zones containing vertical air currents. Centripetal acceleration combines with gravity during turns, the direction of the resultant vector determining the degree of banking necessary in order that the bird experiences the net acceleration dorsally so that the forces on the wings are symmetrically balanced. At such times, the increase in the static acceleration relative to gravity is a useful guideline as to the departure from linear motion. For uniform rectilinear motion, the mode of the distribution of the static acceleration magnitude can be identified with gravity. To some degree, this allows for the self-calibration of accelerometry data.
When jja s jj % jjgjj, a condition that is easily checked, it is straightforward to calculate the vertically aligned component of the acceleration a vert using the scalar projection rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 of a onto a s : This vertical acceleration is the combination of both static and dynamic components, so the dynamic vertical acceleration a z can be obtained by subtracting the time-averaged value of a vert using a z ¼ a vert À a vert : ðA 2Þ Projections of a orthogonal to the vertical axis will then lie in the horizontal plane: and a hor2 ¼ a 1 a 3 þ a 2 a 1 þ a 3 a 2 g : ðA 4Þ As before, the dynamic acceleration is obtained by subtracting the static acceleration (a h1 ¼ a hor1 À a hor1 and a h2 ¼ a hor2 À a hor2 ). A means of determining a x and a y from a h1 and a h2 is then required. By symmetry, one expects the dynamic acceleration of the forward (y) axis to exceed that on the lateral (x) axis. One way to proceed would be to first determine the fundamental wingstroke frequency using a z then bandpass filter a h1 and a h2 using fast Fourier transforms so that only frequencies near the fundamental wingstroke frequency are retained. Following this, one could compute the angles f ¼ arctan(a h2 /a h1 ), compile a circular histogram of the results and use the angle corresponding to the peak in the histogram F, to reorient a h1 and a h2 as follows: and a y ¼ a h1 cos F þ a h2 sin F: ðA 6Þ There is a potential ambiguity in this result concerning the polarities of a x and a y . It arises due to the fact that one expects two peaks in the angular histogram separated by p. Therefore, one should also evaluate a x and a y using F F þ p. In practice, there may be no need to calculate a x because it is unlikely to represent interesting information, but the polarity of a y is potentially important if one is eager to know, for example, how the phase shift between the forward and vertical axes varies with time. This model expects that the displacement on the y-axis will always lag behind that of the z-axis, and hence a z should always lead a y , resolving the ambiguity. One can again apply bandpass filtering to a y and a z around the detected wingstroke frequency in order to test which value of F is appropriate. The phase shift can be accurately measured in the recovered time domain after bandpass filtering using linear interpolation between samples in the vicinity of the positive/negative going zero crossings. If the orientation of the accelerometer is fixed with respect to the body of the bird, then this process need only be performed once, and the value of F can then be reused without recalculation. Appendix B. Relationship between overall dynamic body acceleration, vectorial dynamic body acceleration and r.m.s. acceleration Consider the instantaneous dynamic acceleration a d ¼ (a x , a y , a z ) derived from a triaxial accelerometer. The generalized mean or L p -norm of the components of a d is defined as jja d jj ¼ ðja x j p þ ja y j p þ ja z j p Þ 1=p : ðB 1Þ Therefore, the magnitude of a d according to VeDBA is ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi a 2 x þ a 2 y þ a 2 z q ; whereas its magnitude according to ODBA is ja x j þ ja y j þ ja z j. Converting to spherical coordinates (r, u, f ), one has a x ¼ r sin u cos f; ðB 2Þ a y ¼ r sin u sin f ðB 3Þ and a z ¼ r cos u: ðB 4Þ The magnitude of a d using VeDBA is thus ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi a 2 x þ a 2 y þ a 2 z q ¼ ðr 2 sin 2 u cos 2 f þ r 2 sin 2 u sin 2 f þ r 2 cos 2 uÞ 1=2 ¼ r: ðB 5Þ This confirms the standard expectation of Euclidean trigonometry and the Pythagorean theorem. However, the magnitude of a d in the case of ODBA generally disagrees with this because and ODBA VeDBA 2 ¼ 1 þ 2 ja x a y j þ ja y a z j þ ja x a z j a 2 x þ a 2 y þ a 2 z : ðB 7Þ Due to the second term, ODBA will exceed VeDBA unless at least two of the three acceleration components are zero. The two will agree only when there is alignment of the acceleration with one of the three measurement axes. Hence, the response of ODBA varies according to orientation.
To find the maximum error in ODBA, let a y ¼ a x þ a and a z ¼ a x þ b where, without loss of generality, it can be assumed that neither a x , a y nor a z are negative. Now let z ¼ (ODBA 2 /VeDBA 2 2 1)/2 so that the stationary points of z will be identically located to those of ODBA/VeDBA: z ¼ a x a y þ a y a z þ a x a z a 2 x þ a 2 y þ a 2 z ¼ 3a 2 x þ 2aa x þ 2ba y þ ab 3a 2 x þ 2xða þ bÞ þ a 2 þ b 2 : ðB 8Þ Equating to zero the partial derivatives of z with respect to a and b gives ða 2 x þ a 2 y þ a 2 z Þð2a x þ bÞ ¼ 2ða x þ aÞða x a y þ a y a z þ a x a z Þ ðB 9Þ and ða 2 x þ a 2 y þ a 2 z Þð2a x þ aÞ ¼ 2ða x þ bÞða x a y þ a y a z þ a x a z Þ ðB 10Þ These expressions reduce to ða x þ aÞð2a x þ aÞ ¼ ða x þ bÞð2a x þ bÞ ð B 11Þ and ða þ bÞða À bÞ ¼ À3a x ða À bÞ: ðB 12Þ rsif.royalsocietypublishing.org J R Soc Interface 10: 20130404 offer an alternative proxy for biomechanical effort. For instance, one might calculate the standard deviation of ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi for all the raw outputs of the accelerometer falling within some time interval. This could prove informative whenever a significant component of animal activity involves body rotation. Because accelerometers remain sensitive to gravity even within buoyant media, this may be especially useful in the context of aquatic animals as they are not constrained by gravity when swimming underwater. In circumstances where the dynamic acceleration is extremely small, activity can also be estimated by quantifying the rate of body reorientation df/dt. This can be approximated as Df/Dt using pairs of static acceleration vectors A s1 ¼ ðA x1 ; A y1 ; A z1 Þ and A s2 ¼ ðA x2 ; A y2 ; A z2 Þ separated by a fixed time interval Dt appropriate to the rotation rates of interest: Df ¼ arcsin jjA s1 Â A s2 jj jjA s1 jj Á jjA s2 jj ðB 25Þ and Df ¼ arcsin ðB 26Þ