## 1 Introduction
But with the development of integrated chips and optimized methods, which have accelerated computing speeds, an increasing number of researchers are considering NMPCs for autonomous trajectory tracking. In [23; 24], researchers compared NMPC autonomous steering to manual steering in simulations of lane change and return maneuvers, and verified the advantage of NMPCs. In [25] a method of varying discrete steps is adopted in NMPCs to compatible with path tracking and obstacle avoidance better. In [26], the vehicle model of a NMPC is formulated by approximating the magic tire model with a set of piecewise linear functions to reduce the computational burden in simulations. In [27; 28], the optimization problem solution of NMPCs is calculated by the use of sequential quadratic programming (SQP) to improve solution efficiency. In addition to improve the calculation speed, literature [29] applies convex quadratic cone programming optimization numerical calculation method to the nonlinear coupling model, and there are methods such as \"warm start\" [30] and reduction of optimization process variables by assuming that the control variable is unchanged in a certain period of time [31]. In most of these studies, however, only simulations were performed, and calculation times were largely ignored. NMPCs have been also widely used in other fields, which may provide some inspirations to our research. Researchers proposed applying a particle swarm optimization to the MPC algorithm for a quadcopter in trajectory tracking which produced fast solutions in [32]. A NMPC approach is applied to a sugar precipitation for Chinese medicine solution which significantly improves precipitation efficiency [33]. A Min-Max selector algorithm and MPC algorithm are compared for aircraft engine fuel control in [34] and the MPC algorithm provides faster response. A NMPC scheme for the control of brushless direct current motor is presented in [35] and improves energy saving by 19%. To solve the above problems, an NMPC based on the collocation method is proposed to the lateral control of unmanned vehicle trajectory tracking. The specific objective of this research is to ensure the accuracy of the NMPC algorithm and improve its real-time performance. The Runge-Kutta (RK) formula used in the collocation method in this paper is currently the main method for solving differential equations and has been widely used in various fields. The calculation process can be significantly simplified so that the computing time will be greatly reduced under the conditions where the initial value and derivative of the equation are given. The two-degrees-of-freedom kinematics equations for the vehicle, which are used by the MPC, also fit well with the requirements of the RK formula. And this paper uses Monte Carlo method to analyze the robustness of the algorithm which is a very mature sampling technique and can ensure the reliability of the experiment. This paper is organized as follows. The second section introduces the theory of the NMPC. In the third section, a second-order RK formula is used to discretize the linear equations transforms the linear equations into a non-linear programming problem with constraints and performs Monte Carlo simulations. The fourth section describes the verification experiment. The results indicate that this method requires a low amount of calculations, with the calculation time for each solution step being within 100 ms. The fifth section presents the conclusions.