Networked Wearable Sensors for Monitoring Health and Activities of an Equine Herd: An IoT Approach to Improve Horse Welfare

Over the past decade, wearable sensors for animals have significantly advanced. These devices, combined with sophisticated analysis tools, can reveal important health and behavioral correlations, such as the relationship between heart rates (HRs) and animals’ geographic movements. Despite their potential, widespread implementation in herds has been limited by challenges in sensor network communication. Building on our previous success with wearable vital sign sensors for horses, this study demonstrates an Internet of Things (IoT) framework that networks devices across an equine herd. Equipped with integrated photoplethysmography (PPG) sensors for 95% accurate HR monitoring, GPS for location tracking, and motion-detecting accelerometers and gyroscopes, our system offers holistic sensing capabilities. We found that horses near environmental stressors—such as service roads, barns, or feeding stations—not only show higher average HRs but also spend more time in these areas, constrained by their environment. This underscores our approach’s potential to improve animal welfare and advance precision agriculture by providing detailed insights into the effects of environmental factors on herd behavior.


I. INTRODUCTION
I N THE past decade, wearable sensors for precision live- stock management have seen notable growth [1], [2].They offer capabilities of sensing environments around the animals as well as their health information [3], [4], thus benefiting the overall health and productivity of these animals [5], [6].When paired with advanced analysis tools, such as the ones enabled by machine learning (ML) algorithms, these developed wearable sensors afford otherwise unknown correlations and metrics [7], [8].For example, Yigit et al. employed a learning-based multilayer classifier trained with the data from four wearable inertial measurement sensors for detecting the lameness in horses.The model realized a detection accuracy of 94% [9].Some wearable sensors enable remote oversight of each animal, making immediate interventions possible and addressing labor-and time-heavy issues with greater efficiency [10], [11].Mhatre et al. [12] demonstrated a wearable sensor for measuring body temperature, relative humidity, heart rate (HR), and rumination rate of a cow.This monitoring system paired with a random forest regressor, an ML model, can predict the milk yield with an accuracy of ∼76% [12].To truly harness these advantages, uninterrupted and immediate communication is paramount [13], [14].The Internet of Things (IoT) network that interconnects the multiple sensors applied to the animals can collect organized data from them.Thus, it facilitates the in-depth studies on the health and behaviors of not only the individual ones but also a herd.For example, Maroto-Molina et al. [15] presented a low-cost IoT designed to monitor the location of a cow herd.They did this by using transmission collars and Bluetooth ear tags.The collars on the cows collect and send information from the rest of the herd, which wear the ear tags.The location data collected from these sensors are analyzed to create metrics for better understanding of collective motion behaviors of the herd.One of the observed metrics reported was that the cattle herd spent 75% of the daylight within 111 m of each other.Another example is seen in a work done by Tran et al. [16], where they demonstrate an IoT consisting of GPS and accelerometers mounted on the cows to track the location of a herd.The collected GPS data were used for classifying the behaviors feeding, lying, standing, and walking of free-grazing cows, affording an average accuracy of 95%.
While these past advancements have promoted livestock management, they also highlight areas for further innovation.An IoT that networks the sensors within confined environments has been proposed to improve the well-being and productivity of the animals [12], [17].Some allow the deployment in a smart farm setting to better adapt to animal needs [18], [19].For instance, Niimi et al. [20] developed and deployed a networked sensing system comprised of temperature sensors and web cameras to monitor the broiler houses in a chicken farm.Such an IoT makes quantification and documentation of animals more accessible.Kwong et al. [21] deployed a networked sensing system consisting of antennas and GPS collars.Based on the observed lengths of time the cattle spent near the watering trough, the herd behaviors were identified.Others observe and quantify grazing and pasture migration behaviors of the cattle [22], [23].For instance, Nadimi et al. [23] developed a ZigBee-based wireless sensor network.Using radio wave transmitters in the wearable collars, these collars would send timestamps when the animal was nearby gateways within the pasture.The signal was used for assessing the animal movements and whereabouts when they came within the communication range of these gateways [23].Despite the progress, the sensors demonstrated in these works have limited functions of only geologic locations or environmental conditions.A wearable unit that senses multiple signals (vital signs, locations, and gestures/motions) for applications in livestock, particularly in horses, has been quite limited.In addition, many of the demonstrated IoT have limitations in signal transmission distance, rate or frequency, and quality.This limitation can be attributed to the traditionally utilized Wi-Fi or Bluetooth to communicate their information and observations [24].These Wi-Fi-and Bluetooth-based systems often require complicated and multifaceted systems to handle the communication over larger distances [25].Finally, an IoT system designed specifically for use with an equine herd has been rarely demonstrated.
To tackle these shortcomings, in this work, we developed a multifunctional wearable sensing device for a horse and then networked multiples in an equine herd through a long-range (LoRa) radio communication network.The wearable sensing device integrates an MAX30102 photoplethysmography (PPG) sensor, a PA1010D mini-GPS, and an LSM6DSOX two in one three-axis accelerometer and gyroscope for measuring HRs, geological locations, and gesture/motion activities of the horse, respectively.With an emphasis on real-time data processing and seamless integration, these wearable sensors were networked to form an IoT.The success of this work leads to: 1) a compact and highly integrated sensing device for multifaceted signal collection of a horse; 2) a network enabling long-range communication, high signal quality, and fast-speed edge computation for decision making; 3) deployment of such an IoT system on a pastured equine herd, illustrating the potential of networked sensing in tracking collective herd behaviors, which is one of the first in the field, if not the only one; and 4) comprehensive analysis and quantification of the amassed equine herd data, allowing for extracting the hidden health or behavior information, thus advancing the equine medicine for precision agriculture.
The remainder of this article is structured to explore the various dimensions of our study.In Section II, we delineate the IoT system's architecture, the intricate design and crafting of the wearable sensing devices, and our approaches to data collection and storage.Section III elaborates on our empirical findings, showcasing the robust capabilities of our wireless communication modules, the precision of the sensor devices, and the behavioral patterns observed within the equine herd.Section IV contextualizes these findings within the broader landscape of precision livestock management, drawing parallels with the existing technologies and underscoring the innovations introduced by our research.Finally, Section V encapsulates the core contributions of our work and projects future avenues for research, emphasizing the potential for further advancements in IoT applications for precision agriculture.

A. System Overview
As shown in Fig. 1, the IoT system is comprised of three main components: a wearable sensing device that is mounted to the tail of a horse, a receiver and a processor, and a cloud-based server and alert system.The integrated wearable sensing unit is powered by an onboard 3-V lithium battery.The microcontroller can be programmed by Arduino Integrated Development Environment (IDE) software.The sensing device communicates all the collected data via an LoRa radio transmitter to another Adafruit Feather M0 RFM95 microcontroller, which operates as a gateway receiver.This receiver is then wired via a micro-USB to a local laptop that handles the collection, processing, and storage of the transmitted data.The transmitted data are also saved within the cloud-based Google Drive.

B. Design and Fabrication of a Wearable Sensing Device
The layout of the sensing device is shown in Fig. 2(a).The Adafruit Feather M0 RFM95 microcontroller is an Arduino compatible microprocessor, clocked at 48 MHz and at 3.3 V logic, with 256 kB of FLASH and 32k kB of RAM.It has a micro-USB port for connection to an external device and a terminal for connection to a compact lithium polymer battery.It also supports the use of a solderable antenna for boosting the radio communication distance.The battery used in the operation of this wearable sensor was a 350-mAh, 3.7-V lithium polymer battery.We found that on average the device could operate continuously for ∼8 h.The wearable sensor features three sensing modules, an Adafruit LSM6DSOX [26], Mini GPS PA1010D [27], and a Maxim MAX30102 PPG module [28].These sensing modules employ the inter-integrated circuit (I 2 C) protocol for communication with the microcontroller.I 2 C allows them to transmit the data to the microcontroller using only two signal wires: a serial data line (SDA) and a serial clock line (SCL).The communication frequency is 100 Hz.
The LSM6DSOX measures the three degrees of linear acceleration by the on-board accelerometer and the three degrees of angular velocity by the on-board gyroscope.The PA1010D mini-GPS receiver has 210 PRN channels with 99 search channels and 33 simultaneous tracking channels.The PA1010D reports a positional accuracy of <3 m.The GPS module operates at a rate of 10 Hz.The incorporation of this mini-GPS module allows the sensor to report latitude and longitude location indexes of the horses which the sensors are mounted to.This module coupled with the HR metrics collected by the MAX30102 PPG sensors allows us to gain insight into behavioral indicators.The PPG sensors use an IR LED to collect the HRs.The IR light can penetrate deeper than other frequencies of light into the tissue for collecting more signals from the veins and capillaries.All the components were packaged into a 3-D printed case made from polylactic acid (PLA).The mini-GPS module needs a relatively unobstructed view to facilitate location data collection, so the module was housed inside of its own case outside of the primary case.To ensure that the wearable sensor does not negatively impact animal welfare, special attention was given to its ergonomic design and material selection.The device weighs only 49.5 g and is mounted at the base of the tail using an adjustable Velcro strap, a position chosen for its minimal interference with the horse's natural movements.

C. Data Collection and Storage
The IoT was deployed onto eight equine subjects for the baseline testing in a barn before being deployed into the field for prolonged data collection.The receiver was hardwired into a central computer responsible for collecting and processing the collected data, including the PPG waves, waveforms from the accelerometer and gyroscope, and geological location data from GPS.Once finished with collection, the central computer transmitted the processed data via Wi-Fi to the Google drive, thus allowing for continuous collection of the data and easy access to the database.From the data, the computer can extract the HRs, motion information, and GPS locations of the monitored horses, which can be used to alert caretakers should the reported values be outside of the predetermined ranges.

D. Networked Sensor Testing
The testing focused on two performance attributes: performance of individual sensing device in collecting signals from horses and communication quality via the designed network.The former is about the HR calculation accuracy, locations, and motion information of individual horses.The latter is about the data transmission rate, range, and quality.The testing was conducted at the Division of Animal Sciences' MU Equine Teaching Facility located within the University of Missouri's South Farm Research Center.The deployed wearable sensing devices were placed along the ventral midline of the horses' tails.The eight equine subjects were tested in a primary stable and haltered within the stalls for the testing.Each time of testing lasted 15 min.The baseline HRs were measured by a stethoscope to auscultate the heart.The stethoscope measurement was taken three times and lasted 15 s each time at the beginning middle and end of the 15-min testing period.The HRs measured from the PPG sensors were compared to the baseline values to validate the accuracy and reliability of the sensor.Then, the IoT system was deployed in the field testing.The testing was carried out on two herds, each of which consisted of three horses in the same field across six different days.The Mann-Whitley U test, a nonparametric statistical test, was applied to the collected data to compare if the two testing groups were significantly different.

A. Results on Data Transmission
We evaluated various wireless communication modules, including the ESP8266, ESP32, and RFM95.This was done to ensure that we were using an optimal form of wireless communication for our application.Both the ESP8266 and the ESP32 utilize self-hosted Wi-Fi, crucial in areas lacking direct internet, but they only managed transmission distances of 3 and 18 m, respectively.Obstructions significantly hindered their performance; for example, ESP8266 failed to transmit through the horse body, and ESP32 struggled against large barriers like barn walls.In contrast, the RFM95, which operates by radio waves, demonstrated robust performance, unaffected by obstacles, achieving a maximum transmission distance of 305 m.This superior performance ensures reliable data transmission critical for accurate HR monitoring, as shown in Fig. 3(a).
It was found during testing that the antenna length on the RFM95 caused drastic effects on the communication distances.To investigate the effects, we evaluated the communication distances of the RFM95 soldered with three different antenna lengths [29]: the quarter length, half length, and full length [Fig.3(b)].These designations relate to how the antenna length compares to the wavelength of the radio wave.For instance, a quarter length is one-fourth length of the radio wave's full wavelength.A full antenna length is calculated by the following equation: where the speed of light is 300 000 000 m/s and the radio wave frequency is 915 × 10 6 Hz.The equation affords a full antenna length of 32.8 cm.So, the half and quarter lengths are 16.that among the tested three communication modules, the ideal one would be the RFM95 radio transmitter operated with the quarter length antenna.

B. Results on the Accuracy of the Wearable Sensing Devices
The PPG sensor was employed to capture PPG waves for calculating HRs of horses [7].We found that the placement of the sensing devices on tails of the horses made it highly susceptible to motion artifacts when the horses flicked their tails.The artifacts introduced discrepancies within the PPG waves, leading to inaccurate HR calculations.To mitigate them, we developed a new technique, as shown in Fig. 4. First, the integrated gyroscope was used to identify the instances of extreme movement caused by the horse flicking its tail.As shown in Fig. 4(a), the abnormal peaks from the PPG wave are in good coincidence with the abrupt spike in the gyroscopic signals.Once the abnormal gyroscope signals were identified, the filtering algorithm automatically eliminated the major peaks and valleys appearing coincidently in the PPG wave [Fig.4(b)].This targeted data filtering method enabled us to selectively remove the effects of motion artifacts from the identified waves without excessively processing and filtering all collected waves.After that, the wave underwent standard data processing steps, wherein baseline wander was removed [Fig.4(c)], followed by smoothing via a third-order low-pass Butterworth filter to facilitate easy peak detection [Fig.4(d)].This filtering methodology ensures that the system will collect high accuracy data when the horses are either at Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
rest or in activities.In addition to PPG and gyroscopic sensing, the wearable device can collect three-axis accelerometer data [Fig.4(e)] and geolocational data via the GPS module [Fig.4(f)].The GPS module can collect and report location data when obscured from the sky inside the barn.
Each device underwent a rigorous test as outlined in Section II.All the tested horses exhibited healthy HRs in a range of 28-45 beats per minute (bpm) [30].When comparing the sample-to-sample recordings of the HRs measured by the PPG sensors to the baseline values measured by a stethoscope, an average percentage error of 5% across the eight subjects was obtained by the following equation: Then, the average percentage error was subtracted from 1.0 to calculate an overall system accuracy, as shown in the following equation: It was found that the PPG sensors afforded an overall system accuracy of 95% across all the testing subjects (Fig. 5).This result well aligns with the one shown in our previous work [7].
Following the validation of the wearable sensing devices in a barn, we deployed them via the proposed IoT for studying the herding behavior in the field.

C. Results on Herding Behaviors
In addition to monitoring the HRs, the wearable devices can collect the locations and track the in-field movement of the horses via the integrated GPS and gyroscope/accelerometer.The collected location indexes and biophysiological signals were transmitted to the central computer up to 300 m.Specifically, we aimed to study how the stressors in the field impacted the HRs of the subjects.To investigate this, we spread them in different geographic locations.Due to the existence of the stressors in the pasture, we hypothesized that their HRs could vary.To test the hypothesis, all the subjects' data were grouped for visualizing the recorded HRs at their respective locations via a color map, assisting to tell the trend [Fig.6(a)].It shows that the HRs were elevated when they were close to the eastern and southern fences.To further investigate this trend, we binned the field to two regions diagonally and then calculated the mean BPM of the horses moving in these two regions [Fig.6(b)].The horses when moving in Region 1 showed a mean BPM of 36.6, while in Region 2, the mean BPM was 34.7.To validate the significance of the difference of the average BPMs of the horses in the two regions, we conducted a Mann-Whitley U test.The calculated p-value was <0.0001, significantly lower than the set alpha value of 0.05, confirming significant difference of the two groups.This finding is intriguing, as the only constants identified as potential stressors in this study were the presence of the barn along the eastern fence and a service road parallel to the southern fence where high traffic happened [Fig.6(a) and (b)].We were also informed by the equine facility staff that Region 2 coincides with the regular feeding areas.Since we were testing in the early afternoon to early evening, the subjects could have been displaying stress in anticipation of being fed within these areas.
In addition, we studied the difference in the mean BPM compared to the baseline BPM, which was recorded while the horses were housed within the barn.Fig. 6(c) shows that there was an increase in BPM when the subjects were near the eastern and southern fences and a decrease in BPM when they were near the northern and western fences.To quantify this identified trend, the differences for both groups from the baseline tests were calculated.The group in Region 1 showed an average difference of −1.4 BPM when compared to the baseline HRs, and the group in Region 2 reported an average difference of −4.3 [Fig.6(d)].These negative differences indicate that on average, our findings are below the referenced baseline BPMs.The Mann-Whitley U test was again employed to test significant differences between the two groups, and it reported a p-value of <0.0001.The unexpected discovery was that the group in Region 1 experienced a negative difference when compared to the baseline HRs, indicating an average reduction in HRs in this area.This can be attributed to the fact that the baseline HRs were recorded in the barn.The overall decrease in HRs in the field further validates the hypothesis that the barn was an environmental stress factor.
Using the developed IoT, we expect to understand where the equine subjects spend most of their time in the field and gain more insights into their herding behavior.To do that, we employed K -means clustering to bin the experimental data, generating four distinct clusters from our collected HR data, which was time-dependent.From them, we estimated the durations-in a percentage of the total experimental time-the horses spent in each region.The study revealed that the horses predominantly spent their time in Regions A and B, as shown in Fig. 6(e).This finding was unexpected, especially considering the previously identified HR increase in these areas.It was hypothesized that despite being associated with stress sources, these regions were frequently visited for several reasons.First, Regions A and B encompassed the gate used for feeding, grooming, and veterinary care.Additionally, these regions housed the primary water source and a salt lick, as depicted in a green square in Fig. 6(e).As stated earlier, we primarily tested in the early afternoon through the early evening, coinciding with the animals' feeding routine.Therefore, they may have been congregating in these areas in anticipation of receiving grain.Another key observation was that the barn served as the sole windshield in the field.On windy days, the horses tended to congregate in the sheltered area provided by the barn.

IV. DISCUSSION
Our developed multifunctional wearable sensing device for horses addresses several limitations identified in previous studies and compares favorably with the existing sensor technologies in precision livestock management.Compared to conventional wearable sensors that often focus on single parameters, our system integrates multiple sensors (PPG, GPS, accelerometer, and gyroscope) to provide a comprehensive health and behavior monitoring platform.Neethirajan [1] highlighted the importance of wearable sensors in animal health management, emphasizing the trend toward multifunctional devices for detailed health insights.Our system aligns well with this trend, enhancing data integration and providing actionable insights into both the health status and behavioral patterns of equine subjects.
Our findings provide unique insights into the social structures and movement patterns of horses within the herd.The ability to track each horse's location and HR in real time helped us identify how equines interact with their environment and with each other, revealing patterns that are not visible in traditional observation methods.For instance, we observed that horses in closer proximity to certain stressors, such as boundary fences or high-traffic areas, displayed elevated HRs.Further analysis highlights interesting herd behaviors, such as the ones how horses distribute themselves within the pasture and respond to changes in their environment.This behavior analysis is critical for developing more effective herd management strategies and improving the welfare of the animals by adjusting their living conditions based on their natural preferences and behaviors.
Ethical considerations were paramount throughout the development and deployment of our system.The study was conducted under strict supervision from the MU equine facility staff, adhering to established animal welfare protocols to ensure that the devices did not cause harm or distress to the horses.Observational data collected during the study indicated no adverse behavior or signs of discomfort among the equine subjects, affirming the device's acceptability.Moreover, the capability for continuous health monitoring offered by these devices presents a significant opportunity for enhancing animal welfare.By enabling early detection of health issues and facilitating a better understanding of animal needs, the technology ultimately contributes to more humane and responsive care practices.
Our implementation of LoRa technology for data transmission addresses the critical challenge of reliable, long-range communication in rural or obstructed environments, and a notable improvement over systems relying on traditional Wi-Fi or Bluetooth technologies.This advancement is important, as outlined by Ahmed et al., who discussed the limitations of conventional communication technologies in precision agriculture applications due to their limited range and reliability in farm settings [24].
Moreover, our study focuses on integrating sensors into a cohesive IoT system to afford a practical solution to the challenges of precision livestock farming as reviewed by Zhang et al. [2].They discussed the integration challenges of IoT technologies in smart farms, emphasizing the need for systems to be both precise and sustainable.Our design addresses these needs by optimizing sensor communication and power usage, thereby enhancing the sustainability of the monitoring system.The implementation of GPS and motion sensors in our system allows for detailed monitoring of animal movements and behaviors, a capability that Tran et al. [16] identified as crucial for understanding and improving animal welfare.Our system's ability to track detailed movement and location data enables the identification of behavioral patterns that are correlated with environmental stressors, providing insights for improving animal management practices.

V. CONCLUSION AND FUTURE WORK
In this study, we built on our previous success in developing wearable vital sign sensors and advance them to an IoT platform for monitoring horses in a herd.The devices, equipped with PPG sensors for HR monitoring with 95% accuracy, GPS for tracking movements, and a combination of accelerometers and gyroscopes for motion detection, allowed for detailed observation of the equine behavior in a group setting.By analyzing the data collected from these sensors, Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
we focused on understanding the dynamics of the herd behaviors rather than the individual ones in isolation.
As we continue this line of research, our goal is to refine these behavioral metrics and extend our studies over longer periods to better understand the long-term effects of herd dynamics on animal health and well-being.This research not only enhances our understanding of equine behaviors but also contributes to the broader field of precision agriculture by integrating animal welfare science with the technological advancements [31].
Furthermore, we envision the potential of advanced analytic tools, such as ML algorithms, to extract hidden information from the collected data.This could enable the prediction of horse's behaviors in different settings, preventing potential health risks, e.g., lameness of the monitored horses [32], [33], [34].Building on the insights from studies like Martiskainen et al., which demonstrated the identification of lameness in dairy cows using a neck worn accelerometer with a precision of 66% [35], we anticipate that our multifunctional devices can achieve even higher accuracy.Additionally, quantifying the stress caused by flies could be an interest, given the sensor's sensitivity to tail movements when fending off the flies.

Fig. 1 .
Fig. 1.Overview of the IoT system formed networked wearable sensors applied to an equine herd.

Fig. 2 .
Fig. 2. Overview of the wearable sensing device.(a) Layout of the circuit showing main components.(b) Horse with a prototype mounted onto the ventral midline of the tail.

Fig. 3 .
Fig. 3. Predeployment system testing.(a) Transmission ranges from the three tested microcontrollers and their respective transmission types.(b) Transmission distances of the tested antenna lengths for the employed radio transceiver.
4 and 8.2 cm, respectively.It was found that the signal transmission distance in the antenna operated with the quarter length reaches 305 m, while the ones soldered with the half and full antenna lengths show the transmission distances of only 183 and 229 m, respectively [Fig.3(b)].The results show

Fig. 4 .
Fig. 4. Motion artifact filtration.(a) Identification of gyroscopic fluctuation and corresponding PPG motion artifact.(b) Artifact elimination.(c) Baseline wander removal.(d) Third-order low-pass Butterworth filtering.(e) Three-axis accelerometer data from a walking horse.(f) Latitude and longitude of a horse in the barn reported by GPS.

Fig. 5 .
Fig.5.Measured HR accuracy from all eight subjects including the overall system accuracy found for the implemented wearable sensor.

Fig. 6 .
Fig. 6.Location and HR data plotted with a detailed representation of the testing field and surrounding facilities.(a) Color map of BPM in the field.(b) Division of the collected data into two regions with mean BPM.(c) Color map of BPM variations tested in the field compared to the baseline values tested in the barn.(d) Division of the collected data into two regions with corresponding mean variations to the baseline values.(e) Color map according to the time spent by horses during the field test.