Path Tracking Control of Autonomous Vehicle Based on Nonlinear Tire Model

The tire forces of vehicles will fall into the non-linear region under extreme handling conditions, which cause poor path tracking performance. In this paper, a model predictive controller based on a nonlinear tire model is designed. The tire forces are characterized with nonlinear composite functions of the magic formula instead of a simple linear relation model. Taylor expansion is used to linearize the controller, the first-order difference quotient method is used for discretization, and the partial derivative of the composite function is used for matrix transformation. Constant velocity and variable velocity conditions are selected to compare the designed controller with the conventional controller in Carsim/Simulink. The results show that when the tire forces fall in the nonlinear region, two controllers have good stability, and the tracking accuracy of the controller designed in this paper is slightly better. However, after the tire forces become nonlinear, the controller with linear tire force becomes worse, the tracking accuracy is far worse than the controller with the nonlinear tire model, and the vehicle stability is also degraded. In addition, an active steering test platform based on LabVIEW-RT is established, and hardware-in-the-loop tests are carried out. The effectiveness of the designed controller is verified.


Introduction
Autonomous vehicles are the focus of attention in the world today. Many car manufacturers and even some Internet companies have invested a lot of energy in the research and development of autonomous vehicles. As early as 2008, Urmson C believed that intelligent systems could be applied to the automotive industry. He introduced the advantages of autonomous vehicles and the challenges faced by cities in the direction of autonomous driving [1]. Then, Lee J analyzed the needs of autonomous vehicles, designed an agent that can simulate autonomous vehicles, and developed a prototype for it [2]. Obinata G believed that it is necessary to solve the problems of machine control, road safety and automation technology reliability of autonomous vehicles, and explained the current situation and challenges of unmanned operation technology [3]. More and more researchers are advancing the development of autonomous cars from different angles and within different fields. From the perspective of data storage, Yeshodara NS proposed a new idea to reduce the data storage problems of autonomous vehicles, only relying on cloud infrastructure to drive cars [4]. From the perspective of obstacle recognition, Hane C proposed a method of extracting static obstacles from depth maps calculated from multiple consecutive images [5]. Kumar GA proposed a method to estimate the distance between autonomous vehicles and other vehicles, objects and signs using precise fusion methods [6]. From the perspective of computer vision perception, Dongpu Cao used a direct perception method to train a deep neural network in terms of increasing learning ability in relation to autonomous driving [7]. From the perspective of path planning, Li CC proposed a model-based dynamic environment path planning algorithm [8], and Jinkai Y proposed a hybrid path planning algorithm based on a simulated annealing algorithm and a particle swarm algorithm [9]. Different research angles have brought hope to the real realization of autonomous cars to some extent; however, they must be implemented with consideration of the control of the vehicle, so path tracking control will eventually grow in importance.
In the control of autonomous cars, Jain AK installed a Raspberry Pi and cameras on the top of the car. An image was sent to the convolutional neural network for manipulation prediction, and then the prediction signal was sent to the controller to make the vehicle move in the intended direction without human intervention [10]. Chen H proposed a new path-following control method and designed a three-step controller with output feedback to realize the coordinated control of the lateral and longitudinal directions without measuring the lateral speed [11]. Li L proposed a high-performance automatic steering control strategy, using the system state equation of direction angle and lateral offset deviation to describe the tracking accuracy, and the control method adopted the sliding mode variable structure control method [12]. Zhang H proposed the use of the Takagi-Sugeno model to deal with the time-varying characteristics of vehicle speed, as well as the use of Lyapunov stability parameters to improve the transient stability of the vehicle system [13]. Celentano L proposed a simple and robust smooth path tracking control method that allows unmanned electric vehicles to track a smooth reference signal [14]. Hain H proposed the use of a fuzzy controller to collect driver data while controlling an off-road vehicle. The data were used to develop the membership function of the input and output of the fuzzy controller, thereby improving the autonomous vehicle's path tracking ability [15]. Taking into account the conflict between tracking accuracy and stability under extreme conditions, Liang YX proposed a new path tracking controller based on yaw rate tracking [16]. Hang P proposed a control algorithm to establish a linear parameter change system model to achieve different longitudinal speeds and different road friction coefficients, and combined the use of feedforward control with linear quadratic regulators to increase tracking stability [17]. There are various vehicle motion control methods, but they are all aimed at improving control accuracy and stability. Among these control methods, model predictive control takes place earlier, and it uses non-minimized description models to improve the robustness of the system. It uses a rolling optimization strategy to make up for the uncertainty and has better dynamic performance [18], and the algorithm has the ability to deal with constraints systematically, so it is widely used to solve the path tracking problems of autonomous vehicles.
Falcone P first proposed a new automatic steering system method [19]. The designed model predictive controller emphasizes the trade-off between vehicle speed and required road preview to stabilize the vehicle. Then, Falcone P performed continuous online linearization of the complex nonlinear vehicle dynamics model [20], and also proposed a lowcomplexity linear time-varying model, which considers the state of the vehicle and input constraints to improve vehicle stability on slippery roads and at high speeds, and used a variety of optimization algorithms to extend the range of conditions for real-time MPC implementation. According to the literature [19,20], Falcone proposed a predictive model for the joint control of braking and steering of autonomous vehicles. On high-speed snowcovered roads, the vehicle can be better controlled to change lanes on two lanes [21]. For the problem of model mismatch caused by different road conditions and small angles of vehicle models, Guo HY adopted the form of measurable disturbance, and used differential evolution algorithm for the optimization problem of path tracker [22]. Yin GD designed a decentralized MPC controller, which considers the rear-end collision avoidance of the control area and the collision avoidance at intersections to improve traffic efficiency and safety [23]. He ZW proposed a two-layer controller for accurate and robust lateral path tracking control of highly automated vehicles. The upper controller is realized by assuming linear time-varying MPC at the small angle, and the slip angle is limited to ensure stability. The lower controller is a radial basis function neural network PID controller [24]. Peng HN proposed a robust model predictive control method with a finite time domain to realize the path tracking and direct yaw moment control of an electric vehicle independently driven by an autonomous four-wheel motor [25]. Based on the analysis of the sideslip angle, Tang LQ proposed a vehicle sideslip angle compensator that can correct the motion model prediction, which significantly improves the path tracking performance and the control ability at high speed [26]. Xu SB proposed the preview steering control algorithm and the concept of its closed-loop system analysis, and compared the model method with the MPC model based on the bicycle model [27]. Yao proposed an MPC model with longitudinal velocity compensation in the prediction range, and analyzed the longitudinal velocity change mechanism and the stability within the prediction range [28]. Sara M introduced a Tube-based MPC to consider the dynamic difference between the real vehicle and this constant nominal model, not only considering the lateral error, but also the directional error [29]. Michael J extended constraint removal to Tube-based MPC, detecting inactive constraints in advance, deleting invalid constraints, and reducing calculation time [30]. Shilp D used a combination of potential fields such as vehicle functions and reachability sets to identify safe zones on the road, and provided them to the Tubebased MPC, which can be free from non-convex collision avoidance constraints and ensure the feasibility of lateral movement during acceleration and deceleration [31]. Among the above MPC controller design processes, most chose the bicycle model to simplify the calculation of the algorithm, and used the small angle assumption to represent the tire force in the vehicle model. When the tire force enters the nonlinear region, errors will inevitably occur, which will affect the performance of the controller. Therefore, an MPC algorithm based on a nonlinear tire model is proposed: Replace the conventional tire force linearly expressed by cornering stiffness with the tire force expressed by the magic formula composite function, so that even if the tire force enters the nonlinear region, the tire force calculated by the magic formula is close to the tire force under real conditions. Avoid unnecessary errors caused by tire force in path tracking.
The main arrangement of this work is as follows. First, in the first section, a bicycle model and a non-linear magic formula tire model are established. In the second section, the complex partial derivative processing and matrix transformation related to the nonlinear tire model, as well as the prediction model, objective function and constraint conditions of the controller are introduced in detail. In the third section, a variety of constant working conditions and variable working conditions are selected, and the effectiveness of the controller is verified based on Carsim/Simulink simulation. In the fourth section, an active steering test platform based on LabVIEW-RT is established, and hardware-in-theloop testing is carried out to verify the actual control effect of the controller. The fifth section describes the conclusion.
Only the replacement of the linearly expressed tire force with the tire force expressed by a composite function is considered to verify the performance of the controller, so as to promote the improvement and research of the controller on this basis in the future.

Bicycle Model
Establishing a suitable vehicle model is the prerequisite and basis for realizing model predictive control. Since the main research goal is to make the car follow the desired path quickly and stably, the vehicle model needs to be simplified to a certain extent, and the bicycle model is used to transfer left and right without load, assuming that the vehicle has a good anti-lock braking system.
The plane motion of the vehicle is mainly considered as lateral, longitudinal and yaw motion. The vehicle is set as front-wheel drive and front-wheel steering, and the vehicle model is selected as a three-degree-of-freedom bicycle model [32]. In the plane rectangular coordinate system, the vehicle model is shown in Figure 1. According to Newton's second law, the force balance equations along the x-axis, yaxis and z-axis can be obtained.
In the x-axis direction: In the y-axis direction: Around the z axis: where m is the curb weight of the vehicle, x  and y  are the longitudinal and lateral speeds, xf F and yf F are the forces in the x and y directions received by the front tires, xr F and yr F are the forces in the x and y directions received by the rear tires, ϕ  is the yaw rate, z I is the moment of inertia of the vehicle around the z-axis, and f l and r l are the distances from the center of mass to the front and rear axles. The force received by the front and rear tires in the x and y directions is related to the longitudinal force and lateral force received by the front and rear tires. The relationship is as follows [32] Among them, the side slip angle of the tire is related to the longitudinal speed and the lateral speed, as shown in Equation (6) [32]: In the formula, xf ν and xr ν are the speeds of the front and rear wheels in the x direction, and yf ν and yr ν are the speeds of the front and rear wheels in the y direction.
The speed of the tires in the x and y directions is generally difficult to obtain, and can be calculated from the vehicle speed [33]: Therefore, the front and rear wheel slip angles can be obtained from Equations (7) and (8).
Assuming that the vehicle has a good anti-lock braking system, the adhesion coefficient reaches the maximum when the tire slip rate s is 15-20%. In order to achieve the best braking effect, the slip rate needs to be controlled at 15-20% Therefore, the slip rate is a constant value of 20%.
Since the load transfer of the vehicle is not considered, assuming that the vehicle speed changes slowly and there is no load transfer of the front and rear axles, the vertical loads zf F and zr F of the front and rear wheels can be expressed as [33]: The above formulas are derived from the body coordinate system, and the relationship conversion between the body coordinate system and the inertial coordinate system needs to be considered [33]: In the formula, ϕ is the yaw angle, X is the longitudinal position in the inertial coordinate system, and Y is the horizontal position in the inertial coordinate system.

Magic Formula Tire Model
In order to reduce the amount of calculation in most of the current path tracking algorithm models, the small angle assumption is used in Equation (5) to approximate the longitudinal force and lateral force of the tire. When the tire slip angle and longitudinal slip rate are small, the tire force can be linearly approximated as: , In the formula, l C is the tire longitudinal stiffness, and c C is the tire cornering stiffness. The use of Equation (11) has a certain limit range, and only when the lateral acceleration y a is less than 0.4 g can it have a higher fitting accuracy for conventional tires. If you consider that at a high speed or when the road adhesion coefficient is low, when the lateral acceleration of the vehicle is greater than 0.4 g at a certain moment, the tire longitudinal force and lateral force at that moment are substituted into the control algorithm model, and there will be a certain error in the calculation result. Because the increase in tire force at this time becomes slower with the increase in slip rate and cornering angle, the tire force calculated with the small-angle linear assumption is obviously greater than the tire force under real conditions. In order to make the model more accurate, the path tracking algorithm model is based on the magic formula tire model [34], replacing the small angle hypothesis of Equation (11) with the magic formula. When the vehicle is running, the camber angle is generally small. The influence of the camber angle on the tire longitudinal force can be ignored, and the empirical parameters related to the camber in the magic formula can be ignored. Ignore the parameters related to zero-point drift, ignore the empirical parameters that cause asymmetry in the formula, and ignore the higher-order terms more than 3 times; thus, the simplified magic formula is as follows: In the purely longitudinal case, the longitudinal force is [34]: In the formula: In the case of pure sideslip, the lateral force is [34]: In the formula: In the mixed case of longitudinal sideslip [34]: The longitudinal force is: In the formula: c o s a r c t a n . x The lateral force is: In the formula: Combining Equations (12)-(17) with the parameters in Table 1, the longitudinal force and lateral force of the front and rear wheels can be calculated. Equation (5) can be expressed as follows: In the formula: It can be seen from Equation (18) that the longitudinal force and lateral force of front and rear tires are only related to their respective slip angles. By substituting the above equation into Equation (4), the forces received by the front and rear tires in the x direction and the y direction are: Substituting Equation (19) into Equations (1)-(3), and combining Equation (10), we can obtain the vehicle dynamics nonlinear model based on the magic formula tire model: cos sin The selected tire type is 175/70 R13 (asymmetric). The specific parameters of the tire based on the magic formula are as follows:

Parameter Name
Parameter Value Parameter Name Parameter Value

Prediction Model
Convert Equation (20) in vehicle dynamics model into state space form [33]. Select lateral velocity y  , longitudinal velocity x  , yaw angle ϕ , yaw rate ϕ  , lateral offset Y , and longitudinal position X as the state variable In Equation (20) (6)- (8). Therefore, in the control system, the control variable is selected as = δ f u . The general form of the state equation is as follows: The general vehicle path tracking control will give a reference path to realize the control tracking of the actual vehicle. The state variable and control variable of the reference vehicle at each time satisfy the above equation, and d represents the reference variable, so the form becomes: In the formula: Perform a Taylor expansion of Equation (21) at any reference trajectory point, ignoring higher-order terms, and obtain [33]: Subtract Equations (22) and (23) to obtain: In the formula, the A matrix is the first order partial derivative matrix of f to x , and the B matrix is the first order partial derivative matrix of f to u . (24) is the state equation, but the state equation is continuous. The model predictive controller is a discrete-time control method, so Equation (24) needs to be discretized [33]: In the formula, T is the sampling time, and I is the 6 6 × unit matrix.
The new discretized state space model is [33]: In the formula:  T  T  T  y  x  x  x  x  T  T  T  y  x  T  k   T  T  T  y  x  T  T  T x  y  T  T  T In the above formula, the partial derivatives of the side slip angle of the front and rear wheels Since the control variable is the front steering angle, in order to ensure the normal running of the vehicle and prevent sudden changes in the front steering angle, it is necessary to limit the front steering angle increment, so the control variable in Equation (26) is converted into a control increment [33]: In the formula: The target path tracking needs to select the output of the state equation. The selected output is the yaw angle and the lateral offset. The former can be used to track and detect the forward direction of the vehicle, and the latter can be used to track and detect the forward position of the vehicle, and the output equation of the prediction model [33] is as follows [33]: In the formula: (27) and (28) as a complete prediction model, Equation (29):

Output in the Forecast Time Domain
It is assumed that the prediction time domain is p N , the control time domain is c N , and the prediction time domain is greater than the control time domain. Based on Equation (29), it is predicted that c N control increments in the control time domain will act on the system. When time k is in the control time domain between the time domain and the prediction time domain, the input control amount of the system remains unchanged, and the control increment is 0. After derivation, the system's predicted output expression can be obtained [33]: In the formula:

Objective Function Design
The objective function is the performance standard of the system. To ensure that the unmanned vehicle can quickly and smoothly follow the target path and reflect its tracking ability, it is also necessary to optimize the deviation and control of the system state variable. It is necessary to ensure that the control increment in each sampling period is constrained to avoid sudden changes. Therefore, referring to the soft constraint method used in the literature [35], the selected objective function form is as follows: In the formula, ρ is the weight coefficient, ε is the relaxation factor, and ,

Q R
are the output weighting matrix and the control weighting matrix, respectively. The first item represents the accumulation of deviations between the output variable and the reference value of the output variable, which reflects the ability to follow the reference trajectory, and the second item is the accumulation of deviations of the control variable, which reflects the requirement for the steady change of the control variable. The third item ensures that there is a feasible optimal solution when changing in real time. The output weighting matrix: The control weight matrix: .
In order to simplify the calculation, the control increment matrix A is taken as a single design variable, so the objective function [36] after matrix transformation is as follows: In the formula:

Design of Constraints
The constraint conditions of model predictive control generally include control variable constraint, control increment constraint and output variable constraint. In real vehicle driving scenarios, the front steering angle has a certain range limit, so the actual situation should be considered when designing the controller, and the control variable front steering angle should be restricted. At the same time, in order to consider the stability of the vehicle, the constraint on the control increment is also indispensable, and the change range of the control increment cannot be too large. In addition, in order to avoid excessive deviation from the target path, it is necessary to refer to the target path to constrain the output yaw angle and lateral offset [36].
Impose constraints on the control amount: In the formula, Impose constraints on the control increment: In the formula, In the formula,

Simulation
In order to verify the performance of the proposed MPC controller based on the nonlinear magic formula tires, a simulation test was carried out using the control function of Matlab/Simulink and Carsim's vehicle dynamics model and vehicle operating environment platform.

Parameter Selection
Select the E-Class Sedan model in Carsim for simulation, and the main parameters are shown in Table 2.   Tables 1 and 2, the relationship between the lateral force of the tire and the tire slip angle is shown in Figure 2. In line with [33], in the lateral tracking ability experiment of unmanned vehicles, the front wheel of the vehicle is continuously turned from the left extreme position to the right extreme position. Record the corresponding time and position, and then you can measure the limit value and time of the front steering angle in clockwise and counterclockwise directions. Therefore, the constraint on the front steering angle and the front steering angle increment and the constraint on the output based on the double-shifting reference target path are shown in Equation (36)

Reference Path Selection
In the test of vehicle handling and stability, the double lane change is used widely [37,38], so the selected reference path equation is as follows [21] ( ) ( ) In the formula: The reference path is shown in Figure 3.:

Simulation Results of Constant Speed Conditions
The controller, designed based on the magic formula tire 175/70 R13 (asymmetric), takes into account the situation in which the tire part enters the nonlinear region. It is referred to as controller A below. In order to reflect the performance of controller A, it is compared with the conventional model predictive controller B. Controller B does not consider the tire entering the nonlinear region, and is only designed based on the simplification of the tire's longitudinal stiffness and cornering stiffness. The stiffness parameters of the magic formula tire are: The simulation results are shown in Figure 4a-f, Figure 4a is the comparison chart of the tracking reference path, Figure 4b is the comparison chart of the front steering angle, Figure 4c is the comparison chart of the yaw rate, Figure 4d is the comparison chart of the side slip angle of the center of mass, Figure 4e is the comparison chart of lateral acceleration, and Figure 4f is the comparison chart of the tire lateral force.
First of all, it can be seen from Figure 4e that the lateral accelerations of controller A and controller B are both within 0.4 g when the vehicle speed is 36 km/h and the adhesion coefficient is 0.8. Furthermore, it can be seen from Figure 2 that the saturation value of the tire force is about 3.6 kN; combined with Figure 4f, it can be seen that the tire lateral force is in the linear region. At this time, it can be seen from Figure 4a that in the interval of 0-70 m, the tracking effects of controller A and controller B are similar, but in the interval of 70-120 m, it is obvious that the tracking effect of controller A is better than that of controller B. Although the tire force is in the linear region at this time, controller A can more accurately describe the tire forces, while controller B describes the simplified linear tire forces, so the accuracy of controller A is better than that of controller B. From Figure 4bd, it can be seen that the front steering angle, yaw rate and side slip angle of controller A and controller B are relatively close, and the magnitude and shape of the change are similar. Although controller A generates two small fluctuations in the range of 6-10 s, controller A's is smaller than controller B's in terms of peak value. In summary, it can be seen that when the lateral acceleration is less than 0.4 g and the tire lateral force is in the linear region, the performance of the two controllers is close, and they can track the reference path well and smoothly, and the overall performance of controller A is slightly better.  (2) Increase the vehicle speed from 36 km/h to 72 km/h, the road adhesion coefficient is still 0.8, and the parameters of the controller are: The simulation results are shown in Figure 5a-f, Figure 5a is the comparison chart of the tracking reference path, Figure 5b is the comparison chart of the front steering angle, Figure 5c is the comparison chart of the yaw rate, Figure 5d is a comparison chart of the side slip angle of the center of mass, Figure 5e is the comparison chart of lateral acceleration, and Figure 5f is the comparison chart of tire lateral force.
It can be seen from Figure 5a that when the vehicle speed increases to 72 km/h, the tracking effects of controller A and controller B are similar in the 0-50 m interval. In the interval of 70-85 m, the tracking effect of controller A is not as good as that of controller B, but at 60 m, the peak of controller A is closer to the reference path, and in the interval of 85−120 m, controller A can control the vehicle to track the reference path earlier. On the whole, the tracking accuracy of controller A is better than that of controller B. From Figure  5b-d, the change amplitude and shape of the front steering angle, yaw rate and side slip angle of controller A and controller B are still similar. Combining the three figures and Figure 5a, it can be seen that the tracking accuracy of the two controllers is similar within 0-2 s, but the front steering angle, yaw rate and side slip angle of controller A are all smaller than that of controller B. In the 4-6 s interval, controller A is inferior to controller B. This is because during this period, controller A sacrifices some stability to increase the tracking accuracy and can control the vehicle closer to the reference path more quickly and effectively. It can be seen from Figure 5e that the lateral acceleration of the vehicle under the action of controller B is greater than 0.4 g for some time. In combination with Figure 5f, it can be seen that the tire lateral force has been saturated within 2~4 s, which indicates that the vehicle model has entered the nonlinear region during this period. The linear tire model of controller B cannot accurately describe the tire force, which affects the tracking accuracy and stability of the vehicle. The lateral acceleration of the vehicle in controller A is less than 0.4 g, and the tire force is still in the linear region. The tracking accuracy and vehicle stability are better than that of controller B. In summary, controller B tends to be unstable under this working condition, and controller A can still control the vehicle to track the reference path more smoothly and effectively. (3) The vehicle speed is maintained at 72 km/h, the road adhesion coefficient is 0.3, and the parameters of the controller are: The simulation results are shown in Figure 6a-f, Figure 6a is the tracking reference path diagram of controller A and controller B. Figure 6b is a diagram of the front steering angle of controller A. Figure 6c is the yaw rate diagram of controller A. Figure 6d is a diagram of the side slip angle of the centroid of controller A. Figure 6e is the lateral acceleration diagram of controller A. Figure 6f is the tire lateral force diagram of controller A.
When the vehicle speed remains at 72 km/h and the road adhesion coefficient decreases from 0.8 to 0.3, it is clear that controller B in Figure 6a cannot keep up with the reference path, so only the performance effect of controller A needs to be analyzed.
From Figure 6e, it can be seen that, due to the reduction in the road adhesion coefficient, the peak value of the lateral acceleration of the vehicle exceeds 0.4 g. According to Figure 6f, within 2-6 s, the tire lateral force approaches and partially exceeds the saturation value, and the vehicle model enters the nonlinear region. In Figure 6b, the maximum front wheel rotation angle has reached 12 degrees. The maximum yaw rate in Figure 6c and the maximum lateral deflection angle of the center of mass in Figure 6d

Reference Path Selection
The vehicle speed is changed from a constant speed to a variable speed, and a snake path is selected for the test. The reference path equation is as follows: The reference path diagram is as follows:

Simulation Results of Variable Speed Conditions
In order to investigate the robustness of the controller to the change of vehicle speed, the vehicle speed is set to increase from 36 km/h to 72 km/h within 0 to 10 s, and then maintain a constant speed of 72 km/h. In order to prevent the vehicle from losing control at high speeds, the road adhesion coefficient is set to 0.8, the reference path is the snake path in Figure 7, and the speed change is shown in Figure 8.
The simulation results are shown in Figure 9a-e: Figure 9a is the comparison chart of the tracking reference path, Figure 9b is the comparison chart of the front steering angle, Figure 9c is the comparison chart of the yaw rate, Figure 9d is a comparison chart of the side slip angle of the center of mass, Figure 9e is the comparison chart of the lateral acceleration, and Figure 9f is the comparison chart of the tire lateral force.
It can be seen from Figure 9a that the tracking accuracy of the vehicle is better in the low speed stage of 0-80 m. As the vehicle speed increases, the tracking accuracy of controller B gradually decreases; while controller A can still maintain good tracking accuracy, several peaks of controller A are closer to the reference path, and the overall tracking effect of controller A is significantly better than that of controller B. Figure 9b-d show that at 12 s, the peak value of controller B is higher than that of controller A, indicating that controller B is inferior to controller A in controlling the vehicle stability at high speeds. At 14 s, the peak value of controller A is larger, because the control adaptability of controller A is stronger. With reference to Figure 9a, in the 200-250 m interval, the vehicle speed has reached 72 km/h at this time. Under the action of controller A, the vehicle can track the reference path more quickly and accurately. It can be seen from Figure 9e that the lateral accelerations of both controllers exceed 0.4 g at 10 s. Furthermore, it can be seen from Figure 9f that at about 10 s, part of the tire lateral force has reached the saturation value, and after 14 s, the tire lateral force of controller B has chattering. The linear calculation of the tire force of controller B is quite different from the real tire force. The accumulated error will affect the later tracking control effect. In contrast to controller A, the tire force calculation is closer to the real tire force, so it can still maintain a better tracking effect. In summary, in the variable speed condition, controller A can still maintain better tracking accuracy and vehicle stability than controller B.

Hardware in the Loop Experiment
The simulation analysis in the third section preliminarily verifies the performance effect of controller A under constant speed and variable speed conditions. In order to verify the actual effect of the controller, a hardware-in-the-loop test platform based on Labview-RT is established in this section. In the hardware-in-the-loop test, although commercial simulation software is used to replace the real vehicle, the steering actuator and control system are complete physical objects. Therefore, hardware-in-the-loop testing is used by many automobile manufacturers to verify the logic of vehicle path tracking control and vehicle stability control. The test plan is shown in Figure 10 [39][40][41]. The simulation software Carsim is embedded in the automation platform PXI real-time system, and the vehicle status and road information are transmitted to the dSPACE controller through the PXI CAN card. The designed control scheme is stored in dSPACE, and the active steering angle is calculated in real time based on the vehicle status and road information transmitted by PXI. The steering signal is transmitted to the underlying controller, and the underlying controller drives the steering motor and the resistance loading system to execute the angle signal. The steering wheel is controlled to complete the angle change. The angle sensor attached to the steering wheel mechanism collects the actual steering steering angle, and then transmits the angle signal back to Carsim through the PXI CAN card. The computer collects the motor current graph and the vehicle dynamic response graph in Carsim. Through the above steps, the hardware-in-the-loop test is completed. Comparing Figures 5a and 11a, the path tracking effects of the two controllers in simulation and experiment are similar. Controller A is closer to the reference path at 60 m, while controller B is slightly better at 60-80 m, but controller A can keep up with the reference path more quickly and effectively after 80 m. The amplitudes and shapes of the experimental graphs 11b-d and simulation graphs 5b-d are also similar. The peak value of controller A is smaller than that of controller B. It can be seen from Figure 11e that the lateral acceleration of controller A is still within 0.4 g, while the upper and lower peaks of controller B exceed 0.4 g. Furthermore, it can be seen from Figure 11f that the tire lateral force reaches its saturation value within 2-3 s. After the tire force enters the nonlinear region, the tire force calculated by controller B has errors in terms of the real tire force, and the accumulation of errors affects the later tracking accuracy and vehicle stability. Figure 11g is the collected motor current graph. It can be clearly seen that the current of controller B has reached ±30 A, while the current of controller A is only within ±20 A. After 8 s, the motor current of controller B is still fluctuating, while the motor current of controller A tends to be stable. The overall noise fluctuation of controller A is small, the current is more stable, and the response speed is faster. In summary, considering the path tracking accuracy and vehicle stability, the effect of controller A is better.

Conclusions
In this paper, a model predictive algorithm controller, based on a nonlinear tire model, is designed. It is used to reduce the calculation error of the tire force of the vehicle in the case of poor road conditions, high speed, etc., to avoid the deterioration of the path tracking effect due to excessive error. In the controller, the tire forces are characterized with nonlinear composite functions of the magic formula instead of a simple linear relation model. In the design of the controller, Taylor expansion is used for linearization, the first-order difference quotient method is used for discretization, and the partial derivative of the composite function is used for matrix transformation. Constant velocity and variable velocity conditions are selected to compare the designed controller with the conventional linear tire force controller in Carsim/Simulink. The results show that when the tire force does not fall into the nonlinear region, the stability of the two controllers is similar. The tracking accuracy of the controller designed in this paper is slightly better. However, after the tire force enters the nonlinear region, the effect of the controller, when using linear tire force, becomes worse, the tracking accuracy is far worse than the controller when using the magic formula tire design, and the vehicle stability is also degraded. In addition, a semi-physical test platform based on the LabVIEW-RT system was established, and hardware-in-the-loop test experiments were carried out. The test results verified the effectiveness of the designed controller. In order to further improve the tracking performance and stability of unmanned vehicles, the MPC model, based on nonlinear tires, that is proposed in this study will continue to be expanded in the future, so that autonomous vehicles can effectively operate in more complex and realistic traffic scenarios.