Trajectory Tracking Control for Four-Wheel Independent Drive Intelligent Vehicle Based on Model Predictive Control

For four-wheel independent drive intelligent vehicle, the Model Predictive Control (MPC) is adopted to design the trajectory tracking controller through active steering and four-wheel independent drive/brake. The control objective is to follow a desired trajectory while taking into account the control actuator constraints and vehicle dynamic stability constraints. To reduce the computational complexity, a linear time-varying model predictive controller is designed to linearize the nonlinear vehicle model locally at each sampling point. The co-simulation of CarSim/Simulink shows that the designed controller has high tracking accuracy on the basis of ensuring vehicle stability and strong robustness to vehicle velocity and road adhesion coefficient. The trajectory tracking accuracy based on MPC is better than that of the preview driver model (PDM).


I. INTRODUCTION
The electricity and intelligence of automobiles aim to improve driving safety, reduce traffic congestion and emissions, and improve energy efficiency, which are one of the trends in the development of automotive technology [1]. It has broad application prospects in the intelligent transportation and military field in the future [2], [3].
As one of the key technologies of intelligent vehicles, many scholars have studied the trajectory tracking and proposed many control strategies. MacAdam established a preview optimal control driver model which used optimal control theory to calculate the steering wheel angle [4]. Guo et al. proposed the preview-following system theory for the first time and established the driver preview optimal curvature model [5]. Jiang et al. used a new approach rate to design trajectory tracking controller based on sliding mode control, which improved the approach speed of the state and eliminated chattering [6]. Soudbakhsh et al. designed a trajectory tracking controller using sliding mode control and compared it with the LQR controller, which had a better tracking effect on yaw angle than the LQR controller [7]. In [8]- [12], MPC was used to implement trajectory tracking control so The associate editor coordinating the review of this manuscript and approving it for publication was Zhiwu Li . that the vehicle had high tracking accuracy while ensuring stability, however, the online optimization of MPC was time-consuming and required high model accuracy. A trajectory tracking controller was constructed based on robust backstepping sliding mode control theory, which was superior to sliding mode controller in terms of trajectory tracking accuracy and convergence speed [13]. Calzolari et al. compared eight typical trajectory tracking controllers and analyzed the advantages and disadvantages of each controller in suppressing model uncertainty, noise and disturbance [14]. In order to describe the time-varying characteristics of vehicle parameters, a linear time-varying vehicle lateral dynamic model was designed in [15] and a robust variable gain controller was designed based on the linear matrix inequality to ensure trajectory tracking accuracy and system robustness. In [16], Xia et al. designed a highly robust trajectory tracking controller based on active disturbance rejection control (ADRC). Wu et al. constructed a sliding mode ADRC based on terminal sliding mode control and ADRC control, which tracked the desired trajectory accurately and quickly while ensuring vehicle stability [17].
Four-wheel independent drive intelligent vehicle can achieve independent driving and regenerative braking for each wheel, which reduces the transmission mechanism, improves energy utilization efficiency and driving performance, however, the control system is more complicated [18]. The first problem is the nonlinearity of vehicle dynamics, especially the longitudinal and lateral characteristics of tires. The second problem is over-actuated which is described as five control variables (steering angle, driving torques of four wheels) more than the controlled state and control variables need to be allocated according to a certain objective function. MPC has obvious advantages in dealing with multi constraints and multi coupling problems. However, the nonlinear model predictive control (NMPC) requires complex solving technique and it is difficult to obtain a global optimal solution [19]. In this paper, the trajectory tracking controller is designed by local linearization of nonlinear vehicle dynamic model.
The rest of this paper is organized as follows: in section II, nonlinear vehicle and tire models are established for controller design. The CarSim vehicle model is established as the control plant according to the experimental data. Section III trajectory tracking controller based on MPC is designed. In section IV, the performance of the controller is evaluated using the Carsim/Simulink co-simulation platform under different conditions. Conclusions are achieved in Section V.

II. SYSTEM MODEL A. VEHICLE DYNAMIC MODEL
The vehicle model needs to be simplified in order to design the trajectory tracking controller. The trajectory tracking needs to control the longitudinal movement, lateral movement and yaw movement of the vehicle, so their characteristics need to be analyzed. According to Newton's second law, the motion equations of the vehicle mass center along the X-axis, Y-axis and around the Z-axis as well as four wheels can be obtained. The nonlinear dynamic model of the vehicle is established.
Longitudinal motion: Lateral motion: Yaw motion: The rotation of four wheels: where m is vehicle mass. J Z is yaw moment of inertia. F xi and F yi denote the longitudinal and lateral tire forces respectively, where i = 1, 2, 3, 4 denote the front left, front right, rear left and rear right wheel respectively. V x and V y are vehicle longitudinal and lateral speed. ϕ is vehicle yaw angle. δ is steering angle. c is wheel track. l a and l b denote the distance from center of mass to front and rear axle respectively. T i is the driving torque or braking torque of each wheel. J wi is the rotational inertia of each wheel. R i is wheel effective rolling radius. w i is angular speed of each wheel. B i is viscous resistance coefficient. Seven-DOF (Degrees of freedom) vehicle dynamic model is shown in Fig. 1. The plane motion equation of the vehicle in the inertial coordinate system is: where V X and V Y are the longitudinal and lateral speed of the vehicle in the inertial coordinate system respectively. The longitudinal and lateral tire forces are affected by various factors such as the longitudinal slip ratio, side slip angle, vertical load, road friction coefficient, camber angle, turn-slip properties, etc., among which turn-slip properties has a great influence on tire force only when the vehicle is steering at low speed. The camber angle of modern vehicles is small so the effects of camber and turn-slip properties on the longitudinal and lateral tire forces can be ignored. The longitudinal and lateral tire force under the combined conditions of side slip and longitudinal slip can be expressed as [20]: where α i is the side slip angle of the tires, κ i is the longitudinal slip ratio of the tires, µ i is tire-road friction coefficient, F zi is vertical tire load. The vertical load is mainly composed of four parts: the vertical load caused by the stationary vehicle, the load transfer caused by longitudinal acceleration, the load transfer caused by lateral acceleration and the coupling of the two. The calculation formulas of vertical tire loads are [21]: where H is the height of the center of gravity, L is the wheelbase.
The side slip angles are:

B. TIRE MODEL
Tires are highly nonlinear and there have been many models to describe this nonlinear characteristic, the most influential of which are the magic formula proposed by Pacejka and the UniTire proposed by Guo [22]. The semi-empirical magic formula has become one of the most widely used tire models in the industry due to its high fitting accuracy. In this paper, Pacejka 5.2 is used. The model parameters are obtained by nonlinear least squares fitting of tire experimental data. The tire mechanical properties are shown in Fig. 2.

C. CARSIM VEHICEL MODEL
According to CarSim modeling requirements, experiments are performed on the test vehicle. The experimental data is processed and filled into the CarSim interface. Corresponding subsystem experiments include tire experiments, steering system experiments, shock absorber experiments, spring experiments and suspension K&C characteristics experiments etc., [23]. In order to verify the accuracy of the established vehicle model, it is necessary to compare the CarSim simulation results with the real test results under specific conditions, as shown in Fig. 3.

III. DESIGN OF MODEL PREDICTIVE CONTROLLER
The structure of the trajectory tracking controller is shown in Fig. 4. Considering the longitudinal, lateral, yaw motion of the vehicle and the vehicle's displacement in the inertial coordinate system, the state variables are selected as: The driving force / braking force of the four wheels and steering angle of the distributed driving intelligent vehicle can VOLUME 8, 2020 be independently controlled, so the driving force / braking force of the four wheels and steering angle are selected as the control variables: In order to make the vehicle accurately track the desired trajectory, it is necessary to control the longitudinal speed of the vehicle and maintain stability. Select the longitudinal speed V x , yaw angle ϕ and lateral coordinates Y as the control output variables. Four tire side slip angles are soft-constrained output variables: The state space equation and output equation of the model predictive controller can be obtained by substituting the nonlinear vehicle dynamic model into the above equations:

A. LINEARIZATION AND DISCRETIZATION OF THE MODEL
NMPC requires complex numerical solution technique.
To reduce the computational complexity, the NMPC problem is transformed into a linear time-varying MPC problem through local linearization [10]. The tire side slip angle is the arctangent function of the state variable. The derivative of the state variables requires a complicated calculation method. Considering that front wheel angel and tire side slip angle are small under general conditions, the tire side slip angle is appropriately limited to a certain range and the following approximate calculations are performed: According to equation (12), the nonlinear dynamic system can be expressed as: The nonlinear system (15) is discretized by first-order difference and locally linearized, and transformed into the following discrete linear time-varying system: The discrete state space equation can be obtained: where To reduce the complexity of the control algorithm, simplification is done as follows: The discrete output equation is: where Simplification as follows: e k,t is presented as follows: whereη The definition of the optimization objective function is shown in Eq. (22), where the first term is a penalty for the error between the control output and the reference output, the second term is a penalty for the control increment, reflecting the requirement to smooth control variable changes, the third term is a penalty for the control variable, which reflects the energy requirements and the fourth term introduces a relaxation factor to ensure that the objective function is replaced by a suboptimal solution when there is no optimal solution in the control period. where Therefore, the following optimization problem is obtained according to the working point ξ (t) and µ(t −1) of the vehicle VOLUME 8, 2020 at the moment: min where η ref is reference output; η tr is control output; η sc is soft-constrained output; ρ is relaxation factor; H c is control horizon; H p is predictive horizon; Q, R, S are weighted matrixes for control output, control increment and control variable.

C. CONSTRUCT CONSTRAINTS 1) CONTROL VARIABLE CONSTRAINTS
The control variable and control increment constraints depend on the achievable capabilities of the steering system and the drive/brake system. The maximum tangential force on the ground is limited by the road adhesion conditions. When the current road friction coefficient, tire side slip angles and vertical loads are known, the longitudinal force is only a function of the longitudinal slip ratio. The maximum and minimum of the longitudinal force within a certain slip ratio can be obtained. Considering the calculation error, the maximum longitudinal force is modified. The range of longitudinal force values is: where ρ is 0.9; F xi min is the minimum longitudinal force; F xi max is the maximum of longitudinal force.

2) TIRE SIDE SLIP ANGLE CONSTRAINTS
In literature [24], vehicle stability was judged by the difference between the actual yaw rate and the ideal yaw rate. When the error is greater than the threshold, the vehicle can be considered to be in an unstable state. The ideal yaw rate can be determined by the yaw rate and road adhesion condition during the steady state steering of the linear two-DOF model.
where c 1 is error weight coefficient; K is vehicle stability factor.
The literature [25]- [26] analyzed the influence of sideslip angle on the vehicle stability through the phase plane and gave the criteria for judging the vehicle stability.
where C 2 and C 3 are the correlation coefficients. The literature [27] gave the range of sideslip angle related to the road adhesion coefficient when the vehicle maintains stability. The value range is limited by an empirical inequality.
|β| ≤ arctan(0.02µg) (28) The above stability judgment criteria are obtained through simplified analysis of vehicle models or based on experience. The primary cause of the vehicle's lateral instability is the saturation of the lateral force. In order to prevent the vehicle from side slipping, this paper only restricts the tire side slip angle appropriately.

IV. SIMULATION AND RESULTS ANALYSIS
In order to verify the effectiveness of the controller proposed in this paper, the CarSim/Simulink co-simulation platform was built for the simulation experiment of double lane change trajectory tracking. Double lane change trajectory was referenced in [10]. The simulation road is a high adhesion road with a road friction coefficient of 0.8 and the simulated vehicle velocity is 80 and 90 km/h. The influence of tire side slip constraint on trajectory tracking performance and the robustness of MPC controller to road friction coefficient are discussed. In order to achieve the comparison of trajectory tracking performance, this paper introduces preview driver model (PDM) in CarSim. The preview time is 0.6s. Except for the traditional four-wheel independent drive of the powertrain, all other parameters of the simulation vehicle remain unchanged.

A. SCENARIO 1
The vehicle velocity is 80km/h and the road friction coefficient is set to 0.8. The simulation results are shown in Fig. 5. Fig. 5 (a), (b) and (c) show the trajectory tracking simulation results of the two controllers. When the MPC controller is adopted, the maximum of lateral deviation between vehicle trajectory and reference trajectory is 2.06m and the root mean square (RMS) of lateral deviation is 0.65m. The maximum of deviation between the yaw angle and the expected value is 7.58 • and the RMS of the deviation is 2.76 • . The maximum of deviation between the vehicle velocity and the expected value is 0.31 km/h and the RMS of the deviation is 0.10 km/h. When the PDM controller is adopted, the maximum of lateral deviation between vehicle trajectory and reference trajectory is 2.41m and the RMS of lateral deviation is 0.90m. The maximum of deviation between the yaw angle and the expected value is 14.55 • and the RMS of the deviation is 4.88 • . The maximum of deviation between the vehicle velocity and the expected value is 2.68 km/h and the RMS of the deviation is 1.21 km/h. It can be seen that the trajectory tracking accuracy of the MPC controller is better than that of the PDM controller under this condition. Fig. (d) shows the front wheel angle under the action of two controllers. The maximum of front wheel angle controlled by MPC is 5.82 • , while that controlled by PDM is 17.97 • . The output steering angle of the MPC controller is small and changes smoothly. This is because the MPC controller restricts the steering angle and considers smooth change of the control variable in the objective function. During steering, the MPC controller provides an additional yaw moment by controlling the driving force of the four wheels. In addition, the predictive function of the MPC controller enables the vehicle to turn in advance. Fig. (e) shows the sideslip angle of vehicle under the action of two controllers. The maximum of sideslip angle controlled by VOLUME 8, 2020 MPC is 3.50 • while that controlled by PDM is 6.57 • , both of which are lower than the limit value of 8.91 • when the vehicle maintains stability [27]. Fig. (f) shows the tire side slip angle controlled by MPC. The maximum of tire side slip angles of the four wheels are 4.56 • , 6.33 • , 3.92 • and 3.94 • . The right front wheel is beyond the constraint range of tire side slip angle, which is due to the influence of steering system, wheel positioning parameters, suspension deformation and other factors. Because the existence of steering trapezoid and the change of the toe-in angle caused by the wheel jouncing, the output side slip angles of two front wheels are not same exactly under the MPC control. Fig. (g) shows the tire side slip angle controlled by PDM. The maximum of tire side slip angles of the four wheels are 23.13 • , 26.51 • , 6.99 • and 7.21 • . Fig. (h) shows the driving/braking torques controlled by MPC. The maximum of driving/braking torques of the four wheels are 277.72Nm, 181.29Nm, 244.65Nm and 163.80Nm, respectively, all within the constraint range.

B. SCENARIO 2
The vehicle velocity is 90km/h and the road friction coefficient is set to 0.8. The simulation results are shown in Fig. 6. Fig. 6 (a), (b) and (c) show the trajectory tracking simulation results of the two controllers. When the MPC controller is adopted, the maximum of lateral deviation between vehicle trajectory and reference trajectory is 2.88m and the RMS of lateral deviation is 0.97m. The maximum of deviation between the yaw angle and the expected value is 10.14 • and the RMS of the deviation is 3.66 • . The maximum of deviation between the vehicle velocity and the expected value is 0.28 km/h and the RMS of the deviation is 0.11 km/h. When the PDM controller is adopted, the maximum of lateral deviation between vehicle trajectory and reference trajectory is 3.24m and the RMS of lateral deviation is 1.31m. The maximum of deviation between the yaw angle and the expected value is 20.72 • and the RMS of the deviation is 8.77 • . The maximum of deviation between the vehicle velocity and the expected value is 5.01 km/h and the RMS of the deviation is 2.19 km/h. It can be seen that the trajectory tracking accuracy of the MPC controller is better than that of the PDM controller under this condition. Fig. (d) shows the steering angle under the action of two controllers. The maximum of steering angle controlled by MPC is 6.10 • , while that controlled by PDM is 20.26 • . There is a big difference between the two control. Fig. (e) shows the vehicle sideslip angle under the action of two controllers. The maximum of sideslip angle controlled by MPC is 3.87 • , which is less than the limit value 8.91 • when the vehicle maintains stability [27]. Controlled by PDM, the maximum of sideslip angle is 14.21 • and the vehicle is unstable. Fig. (f)

C. MPC CONTROLLER ROBUSTNESS TO ROAD FRICTION COEFFICIENT
The reference vehicle velocity in the MPC controller is 70km/h and the road friction coefficient is set to different level. The simulation results are shown in Fig. 7 when the road friction coefficient changes. Table 1 shows the maximum and RMS of the deviations between simulation values (the lateral position, yaw angle, vehicle velocity) and expected ones, and the maximum of the vehicle sideslip angle under different road friction coefficients. When the road friction coefficient changes, the MPC controller still maintain a good control effect, so the MPC controller own strong robustness to the road friction coefficient change. However, the trajectory tracking accuracy becomes worse and the maximum of sideslip angle increases with the road friction coefficient decreases.

D. EFFECT OF TIRE SIDE SLIP ANGLE CONSTRAINT ON TRAJECTORY TRACKING PERFORMANCE
The reference vehicle velocity in the MPC controller is 70km/h and the road friction coefficient is set to 0.8. The simulation results are shown in Fig. 8 when the tire side slip angle constraint changes. Table 2 shows the maximum and RMS of the deviations between the simulation values (lateral position, yaw angle, vehicle velocity) and expected values, and the maximum of the vehicle sideslip angle under different tire side slip angle constraints. It can be known from Table 2 that appropriate tire side slip constraint can improve the trajectory tracking accuracy. The maximum of vehicle sideslip angle decreases as the tire side slip constraint decreases. When the tire side slip angle constraint is set to 2 • , it can be seen from the comparison that the vehicle trajectory tracking effect is poor but the maximum of the vehicle sideslip angle is small. This is because the lateral force of the tire can be controlled in the linear region to prevent vehicle instability under the constraint of small sideslip angle. However, in order to meet the tire side slip angle constraint, the vehicle needs to be more conservative when turning (Especially the vehicle takes a long time to follow the desired trajectory when passing through a curve with high curvature). When the tire side slip angle constraint is set to 6 • , the vehicle deviates from the desired trajectory after turning. Therefore, appropriate tire side slip angle constraint can improve the trajectory tracking accuracy while ensuring vehicle stability.

V. CONCLUSION
For four-wheel independent drive intelligent vehicle, a linear time-varying model predictive trajectory tracking controller is designed by locally linearizing a nonlinear vehicle model in this paper. The controller tracks the desired vehicle velocity and the reference path simultaneously. The problems of nonlinearity, overdrive, and control saturation of the four-wheel independent drive intelligent vehicle are well solved. The effectiveness of the proposed controller is verified by co-simulation of CarSim/Simulink. The trajectory tracking controller based on MPC is compared with that of PDM and the advantages of the proposed controller are analyzed. MPC controller owns more advantages in trajectory tracking performance, ensuring the stability of the vehicle, the less and smooth change of control variable. It has strong robustness to vehicle velocity and road adhesion coefficient. From January 2012 to January 2013, he worked as a Visiting Scholar with Virginia Tech University. During the Ph.D. degree, he studied the dynamic characteristics of medium frequency excited tires on uneven road surface. During the work of visiting scholars, the identification of road friction coefficient based on smart tires was carried out. He is currently an Associate Professor with Jilin University. His current research work includes research and application of tire dynamic model, multifield coupling characteristics of distributed drive electric vehicles, electronic brake systems and stability control of commercial vehicles, and trajectory tracking control of intelligent vehicles ZHENLI SI received the B.Sc. degree in automotive engineering from the Shandong University of Technology, Zibo, China, in 2017. He is currently pursuing the M.Sc. degree in vehicle engineering with Jilin University, Changchun, China.
His research interests include vehicle system dynamics and control and modeling, and trajectory tracking control of the four in-wheel motor independent drive electric vehicle.
ZIHAN LI received the B.Sc. degree in automotive engineering from Jilin University, Changchun, China, in 2018, where he is currently pursuing the M.Sc. degree in vehicle engineering.
His research interests include vehicle system dynamics and control and modeling, and trajectory tracking control of the four in-wheel motor independent drive electric vehicle. VOLUME 8, 2020