Battery Energy Consumption Analysis of Automated Vehicles Based on MPC Trajectory Tracking Control

: In the ﬁeld of automated technology research and development, trajectory tracking plays a crucial role in the energy consumption of the vehicle’s power battery. Reducing the deviation between the actual trajectory and the reference trajectory is the focus of trajectory tracking research. This paper proposes the use of the model predictive control (MPC) method to reduce the deviation of lateral and longitudinal position between the actual driving trajectory and the reference trajectory. First, the driving conditions of the vehicle are reﬂected by establishing the vehicle dynamics model. Then, the MPC trajectory tracking controller is built by designing the objective function with constraints; Finally, the feasibility of this approach was veriﬁed by a joint Carsim-Simulink simulation. The simulation results show that the MPC controller designed in this paper can track the trajectory better, and reduce the lateral and longitudinal position deviation. To a certain extent, the battery energy consumption is reduced and the accuracy of the tracking trajectory and the safety of vehicle driving are improved.


Introduction
In recent years, power batteries have become more and more widely used in the field of automated vehicles. For the study of electric vehicles and automated vehicles, the service life and cruising range of batteries are the most urgent problems to be solved at present. By building a prediction model, predicting the cruising range of electric vehicles and calculating the power consumption required by various equipment, and using the transient simulation model to calculate the degree of influence of external factors during the driving of the vehicle, so as to relieve the driver's cruising range anxiety [1]. One can design a dedicated control system to increase the range of electric vehicles and automated vehicles by extending the discharge time of the battery [2]. Part of the aging in the battery pack determines the performance of the entire battery pack, using distributed feasibility methods to detect the maximum range of balance current, and then predicting the battery life through model prediction [3]. In order to reduce the space occupied by the battery, a long cylindrical lithium battery can be used. Compared with the traditional battery, this long cylindrical battery has better heat dissipation capacity and longer cruising range [4,5]. Leverage machine learning methods can be used to simulate battery consumption and reduce uncertainty in the forecasting process. This approach gives the driver a more complete grasp of the battery pack's performance, reducing range anxiety [6]. One can design an electric vehicle model, and calculate the average energy consumption per kilometer and the remaining cruising range of the vehicle through the prediction of various indicators of the battery pack [7]. At different operating temperatures, an insulating material and a heater are designed to reduce the heat loss of the battery in the environment by analyzing the Electrochem 2022, 3 338 performance of the battery pack [8,9]. In an EV's battery management module, accurate prediction of battery state of charge and usage can improve battery life and cruising range [10]. The above methods are all improvements to the power battery. For unmanned vehicles, the vehicle will be affected by many uncertain factors, and the energy consumption of the power battery cannot be guaranteed. At this time, the high-efficiency and precise tracking trajectory can exert the maximum performance of the power battery.
In the trajectory tracking control method of automated vehicles, the commonly used control theories include PID control, fuzzy control, sliding mode control, model predictive control, and others. PID control, fuzzy control, and sliding mode control are widely used. In vehicle trajectory tracking control, combining PID control with the genetic algorithm as well as designing a fuzzy controller based on interval type-3 can improve the stability of lateral control for vehicles [11,12]. The trajectory tracking accuracy can be improved by optimizing the controller parameters and adding data-driven control [13,14]. PID-based DDPG control method and fuzzy control combined with the MPC method can improve the tracking stability and comfort of the vehicle under different operating conditions [15,16]. Adding visual search to fuzzy control makes steering more accurate [17]. Improved hybrid fuzzy controller for active vehicle suspension system optimizes vehicle ride smoothness and road holding [18]. The backstep sliding mode control can overcome the external interference, and the use of feedforward and backward combined with synovial control can effectively improve the vehicle tracking performance [19]. The required control signal is obtained by adding self-adaptation in the sliding mode control. In the bottom layer control, dynamic regulation is used to give each wheel an appropriate torque, so that the entire closed-loop system can be stabilized [20]. In the vehicle formation, using sliding mode control theory and adding a multi-speed difference model, this method can shorten the formation time and improve the stability in the simulation environment [21]. Based on the Lyapunov theory, a twisted sliding mode control algorithm is designed, and the stability of the control system is proved by applying the backstepping technique, which can also improve the robustness of the vehicle tracking path [22]. Non-singular terminal sliding mode control can accurately track the reference path in the presence of uncertain controller parameters and disturbances in the environment [23]. The trajectory tracking comparison analysis of geometry-based, preview path, LQR, linear MPC, and observer-based integral action controllers under various perturbations such as road friction coefficient drop and GPS positioning error shows that the observer-based integral action controller still has good tracking [24]. This method has higher requirements on the model and may not work if the model is inaccurate. When the vehicle is moving, or disturbed by external factors, PID control and sliding mode control cannot meet the wide range of regulations, and the theoretical nature of fuzzy control cannot be verified.
Model predictive control has a powerful constraint handling capability. It can predict the future output of the system according to the historical information of the controlled object and future input. Incorporating MPC in vehicle obstacle avoidance and steering control can improve obstacle avoidance efficiency [25,26]. The vehicle is driven safely at high speed by building a coupled nonlinear tire model [27] and adding sigmoid safety constraints to the MPC controller [28]. The MPC controller with linear time variation can improve the flexibility and stability of vehicle steering through multi-module allocation processing [29,30]. Adding adaptive to MPC can control the stability of vehicle tracking trajectory under complex operating conditions [31,32]. MPC combined with Gaussian function [33] and predictive following theory (PFT), respectively [34], such can improve vehicle driving comfort. A cost function is added to the MPC controller, and the yaw angle, lateral position and longitudinal position are used as constraints to ensure that the vehicle can effectively track the path [35]. In the human-vehicle interaction, the optimal torque of the wheels is calculated in the model predictive control framework to complete the steering [36]. Adding PID speed control to the MPC controller optimizes the controller and realizes the tracking of the speed [37]. The road factor is added into the MPC controller, and the vehicle tracking trajectory is realized by combining the road inclination angle and the roll angle [38]. Using the MPC theory, the trajectory planning and control are combined, and the vehicle can be safely driven through the lateral and longitudinal control of the vehicle [39]. The above method improves the stability and comfort of vehicle driving, but does not really reduce the deviation between the real driving trajectory and the reference trajectory. If this deviation is too large, it will greatly waste the electricity of the power battery and shorten the cruising range.
The main contribution of this paper is to propose a method to reduce the deviation of the tracking reference trajectory of automated vehicles to reduce the energy consumption of the vehicle power battery. In order to reduce the lateral and longitudinal deviations of the automated vehicle tracking reference trajectory, this paper designs an automated vehicle trajectory tracking controller with constraints based on model predictive control theory. The feasibility of the controller was verified by adding a reference trajectory to the controller and co-simulating it on Carsim-Simulink. After the simulation and comparison analysis of electricity consumption, it shows that the actual electricity consumption is almost the same as the reference electricity consumption under the premise that the vehicle accurately tracks the reference trajectory, thus further saving power.
The structure of this paper is as follows. Section 2 introduces the vehicle dynamics model, the design of the MPC controller, and the definition of the power battery energy consumption. Section 3 presents the simulation results and analysis. Section 4 draws the conclusion.

Vehicle Dynamics Model
In vehicle motion, building an accurate vehicle model can improve vehicle tracking control. The coupling between lateral and longitudinal control is added to the vehicle model, and the tire slip is considered, which can effectively control the vehicle to track the reference trajectory [40]. Therefore, a vehicle dynamics model considering tire slip is established in this paper [41], as shown in Figure 1.
Electrochem 2022, 3, FOR PEER REVIEW 3 and realizes the tracking of the speed [37]. The road factor is added into the MPC controller, and the vehicle tracking trajectory is realized by combining the road inclination angle and the roll angle [38]. Using the MPC theory, the trajectory planning and control are combined, and the vehicle can be safely driven through the lateral and longitudinal control of the vehicle [39]. The above method improves the stability and comfort of vehicle driving, but does not really reduce the deviation between the real driving trajectory and the reference trajectory. If this deviation is too large, it will greatly waste the electricity of the power battery and shorten the cruising range.
The main contribution of this paper is to propose a method to reduce the deviation of the tracking reference trajectory of automated vehicles to reduce the energy consumption of the vehicle power battery. In order to reduce the lateral and longitudinal deviations of the automated vehicle tracking reference trajectory, this paper designs an automated vehicle trajectory tracking controller with constraints based on model predictive control theory. The feasibility of the controller was verified by adding a reference trajectory to the controller and co-simulating it on Carsim-Simulink. After the simulation and comparison analysis of electricity consumption, it shows that the actual electricity consumption is almost the same as the reference electricity consumption under the premise that the vehicle accurately tracks the reference trajectory, thus further saving power.
The structure of this paper is as follows. Section 2 introduces the vehicle dynamics model, the design of the MPC controller, and the definition of the power battery energy consumption. Section 3 presents the simulation results and analysis. Section 4 draws the conclusion.

Vehicle Dynamics Model
In vehicle motion, building an accurate vehicle model can improve vehicle tracking control. The coupling between lateral and longitudinal control is added to the vehicle model, and the tire slip is considered, which can effectively control the vehicle to track the reference trajectory [40]. Therefore, a vehicle dynamics model considering tire slip is established in this paper [41], as shown in Figure 1. (1) where m is the vehicle mass, v x and v y are the longitudinal and lateral speeds of the center of mass in the body coordinate system, I z is the moment of inertia around the Z axis, ϕ is the yaw angle, l f and l r are the distances from the center of mass of the vehicle to the front and rear axles, δ f is the front wheel steering angle, C l f and C lr are the longitudinal slip stiffness of the front and rear tires, C c f and C cr are the lateral slip stiffness of the front and rear tires, s f and s r are the slip ratios of the left and right front wheels.
Since all of the state points on the predicted trajectory cannot be obtained, the nonlinear dynamic model should be linearized. In this paper, . ξ = F(ξ(t), u(t)) is taken and a system operating point is selected as [ξ 0 , u 0 ], the first-order Taylor formula is expanded at the operating point to obtain the linear time-varying equation: Among them, A t = ∂F ∂ξ ; B t = ∂F ∂u . The Formula (2) is discretized to obtain the discrete state expression: Among them, A k = I + A t × T, B k = B t × T, I is the identity matrix, T is the sampling period of the system.

Design Objective Function
In this paper, the model state quantity is ϕ, Y, X and the control quantity is the front wheel steering angle δ f . In order to reduce the amount of calculation and ensure that the controller can effectively track the trajectory, the following objective function with constraints is specially adopted: , E is the tracking error between the desired path in the predicted time domain and the free response of the system, ε is the relaxation factor, ∆u is the control increment, ψ is a N p × 1 linear time-varying matrix, φ is the deviation augmentation matrix. In lateral tracking capability, the constraint condition of the front wheel steering angle δ f is set as: −25 • ≤ δ f ≤ +25 • .

Power Battery Energy Consumption
In order to better verify the electricity consumption of the MPC trajectory tracking controller to control the automated vehicle during the driving mileage. In this paper, the actual driving distance of the vehicle is divided into several segments, and each segment of the actual driving distance is multiplied by a fixed battery electricity consumption rate to get the actual battery power consumption of the vehicle in that segment. For this purpose, this paper adopts the following electricity consumption expression: Among them, i = 1, 2, 3, . . . , d is the actual driving distance of the vehicle, w is electricity consumption rate (w = 0.22 kWh/km) [42].

Results
This paper uses the co-simulation of Carsim and Simulink, builds the vehicle dynamics module and determines the input and output ports in Carsim, and builds the trajectory tracking control module in Simulink. The main parameters of the trajectory tracking controller are shown in Table 1. The accuracy and stability of trajectory tracking are affected by the prediction time domain and the control time domain to a certain extent. Based on the constant sampling time of the system, in order to verify the effects of different weight coefficients, prediction time domain and control time domain on the vehicle tracking trajectory, this paper uses the automated vehicles trajectory planned by the artificial potential field method as the reference trajectory [43] and selects three different sets of data to test the efficiency of the vehicle tracking trajectory.
It can be seen from Figure 2a,b that when N p = 25, N c = 10, and ρ = 500, the vehicle cannot accurately track the reference trajectory in the interval of 0-20 and a lot of fluctuations occur. The yaw angle generated by the actual driving of the vehicle also has a lot of fluctuations, and the vehicle stability is poor. When N p = 40, N c = 20, and ρ = 700, the tracking accuracy and stability of the controller are only slightly improved, and it still cannot satisfy the normal driving of the vehicle. When N p = 60, N c = 30, and ρ = 1000, the vehicle can accurately track the reference trajectory from the starting position and reach the target position smoothly. During the whole tracking process, the actual driving trajectory of the vehicle has no fluctuation and the actual driving trajectory has a high degree of coincidence with the reference trajectory, it can also track well at the turning of the reference trajectory. Through the comparison and analysis of the above three sets of data, when the sampling time of the system remains unchanged, the relaxation factor weight coefficient, prediction time domain and control time domain parameters in the MPC controller designed in this paper are selected as N p = 60, N c = 30, and ρ = 1000. Figure 3a,b shows the comparison between the reference trajectory and the real trajectory in the lateral and longitudinal positions respectively. Figure 3a compares the lateral positions of the reference trajectory and the real trajectory, it can be seen that deviations occur in the 0-10 s and 20-25 s intervals. Figure 3b compares the longitudinal positions of the reference trajectory and the real trajectory, it can be seen that deviations occur in the 0-10 s interval. The deviations in the above comparisons are extremely small and are within the controllable range, which does not affect the overall tracking effect, which shows that the controller has very good robustness.    Figure 4a shows the comparison between the reference yaw angle and the actual gen− erated yaw angle, there are slight fluctuations in the actual generated yaw angle. The de− viation between the reference yaw angle and the actual generated yaw angle is less than 0.2° during the whole simulation time, which indicates the high accuracy of the MPC con− troller. Figure 4b represents the front wheel steering angle generated by the actual driving   Figure 3a,b shows the comparison between the reference trajectory and the real trajectory in the lateral and longitudinal positions respectively. Figure 3a compares the lateral positions of the reference trajectory and the real trajectory, it can be seen that deviations occur in the 0-10 s and 20-25 s intervals. Figure 3b compares the longitudinal positions of the reference trajectory and the real trajectory, it can be seen that deviations occur in the 0-10 s interval. The deviations in the above comparisons are extremely small and are within the controllable range, which does not affect the overall tracking effect, which shows that the controller has very good robustness.  Figure 4a shows the comparison between the reference yaw angle and the actual gen− erated yaw angle, there are slight fluctuations in the actual generated yaw angle. The de− viation between the reference yaw angle and the actual generated yaw angle is less than 0.2° during the whole simulation time, which indicates the high accuracy of the MPC con− troller. Figure 4b represents the front wheel steering angle generated by the actual driving  Figure 4a shows the comparison between the reference yaw angle and the actual gen− erated yaw angle, there are slight fluctuations in the actual generated yaw angle. The de− viation between the reference yaw angle and the actual generated yaw angle is less than 0.2 • during the whole simulation time, which indicates the high accuracy of the MPC con− troller. Figure 4b represents the front wheel steering angle generated by the actual driving of the vehicle. According to the set of constraints, the front wheel steering angle: −25 • ≤ δ f ≤ +25 • . As can be seen from the figure, the actual generated front wheel steering angle fluctuation range is in accordance with the set constraints. The lateral and longitudinal velocity curves actually generated by the vehicle in Figure 4c,d fluctuate slightly, but the range of fluctuation is extremely small and within a controllable range.
Combining the lateral speed curve and the wheel angle curve, it can be seen that when the lateral speed fluctuates, the front wheel angle generated by the vehicle is still within the controllable range. Combining the lateral velocity curve and the actually generated yaw angle curve, it can be seen that when the lateral velocity fluctuates, the vehicle can keep up with the reference trajectory in time after deviating from the heading. This further illustrates that the designed controller can effectively control the steering of the vehicle and improve the accuracy of the vehicle when tracking the reference trajectory.
velocity curves actually generated by the vehicle in Figure 4c,d fluctuate slightly, but the range of fluctuation is extremely small and within a controllable range. Combining the lateral speed curve and the wheel angle curve, it can be seen that when the lateral speed fluctuates, the front wheel angle generated by the vehicle is still within the controllable range. Combining the lateral velocity curve and the actually generated yaw angle curve, it can be seen that when the lateral velocity fluctuates, the vehicle can keep up with the reference trajectory in time after deviating from the heading. This further illustrates that the designed controller can effectively control the steering of the vehicle and improve the accuracy of the vehicle when tracking the reference trajectory.  Figure 5 shows the comparison between the reference electricity consumption and the actual electricity consumption of the vehicle during the specified driving mileage. In the entire driving mileage, the actual electricity consumption is almost the same as the reference electricity consumption, and the error between the two is very small. This shows that the battery energy consumption is also within the reference range, and the loss is  Figure 5 shows the comparison between the reference electricity consumption and the actual electricity consumption of the vehicle during the specified driving mileage. In the entire driving mileage, the actual electricity consumption is almost the same as the reference electricity consumption, and the error between the two is very small. This shows that the battery energy consumption is also within the reference range, and the loss is extremely small. The above results show that the vehicle's accurate tracking of the trajec− tory is beneficial to save electricity and improve the battery cruising range.
Electrochem 2022, 3, FOR PEER REVIEW 8 extremely small. The above results show that the vehicle's accurate tracking of the trajec− tory is beneficial to save electricity and improve the battery cruising range.

Conclusions
Based on the vehicle dynamics model, this paper uses model predictive control theory to design an automated vehicle trajectory tracking controller, in which appropriate constraints are added to ensure that the vehicle can accurately track the reference trajectory. After simulation and comparison the automated vehicle trajectory tracking controller designed in this paper can quickly complete the trajectory tracking task and substantially reduce the deviation between the real trajectory and the reference trajectory in the lateral and longitudinal positions. The reduction of this deviation is conducive to reducing the energy consumption of the power battery of the automated vehicle and improving the cruising rang of the power battery and the energy utilization rate of the vehicle. The controller has a quite high accuracy during trajectory tracking.

Conclusions
Based on the vehicle dynamics model, this paper uses model predictive control theory to design an automated vehicle trajectory tracking controller, in which appropriate constraints are added to ensure that the vehicle can accurately track the reference trajectory. After simulation and comparison the automated vehicle trajectory tracking controller designed in this paper can quickly complete the trajectory tracking task and substantially reduce the deviation between the real trajectory and the reference trajectory in the lateral and longitudinal positions. The reduction of this deviation is conducive to reducing the energy consumption of the power battery of the automated vehicle and improving the cruising rang of the power battery and the energy utilization rate of the vehicle. The controller has a quite high accuracy during trajectory tracking.