1. Background and Motivation
Drifting is considered the most challenging and fascinating technique for driving where the driver has to extend the limit of the vehicle while maintaining control. For autonomous vehicles, controlling the vehicle at the limit of the vehicle is difficult for conditions in steady-state, and even more difficult in transient drifting.
In this project, I am proposing a method of the control of drift parking for autonomous vehicles with Model Predictive Control. MPC is used for the main control strategies with the IPOPT solver. The model I am focusing on is a fused kinematic-dynamic bicycle. And the goal of the control algorithm is to safely reach a parking space with desired turn-around angle and global coordinates, and expect a minimum cost of trajectory.
2. Modeling
The vehicle model used in our optimization algorithm is a simplified fused kinematic-dynamic model for a two-wheels bicycle, where assuming the front two wheels hold the same net force, also for the rear two wheels. The assumptions for tires include the equality of net force, pressures, heat transfer and other conducting conditions acting on the tires are ignored, and only considering the lateral and longitudinal force, friction force with respect to the road condition that emphasizes the slipping/skidding condition.
Dynamic Model
Kinematic Model
It contains 7 states as shown. In specific, position (X,Y) and yaw angle 𝜑 are in global coordinates, r is the yaw rate , and 𝛿 is the steering angle, vx and vy denotes the longitudinal and lateral velocity of the vehicle. l_R and l_F represent the distance from the center of gravity to the rear and front wheels respectively, FR,y and FF,y are the lateral tire forces of the rear/front wheels, and Fx is the input force in the longitudinal direction. The control input includes F_x and the change rate of delta, where the change rate of delta is the velocity of the steering angle. Moreover, 𝛼_F and 𝛼_R are the front and rear slip angles, and B, C, D are experimentally coefficients that fit from driving the car randomly (B = 10, C = 1.9, D = 1 are tuned from the simulation code).
Due to the fact that the front and rear slip angles are represented by the Pacejka tire model, and the value for FR,y and FF,y is related to the slip angles. The dynamic model is not accurate at low velocity vx. Therefore, a Kinematic model is introduced to accurately describe the system dynamic at low speed. The Kinematic model does not depend on FR,y and FF,y, hence independent of the slip angles.
Fused Kinematic-Dynamic Bicycle Model
Naturally combining the kinematic and dynamic models into one model. The kinematic model is used for low speeds, and the dynamic model is used for higher speeds.
Blending Ratio vs. Velocity in x and y direction
Framework of Nonlinear MPC
The fused model is discretized with Euler Forward Discretization with Ts of 0.05 second, which is used to generate the motion.
I first present the general optimization structure, and explain how motion generation and motion tracking works.
xk is the full state of the system at sample k along the trajectory, and uk is the corresponding control input, J and 𝜔 are the final and stage costs that depend on the task, and N is the total number of samples along the trajectory.
For dynamic parking tasks, I am interested in optimizing the goal that the vehicle is able to come to rest at 0 velocity. The parking cost function Jpark(xN) is thus defined as the squared error between a set of goal coordinates (Xgoal , Ygoal , 𝜑goal) and the body coordinates (XN , YN , 𝜑N), where N is the number of sample points for the trajectory. The parking stage cost function wpark(xk,xk,goal) is defined as in Eq.18, where R is the weight matrix. This cost function is trying to minimize the distance traveled to reach the goal, hence guiding the vehicle to move towards the goal directly. For the lateral velocity V_y, the stage cost is heavily weighted which forces the vehicle to drift when it is close to the terminal position.
Optimization results of drift parking
MPC result
It shows that the closed loop result is very close to the desired optimal trajectory. With the MPC we designed, the position and velocity goal is achieved with less than 2% of error as defined in the constraints. Because of the robustness of the fused dynamic-kinematic model, the MPC tracks the planned path with high accuracy