| In distributed drive electric vehicles,wheels are driven independently,with less mechanical constraints and a simple,efficient,flexible transmission mechanism.It is an ideal actuator for various advanced vehicle control algorithms.Research on trajectory following control methods based on distributed drive electric vehicles is conducive to promoting autonomous driving.This thesis builds trajectory following controllers for distributed drive electric vehicles based on Model Predictive Control(MPC)and Linear Quadratic Regulator(LQR).For MPC trajectory following,the vehicle lateral dynamics model is firstly established.The input variables are designed as the first derivative of the front steering angle and that of the external yaw moment.The magic formula tire model is used to describe the numerical relationship between tire forces and dynamic states.Then,in the optimization problem,the continuous state equation is discretized for state prediction by the 4th order Runge-Kutta method.The cost function is formulated by trajectory following term,yaw stability term,input variable penalty term,etc.The target of yaw stability control is designed using vehicle slip angle and yaw rate.Upper and lower bounds are set for input variables and some state variables.In terms of LQR trajectory following,a trajectory following error model is firstly formulated.Since only utilizing LQR will cause a steady-state error in trajectory following,the control law of front steering angle is designed as the sum of feedforward and feedback.The feedback is computed by LQR,and the feedforward is used to eliminate the steady-state error.Moreover,because LQR is not capable of designing multi-output systems,this thesis adopts a hierarchical algorithm structure,and the sliding mode control method is utilized to calculate the external yaw moment to regulate yaw stability.In the torque distribution of each wheel,the torque of the four wheels is distributed according to factors such as the front steering angle,the external yaw moment,and the distance between the center of mass and axles of the front and rear sides.However,the torque should also be regulated by acceleration slip regulation(ASR),coordinated control of each wheel,and the torque-speed relationship of electric motors.This thesis uses software simulation and hardware-in-the-loop to test the algorithm.In the simulation test,the joint simulation between MATLAB/Simulink and Car Sim software is adopted.The double lane change trajectory is chosen as the reference trajectory,and two algorithms are tested at various vehicle speeds.The simulation test reveals that the accuracy of MPC trajectory following is higher than that of LQR,and the driving stability of MPC at high speed is also better than that of LQR.Vehicles are able to follow the trajectory safely and smoothly at a higher velocity with yaw stability control,while they cannot make it without it at that velocity.Moreover,the integrated method which computes the front steering angle and the external yaw moment at the same time using MPC is better than the hierarchical method which calculates the front steering angle with MPC first and then uses sliding mode control to calculate the external yaw moment.In the hardware-in-the-loop test,NI PXIe-1085 real-time control cabinet equipped with NI PXIe-8880 real-time processor and NI PXI-8512 board is applied,it communicates with DSP controller through CAN bus.The test selects some typical test velocities in the software simulation,and the conclusions drawn from the hardware-in-the-loop test are consistent with that of the simulation test. |