Averaged Propulsive Body Acceleration (APBA) Can Be Calculated from Biologging Tags That Incorporate Gyroscopes and Accelerometers to Estimate Swimming Speed, Hydrodynamic Drag and Energy Expenditure for Steller Sea Lions

Forces due to propulsion should approximate forces due to hydrodynamic drag for animals horizontally swimming at a constant speed with negligible buoyancy forces. Propulsive forces should also correlate with energy expenditures associated with locomotion—an important cost of foraging. As such, biologging tags containing accelerometers are being used to generate proxies for animal energy expenditures despite being unable to distinguish rotational movements from linear movements. However, recent miniaturizations of gyroscopes offer the possibility of resolving this shortcoming and obtaining better estimates of body accelerations of swimming animals. We derived accelerations using gyroscope data for swimming Steller sea lions (Eumetopias jubatus), and determined how well the measured accelerations correlated with actual swimming speeds and with theoretical drag. We also compared dive averaged dynamic body acceleration estimates that incorporate gyroscope data, with the widely used Overall Dynamic Body Acceleration (ODBA) metric, which does not use gyroscope data. Four Steller sea lions equipped with biologging tags were trained to swim alongside a boat cruising at steady speeds in the range of 4 to 10 kph. At each speed, and for each dive, we computed a measure called Gyro-Informed Dynamic Acceleration (GIDA) using a method incorporating gyroscope data with accelerometer data. We derived a new metric—Averaged Propulsive Body Acceleration (APBA), which is the average gain in speed per flipper stroke divided by mean stroke cycle duration. Our results show that the gyro-based measure (APBA) is a better predictor of speed than ODBA. We also found that APBA can estimate average thrust production during a single stroke-glide cycle, and can be used to estimate energy expended during swimming. The gyroscope-derived methods we describe should be generally applicable in swimming animals where propulsive accelerations can be clearly identified in the signal—and they should also prove useful for dead-reckoning and improving estimates of energy expenditures from locomotion.


Introduction
It is a common assumption in foraging theory that animals adopt strategies to maximize the ratio of energy gained over energy expended [1]-of which locomotion can be the major cost [2]. One easily measured proxy for energy expenditures associated with locomotion is acceleration [3,4], which can be collected using miniature data logging tags that incorporate three-axis accelerometers [5,6,7].
Accelerometers measure the vector sum of acceleration due to gravity and animal movement (Fig 1). A widely used method for estimating animal accelerations generates a metric called Overall Dynamic Body Acceleration (ODBA; [3]). ODBA is calculated by subtracting a smoothed accelerometer signal from the raw signal (using a simple box filter to smooth the signals independently on each of three axes), then summing the absolute value of the results in each axis [3]. When there is little high frequency tag rotation, the smoothed signals will approximate the gravity signal (static acceleration) and the differences will approximate animal body acceleration (dynamic acceleration). ODBA is normally averaged over longer intervals (e.g., corresponding to a dive) to provide an estimate of activity, but it has also been used to provide sub-second estimates of energy expenditures [4]. A similar method to ODBA uses frequency filtering to separate the high frequency components of the accelerometer signals separately on each axis [8].
A key assumption of the ODBA method is that an animal is not rotating at a frequency above the cut-off frequency of the box filter, since a rotating gravity vector in the tag coordinate frame causes a change in the acceleration signals measured on the different axes in the absence of dynamic acceleration. Unfortunately, many animals swimming and diving in an aquatic environment do rotate, and it is not possible to separate linear forces from rotational forces The measured accelerometer vector is the vector sum of gravity and dynamic tag acceleration. Acceleration due to gravity ( * g) is often called static acceleration, a constant at 9.8 m/s 2 at the earth's surface. Accelerations of an animal due to animal movements are dynamic ( * d). For large animals, accelerations of an animal's mass due to locomotion tend to be substantially smaller than g, except for brief intervals. The measured acceleration ( using accelerometers alone (Fig 2). Hence, accelerometers will record changes in accelerometer signals caused by rotations, namely by changes in body pitch, rolls and yaw, that may be falsely interpreted as acceleration (Fig 2) [9].
In the hypothetical case of an animal such as a spinner dolphin (Stenella longirostris) that rotates about its own body axis at a constant angular velocity, a tag placed at its center of mass would measure a large ODBA (given a rotation rate greater than the box filter cut-off frequency) even though there is neither linear nor angular acceleration (Fig 3). ODBA thus includes the effects of animal rotation associated with extreme movements such as those of spinner dolphins. However, it also includes the effects of less extreme movements such as cetacean fluking, avian wing strokes, pinniped flipper strokes, and fish tail strokes.
Despite the shortcomings of ODBA, a number of empirical studies have shown that it provides a useful proxy for energy expenditure that correlates with rates of oxygen consumption for a number of species [10]. In addition, and as Gleiss et al. [4] point out, the primary acceleration proxies for propulsion are not necessarily forward acceleration in the direction of However, the acceleration signal changes (b) when the animal accelerates by movement, as shown for the reef shark whose lateral accelerations (related to tail movements) were the largest contributor to ODBA.
A variation on ODBA uses a vector sum dynamic body acceleration rather than a simple addition of the axis components [11]. This has been called Vec DBA (VeDBA) and solves a problem with OBDA-namely that the summation of axis contributions overestimates accelerations occurring at oblique angles. However, Quasem et al. [11] found the correlations between VeDBA and rates of oxygen consumption were no higher, and were sometimes lower than for ODBA. Another variation-called partial DBA (PDBA)-uses a subset of accelerations to track heave and sway as a measure of activity, such as in hammerhead sharks [12].
A second common use of accelerometer signals is to estimate the orientation of an animal. Accelerometers can give a good indication of the direction of the center of the earth and can therefore be used to estimate an animal's pitch and roll angle assuming that the body is rigid, the tag has a fixed position, and dynamic acceleration is small relative to g. Accelerometer data and magnetometer data (a digital compass) can be combined to estimate the 3D orientation of an animal together with its heading [5,13] A dead-reckoned trajectory can thereby be constructed if speed can be estimated, and the swimming animal is assumed to travel in the forward direction with respect to its long body axis [5,7,13,14].
The problem of decomposing changes in accelerometer signals due to gravity and animal movements can be resolved by adding gyroscopes to the instrument package [15]. Microelectricalmechanical systems (MEMS) gyroscopes measure the rate of rotation of an object about three axes and yield information that can be used to remove the confounding factor of rotations.
Our goal was to apply a method for estimating forward (in the direction of swimming) body accelerations taking advantage of gyroscope data combined with accelerometer data to calculate linear dynamic acceleration. We hoped to use forward accelerations as indicators of the power and frequency of swimming strokes for Steller sea lions (Eumetopias jubatus) and to determine how well derived measures correlated with swimming speed. A second goal was to determine whether forward linear body accelerations could also be used to estimate energy expenditures after accounting for fluid dynamic drag-a goal enabled by a new metric, the Averaged Propulsive Body Acceleration (APBA). A good correlation between measured accelerations and estimated drag would provide confidence that the measurements of acceleration are related to the energetic cost of locomotion. Finally, we compared APBA with ODBA in terms of how well each correlated with swimming speed (which can be taken as a proxy for energy expended)-although we recognize that ODBA was not designed to predict speed.
Sea lions provide an excellent model to test the ability of methods to estimate dynamic body accelerations arising from propulsive forces. Steller sea lion swimming propulsion comes almost entirely from intermittent brief strokes of the fore flippers, and their swimming mechanism can be characterized as a rigid body with wings, unlike true seals whose propulsion comes from the hind flippers combined with whole body undulations [16]. The animal glides between strokes with the fore flippers held close to the body [17,18,19]. At the start of the stroke cycle, the animal brings the fore flipper forward and raises it. The main propulsive force comes from a downward power stroke followed by rotation of the flipper to become more at right angles to the rostral-caudal axis, and a final paddle stroke to the gliding position. The power stroke typically only lasts a fraction of a second and is followed by a glide of 1-3 seconds [18]. In the study reported here, we used trained Steller sea lions who could perform directed controlled tasks to evaluate methods for estimating propulsive acceleration and related metrics.

Materials and Methods
We attached tags to four trained adult female Steller sea lions (F00YA, F97HA, F00BO and F97SI) housed at the University of British Columbia's Open Water Research Station (Burrard Inlet on the coast of British Columbia, Canada. Coordinates: 49.292, -122.891) to determine the relationship of our proposed metric to a known behavior. Trials were run on one day in July, three days in November and one day in December 2013. All research was conducted under UBC Animal Care Permit #A11-0397.
The sea lions were weighed and measured for body length (Table 1). Their surface areas were estimated by fitting a power curve to published data [20] for similarly-sized animals and extrapolated or interpolated based on their measured body mass. The animals were trained to swim alongside a 6.4 m research vessel with an outboard jet engine, at the speed of the vessel, in exchange for food rewards. The trials were run in two directions east to west and west to east to compensate for local currents (estimated < 0.5 kt).
The boat was run at 1.11 m/s (4km/h), 1.67 m/s (6km/h), 2.22 m/s (8km/h) and 2.78 m/s (10km/h) with the goal of obtaining 45+ seconds of constant speed subsurface horizontal straight-line swimming at each speed. These speeds were not exact and actual boat speed (± current) was obtained using a Garmin eTrex 20 GPS data logger recording every 5s. The sea lions tended to keep their eye on the trainers while swimming, and to propel themselves higher than necessary for simple directional travel. They also often fell back after receiving fish rewards at higher speeds. To correct for this, the fall back distance was estimated for each dive speed and to correct the speed.

Biologging tag
We used two Loggerhead Instruments OpenTags each containing an Analog Devices ADX345 3-axis digital accelerometer, a Honeywell 3-axis magnetometer, HMC5883L, an InvenSense IMU-3000 3-axis gyroscope, and a Measurement Specialties MS5803-30BA miniature 30 bar pressure sensor, as well as temperature recorder that we did not use. The tags were set to record all values at 50 Hz.
Two OpenTags, a time-depth recorder, and a VHF-tracking device were affixed to each animal via a specially-designed, tight-fitting harness (Fig 4). This harness is worn by the animals on a daily basis when the animals swim in open water. Two tags were attached, but only the more rostral tag provided useful data because the strap caudal to the flippers became loose during swimming and the data revealed large resultant oscillations.

Gyro-Informed Dynamic Acceleration (GIDA)
Our method differed somewhat from that of prior researchers [15,21,22]. We used a complementary filter similar to that of [23] and [24] instead of a Kalman filter [15,21] or a gradient Table 1. Animal ID, age, mass, length and surface area of 4 adult female Steller sea lions that participated in the study. Surface areas estimated by fitting a power curve to published data [20] for similarly-sized animals and extrapolated or interpolated based on their measured body mass. descent algorithm [22] to correct drift in the estimated gravity vector. For brevity, we refer to the gyroscope method as GIDA -Gyro-Informed Dynamic Acceleration. GIDA is calculated as follows: If the gravity vector * g can be estimated in tag coordinates then dynamic accelerations can be obtained simply by subtracting * g from the measured acceleration vector

Animal
Producing a continuous estimate of * g starts with collecting data on a stationary tag in order to provide an initial direction of . Iterating forward, an estimated gravity vector * g 0 is counter-rotated on every (20 ms) time step using the 3-axis gyro signal. In principle, this should produce a vector that tracks actual gravity assuming perfectly accurate instruments. However, inaccuracies in the gyro signal will cause this vector to drift from the true gravity vector. A complementary filter is used to correct for this drift [23]. Dynamic acceleration is computed for the entire track using ð * d ¼     g 0 from the accelerometer signal (thus yielding GIDA), thereby revealing the net acceleration generated during fore-flipper stroking, followed by the decelerations characteristic of the glide phase in which the flippers are abutted against the body (and thereby producing no thrust). Subtracting a smoothed accelerometer signal from the unfiltered signal (the first step of the ODBA method) also shows the four individual flipper strokes, but the signal is less clear (Fig 5d).

ODBA calculation
In the ODBA method, static acceleration is estimated by using a box filter on each axis of a three-axis accelerometer [3]. According to an analysis by Shepard et al. [6], the optimal running mean interval for ODBA should be longer than the stroke period, and should be a  minimum of 3 sec. The animals in our study had a stroke period that varied between~2 sec at high speed and 3 sec at low swimming speeds. We therefore used a running mean filter width of 3.0 sec.

APBA-based Calculations
We estimated the tag was tilted forward by approximately 20 degrees (Fig 6) which means that acceleration in a forward direction using the x and z tag coordinates was: a f = cos(20)a x + sin (20) a z. . Our metric of Averaged Propulsive Body Acceleration (APBA) is defined as the gain in speed, U max −U min (Fig 7d) in the direction of travel from a swimming stroke divided by the peak-to-peak inter-stroke interval (t f ). This provides a measure commensurate with ODBA (its unit is acceleration) which can be used in estimates of metabolic expenditure and also, we believe, dead reckoning. APBA can be used in the computation of both time-averaged drag and propulsion force (thrust) as illustrated here and derived in Appendix 2.
In contrast to GIDA which yields near-instant acceleration at the temporal resolution of the recording device, APBA is connected to the time-averaged accelerations <a> ts and <a> tg sustained during the stroke and glide phases (assuming no net acceleration) as follows: The time intervals t s , t g and t f correspond to the duration of the foreflipper stroke phase, glide phase, and one complete stroke-glide cycle respectively (see also Fig 7c). In this, and the following equations, the use of a triangular bracket indicates a time averaged variable (see Eq A2-7 in Appendix 2). To identify peaks in forward acceleration corresponding to flipper strokes, the data were first smoothed to 10 Hz using a box filter. A second process identified local maxima > 0.06 g for the slowest speed (4 kph) and > 0.15 g for higher speeds within a 400 ms moving window.
In order to estimate the gain in speed from flipper strokes, the area under the acceleration curve was integrated in a 400 ms window centered on the peak. The window width was chosen to be the typical duration of forward acceleration. Fig 8 shows the averaged profile (based on ten strokes) at each of the four speeds attained by one animal (F97SI). These were normalized to be coincident at the peak accelerations and show that the strokes were brief pulses of propulsive force, with a half width of the acceleration profile of around 300 msec. They also show that the strokes become narrower and produced larger accelerations at higher speeds.
During the stroke phase, the time-averaged thrust from a foreflipper stroke is given by the averaged acceleration multiplied by the combined mass of the animal and entrained water, plus the time-averaged drag: Both T and D are defined as positive but <a> is allowed to be either positive or negative. Here D is understood as body drag, i.e., without flipper contributions as the latter act as propulsors. Thus, the thrust T in Eq 2 is "effective" thrust, i.e., as would be obtained via subtraction of flipper drag from "true" thrust if both happen to be known (a difficult task, as further discussed in [25]. Effective thrust is sufficient for the complete calculation of the trajectory (Eq 2), but true thrust is required for estimating the metabolic expenditures. In the absence of the latter, and per standard practice in aircraft design [26,27,28], we used a "propeller" efficiency factor used in metabolic power estimates to account for flipper drag losses (both longitudinally and laterally) as further discussed below (Eq 9). Parameter M entrained corresponds to the so-called entrained added mass, used to factor-in the effects of water slugs co-accelerated longitudinally   [20,29]. This added mass term is the first of two such terms used in this analysis.
The time-averaged equation of motion during the glide phase look similar, but without a flipper thrust term, given the absence of foreflipper stroking: Here D is again understood as body drag, a reasonable assumption if the flippers are assumed to be firmly tucked against the body (as they appear in vivo) thereby contributing little extra drag.
On the other hand, time-averaging the equation of motion over an entire stroke-glide cycle (t f ) yields The last step on the right-hand-side results from the zero time-averaged acceleration characterizing an animal following a boat cruising at constant speed. Although the tag data (Fig 7) suggest that this will not be the case for all stroke-glide cycles, the constraint will hold to a good approximation for at least many such cycles, as suggested by Fig 7d. Connecting the value of APBA to drag and thrust goes as follows. For the glide phase, merging Eqs 1 and 3 yields a measurement of the drag produced (see details in Appendix 2): To carry out the calculation of flipper thrust via Eq 4, we assume that stroke and glide body drag are nearly the same over each stroke and glide cycle-namely <D> ts~< D> tggiven the similarity of the time-averaged swimming speed as further explained below.
From this assumption, and along with merging Eqs 1 and 2 and the definition of APBA, one gets the following computation of thrust, as averaged over a full stroke-glide cycle Aiming for a comparison with otariid body drag discussed in past studies [19,20,30], the drag force is further expanded as follows during each stroke and glide phase: The first term in the right-hand-side, is the so-called body form drag, expressed in terms of the density of seawater (ρ = 1027kg/m 3 ), body wetted area (S wetted ) ( Table 1) and the steadystate drag coefficient C D body (0.0054; Feldkamp 1987b) [19]. The factor γ (1 γ 5) accounts for wave drag effects that arise when the animals swim near the surface [27,28,31,32]. Eq 7 also allows for the body drag to be different in the stroke and glide phases if <U> and <U 2 > are different in each phase. But in the context of the experiment described here, both speed averages turn out the same and nearly equal to the boat's U boat and U boat 2 (as further argued below). From this follows the second line in Eq 7 and the fact that body drag changes little in both phases. The second term in Eq 7 represents the ability of the harness at generating drag because of the flutter of the rear strap (Fig 4), which propels extra slugs of water both vertically and horizontally. This is a second source of added mass, i.e., in addition to the entrained mass term (M entrained ) codified in Eqs 2 and 3, but one that would affect only harnessed swimmers outfitted with loose straps carrying bulky hardware. This term is derived by estimating the rate of momentum gained by the water surrounding the strap, namely U dM water /dt~kρTADUω, a product of the angular flutter frequency of the strap (ω; radians/s) (measured by the accelerometer affixed to the aft strap), seawater density, strap length (D), width (T) and strap oscillation amplitude (A). The value of coefficient k expresses the percentage of the mass disturbed by the strap, as parameterized in units of ρTAD. With all other inputs known (U boat~1 -3m/s, D = 1.5m, T = 0.1m, A = 0.04m and ω at 44.5 radians/s, and γ = 1.0 (swimming at depth)) parameter k is determined from the tag data via Eq 5, which incidentally accounts for both sources of added mass, i.e., via k and M entrained . Note that with the latter already fixed at M entrained /M animal~0 .05 [20,29], using Eq 5 to get a value of k accounts for all other sources of added mass co-moving with the animal.
Approximating a sea lion's time-averaged speed and speed-squared with the boat's U boat and U boat 2 as done in Eq 7 needs to be justified and quantified, along with the claim that a sea lion's drag is quantitatively the same in both gliding and stroking phases. Clearly, time-averaging (over each stroke-glide cycle) the speed of an otariid trained to strictly follow a boat moving at constant velocity shall always yield a value equal to that of the boat's, regardless of the specifics of the measured speed profile. This is slightly different in the experimental trials shown in Fig 7d, where the matches occur only over a subset of the cycles, and with small deviations over the rest, i.e., when the animal sometimes gets somewhat ahead of the boat (see cycle 20-25s) or behind it (as in cycle 5-10s). Thus, approximating <U> with U boat , as done in the added mass term in Eq 7 is accurate, but only as averaged over several stroke-glide cycles.
On the other hand, calculating the average <U 2 > is more problematic since it also depends on the shape and other details of a speed profile, such as the values of U max and U min marking the end of the stroke and glide cycles respectively. It is such dependence to profile details that lead to what is commonly known: namely, that the average of the square of a function is not necessarily equal to the square of its average. Another complication is that the profile is not the same on a (full) cycle-to-cycle basis. Therefore, assessing the errors connected with assigning <U 2 > to U boat 2 is done by modeling the speed profiles themselves with the linear time functions represented by the dashed red line in Fig 7d (see also Eqs A2-1-A2-4). Clearly, such a profile does not match all glide-stroke cycles, but does adequately represent most cycles nevertheless. Among the useful properties that this type of linear profile offers is the time-averaged of the otarid's speed and speed-squared (U and U 2 ), which can be calculated as given exactly by <U> ts = <U> tg = U boat and <U 2 > ts = <U 2 > tg = U boat 2 + (U max −U min ) 2 /12 (see Appendix 2 for details). And so, it would appear that it is indeed reasonable to assume the drag as being similar in both gliding and stroking phases if the speed averages are the same in each phase. Moreover, this result suggests that approximating <U 2 > with U boat 2 incurs small errors of only 5% or less for the typical speed profiles shown in Fig 7d. Finally, the metabolic expenditure <P> of an animal is given by the sum of the resting and swimming metabolic expenditures. Resting metabolic expenditure (Watts) is a power function of the mass of the animal [2,33] estimated herein via The metabolic expenditure from swimming is given by the product of time-averaged thrust and the swimming speed divided by the metabolic efficiency (μ m ) and the propulsive efficiency (μ p ; also called propeller efficiency) [27,28].
Here again the swimming speed has been approximated by the boat's speed. Parameter μ m characterizes the chemical energy converted into mechanical energy when using muscles; and μ p accounts for the extra mechanical energy needed, during a propulsive stroke, by the flippers for moving fluid vertically in addition to horizontally (in other words, this is where flipper drag must be taken into account explicitly). Feldcamp ( [19] Fig 8) found that for California sea lions, propulsive efficiency is a function of speed, being substantially greater at higher speeds than at low speeds. We derived a μ p function by fitting a quadratic curve to his published data.

Results
We selected dives (periods of subsurface swimming) for analysis that met the following criteria: a duration of 12 s or more, no wanderings away from the task noted by the trainer, a roughly constant swimming depth, and a GPS speed approximating the target speed. We obtained data from a total of 133 dives (between 25 and 48 dives per sea lion). We obtained more dives at the slower speeds because the animals frequently gave up at the higher speeds. It took several attempts to obtain speeds approximating 10 kph for three of the animals, and one animal never met the test criteria at that speed. The pressure sensor data showed the animals swimming at depths approximating 1.5-2.0m, i.e., close to the 3x body diameters at which form drag is minimal and where γ = 1 ([32] ; Fig 9).
We processed all of the data from all of the selected dives to identify peak forward accelerations during strokes and computed the mean gain in speed for the strokes in each dive meeting our criteria. We also computed the mean stroke rate for all dives. Fig 10 (column 1) shows how the stroke rate varied with speed for the four animals. All regression equations and r 2 values for the figures are provided in Table 2 Three of the four animals had a stronger correlation between swim speeds and the APBA metric (mean speed gain divided by mean inter stroke interval) (F00YA, r 2 = 0.88; F00BO, r 2 = 0.96; F97SI, r 2 = 0.95) and the correlation was the same for one of the sea lions (F97HA, r 2 = 0.92).
The results for the ODBA metric averaged for all dives are given in Fig 11 plotted against speed. As can be seen, for two of the animals there is good agreement between swimming speed and the metric (F00BO, r 2 = 0.90; F97SI, r 2 = 0.93), but for the other two the correlation is relatively weak (F00YA, r 2 = 0.57; F97HA, r 2 = 0.04).
Eq 5 gives the means for obtaining the total drag produced during the gliding phase. Fig 12  shows this drag to be mainly proportional to the square of the boat's speed (U boat 2 ). This does not necessarily imply the non-importance of harness drag since the value of the harness drag coefficient k (Eq 7) turns out to also depend on swimming speed. Fig 13 compares the total drag of Eq 5 with the form drag term, i.e., the U boat 2 -term in Eq 7, as evaluated with γ = 1as for a swimmer moving at depth [27,28,31]. The results suggest the former is twice as large as the latter, i.e., as expected if the animals had been swimming at depth but with a draggy harness. This extra harness drag can be inferred by taking the difference between the ordinate and abscissa values in Fig 13, per Eqs 2 and 7. Average stroke thrust calculated from Eq 6 is shown in Fig 14, highlighting an overall dependence on U boat 2 . From this, and from Eqs 8 and 9, the metabolic costs incurred during one full stroke-glide cycle are calculated and graphed in Fig 15. Estimated metabolic expenditures were noticeably less at the highest swimming speed, but close to maximal aerobic metabolic rates measured on terrestrial mammals [34] (F00BO, 90%, F00YA 85%, F97HA 67%, F97SI 82%).

Discussion
Our results show that using gyroscope data combined with accelerometer data makes it possible to clearly identify individual flipper strokes for otariidae swimming in a straight line, and to  estimate the gain in speed per stroke. It also makes it possible to calculate stroke rates. Stroke rate can be also calculated only with acceleration data using running mean or low-pass filters, but Fig 4 suggests that the results will be less reliable (compare Fig 5c with 5d). We found a relatively weak correlation between stroke rates and swimming speed, which agrees with prior work by [18,32]. Feldkamp [18] noted that "frequency can vary by 50% at a single velocity". Hindle et al. [32] found a negative correlation between ODBA/stroke and the stroke frequency at a given speed, suggesting that the animal can trade off stroke power for stroke frequency.   The average gain in speed per stroke was much more closely related to swimming speed than stroke frequency and the results show a speed gain per stroke increasing by a factor of 3-4 between the slowest and the fastest swimming speeds. Evidently, sea lions use an increase in stroke power to swim faster to a much greater extent than variation in stroke frequency. Fig 8 shows a large increase in the peak acceleration associated with strokes at higher speeds as well as a decrease in stroke duration. This suggests faster and possibly deeper strokes.

APBA as a metric
Our results showed that accelerations during horizontal swimming at shallow depths correlated better with animal speed than did the ODBA method. This suggests that APBA may be a useful in estimating the energetic costs of locomotion at least during transits where depth changes are minimal.
In general, APBA will likely be most useful as a metric relating to swimming speed or energy expenditures for animals where propulsive accelerations can be clearly identified, such as with otariidae and penguins. Sea lions are almost ideal candidates for our method because their propulsive movements are characterized by brief strokes with glides between strokes making it easy to identify acceleration due to propulsion. Also, the metrics are likely to prove useful with animals where burst and glide swimming is characteristic. On the other hand, APBA would be useless for a body with continuous steady propulsion (such as a submarine) because no accelerations would occur at constant speeds, a problem that occurs also with ODBA and other related metrics.

Near-surface and harness drag effects
Our results show the (total) drag generated in the runs to exceed body (form) drag (i.e., the U 2 term in Eq 7) by about a factor of 2x. Part of the extra resistance may have to do with the wave drag effects that arise when swimming near the surface, and another part with the flutter of the aft harness strap and mounted tag. We also recognize that the harness may have impeded movement in ways other than drag.
The pressure sensor data showed the animals swimming at depths at which drag is minimal and where γ = 1 (Fig 9). Occasional small incursions to shallower depths of only 1.0 m were also recorded and would be enough to increase the value of the γ-parameter (Eq 7) from 1.0 to 1.2 [27,31,32]. Should this be the case, harness drag would amount to about 50% of the drag increase, in contrast to 100% of the increase if γ = 1.0 (swimming at depth).
Harness drag is the other plausible source here given the flutter recorded on the tag attached on the aft (caudal) strap (Fig 4). Hindle et al. [32] ran a number of trials on animals without and with a harness similar to those used in this study. In addition, the two animals were a subset of the three animals used here. They found a small decrease in the swimming strokes/ km (10% and 6%) per unit distance, when the animals swam without a harness. However, their aft strap did not carry hardware and thus could have been flutter-free. On the other hand, the mounting of the recording device shown in Fig 3 might have, via either vortex-shedding off-the tag's back or tag upward-downward "kiting" motions, generated enough strap torsion and flagging to affect overall drag. Significant drag increase is plausible here since, in effect, strap flutter ends up increasing the amount of fluid turbulence found in an animal's wake, and over a cross section area that now spans nearly all of a sea lion's horizontally-projected maximum diameter.

Potential for APBA to be used in dead reckoning
The APBA method has the potential to be useful in dead reckoning methods used to compute the trajectories of marine animals. A major problem with dead reckoning with tag data is that most tags do not record speed, although some do include a paddle wheel [35] or a propeller [13] for this purpose and flow noise has also been used to estimate speed with acoustic recording tags [7,36]. GIDA cannot be used to calculate speed by integrating accelerations over time; this approach would undoubtedly fail after a few seconds because of the inaccuracy of the low cost MEMS sensors. With more accurate sensors, integration would be possible over longer durations, but would still not be sufficient for dead-reckoning. APBA might be used to estimate speed using correlations, such as the ones we calculated, but we think that a more promising approach would be to use a propulsion-drag model, such as that proposed by [7] for humpback whales. As we have shown, gain in speed from brief strokes can be measured even with low accuracy sensors and this can be used to speed up an animal model, while estimated hydrodynamic drag can be used to slow the model if a drag coefficient can be approximated. This method should be especially effective for otariidae where it is possible to identify propulsive accelerations. However, we only have data thus far for straight-line swimming. Additional work will be required to use accelerations to estimate speed during the tight turns that are characteristic of sea lions when they are actively feeding. In addition, buoyancy forces must be taken into account especially when animals are diving vertically.

Metabolic rate calculations
Considerable work has been done to estimate the energetic costs of diving while foraging for otadiids [2,33,37] and the energetic costs of steep dives can be calculated from speed estimates obtained using time and depth recorders. Our results provide a complementary method that should be useful in estimating energetic expenditures during horizontal swimming at depth. As shown in Fig 15, APBA-based calculations yield values that are consistent with these studies. Moreover, the values calculated in the high speed range (3m/s) are smaller but close to the maximal metabolic rate, i.e.,~85% maximum metabolic rate for three animals (based on terrestrial mammals [34]), and are consistent with the rapid fatigue exhibited by the sea lions during runs at those speeds.

Assumptions and systematics
A number of assumptions are involved in using APBA to calculate metabolic expenditures. One is an assumption that the sensor is actually measuring acceleration at the center of mass of the animal; tags placed closer to the center of mass will result in better estimates of propulsive acceleration of the body mass. More peripheral placements may pick up transitory accelerations which are synchronized with stroking, but result in over or under-estimates of overall mass acceleration. In our case, the tag was held by the harness strap on the clavicles and there was considerable movement due to clavicle rotations and translations through the swimming stroke.
APBA ignores energy expended through angular accelerations and for this reason may underestimate propulsive effort especially when an animal is turning. Given a rigid body assumption, angular accelerations can be calculated in principle. However, sea lions have extremely flexible bodies and are able to conform their bodies to the radius of the turning circle when they turn, thereby minimizing additional drag and deceleration as body changes direction [38,39]. For other animals, especially turtles, the rigid body assumption is more accurate and in these cases estimating forces relating to angular accelerations may be feasible. More work will be required to determine the extent to which the energetic costs can be determined for frequently turning animals.
Another factor not accounted for by APBA is buoyancy. Overcoming either positive or negative buoyancy is a major cost of diving [40,41]. With horizontal swimming at shallow depths, as in our study, buoyancy will have less of an effect and it is possible that the animals in our study may have adjusted lung volume [42] so that they were roughly neutrally buoyant at the 1.5-2m swimming depths observed. In future work, it should be possible to combine APBA or similar metrics with buoyancy related costs to both estimate metabolic costs and create dead reckoned pseudo-tracks.
Inexpensive tags incorporating gyros promise to greatly improve the estimation of mechanical work done by animals when swimming compared with tags containing only accelerometer for otariidae. Even low cost tags with low cost gyros enable the magnitude of propulsive forces to be quantified, which should make it possible to use these measurements to more accurately estimate the metabolic costs of foraging.

Appendix 1. Estimating dynamic acceleration using accelerometers and gyros
The tags were calibrated by holding the device steady in each of 6 orientations (upright and inverted) on each of the principle axes, and recording in each position for a few seconds. We then used the recorded data to obtain maxima and minima gravity values for each axis. Using these data, additive and multiplicative constants were calculated to scale the accelerometer signals between [-1,+1] on each axis.
These same fixed orientations were also used to estimate the fixed biases of the gyros because the tags were not being rotated. We nevertheless detected constant rotation rates of 5.03, 1.15 and 3.70 deg/s even though the gyros were not rotating in the fixed position. We subtracted these values from the gyro readings. Informal experiments using a lathe suggested that once these constants were subtracted angular velocity readings were accurate to within about 5%.
Dynamic linear tag acceleration ( * a) can be calculated by subtracting the gravity vector from the measured acceleration vector if gravity can be estimated independently from accelerometer signals: The problem is to obtain an estimate of the gravity vector g in tag coordinates. Our method is related to that of [21] and [24,43] and involves using the tag gyroscopes to maintain a continuously updated estimate of * g . The method assume that the tag is held stationary for at least a second, when it is turned on in which case the accelerometers register a pure gravity vector signal ( The three-dimensional rotation of g' is accomplished using quaternions. Quaternions are a method for representing rotations that avoids the problems with Euler angles (e.g. azimuth elevation and roll) [44]. Rotations are represented in quaternion form by a vector of four numbers, representing an axis of rotation and a rotation about that axis. A unit quaternion is a quaternion that has been normalized to have a length of 1.
Three axis rotations (r x , r y , r z ) obtained from the gyros are converted to quaternion form as follows: A unit quaternion is then constructed as: where * u is a unit vector representing the axis of rotation constructed from the gyroscope measurements: Rotation of the virtual gravity vector is accomplished by pre-multiplying * g 0 by the quaternion rotation and post-multiplying it by its inverse.
Given perfect gyroscope accuracy and no accumulation of numerical error, this method would be sufficient to maintain an accurate virtual gravity vector. The problem is that MEMS gyros are not perfect-they have low inherent accuracy and can have substantial constant rotation errors that drift over time [23,24].
A common way of compensating gyroscope errors is to use a complementary filter whereby high temporal resolution measurements can be corrected for drift using a measurement that does not drift (on average) over time. In this case the continuously updated estimation of g obtained with the gyros is corrected using the accelerometer signal, which averaged over time approximated g [24,43]. Animal accelerations are transitory and over the long term * g is approximated by * a. To make use of this, measured acceleration * a can be combined in with the virtual gravity vector at each time step using a weighted average: where ω is a weight factor. The goal is to find a value of ω that eliminates drift. For example, we found ω = 0.002 was effective at a 50 Hz sampling rate for our particular instrument. This method necessarily distorts the result somewhat-because steady prolonged accelerations will be underestimated as * g 0 drifts towards * a, but the effect is minimal with transitory accelerations such as those caused by flipper strokes.
Dynamic acceleration is now calculated by: The MEMS gyros in the tag we employed displayed substantial constant errors of several degrees per s. To correct for this we measured the average bias with the tag held in a set of fixed positions and subtracted the result from all gyro measurements.
For an end to end test of the method we mounted the tag on a crank arm attached to the chuck of a large industrial lathe. This provided a test rig where constant dynamic accelerations could be generated and be easily calculated. For this simple case we could determine how accurately dynamic acceleration could be separated from static acceleration.
The magnitude of the centripetal acceleration ( * d) is given by where w is the angular speed in radians/s and r is the radius. Using the circuit board diagram provided by the manufacturer we determined the location of the accelerometer chip within the tag and mounted, the tag on a custom made crank arm so that the accelerometers were placed at 9 and 18 cm eccentricities to the lathe axis of rotation.
We set the lathe rotating with nominal speeds of 30 and 60 rpm in both clockwise and counter clockwise directions. To measure the actual speed of rotation we determined the period for 10 cycles using the accelerometer measurements. Table 1 shows the magnitude of the calculated GIDA values. The estimate of centripetal acceleration is the GIDA component in the direction of the axis rotation. The results are based on average values for 16 seconds of steady rotation.
The result are given in Table 3. They reveal overestimates of the larger dynamic accelerations and underestimates the smaller dynamic accelerations. The absolute size of the estimation errors increases with the acceleration.
In addition, as mentioned above, MEMS gyros can drift over time and an incorrect gyro reading can result in a false estimate of dynamic accelerations. In our algorithm development we observed stretches of the track where the mean acceleration was not centered on zero (as it should be for a steadily swimming animal). To correct for gyro bias drift we subtracted the estimated dynamic acceleration from a running mean of the estimated dynamic acceleration as a final processing step. We found a 30 sec running average to be effective. The long duration is designed to not interfere with the detection short term dynamic events, such as propulsive flipper strokes. It is also important to note that this additional stage of processing should not be needed since the complementary filter is intended to correct for gyro drift and other inaccuracies. An alternative would be to simply increase the weighting of the accelerometer signal. Never the less, we believe that the method has value because it allowed us to use a smaller weight and thereby resolve transient events more accurately and that the problem (of non-zero mean acceleration) only occurred occasionally. In addition, using a 30 second running average will have no significant effect on our basic results. We suggest that this final stage of processing should be considered to be optional and not part of the basic method.
Source code together with both original and processed data files are provided as S1-S5 Data.

Speed modeling
The forces and metabolic expenditures discussed in this paper are based on time-averaged accelerations and forward speeds collected from the tag data. Several assumptions are made here, namely with regards to the periodicity of the GIDA signal and integrated variables over all stroke-glide cycles, as well as the averaged otariid speed (and squared speed). As intuitive as they may appear, these need to be justified.