Behaviour, temperature and terrain slope impact estimates of energy expenditure using oxygen and dynamic body acceleration

The energy used by animals is influenced by intrinsic (e.g. physiological) and extrinsic (e.g. environmental) factors. Accelerometers within biologging devices have proven useful for assessing energy expenditures and their behavioural context in free-ranging animals. However, certain assumptions are frequently made when acceleration is used as a proxy for energy expenditure, with factors, such as environmental variation (e.g. ambient temperature or slope of terrain), seldom accounted for. To determine the possible interactions between behaviour, energy expenditure and the environment (ambient temperature and terrain slope), the rate of oxygen consumption (V˙O2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{\text{V}}\text{O}}_{2}$$\end{document}) was measured in pygmy goats (Capra hircus aegarus) using open-flow indirect calorimetry. The effect of temperature (9.7–31.5 °C) on resting energy expenditure was measured. The relationship between V˙O2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{\text{V}}\text{O}}_{2}$$\end{document} and dynamic body acceleration (DBA) was measured at different walking speeds (0.8–3.0 km h−1) and on different inclines (0, + 15°, − 15°). The daily behaviour of individuals was measured in two enclosures: enclosure A (level terrain during summer) and enclosure B (sloped terrain during winter) and per diem energy expenditures of behaviours estimated using behaviour, DBA, temperature, terrain slope and V˙O2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{\text{V}}\text{O}}_{2}$$\end{document}. During rest, energy expenditure increased below 22 °C and above 30.5 °C. V˙O2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\dot{\text{V}}\text{O}}_{2}$$\end{document} (ml min−1) increased with DBA when walking on the level. Walking uphill (+ 15°) increased energetic costs three-fold, whereas walking downhill (− 15°) increased energetic costs by one third. Based on these results, although activity levels were higher in animals in enclosure A during summer, energy expenditure was found to be significantly higher in the sloped enclosure B in winter (means of enclosures A and B: 485.3 ± 103.6 kJ day−1 and 744.5 ± 132.4 kJ day−1). We show that it is essential to account for extrinsic factors when calculating animal energy budgets. Our estimates of the impacts of extrinsic factors should be applicable to other free ranging ungulates.


Introduction
At the core of understanding an animal's survival and reproductive fitness is calculating the energetic costs of the ecological processes involved [1,2]. Variation in energy expenditure associated with the extents and intensities of different behaviours impact the fitness and survival of individuals. Part of this relates to efficient foraging [3][4][5]. Multiple intrinsic (i.e. physiological, such as body mass) and extrinsic (e.g. environmental, such as temperature and terrain) factors influence behaviour and therefore, energy expenditure [6][7][8]. Extrinsic factors are variable, and may be exacerbated by climate change [9], which in turn will bring about changes in behaviour, movement, and associated energy expenditure [10,11]. Indeed, it is becoming increasingly clear to what extent environmental variation per se affects animal power-use

Open Access
Animal Biotelemetry *Correspondence: dickinson.er@gmail.com 1 School of Biological Sciences, Queen's University Belfast, 19 Chlorine Gardens, Belfast BT9 5DL, Northern Ireland Full list of author information is available at the end of the article and this is immensely important in understanding the consequences of this variation in a changing world [12][13][14]. A rigorous examination of the methods used to determine energy expenditure within this context is necessary for future work.
Extrinsic factors that influence metabolic rate in animals are associated with variation in environmental conditions, such as ambient temperature (T a ) that changes with latitude, season, elevation as well as the time of day [1,15,16]. The majority of mammals are homeotherms and as a consequence must invest energy into maintaining core body temperature (T b ) when the T a is on either side of the thermoneutral zone [8,17]. Mammals occurring in seasonal environments may need to invest excess energy into thermoregulation [10,18], or they may evolve physiological, morphological or behavioural traits to moderate the energetic costs of thermoregulation [16,19,20].
Movement is a fundamental part of the ecology of many animals and it necessitates travel through a heterogenous landscape which determines the energetic costs of movement according to the physical characteristics of the 'energy landscape' [21,22]. Specifically, the physical characteristics of the environment, such as aspect, the substrate (e.g. rock vs sand) and the 'superstrate' (e.g. grass or snow), affect the energy cost of locomotion [22][23][24]. Generally, the cost of transport increases when animals travel on sloped terrain; however, the amplitude of this effect varies both within and between species [25]. Energy expenditure during locomotion is also be influenced by limb length [26], gait (i.e. walking, running) [27], and travel speed [28]. Energy expended in locomotion, for resource acquisition or other reasons (e.g. reproduction), contributes to a large proportion of an animal's energy requirements or daily energy expenditure (DEE) [29,30]. For example, locomotion in North American pumas (Puma concolor) was estimated to contribute 14% of the DEE (MJ day −1 ) despite individuals being active for only 4.7% of the time [13].
Tri-axial accelerometers in animal-attached tags have been deployed extensively on individuals to measure behaviour and movement [31][32][33], and can be used to determine the relative cost of energy expended during activity [5,34,35]. Specifically, measures of acceleration such as 'overall dynamic body acceleration' (ODBA) or 'vectorial dynamic body acceleration' (VeDBA), generally referred to as DBA [5,36], have been corroborated with simultaneous measurements of the rate of oxygen consumption ( V O 2 ) using indirect calorimetry [35,37] or the doubly labelled water technique [38,39]. The particular utility is that calibrations of energy expenditure, for example, from measured V O 2 against DBA, allows for an estimate of a free-roaming animal's behaviour-specific power (J s −1 ) and DEE (kJ day −1 ) (e.g. [13,40]), and furthermore, how these tie in with variations in the environment.
In this study, we aimed to describe the interaction between temperature and terrain slope using a caprid (the African pygmy goat, Capra hircus aegarus) as a model species, by simultaneous measurements of V O 2 using indirect calorimetry and body movement with triaxial accelerometers. We aimed to examine how behaviour and energy expenditure measured using biologging tools (tri-axial accelerometers) are predicted to vary in free-ranging individuals depending on the aspect of their environment (i.e., T a and terrain slope). Pygmy goats are small ruminants (mean ± SD = 25.9 ± 6.3 kg) able to adapt to a range of climates and can endure particularly arid conditions [41,42]. We suggest that, since this species can be exposed to a range of conditions in a captive setting, it would be a good model to use to relate to other wild caprids of conservation or management concern, including bezoar goats (Capra aegagrus), Alpine ibex (Capra ibex) and Siberian ibex (Capra sibirica).
The aims of the study were to: (1) measure the resting energy expenditure (REE) of individuals at different temperatures (9.7 to 31.5 °C); (2) measure the relationship between DBA and VȮ 2 when individuals are resting and walking at different speeds (0.8-3.0 km/h; increments of 0.1 km h −1 at temperatures between 11 and 28 °C) and to test how this relationship varies with terrain slope (level = 0, positive = + 15°, negative = − 15°); (3) classify behaviours from accelerometry data; (4) and using the measured energy expenditure and daily tri-axial acceleration data to estimate the daily behaviour and DEE of individuals allowed to roam freely in two different enclosures; enclosure A (level terrain) during summer and enclosure B (sloped terrain) during winter. For logistical reasons it was not possible to study the goats in both enclosures during multiple seasons. General linear models (GLM) or generalized linear mixed effects models (GLMM) were used to test the relationship and models were ranked using An Akaike's Information Criterion (AIC). Behaviour was classified using random forest models. Outcomes from these models were then used to estimate daily behaviour and DEE from daily acceleration data, which was then compared between the two enclosures.

Resting energy expenditure
The mean (± SD) V O 2 at rest or REE, measured when goats were standing on the treadmill (n = 7), was 69.38 (± 23.02) ml min −1 . Measured V O 2 at rest (ml min −1 ) significantly increased with individual body mass (Table 1). Body mass and age were highly correlated (Pearson's r = 7.58, p < 0.001). There was a significant effect of temperature on measured V O 2 tested using a quadratic function (values derived from predicted values; Fig. 1a; Table 1). V O 2 at rest was highest at the lowest temperature (97.13 ± 18.36 ml min −1 at 9.72 °C) and decreased with increasing temperature. Between 22 and 30 °C, V O 2 at rest did not change with temperature but increased by 0.03 ml min −1 from 30.5 °C (the upper critical limit) to the maximum recorded temperature, 31.5 °C. V O 2 at rest did not change with humidity (F 7,8 = 0.13, p = 0.069).
During measurements, food was provided to individuals while standing in the chamber; therefore, some movement was expected during measurements. V O 2 at rest increased with body movement (DBA) measured by triaxial accelerometers (Table 1; Fig. 1b).

Walking on level, positive and negative slopes of terrain
The relationship between V O 2 and DBA was measured on the level (0°, n = 4), and a positive slope (+ 15°, n = 3) and negative slope (− 15°, n = 3) while walking at different speeds on a treadmill (Additional file 2). When walking on the level g-specific V O 2 (i.e. V O 2 at a specific acceleration value) was 76.4 ± 14.05 ml min −1 at 0.093g DBA. As DBA increased, V O 2 increased by 6.42 ± 8.70 ml min −1 per 0.01g acceleration ( Table 1; Fig. 2a). The relationship between DBA and VȮ 2 was significantly affected by slope (Table 1; Fig. 2a). When waking on a positive slope g-specific V O 2 was higher (183.4 ± 17.85 ml min −1 at 0.14g) and the relationship between V O 2 and DBA was steeper; V O 2 increased by 17.93 ± 17.04 ml min −1 per 0.01g acceleration. On a negative slope, by contrast, V O 2 was also higher than on the level terrain when considered as g-specific VȮ 2 (110.8 ± 18.98 ml min −1 at 0.14g acceleration) but the relationship between V O 2 and DBA did not differ significantly (5.71 ± 15.85 ml min −1 per 0.01g acceleration; Fig. 2a). DBA increased linearly with speed (Pearson's r = 0.904, p < 0.0001) while goats were walking on the treadmill at different speeds and slopes (Fig. 2b). Walking measurements obtained over a range of temperatures (11.7-27.8 °C) which was accounted for in the model.

Behavioural classification
To classify behaviour, random forest models were built for data collected in each enclosure using a subset of data with behavioural observations (Additional file 1). Classification accuracy to identify five behaviours in enclosure A (level) was 93.2% and to identify five behaviours including the slope of terrain in enclosure B (sloped) for two locomotion behaviours was 80.4% (for further information see Additional file 2).

Estimated daily behaviour and energy expenditure of animals in outdoor enclosures
Overall, standing accounted for the largest proportion of time (0.45 ± 0.30), followed by resting (0.38 ± 0.34) and eating (0.21 ± 0.17; Table 2). Locomotory behaviours made up the least amount of time (walking = 0.019 ± 0.03, running = 0.0011 ± 0.002). A total of 867 s were marked as unknown behaviour, which accounted for 0.028% of total time. Using predictions from measured V O 2 , energy expenditure for each behaviour was estimated using models shown in Table 3 (Table 2; Fig. 3; Additional file 1).

Fig. 2 a
Predicted relationship between V O 2 (ml min −1 ) and DBA (g) while pygmy goats were walking on a treadmill at three different slopes; level (0°), negative slope (-15°), and positive slope (+ 15°). The shaded area shows the 95% confidence interval. b The correlation between DBA (g) and walking speed (km s −1 ), while goats are walking on a treadmill at different speeds and different slopes Table 2 Description of the energetic costs for each behaviour, the acceleration range observed for each behaviour and the line equations used to calculate the energetic costs of each behaviour T a = Ambient temperature, A = DBA, W = body weight, α j = terrain slope (α l = level, α p = positive, α n = negative), γ i = terrain slope*DBA (γ l = level, γ p = positive, γ n = negative).

Behaviour Description of energetic cost Acceleration range (g) Equation
StandingV O 2 at rest measured in this study at different temperatures and accounting for DBA

Running
The additional cost of this gait was estimated as 2. The proportion of time spent active (eating, walking or running) was higher in the level enclosure during summer (enclosure A) than the sloped enclosure during winter (enclosure B) and was not explained by mean daily temperature (Table 3; Fig. 4a). There was no interaction between enclosure and temperature. Mean estimated daily energy expenditure was 620.3 ± 119 kJ day −1 . Daily energy expenditure was higher in the sloped terrain during winter than the level enclosure during summer and with lower mean daily temperatures (Table 3; Fig. 4b).
The effect of temperature was stronger than the effect of enclosure, which relates to the slope of enclosure B. Temperature and daily energy expenditure were not correlated (Pearson's r = 1.02, p = 0.31).

Discussion
Biologging devices are frequently used to quantify behaviour and estimate the energy expenditure of free-roaming animals [5,32,33,43]). In fact, the real importance of these devices is that they seemingly have the potential Table 3 Top model set explaining the (a) proportion of time spent active and (b) daily energy expenditure, with all models within ΔAIC c = 6 and lower than all simpler nested models The degrees of freedom for each model (df), amount of variation explained (R 2 ), AICc and Akaike model weights are shown for each model

Model
Variables to examine the intimate details of animal lives remotely (e.g. [34,44]), including measurements of aspects of the environment that the individuals experience [22]. It is therefore useful to think of these devices as an approach that allows easy access to the relationship between activity and power use. However, given the inherent complexities of measuring energy expenditure [5,7], quantifying behaviour [45,46] and the interactions between these and the environment, including the role of power in incline movement [25], superstrate [22]and thermal substitution [47], investigating and controlling for limitations in the method is clearly essential.
Although the use of acceleration as a proxy for energy expenditure has been shown to be a valuable tool after an association between DBA and energy expenditure was found in cormorants [43], our study indicated that energy expenditure in these pygmy goats was higher in the sloped terrain during the winter (enclosure B), than on the level terrain during the summer months (enclosure A), despite animals having higher activity in A. This could be explained both by the topography of the enclosures, because enclosure B was sloped, and the temperatures, which were lower in enclosure B. A dramatic illustration is the way in which g-specific energy expenditure varied in our studies with slope ( Fig. 2) which suggests that when using DBA metrics to estimate power, aspect and gradient of the substrate must at least be included.
The response of the pygmy goats to temperature (Fig. 1a) is typical of that found in mammals [8] and broadly reflect the characteristic U-shape of the power versus temperature curve displaying the thermo-neutral zone at its lowest point [17]. In short, the increase in energy expenditure at colder temperatures was explained by the energy cost of thermoregulation [48,49], which requires individuals to spend more energy to maintain their core body temperature to cope with the increasing rate of heat loss to the environment. Energy expenditure also increases with higher temperatures [50,51] as was observed (Fig. 1a), since animals must engage in energy demanding processes to lose heat when the rate of heat transfer between themselves and the environment is inadequate to maintain body temperature. Pygmy goats were domesticated in Africa where temperatures are generally higher than in this study and are able to tolerate high temperatures [41]. In our study, an increase in energy expenditure was observed at the warmest temperatures measured. Thus, data from this study supports a "thermo-neutral zone" between about 22 and 30.5 °C. This is in agreement with a previously measured upper critical temperature measured by Luiting et al., [52], but is higher than the lower critical temperature of 9 °C found for feral goats [8], although reasons for this are unclear. Acclimation may play a role in observed TNZ, where the TNZ is dependant on the conditions experienced by individuals prior to measurement [53].
The relationship between V O 2 and temperature that we measured for animals at rest (while standing) would, under normal conditions, also be affected by activity, with higher activity, for example, displacing the characteristic power versus temperature curve to the left. This is because muscular activity generates considerable heat [54] and this can mitigate what would otherwise have to be paid for by inactive thermogenesis [55]. This thermal substitution has been recognised as important in diving animals (e.g. [47]) and obviously complicates estimates of energy expenditure of wild animals and in turn would apply to the pygmy goats in this study that were predominantly in the outside enclosures. The details of how the process would affect our overall estimates of energy expenditure in the two environments are problematic to assess. The best approach would have been to adopt experimental protocols with varying temperatures and varying degrees of activity to see how exercise-mediated V O 2 affects the power versus temperature curve.
The increase in energy expenditure calculated for pygmy goats in enclosure B can also be attributed to the sloped terrain, which increases the energetic costs of locomotion for animals both ascending and descending the slopes compared to goats on the level terrain (Fig. 2a). Indeed, as temperature was accounted for (but see thermal substitution above), the main difference between the two enclosures was the presence of a slope in enclosure B as well as a seasonal effect. Energy expenditure during locomotion in caprids has been measured in a few studies (e.g. [24]). However, the relationship with DBA has not previously been quantified, which has the advantage in being able to enable estimates of energy expenditure for free-moving individuals [37]. As with other studies [13], our work using pygmy goats on a treadmill indicated the extent to which energy expenditure was higher on a positive slope, than on level substrate (Fig. 2a, Table 3). On a downhill slope, the energetic cost was marginally higher, in accordance with Dailey and Hobbs [23], who found energy on downhill slopes overlapped with measurements on level aspects, but contradicts Lachica et al. [24], who found lower power use for animals moving down slopes. Power use on a descending slope is more complex than for that of an ascending slope: When animals move uphill, they have to provide energy to overcome gravity manifest in potential energy change (given by PE = mgh, where m is the mass, g is the gravitational constant and h is the height increment), so the rate at which energy must be provided depends directly on the speed and the extent of the incline (cf. Fig. 2). However, the power use for descending a slope should theoretically initially decrease at shallow slopes as the cost of locomotion is initially partially subsidized by the gain in energy from the realised potential energy, followed by an increase in power as the animal works to brake descent at steeper slopes [25,56]. This phenomenon is clear when descent slope is varied by small increments (e.g. Fancy and White [57]) but is obviously complicated when slope increments are large, as in our case and other animal studies [25]. Overall, it is clear that there are varying relationships between cost of transport and slope of terrain across species [25], presumably as a consequence of the specifics of the animal morphologies [58].
Terrain type affects behaviour and energy expenditure beyond just slope because, for example, whether the environment underfoot is more or less compliant changes the costs of locomotion [23,59] (also demonstrated in humans cf. [60]). We were not able to correct for the effects of substrate compliancy in our two enclosures, which were tarmac and grass, but we note that Bidder et al. [59] measured an increase in V O 2 of 9.1% on tarmac and 17.7% on grass, compared to exercise on a treadmill in humans. This suggests estimates of energy expenditure using the treadmill might underestimate the true energy expenditure although this likely also depends on the precise elasticity of the treadmill substrate. For these reasons, we appreciate that our own estimates of energy expenditure of the freely roaming goats are unlikely to be particularly accurate but they are, we believe, a step towards a more refined approach and will help as part of the overall framework attempting to determine power use by animals operating in different energy landscapes [22].
Finally, activity levels, measured by the proportion of time predicted in active behaviours compared to inactivity, were higher in the first enclosure (A). Although activity levels may vary seasonally due to temperature [16,61], temperature did not explain the proportion of time active observed in this study. It was accounted for by the enclosure, which may be linked to a seasonal shift in environmental conditions, as enclosure A was measured in summer, and enclosure B in winter. The energetic costs of thermoregulation may be moderated in colder temperatures due to heat produced through activity. The individuals in this study may not respond in the same way as free-living mammals, because our study animals had access to shelters which they could utilise resulting in lower energetic costs to thermoregulation. Ungulates living in seasonal environments may reduce their T b to reduce the energetic costs of thermoregulation [16,61], which is important to consider when estimating energetic costs of free-living animals. Although temperature was measured on the animal-attached devices, other environmental conditions that affect thermoregulation, such as wind speed and precipitation, were not taken into consideration.

Conclusions
In this study, the rate of oxygen consumption was measured using indirect calorimetry and enabled the prediction of energy expenditure using biologging data that included tri-axial acceleration and temperature. Although measures of tri-axial acceleration have been shown to be a useful proxy for energy expenditure in free-ranging animals, acceleration alone cannot account for environmental variation. Furthermore, additional information required for making predictions about behaviour, energy expenditure and an animals' substrate and aspect in an animals' environment will improve what can be interpreted from biologging data. Measuring behaviour and energy expenditure can improve understanding of how species will survive in a changing environment, and provide calibration for estimates of energy expenditure. Future research should account for different elevations in terrain, including variation in substrate and as well as slope or aspect such as would be encountered in species' natural habitat (e.g. species that climb rocks such as ibex).

Study subjects
Nine female African pygmy goats (Capra hircus aegagrus) housed at Belfast Zoo were used in this study (Table 4). Individuals were aged between 3 and 10 years old and weighed between 13 and 32 kg (mean ± SD = 25.9 ± 6.3 kg). They were housed in their normal enclosure comprising a farm building with a level concrete yard and areas of wood mulch (area = 163 m 2 , 16.6 × 7.3 m) (enclosure A). Experiments took place in an adjacent pen within the same building during the spring (April to July) and summer (March to June) of 2018 and 2019 to enable measurement of a range of temperatures (T a ranged from 9.7 to 31.6 °C).
Daily behaviour was measured using animal-attached tags (biologgers) in both enclosure A in May 2018 and a second enclosure (B) in November 2017. For logistical reasons, it proved impossible to standardize protocols so that animals were studied in both enclosures during one season. Enclosure B comprised a sloping grass paddock (slope = 18%, area = 2210 m 2 , 50.1 × 35.3 m) surrounded by hedges, with a small heated building adjacent. Sampling in each enclosure was opportunistic as a result of husbandry, and therefore, both seasons could not be measured in each enclosure. It was assumed that seasonal variation in metabolic rate was accounted for in respirometry measurement because they were conducted over multiple seasons.

Accelerometry data collection
Individuals were equipped with a collar-mounted 'Daily diary' tag [44] which incorporated a tri-axial accelerometer which recorded at a frequency of 40 Hz. Tags also measured magnetic compass heading via a tri-axial . Devices were attached to the collar on the ventral side using Tesa tape and an additional weight (metal nuts; 15 g) attached to ensure the device remained in position ventrally. Collar-mounted devices weighed between 135 and 235 g depending on the collar size (< 1% of body mass) and were fitted to be within + 3 cm of neck circumference ensuring accurate measurement of body acceleration [62]. Devices were oriented so that the y-axis corresponded to 'heave' (dorso-ventral motion), x-axis to 'sway' (lateral motion) and z-axis to 'surge' (anterioposterior motion). Before deployment, each device was calibrated for the exact time, direction of the axis, accelerometer and magnetometer offsets.

Measuring the rate of oxygen consumption: indirect calorimetry setup
An open-circuit indirect calorimetry system was used to measure V O 2 , a measure of energy expenditure with the assumption of no anaerobic respiration [37]. A treadmill intended to exercise dogs (Professional Fit Fur Life Treadmill, Surrey, UK; dimension 180 × 55 cm), with a respirometry chamber built on top made of polycarbonate sheet connected with aluminium panels was used (Fig. 5). The chamber size was adjustable: For pygmy goat measurements, a chamber volume of 440 L was used (80 cm high by 55 cm wide by 100 cm long). Eight fans were spaced across one side of the chamber to ensure complete mixing of air within the chamber. The setup was tested for leaks using nitrogen leak tests [63].
Fresh air, from outside the building, was pushed through the system using an air pump (Wob-L Piston Series 2660, Rietschle Thomas Sheboygan Inc., Wisconsin, USA) at a range of flow rates (20-150 L/min) because the rate that oxygen declines in the chamber depends on the size and activity state of the subject [64]. Flow rate was measured using a variable area flowmeter (Platon NGX Glass Variable Area Flowmeter, Platon, Saint Etienne, France) before entering the chamber. Inflow temperature was controlled and measured using a temperature control unit (Sable Systems, Las Vegas, USA), prior to measuring the flow rate, to ensure a consistent temperature within the chamber and to prevent chamber temperature increasing due to heat from the air pump. A subsample of air was drawn from the chamber at a rate of 350 ml min −1 , passed through a drying column (Drierite, DRIERITE, Ohio, USA) to remove water vapour  (2) was used which had a built-in flow meter (not shown; Flowkit, Sable Systems, Las Vegas, USA). Temperature, barometric pressure and humidity were also measured within the chamber from the air being sampled, and analysed to determine the relative proportion of oxygen and carbon dioxide (FoxBox Respirometry System, Sable Systems, Las Vegas, USA). Flow into the drying column and analyser could be diverted so that it was sourced from fresh air (i.e. from outside), to baseline the measured relative concentration of oxygen. For each measurement, the entire system was turned on and allowed to equilibrate for 1 h. Relative oxygen concentration of the chamber gas was monitored until the analyser drift was deemed negligible (< 0.001% O 2 per min; [65]). Data were recorded every 10 s using the FoxBox internal memory and downloaded to a PC after the measurement. Temperature within the chamber was dependant on T a and was measured at three points throughout the chamber and once outside the chamber (DTM-307B Dual digital thermometer, TECPEL, Taiwan and TP60S Wireless Thermometer Hygrometer, Therm-Pro, Toronto, Canada). Humidity and pressure were measured once within the chamber (Digital altimeter, Geo-master, Tianjin, China). The fraction of carbon dioxide in excurrent gas was monitored to ensure the drying agent, Drierite, was not exhausted. The drying agent was replaced with recharged agent prior to exhaustion.
Analyser drift was assumed to be linear over time and was accounted for by calculating the percentage drift, which is the change in incurrent %O 2 (F i O 2 ) from the start to the end. The percentage drift per minute was then added to %O 2 (rawF e O 2 ). To calculate the %O 2 corrected for drift (F e O 2 ), the following equation was used (see [64]); VO 2 was calculated by the rate of air flow (L/min) into the chamber (FR i ) by the difference in the incurrent %O 2 (F i O 2 ) and drift corrected excurrent %O 2 (F e O 2 ) in the chamber. Flow was corrected to standard temperature and pressure using;

Indirect calorimetry measurements
For resting measurements (n = 103, see Table 4), each individual was trained to stand within a respirometry chamber for ~ 50 min following the provision of hay within the chamber. For walking measurements (n = 88, see Table 4), four individuals were trained to walk on the treadmill within the chamber at different speeds (0.8-3.0 km/h) and angle of slope (− 15°, 0°, + 15°) for up to 30 min (Table 4; Additional file 3). All training was conducted using positive reinforcement training (1) techniques [66] over a period of 2 months, and individuals were motivated using positive reinforcement (with a portion of their daily food) during measurements. Initially, individuals were trained to stand in the chamber. Then, they were trained to walk on the treadmill with the chamber door open, by gradually starting the treadmill for short periods. These periods were gradually increased until they walked for the desired period. The chamber door was closed when individuals were confident walking on the treadmill. Subjects were given ample time, between 5 and 30 min, prior to measurements to ensure they were calm. If any sign of stress was exhibited, such as restlessness, vocalisation, or shaking, before or during a measurement, the measurement was abandoned. Individuals were weighed before and after each measurement using an animal weighing scale (Adam Equipment, Milton Keynes, UK). For each measurement, the system was turned on and allowed to equilibrate for one hour, during which oxygen concentration within the chamber was monitored until analyser drift was deemed negligible (see above). For resting measurements, subjects were placed in the chamber, and typically the system would take ~ 20 min to reach a steady state. A measurement was taken for 10 min after this steady state was reached and gas conditions were stable. After 10 min, the analyser reading was set to the ambient concentration of 20.95% O 2 by drawing fresh outside air into the chamber for ~ 5 min and then returned to sampling chamber air, to compensate for analyser drift [64]. The system typically took 30 min to return to steady state with the animal inside the chamber, and a second measurement was taken for 10 min. The animal was removed, and the measurement finished when a steady state was reached with an empty chamber.
For measurements taken whilst subjects were walking, the system would take ~ 12 min to reach steady state chamber oxygen concentration. Animals are assumed to be in a physiological steady state after 3 min of exercise [37,67]. A measurement was taken for 10 min at steady state, before the animal was allowed to stop and leave the chamber. Chamber air was continually measured and the system typically took 30 min to return to steady state. The animal walked at speeds between 0.8 and 3.0 km h −1 changing at 0.1 km h −1 increments on the level (level 0°) and at different slopes (positive 15° and negative − 15°) dependant on their ability.

Acceleration measurement
For each indirect calorimetry measurement, individuals were equipped with a collar-mounted 'Daily Diary' tags as described above. Static acceleration (see Additional file 1) was calculated as a measure of body acceleration, using the running mean of raw acceleration over 2 s, and subtracted from the raw acceleration to give dynamic acceleration. The vectorial sum of the dynamic acceleration for the three axes was calculated giving VeDBA (hereafter referred to as DBA [5,68]): Additionally, each individual was equipped with a collar-attached tag, as described above, for a mean of 4.7 days (SD = ± 1.1 days) in enclosure A and 5.6 days (SD = ± 3.4 days) in enclosure B. Daily acceleration data were selected from 6 h after deployment and 2 h before removal.

Behavioural classification
To create daily behaviour profiles, each individual was video-recorded (Canon PowerShot SX720 HS; Canon Inc, Japan), and the start and end time of each behaviour was time-stamped using BORIS software [69]. Tri-axial accelerometry and magnetometry data were time-matched with video observations at a resolution of 1 s. Five behaviours were selected and individual goats recorded for a total of 10.9 h (mean ± SD = 38.5 ± 16.7 min, Table 2). Additional behaviours (e.g. aggression, scratching, shaking) that were observed for less than 1 s were grouped as 'Other' . Behaviours were classified for each enclosure; enclosure A was level terrain with no slope whereas, enclosure B was sloped terrain, thus the slope of terrain for locomotion behaviours was included in observations to build the model ( Table 2).
From the raw acceleration and magnetometry axes, 14 variables that describe both the posture and body movement of an individual were calculated (Additional file 1). Random forest models, an extension of classification trees, were used to classify behaviour using the package randomForest [70,71]. To build the model the data were randomly split, 60% of the observed data set was used as a training set and 40% as a validation set. Random forest models use classification trees (500 in this model) by building a hierarchy of decision rules to classify observations [72]. Observations are subdivided at each classification node until the Gini index does not decrease, and the mean Gini decrease gives the importance of each predicting variable [70]. The error rate, including the Out-of-bag error estimates, were checked. Confusion matrices were created using the validation dataset to validate the model and the precision and recall of each behaviour were calculated (Additional file 1).

Daily behaviour and energy expenditure
Using behavioural classification template behaviours were identified for the daily acceleration data to identify the behaviour of goats for each second throughout the day. The proportion of time spent conducting each behaviour per day was subsequently calculated. To measure activity levels, behaviours were classed as active (walking, running and eating) or inactive (standing and resting). The proportion of time spent in active behaviours was then calculated. Using the daily behaviour budget, energy expenditures were assigned to each behaviour, using both behaviour and DBA. Behaviours were categorised as stationary or locomotory. A relationship between DBA and V O 2 was assigned to each behaviour, using resting measurements for stationary behaviours and walking measurements for locomotory behaviours. Using model predictions, energy expenditure was assigned to each behaviour using the models predicting the relationship between V O 2 and DBA, including the effect of body weight, temperature and slope of terrain for locomotion behaviour. DBA was checked for each behaviour. Where the model predicted DBA outside the range observed for behavioural classification, behaviour was marked as unknown. For behaviours that were not directly measured in this study, the difference in energy expenditure compared to measured behaviour was used to estimate energy expenditure of those behaviours.
To calculate DEE (kJ day −1 ), the time spent in each behaviour was multiplied by the energetic costs of each behaviour which was then multiplied by the calorific equivalent of 20.51 kJ L −1 O 2 consumed, assuming an RQ of 0.90 [73].

Statistical analyses Indirect calorimetry measurements
All analyses were conducted using R version 3.6.3 [74]. General Linear models (GLM) or generalised linear mixed models (GLMM) were used to: (1) assess the effect of temperature on REE; (2) assess the relationship between V O 2 and DBA and (3) test the effect of positive and negative slopes on the relationship between V O 2 and DBA. To investigate the relationship between temperature and REE, a GLMM was used with V O 2 as the response variable. Temperature, humidity, body mass and DBA were included as fixed effects and the model used a quadratic term of temperature to test for a non-linear effect. Goat ID was included as a random effect. The collinearity between body mass and age was quantified using a Pearson's correlation.
To model the relationship between V O 2 and DBA, a GLM was used with V O 2 as the response and temperature, humidity, body mass and DBA as fixed effects. To measure the effect of terrain slope, a similar model was built which included terrain slope (angle of treadmill) as a fixed effect and an interaction term between DBA and terrain slope. A random effect of individual was not included in either model due to the number of goats measured (n = 4 and n = 3, respectively). The correlation between DBA and speed was checked for walking measurements on the level terrain and two terrain slopes. The global models were simplified using the dredge function in the R package "MuMin" [75] which uses AIC c to assess the best fit model. Models within ΔAIC c ≤ 6 were retained for inference and the simplest model was selected [76]. Model residuals were checked for normality.

Daily behaviour and energy expenditure analysis
To explain the proportion of time spent active and daily energy expenditure, two separate GLMM's were built. In both models, individual ID and date were included as random factors and enclosure (A or B) and temperature were included as fixed effects. Model residuals were checked for normality and AICc was used to select the best model. The collinearity between enclosure and temperature was quantified using a Pearson's correlation.
Additional file 1. Information for each individual goat included in the study including their body weight and age, the respirometry measurements taken in the study, and the values predicted or measured for each individual in each enclosure. An ethogram of all the behaviours with additional details.
Additional file 2. Input and output of the random forest models used to classify behaviour: error rates including Out-of-bag error estimate, mean Gini decrease of each predicting variable, confusion matrix of predicted and observed behaviours, and precision and recall of each behaviour.
Additional file 3. Respirometry measurements including individual body weight, temperature, DBA, walking speed and measurement type.