Detecting Heat Stress in Dairy Cattle Using Neck ‐ Mounted Activity Collars

: Collar ‐ based activity sensors are in common use as a means of detecting oestrus to optimise farm fertility and, hence, productivity. Recently, the same acceleration ‐ derived signals have been processed to detect the time spent ruminating and eating, which, together, give an insight into animal welfare. Here, the use of neck ‐ mounted accelerometers to provide a quantifiable measure of the time period that an individual animal exhibits signs of heat stress is reported. Heat stress has a significant impact on both animal welfare and productivity. Cattle studied during elevated temperatures were found to exhibit signs of exaggerated breathing motions, an indicator of heat stress, for 8 h on average per day, exceeding the time that cattle spend feeding and is similar to daily rumination times. No similar cases were recorded in the cooler conditions of a Scottish winter. The approach offers a cost ‐ effective measure of heat stress and a potential tool to quantify its impact more generally. 0 the accelerometer Variations in to the jaw accompanies rumination smaller, in the range of 50


Introduction
Sensors systems that continuously monitor animal physiological conditions are enablers in the goal of maximising animal welfare and optimising farm productivity. Neck-mounted tri-axial accelerometer collars monitor cattle at an individual level for 24 h per day and provide a number of key animal behaviours, predominately 'restlessness' (an indication of oestrus), the basis for enhancing herd fertility [1][2][3][4][5]. In addition to oestrus, behaviours which reveal insights to welfare conditions can be determined using the same core measurement system. Martiskainen et al. [6] report the use of Support Vector Machines (SVM) to identify signatures associated with rumination, eating, standing, and lying; other researchers analyse the frequency spectrum of the measurement to achieve the same information [7,8]. Knowledge of the early onset of these key conditions is critical to informing on the most effective intervention. For example, a drop in the time spent feeding is a strong proxy for the onset of an illness [9], and changes in the time spent ruminating can provide further supporting evidence-in addition to an increase in overall animal activity-that a cow is coming into heat or is due to calve [10][11][12]. Other welfare conditions are flagged when changes to feeding, ruminating or standing/lying behaviours are sufficient to trigger a more detailed investigation.

Automatic Detection of Heat Stress
Automated detection and measurement of the degree of heat stress experienced by an animal are desirable from the perspective of optimising welfare and in turn production efficiency. Heat stress occurs when the heat load experienced by an animal becomes too great to regulate its own body temperature effectively [13]. Consequently, methods to detect heat stress have often focused on direct body temperature measurement through rumen boluses, intra-vaginal and implantable thermosensors, tympanic sensors and thermal imaging camera systems [14]. Rumen boluses, supplied by several vendors including Smaxtec Ltd (Graz, Austria) [15] provide a ready means of measuring rumen (or reticulum) temperature but measurements are influenced by the intake of fluids and differences in temperature can be observed if the bolus moves from the reticulum into the rumen. Studies undertaken to relate rumen temperature to heat stress have been shown to provide useful information; rumen temperature measurements were carried out on Aberdeen Angus and Braham steers [16] under conditions of high heat load. The Aberdeen Angus cattle with access to shade showed rumen temperatures 0.5-0.53 °C lower than those denied shade. No measurable difference was observed on Braham steers, well known for their heat tolerance. Tympanic temperature measurements can potentially be used as a proxy for core body temperature, although they have been found to record lower values by approximately 0.5 °C in beef cattle [17]. While potentially offering the possibility of measuring heat stress, the probes are semi-invasive and should be removed after 7 to 10 days to minimise the opportunity for infection [18]. Therefore, the approach is not compatible with routine dairy farming. Implantable thermo-sensors have been used to study subcutaneous temperature and its relation to core body temperature [19]. Results indicated reasonable agreement with core body temperature but over the period of the study, 19.4% of the readings were <36.5 °C suggesting that location and external environment could cause a significant number of measurement outliers. In addition, the application of the devices is invasive rendering them less attractive operationally. Thermal imaging cameras offer a remote, non-contact method for recording surface temperature and have been explored as a proxy for core body temperature measurements; results showed a weak correlation exists between body core temperature and udder surface temperature (r = 0.19-0.23) [20]. The use of such systems presents operational challenges since measurements can be variable with changes in background light, wind speed and skin surface cleanliness [21].
Although activity collars are in routine use, none of the above sensor approaches have been widely adopted within dairy farming. Here, data from neck-mounted activity collars are used to identify increased and laboured breathing in individual dairy cattle -strongly associated with heat stress but requires significant effort to implement manually in a production setting -hitherto not reported in the open literature.
Heat stress in cattle is broadly defined as a physiological condition during which the animal is no longer able to regulate its internal temperature to within a comfortable degree [22]. The stimulus is commonly a high ambient temperature often combined with high humidity [22,13]. The physiological responses that cattle display to cope with heat stress include increased Respiration Rate (RR), panting and sweating. Heat stress is known to reduce herd fertility and have an impact on milk production [23].
An elevated RR has been shown to be a reliable indicator of heat stress [22]. A dairy cow would typically display a resting RR of 26-50 breaths per minute, but, when stressed, the rate will increase and can exceed 100 breaths per minute. Ambient temperature and humidity measurements can be used to determine the likelihood of cattle becoming physiologically stressed and farm operatives are aware when local conditions are likely to induce heat stress. However, to date, a means of automatically detecting and hence quantifying heat stress amenable to widespread deployment has not been reported. RR is generally measured through visual observation making it difficult to record a measure that is quantifiable and traceable [22][23][24][25]. Here, the use of accelerometer-based collars to directly measure RR is reported, offering the capability to continuously monitor and hence quantify the influence of heat stress over the entire herd, an invaluable method to informing management decisions on maintaining the highest levels of herd welfare.

Accelerometer Based Collars
Many activity based monitoring devices for animals are implemented using Micro-Electro-Mechanical (MEMs) accelerometers [1][2][3][4][5][6][7][8][9]. Products such as collars, leg and ear tags take advantage of the widely available chipsets designed for high volume consumer markets such as mobile telephones, games consoles and automotive airbags. In the present experiments, collar mounted accelerometers supplied by Afimilk Ltd (Kibbutz Afikim, Israel) were used [2]. The accelerometers were housed in waterproof housing supported by a neck strap as shown in Figure 1. The orientation of the measurement directions is also indicated. The accelerometer unit is maintained in position with the use of a counterbalancing weight. In normal operational practice, data is preprocessed on the collar and wirelessly relayed to a farm base station. In the present case, the unprocessed acceleration data was stored on a Secure Digital (SD) card and was analysed offline. MEMs implemented accelerometers can detect small (mg) accelerations and operate over a wide dynamic range (± 16 g) [26,27]. Within cattle monitoring applications, devices with 10-bit to 16-bit resolution over ± 2 g are common. A key consideration in the present context is whether or not the accelerometers are sufficiently sensitive to measure body movements owing to respiration. The following is an analysis of the magnitude of the motion experienced during rumination in this respect. A measure of the scale of motion that can be detected is evaluated to provide the justification for the detection of movements due to respiration.
Rumination signatures are identified through small movements in the neck muscles of animals that accompany the jaw motion during chewing [7,8]. Figure 2 shows an illustrative example of a rumination measurement (from 07:29 h to 07:31 h); acceleration signals are centered on 800 mg and indicate the orientation of the device with respect to gravity, i.e., 1000 mg (or 1 g), indicating perfect alignment with the direction of gravity, whilst 0 g indicates that the accelerometer is orthogonal to the gravity vector. Variations in acceleration due to the jaw motion that accompanies rumination are significantly smaller, in the range of ± 50 mg. At certain points, e.g., around 07:19:46 and 07:20:35, the acceleration drops in amplitude as the cow stops ruminating to swallow and regurgitate a fresh bolus. The example clearly illustrates that the signals during rumination are substantially greater than when the animal is at rest. The accelerometer used had a dynamic range of ± 2 g and a measurement precision of 10 bits. The Root Mean Square (RMS) noise level of the quantisation process (converting the analogue acceleration signal to a digital 10-bit number) can be calculated as: where q represents the magnitude of each quantisation level, given by 4/(2 10 −1) g = 3.91 mg (since 2 10 quantisation steps are used to cover the 4 g range). Thus, the noise floor, or minimum acceleration that can be reliably detected, has a RMS value of 1.12 mg. Rumination is characterised by a rhythmic chewing motion of approximately 40 to 70 chews per minute (0.66-1.2 Hz [28]). The amplitude of the motion experienced by the accelerometer during this period can be derived by approximating the motion as a sinusoid of amplitude : where represents the displacement of the neck-mounted accelerometer in the direction of the motion owing to the cow breathing and is the frequency of the motion. The associated acceleration is the second derivative of the motion -the acceleration is a function of the frequency of the jaw motion, the number of chews per minute: The peak acceleration of the measurement (Figure 2) is around 50 to 100 mg (relative to the offset baseline). Thus, the motion experienced by the accelerometer has a peak amplitude of between 0.56 and 1.125 mm. Respiration is observable at a distance; therefore, it is likely that the amplitude of the movements are greater than 1mm. A neck motion has an amplitude of 1 mm, and at a RR of 60 breaths per minute (bpm), or 1 Hz, will produce an acceleration of 39 mg (Equation 4). If the RR increases to 90 bpm (1.5 Hz), the amplitude of the acceleration increases to 89 mg. In both cases, the acceleration produced is significantly greater than the RMS noise level of the accelerometer viz. 1.12 mg (equivalent to a movement in the order of 28 μm at a frequency of 1Hz). In practice, whole body motions may be larger than 1 mm, but it is also possible that the mechanics used to attach the collar (a webbing strap) will de-couple the motion. Therefore, the above estimation, while conservative, is realistic.
The present study used data gathering devices supplied by Afimilk Ltd with 10-bit resolution at a sampling rate of 10 samples per second. Raw acceleration measurements of the three axes-x, y and z-of the accelerometer were stored on an SD card and processed offline to recover signatures associated with heat stress.

Heat Stress Signature
The signs of the onset of heat stress can be observed at relatively low ambient temperatures; cattle begin to show reduced feed intake when the air temperature is above 23 °C and if the humidity is greater than 80% [23]. High humidity inhibits self-cooling by evaporation and reduces the ability to self-regulate through sweating and breathing. An empirically derived Temperature Humidity Index (THI) is an accepted metric with which to estimate the potential for the onset of heat stress [29] 0.8 % 14.4 46.4 where T is the daily maximum temperature (°C) and relative humidity (RH)% is the mean daily percentage. Friesian cattle, for example, experience heat stress at a THI level of 68 or more (21 °C and RH = 75%); Jersey cattle can tolerate higher temperatures, 25.5 °C, at the same RH value. Animals exposed to high THI levels display a number of other behaviours in addition to elevated RR and increased sweating, such as increased water intake, standing in water, standing near the water trough, and seeking shade [22]. An increase in RR resulting from heat stress manifests as an exaggerated form of breathing that creates a whole-body rocking motion; given past experience, this parameter was selected as the most readily measurable using an accelerometer. An example of the Fourier Transform (FT) of an acceleration measurement recorded during a period of elevated RR is shown in Figure 3. The Fourier Transform clearly shows that the respiration is periodic with a strong frequency component at 1.54 Hz, indicating a RR equivalent to 92.4 breaths per minute, with a Root Mean Square (RMS) acceleration value of 490 mg. The amplitude of the neck movement, estimated by the double integration of the acceleration value, indicates that the motion captured by the accelerometer has a RMS amplitude of 5.2 mm (10.4 mm peak to peak). The measured movement is comparable with that from visual observation. The Signal-to-Noise Ratio (SNR) is such that the frequency of motion can be readily recovered and attributed to the RR. The THI at this measurement was 81, indicating that there is a strong likelihood of the animal experiencing heat stress.

Comparison Between Heat Stress Signature and Rumination
In the analysis in Section 1.1, the rumination signature was represented as a sinusoid with a period that aligns with the jaw motion. While a reasonable approximation to gauge the scale of motion, it is not strictly accurate. Figure 4 shows a measurement of the jaw motion made during a rumination period. The chewing action is clearly evident, along with the periods where chewing ceases and a fresh bolus is retrieved. While there is evidence of a cyclic motion, it is clear that this motion is not a pure sinusoid. The Fourier analysis of the signal, shown in Figure 5, indicates the presence of strong harmonics not present in the respiration signal. Therefore, a rumination signature at 1 Hz will also have strong components at 2 Hz and potentially 3 Hz. The relative amplitude of the harmonics was used to distinguish between RR and Rumination. The pseudocode for the heat stress algorithm is shown in Equation 5.  The derivation of the heat stress algorithm is as follows;

Results
A total of 50 Holstein Friesian cattle housed in Kibbutz Afikim, Israel, were fitted with accelerometer-based neck-mounted data gathering collars. The cattle were housed in a free stall environment and fed on a Total Mixed Ration (TMR) ad libitum. Data were recorded during the period from 9 July 2017 to 6 August 2017. The temperature from July to August is known to be challenging historically. In July 2017, the temperature ranged from 20 °C (on 23 July 2017) to 41 °C (on 2 July 2017); the mean daily temperature was 33 °C and the mean relative humidity 45%, giving a mean THI of 82. During this period, the visual observation of RR was made on a series of days, four times daily, at approximately 07:30 h, 10:00 h, 12:00 h and 15:30 h, respectively. At each observation, three estimates of respiration counts over a 30-second period were recorded to determine an average RR. Each measurement was time-stamped and recorded along with air temperature and humidity, as well as an indication of whether or not the animal was standing or lying. In total, 227 observations were made.
The RRs for the observed cattle were correlated with temperature ( Figure 6) and the Temperature Humidity Index (Figure 7). 1. Collect a 90s-long window of data; 2. Calculate the energy measured by the accelerometer, , of the window; 3. Calculate the Fourier Transform of the window; 4. Extract the peak frequency value in the range 1-2 Hz; 5. Normalise the peak amplitude to the spectrum mean in the range 1-2 Hz (F1-2); 6. Extract the peak frequency value in the range 2-3 Hz; 7. Normalise the peak amplitude to the spectrum mean in the range 2-3 Hz (F2-3); 8. Classify the behaviour into other/rumination/eating, using (E, F2-3) and the method described in [30]; 9. Where rumination is identified, re-classify it as heat stress if F1-2 > F2-3. A positive correlation between RR/temperature and RR/THI can be observed. THI takes into account the Relative Humidity and is the accepted indicator of the potential vulnerability for an animal to experience heat stress. However, in the present scenario, the ambient temperature had a stronger correlation with RR.

Analysis of Measurement Data
An illustrative measurement of the use of the data to predict heat stress is shown in Figure 8 for a single cow. The data shows a Short-Term Fourier Transform (STFT) over the period of one day along with associated classifications. The STFT was evaluated over a 90-second block, sufficiently long to identify rumination periods with the lower section of Figure 8 showing the classifications generated over time. Classifications are aggregated into blocks of 15 min and a majority vote is used to identify the predominant class. The process for extracting feeding, rumination and other behaviours is described [30]. Here, the focus is on identifying heat stress. Rumination was distinguished from respiration rate on the basis that the higher order frequency components were stronger viz. the peak in the range 2-3 Hz being greater than that in 1-2 Hz. In addition, in the case of the respiration signal, harmonics of the fundamental frequency do not exist. The behaviour profile indicates the onset of rapid RR lasting shortly after the beginning of the measurement (07:00 h) until around 14:00 h, when the cows were milked and fed. Heat stress symptoms are then evident later in the afternoon and abate overnight. Overnight temperatures were not recorded but the spot temperature measurements on the day indicate that the ambient temperature is already close to 27 °C by 07:00 h the following morning, with RR observations above 60 bpm for a significant period of the day. Figure 9 displays boxplots of activity budgets for the 10 cattle under observation over the month of July for eating, ruminating, 'other' and heat stress. The times spent exhibiting signs of heat stress are significant and are comparable with durations of eating and 'other', where the latter classification representing all activities that are not eating, ruminating or heat stress. Results indicate that cattle exhibit significant periods of time during the day where their RR exceeds 60 bpm.
A similar analysis was evaluated for cattle in Scotland during January 2016 during which the daily temperature never exceeded 10 °C; no periods of time during which cattle exhibited bouts of sustained breathlessness were identified.

Conclusion
The use of accelerometer-based neck-mounted collars to identify and quantify the time periods that dairy cattle exhibit signs of heat stress is reported. Results show that, during periods in which the ambient environmental conditions are conducive, cattle displayed signs of heat stress for sizeable periods of time throughout the day (in excess of 6 h). The study corroborates the potential for the monitoring of heat stress to be integrated in neck-mounted collars through automatically reporting periods of high RR.
The initial trials prove feasibility, but a wider evaluation is required to determine the overall precision of the algorithms that estimate heat stress. The integration of collar measurements with temperature and humidity data automatically provide the Temperature Humidity Index (THI) important to enhancing on-farm decision making. The approach provides the basis for a fully automated system that enables farmers to quantify the effectiveness of strategies e.g., water sprinklers to provide effective relief to their cattle and improve animal welfare.

Acknowledgments:
The authors gratefully acknowledge the support of Afimilk agricultural Cooperative Ltd., in particular G. Katz and D. McDonald for their input to this project through the provision of collars, useful discussions and experimental measurement data, and for gathering the truthing data under extremely hot and uncomfortable conditions.

Conflicts of Interest:
The authors declare no conflict of interest.