Submitted:
01 April 2025
Posted:
01 April 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Related Works
3. Mobility Prediction Models
- Real-Time Kalman Filter (KF),
- Long Short-Term Memory (LSTM),
- Spatial-Temporal Attentive LSTM (STA-LSTM), and
- Extended Kalman Filter with Hidden Markov Model (EKF-HMM).
3.1. Real-Time Kalman Filter (KF)
- 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.
3.2. Long Short-Term Memory (LSTM)
- 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.
- 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.
- 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.
3.3. Spatial-Temporal Attentive LSTM (STA-LSTM)
- 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.
3.4. Extended Kalman Filter with Hidden Markov Model (EKF-HMM)
3.4.1. Extended Kalman Filter (EKF)
- 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.
3.4.2. Hidden Markov Model (HMM)
- 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 the state .
- An initial state distribution , where .
3.4.3. Integration of EKF and HMM
4. Methodology
4.1. Dataset Description
- Timestamp: The time at which the livestock position was recorded.
- 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: The livestock’s altitude, which was excluded as it is irrelevant for monitoring livestock on flat farm terrains.
4.2. Synthetic Data Generation
4.3. Proposed LSTM-Hybrid Model
- 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.
| Algorithm 1 LSTM-Hybrid Model Workflow |
|
5. Results
5.1. First Step Prediction Accuracy Comparison
5.2. Error Distribution and Cumulative Analysis
5.3. Prediction Accuracy Over 30 Steps
5.4. Summary of Model Performance
| Model | Step 1 Error | Increase | Step 1–30 Errors | Increase |
|---|---|---|---|---|
| LSTM-H | 11.51m | - | 40.68m | - |
| LSTM | 111.87 m | 9.7x | 220.64 m | 5.4x |
| STA-LSTM | 109.11 m | 9.5x | 173.40 m | 4.3x |
| KF | 102.04 m | 8.9x | 294.92 m | 7.2x |
| EKF-HMM | 170.29 m | 14.8x | 306.57 m | 7.5x |
6. Conclusions
DURC Statement
References
- Ergunsah, S.; Tümen, V.; Kosunalp, S.; Demir, K. Energy-efficient animal tracking with multi-unmanned aerial vehicle path planning using reinforcement learning and wireless sensor networks. Concurr. Comput. Pract. Exp. 2023, 35, e7527. [Google Scholar] [CrossRef]
- Neethirajan, S.; Kemp, B. Digital livestock farming. Sens. Bio-Sens. Res. 2021, 32, 100408. [Google Scholar] [CrossRef]
- Moradi, S.; Bokani, A.; Hassan, J. UAV-based smart agriculture: A review of UAV sensing and applications. In Proceedings of the 2022 32nd International Telecommunication Networks and Applications Conference (ITNAC), Wellington, New Zealand, 5 January 2023; IEEE: New York, NY, USA, 2022; pp. 181–184. [Google Scholar]
- Neethirajan, S. The role of sensors, big data and machine learning in modern animal farming. Sens. Bio-Sens. Res. 2020, 29, 100367. [Google Scholar] [CrossRef]
- Mukhamediev, R.I.; Yakunin, K.; Aubakirov, M.; Assanov, I.; Kuchin, Y.; Symagulov, A.; Levashenko, V.; Zaitseva, E.; Sokolov, D.; Amirgaliyev, Y. Coverage path planning optimization of heterogeneous UAVs group for precision agriculture. IEEE Access 2023, 11, 5789–5803. [Google Scholar] [CrossRef]
- Benalaya, N.; Adjih, C.; Amdouni, I.; Laouiti, A.; Saidane, L. UAV search path planning for livestock monitoring. In Proceedings of the 2022 IEEE 11th IFIP International Conference on Performance Evaluation and Modeling in Wireless and Wired Networks (PEMWN), Rome, Italy, 8–10 November 2022; IEEE: New York, NY, USA, 2022; pp. 1–6. [Google Scholar]
- Monteiro, A.; Santos, S.; Gonçalves, P. Precision agriculture for crop and livestock farming—Brief review. Animals 2021, 11, 2345. [Google Scholar] [CrossRef]
- Salehi, S.; Bokani, A.; Hassan, J.; Kanhere, S.S. Aetd: An application-aware, energy-efficient trajectory design for flying base stations. In Proceedings of the 2019 IEEE 14th Malaysia International Conference on Communication (MICC)., Selangor, Malaysia, 2–4 December 2019; IEEE: New York, NY, USA, 2019; pp. 19–24. [Google Scholar]
- Strong, A.K.; Martin, S.M.; Bevly, D.M. Utilizing Hidden Markov Models to Classify Maneuvers and Improve Estimates of an Unmanned Aerial Vehicle. IFAC-PapersOnLine 2021, 54, 449–454. [Google Scholar] [CrossRef]
- Kant, R.; Saini, P.; Kumari, J. Long short-term memory auto-encoder-based position prediction model for fixed-wing UAV during communication failure. IEEE Trans. Artif. Intell. 2022, 4, 173–181. [Google Scholar] [CrossRef]
- Wu, Q.; Zhang, M.; Dong, C.; Feng, Y.; Yuan, Y.; Feng, S.; Quek, T.Q. Routing protocol for heterogeneous FANETs with mobility prediction. China Communications 2022, 19, 186–201. [Google Scholar] [CrossRef]
- Salehi, S.; Hassan, J.; Bokani, A. An optimal multi-uav deployment model for uav-assisted smart farming. In Proceedings of the 2022 IEEE Region 10 Symposium (TENSYMP), Mumbai, India, 1–3 July 2022; IEEE: New York, NY, USA, 2022; pp. 1–6. [Google Scholar]
- Nicolas, G.; Apolloni, A.; Coste, C.; Wint, G.W.; Lancelot, R.; Gilbert, M. Predictive gravity models of livestock mobility in Mauritania: The effects of supply, demand and cultural factors. PloS ONE 2018, 13, e0199547. [Google Scholar] [CrossRef] [PubMed]
- Zhao, K.; Jurdak, R. Understanding the spatiotemporal pattern of grazing cattle movement. Sci. Rep. 2016, 6, 31967. [Google Scholar] [CrossRef] [PubMed]
- Suseendran, G.; Balaganesh, D. Cattle movement monitoring and location prediction system using Markov decision process and IoT sensors. In Proceedings of the 2021 2nd International Conference on Intelligent Engineering and Management (ICIEM), London, UK, 28–30 April 2021; IEEE: New York, NY, USA, 2021; pp. 188–192. [Google Scholar]
- Bajardi, P.; Barrat, A.; Savini, L.; Colizza, V. Optimizing surveillance for livestock disease spreading through animal movements. J. R. Soc. Interface 2012, 9, 2814–2825. [Google Scholar] [CrossRef] [PubMed]
- Guo, Y.; Poulton, G.; Corke, P.; Bishop-Hurley, G.; Wark, T.; Swain, D.L. Using accelerometer, high sample rate GPS and magnetometer data to develop a cattle movement and behaviour model. Ecol. Model. 2009, 220, 2068–2075. [Google Scholar] [CrossRef]
- Nielsen, L.R.; Pedersen, A.R.; Herskin, M.S.; Munksgaard, L. Quantifying walking and standing behaviour of dairy cows using a moving average based on output from an accelerometer. Appl. Anim. Behav. Sci. 2010, 127, 12–19. [Google Scholar] [CrossRef]
- Jiandong, Z.; Yukun, G.; Lihui, Z.; Qiming, Y.; Guoqing, S.; Yong, W. Real-time UAV path planning based on LSTM network. J. Syst. Eng. Electron. 2024. [Google Scholar]
- Neethirajan, S. Artificial intelligence and sensor innovations: enhancing livestock welfare with a human-centric approach. Hum.-Centric Intell. Syst. 2024, 4, 77–92. [Google Scholar] [CrossRef]
- Kalman, R.E. A new approach to linear filtering and prediction problems. 1960. [Google Scholar] [CrossRef]
- Song, X.; Liu, Y.; Xue, L.; Wang, J.; Zhang, J.; Wang, J.; Jiang, L.; Cheng, Z. Time-series well performance prediction based on Long Short-Term Memory (LSTM) neural network model. J. Pet. Sci. Eng. 2020, 186, 106682. [Google Scholar] [CrossRef]
- Jiang, R.; Xu, H.; Gong, G.; Kuang, Y.; Liu, Z. Spatial-temporal attentive LSTM for vehicle-trajectory prediction. ISPRS Int. J. Geo-Inf. 2022, 11, 354. [Google Scholar] [CrossRef]
- Farjad-Pezeshk, N.; Asadpour, V. Robust chaotic parameter modulation based on hybrid extended Kalman filter and hidden Markov model detector. In Proceedings of the 2011 19th Iranian Conference on Electrical Engineering. IEEE, Tehran, Iran, 17–19 May 2011; 2011; pp. 1–4. [Google Scholar]
- Pavlovic, D.; Davison, C.; Hamilton, A.; Marko, O.; Atkinson, R.; Michie, C.; Crnojevic, V.; Andonovic, I.; Bellekens, X.; Tachtatzis, C. Precision Beef - Animal Behaviour Classification 2021. [CrossRef]







| Parameter | Value |
|---|---|
| Max Epochs | 200 |
| Mini-Batch Size | 64 |
| Initial Learning Rate | 0.002 |
| Learning Rate Drop Factor | 0.005 |
| Learning Rate Drop Period | 80 |
| Gradient Threshold | 1.2 |
| L2 Regularization | 0.002 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).