1. Introduction
The agricultural sector, particularly livestock farming, is undergoing a significant transformation due to the integration of advanced technologies. The ability to monitor and analyze animal movement patterns has become increasingly important, enabling improved livestock management, disease prevention, and optimized resource allocation [
1]. As the global demand for meat and animal products is projected to rise by 70 percent over the next 50 years, maximizing efficiency in livestock farming through technological innovations is essential [
2]. The advent of unmanned aerial vehicles (UAVs) has sparked innovation in precision agriculture, offering scalable and automated solutions for real-time livestock monitoring [
3].
UAVs are particularly well suited for livestock monitoring due to their flexibility and ability to operate in remote areas. They can function as airborne base stations, collecting data from Internet of Things (IoT) sensor nodes in regions beyond the reach of conventional communication networks. Livestock health monitoring is critical for ensuring animal welfare, improving productivity, and mitigating disease outbreaks. Traditional methods of monitoring large herds over vast areas are often labor-intensive, time-consuming, and prone to human error [
4]. UAVs provide a cost-effective and efficient alternative for continuous observation and health assessment [
5].
Despite these advantages, deploying UAVs for livestock monitoring presents several challenges. One of the primary obstacles is accurately tracking livestock movements when their exact locations are unknown. UAVs must adapt their flight trajectories dynamically to locate and monitor animals efficiently. This requires advanced predictive models that anticipate livestock mobility patterns to optimize UAV path planning [
6]. Additionally, UAVs face technical challenges such as limited battery life, rapid shifts in field of view, and tracking errors caused by sudden animal movements. Although efficient trajectory planning [
7] and multi-UAV approaches [
8] can address challenges such as limited battery life and scalability, the effectiveness of UAVs in livestock monitoring still relies heavily on predictive models that minimize trajectory deviations while ensuring efficient and adaptive coverage [
9].
Several mobility prediction models [
10,
11] have been developed to address these challenges, including Kalman Filters (KFs) [
12], Long Short-Term Memory (LSTM) networks [
13], Spatial-Temporal Attentive LSTM (STA-LSTM) [
14], and Extended Kalman Filter with Hidden Markov Model (EKF-HMM) [
15]. KF-based methodologies are commonly employed to extract valuable trajectory information from datasets affected by noise. However, due to the inherently uncertain and dynamic nature of UAV trajectories, traditional KF-based approaches often exhibit limited tracking accuracy [
16]. The LSTM model focuses primarily on analyzing the temporal sequence of data without accounting for the interconnections among different attributes. Furthermore, employing multiple LSTM networks to process multivariate and associated datasets can introduce significant redundancy [
17]. The EKF, though widely used, relies on linearization, which introduces limitations. It approximates the mean and covariance using only the first-order terms of the Taylor series, reducing accuracy in highly nonlinear scenarios [
18]. Some highly dynamic maneuvers of an adversary UAV may be identified through prior observations or common patterns in specific scenarios. These maneuvers can be modeled using a HMM, a data-driven technique that aids in classification and enhances system performance by providing richer state information [
10]. In addition to the models discussed, other approaches have been studied to enhance prediction accuracy, including integrating hybrid models, refining algorithms, and incorporating additional data sources [
19]. Despite these efforts, achieving high-precision mobility prediction remains critical for applications such as UAV-assisted livestock monitoring, where accurate tracking ensures efficient herd management and resource allocation.
To bridge this gap, this study proposes LSTM-H, a hybrid deep learning model that enhances livestock movement prediction accuracy. LSTM-H extends the standard LSTM by integrating the sequential learning power of LSTM networks with the real-time correction capabilities of KFs. This hybrid approach leverages historical movement data to predict future livestock positions while dynamically adjusting UAV flight trajectories. By improving prediction accuracy, LSTM-H enables UAVs to optimize their movements in real time, conserving energy and increasing monitoring efficiency.
The proposed model was designed to enhance livestock health monitoring by equipping smart UAVs with adaptive mobility prediction capabilities. By combining time-series analysis, real-time data collection, image processing, and deep learning, LSTM-H facilitates a robust and responsive monitoring system. UAVs utilizing this model can efficiently integrate predictive analytics with the real-time health data gathered from IoT-equipped livestock. Beyond improving livestock monitoring, this research has broader implications for wildlife conservation, environmental surveillance, and disaster response, where real-time adaptive aerial tracking is crucial.
The remainder of this paper is structured as follows:
Section 2 reviews the existing studies on livestock mobility prediction.
Section 3 discusses commonly used livestock movement prediction methods. The proposed hybrid prediction model is detailed in
Section 4.
Section 5 presents the experimental setup and results. Finally,
Section 6 concludes this study.
2. Related Works
This section reviews the existing research on mobility prediction for livestock monitoring, focusing on key methodologies as well as their strengths and limitations. The principles of four dominant mobility prediction models, Kalman Filter (KF), Long Short-Term Memory (LSTM), Spatial–Temporal Attentive LSTM (STA-LSTM), and Extended Kalman Filter with Hidden Markov Model (EKF-HMM), are discussed in detail in
Section 3.
Effective UAV trajectory planning in livestock health monitoring requires the integration of mobility prediction models to enhance operational efficiency. Accurate predictions of livestock movements and health statuses enable UAVs to dynamically adjust flight paths, prioritizing animals in critical health conditions. This synergy between trajectory planning and mobility prediction ensures optimal resource allocation based on real-time assessments. However, challenges remain in addressing fast-moving UAVs and the dynamic nature of livestock, making precise and timely routing decisions difficult [
19].
Several studies have explored predictive models to address the patterns of and challenges with livestock mobility. For instance, Nicolas et al. [
20] developed gravity models to predict livestock movement patterns considering factors such as supply, demand, and cultural events. Their models achieved moderate to good accuracy in predicting movement links between locations, highlighting the influence of human and sheep populations as well as the distance between locations on movement probabilities. In another study, Zhao and Jurdak [
21] analyzed the high-frequency movement data of grazing cattle using a two-state ‘stop-and-move’ mobility model. They discovered that cattle movement patterns exhibit hierarchical structures and scale-invariant waiting times, suggesting complex underlying dynamics in grazing behavior. Suseendran and Balaganesh [
22] proposed cattle movement monitoring and location prediction system using the Markov decision process (LPS-MDP). The experimental results from the data gathered through cows’ collars confirmed that LPS-MD minimizes the prediction cost and delay and increases the prediction accuracy.
A study Bajardi et al. [
23] examined infectious disease outbreaks in livestock by tracking cattle movement in Italy. Using spatial disease simulations, they identified spreading pathways consistent across various initial conditions, enabling the clustering of outbreak origins and reducing variability in epidemic outcomes. This procedure offers a versatile framework for risk assessment and the design of optimal surveillance systems for specific diseases. In another study, Guo et al. [
24] developed a model of animal movement using a Hidden Markov Model (HMM) for state transitions (e.g., relocating, foraging) and a long-term prediction algorithm for movement between “stay” areas. The model, based on real cow movement data, accurately replicated behavior and can be adapted to other species. Nielsen et al. [
25] developed algorithms to detect walking and standing in dairy cows using movement sensors on their hind legs, measuring acceleration in three dimensions. Video-recorded behavior was analyzed to validate the algorithms. The best results, with a 10 percent misclassification rate, were achieved using a step count moving average over 3 s combined with a 5 s minimum walking rule. The findings demonstrate that walking and standing durations can be estimated with reasonable accuracy, with algorithm choice depending on specific needs.
Although previous studies have advanced livestock movement prediction using different techniques and frameworks, they often fall short in adapting to rapidly changing livestock movements and integrating real-time UAV observations with historical data. Furthermore, most models lack a unified framework that combines prediction with trajectory planning, limiting their applicability in dynamic agricultural settings.
To address these gaps, considering the successful application of LSTM and KF in the UAV mobility prediction domain [
10,
19,
26], this paper introduces LSTM-H, a hybrid model that combines LSTM networks with the real-time correction capabilities of KF. LSTM-H leverages historical livestock movement data and synthetic geo-location data from UAV aerial imagery, simulating real-world observations with controlled noise. This integration ensures accurate and adaptive predictions of livestock movements, significantly improving UAV trajectory planning and monitoring efficiency. By combining deep learning with real-time corrections, the proposed LSTM-H model overcomes the limitations of standalone methods, offering a robust solution for livestock monitoring in dynamic and noisy environments.
3. Mobility Prediction Models
The ability to accurately predict livestock movements is a cornerstone of precision agriculture, enabling enhanced monitoring, resource allocation, and health management [
27]. Livestock exhibit complex and dynamic behaviors that are influenced by various environmental and physiological factors. These inherent complexities, combined with the challenges of collecting real-world position data, make mobility prediction a non-trivial task.
To address these challenges, several state-of-the-art prediction models have been developed, each leveraging unique methodologies to forecast livestock movements. These models range from statistical filtering techniques to advanced deep learning frameworks. In this study, we evaluated four of the most prominent prediction models in this domain:
Real-time Kalman Filter (KF);
Long Short-Term Memory (LSTM);
Spatial–Temporal Attentive LSTM (STA-LSTM);
Extended Kalman Filter with Hidden Markov Model (EKF-HMM).
In addition, this paper introduces the proposed
LSTM-Hybrid (LSTM-H) model, which combines the predictive capabilities of LSTM with the real-time adaptability of the KF. This hybrid approach is discussed in detail in
Section 4.
In this section, we discuss the core principles, methodologies, and suitability of the aforementioned state-of-the-art models for livestock movement prediction.
3.1. Real-Time Kalman Filter (KF)
The Kalman Filter (KF), developed by Kalman [
12], is a statistical filtering method that estimates the state of a dynamic system by combining noisy observations with a mathematical model of the system’s behavior. In the context of livestock movement prediction, the KF operates under a constant-velocity motion model, which assumes that livestock movement can be approximated as a linear process over short time intervals.
The KF operates in two main steps:
Prediction: using the previous state estimate, the filter predicts the next state based on the system’s motion model:
where
is the predicted state at time
t,
A is the state transition matrix,
B is the control matrix, and
is the control input.
Correction: the predicted state is corrected using the observed state
, which accounts for measurement noise:
where
is the Kalman Gain, and
H is the observation matrix.
The Kalman Gain,
, determines the weight given to the observation versus the prediction and is computed as
where
is the error covariance matrix, and
R is the observed noise covariance.
By iteratively applying these steps, the KF provides real-time updates of livestock positions, making it suitable for systems with noisy positional data, such as GPS-based observations. However, its reliance on a simplistic constant velocity model limits its ability to capture the complex and non-linear movement patterns typical of livestock.
3.2. Long Short-Term Memory (LSTM)
The Long Short-Term Memory (LSTM) network is a type of recurrent neural network (RNN) designed to learn the long-term dependencies in sequential data [
13]. Unlike traditional RNNs, LSTMs mitigate the vanishing gradient problem by incorporating memory cells and gating mechanisms, making them particularly well suited for livestock movement prediction, where historical movement patterns influence future positions.
An LSTM processes sequential data by maintaining a memory cell, , which is updated at each time step t through a combination of three gates:
The
input gate () determines how much of the current input should update the memory cell. It is calculated as
where
is the input vector at time
t,
is the hidden state from the previous time step;
and
are the weight matrices for the input and recurrent connections, respectively; and
is the bias vector. The function
represents the sigmoid activation function.
The
forget gate (
) controls the extent to which the previous memory cell content is retained. It is computed as
where
and
are the weight matrices for the input and recurrent connections, and
is the bias vector.
The
output gate (
) regulates the output of the memory cell to the hidden state. It is given by
where
and
are the weight matrices for the input and recurrent connections, and
is the bias vector.
The memory cell,
, is updated by combining the forget gate’s contribution from the previous memory cell and the input gate’s influence on the new information. The update is computed as
where
is the memory cell from the previous time step,
and
are the weight matrices for the input and recurrent connections,
is the bias vector, and ⊙ represents element-wise multiplication.
Finally, the hidden state,
, is computed as
For livestock movement prediction, the LSTM network processes historical positional data, typically represented as a sequence of
coordinates over a fixed time window. The network architecture includes an input layer to accept sequences of livestock positions, one or more LSTM layers to capture temporal dependencies, a fully connected layer to map the hidden state to the output, and a regression layer to minimize the mean squared error (MSE) between the predicted and actual positions. The loss function is defined as
where
and
are the actual and predicted positions, respectively, and
N is the number of training samples.
The LSTM’s ability to learn from sequential data makes it effective in capturing the temporal patterns in livestock movements. However, it may struggle with real-time adaptability, especially when faced with noisy or sparse observations.
3.3. Spatial–Temporal Attentive LSTM (STA-LSTM)
The Spatial–Temporal Attentive LSTM (STA-LSTM) is an enhancement of the standard LSTM network, designed to focus on both spatial and temporal dependencies in sequential data [
14]. While standard LSTMs are effective at modeling temporal patterns, they treat all parts of the sequence equally, which may lead to suboptimal predictions when certain spatial or temporal features are more significant. The STA-LSTM addresses this limitation by incorporating attention mechanisms that dynamically assign weights to important parts of the sequence.
The STA-LSTM introduces an attention layer after the LSTM layer to compute the importance scores for each time step in the sequence. These scores are used to adjust the contributions of different parts of the input sequence to the final prediction. Formally, the attention mechanism operates as follows:
Attention score computation: for each time step
t, an attention score
is computed based on the hidden state
of the LSTM and a learnable context vector
u:
where
is a weight matrix,
is a bias vector, and
T is the total number of time steps in the input sequence.
Weighted hidden state: the hidden states are weighted by their corresponding attention scores to compute a context vector
c:
Final prediction: the context vector
c is passed through a fully connected layer and activation function to produce the final prediction:
where
is the weight matrix, and
is the bias vector for the output layer.
In the context of livestock movement prediction, the STA-LSTM processes sequences of coordinates while dynamically identifying and emphasizing important temporal and spatial patterns. The attention mechanism enables the model to focus on key movements or events in the sequence that are most predictive of future positions.
The STA-LSTM architecture comprises an input layer for positional sequences, one or more LSTM layers, an attention layer for computing importance scores, and an output layer for regression. By prioritizing critical information in the sequence, the STA-LSTM enhances the predictive capabilities of the standard LSTM, particularly in scenarios with irregular or non-uniform movement patterns. However, the model’s computational complexity is higher due to the additional attention mechanism, which requires learning extra parameters and performing dynamic computations during inference.
3.4. Extended Kalman Filter with Hidden Markov Model (EKF-HMM)
The Extended Kalman Filter (EKF) combined with the Hidden Markov Model (HMM) is a hybrid approach that leverages statistical filtering for state estimation and probabilistic modeling for behavioral classification [
15]. This combination is particularly effective in dynamic systems where the underlying states are influenced by discrete, latent behaviors, such as grazing, walking, or resting in the context of livestock movements.
3.4.1. Extended Kalman Filter (EKF)
The EKF extends the standard Kalman Filter by linearizing the non-linear state transition and observation models using a first-order Taylor expansion. It operates in two main steps:
Prediction: the next state
is predicted based on the non-linear state transition model
f:
where
represents process noise, typically modeled as zero-mean Gaussian noise with covariance
Q.
Correction: the predicted state is updated using the observed state
, based on the non-linear observation model
h:
where
is the Kalman Gain, computed as
Here, is the error covariance matrix, is the Jacobian matrix of h evaluated at , and R is the measurement noise covariance.
The EKF efficiently estimates continuous states, such as position and velocity, while accounting for non-linearities in the system. However, it does not inherently account for the behavioral changes that influence these states.
3.4.2. Hidden Markov Model (HMM)
The HMM models the discrete behavioral states influencing livestock movement, such as grazing, walking, or resting. It represents these states as a Markov process with the following components:
A finite set of hidden states .
State transition probabilities , where represents the probability of transitioning from state to .
Observation probabilities , where represents the likelihood of observing given state .
An initial state distribution , where .
The HMM classifies the behavioral state at each time step based on observed data, such as changes in acceleration or velocity.
3.4.3. Integration of EKF and HMM
In the EKF-HMM model, the EKF provides continuous state estimates, which are then used as inputs to the HMM for behavioral classification. The HMM refines these estimates by capturing the influence of discrete behavioral states on the continuous dynamics.
For livestock movement prediction, this integrated approach allows the system to simultaneously estimate position and velocity while identifying the underlying behavioral state. However, the EKF-HMM’s reliance on predefined behavioral models and its computational complexity can limit its applicability in scenarios with highly irregular or unpredictable movement patterns. Although the models discussed demonstrate advanced capabilities, they face limitations in handling noisy and dynamic movement patterns. To address these challenges, this paper proposes the LSTM-H model, which integrates predictive and corrective approaches for enhancing accuracy.
4. Methodology
The proposed LSTM-hybrid model in this paper addresses the limitations of existing prediction models by integrating sequential learning from LSTM networks with the real-time correction capabilities of the KF. This section provides an overview of the dataset, the generation of synthetic noisy observations to simulate real-world scenarios, and a detailed explanation of the architecture and workflow of the LSTM-hybrid model.
4.1. Dataset Description
The dataset used in this study comprised the GPS movement data for 18 cattle, collected across three farm trials at Easter Howgate Farm, Edinburgh, U.K., from June 2015 to October 2016, with an average duration of 10 days per animal [
28]. Data were recorded using Afimilk Silent Herdsman Collars [
29], which provided 3-axis accelerometer measurements (x, y, z) at 10 samples per second, yielding millions of data points per animal. The X axis aligned parallel to the animal’s body, Y axis perpendicular to the ground, and X axis perpendicular to the body, though the Z coordinate (altitude) was excluded due to its irrelevance for flat farm terrains. Each entry included
Timestamp: the time at which the livestock position was recorded (ISO 8601 format, e.g., YYYY-MM-DD HH:mm:ss.SSS).
X coordinate: the livestock’s horizontal position in meters within the farm boundary.
Y coordinate: the livestock’s vertical position in meters within the farm boundary.
Z coordinate: excluded, as noted above.
The dataset captured both active and resting periods, reflecting natural cattle behavior, including movement, eating, rumination, and sleep. To align with practical livestock monitoring objectives, which prioritize tracking during peak activity, the data were filtered to focus on the 7 a.m. to 7 p.m. periods, when cattle exhibit behaviors like eating and rumination, as supported by the Rumiwatch Halter classifications [
30] (though not used in this study). The data were resampled to one sample per minute, resulting in 7200 samples per animal over 10 days. This resampling balanced computational efficiency and prediction accuracy, as second-by-second updates are unnecessary for livestock health monitoring.
Figure 1 illustrates the movements of a single cattle over a 3 h duration, with data resampled in 60 s intervals for clarity.
Figure 2 presents the movement heatmaps for cattle IDs 16 to 18 across four 3 h time intervals, showcasing their X and Y positions within a 3600 m × 3700 m area that encompassed all livestock geo-locations across the three farms. This area could include land beyond farm boundaries but assumed continuity to visualize movement patterns effectively.
4.2. Synthetic Data Generation
To simulate UAV-based livestock monitoring, synthetic data were generated by adding Gaussian noise to the GPS-derived cattle movement coordinates from the dataset described in
Section 4.1 as follows:
where
represents Gaussian noise with zero mean and variance
. The noise level was set to 5% of the livestock’s coordinate range, reflecting typical geo-location inaccuracies in UAV aerial imagery, as reported in studies on UAV-based cattle tracking [
31,
32,
33,
34]. This approach replicates the real-world errors expected when extracting cattle positions from images captured with UAV-mounted cameras.
The synthetic data were critical because real-time UAV imagery, which uses detection algorithms to estimate cattle geo-locations, were unavailable for this GPS-based dataset. By adding 5% Gaussian noise, the synthetic data mimicked the noisy observations UAVs would provide, enabling the LSTM-H model to handle such inaccuracies. The model’s primary purpose is to predict livestock movements, allowing UAVs to dynamically adapt their flight trajectories to track animals across large farms efficiently. Unlike stationary cameras, which would require numerous units to cover expansive farm areas, UAVs provide cost-effective, dynamic imaging of varying regions, essential for real-time trajectory optimization [
35]. The synthetic data compensate for the lack of real UAV observations, enhance model robustness against noise, and support future drone-based monitoring systems.
4.3. Proposed LSTM-Hybrid Model
The LSTM-hybrid model, integrating a Long Short-Term Memory (LSTM) network with a standard Kalman Filter (KF), was selected over the Extended Kalman Filter with Hidden Markov Model (EKF-HMM) benchmark for its effectiveness in predicting livestock movements on our GPS dataset. Unlike EKF-HMM, which targets non-linear systems and behavioral classification, the LSTM-H model leverages the standard KF’s simplicity for linear, constant-velocity movements, and LSTM’s ability to learn temporal dependencies. This avoids EKF-HMM’s computational complexity and reliance on predefined behavioral states, irrelevant for our continuous position prediction task.
In the proposed model, the LSTM predicts the next livestock position from a sequence of 25 normalized (X, Y) coordinates, optimized through extensive trials for prediction accuracy across diverse scenarios. This prediction initializes the KF’s state estimate. The KF, using a constant velocity model and state transition matrix, predicts the next position and corrects it by comparing to synthetic UAV observations with 5% Gaussian noise, mimicking real-world inaccuracies. The Kalman Gain balances the prediction and observation, prioritizing the more reliable source to minimize noise-induced errors. As discussed in
Section 5, the LSTM-H model outperforms EKF-HMM by achieving higher prediction accuracy, with robust noise-handling and efficient real-time correction. The KF operates in two steps:
Prediction step: The KF takes the LSTM-predicted position,
, and projects it forward based on the system’s motion model:
where
is the predicted state at time
t,
A is the state transition matrix,
B is the control matrix, and
is the control input. In this case, the LSTM prediction
acts as the initial input for the KF.
Correction step: The KF refines the predicted state by incorporating noisy real-time observations
, such as UAV-collected positions:
where
is the Kalman Gain,
H is the observation matrix, and
is the observed position. The Kalman Gain,
, determines the weight given to the observation versus the prediction and is computed as
where
is the error covariance matrix and
R is the measurement noise covariance.
The parameters for the LSTM network and Kalman filter in the LSTM-H model were selected to optimize prediction accuracy and computational efficiency, as detailed in
Table 1. These settings, validated through experiments on the cattle movement dataset, ensure robust performance across diverse movement patterns and noisy UAV-based observations. The workflow of the LSTM-hybrid model is summarized in Algorithm 1.
Table 1.
Tuning parameters and rationale for LSTM, STA-LSTM, and Kalman Filter in LSTM-H.
Table 1.
Tuning parameters and rationale for LSTM, STA-LSTM, and Kalman Filter in LSTM-H.
Parameter | Value | Rationale |
---|
Max Epochs | 200 | Ensures convergence without overfitting, validated by monitoring validation loss. |
Mini-Batch Size | 64 | Balances GPU memory usage and stable gradient updates for the dataset size. |
Initial Learning Rate | 0.002 | Enables rapid initial learning, with a drop factor of 0.005 every 80 epochs for stability. |
Learning Rate Drop Factor | 0.005 | Facilitates fine-tuning in later training stages to capture complex temporal patterns. |
Learning Rate Drop Period | 80 | Allows sufficient epochs per learning rate for stable convergence. |
Gradient Threshold | 1.2 | Prevents gradient explosion, ensuring stable training. |
L2 Regularization | 0.002 | Reduces overfitting, validated through cross-validation. |
Variance Coefficient () | 0.4 | Scales error calculations to match synthetic noise level (5% of coordinate range). |
Process Noise Covariance (Q) | [1, 1] | Reflects expected movement variability, prioritizing LSTM predictions. |
Measurement Noise Covariance (R) | [1, 1] | Matches synthetic noise variance, correcting noisy UAV observations. |
Control Noise | 0.1 | Ensures filter stability for constant velocity model. |
Algorithm 1 LSTM-hybrid model workflow |
1: Input: Historical livestock positions, noisy real-time observations 2: Output: Corrected livestock position predictions 3: Train the LSTM model on historical movement data 4: for each time step t do 5: Predict the livestock’s position using the LSTM () 6: Use the LSTM prediction as the initial state for the KF 7: Perform the KF prediction step to estimate the next state 8: Perform the KF correction step using real-time noisy observations 9: end for |
This hybrid framework effectively combines deep learning and statistical filtering for accurate and robust livestock movement prediction. By passing the LSTM’s predictions as the input to the Kalman Filter, the model benefits from the temporal learning of the LSTM and the noise handling and adaptability of the KF. This integration makes the hybrid model particularly well suited for dynamic and noisy environments.
The methodologies described in this section, including the dataset preparation, synthetic data generation, and the design of the LSTM-hybrid model, form the foundation for evaluating and comparing the prediction models. The next section presents the results of this evaluation, highlighting the performance of the proposed hybrid model in comparison to state-of-the-art alternatives.
6. Conclusions and Discussion
This study developed LSTM-H, a hybrid deep-learning model that enhances livestock movement prediction by integrating LSTM’s sequential learning with the Kalman Filter’s real-time corrections. Evaluations against benchmark models (KF, LSTM, STA-LSTM, EKF-HMM) demonstrated its superior accuracy, with LSTM-H achieving a mean prediction error of 11.51 m for the first step and 40.68 m over a 30-step horizon, a 4.3× to 14.8× improvement. By combining deep-learning-based sequence modeling with real-time corrections, LSTM-H effectively adapts to noisy and dynamic movement patterns, outperforming traditional models that struggle with non-linear behaviors. This robustness makes LSTM-H a promising tool for precision AI-driven livestock monitoring, particularly in challenging environments where UAV-based observations are subject to noise and variability.
The implications of LSTM-H for agriculture and livestock management are significant. Its high-precision tracking capabilities enable farmers to minimize livestock loss by identifying stray animals, enhance disease control through the early detection of abnormal movement patterns, and optimize grazing patterns to improve land use efficiency. These features support data-driven decision making, facilitating efficient resource allocation, such as water and feed distribution, as well as strategic infrastructure planning, like fencing or shelter placement, particularly when traditional methods are economically or practically infeasible [
36]. By enhancing monitoring accuracy, LSTM-H promotes sustainable farming practices to meet the growing global demand for animal products, offering economic benefits for resource-limited farmers through remote monitoring and instant alerts for sick or distressed animals [
37]. Furthermore, LSTM-H’s predictive capabilities can extend beyond livestock to broader agricultural applications. When integrated with UAVs, it supports crop disease surveillance, pest detection, and precision fertilizer application by leveraging real-time and historical data, reducing waste, minimizing environmental impact, and optimizing crop yields [
38,
39,
40,
41].
Future research should explore hyperparameter optimization to enhance computational efficiency, reducing processing demands for real-time applications. Integrating LSTM-H with UAV trajectory planning could enable autonomous, scalable livestock monitoring systems, minimizing energy consumption and extending coverage. Additionally, validating LSTM-H with real-world UAV datasets would strengthen its practical applicability, addressing the limitations of synthetic data. These advancements can drive AI-powered solutions that improve sustainability and efficiency in modern agriculture, fostering resilient livestock management systems.