Quantifying the effects of sensor coatings on body temperature measurements

A characterization of an organism’s thermoregulatory ability informs our understanding of its physiology, ecology and behavior. Biotelemetry studies on thermoregulation increasingly rely on in situ body temperature measurements from surgically implanted data loggers. To protect the organism and the instrument, the electronics and the temperature sensor are often encased in non-conductive materials prior to insertion into the organism. These materials thermally insulate the sensor, thus potentially biasing temperature measurements to suggest a greater degree of thermoregulation than is actually the case. Here we present methodology to quantify and correct for the effect of sensor coatings on temperature measurements by data recording tags. We illustrate these methods using Wildlife Computer’s Mk9 archival tag, field data from the peritoneal cavity of a juvenile albacore tuna (Thunnus alalunga) and simulated data of several species of ectotherms (fish: Hemitripterus americanus, Catostomus commersoni and Maxostoma macrolepidotum; reptiles: Macroclemys temminckii, Varanus spp.), ranging in size from 10 to 1000 g. Mk9 tags had rate constants (measures of the sensor’s ability to respond to changes in temperature) of 1.79 ± 0.06 and 0.81 ± 0.07 min−1 for the external and internal sensors, respectively. The higher rate constant of the external sensor produced smaller errors than the internal sensor. Yet, both sensors produced instantaneous errors of over 1 °C for all species tested, with the exception of T. alalunga. The effect of sensor coatings on body temperature measurements is shown to depend on the relative values of the sensor’s and the organism’s rate constant and the rate of change of environmental temperature. If the sensor’s rate constant is lower than that of the organism, the temperature measurements will reflect the thermal properties of the sensor rather than the organism.


Background
Over the past few decades, biotelemetry studies have generated in situ measurements of body temperature response to environmental temperatures [1,2], providing insights into thermoregulatory abilities [3,4], mechanisms [5,6] and strategies [7,8]. Characterizations of thermoregulation can be used to determine habitat availability [9,10], behavior [11,12] and vulnerability to climate change [13,14]. Our understanding of thermoregulation relies on accurate measures of body temperature and the rates at which body temperature changes given different thermal environments.
There are many challenges to obtaining these measurements [15], not the least of which is sensor thermal inertia, i.e., the ability of the sensor to resist changes in temperature. While researchers acknowledge that sensor thermal inertia exists, the significance of its effect on body temperature measurements is under debate [16,17].
Thermal inertia in the absence of radiation (e.g., either in water or in a body cavity) can be estimated as the inverse of its rate constant, which is also referred to as the coefficient of conductance, k (min −1 )-at which the object's temperature, T i (°C), approaches the ambient temperature, T a (°C, Eq. 1):

Open Access
Animal Biotelemetry A large rate constant (low thermal inertia) results in a faster response to a given temperature change. This property holds true for all physical objects, organisms and sensors included. For aquatic ectotherms, organismal rate constants (k b ) decrease exponentially as body size increases, and species-specific relationships have been empirically defined for a number of species (e.g., [5,18,19]). On the other hand, a sensor's rate constant k s is largely determined by the mass and specific heat of its surrounding.
Virtually every temperature sensor used to study thermoregulation in the field is coated with a material to waterproof the sensor and to protect the organism from infection. The protective coatings vary in composition (e.g., epoxy resin: [20][21][22]; silicon: [7,23,24]; paraffin wax: [25][26][27]; or plastic: [28,29]) and in thickness, as coatings are often applied by the researcher rather than the sensor manufacturer. Because of the diversity of coating materials and thicknesses, each data logger has its own-usually unknown-coefficient of conductance. The thicker and less conductive the material, the lower the sensor's coefficient of conductance, and the slower it will respond to temperature changes.
Because of the inherent variability in organisms (i.e., thermoregulatory ability) and in tag design (i.e., mass and specific heat of protective coatings), it is difficultif not impossible-to provide a blanket statement on the effect of sensor coatings on body temperature measurements. Herein, we provide researchers the tools to assess whether their sensor is accurately capturing fluctuations in their organism's body temperature and to correct their time series if necessary. To illustrate our methodology, we use Wildlife Computer's Mk9 archival tag along with observed and simulated body temperature time series.

Theory
The impact of sensor coatings on body temperature measurements can be explored mathematically. Suppose at time t = 0, an organism's temperature (T b ) is at equilibrium with a previously constant ambient temperature, T 0 . If the animal were to move rapidly to a new temperature T a (e.g., dive below the thermocline), the change of body temperature with time is given by: This equation indicates that changes in the organism's body temperature result from the difference between the organism's body and ambient temperature and the organism's rate constant k b , assuming a constant k b during the time interval 0 to t. The rate constant defines the time constant (specifically 1/k b ) over which the organism cools or warms to the ambient temperature: An increase in k b would be accompanied by a faster rate of body temperature change. Thus, higher rates of body temperature change occur in organisms with higher rate constants or in organisms that encounter a large change in environmental temperature over a short period of time.
Using the same scenario of an organism with a rate constant k b experiencing a step-function ambient temperature change, we can calculate the effect of measuring the body temperature with a sensor, assuming the sensor is at equilibrium with the ambient temperature T 0 at t = 0 and has a rate constant k s : Here we can see that as k b increases relative to k s , the influence of k s on the measurements increases. In essence, both the animal and the sensor act as filters on the changing ambient temperature: The slowest filter (i.e., the smallest k) will determine the measured temperature. If the ambient temperature were to change again before the sensor temperature had equilibrated (i.e., in less than 1/k s ), the sensor will have a lagged response to the body temperature changes, effectively averaging fluctuations in body temperature (Fig. 1). The sensor's thermal inertia will give the impression of a more stable body temperature than is actually the case whenever k s < k b .
These derivations show that measurement error depends on the relationship between the rate constants of the sensor and the organism as well as the temporal dynamics of the ambient temperature fluctuations. Thus, estimating the sensor's rate constant is a necessary first

Quantifying and accounting for sensor rate constant Calibration experiment
Prior to deployment, the temperature sensor must be calibrated to calculate its rate constant k s . The calibration should be completed after the application of protective coating (e.g., potted in epoxy or coated with a layer of epoxy). Calibration data should be collected under the following conditions: (1) The ambient temperature T a is known and changes at a faster rate than expected in the field, (2) the physical environment is similar to that encountered during deployment, and (3) the sensor's sampling rate is faster than the sampling rate used in the study.
Ideally, T a should vary as a step function between the minimum and maximum temperatures expected in the field. This can be achieved by cycling the sensor through two different temperature-controlled treatments (e.g., water baths), noting the time at each transfer. Sensors should be allowed to equilibrate to each ambient temperature. Because the physical environment can change an object's coefficient of conductance by an order of magnitude [30], it is essential to test the sensor in the same medium (e.g., air or water) it will encounter in the field. If the sensor will be deployed in the peritoneal cavity of an organism, a calibration experiment in salt water should suffice.
With a sampling interval t s , the sampling rate 1/ t s defines the maximum detectable value of k s . Intuitively, if k s > 1/ t s , then the sensor temperature T s should approach the ambient temperature T a within the time between measurements, t s , leaving little to no information for evaluating k s (see Eq. 2). As k s is unknown and the in situ sampling interval determines the rate at which k s would be detected in the study, to resolve k s it is imperative that the calibration be conducted using sampling rates that are faster than the planned in situ sampling rate.

Calculating sensor rate constant
To calculate the sensor's rate constant (k s , min −1 ), we make a numerical approximation of Eq. 1 using the Euler method: This equation models the temperature sensor's rate of change as dependent on the present temperature (T s (t), °C), its temperature at the previous time (T s (t − �t s ), °C), the present ambient temperature (T a (t), °C) and the sensor's rate constant (k s , min −1 ). Equation 4 gives a first-order solution. The errors associated with this approximation are directly proportional to the time between measurements (the sampling interval, t s ).

Equation 4 was reformulated to:
where A is a vector of the sensor temperature's rate of change and B is a vector of the temperature differences between the current ambient temperature and the sensor temperature at a previous time step: where i = {2, 3, . . . , N } and N is the number of points in a particular window of data. To minimize noise in our estimates of k s , it is important to only include data from the periods when A and B are not equal to 0 (i.e., from the time when the sensor was placed into the water bath to the time when the sensor approaches equilibrium with the water bath's temperature). Solutions to Eq. 5 can be obtained for each cooling or warming period, to generate one estimate for k s per water bath transfer. Each k s can then be used to correct the sensor data (see "Correcting time series" section) from all cooling and warming periods throughout the calibration experiment. Although the data from these cooling and warming periods could be used collectively to generate one estimate of k s , separate estimates of k s allow the researcher to test the validity of the model using data that was excluded from the original estimation of k s . The final k s is defined as the estimate that minimizes the root-mean-square error between the corrected temperature time series (T corr , see "Correcting time series" section Eq. 9) and the water bath temperature time series (T a ): where N is the length of the time series.

Correcting time series
Having obtained a value for k s, it is possible to remove the effects of the sensor's protective coating from the T s time series and reconstruct the ambient temperature time series T a . Because the ambient temperature in this step is unknown, Eq. 4 is rearranged to solve for T a which is now renamed T corr , to denote the corrected sensor time series: This correction unavoidably enhances the sensor's digitization error. To minimize the sensor's digitization error, the sensor time series T s should be smoothed over five data points prior to correction using a moving average. To minimize signal loss, any smoothing that results in a change greater than the sensor's digitization error should be reverted back to the raw data.

Case study
Because the impact of the sensor thermal inertia on measurements is dependent on the relative values of the rate constants of the organism and the sensor (Eq. 3), the significance of the sensor's rate constant will vary by sensor and across and among species. To illustrate this, we estimate the rate constant for two temperature sensors on one model of tag and use these sensors to measure juvenile North Pacific albacore (Thunnus alalunga) body and water temperature and to simulate measurements of several ectotherms across a range of sizes.

Tag model
We calibrated and calculated the rate constants for 41 Mk9 archival tags (Mk9 Wildlife Computers). This model has been deployed on a variety of taxa (e.g., tunas: [31]; turtles: [32]; elephant seals: [33]; penguins: [34]). Mk9s are equipped with two temperature sensors: an internal sensor located within an epoxy housing and an external sensor located at the end of the tag stalk (Fig. 2).
The protective coatings on Mk9 sensors are applied by the manufacturer, rather than the individual researcher; thus, the sensor's rate constant should be similar across tags. The tag is capable of measuring temperature every second and storing data for up to years at a time (dependent on sampling rate). The resolution of both temperature sensors is 0.05 °C.
During the calibration experiment of the Mk9s, the sensors were set to sample every 30 s and were transferred between two saltwater tanks of 11 and 22 °C, for a rate of change in T a of ~11 °C s −1 . Ambient temperature was measured with a thermometer situated in each tank and recorded throughout the experiment.

Body temperature data
In situ measurements The T. alalunga data used in this study were collected by the Albacore Archival Tagging Program, a collaborative tagging project between the NOAA Southwest Fisheries Science Center and the American Fishermen's Research Foundation [35]. The Mk9 tag was set to sample every 60 s and surgically implanted into the peritoneal cavity of the tuna such that the internal temperature sensor measured the peritoneal cavity temperature, while the external sensor measured the surrounding water temperature. The albacore used in the present study was tagged off the coast of Oregon on August 4, 2011. At the time of tagging, the albacore was considered a juvenile with a measured fork length of 64.5 cm [36] and a weight of 5.5 kg (estimated using published length to weight criterion: [37]) at the time of tagging. The tagged fish was at liberty for over a year. The effect of sensor thermal inertia was removed from the in situ temperature time series using the algorithm presented above (Eq. 9) to generate a corrected temperature time series.
Simulated measurements Empirically derived, speciesspecific relationships between size and rate constant (k b ) coefficients of conductance were used to simulate body temperature cooling curves of different sized organisms under an ambient temperature change from 20 to 10 °C. Organismal coefficients of conductance (k b , min −1 ) have been derived in laboratory settings for a variety of taxa and different sized individuals using the following equation: where T e (°C) is the steady-state body temperature at the experimental ambient temperature, T 0 (°C) is the initial body temperature, and T b (°C) is the body temperature at t minutes into the experiment [18]. These data have been used in the literature to relate k b and organism size using variants of the following equation: where a and b are empirically derived constants (Table 1, [5,18,38,39]). Equation 2 was used to simulate body temperature using the organism-specific k b with T 0 of 20 °C and T e of 10 °C.
Sensor measurements of the generated body temperatures were simulated by using two different k s values (corresponding to the mean coefficient of conductance of the internal and external sensors) and replacing T a with T b in Eq. 4 (Fig. 3a). We used a sampling interval of 1 s, and our External Temperature Sensor Internal Temperature Sensor Fig. 2 Photograph of Wildlife Computers' Mk9 archival tag model simulated sensor had no digitization error. The cooling period was defined as the time from when the ambient temperature changed to 10 °C to the time when the body temperature cooled to 10.1 °C. These analyses were carried out for organisms ranging in mass from 10 to 1000 g for each species listed in Table 1.

Testing significance
In both the measured and simulated body temperature treatments, the effect of sensor coatings on measurements was determined by looking at (1) overall significance and the instantaneous errors between the body temperature and the sensor temperature time series and (2) the differences in known and estimated k b for the simulated body temperatures. Overall significance was determined using a Student's t test (P < 0.05). This was done over the entire year for the albacore tuna and over the cooling period for the simulated body temperatures. For the measured albacore body temperatures, the error caused by sensor rate constant (E) was calculated as the difference between the smoothed (to reduce digitization error, see above) and corrected sensor temperature time series at time t: In the case of the simulated body temperatures, T corr was replaced with the known body temperature T b , and the mean error Ē between the two time series during the cooling period is reported for each species size (Fig. 3b).
Additionally, because the k b in the simulated experiments is known, it was possible to compare an apparent rate constant estimated from the sensor measurements (k b-est , min −1 ) to the known k b . The apparent rate constant was estimated from the sensor cooling curve using Eq. 10 replacing T b with T s . This estimation from the simulated sensor data was then compared to the known rate constant, k b .

Mk9 sensor rate constant
Analysis of the calibration data of the Mk9 archival tags gave mean (±SD) rate constants, k s , of 1.79 ± 0.06 and 0.81 ± 0.07 min −1 for the external and internal sensors, respectively (Fig. 4). Using k s to correct the sensor measurements significantly reduced the root-mean-squared error between the sensor measurements and the ambient temperature, RMSE k s (Eq. 8, Table 2; t test: p < 1e−25 and p < 1e−38 for external and internal sensors, respectively).

Effect of sensor rate constants In situ measurements
The external sensor k s was greater than the in situ sampling rate (Δt s −1 ), and thus (due to aliasing) the external  The error observed between the sensor temperature and the body temperature. The mean error (Ē) during the cooling period is reported. In both plots, a double arrow specifies the cooling period sensor's thermal inertia was not detectable in the albacore in situ time series. Therefore, only the internal sensor measurements were corrected. This correction was done using the internal sensor k s derived from the calibration data.
Comparison of a year of raw to corrected in situ albacore body temperature data from the internal sensor showed no significant difference (t test, p = 0.92). Absolute differences between the raw and corrected body temperatures were within 0.1 °C for 92.4 % of the time series. The remaining 7.6 % (approximately 28 days of measurements) corresponded to periods when the absolute rates of body temperature change were on average an order of magnitude greater than those observed in the rest of the time series, 0.20 and 0.017 °C min −1 , respectively. The maximum error observed during these periods of high rates of body temperature change was 0.2 °C. These errors are minute compared to the overall signal and variability of the juvenile's body temperature, and therefore, the sensor's rate constant does not significantly influence measurements of this albacore's body temperature.

Simulated measurements
The level of error associated with sensor coatings differed as a function of both sensor and organism. The external and internal sensor measurements were significantly different from the simulated body temperatures for all the species tested (Student's t test; p < 0.001). The level of error varied between sensors and across species and sizes of organisms, with error due to the sensor's rate constant increasing as size decreased across species (Fig. 5a, b). Mean error during the cooling period exceeded 1 °C for all species for the internal and external sensors, respectively. When using the internal sensor, mean error dropped below 1 °C at 60 g (H. americanus and C. commersoni), 230 g (M. temminckii) and 590 g (Varanus spp.). The external sensor resulted in less error with mean error dropping below 1 °C at 20 g (H. americanus and C. commersoni) and 80 g (Varanus spp. and M. temminckii). Using uncorrected measurements from either sensor resulted in an underestimation of the organisms' rate constants, with greater differences between the estimate and the true value as k b increased (body size decreased, Fig. 6).

Discussion
Sensor thermal inertia has the potential to confound measurements of body temperature, thus impacting our understanding of an organism's thermoregulatory ability. We have shown that the effect of sensor coatings on measurements depends on (1) the sensor's rate constant, (2) the organism's rate constant and (3) the rate of change of environmental temperature. The methods presented here allow researchers to calculate and correct for a sensor's rate constant and to determine whether the sensor significantly influences body temperature measurements (the MATLAB code for all the analytical methods presented here is available by request).
All objects have thermal inertia which (in the absence of radiation) can be quantified by a rate constant. As a sensor's rate constant (k s ) decreases relative to that of an  organism's (k b ), the sensor will heat or cool more slowly than the organism, thus giving less accurate estimates of the actual body temperatures. We have shown here that in one model of archival tag (Wildlife Computer's Mk9) the two temperature sensors had different rate constants: 1.79 ± 0.06 and 0.80 ± 0.07 min −1 for the external and internal sensors, respectively. The differences in these coefficients of conductance arise from the mass and specific heat of the materials used to coat the sensors. The relatively high rate constant of the external sensor resulted in more accurate estimates of temperatures than observed using the internal sensor. Variability in the sensors' accuracy depended on differences in the rates of body temperature change, which is largely a result of the organism's rate constant (Eqs. 1, 2) and rates of ambient temperature change (Fig. 1). Organism size plays a role, as this parameter often influences the organisms' rate constant (Eq. 11). In our simulations, measurement error and error in estimation of k b decreased exponentially with size. Furthermore, the juvenile albacore, the largest organism in our study, had the smallest measurement errors. The smaller k b of larger organisms lessens the influence of ambient temperature fluctuations on body temperature, resulting in a steady or slowly changing body temperature. As steady or slowly changing body temperatures are less susceptible to error from sensor thermal inertia, measurements of temperatures of larger bodied organisms are expected to be less impacted by sensor thermal inertia than those of smaller organisms.
In our observations of the albacore as well as the modeled organisms, measurement error due to sensor rate constants increased with higher rates of body temperature change. For the albacore, periods of rapid diving between cold (deep) and warm (surface) environments had the greatest magnitude of error. In our simulations, measurement error was inversely correlated with size, i.e., sensor rate constants had a greater impact on body temperature measurements of smaller organisms. These observations follow from the general theory of thermal inertia with rate constants (Eq. 3).
To illustrate the effects of sensor coatings, we used a fixed k b dictated by a species-specific dependence on size. However, organisms have been shown to change their thermal conductance by orders of magnitude in the field [40,41]. This variability, combined with uncertainty in the rates of ambient temperature change, creates the potential for sensor coatings to affect measures of body

Conclusions
With today's technology, researchers are able to tag species ranging in size from bumble bees [42] to blue whales [43]. Our ability to measure body temperatures of small organisms (e.g., nanologger: [44]) must be met with an understanding of how sensor coatings influence those measurements. Though a sensor's rate constant may have little effect on average body temperature estimates, it can affect our understanding of the dynamics of body temperature responses to fluctuations in ambient temperature, as well as our understanding of body temperature ranges (Fig. 1). As demonstrated in Eq. 3, the ability of the sensor to accurately capture the fluctuations of the organism's body temperature depends largely on the relative relationship between the organism's and the sensor's rate constant. Given a sensor with the same rate constant, small organisms encountering a dynamic thermal environment have a greater potential for measurement error than a large organism in a stable thermal environment. Our simulations indicate that thermal inertia alters observed rates of body temperature change in a systematic manner and can generate errors an order of magnitude greater than digitization error. Accounting for these errors is therefore just as important as other experimental considerations, such as sensor placement [15]. Due to the inherent uncertainty surrounding rates of body temperature change and sensor thermal rate constants, we recommend that researchers quantify and assess the potential impact of their sensor's rate constant for their organism of interest. Our results indicate that the external and internal sensor of Mk9 tags can accurately capture the water and body temperature fluctuations of similar sized (or larger) albacore tuna. In studies with other organisms or tags, sensor thermal inertia and its associated errors must be quantified, with the exception of cases where (1) the organism does not experience changes in thermal habitat or (2) the researcher is only interested in average temperatures. Sensor thermal inertia is directly related to the mass and specific heat of the protective coating. Therefore, sensor thermal inertia will vary across tags. Researchers can minimize error by applying thinner layers of more thermally conductive materials to reduce the amount of sensor thermal inertia (increase the rate constant, k s ) and therefore its effect on body temperature measurements.

Abbreviations
T i : an object's temperature (°C); T 0 : initial temperature (°C); k i : an object's rate constant (min −1 ); T a : ambient temperature (°C); k s : sensor's rate constant (min −1 ); T s : sensor temperature (°C); T b : body temperature (°C); Δt s : sensor's sampling interval (min); T: time (min); k b : organism's rate constant (min −1 ); T e : operative temperature (°C); E: instantaneous error between the sensor measurements and body temperature (°C); Ē : mean error observed during a simulated cooling period; k b-est : estimate of k b from simulated sensor measurements of body temperature; T s-corr : corrected sensor temperature time series given k s (°C); RMSE ks : root-mean-square error between the corrected sensor measurements and the true temperature (°C).

Authors' contributions
SS performed the calibration experiment, analyzed the data and prepared the manuscript. SS and PJSF developed the numerical methods and edited the manuscript. Both authors read and approved the final manuscript.