Figure 4. Geometric diagram of Stanley's algorithm 2.4 MPC algorithm MPC is one of the most widely used path tracking algorithms, which can add a variety of constraints in the process of control, which is extremely critical in the control of vehicle path tracking. The principle of MPC algorithm is shown in Figure 5, MPC controller combines the prediction model, optimization function, and system constraints to optimally solve to obtain the error model and perform feedback correction.