Nonlinear Model Predictive Control for Tractors Based on an Efficient Neural Network Optimization Strategy
Abstract
1. Introduction
1.1. Path Tracking Control Methods for Unmanned Tractors
1.2. Improving Efficiency of NMPC Optimization
1.3. Applications of Neural Networks to MPC
1.4. The Main Research of This Paper
1.5. Chapter Organization and Math Notation
2. Problem Description and Optimization Strategy
2.1. Objective Function
2.2. Optimization Strategy Based on Recursive Neural Network
- Control Effort Penalty: The term is implemented by the network shown in Figure 3. It consists of linear (purelin) activation neurons. The input layer (pink) receives , which is multiplied by the weight (sky-blue connection) to produce the penalty output (green). Black connections have a weight of 1.
- Input Reference Penalty: The term is constructed similarly, as shown in Figure 4. It computes the difference between u and before applying the weight .
- State Reference Penalty: The term is implemented analogously (Figure 5).
- Constraint Penalty: The soft constraint penalty is implemented by the network in Figure 6. The key element is a neuron (purple) whose activation function is the piecewise-defined penalty function itself. Similar networks are constructed for input and input increment constraints.




3. Application to Tractor Path-Tracking Control
3.1. Kinematic Model and Its Neural Network Construction
3.2. Neural Network Expression of Constraint Penalty Functions
- Input Increment Constraints: for .
- Input Constraints: for .
- State (Obstacle) Constraint: for , representing a circular obstacle at with radius r.
- Velocity Penalty Network (Top): Implements Equation (6). The input v is routed through two parallel branches computing and , which are then summed.
- Obstacle Penalty Network (Bottom): Implements Equation (7). It first computes the squared distance d using multiplier modules, then applies .
3.3. Integrated Objective Function for Path-Tracking
4. Experimental Results and Analysis
4.1. Controller Configuration and Experimental Scenarios
4.2. Computational Efficiency Analysis
Key Observations and Analysis
- Scaling with Prediction Horizon (): Comparing experiments 1, 2, 4, and 7 (without constraints), the computation time increases approximately linearly with . This is expected because the recursive network structure (Figure 7) unrolls the system dynamics, leading to a network depth proportional to . A longer horizon provides better performance but requires more computational resources.
- Robustness to Control Horizon (): A significant advantage of our method is revealed in experiments 7–10 (fixed ). Increasing from 5 to 20 (a 4x increase in optimization variables) results in a negligible increase in computation time (from 0.29 s to 0.32 s). This contrasts sharply with conventional nonlinear programming solvers (e.g., SQP, IPOPT), where computation typically grows super-linearly with the number of variables due to increased Jacobian/Hessian matrix dimensions. This efficiency stems from the parallelizable gradient computation via backpropagation in the constructed neural network. The forward pass (evaluating the cost) and backward pass (computing gradients w.r.t. ) are largely independent of the number of trainable weights (red connections in Figure 7 and Figure 8), once the computational graph is built. This property allows the use of a longer to improve control flexibility without crippling real-time performance.
- Impact of Constraints: Introducing constraints (compare Exp. 1–10 vs. 11–20) increases computation time by a factor of 2–3. This overhead stems from the additional network modules for penalty functions (Figure 6 and Figure 11), which increase the graph’s complexity. Nevertheless, the solution time for a moderately sized problem () remains below 0.3 s, demonstrating potential for real-time application with further code optimization or hardware acceleration.
4.3. Control Performance
4.3.1. Path Tracking Accuracy
4.3.2. Input Tracking and Smoothness
4.3.3. Obstacle Avoidance Capability
4.4. Comparative Analysis
4.4.1. Comparison with Conventional Nonlinear Solvers
4.4.2. Comparison with Linearized MPC (LMPC)
5. Conclusions
- A Paradigm Shift in NMPC Solving: We introduce a new paradigm that transforms the traditional nonlinear programming problem in NMPC into a neural network training task. This allows the challenging, constrained nonlinear optimization to be tackled by highly efficient, parallelizable, and robust off-the-shelf gradient-based optimizers (e.g., Levenberg–Marquardt, Adam), bypassing the need for complex derivative calculations or approximations inherent in conventional solvers.
- A Framework for Interpretable, Exact Problem Encoding: We provide a systematic framework for constructing exact, component-wise neural network equivalents of the NMPC problem, including the nonlinear system dynamics, the L1-norm cost function, and the hard/soft constraints. This results in a transparent and interpretable “optimizer network” rather than a data-driven black box, ensuring the solved control sequence corresponds to the original problem specification without approximation error from pre-training.
- Validation of Real-Time Feasibility and Superiority: Through comprehensive co-simulation tests on a high-fidelity tractor model, we empirically validate that the proposed method:
- Achieves excellent real-time performance, with solution times on the order of hundreds of milliseconds for horizons up to 20 steps, making direct NMPC applicable to fast motion control.
- Exhibits a unique scaling property where computation time remains largely insensitive to increases in the control horizon (), which is a major advantage over traditional solvers.
- Significantly outperforms linearized MPC in tracking accuracy, especially during tight maneuvers, by fully utilizing the nonlinear vehicle model.
- Effectively handles non-convex constraints (e.g., obstacle avoidance) that are notoriously difficult for many nonlinear programming solvers.
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Zhao, Z.G.; Zhou, L.J.; Zhu, Q. Preview Distance Adaptive Optimization for the Path TrackingControl of Unmanned Vehicle. J. Mech. Eng. 2018, 24, 166–173. [Google Scholar] [CrossRef] [Scilit]
- Lu, Z.X.; Gong, J.H.; Lu, Y. Simulation and Experiment of Dual-Channel PID Control for Tractor Hydraulic Steering System with Drive-by-Wire Technology. Trans. Chin. Soc. Agric. Eng. 2016, 32, 101–106. [Google Scholar]
- Zhang, S.; Liu, J.Y.; Du, Y.F. Automatic Navigation Control Method for Tractors Based on Speed Adaptation. Trans. Chin. Soc. Agric. Eng. 2017, 33, 48–55. [Google Scholar]
- Latif, A.R.; Chalhoub, B.; Pilipchuk, V. Control of the nonlinear dynamics of a truck and trailer combination. Nonlinear Dyn. 2020, 99, 2505–2526. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.D. Research on Tractor Assisted Driving System Based on BeiDou Satellite Navigation; Jiangsu University: Zhenjiang, China, 2017. [Google Scholar]
- Shi, X.; Ma, R.; Zhang, V.L. Simulation Study on Tractor Path Tracking Based on Fuzzy Control. Agric. Mech. Res. 2016, 38, 237–241. [Google Scholar]
- Zhao, X.J.; Zhang, P.P. Real-Time Path Tracking for Intelligent Tractors Based on MPC. Anhui Agric. Sci. 2021, 49, 191–194. [Google Scholar]
- Yue, M.; Hou, X.; Gao, R. Trajectory tracking control for tractor-trailer vehicles: A coordinated control approach. Nonlinear Dyn. 2018, 91, 1061–1074. [Google Scholar] [CrossRef] [Scilit]
- Gao, H.B.; Kan, Z.; Li, K.Q. Robust Lateral Trajectory Following Control of Unmanned Vehicle Based on Model Predictive Control. IEEE-ASME Trans. Mechatron. 2022, 27, 1278–1287. [Google Scholar] [CrossRef] [Scilit]
- Kayacan, E.; Saeys, W.; Ramon, H.; Belta, C.; Peschel, J.M. Experimental Validation of Linear and Nonlinear MPC on an Articulated Unmanned Ground Vehicle. IEEE-ASME Trans. Mechatron. 2013, 23, 2023–2030. [Google Scholar] [CrossRef] [Scilit]
- Wang, L.; Cai, Y.L.; Ding, B.C. Robust Model Predictive Control with Bi-Level Optimization for Boiler-Turbine System. IEEE Access 2021, 9, 48244–48253. [Google Scholar] [CrossRef] [Scilit]
- Xiao, W.; Cassandras, C.G.; Belta, C.A. Bridging the gap between optimal trajectory planning and safety-critical control with applications to autonomous vehicles. Automatica 2021, 129, 109592. [Google Scholar] [CrossRef] [Scilit]
- Zhang, X.J.; Bujarbaruah, M.; Borrelli, F. Near-Optimal Rapid MPC Using Neural Networks: A Primal-Dual Policy Learning Framework. IEEE Trans. Control Syst. Technol. 2021, 29, 2102–2114. [Google Scholar] [CrossRef] [Scilit]
- He, N.; Qi, L.P.; Xu, Z.X.; Du, J.W. Event-Driven Model Predictive Controller for State Constrained Systems: An Input Signal Reconstruction Method. IEEE Access 2021, 9, 74209–74217. [Google Scholar] [CrossRef] [Scilit]
- Hu, Z.R.; Shi, P.; Wu, L.G. Polytopic Event-Triggered Robust Model Predictive Control for Constrained Linear Systems. IEEE Trans. Circuits Syst. I-Regul. Pap. 2021, 68, 2594–2603. [Google Scholar] [CrossRef] [Scilit]
- Li, P.F.; Kang, Y.; Zhao, Y.B.; Wang, T. A Novel Self-Triggered MPC Scheme for Constrained Input-Affine Nonlinear Systems. IEEE Trans. Circuits Syst. II-Express Briefs 2021, 68, 306–310. [Google Scholar] [CrossRef] [Scilit]
- Sun, Z.Q.; Dai, L.; Xia, Y.Q.; Liu, K. Event-Based Model Predictive Tracking Control of Nonholonomic Systems with Coupled Input Constraint and Bounded Disturbances. IEEE Trans. Autom. Control 2018, 63, 608–615. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Zhang, H.M.; Wang, Z.P.; Huang, C.; Li, Y. Adaptive event based predictive lateral following control for unmanned ground vehicle system. Int. J. Robust Nonlinear Control. 2021, 31, 4744–4763. [Google Scholar] [CrossRef] [Scilit]
- Ji, J.H.; Jin, S.B.; Zhao, W.X.; Xu, D.Z.; Huang, L.S.; Qiu, X.Q. Simplified Three-Vector-Based Model Predictive Direct Power Control for Dual Three-Phase PMSG. IEEE Trans. Energy Convers. 2022, 37, 1145–1155. [Google Scholar] [CrossRef] [Scilit]
- Pang, S.W.; Li, Q.H.; Ni, B. Improved nonlinear MPC for aircraft gas turbine engine based on semi-alternative optimization strategy. Aerosp. Sci. Technol. 2021, 118, 106983. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.R.; Wang, Q.D.; Chen, W.W.; Zhao, L.F.; Tan, D.K. Path tracking based on model predictive control with variable predictive horizon. Trans. Inst. Meas. Control 2021, 43, 2676–2688. [Google Scholar] [CrossRef] [Scilit]
- Moriyasu, R.; Ikeda, T.; Kawaguchi, S.; Kashima, K. Structured Hammerstein-Wiener Model Learning for Model Predictive Control. IEEE Control Syst. Lett. 2022, 6, 397–402. [Google Scholar] [CrossRef] [Scilit]
- Wang, Z.P.; Li, G.B.; Jiang, H.J.; Chen, Q.J.; Zhang, H. Collision-Free Navigation of Autonomous Vehicles Using Convex Quadratic Programming-Based Model Predictive Control. IEEE-ASME Trans. Mechatron. 2018, 23, 1103–1113. [Google Scholar] [CrossRef] [Scilit]
- Abu-Ali, M.; Berkel, F.; Manderla, M.; Reimann, S.; Kennel, R.; Abdelrahem, M. Deep Learning-Based Long-Horizon MPC: Robust, High Performing, and Computationally Efficient Control for PMSM Drives. IEEE Trans. Power Electron. 2022, 37, 12486–12501. [Google Scholar] [CrossRef] [Scilit]
- Krishnamoorthy, D.; Mesbah, A.; Paulson, J.A. An adaptive correction scheme for offset-free asymptotic performance in deep learning-based economic mpc. IFAC PapersOnLine 2021, 54, 584–589. [Google Scholar] [CrossRef] [Scilit]
- Lovelett, R.J.; Dietrich, F.; Lee, S.; Kevrekidis, I.G. Some manifold learning considerations toward explicit model predictive control. Aiche J. 2020, 66, e16881. [Google Scholar] [CrossRef] [Scilit]
- Reda, A.; Bouzid, A.; Vasarhelyi, J. Deep Learning-Based Automated Vehicle Steering. In Proceedings of the 2021 22nd International Carpathian Control Conference (ICCC), Ostrava, Czech Republic, 31 May–1 June 2021. [Google Scholar] [CrossRef] [Scilit]
- Vaupel, Y.; Hamacher, N.C.; Caspari, A.; Mhamdi, A.; Kevrekidis, I.G.; Mitsos, A. Accelerating nonlinear model predictive control through machine learning. J. Process Control 2020, 92, 261–270. [Google Scholar] [CrossRef] [Scilit]
- Wang, G.M.; Qiao, J.F.; Liu, C.X.; Shen, Z.X. How Deep Is Deep Enough for Deep Belief Network for Approximating Model Predictive Control Law. IEEE Trans. Autom. Sci. Eng. 2022, 19, 2067–2078. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.D.; Dragicevic, T.; Gontijo, G.F.; Chaudhary, S.K.; Teodorescu, R. Machine Learning Emulation of Model Predictive Control for Modular Multilevel Converters. IEEE Trans. Ind. Electron. 2021, 68, 11628–11634. [Google Scholar] [CrossRef] [Scilit]
- Hewing, L.; Wabersich, K.P.; Menner, M.; Zeilinger, M.N. Learning-Based Model Predictive Control: Toward Safe Learning in Control. Annu. Rev. Control Robot. Auton. Syst. 2020, 3, 269–296. [Google Scholar] [CrossRef] [Scilit]
- Dong, L.; Yan, J.; Yuan, X.; He, H.B.; Sun, C.Y. Functional Nonlinear Model Predictive Control Based on Adaptive Dynamic Programming. IEEE Trans. Cybern. 2019, 49, 4206–4218. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kang, T.; Peng, H.; Xu, W.Q.; Sun, Y.P.; Peng, X.Y. Deep Learning-Based State-Dependent ARX Modeling and Predictive Control of Nonlinear Systems. IEEE Access 2023, 11, 32579–32594. [Google Scholar] [CrossRef] [Scilit]
- Manzoor, T.; Pei, H.L.; Sun, Z.Q.; Cheng, Z.H. Model Predictive Control Technique for Ducted Fan Aerial Vehicles Using Physics-Informed Machine Learning. Drones 2023, 7, 4. [Google Scholar] [CrossRef] [Scilit]
- Wang, G.M.; Jia, Q.S.; Qiao, J.F.; Bi, J.; Zhou, M.C. Deep Learning-Based Model Predictive Control for Continuous Stirred-Tank Reactor System. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 3643–3652. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wu, Z.; Rincon, D.; Gu, Q.Q.; Christofides, P.D. Statistical Machine Learning in Model Predictive Control of Nonlinear Processes. Mathematics 2021, 9, 1912. [Google Scholar] [CrossRef] [Scilit]
- Bistarelli, S.; Faltings, B.; Neagu, N. Interchangeability with thresholds and degradation factors for Soft CSPs. Ann. Math. Artif. Intell. 2013, 67, 123–163. [Google Scholar] [CrossRef] [Scilit]
- Febbo, H.; Liu, J.; Jayakumar, P.; Stein, J.L.; Ersal, T. Moving Obstacle Avoidance for Large, High-Speed Autonomous Ground Vehicles. In Proceedings of the American Control Conference, Seattle, WA, USA, 24–26 May 2017. [Google Scholar] [CrossRef] [Scilit]
- Kerrigan, E.C.; Maciejowski, J.M. Soft constraints and exact penalty functions in model predictive control. In Proceedings of the UKACC International Conference on CONTROL 2000 Proceedings of International Conference on Control 2000, London, UK, 4–7 September 2000. [Google Scholar]
- Mayne, D.Q.; Rawlings, J.B.; Rao, C.V.; Scokaert, P.O.M. Constrained model predictive control: Stability and optimality. Automatica 2000, 36, 789–814. [Google Scholar] [CrossRef] [Scilit]
- Oravec, J.; Bakosova, M. Soft constraints in the robust MPC design via LMIs. In Advances in Computing and Communications; IEEE: New York, NY, USA, 2016. [Google Scholar]
- Introduction to CarSim. 2021. Available online: https://www.carsim.com/downloads/pdf/CarSim_Introduction.pdf (accessed on 1 July 2025).













| Operating System | CPU Type | CPU Base Frequency |
|---|---|---|
| Window 10 | i5-10400 | 2.90 GHz |
| Memory Capacity/Frequency | Hard Disk Type | |
| 16 GB/3000 MHz | Solid-State Drive |
| Predictive horizon | Control horizon | Control period | Weight of velocity increment | Weight of velocity target |
| 10 | 10 | 0.1 s | 0.1 | 0.4 |
| Weight of steering angle increment | Weight of steering angle target | Weight of position | Weight of heading angle | Constraint constant M |
| 0.7 | 0.1 | 1 | 0.1 | 999,999 |
| Lower bound of constraint of velocity increment | Upper bound of constraint of velocity increment | Lower bound of constraint of velocity | Upper bound of constraint of velocity | Lower bound of constraint of steering angle increment |
| −0.5 m/s | 0.5 m/s | 0 m/s | 5 m/s | −1 rad |
| Upper bound of constraint of steering angle increment | Lower bound of constraint of steering angle | Upper bound of constraint of steering angle | Location of obstacle | Radiu of obstacle |
| 1 rad | −1.1 rad | 1.1 rad | [10, 0] | 0.5 m |
| Reference velocity of straight forward | Reference velocity of turning | Reference steering angle of straight forward | Reference steering angle of turning | |
| 10 km/h | 5 km/h | 0 rad | 0.38 rad |
| No. | Predictive Horizon | Control Horizon | Constraints | Network Layers | Mean Time | Max Time |
|---|---|---|---|---|---|---|
| 1 | 5 | 5 | Without | 47 | 0.05 s | 0.09 s |
| 2 | 10 | 5 | Without | 77 | 0.10 s | 0.15 s |
| 3 | 10 | 10 | Without | 77 | 0.10 s | 0.15 s |
| 4 | 15 | 5 | Without | 107 | 0.18 s | 0.26 s |
| 5 | 15 | 10 | Without | 107 | 0.18 s | 0.26 s |
| 6 | 15 | 15 | Without | 107 | 0.19 s | 0.28 s |
| 7 | 20 | 5 | Without | 137 | 0.29 s | 0.40 s |
| 8 | 20 | 10 | Without | 137 | 0.30 s | 0.42 s |
| 9 | 20 | 15 | Without | 137 | 0.30 s | 0.42 s |
| 10 | 20 | 20 | Without | 137 | 0.32 s | 0.44 s |
| 11 | 5 | 5 | With | 87 | 0.12 s | 0.19 s |
| 12 | 10 | 5 | With | 137 | 0.27 s | 0.41 s |
| 13 | 10 | 10 | With | 137 | 0.28 s | 0.41 s |
| 14 | 15 | 5 | With | 187 | 0.52 s | 0.71 s |
| 15 | 15 | 10 | With | 187 | 0.50 s | 0.72 s |
| 16 | 15 | 15 | With | 187 | 0.50 s | 0.72 s |
| 17 | 20 | 5 | With | 237 | 0.77 s | 1.08 s |
| 18 | 20 | 10 | With | 237 | 0.78 s | 1.07 s |
| 19 | 20 | 15 | With | 237 | 0.80 s | 1.10 s |
| 20 | 20 | 20 | With | 237 | 0.84 s | 1.18 s |
| No. | Turning Radius | Controller Type | Average Tracking Error |
|---|---|---|---|
| 1 | 10 m | Linear | 0.354384 m |
| 2 | 10 m | Nonlinear | 0.121985 m |
| 3 | 7 m | Linear | 0.464007 m |
| 4 | 7 m | Nonlinear | 0.166604 m |
| 5 | 5 m | Linear | 0.566659 m |
| 6 | 5 m | Nonlinear | 0.233134 m |
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
Ou, J.; Xu, L. Nonlinear Model Predictive Control for Tractors Based on an Efficient Neural Network Optimization Strategy. Appl. Sci. 2026, 16, 8361. https://doi.org/10.3390/app16178361
Ou J, Xu L. Nonlinear Model Predictive Control for Tractors Based on an Efficient Neural Network Optimization Strategy. Applied Sciences. 2026; 16(17):8361. https://doi.org/10.3390/app16178361
Chicago/Turabian StyleOu, Jieyong, and Lihong Xu. 2026. "Nonlinear Model Predictive Control for Tractors Based on an Efficient Neural Network Optimization Strategy" Applied Sciences 16, no. 17: 8361. https://doi.org/10.3390/app16178361
APA StyleOu, J., & Xu, L. (2026). Nonlinear Model Predictive Control for Tractors Based on an Efficient Neural Network Optimization Strategy. Applied Sciences, 16(17), 8361. https://doi.org/10.3390/app16178361

