Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 1, No. 3, 2022 42 Research on Vehicle Longitudinal Control Method Based on Model Predictive Control Xingbang Gao*, Jiaojiao Li, Ruiyuan Liu, Shuai Zhang, Pengcheng Ma School of Transportation and Vehicle Engineering, Shandong University of Technology, Zibo 255049, China. * Corresponding author: Xingbang Gao. Abstract: In order to improve the safety of autonomous vehicles during driving and the comfort of drivers and passengers, the longitudinal dynamics model of the vehicle is first established. Secondly, the longitudinal motion control strategy is designed considering the influence of vehicle driving safety and driver comfort. Based on this, a longitudinal motion controller based on model predictive control is established. The upper controller uses the model predictive control algorithm to calculate the expected acceleration, and the lower controller uses the vehicle inverse longitudinal dynamics model to convert the expected acceleration calculated by the upper controller into throttle opening and braking pressure. Finally, the effectiveness of the longitudinal motion controller is verified by MATLAB / Simulink under different working conditions. The simulation results show that the longitudinal motion controller designed in this paper improves the comfort of drivers and passengers under the premise of ensuring the safety of vehicles. Keywords: Autonomous vehicle; Longitudinal control; Model predictive control; Occupant comfort; Vehicle longitudinal dynamics model. 1. Introduction Autonomous driving technology has become a research hotspot in the field of automotive engineering due to its significant advantages in traffic safety and traffic efficiency. As one of the three major technical fields of autonomous driving, vehicle motion control can complete the lateral control, longitudinal control and lateral longitudinal coupling control of autonomous vehicles according to the target planning path and speed. Stable and efficient longitudinal control is the basis for ensuring safe and comfortable speed tracking of vehicles, and is the key technology to improve driving safety and road traffic efficiency. In terms of control methods, there are two main types of longitudinal motion control: traditional control algorithms and artificial intelligence algorithms. Zhang et al. used double PID controller to control the speed and position error of vehicle longitudinal motion. Zheng used sliding mode control algorithm to design longitudinal controller and compared it with traditional PID algorithm. Zhu et al.designed longitudinal acceleration and braking controller based on fuzzy control method. Zheng et al.designed a vehicle longitudinal motion controller based on particle swarm optimization PID algorithm. Li et al.adopted a model predictive control method based on improved particle swarm optimization to realize the longitudinal motion control of vehicle. There are many control methods for vehicle longitudinal motion control. The traditional PID control is popular in the market due to its maturity of research and convenience of use, but its control accuracy is poor and its ability to deal with delay problems is not strong. Therefore, this paper selects the model predictive control algorithm with higher control precision and better processing delay ability to design the longitudinal motion controller. In the control structure, longitudinal motion control is divided into direct control and hierarchical control structure. Direct control has the characteristics of high integration and strong accuracy, but its design is complex and flexible. Zheng designed a longitudinal controller based on fuzzy control by direct control. Hierarchical control is simpler and more flexible than direct control. Jian designed a longitudinal controller with hierarchical control. The upper layer uses sliding mode variable structure control to obtain the desired acceleration, and the lower layer uses fuzzy PID control and longitudinal dynamics model to calculate the throttle opening and braking pressure. In order to study the longitudinal control system, this paper adopts hierarchical control structure. In summary, few existing studies have considered the comfort of the occupants to design the longitudinal motion controller. Therefore, this paper builds a vehicle longitudinal dynamics model, comprehensively considers the influence of the motion state of the front vehicle in the same lane on the vehicle and the comfort of the occupants to design the vehicle longitudinal control strategy. Based on this, the hierarchical control structure is used to design the longitudinal motion controller based on model predictive control. Finally, under different working conditions, simulation experiments are carried out based on MATLAB / Simulink. This paper lays a theoretical foundation for improving vehicle driving safety and diversity of control scenarios. 2. Longitudinal vehicle dynamic model The vehicle completes a series of actions such as acceleration, uniform speed and deceleration through the force and reaction force between the ground and the tire. The design of the control algorithm needs to be based on the vehicle dynamics model. Therefore, this paper analyzes the force of the vehicle under acceleration and deceleration conditions during driving, and establishes the vehicle driving dynamics model and braking dynamics model: 43 Fig.1 Longitudinal force diagram of uphill vehicle It can be seen from Fig.1 that taking the vehicle with front wheel drive as an example, the vehicle mainly needs to be subjected to its own gravity during driving G ,air resistance wF ,hill climbing resistance iF ,rolling resistance fF ,and the driving force acting on the wheel tF or braking force bF . According to Newton s second law, the dynamic equilibrium expression of the vehicle uphill can be established as: ๐›ฟ๐›ฟ๐›ฟ๐›ฟ๐‘ฃ๐‘ฃ๐‘ฅ๐‘ฅ โ€ฒ = ๐น๐น๐‘ก๐‘ก โˆ’ ๐น๐น๐‘ค๐‘ค โˆ’ ๐น๐น๐‘–๐‘– โˆ’ ๐น๐น๐‘“๐‘“ (1) Among them, m is the vehicle mass ;ฮด is the rotational mass conversion coefficient xv is longitudinal speed. The expression of air resistance is : ๐น๐น๐‘ค๐‘ค = 1 2 ๐ถ๐ถ๐ท๐ท๐ด๐ด๐ด๐ด๐‘ข๐‘ข๐‘Ÿ๐‘Ÿ2 (2) Among them, DC is the air resistance coefficient ; A is the windward area of the vehicle ; ฯ is air density ; ru is the relative speed of speed and wind speed. The expression of slope resistance is : ๐น๐น๐‘–๐‘– = ๐›ฟ๐›ฟ๐‘š๐‘š ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘  ๐œƒ๐œƒ (3) Among them,ฮธ is the slope angle of the road. The expression of rolling resistance is : ๐น๐น๐‘“๐‘“ = ๐›ฟ๐›ฟ๐‘š๐‘š๐‘š๐‘š ๐‘๐‘๐‘๐‘๐‘ ๐‘  ๐œƒ๐œƒ (4) Among them, f is the rolling resistance coefficient. During the driving process of the vehicle, the expression of the driving force tF of the engine acting on the tire is: ๐น๐น๐‘ก๐‘ก = ๐‘‡๐‘‡๐‘ก๐‘ก ๐‘Ÿ๐‘Ÿ = ๐‘‡๐‘‡๐‘ก๐‘ก๐‘ก๐‘ก๐‘ ๐‘ ๐‘”๐‘”๐‘ ๐‘ 0๐œ‚๐œ‚๐‘ก๐‘ก ๐‘Ÿ๐‘Ÿ (5) Among them, tqT is engine torque; gi , 0i are the transmission ratio of transmission and main reducer respectively; tฮท is the mechanical efficiency of the transmission; r is the wheel radius. Vehicle braking process, the ground on the tire braking force bF to replace the driving force engine driving force acting on the tire, the expression is : ๐น๐น๐‘๐‘ = ๐‘‡๐‘‡๐‘๐‘ ๐‘Ÿ๐‘Ÿ โ‰ค ๐น๐น๐‘๐‘๐œ‘๐œ‘ (6) Among them, bT is the friction torque of the brake; ZF is the normal reaction force of the ground to the tire;ฯ• is the ground adhesion coefficient. The direction of the force of the vehicle is different in the uphill, downhill, acceleration and braking. It is necessary to change the direction of the force in the model. The overall idea is similar to the uphill driving of the vehicle, and it is not described too much in the text. 3. Longitudinal controller design based on model predictive control 3.1. Longitudinal Control Strategy Considering Motion State of Other Vehicles In addition to the road environment and regulations, the vehicle speed is also affected by the motion state of other participants in the traffic system. In the normal driving process, when the speed of the front vehicle in the same lane is low, or the front vehicle is braked from a higher speed to a lower speed, a traffic conflict will occur to the normal driving of the vehicle. In order to avoid accidents, the vehicle should take braking to control longitudinal motion; when the current vehicle speed is greater than the self-vehicle or away from the current lane of the self-vehicle, the self-vehicle should drive stably at the set speed. In the process of driving, ensuring the safety of vehicle driving is the bottom line of autonomous driving technology. If the acceleration can be constrained on this basis to achieve predictive braking, the comfort of drivers and passengers can be greatly improved. Therefore, aiming at the safety and comfort of autonomous vehicles, this paper designs a longitudinal control strategy considering the motion state of the preceding vehicle under the following traffic conflict conditions. (1) Condition 1: the same lane in front of the car or stationary speed When the front vehicle in the same lane runs at a constant speed and the speed of the front vehicle is less than that of the self-vehicle, if the self-vehicle cannot complete the braking within a safe distance, the two vehicles will have traffic conflicts. In order to avoid accidents, the longitudinal speed of the vehicle should be controlled. Since the vehicle does not need the driver s control in the autonomous driving state, the driver s reaction time is not included in the braking process, and replaced by the reaction time of the autonomous driving system. Let the system reaction time be rt ,The braking force growth time is it , the continuous braking time is ct , the initial speed of the self-vehicle is m0v , and the initial speed of the front vehicle is 0qv ,Under this condition, the minimum safety distance min1S from the self-vehicle to the two vehicles without collision is : ๐‘†๐‘†๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š1 = ๏ฟฝ๐‘ฃ๐‘ฃ๐‘š๐‘š0 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก0๏ฟฝ๐‘ก๐‘ก๐‘Ÿ๐‘Ÿ + 1 2 ๏ฟฝ๐‘ฃ๐‘ฃ๐‘š๐‘š0 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก0๏ฟฝ๐‘ก๐‘ก๐‘–๐‘– โˆ’ ๏ฟฝ๐‘ฃ๐‘ฃ๐‘š๐‘š0โˆ’๐‘ฃ๐‘ฃ๐‘ž๐‘ž0๏ฟฝ 2 2๐‘Ž๐‘Ž๐‘๐‘๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š + ๐‘Ž๐‘Ž๐‘๐‘๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š ๐‘ก๐‘ก๐‘–๐‘–2 24 Where maxba is the maximum braking deceleration? In the actual driving process, in order to improve the safety, the critical state of no collision should not be considered only when braking. When the braking process is completed, a certain distance should be retained between the two vehicles, and the longitudinal control of the vehicle still needs to improve the comfort as much as possible under the premise of ensuring safety. In order to improve comfort, experienced drivers will gradually increase the braking pedal to a certain appropriate braking force and maintain it for a period of time when performing braking operations under safe conditions. When the vehicle brakes to a safe speed or stops, the driver will gradually reduce the braking force to ensure smooth and comfortable braking. Based on this, this paper constrains the 44 braking deceleration, and uses the trapezoidal braking deceleration curve to represent the change of acceleration with time in the braking stage, as shown in Fig.2. Fig.2 Vehicle speed change with time After constraint, the expected safety distance ๐‘†๐‘†๐‘’๐‘’1 under condition 1 is: ๐‘†๐‘†๐‘’๐‘’1 = ๏ฟฝ๐‘ฃ๐‘ฃ๐‘š๐‘š0 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก0๏ฟฝ ๏ฟฝ๐‘ก๐‘ก๐‘Ÿ๐‘Ÿ + ๐‘ก๐‘ก๐‘–๐‘– 2 ๏ฟฝ โˆ’ ๏ฟฝ๐‘ฃ๐‘ฃ๐‘š๐‘š0 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก0๏ฟฝ 2 2๐‘Ž๐‘Ž๐‘’๐‘’ + ๐‘Ž๐‘Ž๐‘’๐‘’๐‘ก๐‘ก๐‘–๐‘–2 24 โˆ’ ๐‘Ž๐‘Ž๐‘’๐‘’๐‘ก๐‘ก๐‘‘๐‘‘2 6 + ๐‘†๐‘†0 In the formula, ea is the expected acceleration, dt is the time required for the braking force slow-down stage, 0S is the distance between the two cars when the two cars brake to the same speed, referring to the Mazda safety distance model, here take 5m. When the preceding vehicle in the same lane is stationary, it is only necessary to set the preceding vehicle speed๐‘ฃ๐‘ฃ๐‘ก๐‘ก0 = 0 in Formulas (1) and (2). Therefore, under condition 1, after setting the comfortable expected acceleration ea , the braking force increase time it , and the braking force slow-down phase time dt ,the expected safety distance that takes into account both safety and comfort can be calculated. When the distance between the two vehicles is less than the minimum safety distance min1S , emergency braking is taken; when the distance between the two cars is in[๐‘†๐‘†๐‘’๐‘’1 , ๐‘†๐‘†๐‘’๐‘’1 + 5], comfortable braking is adopted. (2) Condition 2: uniform deceleration in the same lane When the vehicle in front of the same lane slows down, and the current speed is less than the speed of the vehicle, the vehicle needs to control the longitudinal speed to avoid traffic conflicts. Under condition 2, the minimum safety distance min 2S from the car to take emergency braking to the two cars without collision is: ๐‘†๐‘†๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š 2 = ๐‘ฃ๐‘ฃ๐‘š๐‘š0๐‘ก๐‘ก๐‘Ÿ๐‘Ÿ + ๐‘ฃ๐‘ฃ๐‘š๐‘š0๐‘ก๐‘ก๐‘–๐‘– 2 + ๐‘ฃ๐‘ฃ๐‘ก๐‘ก2 โˆ’ ๐‘ฃ๐‘ฃ๐‘š๐‘š02 2๐‘Ž๐‘Ž๐‘๐‘๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ + ๐‘Ž๐‘Ž๐‘๐‘๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ ๐‘ก๐‘ก๐‘–๐‘–2 24 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก2 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก02 2๐‘Ž๐‘Ž๐‘๐‘๐‘ก๐‘ก In the formula, qv is the speed of the front vehicle after braking, and bqa is the braking deceleration of the front vehicle. After the driver s comfort is taken into account to impose constraints on the self-driving brake deceleration, the expected safety distance 2eS under Condition 1 is: ๐‘†๐‘†๐‘’๐‘’2 = ๐‘ฃ๐‘ฃ๐‘š๐‘š0๐‘ก๐‘ก๐‘Ÿ๐‘Ÿ + ๐‘ฃ๐‘ฃ๐‘š๐‘š0๐‘ก๐‘ก๐‘–๐‘– 2 + ๐‘ฃ๐‘ฃ๐‘ก๐‘ก2 โˆ’ ๐‘ฃ๐‘ฃ๐‘š๐‘š02 2๐‘Ž๐‘Ž๐‘’๐‘’ + ๐‘Ž๐‘Ž๐‘’๐‘’๐‘ก๐‘ก๐‘–๐‘–2 24 + ๐‘ฃ๐‘ฃ๐‘ก๐‘ก๐‘ก๐‘ก๐‘‘๐‘‘ โˆ’ ๐‘Ž๐‘Ž๐‘’๐‘’๐‘ก๐‘ก๐‘‘๐‘‘2 6 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก2 โˆ’ ๐‘ฃ๐‘ฃ๐‘ก๐‘ก02 2๐‘Ž๐‘Ž๐‘๐‘๐‘ก๐‘ก + ๐‘†๐‘†0 Under condition 2, when the distance between the two vehicles is less than the minimum safety distance๐‘†๐‘†๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š 2 , emergency braking is taken; when the distance between the two cars is in[๐‘†๐‘†๐‘’๐‘’2 , ๐‘†๐‘†๐‘’๐‘’2 + 5], comfortable braking is adopted. 3.2. Longitudinal Controller Design Based on Model Predictive Control The model predictive control algorithm is used to design the hierarchical longitudinal motion controller. The upper controller is based on the model predictive control algorithm to obtain the expected acceleration๐‘Ž๐‘Ž๐‘’๐‘’according to the relative distance ๐‘‘๐‘‘๐‘Ÿ๐‘Ÿ๐‘’๐‘’ between the two vehicles, the front vehicle speed๐‘ฃ๐‘ฃ๐‘ก๐‘ก , the initial vehicle speed๐‘ฃ๐‘ฃ๐‘š๐‘š0 , and the real-time vehicle speed๐‘ฃ๐‘ฃ๐‘š๐‘š. The lower controller is based on the vehicle inverse longitudinal dynamics model, and the control acceleration output by the upper layer is converted into throttle opening and braking pressure, and finally the vehicle can stably complete the speed tracking. The structure design of the longitudinal motion controller is shown in Fig.3: Fig. 3 Structure diagram of longitudinal motion controller (1) Upper controller design In this paper, only the longitudinal motion of the vehicle is studied, and the influence of yaw motion on the longitudinal motion control of the vehicle is neglected. Therefore, the acceleration of the vehicle is approximately equal to the first derivative of the longitudinal speed of the vehicle to time, and the longitudinal control of the vehicle can be expressed by the first order inertial system. ๐‘Ž๐‘Žโ€ฒ = ๐พ๐พ(๐‘Ž๐‘Ž๐‘’๐‘’ โˆ’ ๐‘Ž๐‘Ž๐‘ก๐‘ก) ๐œ๐œ ๐พ๐พ is the system gain; ๐‘Ž๐‘Ž๐‘ก๐‘ก is the actual longitudinal acceleration; ฯ„ is the time constant. The continuous state equation of the vehicle can be expressed as: ๐‘ฅ๐‘ฅ โ€ฒ = ๏ฟฝ 0 1 0 โˆ’ 1 ๐œ๐œ ๏ฟฝ ๐‘ฅ๐‘ฅ + ๏ฟฝ 0 ๐พ๐พ ๐œ๐œ ๏ฟฝ ๐‘ข๐‘ข In the formula, x is a continuous state quantity; u is the system control input, ๐‘ข๐‘ข = ๐‘Ž๐‘Ž๐‘’๐‘’ . The discrete state equation of the system is obtained by discretizing Eq. (11): ๐‘ฅ๐‘ฅ(๐œ†๐œ† + 1) = ๐ด๐ด๐œ†๐œ†๐‘ฅ๐‘ฅ(๐œ†๐œ†) + ๐ต๐ต๐œ†๐œ†๐‘ข๐‘ข(๐œ†๐œ†) where Aฮป is the state matrix, ๐ด๐ด๐œ†๐œ† = ๏ฟฝ 1 ๐‘‡๐‘‡๐‘๐‘ 0 1 โˆ’ ๐‘‡๐‘‡๐‘๐‘ ๐œ๐œ ๏ฟฝ; Bฮป is the control input matrix, ๐ต๐ต๐œ†๐œ† = ๏ฟฝ 0 ๐พ๐พ๐‘‡๐‘‡๐‘๐‘ ๐œ๐œ ๏ฟฝ; ฮป is the current sampling time ; ๐œ†๐œ† + 1 is the next sampling time ; cT is the sampling period. Speed as the output of the system, the output equation is: ๐‘ฃ๐‘ฃ(๐œ†๐œ†) = ๐‘๐‘๐‘ฅ๐‘ฅ(๐œ†๐œ†), ๐‘๐‘ = [0 1] According to the control strategy designed by 3.1, the control goal of the automatic driving vehicle in the actual 45 driving process is to improve the driving comfort as much as possible under the premise of ensuring the safety of the vehicle speed tracking accuracy, that is, not to occur violent acceleration and deceleration and acceleration and deceleration rate of change. Based on this, the system performance evaluation index (objective function) is: ๐ฝ๐ฝ๏ฟฝ๐‘ฅ๐‘ฅ(๐œ†๐œ†),๐‘ข๐‘ข(๐œ†๐œ† โˆ’ 1),๐›ฅ๐›ฅ๐‘ข๐‘ข(๐œ†๐œ†)๏ฟฝ ๏ฟฝ๏ฟฝ๐‘Œ๐‘Œ๐‘๐‘(๐œ†๐œ† + ๐‘ ๐‘ |๐œ†๐œ†) โˆ’ ๐‘Œ๐‘Œ๐‘Ÿ๐‘Ÿ๐‘’๐‘’(๐œ†๐œ† + ๐‘ ๐‘ |๐œ†๐œ†)๏ฟฝ ๐‘๐‘๐‘๐‘ ๐‘–๐‘–=1 ๐‘„๐‘„ 2 +๏ฟฝโ€–๐›ฅ๐›ฅ๐‘ข๐‘ข(๐œ†๐œ† + ๐‘ ๐‘ |๐œ†๐œ†)โ€– ๐‘๐‘๐‘๐‘ ๐‘–๐‘–=1 ๐‘…๐‘… 2 + ๐œ€๐œ€๐œŽ๐œŽ2 In the formula, pN is the prediction time domain ; cN is the control time domain ;๐œ†๐œ† + ๐‘ ๐‘ |๐œ†๐œ† indicates that the state value at time 1ฮป + is predicted according to the state value at time ฮป ;๐‘Œ๐‘Œ๐‘๐‘(๐œ†๐œ† + ๐‘ ๐‘ |๐œ†๐œ†)is the output prediction value ;๐‘Œ๐‘Œ๐‘Ÿ๐‘Ÿ๐‘’๐‘’(๐œ†๐œ† + ๐‘ ๐‘ |๐œ†๐œ†)is the output reference value ; Q and R are weight matrix ;ฮต is the weight coefficient ;ฯƒ is the relaxation factor. In order to ensure that the system output is within a reasonable range, it is necessary to add active constraints, namely acceleration constraint and acceleration change rate constraint: ๐‘ข๐‘ข๐‘’๐‘’๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š โ‰ค ๐‘ข๐‘ข(๐œ†๐œ† + ๐‘ ๐‘ ) โ‰ค ๐‘ข๐‘ข๐‘’๐‘’๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ (๐‘ ๐‘  = 1,2, โ€ฆ๐‘๐‘) ๐›ฅ๐›ฅ๐‘ข๐‘ข๐‘’๐‘’๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š โ‰ค ๐›ฅ๐›ฅ๐‘ข๐‘ข(๐œ†๐œ† + ๐‘ ๐‘ ) โ‰ค ๐›ฅ๐›ฅ๐‘ข๐‘ข๐‘’๐‘’๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ (๐‘ ๐‘  = 1,2, . . .๐‘๐‘) where๐‘ข๐‘ข(๐œ†๐œ† + 1)and๐›ฅ๐›ฅ๐‘ข๐‘ข(๐œ†๐œ† + 1)are the longitudinal expected acceleration constraint and its incremental constraint ; mineu and maxeu are the minimum and maximum of the longitudinal expected acceleration constraint, respectively ;๐›ฅ๐›ฅ๐‘ข๐‘ข๐‘’๐‘’๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š and๐›ฅ๐›ฅ๐‘ข๐‘ข๐‘’๐‘’๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ are the minimum and maximum values of the longitudinal expected acceleration increment constraint, respectively. The system solves the optimization problem at each moment, obtains the optimal input control quantity, and takes the first control quantity as the output quantity. The system will re-predict the control state of the next moment according to the current state, and continuously scroll the optimization until the control is completed. The optimization problem of model predictive control can be transformed into a quadratic programming problem: ๐›ฟ๐›ฟ๐‘ ๐‘ ๐‘ ๐‘  ฮ”๐‘ˆ๐‘ˆ 1 2 ๐‘ˆ๐‘ˆ๐‘‡๐‘‡๐ป๐ปฮ”๐‘ˆ๐‘ˆ + ๐บ๐บ๐‘‡๐‘‡ฮ”๐‘ˆ๐‘ˆ ๐‘ ๐‘ . ๐‘ก๐‘ก. ๐‘ˆ๐‘ˆ๐‘’๐‘’๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š โ‰ค ๐ด๐ด1ฮ”๐‘ˆ๐‘ˆ + ๐‘ˆ๐‘ˆ๐œ๐œ โ‰ค ๐‘ˆ๐‘ˆ๐‘’๐‘’๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ ฮ”๐‘ˆ๐‘ˆ๐‘’๐‘’๐‘š๐‘š๐‘–๐‘–๐‘š๐‘š โ‰ค ฮ”๐‘ˆ๐‘ˆ๐œ๐œ โ‰ค ฮ”๐‘ˆ๐‘ˆ๐‘’๐‘’๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ In the formula,๐ป๐ป โˆˆ ๐‘…๐‘…2ร—2;๐บ๐บ โˆˆ ๐‘…๐‘…2;ฮ”๐‘ˆ๐‘ˆ = [ฮ”๐‘ข๐‘ข(๐œ†๐œ†), ฮ”๐‘ข๐‘ข(๐œ†๐œ† + 1), . . . , ฮ”๐‘ข๐‘ข(๐œ†๐œ† + ๐‘ ๐‘ )]๐‘‡๐‘‡;๐‘ˆ๐‘ˆ๐œ๐œ = 1๐‘๐‘๐‘’๐‘’ โŠ— ๐‘ข๐‘ข(๐œ†๐œ† โˆ’ 1) , 1 eN is the unit vector of eN line, ( )1u ฮป โˆ’ is the control quantity of the previous moment ; mineU and maxeU are the minimum and maximum sets of the control quantity in the control time domain respectively. mineUโˆ† and maxeUโˆ† are the minimum and maximum sets of control increment in control time domain respectively ; ๐ด๐ด1 = โŽ โŽœ โŽ› 1 0 0 โ‹ฏ 0 1 1 0 โ‹ฏ 0 1 1 1 โ‹ฏ 0 โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ 1 1 1 โ‹ฏ 1โŽ  โŽŸ โŽž ๐‘๐‘๐‘’๐‘’ร—๐‘๐‘๐‘’๐‘’ . The quadratic programming problem can be solved by the quadprog function provided in MATLAB. (2) Lower layer controller design In order to avoid damage to the vehicle system, the brake pedal and the accelerator pedal cannot be operated at the same time during the driving process of the vehicle. At the same time, considering the comfort of the occupants, frequent switching between braking and driving is avoided. Based on this, the switching logic is designed according to the expected acceleration of the vehicle. Mod = ๏ฟฝ ๐‘Ž๐‘Ž๐‘—๐‘— , ๐‘Ž๐‘Ž๐‘’๐‘’ โ‰ฅ ๐‘Ž๐‘Ž๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ + ๐›ฅ๐›ฅ๐‘Ž๐‘Ž 0 , ๐‘Ž๐‘Ž๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ โˆ’ ๐›ฅ๐›ฅ๐‘Ž๐‘Ž โ‰ค ๐‘Ž๐‘Ž๐‘’๐‘’ โ‰ค ๐‘Ž๐‘Ž๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ + ๐›ฅ๐›ฅ๐‘Ž๐‘Ž ๐‘Ž๐‘Ž๐‘๐‘ , ๐‘Ž๐‘Ž๐‘’๐‘’ โ‰ค ๐‘Ž๐‘Ž๐‘š๐‘š๐‘Ž๐‘Ž๐‘ฅ๐‘ฅ โˆ’ ๐›ฅ๐›ฅ๐‘Ž๐‘Ž Mod is the output mode ; ja represents the drive mode ; ba represents the braking mode ; maxa is the maximum deceleration when the throttle opening is 0 ; aโˆ† is the dead zone buffer value. From Eqs.(1)-(5), the expected output torque of the engine is : ๐‘‡๐‘‡๐‘ก๐‘ก๐‘ก๐‘ก = ๏ฟฝ๐›ฟ๐›ฟ๐›ฟ๐›ฟ๐‘Ž๐‘Ž๐‘’๐‘’ + 1 2๐ถ๐ถ๐ท๐ท๐ด๐ด๐ด๐ด๐‘ข๐‘ข๐‘Ÿ๐‘Ÿ 2 + ๐›ฟ๐›ฟ๐‘š๐‘š ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘  ๐œƒ๐œƒ + ๐›ฟ๐›ฟ๐‘š๐‘š๐‘š๐‘š ๐‘๐‘๐‘๐‘๐‘ ๐‘  ๐‘ ๐‘ ๐‘”๐‘”๐‘ ๐‘ 0๐œ‚๐œ‚๐‘ก๐‘ก The expected throttle opening tvpa can be obtained according to the external characteristics of the engine and the power and torque curve: ๐‘Ž๐‘Ž๐‘ก๐‘ก๐‘ฃ๐‘ฃ๐‘๐‘ = ๐‘š๐‘š๏ฟฝ๐‘ ๐‘ ,๐‘‡๐‘‡๐‘ก๐‘ก๐‘ก๐‘ก๏ฟฝ The longitudinal dynamic model of the vehicle established by 2.1 shows that the braking force required by the vehicle in the braking process is braF : ๐น๐น๐‘๐‘๐‘Ÿ๐‘Ÿ๐‘Ž๐‘Ž = ๐›ฟ๐›ฟ๐›ฟ๐›ฟ๐‘Ž๐‘Ž๐‘’๐‘’ โˆ’ 1 2 ๐ถ๐ถ๐ท๐ท๐ด๐ด๐ด๐ด๐‘ข๐‘ข๐‘Ÿ๐‘Ÿ2 โˆ’ ๐›ฟ๐›ฟ๐‘š๐‘š ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘  ๐œƒ๐œƒ โˆ’ ๐›ฟ๐›ฟ๐‘š๐‘š๐‘š๐‘š ๐‘๐‘๐‘๐‘๐‘ ๐‘  ๐œƒ๐œƒ Therefore, the expected brake master cylinder pressure bP is: ๐‘ƒ๐‘ƒ๐‘๐‘ = ๐น๐น๐‘๐‘๐‘Ÿ๐‘Ÿ๐‘Ž๐‘Ž ๐‘˜๐‘˜๐‘๐‘ 4. Longitudinal control simulation analysis In order to verify the control effect of the longitudinal motion controller, MATLAB / Simulink is used to build the longitudinal controller simulation model based on model predictive control, including the self-vehicle control model and the other-vehicle control model, and the longitudinal control of the self-vehicle is simulated under three conditions : the same-lane vehicle driving at a constant speed or at rest, the same-lane vehicle decelerating, the same-lane vehicle accelerating or driving out of the current lane. 4.1. Build simulation model Through MATLAB / Simulink, the front vehicle model, the longitudinal control model and the visual model are built respectively. The dynamic model between acceleration and speed is used to build the front vehicle model. The simulation model of the self-driving car mainly includes three driving modes: constant speed cruise, intelligent car-following and emergency braking. The constant speed cruise mode can track the set speed and drive steadily. The intelligent car-following mode can track the front vehicle speed and maintain a certain safe distance. The emergency braking mode can make the vehicle brake at the maximum deceleration when the safe distance cannot be guaranteed to avoid or reduce the damage 46 caused by the accident. In order to realize the switching of the three modes and realize the continuous and complete longitudinal control, the state machine is used to switch the three driving modes according to the safe distance set by section 3.1. The simulation structure of the vehicle longitudinal motion control model based on model predictive control is shown in Fig.4. Fig. 4 Simulation framework of longitudinal motion control 4.2. Simulation Results and Analysis According to the longitudinal motion simulation model of the self-driving vehicle built above, the longitudinal motion control of the self-driving vehicle under the three conditions of the front vehicle driving at a constant speed below the self- driving vehicle speed, the front vehicle decelerating and the front vehicle accelerating is simulated. (1) Condition 1: The preceding vehicle travels at a constant speed below its own speed The initial speed of the front vehicle is set to 20 m/s, the target cruise speed is 20 m/s, and the initial position is 40 m in front of the vehicle. The initial speed of the vehicle is set to 20 m/s, and the target cruise speed is set to 25 m/s. The simulated velocity and acceleration results are shown in Fig.5: Fig.5 Curves of self-driving speed and acceleration versus time under condition 1 As shown in Fig.7, at the beginning of the simulation, the self-driving car first accelerates to track the set target cruise speed, but in the acceleration process, the relative distance between the self-driving car and the front car is less than the expected safe distance under this condition. Therefore, the self-driving car adjusts the speed and finally stabilizes the speed to about 20 m/s, that is, the speed of the front car is equal to that of the front car, and the acceleration range is [- 2,2], which is within the expected comfortable acceleration range. Finally, the safe and comfortable intelligent car- following driving is realized. (2) Condition 2: Front car slows down The initial vehicle speed is set to 25 m/s, the target cruise speed is 15 m/s, and the initial position is 40 m in front of the vehicle. The initial speed of the vehicle is set to 20 m/s, and the target cruise speed is 20 m/s. The simulated velocity and acceleration results are shown in Fig.6: Fig.6 The curve of self-driving speed and acceleration with time under condition 2 As shown in Fig.8, at the beginning of the simulation, the vehicle runs at a uniform speed of 20 m/s, and the front vehicle brakes from the initial 25 m/s to 15 m/s. At about the 5th second of the simulation, the relative distance between the two vehicles is less than the expected safe distance, and the self-vehicle is converted from the fixed-speed cruise mode to the intelligent car-following mode, and the self-vehicle speed is adjusted to make the self-vehicle speed consistent with the front vehicle speed. In this process, the actual acceleration range is[-2,0.75], in line with the expected comfortable acceleration, and ultimately to achieve safe and comfortable car following. (3) Condition 3: Front vehicle accelerates The initial vehicle speed is set to 15 m/s, the target cruise speed is 30 m/s, and the initial position is 30 m in front of the vehicle. The initial speed of the vehicle is set to 20 m/s, and the target cruise speed is 25 m/s. The simulated velocity and acceleration results are shown in Fig.7: Fig.7 The curve of self-driving speed and acceleration with time under condition 3 As shown in Fig.9, at the beginning of the simulation, the speed of the front vehicle is less than that of the self-vehicle, and the relative distance between the two vehicles is less than the expected safe distance. Therefore, the self-vehicle turns to the intelligent car-following mode to track the speed of the front vehicle. With the passage of time, the speed of the front vehicle is gradually higher than that of the self-vehicle, and when the relative distance between the two vehicles is greater than the expected safe distance, the self-vehicle changes from the intelligent following mode to the fixed-speed cruise mode, and accelerates with the expected comfortable acceleration until the target cruise speed set by the self-vehicle is reached. In this process, the acceleration threshold ranges from [โˆ’2, 2] to the desired comfortable acceleration range. 5. Conclusion In this paper, a vehicle longitudinal motion controller based on model predictive control is established by considering the motion state of the preceding vehicle and the comfort of the driver and passenger. The effectiveness of the longitudinal motion controller is simulated by MATLAB / Simulink under three conditions: the constant speed of the preceding vehicle, the constant speed of the preceding vehicle lower than the speed of the vehicle, the deceleration of the preceding vehicle and the acceleration of the preceding vehicle. 47 (1) The vehicle longitudinal motion controller based on model predictive control can realize the longitudinal motion control of the controlled vehicle according to the motion state of the preceding vehicle. According to different working conditions, the controlled vehicle can be switched under three driving modes: constant speed cruise, intelligent following and emergency braking, which improves the driving safety. (2)A longitudinal motion control method is proposed. Under the premise of ensuring the safety of vehicle driving, the comfort of drivers and passengers is considered comprehensively, and the control of vehicle longitudinal motion state is completed by adopting a more moderate comfortable acceleration, which improves the driving comfort. References [1] Yin Zhishuai, He Jiaxiong, Nie Linzhen, butler. Longitudinal adaptive control of autonomous vehicles based on optimization algorithms [J]. Journal of system simulation,2021, 33(02): 409- 420. DOI:10.16182/j.issn1004731x.joss.19-0372. [2] Riley, Zhang Tong. Longitudinal following control of intelligent platoon based on fuzzy MPC[J] .Journal of Jiangsu University ( Natural Science Edition ),2022,43(04):394- 399+430. [3] Zhang Xuyuan, Li Jun. Lateral and longitudinal coordinated control of intelligent electric vehicle trajectory tracking based on LQR double PID[J].Journal of Automotive Safety and Energy Saving,2021,12(03):346-354. [4] Zheng Yannan. Longitudinal Study of Following Vehicle Based on Sliding Mode Control[J].Agricultural Equipment and Vehicle Engineering,2022,60(04):103-107. [5] Zhu Zenghui, Xu Youchun, Ma Yulin, Li Jianshi, Li Yongle. Design of intelligent vehicle longitudinal acceleration tracking controller based on fuzzy control[J].Journal of Military Transportation College,2014,16(12):31-35. [6] Zheng Shuhua, Qiao Yajun, Wang Xiangzhou, Li Shouxiang, Chen Dongqing. Research on Influence of Load Change on Mine Vehicle Trajectory Tracking[J].Journal of Beijing University of Technology,2021,41(04):403- 409.DOI:10.15918/j.tbit1001-0645.2019.320. [7] Li Guangnan, Ye Hongtao, Luo Wenguang. Longitudinal motion control of unmanned vehicle based on IPSO- MPC[J].Journal of Guangxi University of Science and Technology,2022,33(01): 94- 100+109.DOI:10.16375/j.cnki.cn45-1395/t.2022.01.014. [8] Research on Automatic Driving Control Strategy of Intelligent Vehicle on Special Road[D].chongqing jiaotong university,2018. [9] Jiang Shuzhen.Research on Lateral and Longitudinal Integrated Control Strategy of Intelligent Vehicle Trajectory Tracking[D].Chang'an University,2021.DOI:10.26976/d.cnki.gchau.2021.001930. [10] Wu Hao, Wang Sishan, Zhou Haiying, Shang Rong. Design of intelligent vehicle lateral and longitudinal controller based on model predictive control[J].Journal of Hubei University of Automobile Industry,2021,35(01):11-16+20. [11] He Xianglin. Research on Lateral and Longitudinal Control Strategy of Unmanned Vehicle Path Tracking[D].Hunan University,2020.DOI:10.27135/d.cnki.ghudu.2020.003390. Research on Vehicle Longitudinal Control Method Based on Model Predictive Control 1. Introduction 2. Longitudinal vehicle dynamic model 3. Longitudinal controller design based on model predictive control 3.1. Longitudinal Control Strategy Considering Motion State of Other Vehicles 3.2. Longitudinal Controller Design Based on Model Predictive Control 4. Longitudinal control simulation analysis 4.1. Build simulation model 4.2. Simulation Results and Analysis 5. Conclusion References