Studies of locomotion kinematics require high-resolution information about body movements and the specific acceleration (SA) that these generate. On-animal accelerometers measure both orientation and SA but an additional orientation sensor is needed to accurately separate these. Although gyroscopes can perform this function, their power consumption, drift and complex data processing make them unattractive for biologging. Lower power magnetometers can also be used with some limitations. Here, we present an integrated and simplified method for estimating body rotations and SA applicable to both gyroscopes and magnetometers, enabling a direct comparison of these two sensors. We use a tag with both sensors to demonstrate how caudal-oscillation rate and SA are adjusted by a diving whale in response to rapidly changing buoyancy forces as the lungs compress while descending. The two sensors gave similar estimates of the dynamic forces, demonstrating that magnetometers may offer a simpler low-power alternative for miniature tags in some applications.

Many marine mammals and fish propel themselves with oscillations of the posterior body (termed caudal-oscillatory swimming which includes thunniform and sub-carangiform swimming styles). These undulations generate angular displacements of the body (body rotations, BRs) as well as specific accelerations (SAs), i.e. accelerations with respect to the body frame of the animal (Fish et al., 2003), both of which are measured by accelerometers in surface-attached tags (Johnson et al., 2009). The small size and low power consumption of micro-electro-mechanical system (MEMS) accelerometers have resulted in their widespread use to study animal locomotion, but their unavoidable sensitivity to both orientation and SA makes the resulting data difficult to interpret. In steady swimming, the mean body posture typically varies slowly relative to the stroking rate (Sato et al., 2007), allowing body posture to be removed from the accelerometer signal by high-pass filtering (Sato et al., 2003), resulting in the so-called dynamic acceleration (DA; Wilson et al., 2006). This filtered signal has been used both as a proxy for SA (Sato et al., 2011) and to calculate the overall dynamic body acceleration (ODBA), a widely used integrative indicator of activity level (Wilson et al., 2006; Gleiss et al., 2011). However, DA contains both SA and fast BR (Martín López et al., 2015), leading to biased estimates of animal-generated forces and complicating the relationship between ODBA and mechanical work done. In addition, fine-scale studies of caudal-oscillation swimming patterns and how they respond to different force loading require separate information about the BR (i.e. the instantaneous changes in orientation due to propulsor displacement) and the SA (i.e. the resulting net acceleration).

Inertial navigation systems (INS) in submarines and aeroplanes use triaxial gyroscopes to obtain an independent measure of the instantaneous orientation of the platform, allowing the SA component in the accelerometer signal to be estimated (Chatfield, 1997). Although MEMS rate gyroscopes are beginning to be used in animal tags (Noda et al., 2012) these have several drawbacks. MEMS gyroscopes measure the force needed to rotate a vibrating frame out of its plane of oscillation, producing a signal that is proportional to the turn rate. As sensitivity depends on vibration amplitude, there is an inherent trade-off between precision and power consumption. Gyroscopes require a stable oscillatory movement, meaning that they cannot be efficiently turned off between measurements, a technique often used with other sensors to save power. As orientation is derived by integrating the gyroscope signals, complex processing is needed to combat drift in the orientation estimates due to integration of sensor noise and temperature-induced changes in calibration (Luinge and Veltink, 2005). Drift can be combated both by periodic correction using another orientation sensor and by processing the sensor signals with a Kalman filter (Noda et al., 2012), non-linear estimator (Fourati et al., 2011b) or complementary filter (Fourati et al., 2011a) to track and remove the drift. The independent orientation estimate is typically obtained from accelerometers and magnetometers during intervals in which SA is presumed to be minimal, e.g. gliding (Fourati et al., 2009; Noda et al., 2012).

High sampling rate magnetometers can be used in place of gyroscopes to estimate BR in swimming, enabling an estimate of SA when combined with accelerometers (Martín López et al., 2015). Magnetometers have several advantages compared with gyroscopes. They can be turned off between measurements to save power, e.g. a magnetometer sampled at 100 Hz can be turned on for 1 ms to take a measurement and off for 9 ms, reducing power consumption to 10% at the expense of increased sensor noise. Moreover, these sensors are already implemented in many tags to estimate heading and are becoming available, integrated with accelerometers, as a low-power alternative to gyroscopes in consumer products (Delporte et al., 2012). A drawback of magnetometers is that, being a vector field sensor, they only measure two of the three rotational degrees of freedom, restricting the types of movements which they can track. However, magnetometers appear to capture well the largely planar swimming movements of cetaceans (Martín López et al., 2015) and may be applicable to other swimming and flying locomotion styles.

List of symbols and abbreviations
     
  • At

    measured triaxial accelerometer signal (m s−2) at time t; components are axt, ayt and azt

  •  
  • high-pass filtered accelerometer signal (m s−2) at time t; components are , and ; also called dynamic acceleration

  •  
  • low-pass filtered accelerometer signal (m s−2) at time t; components are, and

  •  
  • estimated orientation component of the high-pass filtered accelerometer signal (m s−2) at time t

  •  
  • B

    local magnetic field vector in the navigation frame (μT)

  •  
  • BR

    body rotation at the tag location due to stroking (rad)

  •  
  • Dt

    offset of the gyroscope, i.e. the value read at zero angular velocity

  •  
  • DA

    dynamic acceleration

  •  
  • fr

    dominant stroke frequency (Hz)

  •  
  • FIR

    finite impulse response

  •  
  • G

    Earth's gravity vector in the navigation frame (m s−2)

  •  
  • H

    symmetric finite impulse response high-pass filter

  •  
  • INS

    inertial navigation system

  •  
  • Mt

    measured triaxial magnetometer signal (μT) at time t; components are mxt, myt and mzt

  •  
  • high-pass filtered magnetometer signal (μT) at time t; components are , and

  •  
  • MEMS

    micro-electro-mechanical system

  •  
  • ODBA

    overall dynamic body acceleration

  •  
  • Qt

    rotation matrix describing the instantaneous orientation of the animal with respect to the navigation frame at time t

  •  
  • rotation matrix describing slowly varying postural changes

  •  
  • Rt

    rotation matrix due to caudal-oscillation rotations

  •  
  • RMS

    root mean square

  •  
  • SA

    specific acceleration, i.e. the net linear forces on the animal in the body frame

  •  
  • St

    specific acceleration vector in the body frame (m s−2) at time t; components are sxt, syt and szt, i.e. surge, sway and heave accelerations, respectively

  •  
  • estimated triaxial specific acceleration (m s−2) at time t; components are , and

  •  
  • x

    longitudinal axis of the body frame; anterior is positive

  •  
  • y

    lateral axis of the body frame; positive towards the right

  •  
  • z

    dorso-ventral axis of the body frame; dorsal is positive

  •  
  • estimated body rotation angles around the 3-axes for the gyroscope method; components are , and , i.e. body rotations around the x-, y- and z-axis, respectively

  •  
  • Θt

    instantaneous orientation of the animal at time t with respect to an arbitrary reference frame

  •  
  • ɸt

    Mean orientation (i.e. pitch, roll and heading) of the animal at time t, assumed to vary slowly with time

  •  
  • Ωt

    triaxial angular velocity (rad s−1) measured by the gyroscope at time t; components are ωxt, ωyt and ωzt

Here, we compare the performance of gyroscopes and magnetometers in concert with accelerometers to estimate kinematic parameters in Blainville's beaked whale (Mesoplodon densirostris) swimming. We first extend the magnetometer processing method developed in Martín López et al. (2015) to produce a comparable algorithm for gyroscopes. This simplified approach explicitly removes slowly varying forces by high-pass filtering the sensor data, and so estimates movements relative to the mean orientation and force balance of the animal. We then use data from a tag with synchronously sampled triaxial magnetometers, accelerometers and gyroscopes on a free-swimming beaked whale to compare the performance of gyroscopes and magnetometers in estimating SA and BR, and contrast the benefits and drawbacks of these sensors.

A DTAG logger was attached with suction cups to a male Blainville's beaked whale in May 2013 off the island of El Hierro, Canary Islands, Spain, following the methods described by Aguilar de Soto et al. (2012). The tag contained triaxial accelerometers (Kionix KXSC7-1050), magnetometers (Honeywell HMC1043) and gyroscopes (Invensense IDG-500 and ISZ500), and a pressure sensor, synchronously sampled at a rate of 200 Hz/sensor channel with 16-bit resolution. The DTAG also contained a temperature sensor located close to the gyroscopes, sampled at 33.3 Hz. The accelerometer, gyroscopes and pressure sensors were powered continuously and signals from these sensors were anti-alias filtered with a single pole filter at 50 Hz before sampling. The magnetometer was turned on for 1.67 ms of every 5 ms to reduce power and no anti-alias filter was used as the sampling rate was well above the rate of the rotational dynamics. Data from all sensor channels except temperature were decimated in post-processing to a 25 Hz sampling rate using identical symmetric finite impulse response (FIR) low-pass filters (10 Hz cut-off frequency). Sensors were calibrated in the laboratory using standard methods ( Appendix 1). The triaxial sensor signals were rotated to correct for the orientation of the tag on the whale, which was estimated at each surfacing from the stereotypical movements during respiration (Johnson and Tyack, 2003). Dives up to and including the second deep dive were analysed as the tag was partially detached thereafter.

The tagging method was approved by the University of St Andrews teaching and research ethics committee. Tagging was authorised by a cetacean research permit from the Spanish Ministry of Environment (MAGRAMA) to N.A.d.S. at Universidad de La Laguna.

BR and SA estimation

In studying locomotion, we are primarily interested in the dynamics of orientation and SA associated with propulsor movement rather than the mean posture of the animal. Assuming that caudal-oscillation only produces signals at and above the stroking rate, these can be separated from slower postural changes by high-pass filtering each axis of A, M and Ω with identical filters to obtain , and , where A, M and Ω are the triaxial vectors measured by the accelerometer, magnetometer and gyroscope, respectively. A high-pass filter cut-off frequency of about 0.25–0.5 of the stroking rate (e.g. calculated as in Sato et al., 2007), is typically appropriate. Both and contain information about BR, while reflects both BR and SA. The procedure is to estimate the BR component in using either or and so obtain an estimate of SA from by subtraction (see  Appendix 2 for detailed algorithm descriptions). Using , the BR is obtained in only one axis, but this is sufficient to track movements in steady swimming (Martín López et al., 2015) if the BR can be assumed to occur primarily around a single axis (for a cetacean, this is the y or transverse axis). To monitor the validity of this assumption, we computed the R2 statistic representing the quality of fit between the modelled and observed on a stroke-by-stroke basis (i.e. how well the assumed pitch-only BR fits the observed magnetometer measurements). Using , all three axes of the BR can be obtained by integration, allowing a more complete description of the motion. Because the integration is followed by high-pass filtering, there is no requirement for an absolute orientation reference or for drift estimation as normally needed with gyroscope processing.

Both the magnetometer and gyroscope methods were used to estimate BR and SA during steady swimming in dive descents and ascents. Glides as defined in Martín López et al. (2015) longer than 0.7 s were removed. A high-pass filter cut-off frequency of 0.4 times the average stroking rate of the analysed data for each dive phase was used. Applied to cetacean swimming, the magnetometer method estimates rotation about the y-axis. Rotations around the other two axes were set to zero for comparison with the gyroscope method. The strength of agreement between the two methods for BR and SA signals was estimated using Lin's concordance correlation coefficient (Lin, 1989, 2000) using epi.cc in the R package ‘epiR’ (R Development Core Team 2009). The similarity (R2 statistic and scale factor) of the BR and SA estimates was also evaluated using least-squares linear regressions. Processing was performed in Matlab 7.0 (MathWorks).

Estimates of the BR and SA of a Blainville's beaked whale, calculated using the gyroscope and magnetometer methods, were compared over 47 min of data representing swimming in descent and ascent phases of two deep (>500 m) and three shallow dives (Tyack et al., 2006). Without an independent control, we cannot assess which of the methods was more accurate but we expect that the gyroscope will give a fair approximation of the true BRs, at least under conditions similar to those of bench calibration, whereas the magnetometer will only be able to track a subset of movements. However, the mean R2 of the magnetometer method over all analysed strokes was 0.86, indicating that the pitch-only rotation model used in this method was a reasonable approximation to the BR dynamics. Visually, the two methods produced very similar BR and SA estimates, which tracked both the steady swimming and rapid gait changes characteristic of beaked whale ascent swimming (Fig. 1; Martín López et al., 2015). Over the 1085 strokes analysed, the BR estimates had a concordance of 0.97, a mean relative scale factor of 7% and an R2 value between the two methods after correcting for the scale factor of 0.94. The scale factor between the magnetometer and gyroscope BR estimates varied with temperature (Fig. S1). In shallow dives and descents of deep dives where the temperature was >16°C and therefore close to the temperature during gyroscope calibration (22°C), the scale factor varied from 2% to 14% but tag temperatures down to 11°C in the ascents of deep dives gave scale factors of up to 22%.

Fig. 1.

Comparison of estimated body rotations and accelerations produced with the magnetometer and gyroscope method during a 25 s interval of ascent swimming by a Blainville's beaked whale showing the characteristic stroke and glide gait. (A) Estimated pitching body rotations (). (B–D) Estimated surge , sway and heave accelerations. In each panel, the magnetometer and gyroscope results are indicated with blue and green lines, respectively. (E–H) Each panel represents the difference between the two methods over the same interval (cyan). In addition, E shows the roll and yaw body rotations predicted by the gyroscope method and not estimated by the magnetometer method (black and red lines, respectively). The R2 statistic, indicating how well a pitch-only body rotation (BR) fits the observed magnetometer measurements, was 0.94 during this swimming period.

Fig. 1.

Comparison of estimated body rotations and accelerations produced with the magnetometer and gyroscope method during a 25 s interval of ascent swimming by a Blainville's beaked whale showing the characteristic stroke and glide gait. (A) Estimated pitching body rotations (). (B–D) Estimated surge , sway and heave accelerations. In each panel, the magnetometer and gyroscope results are indicated with blue and green lines, respectively. (E–H) Each panel represents the difference between the two methods over the same interval (cyan). In addition, E shows the roll and yaw body rotations predicted by the gyroscope method and not estimated by the magnetometer method (black and red lines, respectively). The R2 statistic, indicating how well a pitch-only body rotation (BR) fits the observed magnetometer measurements, was 0.94 during this swimming period.

The SA estimates from the two methods were also similar, with concordance of 0.95 and 0.97 for surge and heave SA, respectively (R2 of 0.91 and 0.94 and scale factor of 0.96 and 0.97, respectively). The match for sway SA was relatively poor, with a concordance of 0.82 (R2=0.68, scale factor=0.90), probably due to small roll and yaw BRs during stroking that were unmodelled by the magnetometer method and so remain uncorrected in the magnetometer sway SA estimate (Martín López et al., 2015). However, the sway SA calculated with the gyroscope has 23% of the magnitude of heave and surge SA and so represents only 3% of the total SA magnitude. Thus, the absolute differences between the methods are small.

Although neither the magnetometer nor the gyroscope method allows direct measurement of slowly changing forces, the impact of these changes can be seen in caudal-oscillation rates and amplitudes. We used both methods to estimate BR and SA during the initial 30 m of a descent with steady swimming during which buoyancy forces from air in the lungs decrease as a result of increasing hydrostatic pressure causing progressive lung compression (Sato et al., 2002). The methods gave almost identical results in tracking the rapid changes in stroke rate, BR and SA as the whale dived (Fig. 2), demonstrating the utility of these methods in analysing gaits under changing loads. During this descent, speed estimated from the depth rate and pitch angle as in Miller et al. (2004) increased from 0.8 to 1.1 m s−1 as the whale dived away from the surface (a net acceleration of about 0.007 m s−2) despite progressively lower stroking rate, BR (a proxy for propulsor amplitude), surge and heave SA, which decreased to 81%, 74%, 30% and 44% of their initial values, respectively (Fig. 2). Thus, despite a small increase in drag due to increased speed, the whale was able to reduce swimming effort as depth increased, due to rapidly decreasing buoyancy as the carried air volume was compressed. Assuming passive isothermal compression, gas volume should decrease as 1/(1+0.1×depth) for depth in metres. Thus, at 30 m depth, the gas volume should be 35% of its initial volume at 4 m, roughly comparable to the observed decrease in SA. The surge and heave SA decreased more linearly with relative air volume (R2=0.97 and 0.96, respectively) than with depth (R2=0.83 and 0.78), suggesting that this animal adjusted caudal-oscillation amplitude and rhythm so as to match its force production to the decreasing net buoyancy during the first 30 m of the descent.

Fig. 2.

Stroke-by-stroke analysis of a deep dive descent by a Blainville's beaked whale. (A) Dive depth as a function of time coloured by the estimated instantaneous speed during the first 30 m of a descent. (B,C) Estimated surge and heave specific acceleration (SA), respectively, for the same interval. (D) Estimated pitching BRs . In panels B–D the magnetometer and gyroscope results are shown by the blue and green lines, respectively. (E) Root mean square (RMS) surge () and heave () SA as a function of depth. (F) Stroking rate (fr) and RMS pitching BRs () as a function of depth. In E and F, each symbol represents the RMS value over a stroke (N=14), defined as the period between two consecutive positive zero-crossings in the BR. SA and BR were estimated using the magnetometer method; results for the gyroscope method (not shown) were almost identical. The R2, indicating how well a pitch-only BR fits the observed magnetometer measurements, was 0.90.

Fig. 2.

Stroke-by-stroke analysis of a deep dive descent by a Blainville's beaked whale. (A) Dive depth as a function of time coloured by the estimated instantaneous speed during the first 30 m of a descent. (B,C) Estimated surge and heave specific acceleration (SA), respectively, for the same interval. (D) Estimated pitching BRs . In panels B–D the magnetometer and gyroscope results are shown by the blue and green lines, respectively. (E) Root mean square (RMS) surge () and heave () SA as a function of depth. (F) Stroking rate (fr) and RMS pitching BRs () as a function of depth. In E and F, each symbol represents the RMS value over a stroke (N=14), defined as the period between two consecutive positive zero-crossings in the BR. SA and BR were estimated using the magnetometer method; results for the gyroscope method (not shown) were almost identical. The R2, indicating how well a pitch-only BR fits the observed magnetometer measurements, was 0.90.

Even though magnetometers and gyroscopes provided comparable estimates of BR and SA in the data examined here, there are several advantages and disadvantages with each of these sensors that help guide their use (Table S1). The primary advantage of triaxial gyroscopes over magnetometers is that rotations in all three axes can be estimated, making it possible to track rapid complex motions such as during escapes from predation (Noda et al., 2014) or foraging. For beaked whales, prey capture attempts are indicated by the presence of buzzes in the tag sound recording (Johnson et al., 2004). Blainville's beaked whales perform rapid manoeuvres while attempting to capture prey (Madsen et al., 2014), including rolls and heading changes, well tracked by the gyroscope but less well by the magnetometer method, leading potentially to large errors in the SA estimates (Fig. 3). The mean R2 of the magnetometer method over this interval was 0.5, indicating that a pitch-only BR model is a poor fit and that the magnetometer-derived SA estimates will be inaccurate. Thus, the magnetometer method is most appropriate for caudal-oscillatory aquatic locomotion in which the BR largely occurs around a single axis, e.g. steady swimming of cetaceans, phocid seals and some fish. An additional advantage of gyroscopes is that they measure rotations equally well irrespective of their mean orientation whereas magnetometers measure orientation with respect to the Earth's magnetic field and so cannot detect rotations about an axis parallel to this field vector (Fig. 3; Martín López et al., 2015). For the descent and ascent data analysed here, only ∼0.2% of samples suffered from this unobservability problem. However, this percentage depends both on animal behaviour and on the inclination angle of the magnetic field in the tagging location, and could potentially be a significant limitation in some situations. It is in fact possible to extend the magnetometer method to track two BR angles (e.g. pitch and roll) simultaneously, more closely approximating the behaviour of a gyroscope, but this increases further the range of orientations over which BR is unobservable.

Fig. 3.

Comparison of estimated BRs produced with the magnetometer and gyroscope method during a 50 s interval of complex manoeuvring by a foraging Blainville's beaked whale. (A) Estimated pitch (green), roll (blue) and heading (red), calculated from the low-pass filtered accelerometer and magnetometer vectors. Shaded intervals show when buzz sounds, indicative of prey capture attempts, were audible in the tag sound recording. (B) Triaxial BR estimates over the same interval produced by the gyroscope method: pitch (, green), roll (, black) and yaw (, red). (C) Comparison of pitching BRs estimated by the magnetometer (blue) and gyroscope (green) methods. Note the occasional absence of an estimate from the magnetometer method due to orientations in which the rotation axis was close to the field vector. Roll and yaw BR are not estimated by the magnetometer method. The R2 statistic, indicating how well a pitch-only BR fits the observed magnetometer measurements, was 0.5, indicating that the magnetometer-derived BR and SA are inaccurate for this example.

Fig. 3.

Comparison of estimated BRs produced with the magnetometer and gyroscope method during a 50 s interval of complex manoeuvring by a foraging Blainville's beaked whale. (A) Estimated pitch (green), roll (blue) and heading (red), calculated from the low-pass filtered accelerometer and magnetometer vectors. Shaded intervals show when buzz sounds, indicative of prey capture attempts, were audible in the tag sound recording. (B) Triaxial BR estimates over the same interval produced by the gyroscope method: pitch (, green), roll (, black) and yaw (, red). (C) Comparison of pitching BRs estimated by the magnetometer (blue) and gyroscope (green) methods. Note the occasional absence of an estimate from the magnetometer method due to orientations in which the rotation axis was close to the field vector. Roll and yaw BR are not estimated by the magnetometer method. The R2 statistic, indicating how well a pitch-only BR fits the observed magnetometer measurements, was 0.5, indicating that the magnetometer-derived BR and SA are inaccurate for this example.

A drawback of gyroscopes for small biologging tags is their power consumption, which is 5–10 times greater than that of magnetometers in currently available components. Given that MEMS gyroscopes require a moving element to sense rotation while magnetometers do not, there may be little prospect for this gap to narrow. For MEMS gyroscopes, frame vibrations of 25–30 kHz are typical and coincide with the sensitive hearing range of many odontocetes (Southall et al., 2007), so gyroscope frame vibrations may also be audible to the animal to which the tag is attached. An additional disadvantage of gyroscopes is that their sensitivity can change considerably with temperature at least in the consumer grade devices used in tags, leading to errors in BR and SA if uncorrected. In comparison, the method used to derive BR from the magnetometer is ratiometric and so is insensitive to the gain of the magnetometer or the magnetic field strength (Fig. S1).

The processing methods presented here involve two simplifications compared with algorithms conventionally used with gyroscopes (Noda et al., 2012; Fourati et al., 2011a,b). The first is that low-frequency signals in the sensor data, such as from slow orientation changes and sensor drift, are removed by high-pass filtering. This bypasses the step of estimating orientation and sensor offset, thereby reducing the number of parameters and eliminating the need for a Kalman or complementary filter. The second simplification is the use of Euler angles instead of quaternions to represent BR. Four-parameter quaternions are used to linearise INS algorithms and avoid gimbal-lock at extreme orientations (Jahanchahi and Mandic, 2014). The orientation dynamics in thunniform and sub-carangiform swimming modes are of small amplitude (e.g. <10 deg for tags on cetaceans) and are centred on zero, allowing us to use the more familiar Euler angles, which represent directly the rotations of an animal around its three canonical body axes. More complex processing may be required for swimming modes such as anguilliform, which involve much larger BRs (Sfakiotakis et al., 1999). A drawback of the high-pass filter processing used here is that slowly varying forces such as mean drag, lift and buoyancy cannot be estimated. Instead, we estimate swimming dynamics relative to the mean orientation and force balance of the animal. Because of this, our SA estimates cannot be integrated to predict swimming velocity and position as in a conventional INS, i.e. they cannot be used to track an animal underwater. However, given the inaccuracy and drift (Fourati et al., 2011b; Shiau et al., 2012) of currently available low-power MEMS gyroscopes, it is questionable whether reliable velocity estimates, suitable for track reconstruction, could be obtained with a complete INS algorithm either.

The techniques developed here provide a consistent way to analyse movement dynamics using either magnetometers or gyroscopes, making it possible to compare results obtained with different tags and sensors. The above observations suggest that gyroscopes are best suited for studying complex motions in short-duration tags or when continuous monitoring of locomotion dynamics in all orientations is essential. The lower power consumption of magnetometers and their relative insensitivity to calibration errors suit them to longer-term tags on animals that have largely planar locomotion and where occasional unobservable intervals can be tolerated. In both cases, the ability to separate orientation dynamics in swimming from the resulting SA enables studies of gait adjustment, force production and swimming energetics. In particular, the estimated SA may be a more consistent and physically meaningful proxy for animal-generated forces than the DA used in integrative activity measures such as ODBA (Wilson et al., 2006). Thus, these new sensing methods provide a range of options for studying animal locomotion, opening the way to an improved understanding of how animals overcome and exploit forces to move efficiently.

APPENDIX 1

Sensor calibration

Gyroscope

Two Invensense sensors (IDG500 and ISZ500) were used to construct a three-axis gyroscope. Calibration was performed in each axis in turn using a turntable rotating at 0.5–12 rad s−1. Turn rate was calculated by measuring the period of the resulting cyclical signals in the magnetometer. A linear fit was made between turn rate and the gyroscope output signals to deduce scale factor and offset.

Magnetometer

The magnetometer in the DTAG was a Honeywell HMC1043. As the magnetometer method used here is ratiometric, the absolute sensitivity of the magnetometer is not required. However, each axis needs to have the same sensitivity, requiring calibration of the sensitivity of the y- and z-axes relative to the x-axis. This was achieved using the Blainville's beaked whale dataset and a least-squares procedure to adjust the y- and z-scale factors so that the measured magnetic field vectors lie close to a spherical manifold (Gebre-Egziabher et al., 2006). The magnetometer scale factor is relatively insensitive to temperature when driven with a current source as in the tag used.

Accelerometer

The accelerometer in the DTAG was a Kionix KXSC7-1050. As the gravity field at the Earth's surface is a nearly constant 9.81 m s−2, this sensor was calibrated using a similar least-squares fit of measured vectors to the expected spherical manifold. This was done initially in the laboratory and then with data from the field deployment. Acceleration vectors with high minimum SA (Simon et al., 2012) were rejected iteratively to select samples with low SA for this calibration procedure.

Alignment

Sensor axes were nominally aligned by the construction of the tag with a maximum expected deviation of less than 10 deg between sensors. The alignment of the accelerometer (A) and magnetometer (M) was verified by computing the dot product of the measured vectors from these sensors after calibration and comparing with the local magnetic field inclination angle [ATM should equal gbcos(π/2−i), where g and b are the gravity and magnetic field intensities, respectively, and i is the inclination angle in radians].

Sensitivity, noise floor and power consumption

Following calibration, the full-scale ranges of the sensors were calculated to be ±20 m s−2, ±600 μT and ±9 rad s−1. The root mean square (RMS) noise of the decimated sensor signals in each axis over the 10 Hz analysis bandwidth, measured in a still tag, was 0.007 m s−2, 0.12 μT and 0.0022 rad s−1 for acceleration, magnetic field and angular velocity, respectively. The power consumption of the sensors was 0.85 mW for the accelerometer, 6.7 mW for the magnetometer and 37 mW for the gyroscope.

APPENDIX 2

Gyroscope and magnetometer processing methods

BR estimation using the gyroscope

Estimation of BR using the gyroscope was achieved with the Matlab tool gyro_rot.m (available at http://dx.doi.org/10.17630/9e38ff35-341d-442f-9f04-c63b7a48bc8b).

Neglecting sensor noise and calibration errors, a simplified model for the gyroscope signal while swimming is:
formula
(A 1)
where is the measured angular velocity in rad s−1; Dt is the offset of the gyroscope, i.e. the value read at zero angular velocity; and dΘt/dt is a vector describing the instantaneous orientation of the animal with respect to an arbitrary reference orientation. The instantaneous orientation can be factored into two components: ɸt represents the slowly varying postural changes and Γt represents higher-rate BRs due to propulsion, i.e.:
formula
(A 2)
Assuming that caudal-oscillation only produces orientation dynamics at and above the stroking rate, Γt can be derived from Ωt by integrating and high-pass filtering each axis, i.e.:
formula
(A 3)

where the components of correspond to the BRs around the x-, y- and z-axis, respectively, and H is a high-pass filter chosen to eliminate the low-frequency drift and posture. Here, we use a symmetric FIR high-pass filter with a cut-off frequency of 0.4 times the dominant stroke frequency fr (Martín López et al., 2015).

BR estimation using the magnetometer

Estimation of BR using the magnetometer was achieved with the Matlab tool magnet_rot.m (available at http://dx.doi.org/10.17630/9e38ff35-341d-442f-9f04-c63b7a48bc8b). For a full description, see Martín López et al. (2015).

Neglecting sensor noise and calibration errors, the magnetometer signals are given by:
formula
(A 4)
where Mt=[mxt, myt, mzt]T is the measured magnetometer vector in μT; B is the local magnetic field vector in the navigation frame, i.e. north, east, up; and Qt is a rotation matrix defining the instantaneous orientation of the animal. Factoring Qt into low-frequency (i.e. postural) and high-frequency (i.e. stroking) components, and Rt respectively, we obtain:
formula
(A 5)
Assuming that BR in cetacean stroking can be approximated by a small-angle pitching rotation with time-varying angle ryt, then Rt≈[1 0 sin(ryt); 0 1 0; −sin(ryt) 0 1]. The pitch BR can then be estimated from Mt by first high-pass filtering each axis, i.e.:
formula
(A 6)
where H is the same high-pass filter as used in the gyroscope method. The estimated instantaneous pitch angle can be obtained from Eqn A6 by:
formula
(A 7)

where Wt is the pseudoinverse of , i.e. .

SA estimation

For SA estimation, we used the Matlab tool acc_sa.m (available at http://dx.doi.org/10.17630/9e38ff35-341d-442f-9f04-c63b7a48bc8b). For a full description, see Martín López et al. (2015).

Neglecting sensor noise and calibration errors, a simplified model for the accelerometer signal while swimming is:
formula
(A 8)
where At=[axt, ayt, azt]T is the measured acceleration in m s−2; G is the Earth's gravity vector in the navigation frame; and St is the triaxial SA with respect to the animal's body axes. By factoring the instantaneous orientation Qt into its low- and high-frequency components, we obtain:
formula
(A 9)
By applying the same high-pass filter as used previously, we obtain the so-called dynamic acceleration (DA):
formula
(A 10)
i.e. the sum of BR and SA, where I is the 3×3 identity matrix. If the BRs are relatively small, the orientation component of the DA is approximately given by:
formula
(A 11)

The gyroscope method gives an estimate of all three BR angles and these can be substituted into Eqn A11 to give an estimate of the orientation component of DA. The magnetometer method only gives an estimate of and so the other two angles are set to zero in Eqn A11, i.e.:

Magnetometer method:
formula
(A 12)
Gyroscope method:
formula
(A 13)
In both cases, the DA estimate is substituted into Eqn A10 to estimate the SA:
formula
(A 14)

where the components of in the longitudinal, lateral and dorso-ventral axes are termed surge, sway and heave accelerations, respectively.

We thank P. T. Madsen, A. Schiavi, J. Marrero, E. Morales, K. Gikopoulou, C. Yzoard, C. Auladell, E. Burgos, C. Canut, M. Gaona, B. García, N. García, A. Peña, S. Ravagni and many others for their help in the field in El Hierro. Thanks to R. Swift and F. Alier for building the calibration platform and to K. Shorter for performing the gyroscope calibration. Thanks to D. Russell, I. Paradinas and F. Jensen for statistical and programming advice.

Author contributions

L.M.M.L., M.J. and N.A.d.S. conceived, designed and performed the experiments; M.J. and L.M.M.L. designed the gyroscope method; L.M.M.L. analysed the data; L.M.M.L. and M.J. wrote the manuscript. All authors revised the manuscript prior to submission.

Funding

Work in the Canary Islands was funded by the Office of Naval Research, with additional support from the Cabildo Insular of El Hierro. L.M.M.L. was partly supported by Strategic Environmental Research and Development Program (SERDP) grant RC-2337 and by MASTS (The Marine Alliance for Science and Technology for Scotland, a research pooling initiative funded by the Scottish Funding Council under grant reference HR09011 and contributing institutions). N.A.d.S. was funded by the Office of Naval Research and by the EU Horizon 2020 Marie Sklodowska Curie project ECOSOUND. M.J. was funded by a Marie Sklodowska Curie Career Integration Grant and by MASTS.

Data availability

Matlab software and example data for processing of on-animal gyroscope, magnetometer and accelerometer data are available from http://dx.doi.org/10.17630/9e38ff35-341d-442f-9f04-c63b7a48bc8b.

Aguilar de Soto
,
N.
,
Madsen
,
P. T.
,
Tyack
,
P. L.
,
Arranz
,
P.
,
Marrero
,
J.
,
Fais
,
A.
,
Revelli
,
E.
and
Johnson
,
M. P.
(
2012
).
No shallow talk: cryptic strategy in the vocal communication of Blainville's beaked whales
.
Mar. Mam. Sci.
28
,
E75
-
E92
.
Chatfield
,
A. B.
(
1997
).
Fundamentals of High Accuracy Inertial Navigation
.
Reston, VA
:
American Institute of Aeronautics and Astronautic
.
Delporte
,
B.
,
Perroton
,
L.
,
Grandpierre
,
T.
and
Trichet
,
J.
(
2012
).
Accelerometer and magnetometer based gyroscope emulation on smart sensor for a virtual reality application
.
J. Sens. Transd.
14
,
32
-
47
.
Fish
,
F. E.
,
Peacock
,
J. E.
and
Rohr
,
J. J.
(
2003
).
Stabilization mechanism in swimming odontocete cetaceans by phased movements
.
Mar. Mam. Sci.
19
,
515
-
528
.
Fourati
,
H.
,
Manamanni
,
N.
,
Afilal
,
L.
and
Handrich
,
Y.
(
2009
).
Sensors-based data fusion solution design for 3D motion estimation with application in Bio-logging
.
Int. J. Sci. Tech. Automat. Contr. Comp. Eng.
3
,
1012
-
1031
.
Fourati
,
H.
,
Manamanni
,
N.
,
Afilal
,
L.
and
Handrich
,
Y.
(
2011a
).
A nonlinear filtering approach for the attitude and dynamic body acceleration estimation based on inertial and magnetic sensors: bio-logging application
.
J. IEEE Sens.
11
,
233
-
244
.
Fourati
,
H.
,
Manamanni
,
N.
,
Afilal
,
L.
and
Handrich
,
Y.
(
2011b
).
Posture and body acceleration tracking by inertial and magnetic sensing: application in behavioral analysis of free-ranging animals
.
Biomed. Signal Proces.
6
,
94
-
104
.
Gebre-Egziabher
,
D.
,
Elkaim
,
G. H.
,
David Powell
,
J.
and
Parkinson
,
B. W.
(
2006
).
Calibration of strap-down magnetometers in magnetic field domain
.
J. Aerosp. Eng.
19
,
87
-
102
.
Gleiss
,
A. C.
,
Wilson
,
R. P.
and
Shepard
,
E. L. C.
(
2011
).
Making overall dynamic body acceleration work: on the theory of acceleration as a proxy for energy expenditure
.
Methods Ecol. Evol.
2
,
23
-
33
.
Jahanchahi
,
C.
and
Mandic
,
D. P.
(
2014
).
A class of quaternion Kalman filters
.
IEEE Trans. Neural Networks Learn. Syst.
25
,
533
-
544
.
Johnson
,
M. P.
and
Tyack
,
P. L.
(
2003
).
A digital acoustic recording tag for measuring the response of wild marine mammals to sound
.
J. Ocean. Eng.
28
,
3
-
12
.
Johnson
,
M.
,
Madsen
,
P. T.
,
Zimmer
,
W. M. X.
,
Aguilar de Soto
,
N.
and
Tyack
,
P. L.
(
2004
).
Beaked whales echolocate on prey
.
Proc. R. Soc. London. B Biol. Sci.
271
,
S383
-
S386
.
Johnson
,
M.
,
Aguilar de Soto
,
N.
and
Madsen
,
P. T.
(
2009
).
Studying the behaviour and sensory ecology of marine mammals using acoustic recording tags: a review
.
Mar. Ecol. Prog. Ser.
395
,
55
-
73
.
Lin
,
L. I.-K.
(
1989
).
A concordance correlation coefficient to evaluate reproducibility
.
Biometrics
.
45
,
255
-
268
.
Lin
,
L. I.-K.
(
2000
).
A note on the concordance correlation coefficient
.
Biometrics
56
,
324
-
325
.
Luinge
,
H. J.
and
Veltink
,
P. H.
(
2005
).
Measuring orientation of human body segments using miniature gyroscopes and accelerometers
.
Med. Biol. Eng. Comput.
43
,
273
-
282
.
Madsen
,
P. T.
,
Aguilar de Soto
,
N.
,
Tyack
,
P. L.
and
Johnson
,
M.
(
2014
).
Beaked whales
.
Curr. Biol.
24
,
R728
-
R730
.
Martín López
,
L. M.
,
Miller
,
P. J. O.
,
Aguilar de Soto
,
N.
and
Johnson
,
M.
(
2015
).
Gait switches in deep-diving beaked whales: biomechanical strategies for long-duration dives
.
J. Exp. Biol.
218
,
1325
-
1338
.
Miller
,
P. J. O.
,
Johnson
,
M. P.
,
Tyack
,
P. L.
and
Terray
,
E. A.
(
2004
).
Swimming gaits, passive drag and buoyancy of diving sperm whales Physeter macrocephalus
.
J. Exp. Biol.
207
,
1953
-
1967
.
Noda
,
T.
,
Okuyama
,
J.
,
Koizumi
,
T.
,
Arai
,
N.
and
Kobayashi
,
M.
(
2012
).
Monitoring attitude and dynamic acceleration of free-moving aquatic animals using a gyroscope
.
Aquat. Biol.
16
,
265
-
276
.
Noda
,
T.
,
Kawabata
,
Y.
,
Arai
,
N.
,
Mitamura
,
H.
and
Watanabe
,
S.
(
2014
).
Animal-mounted gyroscope/accelerometer/magnetometer: in situ measurement of the movement performance of fast-start behaviour in fish
.
J. Exp. Mar. Biol. Ecol.
451
,
55
-
68
.
Sato
,
K.
,
Naito
,
Y.
,
Kato
,
A.
,
Niizuma
,
Y.
,
Watanuki
,
Y.
,
Charrassin
,
J. B.
,
Bost
,
C.-A.
,
Handrich
,
Y.
and
Le Maho
,
Y.
(
2002
).
Buoyancy and maximal diving depth in penguins: do they control inhaling air volume?
J. Exp. Biol.
205
,
1189
-
1197
.
Sato
,
K.
,
Mitani
,
Y.
,
Cameron
,
M. F.
,
Sniff
,
D. B.
and
Naito
,
Y.
(
2003
).
Factors affecting stroking patterns and body angle in diving Weddell seals under natural conditions
.
J. Exp. Biol.
206
,
1461
-
1470
.
Sato
,
K.
,
Watanuki
,
Y.
,
Takahashi
,
A.
,
Miller
,
P. J. O.
,
Tanaka
,
H.
,
Kawabe
,
R.
,
Ponganis
,
P. J.
,
Handrich
,
Y.
,
Akamatsu
,
T.
,
Watanabe
,
Y.
, et al. 
(
2007
).
Stroke frequency, but not swimming speed, is related to body size in free-ranging seabirds, pinnipeds and cetaceans
.
Proc. R. Soc. Lond. B Biol. Sci.
274
,
471
-
477
.
Sato
,
K.
,
Shiomi
,
K.
,
Marshall
,
G. J.
,
Kooyman
,
G. L.
and
Ponganis
,
P. J.
(
2011
).
Stroke rates and diving air volumes of emperor penguins: implications for dive performance
.
J. Exp. Biol.
214
,
2854
-
2863
.
Sfakiotakis
,
M.
,
Lane
,
D. M.
and
Davies
,
J. B. C.
(
1999
).
Review of fish swimming modes for aquatic locomotion
.
IEEE J. Ocean. Eng.
24
,
237
-
252
.
Shiau
,
J.
,
Huang
,
C.
and
Chang
,
M.
(
2012
).
Noise characteristics of MEMS gyro’ s null drift and temperature compensation
.
J. Appl. Sci. Eng.
15
,
239
-
246
.
Simon
,
M.
,
Johnson
,
M. P.
and
Madsen
,
P. T.
(
2012
).
Keeping momentum with a mouthful of water: behavior and kinematics of humpback whale lunge feeding
.
J. Exp. Biol.
215
,
3786
-
3798
.
Southall
,
B. L.
,
Bowles
,
A. E.
,
Ellison
,
W. T.
,
Finneran
,
J. J.
,
Gentry
,
R. L.
,
Greene
,
C. R.
,
Kastak
,
D. R.
,
Ketten
,
D. R.
,
Miller
,
J. H.
,
Nachtigall
,
P. E.
, et al. 
(
2007
).
Marine mammal noise exposure criteria: initial scientific recommendations
.
Aquat. Mam.
33
,
411
-
414
.
Tyack
,
P. L.
,
Johnson
,
M.
,
Aguilar de Soto
,
N.
,
Sturlese
,
A.
and
Madsen
,
P. T.
(
2006
).
Extreme diving of beaked whales
.
J. Exp. Biol.
209
,
4238
-
4253
.
Wilson
,
R. P.
,
White
,
C. R.
,
Quintana
,
F.
,
Halsey
,
L. G.
,
Liebsch
,
N.
,
Martin
,
G. R.
and
Butler
,
P. J.
(
2006
).
Moving towards acceleration for estimates of activity-specific metabolic rate in free-living animals: the case of the cormorant
.
J. Anim. Ecol.
75
,
1081
-
1090
.

Competing interests

The authors declare no competing or financial interests.

Supplementary information