1. Introduction
The behavior of horses during training is one of the key indicators of their health and subjective states [
1,
2]. However, current methods still rely on riders’ self-observation and judgment, which is time-consuming, labor-intensive, and susceptible to individual subjective assessments [
3]. In equine training, identifying different behavioral states such as standing, walking, and running holds significant value [
4]. By observing a horse’s behaviors like standing, walking, and running, trainers can initially assess the overall health condition and adjust the training plans and methods. For instance, horses in the early stages of training benefit from more standing and walking exercises to build trust and fundamental skills, while for horses that require increased speed and strength, running becomes more crucial.
When it comes to analyzing equine behavior, many studies focus on machine learning and deep learning methods, which identify and predict horse behavior using large-scale datasets [
5,
6,
7,
8]. However, there are relatively few algorithms capable of real-time behavior recognition on hardware devices within resource-constrained environments such as STM32(The STM32 series is primarily designed for low power consumption and real-time control in embedded systems. With limited resources, it is not suitable for running deep learning or machine learning model algorithms.). Furthermore, current research on behavior recognition algorithms primarily focuses on analyzing behavioral patterns of sheep [
9,
10,
11] and cattle [
12,
13,
14]. Therefore, in developing a new horse behavior classification algorithm, this study referenced research methodologies from other domains. For instance, Enrico Casella et al. collected accelerometer data using a smartwatch application and employed novel outlier detection, feature extraction, and machine learning methods to analyze horse motion states through monitoring devices on the saddle and rider’s wrist [
15]. Jamie Barwick utilized Quadratic Discriminant Analysis (QDA) to assess the recognition effectiveness of different accelerometer deployment methods (collar, leg, and ear tags) in identifying grazing, standing, and walking behaviors of sheep in the Australian sheep industry. Results indicated that the accelerometer deployed on the ear tag accurately predicted grazing, standing, and walking behaviors with accuracies reaching 94%, 96%, and 99% respectively [
16]. Duc-Nghia Tran developed a novel cattle behavior recognition system using a combination of leg-mounted and collar-mounted accelerometers. Employing the Random Forest algorithm and extracted features (Root Mean Square, Standard Deviation, and Mean), it classified walking, feeding, lying, and standing behaviors of cows, achieving outstanding performance: 91.4% accuracy for feeding, 99.8% for lying, 88% for standing, and 99.8% for walking [
17].
Horses and cattle/sheep exhibit significant differences in behavior. In training, horses typically require intervention from trainers and a more expansive space for running and practicing various equestrian skills. In contrast, cattle and sheep have relatively smaller activity areas, more suitable for leisurely grazing and wandering. Their movement is slower, unlike horses that require specialized training to enhance speed or running capabilities. The training objectives for horses are more diverse, including improving speed, endurance, skills, and performance, while training for cattle and sheep often emphasizes domestication and farm work. The distinctiveness in behavioral patterns poses new challenges for technological support in the equine industry. Despite significant advancements in animal behavior recognition, such as for sheep, cattle, and horses, effectively embedding behavior identification methods into hardware devices and achieving real-time analysis of horse behavior remains challenging [
18]. Considering the vast training areas leading to incomplete network coverage in equestrian training facilities, this study aims to develop a novel lightweight algorithm using wearable devices that operate on a 4G module. This system not only enables real-time monitoring of equine states but also provides live behavioral data, offering comprehensive support for horse health and training management. The focus of this study is real-time horse behavior classification using algorithms embedded directly into hardware devices, thereby providing a more convenient and comprehensive solution for monitoring equine behavior. This novel wearable device solution holds promise for playing a significant role in horse training and health monitoring, enabling more efficient and reliable technical support for the equine industry. The overall algorithm and framework of this paper are illustrated in
Figure 1.
The main contributions of this paper are:
A wearable device, which centered around a microcontroller, that utilizes 4G network and IMU sensors to perceive and analyze the posture and behavioral states of horses.
A real-time horse behavior recognition method which uses resultant acceleration thresholds that achieves behavior classification in horses through interval counting and statistical analysis of variance parameters between segments.
The effectiveness of the proposed method is demonstrated through experimental verification.
The subsequent sections of this paper are structured as follows:
Section 2 provides a detailed description of the design process of the wearable device, experimental procedures, acceleration data collection and processing, as well as the implementation of behavior analysis algorithm.
Section 3 focuses on the validation results of the proposed algorithm on a test dataset. Finally,
Section 4 and
Section 5 delve into the discussion and conclusion of this research, respectively.
5. Conclusions
In this study, we have developed a wearable device for real-time monitoring of horse behaviors and proposed a behavior classification method that is tailored for this device. The proposed method comprises two sequential stages: first, the Acceleration Interval Counting Method and second, the Acceleration Variance Analysis Method. By integrating the two methods into a single method called “Combined Acceleration Threshold Analysis method”, it accurately identifies equine stationary behavior by initially utilizing the interval counting method and subsequently distinguishes walking and running behaviors using variance analysis, enhancing the reliability and accuracy of the overall identification. Our study also investigated the impact of different data collection window sizes on identification accuracy, achieving the highest accuracy of 91.57% with a data collection window of 26. This behavioral identification method can be embedded into hardware devices, enabling the monitoring and identification of equine behavior, and directly outputting behavior status information, all in real-time. This experiment offers a new perspective on equine behavior monitoring, making identification more efficient and convenient, and holding a significant importance for equine training management. Additionally, it provides a critical reference for future research, offering potential for more reliable and efficient solutions in the field of equine behavior monitoring.
Author Contributions
Conceptualization, X.C., W.Z. and L.G.; methodology, X.C. and F.L; software, X.C. and F.L; validation, L.G., W.Z. and K.C.; formal analysis, L.G. and K.C.; investigation, K.C, Q.F. and J.L.; resources, L.G. and W.Z.; data curation, J.L. and Q.F.; writing—original draft preparation, X.C. and L.G.; writing—review and editing, P.K., L.G. and X.C.; visualization, X.C. and P.K.; supervision, P.K., L.G. and F.L.; project administration, W.Z. and L.G.; funding acquisition, W.Z. and K.C. All authors have read and agreed to the published version of the manuscript.
Figure 1.
The overall framework of behavior data collection, algorithm processing and analysis, and data transmission to end-users for monitoring.
Figure 1.
The overall framework of behavior data collection, algorithm processing and analysis, and data transmission to end-users for monitoring.
Figure 2.
The system architecture comprises wearable devices, data storage, and display, with the main program primarily running on the STM32.
Figure 2.
The system architecture comprises wearable devices, data storage, and display, with the main program primarily running on the STM32.
Figure 3.
Wearable device hardware includes STM32 main control chip, MPU6050, display module, 4G module, and power module.
Figure 3.
Wearable device hardware includes STM32 main control chip, MPU6050, display module, 4G module, and power module.
Figure 4.
Device Hardware.
Figure 4.
Device Hardware.
Figure 5.
The device program flowchart comprises three parts: (a) describes the main program execution flow, involving the use of Timers 2 and 3; (b) outlines the workflow specific to Timer 2; and (c) illustrates the workflow dedicated to Timer 3.
Figure 5.
The device program flowchart comprises three parts: (a) describes the main program execution flow, involving the use of Timers 2 and 3; (b) outlines the workflow specific to Timer 2; and (c) illustrates the workflow dedicated to Timer 3.
Figure 6.
On-site data acquisition using a wearable device placed on the neck of the horse.
Figure 6.
On-site data acquisition using a wearable device placed on the neck of the horse.
Figure 7.
Flowchart depicting the sequence of steps and procedures followed in the experiment.
Figure 7.
Flowchart depicting the sequence of steps and procedures followed in the experiment.
Figure 8.
Comparing three-axis acceleration and resultant acceleration in standing, walking, and running behaviors, showing reliability and stability of the resultant acceleration.
Figure 8.
Comparing three-axis acceleration and resultant acceleration in standing, walking, and running behaviors, showing reliability and stability of the resultant acceleration.
Figure 9.
Signal Characteristics of Combined Acceleration for Standing, Walking, and Running Behaviors in Three-Dimensional Space.
Figure 9.
Signal Characteristics of Combined Acceleration for Standing, Walking, and Running Behaviors in Three-Dimensional Space.
Figure 10.
Distribution Range of Cumulative Acceleration for Standing, Walking, and Running.
Figure 10.
Distribution Range of Cumulative Acceleration for Standing, Walking, and Running.
Figure 11.
Distribution range of the combined acceleration variance during standing, walking, and running behaviors.
Figure 11.
Distribution range of the combined acceleration variance during standing, walking, and running behaviors.
Figure 12.
Comparing the confusion matrices of the three methods: (a) the cumulative interval counting method, (b) the combined variance analysis method, and (c) the combined threshold analysis method.
Figure 12.
Comparing the confusion matrices of the three methods: (a) the cumulative interval counting method, (b) the combined variance analysis method, and (c) the combined threshold analysis method.
Figure 13.
Comparing the correlation between window size and the classification accuracy in (a) the Interval Counting Method, and (b) the Variance Analysis Method.
Figure 13.
Comparing the correlation between window size and the classification accuracy in (a) the Interval Counting Method, and (b) the Variance Analysis Method.
Figure 14.
Comparison of Accuracy between Interval Counting Method, Variance Analysis Method, and Combined Threshold Analysis Method, showing that the Combined Threshold Analysis Method achieves the highest accuracy.
Figure 14.
Comparison of Accuracy between Interval Counting Method, Variance Analysis Method, and Combined Threshold Analysis Method, showing that the Combined Threshold Analysis Method achieves the highest accuracy.
Figure 15.
Comparison results between actual and predicted motion times.
Figure 15.
Comparison results between actual and predicted motion times.
Figure 16.
Compares the accuracies between the Interval Counting Method, Variance Analysis Method, and Combined Threshold Analysis Method on both training models and practical applications.
Figure 16.
Compares the accuracies between the Interval Counting Method, Variance Analysis Method, and Combined Threshold Analysis Method on both training models and practical applications.
Table 1.
Record of the training experiment of one of the six horses.
Table 1.
Record of the training experiment of one of the six horses.
Category |
Body Type |
Wearing Location |
Device ID |
Time |
Behavior |
Standing |
walking |
Running |
Akhal-Tekehorses |
Light Horse |
Neck |
17 |
10:38 - 10:43 |
√ |
|
|
10:43 – 10:46 |
|
√
|
|
10:46 – 11:10 |
|
|
√
|
⋮ |
⋮ |
⋮ |
⋮ |
12:11 – 12:19 |
|
√
|
|
Table 2.
Motion data for the horse of
Table 1, with each row containing raw data for x, y, and z-axis accelerometer, as well as the resultant acceleration.
Table 2.
Motion data for the horse of
Table 1, with each row containing raw data for x, y, and z-axis accelerometer, as well as the resultant acceleration.
X-axis |
Y-axis |
Z-axis |
ACC |
-4.46 |
8.27 |
-5.96 |
11.12 |
-4.85 |
7.43 |
-5.55 |
10.46 |
-4.6 |
6.27 |
-6.7 |
10.26 |
-4.92 |
7.51 |
-4.22 |
9.92 |
-4.93 |
5.99 |
-5.3 |
9.39 |
-5.89 |
6.8 |
-4.5 |
10.05 |
-4.68 |
7.48 |
-5.73 |
10.52 |
-4.81 |
9.27 |
-4.39 |
11.32 |
-5.56 |
7.94 |
-6.89 |
11.89 |
-5.79 |
12.75 |
-6.55 |
15.45 |
-4.79 |
9.06 |
-3.81 |
10.93 |
-5.87 |
10.5 |
-7.49 |
14.17 |
-5.52 |
8.12 |
-7.12 |
12.12 |
-0.62 |
9.54 |
-8.24 |
12.62 |
-6.27 |
8.76 |
-10.6 |
15.11 |
-0.89 |
6.29 |
-4.66 |
7.87 |
-6.69 |
7.48 |
-3.06 |
10.49 |
-3.51 |
9 |
-6.77 |
11.79 |
-3.8 |
7 |
-9.31 |
12.25 |
-8.46 |
5.1 |
-6.62 |
11.89 |
-5.49 |
3.56 |
-5.71 |
8.68 |
Table 3.
Definition of Horse Behaviors.
Table 3.
Definition of Horse Behaviors.
Horse Behavior |
Behavior Definition |
Standing |
The horse stops moving, stands with all four hooves on the ground, and maintains a stationary posture. |
Walking |
The horse maintains a lower speed and rhythm in its gait. Movement of the forelegs and hind legs is slower, and the body posture remains relatively stable. |
Running |
The horse displays increased movement in both forelegs and hind legs, showing a rocking motion in the body, often characterized by substantial lateral and longitudinal movements while running. |
Table 4.
Cumulative Acceleration Intervals for Standing, Walking, and Running Behaviors.
Table 4.
Cumulative Acceleration Intervals for Standing, Walking, and Running Behaviors.
Standing Behavior |
The cumulative acceleration mainly falls within the range of [9.0, 10.5]. |
Walking Behavior |
The combined acceleration data range is mainly distributed within the interval [7.0, 15.0]. |
Running Behavior |
The combined acceleration data range is primarily distributed within the interval [2.0, 40.0]. |
Table 5.
The relationship between interval analysis threshold and classification accuracy.
Table 5.
The relationship between interval analysis threshold and classification accuracy.
Interval Analysis Threshold |
Behavior Classification Accuracy |
|
86.92% |
|
87.19% |
|
78.92% |
|
74.13% |
Table 6.
Boundary of combined acceleration variance between standing and slow walking, experimentally validated with the highest classification accuracy when the boundary value is 1.2.
Table 6.
Boundary of combined acceleration variance between standing and slow walking, experimentally validated with the highest classification accuracy when the boundary value is 1.2.
Variance Boundary Value |
Behavior Classification Accuracy |
1.0 |
90.56% |
1.1 |
90.68% |
1.2 |
90.72% |
1.3 |
90.52% |
1.4 |
90.64% |
1.5 |
90.44% |
1.6 |
90.41% |
Table 7.
Combined acceleration variance threshold between walking and running, experimentally validated with the highest classification accuracy when the threshold value is 29.
Table 7.
Combined acceleration variance threshold between walking and running, experimentally validated with the highest classification accuracy when the threshold value is 29.
Variance Boundary Value |
Behavior Classification Accuracy |
20 |
87.23% |
25 |
89.83% |
27 |
90.37% |
28 |
90.79% |
29 |
90.87% |
30 |
90.72% |
31 |
90.68% |
32 |
90.60% |
Table 8.
Predicted Results of Horse Behavior Identification.
Table 8.
Predicted Results of Horse Behavior Identification.
|
Standing/Count |
Walking /Count |
Running /Count |
Actual value |
2986 |
11447 |
5567 |
Predicted values using Combined Acceleration Interval Counting Method |
3068 |
7236 |
7696 |
Predicted values using Combined Acceleration Variance Analysis Method |
2678 |
12538 |
4784 |
Predicted values using Combined Acceleration Threshold Analysis Method |
3094 |
12122 |
4784 |
Table 9.
Generalized Models of Interval Counting Model, Variance Analysis Model, and Threshold Analysis Model.
Table 9.
Generalized Models of Interval Counting Model, Variance Analysis Model, and Threshold Analysis Model.
Threshold Analysis Model |
Interval Counting Model |
Variance Analysis Model |
represents a set containing the interval counting model and the variance analysis model.
denotes evaluating the model’s performance through experimentation.
|
, represents the data point.
N represents the number of data points that meet the condition.
represents the threshold adjusted based on the scaling factor.
|
represents data points, where L represents the lower threshold and U represents the upper threshold.
represents the mean
|