Energy-Optimal Braking Control Using a Double-Layer Scheme for Trajectory Planning and Tracking of Connected Electric Vehicles

Most researches focus on the regenerative braking system design in vehicle components control and braking torque distribution, few combine the connected vehicle technologies into braking velocity planning. If the braking intention is accessed by the vehicle-to-everything communication, the electric vehicles (EVs) could plan the braking velocity for recovering more vehicle kinetic energy. Therefore, this paper presents an energy-optimal braking strategy (EOBS) to improve the energy efficiency of EVs with the consideration of shared braking intention. First, a double-layer control scheme is formulated. In the upper-layer, an energy-optimal braking problem with accessed braking intention is formulated and solved by the distance-based dynamic programming algorithm, which could derive the energyoptimal braking trajectory. In the lower-layer, the nonlinear time-varying vehicle longitudinal dynamics is transformed to the linear time-varying system, then an efficient model predictive controller is designed and solved by quadratic programming algorithm to track the original energy-optimal braking trajectory while ensuring braking comfort and safety. Several simulations are conducted by jointing MATLAB and CarSim, the results demonstrated the proposed EOBS achieves prominent regeneration energy improvement than the regular constant deceleration braking strategy. Finally, the energy-optimal braking mechanism of EVs is investigated based on the analysis of braking deceleration, battery charging power, and motor efficiency, which could be a guide to real-time control.


Introduction
Increasingly stringent fuel economy and emission standards in recent years promote the development of electric vehicles (EVs) [1]. However, the driving range of EVs is still too short compared with the internal combustion engine vehicle, because the battery energy density is insufficient. The short driving range is the main obstacle for the wide diffusion of EVs [2]. To extend the driving range, one of the popular ways is increasing the battery capacity, however, the battery size and vehicle price are increased simultaneously [3]. Recycling vehicle kinetic energy in the braking process is another prominent approach to extend the driving range, which is called regenerative braking in some literature [4].
Regenerative braking is the prior choice in some traffic conditions for EVs, e.g., approaching an intersection with the red signal, following the slowed preceding vehicle, and reaching a destination, because the EVs can transfer vehicle kinetic energy to electric energy by regenerative braking while without additional battery energy consumption. Since approximately 30%-50% of driving energy can be recycled in urban traffic [5], several studies have investigated regenerative braking in recent decades. Some studies tried to optimize the powertrain configuration and vehicle components for increasing regeneration energy. Hellgren et al. [6] demonstrated that the distributed-driven configuration of EVs has superior energy recycle potential than a central driven. Joy et al. [7] presented an integrated power circuit and electronic commutator control strategy to improve the motor generating energy of EVs. Kiddee et al. [8] designed a hybrid energy storage system, which uses the super-capacitor and lithium-ion battery to enhance the harvesting of braking energy. Zhang et al. [9] proposed an electricalhydraulic integrated brake configuration based on the electronic stability program to achieve an efficient and safe braking system. Another approach to improve regeneration energy is the regenerative braking strategy (RBS) design. The conventional RBS focus on braking force distribution of each wheel (axle), which cooperating with the motor braking and friction braking force to improve regeneration energy, while ensuring braking safety, stability, and comfort [10]. Sun et al. [11] integrated the braking control strategy with the objective of high braking stability and regeneration energy, which including three braking force operating modes. Xu et al. [12] presented two regenerative braking force optimization controllers to promote regeneration energy, it considering motor efficiency to distribute the friction and motor braking torque of the front and rear wheels. Li et al. [13] proposed a composite RBS to optimize regenerative and plugging braking simultaneously with the driver's intention recognition. Lian et al. [14] designed an optimal braking force distribution strategy, while uses a safety distance model to avoid collision. In addition, the rule-based algorithm [9], PID algorithm [15], sliding mode control [16], fuzzy logic control [17], design of experiment method [11], model predictive control (MPC) [12], and dynamic programming (DP) algorithm [18] were adopted to refine the RBS.
Recently, the emerging of connected vehicle technologies, i.e., vehicle-to-everything (V2X) communication, provides possibilities to further improve energy efficiency and reduce emission [19]. The traffic, road, and vehicle information can be accessed by V2X, which is used to plan the energy-optimal velocity, i.e., the surrounding vehicle states [20], road slope [21], road curvature [22], and traffic signal phase and timing [23]. However, most researches focus on the RBS design in vehicle components control and braking torque distribution, few combine the connected vehicle technologies into braking velocity planning. If the braking intention is accessed by the V2X (i.e., braking distance and terminal velocity), the EVs could plan the braking velocity for recovering more energy.
Therefore, this paper proposes an energy-optimal braking strategy (EOBS), where the key is using shared braking intention to planning energy-optimal braking trajectory. The major contributions of this paper are threefold. First, a double layer control scheme is proposed: in the upper-layer, the energy-optimal braking trajectory is planned by the distance-based DP for fast computation. Second, to follow the optimal trajectory, the lower-layer designs a tracking controller using the linear time-varying MPC (LTV-MPC), to minimize the trajectory tracking errors while ensuring braking comfort and safety. Third, the mechanism of energy-optimal braking is derived. The energy-optimal braking trajectory is consists of multiple phases, which can be converted to a rule-based braking strategy.
The remainder of this paper is organized as follows. Section 2 introduces the EVs model and regenerative braking strategy. Section 3 formulates the energy-optimal braking problem and double-layer EOBS. Section 4 verifies the performance of the proposed EOBS, and investigates the energy-optimal braking mechanism. Finally, conclusions are presented in Section 5.

Vehicle Model
This paper optimizes the braking velocity of four-wheelindependent-driven electric vehicles, which is powered by four in-wheel motors (IWM).

Vehicle Dynamics
This paper focuses on the energy-optimal braking control problem in the context of daily driving on a straight and high adhesion road. Therefore, only the longitudinal dynamics is modeled, as shown in Eq. (1): where m is the vehicle mass, δ is the vehicle rotational inertia coefficient, g is the acceleration of gravity, θ is the road slope, f is the rolling resistance coefficient, C D is the aerodynamic drag coefficient, A r is the frontal area, and ρ is the air density. x = [d v] T is the states variable, d is the distance, v is the velocity. u = F is the control variable, F is the vehicle force, positive for traction force and negative for braking force.
In the traction process, the vehicle force is supplied by IWM, i.e., F = ∑F m . In the braking process, the vehicle force including motor force F m and friction braking force F f , i.e., F = ∑F m + ∑F f . In this paper, the dynamics of the motor is not mainly considered, so the motor response model is simplified by using first-order lag relation (1) where F md is the desired motor force, which is derived by regenerative braking strategy. τ m is the motor time constant coefficient. The friction braking force is generated by a hydraulic brake system (HBS). We also use the first-order lag relation to represent the HBS response, i.e., where p w is the brake wheel cylinder pressure, τ h is the HBS time constant coefficient. p wd is the desired brake wheel cylinder pressure, which is calculated by Eq. (4): where κ is the conversion coefficient of wheel cylinder pressure, r w is the radius of the wheel.

Energy Consumption
The power of motor is calculated by Eq. (5) where P m is the instantaneous motor power, positive for propulsion power and negative for generation power. n is the motor rotational speed.
This paper ignores the energy losses in electric wires and considers the accessory power P a . Then the battery power P b is where P a is the power consumption by the vehicle accessories, e.g., vehicle headlight, air conditioning, assisted motor of the steering system, etc. η b is the battery efficiency, sign(⋅) is the signum function, η m is the motor efficiency which is determined by the motor torque and speed as shown in Figure 1.
The battery is modeled as a simple equivalent circuit [24], which charging current I b is expressed as Eq. (7) where E is the open-circuit voltage, and R o is the internal resistance. The battery state of charge (SOC) can be calculated by Eq. (8) where SOC 0 is the battery initial SOC, C b is the battery capacity.

Regenerative Braking Strategy
The RBS including twofold: braking force distribution on the front and rear axles, motor and friction braking force distribution on each wheel. The distributed braking force on the front and rear axles affect braking stability, then we use 'ideal distribution strategy' to prevent wheel locking [25] where F bf and F br are the braking force on the front and rear axle, respectively. β is the ideal distribution ratio, which is proportional to vehicle axle normal forces where L b is the distance from the rear axle to the center of vehicle mass, L w is the vehicle wheelbase, h g is the distance from the ground to the center of vehicle mass, z is the brake strength.
We assume the vehicle driving on the straight road, then the braking force on the left and right wheels are identical. The motor force is preferred to recycle more energy, and HBS provides the remained force while the motor force can not meet the demand. For an example of the front-rear wheel, the motor and friction braking force are calculated by Eqs. (12) and (13), respectively: where F mmax is motor maximum braking force.

Energy-optimal Braking Strategy
This section formulates the energy-optimal braking problem and proposes a double-layer EOBS to improve regeneration energy while ensuring braking comfort and safety.
In the upper-layer, the energy-optimal braking trajectory is planned by solving the optimal control problem.
In the lower-layer, a tracking controller is used to track the optimized trajectory accurately while ensuring braking comfort and safety. Figure 2 shows the scheme of the proposed double-layer EOBS.

Energy-optimal Braking Trajectory Planning
The energy-optimal braking trajectory is planned by the DP algorithm. Since the DP has been widely used in the energy optimization problem [19], which divides the optimal control problem into simpler sub-problems and calculates recursively based on the Bellman optimality principle [26]. Figure 3 shows the scenario of braking, where D is the distance to the destination (can be a stop line of the signalized intersection or a stopped preceding vehicle), V s and V e are the initial and desired terminal velocity, respectively. We assume the D and V e are accessed by V2X communication, the V s is obtained by using onboard sensors.

Optimization Problem Formulation
In this paper, the braking distance D is fixed, thus the whole problem is discretized in distance-domain by distance step Δd. The total number of distance step N D is determined by the D and Δd, i.e., N D = D/Δd + 1. The velocity is selected as the state variable, i.e., x D = v, and the braking deceleration a is selected as the control variable, i.e., u D = a. Since the distance step is small, the braking deceleration of each sub-problem is assumed to be constant. Thus, the energy-optimal braking problem is expressed in Eq. (14) indexed by k: where v min and v max are the minimum velocity for efficient traffic and the maximum velocity for road limitation, respectively. a min and a max are the deceleration depend on braking comfort and vehicle resistance, respectively. Δt D is the time interval. Note that the terminal condition of the velocity has been relaxed by converting them to soft constraints and merged into the objective function as Eq. (14), with weighting factor α for the latter term.
Besides, the state transfer of vehicle velocity and time interval in k step are calculated by Eqs. (15) and (16), respectively.

DP Solving
Denote the transitional cost-to-go function from k step to k+1 step W(x D (k), u D (k)) and the penalty function for the terminal states G(x D (N D )), i.e., The formulated control problem is solved recursively by following the Bellman optimality principle [ [26]]: N D − 1 step: Minimum where J k * (x D (k)) is the minimum cost-to-go value at the moment k. Then, the energy-optimal braking trajectory and control law can be obtained by backward calculation.

Tracking Problem Formulation
The objective of the tracking controller is to minimize the tracking error between the actual and original optimal trajectory, while adapts to traffic conditions for braking comfort and safety. In this paper, the vehicle velocity and distance error and vehicle force increment are defined as soft constraints, thus, the tracking problem is shown in Eq. (21): Δu is the increment of the control variable, (u M |k) represents the derived control variable of the controller at k moment. Q, R, and β are the weighing factor matrix, ε is the relaxation factor, N p and N c are the prediction horizon and control horizon, respectively. N M is the tracking problem horizon, which is determined by the length of the original trajectory. L is the vehicle length, ϑ is the velocity slack.
In tracking problem Eq. (21), the constraints including twofold. First, the vehicle force is subject to physical limits u min , which is determined by the maximum comfort braking force and road adhesion. Secondly, the virtual stop region that including distance and velocity is defined as a buffer space that relies on safety distance and minimum steady velocity of EVs, then the actual terminal braking distance and velocity are meet the second and third constraints.

Linear Time-varying State Prediction Model
Since the vehicle dynamics in Eq. (1) is nonlinear, it greatly increases the computational burden of MPC. Therefore, we employ the approximate linearization method [27] to transform the nonlinear time-varying model Eq. (1) to a linear time-varying (LTV) system: the original braking force, which calculated by Eq. (23): Since the MPC calculates the control law discretely, the LTV system in Eq. (22) is converted to the discretetime system using the Euler method [28]: where Δt M is the time step.
Denote a state prediction matrix: where (i|k) represents the i-step-ahead predicted error at the kth step. Substituting Eq. (24) where Ỹ (k) and �Ũ (k) are output and control increments of the prediction model, respectively. Noted that according to the principle of MPC, the N c ≤ N p , and the control input that beyond N c is equal to the last control input of N c .

Quadratic Programming Solving
The tracking problem is solved using the quadratic programming (QP) algorithm. Then, the objective function and constraints in Eq. (21) are converted to standard QP form Ref. [29], i.e., where 1 Nc is the column vector with N c rows, U min is the minimum value set of control input A series of control input increments Ũ * k in the control horizon can be obtained by solving the QP problem. The predicted control input ũ * (k) is the first term of the control sequence plus the previous control input ũ(k − 1): Finally, the predicted vehicle braking force u * (k) is

Simulation Results and Discussion
In this section, a simulation is conducted by jointing MATLAB (version 9.4, R2018a) and CarSim (version 20959, 2016.1) on a PC with an Intel Core i7-8700 @ 3.20 GHz CPU, the joint simulation structure as shown in Figure 2. In addition, the index α r is defined to evaluate the performance of regeneration efficiency as described in Eq. (32) [9]: where v e is the actual terminal velocity in the lower-layer.

Simulation Setup
The In the DP optimization, the distance step Δd = 0.01 m, the grid step of state variable v and control variable a are 0.1 m/s and 0.05 m/s 2 , respectively. In the LTV-MPC controller, the lengths of prediction horizon N p and control horizon N c both are 100, which finds a good compromise between optimality and computational efficiency, as verified by a systematic simulative analysis for various horizon lengths. The weight matrices are Q = 1000I 2Np×2Np and R = 200I Nc , and the sampling time Δt M = 0.01 s.
Two typical braking scenarios are simulated to evaluate the regeneration energy efficiency of the proposed strategy. The scenarios are referred to as Scenarios A and B, i.e., normal braking with small deceleration and emergency braking with big deceleration. The main parameters of these two scenarios are listed in Table 1.

Benchmark Strategy
The proposed EOBS is compared with the regular constant deceleration braking strategy (CDBS) for benchmarking proposes. For CDBS [30], the vehicle will brake by using a constant deceleration, and the lower-layer uses the same LTV-MPC controller as the proposed EOBS to track the constant deceleration velocity trajectory. The (32) trajectory tracking performance in the sense of regeneration energy optimality and braking safety is evaluated by comparing the LTV-MPC controller with the PID controller. For the PID controller, the velocity error is used as the input and the deceleration is defined as the output to achieve speed tracking. In addition, we define the original solution of the upper-layer as the original trajectory. While the safety-guaranteed solution in the lower-layer is defined as the actual trajectory.

Tracking Performance
The tracking performance of the LTV-MPC controller will be verified in Scenario A, and compared with the regular PID controller. The LTV-MPC and PID controller is used to track the same original trajectory derived in the upper-layer of EOBS. Figures 4, 5, 6 and Table 2 are the simulation results. Figure 4 shows the vehicle trajectory of distance and velocity, Figures 5 and 6 show the vehicle braking force and slip rate, respectively. The regeneration energy, vehicle terminal states are listed in Table 2. In Figure 4 and Table 2, the actual terminal velocity and braking distance error of the LTV-MPC controller are 0.01 m/s and 0.03 m respectively, and 0.72 m/s and 9.96 m of PID controller. The error data shows better tracking performance of the LTV-MPC controller than the PID controller. The distance exceeds the maximum permissible distance (201.58-196.73 m) in the PID controller, which causes collision possibly. Figure 5 shows the braking force both do not exceed constraints of LTV-MPC and PID controller, however, the PID controller leads to a large tracking error, which is the cause of state tracking error as shown in Figure 4. Figure 6 shows the small slip rate of each wheel, which indicates the braking stability is still ensured by employing the LTV-MPC.
As shown in Table 2, the vehicle with the LTV-MPC controller achieves regeneration energy efficiency increase by 3.83% compared with the PID controller, and decreases by 0.03% compared with the original trajectory. Thus, the regeneration energy efficiency of the LTV-MPC controller is superior to the PID controller, because of the excellent tracking performance.

Regeneration Energy Efficiency
The regeneration energy efficiency of EOBS is evaluated by compared with CDBS in Scenarios A and B. The simulation results are shown in Figure 7 and Table 3. Figure 7 shows the braking deceleration. The braking deceleration of CDBS is constant (e.g., Scenario A is − 1.89 m/s 2 and Scenario B is − 4.26 m/s 2 , which is the average deceleration of EOBS), while the EOBS derives a varied deceleration for energy-optimal consideration. Table 3 shows the regeneration energy and vehicle terminal states of EOBS and CDBS. We can observe the vehicle could stay within the defined region in Scenarios A and B, and the proposed EOBS has improved the regeneration energy in Scenario A and Scenario B by 11.42% and 3.19% than CDBS. These above-mentioned results show that the proposed EOBS guarantees braking safety, while improving regeneration energy, especially in normal braking scenario. Further, the energy-optimal braking mechanism of EVs will be analyzed in detail in Section 4.4.   Figures 8,9,10 are the motor braking force, braking cylinder pressure of HBS (the sum of every wheel), and battery charging power, respectively. The motor efficiency during the regenerative braking and its average value are listed in Table 4. In Scenario A, as shown in Figure 7a, the deceleration of EOBS including three phases: increasing firstly, then decreasing, and increasing again. The wheel cylinder pressure increases firstly and then drops to approximately zero in the second and third phases (see Figure 9a). In the first phase, a large braking deceleration is operated. Although the friction braking force increased with the large deceleration (see Figure 9a), the battery charging power is increased. This means that the vehicle can make full use of the peak generation power to recover more vehicle kinetic energy. The second and last phases of EOBS should be discussed together because these two phases are complementary compared to CDBS. Figures 8a and 10a illustrate   a complementary relationship: the motor braking force, battery charging power of EOBS less than CDBS in the second phase, but larger than CDBS in the last phase.

Energy-optimal Braking Mechanism
In the second phase, the braking deceleration decreases quickly to reduce friction braking force (see Figure 9a). In the last phase, to make full use of the motor (see Figures 8a, 10a), the braking deceleration of EOBS increases. In Scenario B, as shown in Figure 7b, the braking deceleration of EOBS can be divided into three phases same as Scenario A and for the same reasons. The first and second phases are discussed together, in the first phase, the deceleration of EOBS decreases and increases in the second phase. In the third phase, the braking deceleration decreases because the motor generating force is gradually dwindling and replaced by the friction braking force in low-speed operating conditions (see Figures 8b and 9b). As shown in Figure 10b, the battery charging power of EOBS and CDBS are similar, which causes the regeneration energy improvement of EOBS is not obvious in the emergency braking case (see Table 3).
In addition, Table 4 shows the motor efficiency of EOBS and CDBS. The average motor efficiency in EOBS is greater than CDBS in Scenario A, but it less than CDBS in Scenario B. This phenomenon indicates only focus on maximum motor working efficiency does not mean maximum regeneration energy. The regeneration energy is related to motor generation power and motor efficiency, and the co-optimization of motor generating power and motor efficiency is the key to achieve the energy-optimal braking control. Therefore, the energy-optimal braking control requires reasonably reducing friction braking force and increasing motor braking force for improving  the motor generation power, and operating the motor working at a high-efficiency point at the same time.

Conclusions
This paper presented a double-layer energy-optimal braking strategy to improve the regeneration energy using accessed braking intention. First, the energyoptimal braking trajectory is derived by distance-based dynamic programming in the upper-layer. Then, in the lower-layer, the linear time-varying model predictive controller is formulated to follow the optimal trajectory accurately while ensures braking safety and comfort. The simulation results demonstrate the proposed energy-optimal braking strategy achieves prominent regeneration energy improvement than the regular constant deceleration braking strategy, and the trajectory tracking performance of the linear time-varying model predictive controller is superior to the regular PID controller. The analysis of the energy-optimal braking mechanism indicates the optimal regeneration energy operation is required to reasonably reduce the friction braking force and increasing motor braking force, while ensures the motor working at a high-efficiency point as much as possible.
In future work, we will develop a synthesis method to optimize vehicle speed and wheel braking force synchronously, i.e., integrates energy-optimal braking velocity planning problem with the braking force distribution ratio of motor and friction braking system on each wheel for improving regeneration energy further.