MPC-Based Obstacle Avoidance Path Tracking Control for Distributed Drive Electric Vehicles

: A path tracking controller based on front wheel steering angle and additional yaw moment control is designed to achieve safe obstacle avoidance of distributed drive electric vehicles. Using sixth-degree polynomial at a given time with anti-collision and anti-rollover conditions, the path planning of obstacle avoidance is proposed. The front wheel steering angle and additional yaw moment are output by the Model Predictive Control (MPC) controller. The wheel torque is distributed by the torque distribution controller. Through additional yaw moment and the vertical force ratio of the wheel, the obstacle avoidance path tracking control is realized. The co-simulation platform is established with Carsim/Simulink. The obstacle avoidance path, model predictive controller and torque distribution controller designed in this paper are simulated. The results show that obstacle avoidance path and tracking controller for the distributed drive electric vehicles effectively meet the requirements of safe obstacle avoidance.


Introduction
With the continuous increase in car ownership, the modern intelligent transportation system has increasingly regarded vehicle safety as its key factor.Between 2002 and 2012, the lack of proper obstacle avoidance contributed to the deaths of millions of people in traffic accidents around the world, and the economic cost of these accidents amounted to $0.48 trillion [1].More than 90% of these accidents are caused by human factors [2].Therefore, in order to avoid vehicle collisions and minimize the impact of accidents, a method of adding an increasing proportion of active safety systems is proposed [3].
The obstacle avoidance trajectory tracking control of intelligent vehicles is one of the key functions.According to the trajectory planned by the upper controller and the realtime state information, real-time vehicle control variables, such as front wheel angle and driving force/braking force, are generated [4].Compared with traditional vehicles, the drive motors are directly installed in the drive wheels for the distributed drive electric vehicles.So they have outstanding advantages, such as short drive transmission chain, high transmission efficiency and compact structure.It can be more beneficial to realize the tracking control of the obstacle avoidance path by optimizing the distribution of the driving torque of each wheel [5].Although distributed hub motors can lead to greater unsprung mass, a small amount of unsprung mass increase is negligible, given their advantages in dynamic control.
After the continuous development of path tracking control, different tracking control algorithms have been proposed and verified, such as sliding mode control, fuzzy control, and model predictive control.Reference [6] proposed a distributed drive unmanned vehicle path tracking and stability coordinated control strategy based on the layered control theory.In order to reduce the heading deviation and lateral deviation during the path-tracking process, the sliding mode control method was used.Moreover, it can ensure the stability of the vehicle.On the basis of the traditional dynamic model and preview model, Zhang Bingli [7] designed a new trajectory-tracking controller based on neural networks and fuzzy control theory.Wang Yao [8] proposed a model prediction-fuzzy (MPC-Fuzzy) joint control strategy, which alleviated the conflict between the vehicle tracking accuracy and the controller's computational pressure under a single model prediction control and better solved the distributed driving vehicle path, tracking accuracy and stability issues in tracking.Hu [9] designed a fuzzy linear quadratic regulator (LQR) with preview PID angle compensation and verified that it can maintain good accuracy and stability at different vehicle speeds.However, it also had the problem of low tracking accuracy when the vehicle was running at a low speed.Kou [10] used a state expansion MPC and corner compensation fuzzy controller, designed a dual feedback MPC controller based on state expansion and verified that it had better path tracking performance at medium and low vehicle speeds.Wu [11] proposed a front-wheel steering controller and optimized the controller parameters so that the vehicle had better path-tracking performance at low and medium speeds and ensured that the vehicle had certain steering accuracy and driving stability when driving at high speed on ice and snow roads.In order to improve the stability of distributed drive electric vehicles in extreme working conditions, Li [12] proposed a nonlinear model predictive control (NMPC) based torque coordination control strategy.In order to coordinate the trajectory tracking accuracy and stability of distributed drive electric vehicles and improve the adaptive ability of the control algorithm to different working conditions, Zhuang [13] proposed a trajectory tracking control strategy based on Takagi-Sugeno fuzzy model predictive control (T-S FMPC).
The total required torque is calculated through the yaw moment obtained by the upper controller.The torque distributed to each drive wheel is obtained through different algorithms.There are many distribution methods for torque distribution.A fixed proportional distribution method was proposed in the literature [14,15].Although this method was simple, it cannot implement different proportional distributions according to different road conditions.There was no optimization in the energy utilization efficiency of the motor, and the best distribution result could not be achieved.Ono E [16] proposed to realize the torque distribution to the four wheels according to the usage of the tire force of four tires.This method made the wear degree of the four tires more balanced, and the life of the tires and the motor were improved, but the performance of vehicle handling was greatly reduced.Mokhiamar O [17] also proposed to analyze the torque distribution problem by establishing a multi-objective optimization function, but this method may show different effects in different models and different operating conditions, so the consistency and robustness were poor.Reference [18] considered the dynamic characteristics of the vehicle when it is unstable and proposed a control allocation scheme based on feedback linearization.This scheme was relatively dependent on the accuracy of the model and had poor stability.Reference [19] distributed torque according to the vertical load distribution ratio of each wheel.Since the friction ellipse of the tire increases with the increase of the vertical load, the torque distribution according to the vertical load ratio of a single tire can avoid the saturation of the tire force and can simply and effectively improve the driving stability of the vehicle.
Based on the above analysis, the whole vehicle control process designed in this paper is shown in Figure 1.In Section 1, using the obstacle information obtained by the environment awareness layer and the vehicle pose information detected by the vehicle sensor, the obstacle avoidance path is planned.Anti-collision and anti-rollover constraints adding to a six-degree polynomial are used for path planning.The front wheel angle δ f and additional yaw moment ∆M z are output by the MPC controller in Section 3.2.By processing the information of the path planning layer, the torque distribution controller distributes the torque through the additional yaw moment and the wheel vertical force ratio in Section 3.3.The MPC controller and the torque distribution controller together form a path-tracking controller.During the obstacle avoidance process, the vehicle avoids obstacles through the front wheel angle and four-wheel torque output by the controller.In Section 4, the simulation platform is established, and the effect of the controllers is verified.T fl , T rl , T rr and T fr are the torques of the left front wheel, the left rear wheel, the right rear wheel and the right front wheel, respectively; X and Y are the transverse and vertical coordinates under the inertial coordinate system; ϕ is the yaw angle under the body coordinate system; r is the turning radius of the vehicle; v x and v y are the lateral and speed longitudinal of the vehicle; a x is the lateral acceleration of the vehicle.

Path Planning
In this paper, the six-degree polynomial path planning method [20] for a given time is used.In the sixth-degree polynomial path planning method, the vehicle's gentle arrival from the starting point to the target point is considered, the collision between the vehicle and the obstacle in the process of running is considered, and the smooth running according to the planned path is also considered.With the addition of anti-collision and anti-rollover conditions, the safety of obstacle avoidance path planning is improved.
Based on the longitudinal and lateral displacements at a given time, the initial expression for the sixth-degree polynomial is: Adding anti-collision conditions [20]: set the coordinate center of the obstacle as (X ob , Y ob ), and the radius of the circumscribed circle of the vehicle and the obstacle as R car and R ob , this is shown in Figure 2,the constraint condition of anti-collision can be expressed as: Adding the anti-rollover condition constraint [20].
According to the simplified model diagram of vehicle rollover in Figure 3, the moment balance equation can be expressed as: where, a y is the lateral acceleration, m s is the sprung mass, h is the distance from the center of mass to the ground, F zl represents the sum of forces on the left front and rear wheels in the vertical direction, F zr represents the sum of forces on the right front and rear wheels, s represents the track width, g is the gravitational acceleration, ∆y = h • sin φ.The lateral transfer rate of the vehicle is: Combining Equations ( 3) and ( 4), LTR can be expressed as: where, φ is the vehicle roll angle.
The larger the absolute value of LTR indicates, the greater the rollover risk of the car, so the size of a y should be fully taken into account in path planning.Given the maximum roll risk LTR max , Constructing the evaluation index function of anti-rollover: The polynomial optimization path planning problem is expressed as: where, t 0 and t d are the initial time and the end time, respectively, a y is the lateral acceleration, X ob and Y ob are the coordinate centers of the obstacles, the coordinate center of the obstacle:(X ob , Y ob ) = (100, 1), R car and R ob are the radiuses of the circumscribed circles between the vehicle and the obstacle, ∅ is the body roll angle, and w is the wheelbase, h is the distance from the center of mass to the ground, g is the acceleration of gravity, H is the self-conjugate matrix, J anti-r is the anti-rollover evaluation index function, and LTR is the roll risk coefficient.In Equation ( 9), the coefficients b 3 , b 4 , b 5 and b 6 can be obtained by the optimization algorithm.
The yaw angle can be expressed as:

Establishment of Vehicle Dynamics Model
The three-degree-of-freedom vehicle dynamics model is shown in Figure 4, including lateral motion, yaw motion and longitudinal motion [21,22].The aerodynamics, suspension system and steering system are ignored.Considering that the sideslip angle of the center of mass is small when the lateral acceleration is not high, the control accuracy will not be affected if it is ignored, so the sideslip angle of the center of mass is ignored [23].According to the characteristics of the distributed drive vehicle, the additional yaw moment is considered.In Figure 4, the coordinate axis oxyz is the fixed coordinate system of the vehicle, xoz is in the left-right symmetrical plane of the vehicle, the coordinate origin of the center of mass of the vehicle is o, the x-axis is the coordinate axis along the longitudinal direction of the vehicle, and the y-axis is the coordinate perpendicular to the longitudinal direction of the vehicle axis.The z-axis is the coordinate axis perpendicular to the xoy plane, and the direction satisfies the right-hand rule.XOY is the geodetic coordinate system.Considering that Fxf and Fyf are the force exerted on a single tire, it needs to be multiplied by 2. According to Newton's second law: where lf and lr are the distances from the center of mass to the front and rear axles, respectively.m is the overall mass of the vehicle, and Iz is the central moment of inertia of the vehicle around the z axis.
The conversion relationship between the resultant force of the tire in the x-direction and y-direction, the longitudinal force and the lateral force is expressed as follows: In Figure 4, the coordinate axis oxyz is the fixed coordinate system of the vehicle, xoz is in the left-right symmetrical plane of the vehicle, the coordinate origin of the center of mass of the vehicle is o, the x-axis is the coordinate axis along the longitudinal direction of the vehicle, and the y-axis is the coordinate perpendicular to the longitudinal direction of the vehicle axis.The z-axis is the coordinate axis perpendicular to the xoy plane, and the direction satisfies the right-hand rule.XOY is the geodetic coordinate system.Considering that F xf and F yf are the force exerted on a single tire, it needs to be multiplied by 2. According to Newton's second law: (11) where l f and l r are the distances from the center of mass to the front and rear axles, respectively.m is the overall mass of the vehicle, and I z is the central moment of inertia of the vehicle around the z axis.
The conversion relationship between the resultant force of the tire in the x-direction and y-direction, the longitudinal force and the lateral force is expressed as follows: where F xf and F yf are the resultant forces on the front wheels in the x and y directions, respectively.F xr and F yr are the resultant forces on the front wheels in the x and y directions, respectively, and F lf and F lr are the longitudinal forces on the front and rear wheels, respectively.F cf and F cr are the lateral forces on the front and rear wheels, respectively.δ f is the front wheel angle, δ r is the rear wheel angle.
The lateral and longitudinal forces of vehicle tires can be expressed as complex functions of parameters such as wheel slip angle, slip rate, road friction coefficient and vertical load: where, F z is the vertical load on the tire, µ is the road friction coefficient, s is the slip ratio, and α is the wheel side angle.
In order to simplify the model, the tire force is usually represented by a linear function under the condition of small tire longitudinal slip rate, lateral acceleration and slip angle.The force is expressed as follows: where C l is the longitudinal stiffness of the vehicle tire, and C c is the cornering stiffness of the vehicle tire.
The following approximate relationship is satisfied: where θ can be expressed as front wheel side angle and rear wheel side slip angle, etc.The wheel side slip angle α can be obtained according to the geometric relationship: where v c and v l represent the lateral and longitudinal speeds of the tire, respectively, which can be represented by the speeds v x and v y in the direction of the coordinate system: where δ is the tire deflection angle.The tire speed is generally calculated by the speed conversion of the vehicle, and the conversion relationship is shown in Formula (19): Through the above formulas, the wheel side slip angle can be obtained as: From Equation ( 20), the tire lateral force of the front and rear wheels can be obtained as: According to the above derivation formula, the following nonlinear vehicle dynamics model can be obtained as follows: x cos ϕ − .y sin ϕ (23) In this paper, due to the use of a linear time-varying model predictive control algorithm, the displacement and velocity in the longitudinal direction are not considered as control variables.Let .ϕ = r, .
x = v x , .y = v y , Equation ( 22) can be simplified as: According to the above dynamic model, the following state space equation is established: where the state quantity ξ = v y r ϕ y T , the control quantity u = δ f ∆M z T , A, B, and C are coefficient matrices, respectively: C = 0 0 1 0 0 0 0 1 (28)

MPC Controller Design
The linear time-varying model is shown in Figure 5.In the model, the control value is initial velocity v 0 = 18 m/s; The actual measured value is v y , r, ϕ, y; The control input value is α f , ∆M z .Since the linear time-varying model [13] is used, it is necessary to perform linear time-varying processing and discretization processing on Equation (24).
where T is the sampling time, I is the identity matrix, So the following discrete state space equation is obtained: .
In order to avoid the phenomenon of a sudden change in the control quantity of the system, it is necessary to restrict the control increment in each sampling period, so the above formula of this paper is converted and deformed: Note: ζ =, substitute into the above formula to obtain a new state space equation: In the formula, C k = 0 0 1 0 0 0 0 0 0 1 0 0 (36) The optimization objective function of the path tracking and torque distribution controller is expressed as: where y ref is obtained by the path planning layer; Q and R are the trajectory tracking error weight matrix and the control amount increment weight matrix, respectively; N p and N c are the prediction time domain and the control time domain, respectively.Some parameter settings in model predictive control are shown in Table 1.

Torque Distribution Controller Design
Torque distribution strategy has a great impact on vehicle lateral stability.Firstly, the additional yaw moment ∆M z output by the MPC controller is used to calculate the total demand torque T all .Then using the proportion of the vertical load, calculates the torque of the four wheels.On the premise of ensuring lateral stability, the flexible torque distribution is realized.
The additional yaw moment ∆M z and the four-wheel torque should satisfy the following relationship: where R is the wheel radius, b is the wheel track, and T Fl , T Fr , T Rl and T Rr are the torques of the left front wheel, the right front wheel, the left rear wheel and the right rear wheel, respectively. while: where F z,Fl , F z,Fr , F z,Rl , F z,Rr are the vertical loads of the left front wheel, the right front wheel, the left rear wheel and the right rear wheel, respectively.Force, k 1 , k 2 , k 3 , k 4 are the proportional coefficients of the four-wheel vertical force and the total vertical force.
According to Equations (37)-(39), the total demand torque T all and the distributed four-wheel torques T Fl , T Fr , T Rl , T Rr can be obtained: The solution of the final path tracking and torque distribution controller can be expressed as: The control quantity at time k + 1 can be expressed by the control quantity at time k plus the control increment at time k:

Simulation Analysis and Verification
The C-class vehicle model is adopted in Carsim.PD18 in-wheel motor is adopted in the motor model.According to the characteristics of the distributed drive vehicle, the vehicle parameters are shown in Table 2.

Verification of Co-Simulation Platform
The initial speed of the vehicle is 60 km/h, the road adhesion coefficient µ = 0.8 and the maximum value of LTR is set at 0.1.The simulation results are shown in Figures 6 and 7.
It can be seen from Figure 5 that the controller can accurately track the reference path.The tracking error of the yaw angle is small, and the lateral acceleration appears slightly jittered between 0 and 1 s, but the value of the lateral acceleration is maintained throughout the process.Within a reasonable range, the front wheel corners shake slightly at 0 s to 1 s and 6 s to 7 s, but the changes in the corners are relatively gentle, and the corner values do not exceed the specified value.It can be concluded that the control effect of the controller is good and can meet the needs of vehicle obstacle avoidance.It can be seen from Figure 6 that the value of LTR is always in a small range during the entire obstacle avoidance process, which verifies the effectiveness of the set obstacle avoidance path and meets the requirements of anti-rollover in the obstacle avoidance process.

Simulation of Tracking Control Performance
The stability and robustness of the designed path tracking and torque distribution controller are verified by the simulation of different road adhesion coefficient conditions.Select high adhesion pavement coefficient µ = 0.8, low adhesion pavement coefficient µ = 0.2, µ = 0.1.The specific simulation results are shown in Figures 7 and 8.
It can be seen from Figure 8a-d that the tracking control effect of the controller is excellent when the high adhesion coefficient road surface µ = 0.8.The effect is slightly decreased when the low adhesion coefficient road surface µ = 0.2, and the tracking control error is slightly increased.The changes in lateral acceleration and front wheel angle are relatively gentle under both conditions.When µ = 0.1, the vehicle deviates greatly from the planned path and the planned yaw angle.The lateral acceleration and front wheel angle also produce a lot of jitter.This is because the road adhesion coefficient is too low to the adhesion limit.Under this condition, the controller cannot perform tracking control.It can be seen from Figure 9 that when µ = 0.8 and µ = 0.2, the vertical force changes of the wheels are relatively gentle, which meets the requirements of stable driving of the vehicle in the process of obstacle avoidance.When µ = 0.1, the tires are not sufficient to provide the vehicle with steady longitudinal and lateral force.At 2.5 s and 4.7 s, there is a large jump, which can no longer meet the stability requirements of the vehicle during driving.Figure 10a-d shows that when µ = 0.8, the torque distribution of each wheel meets the requirements of this paper.When µ = 0.2, the torque of the left front wheel begins to increase after 1 s and reaches a peak at 1.5~3.5 s, the maximum value is 107 N•m.The torque starts to decrease continuously at 3.5~5 s and 5~5.5 s.It reaches the reverse maximum value of 116 N•m and then changes to 0 N•m.The torque changes of the remaining wheels are roughly the same as the torque changes of the left front wheel, so this conclusion description will not be repeated.It can be seen that under this working condition, the controller has a good torque distribution effect.When µ = 0.1, the torque of each wheel drops rapidly to about −100 N•m in 2 s, and the controller cannot continue to distribute the torque normally.From the analysis of Figures 9 and 10, it can be seen that the controller designed in this paper can still control the vehicle to drive according to the correct planned path under the condition of low road adhesion coefficient µ = 0.2 and carry out reasonable torque distribution, which verifies the path.The tracking controller has good robustness.When µ = 0.1, the vehicle has already slipped, and the path tracking control can not be realized.

Conclusions
(1) Sixth-order polynomial for obstacle avoidance path planning is presented.Through the simulation results, it is verified that the planned path can be accurately tracked, and the LTR values are always within the safe range.The vehicle has no risk of rollover.The obstacle avoidance path and tracking controller in this paper can effectively meet the requirements of safe obstacle avoidance.(2) In this paper, path planning, path tracking and torque distribution are combined to achieve safe obstacle avoidance through the tracking control of the obstacle avoidance path.The path-tracking controller not only realizes the intelligent obstacle avoidance process of unmanned vehicles but also combines it with distributed vehicles.The safety and stability are improved by the torque distribution strategy in the obstacle avoidance process compared with traditional vehicles.Simultaneously, simulations are carried out under different road adhesion coefficient conditions, and the simulation results show that the vehicle can still perform safe and stable automatic obstacle avoidance under the conditions of road adhesion coefficient µ = 0.2, indicating that the controller has good robustness.
This paper provides an idea for the obstacle avoidance path tracking control of distributed drive electric vehicles.In the follow-up research work, the torque distribution controller can be improved, and better torque distribution and anti-skid control can be added to the original design scheme.The control strategy can be realized under the condition of a lower road adhesion coefficient.The real vehicle test link is added to verify the effectiveness of the control strategy in this paper.

Figure 1 .
Figure 1.Vehicle control flow chart.Where, X c0 and Y c0 are the lateral distance and longitudinal distance from the obstacle; v c is the vehicle speed of the obstacle; X d and Y d are the expected lateral and longitudinal distance of the vehicle; ϕ d is the expected yaw angle of the vehicle; ∆M z is the additional yaw moment; T fl , T rl , T rr and T fr are the torques of the left front wheel, the left rear wheel, the right rear wheel and the right front wheel, respectively; X and Y are the transverse and vertical coordinates under the inertial coordinate system; ϕ is the yaw angle under the body coordinate system; r is the turning radius of the vehicle; v x and v y are the lateral and speed longitudinal of the vehicle; a x is the lateral acceleration of the vehicle.

Figure 5 .
Figure 5. Flow chart of linear time-varying model control.

Figure 9 .
Figure 9.Comparison of vertical forces on wheels.(a) vertical force of left wheel; (b) vertical force of right wheel.

Figure 10 .
Figure 10.Comparison of torque distribution among wheels.(a) Torque comparison of left front wheel.(b) Torque comparison of left rear wheel.(c) Torque comparison of right front wheel.(d) Torque comparison of right rear wheel.

Table 1 .
Part of the parameter settings of the controller.

Table 2 .
The vehicle model parameters.