Relative Localization Error Compensation Under Attitude Disturbances Based on Long Short-Term Memory Residual Learning and Adaptive Extended Kalman Filtering
Abstract
1. Introduction
2. Relative Localization System and Experimental Setup
2.1. Operating Environment and Tracked Vehicle Following Localization System
2.2. UWB/IMU Attitude-Disturbed Relative Localization Test Bench
2.3. UWB Two-Way Ranging and PDOA Localization Principle
2.3.1. UWB Two-Way Ranging Principle
2.3.2. PDOA Localization Principle
3. Proposed LSTM-RAEKF Localization Method
3.1. Overall Framework of the Proposed LSTM-RAEKF Localization Method
3.2. Multi-Source Data Input and Preprocessing
3.3. Attention-LSTM Residual Prediction
3.4. Residual-Adaptive Correction and Causal Smoothing
3.5. Adaptive Q/R Extended Kalman Filtering
| Algorithm 1: Pseudocode of the proposed LSTM-RAEKF fusion localization method | |
| Input: , , trained Attention-LSTM model, , , , , | |
| Output: Filtered relative pose | |
| 1. | |
| 2. | for each synchronized sampling time do |
| 3. | |
| 4. | |
| 5. | |
| 6. | ← UpdateWindow |
| 7. | if length then |
| 8. | continue |
| 9. | end if |
| 10. | Attention-LSTM residual prediction: |
| ← Attention | |
| ← Regression | |
| 11. | Residual-adaptive correction and causal smoothing: |
| ← ResidualMotionScore | |
| 12. | Adaptive estimation: |
| 13. | EKF state estimation: |
| ← EKFPredict | |
| ← EKFUpdate | |
| 14. | end for |
| 15. | return the filtered relative pose sequence |
3.6. Experimental Conditions and Evaluation Metrics
4. Results and Discussion
4.1. Effect of Attitude Disturbance on Raw UWB Measurements
4.2. Localization Performance Under Different Attitude Disturbances
4.3. Trajectory-Level Localization Performance Under Base Station Attitude Disturbance
4.4. Performance Comparison with Baseline Localization Methods
4.5. Training Convergence of the Attention-LSTM Model
4.6. Ablation Study
5. Conclusions
- (1)
- Test-bench experiments showed that pitch, roll, and vibration disturbances adversely affected UWB-PDOA measurements, resulting in fluctuations and position-dependent deviations. Under the tested fixed-point conditions, compared with raw UWB-PDOA measurements, the proposed method reduced the planar position RMSE and the theta RMSE by 35.0–62.9% and 54.7–70.8%, respectively.
- (2)
- Across all experimental conditions, compared with raw UWB-PDOA measurements. LSTM-RAEKF achieved a position RMSE of 1.81 cm and a theta RMSE of 2.17°, representing reductions of 54.8% and 61.5%, respectively. Compared with the standard EKF, LSTM-RAEKF reduced the position and theta RMSEs by 42.4% and 42.9%, respectively. Considering the IAE-EKF, the corresponding reductions were 23.6% and 31.8%. Ablation experiments further revealed performance degradation after removal of the IMU input, Attention-LSTM residual prediction, adaptive residual gain, or adaptive Q/R adjustment.
- (3)
- The proposed method provides an enhanced relative localization approach for tracked vehicle following under attitude disturbances. However, the present study was conducted on a controlled test bench and did not involve complete vehicle-following control or long-term field operation. Future work will integrate the proposed LSTM-RAEKF framework with tracked vehicle motion models considering slip and conduct real-vehicle following experiments in hilly and mountainous agricultural environments. Additional environmental factors, including vegetation occlusion, multipath effects, and dynamic obstacles, will also be considered to further improve the robustness of the localization system for practical agricultural applications.
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Xiao, R.H.; Ma, X.; Li, H.W.; Cao, X.L.; Wei, Y.H.; Wang, C.E.; Zhao, X. Design and Experiment of Agricultural Machinery Auxiliary Navigation System Based on UWB Positioning. J. South China Agric. Univ. 2022, 43, 116–123. [Google Scholar] [CrossRef]
- Xie, B.B.; Liu, J.Z.; Cai, L.J.; Xu, Z.H.; Hou, G.L.; Wang, J.; Li, Y.X. Design of the UWB Navigation System for Tracked Agricultural Machinery in Small Land and Analysis of Base Station Layout. Trans. Chin. Soc. Agric. Eng. 2022, 38, 48–58. [Google Scholar] [CrossRef]
- Yao, L.J.; Hu, D.; Zhao, C.J.; Yang, Z.D.; Zhang, Z. Wireless Positioning and Path Tracking for a Mobile Platform in Greenhouse. Int. J. Agric. Biol. Eng. 2021, 14, 216–223. [Google Scholar] [CrossRef] [Scilit]
- Heydariaan, M.; Dabirian, H.; Gnawali, O. AnguLoc: Concurrent Angle of Arrival Estimation for Indoor Localization with UWB Radios. In Proceedings of the 2020 16th International Conference on Distributed Computing in Sensor Systems, Marina del Rey, CA, USA, 25–27 May 2020; pp. 112–119. [Google Scholar]
- Bae, K.; Son, Y.; Song, Y.-E.; Jung, H. Component-Wise Error Correction Method for UWB-Based Localization in Target-Following Mobile Robot. Sensors 2022, 22, 1180. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Brunacci, V.; De Angelis, A.; Costante, G.; Carbone, P. Development and Analysis of a UWB Relative Localization System. IEEE Trans. Instrum. Meas. 2023, 72, 8505713. [Google Scholar] [CrossRef] [Scilit]
- Ferrero-Guillén, R.; Díez-González, J.; Martínez-Gutiérrez, A.; Villoria-Ugidos, J.; Moreira, A.; Perez, H. On the Influence of Motion in UWB Localization Methods: A Comparative Analysis in Industrial Scenarios. In Soft Computing Models in Industrial and Environmental Applications; Springer: Cham, Switzerland, 2026; pp. 650–661. [Google Scholar] [CrossRef] [Scilit]
- Cao, B.; Yu, Z.; Li, M.; Zhang, C.; Xu, B. A Novel Method for Enhanced Ultra-Wideband Positioning Accuracy in GPS-Denied Environments. Adv. Eng. Inform. 2026, 74, 104767. [Google Scholar] [CrossRef] [Scilit]
- Liu, T.X.; Li, B.F.; Yang, L. Phase Center Offset Calibration and Multipoint Time Latency Determination for UWB Location. IEEE Internet Things J. 2022, 9, 17536–17550. [Google Scholar] [CrossRef] [Scilit]
- Guo, Y.J.; Li, W.H.; Yang, G.; Jiao, Z.H.; Yan, J.C. Combining Dilution of Precision and Kalman Filtering for UWB Positioning in a Narrow Space. Remote Sens. 2022, 14, 5409. [Google Scholar] [CrossRef] [Scilit]
- He, Z.; Tang, X.; Li, M.; Zhang, F. Enhanced Indoor Mobile Robot Localization via Lie-Group IMU–UWB Fusion and Dual-Stage Kalman Filtering. Sensors 2026, 26, 2686. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Osman, A.; Shamsfakhr, F.; Vecchio, M.; Antonelli, F. Adaptive GNSS–UWB Sensor Fusion for Reliable Localization in Precision Agriculture. Smart Agric. Technol. 2026, 13, 101846. [Google Scholar] [CrossRef] [Scilit]
- Wei, M.; Liu, L.; Li, S.; Wang, D.; Tang, S. UWB/IMU Integrated Positioning Technology with NLOS Mitigation: An Improved LSSVM and AEKF Fusion Strategy. IEEE Trans. Instrum. Meas. 2026, 75, 9503514. [Google Scholar] [CrossRef] [Scilit]
- Gao, H.K.; Li, X.; Song, X. A Fusion Strategy for Vehicle Positioning at Intersections Utilizing UWB and Onboard Sensors. Sensors 2024, 24, 476. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Sun, M.X.; Gao, Y.L.; Jiao, Z.Q.; Xu, Y.; Zhuang, Y.; Qian, P.J. R-T-S Assisted Kalman Filtering for Robot Localization Using UWB Measurement. Mob. Netw. Appl. 2024, 29, 1089–1098. [Google Scholar] [CrossRef] [Scilit]
- Xie, K.T.; Zhang, Z.G. High Precision UWB Localization Method for Agricultural Machinery in Unstructured Field Environment. Measurement 2025, 254, 117941. [Google Scholar] [CrossRef] [Scilit]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Poulose, A.; Han, D.S. UWB Indoor Localization Using Deep Learning LSTM Networks. Appl. Sci. 2020, 10, 6290. [Google Scholar] [CrossRef] [Scilit]
- Tian, Y.L.; Lian, Z.Z.; Wang, P.H.; Wang, M.Q.; Yue, Z.; Chai, H.B. Application of a Long Short-Term Memory Neural Network Algorithm Fused with Kalman Filter in UWB Indoor Positioning. Sci. Rep. 2024, 14, 1925. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ren, M.L.; Wei, J.Y.; Qin, J.Y.; Guo, X.J.; Wang, H.W.; Li, S.Q. Attention Based LSTM Framework for Robust UWB and INS Integration in NLOS Environments. Sci. Rep. 2025, 15, 23257. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Métwalli, A.; Shalash, O.; Elhefny, A.; Rezk, N.; El Gohary, F.; El Hennawy, O.; Akrab, F.; Shawky, A.; Mohamed, Z.; Hassan, N.; et al. Enhancing hydroponic farming with Machine Learning: Growth prediction and anomaly detection. Eng. Appl. Artif. Intell. 2025, 157, 111214. [Google Scholar] [CrossRef] [Scilit]
- Bechar, A.; Vigneault, C. Agricultural Robots for Field Operations: Concepts and Components. Biosyst. Eng. 2016, 149, 94–111. [Google Scholar] [CrossRef] [Scilit]
- Mousazadeh, H. A Technical Review on Navigation Systems of Agricultural Autonomous Off-Road Vehicles. J. Terramech. 2013, 50, 211–232. [Google Scholar] [CrossRef] [Scilit]
- Neirynck, D.; Luk, E.; McLaughlin, M. An Alternative Double-Sided Two-Way Ranging Method. In Proceedings of the 2016 13th Workshop on Positioning, Navigation and Communications (WPNC), Bremen, Germany, 19–20 October 2016; pp. 1–4. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Y.; Duan, L. A Phase-Difference-of-Arrival Assisted Ultra-Wideband Positioning Method for Elderly Care. Measurement 2021, 170, 108689. [Google Scholar] [CrossRef] [Scilit]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural Machine Translation by Jointly Learning to Align and Translate. In Proceedings of the 3rd International Conference on Learning Representations, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Gao, D.; Zeng, X.; Wang, J.; Su, Y. Application of LSTM Network to Improve Indoor Positioning Accuracy. Sensors 2020, 20, 5824. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kalman, R.E. A New Approach to Linear Filtering and Prediction Problems. J. Basic Eng. 1960, 82, 35–45. [Google Scholar] [CrossRef] [Scilit]
- Särkkä, S.; Nummenmaa, A. Recursive Noise Adaptive Kalman Filtering by Variational Bayesian Approximations. IEEE Trans. Autom. Control 2009, 54, 596–600. [Google Scholar] [CrossRef] [Scilit]
- Feng, D.; Wang, C.; He, C.; Zhuang, Y.; Xia, X.-G. Kalman-Filter-Based Integration of IMU and UWB for High-Accuracy Indoor Positioning and Navigation. IEEE Internet Things J. 2020, 7, 3133–3146. [Google Scholar] [CrossRef] [Scilit]
- Dong, J.; Lian, Z.; Xu, J.; Yue, Z. UWB Localization Based on Improved Robust Adaptive Cubature Kalman Filter. Sensors 2023, 23, 2669. [Google Scholar] [CrossRef] [Scilit] [PubMed]






















| Parameter | Selected Value | Description |
|---|---|---|
| Window length, L | 10 | Samples in each input sequence |
| Feature dimension | 16 | Single-frame UWB-PDOA and IMU features |
| LSTM layers | 2 | Number of stacked recurrent layers |
| Hidden-state dimension | 64 | Hidden units in each LSTM layer |
| Dropout probability | 0.10 | Dropout in the regression module |
| Residual output dimension | 3 | Residuals of x, y, and θ |
| Initial residual gain, | 0.50 | Initial adaptive correction gain |
| Adaptive gain range, [, ] | 0.20–0.80 | Lower and upper bounds of lambda_k |
| EMA coefficient, | 0.75 | Causal smoothing coefficient |
| Sampling interval, t | 0.05 s | Interval used in state prediction |
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. |
© 2026 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.
Share and Cite
Li, D.; Wu, H.; Xu, W.; Wei, W.; Zhang, H.; Zhu, Y.; Xiao, M.; Chen, K. Relative Localization Error Compensation Under Attitude Disturbances Based on Long Short-Term Memory Residual Learning and Adaptive Extended Kalman Filtering. Agriculture 2026, 16, 1931. https://doi.org/10.3390/agriculture16171931
Li D, Wu H, Xu W, Wei W, Zhang H, Zhu Y, Xiao M, Chen K. Relative Localization Error Compensation Under Attitude Disturbances Based on Long Short-Term Memory Residual Learning and Adaptive Extended Kalman Filtering. Agriculture. 2026; 16(17):1931. https://doi.org/10.3390/agriculture16171931
Chicago/Turabian StyleLi, Dongfang, Haoran Wu, Wenxiang Xu, Weihua Wei, Haijun Zhang, Yejun Zhu, Maohua Xiao, and Ke Chen. 2026. "Relative Localization Error Compensation Under Attitude Disturbances Based on Long Short-Term Memory Residual Learning and Adaptive Extended Kalman Filtering" Agriculture 16, no. 17: 1931. https://doi.org/10.3390/agriculture16171931
APA StyleLi, D., Wu, H., Xu, W., Wei, W., Zhang, H., Zhu, Y., Xiao, M., & Chen, K. (2026). Relative Localization Error Compensation Under Attitude Disturbances Based on Long Short-Term Memory Residual Learning and Adaptive Extended Kalman Filtering. Agriculture, 16(17), 1931. https://doi.org/10.3390/agriculture16171931

