Driving Mode Optimization for Hybrid Trucks Using Road and Traffic Preview Data

: This paper proposes a predictive driver coaching (PDC) system for fuel economy driving for hybrid electric trucks using upcoming static map and dynamic trafﬁc data. Unlike traditional methods that optimize over engine torque and brake to obtain a speed proﬁle, we propose to optimize over driving modes of trucks to achieve a trade-off between fuel consumption and trip time. The optimal driving mode is provided to the driver as a coaching recommendation. To obtain the optimal solution, the truck dynamics are ﬁrstly modeled as a hybrid controlled switching dynamical system with autonomous subsystems and then a hybrid optimal control problem (HOCP) is formulated. The problem is solved using an algorithm based on discrete hybrid minimum principle. A warm-start strategy to reduce algorithmic iterations is used by employing a shrinking horizon strategy. In addition, an extensive analysis of the proposed algorithm is provided. We prove that the the coasting mode is never optimal given the truck conﬁguration and and we provide a guideline for tuning parameters to maintain the optimal mode sequence. Finally, the algorithm is validated using real-world data from baseline driving tests using a DAF hybrid truck. Signiﬁcant reduction in fuel consumption is achieved when the data is perfectly available


Introduction
Due to a relatively low cost and flexibility in road selection and delivery locations, freight transportation will remain one of the dominant logistic solutions for the next several decades.However, according to the European Commission reports, road transportation contributes to 23% of CO 2 emission in Europe [1].Therefore, many projects have been initiated to improve efficiency of freight traffic.One of these projects is the IMPERIUM project [2] in the EU Horizon 2020 research and innovation program, which aims at fuel consumption reduction of 20% for heavy-duty (HD) trucks via drivetrain improvement and smart software controls.The research in this study is conducted in collaboration with DAF Trucks N.V. and focuses on speed profile and driving mode optimization using road and traffic preview data as part of the powertrain smart control solution.
For fuel-efficient driving, the eco-driving assistance systems (EDAS) is commonly employed as a smart control system by providing driving assists to reduce fuel consumption and emissions without big investments on mechanical hardware.In general, EDAS consists of a coulple of components including predictive cruise controller (PCC), adaptive cruise controller (ACC) and energy management system (EMS).The impacts of these components on fuel efficiency and emission reduction have been extensively studied [3][4][5][6].In early days, EDAS have been designed as passive systems, including offline driver training [7] and online scoring systems [8,9].More recently, EDAS help to produce counter forces to on accelerator and brake pedal to achieve smooth motions [10,11].
Acitve EDAS provide optimal speed profiles for drivers to track that minimize fuel consumption on a road segment.This can be formulated as an optimal control problem (OCP), where control inputs including the engine torque and gear positions are optimized.An early study in [12] used dynamic programming (DP) to solve a fuel consumption optimization problem with previewed road slope.A more recent study in [13] proposed to also consider legal speed limits and traffic lights data.In [14], a linear model predictive controller has been proposed for velocity trajectory planning.In [15], the authors defined a quadratic function for battery efficiency in a hybrid vehicle and expressed the speed limits in terms of maximum centrifugal force.Therein, a temporal description of vehicle dynamics is presented in terms of driving phases such as acceleration, cruising, coasting, braking, etc.In the optimization problem, the temporal duration of each phase and the produced propulsion power were considered as manipulated variables.The solution was obtained using nonlinear optimization techniques.The research in [16] defined a polynomial function for for optimization of the produced energy.The authors used sequential quadratic programming (SQP) for solving the problem.Alternatively, some studies derived analytic solutions to the optimal velocity profile problem using Karush-Kuhn-Tucker (KKT) optimality conditions [17,18].These methods employed strong assumptions on the operating conditions and a simplified vehicle model.Another approach that was commonly used is Pontryagin's maximum principle (PMP).The study in [19] assumed a known road gradient to optimize produced torque and transmission gears for fuel consumption minimization with a PMP algorithm.However, the aforementioned methods employ an all-in-one optimization strategy trying to generate the optimal torque or power as manipulated variables.This faces safety and implementation difficulties [20].Therefore, this strategy is often used in driving scenarios such as adaptive/predictive cruising control (A/PCC), where minimum operation is required and automated driving is currently possible [21].
In this study, we propose a novel predictive driver coaching (PDC) system for EDAS that exploits static and dynamic road preview information to reduce fuel consumption.Specifically, our contributions are threefold: 1.The longitudinal dynamics of the truck are modeled as a hybrid controlled switching system with autonomous subsystems.As a result, only discrete-valued manipulated variables, i.e., driving modes, need to be optimized.2. A real-time algorithm based on the approximate discrete HMP is developed.In this algorithm, a shrinking horizon strategy is used which enables warm-start of the costate in the HMP at each sampling instant.Comparing to existing methods such as DP, nonlinear optimization and standard PMPs, the developed algorithm is significantly simpler and computationally efficient.3. A proof of a generally optimal driving mode sequence is given and an explicit guideline for tuning algorithmic parameters is provided.As a result, parameter tuning is no longer a trial-and-error process in the developed algorithm.
The rest of paper is structured as follows.First, the HMP framework is recalled in Section 2. Afterwards, the truck longitudinal dynamics are modeled as a controlled switching system with autonomous subsystems and a HOCP is formulated in Section 3. In Section 4, the algorithm based on the discrete HMP is described.The validation of the algorithm using real driving tests data is presented in Section 7. Conclusions are drawn in Section 8.

Preliminaries
Assume a controlled switched system with a finite number of subsystems m ∈ N + [22] where f q i : R n x × R n u → R n x is uniformly Lipschitz in x and u and continuous in t.The state x ∈ X and the control u ∈ U with X closed and U compact.Furthermore, the set of discrete states defining the subsystems is Q = {q 1 , . . ., q m }.For the sake of compactness, we will omit the notation for time dependency in this section whenever possible, i.e., x(t) will be written as x.
We recall the HMP according to the definition in [22] under certain assumptions: There is no jump in state after switching, meaning that the state is always continuous, i.e., x(t i+1 ) = lim t→t i+1 x(t).
Assumption 2. There is no autonomous switching.
Assumption 3.There is a finite number of subsystem switchings L < ∞.
In addition, the optimal continuous u * and discrete q * input trajectories satisfy the following conditions [22]:

PDC System Overview
In the PDC, the information of truck position, velocity and distance to the front vehicle together with the static and dynamic data of the upcoming road are inputs to an optimal control algorithm.The algorithm then computes the most efficient velocity trajectory and driving mode to trade-off fuel consumption and trip duration.Finally, the optimal driving advice is provided to the driver in the form of visual information on a computer screen in the cabin, haptic signal on the throttle pedal and audio advice.The driver is supposed to use the provided advice by appropriately activating the driving mode suggested by the adviser.For example, if the next suggested driving mode is eco-roll, the driver can shift the gear intro neutral and switch off the engine, or if the suggested driving mode is cruising, the driver can turn on the automatic cruise control function.In this section, the drivetrain operation of the considered hybrid prototype truck is described.The longitudinal dynamics of the truck is modeled as a switched controlled system and a HOCP is formulated for optimizing fuel consumption.The overview of the system is presented in Figure 1.

Longitudinal Dynamical Model
The truck considered in this study is the hybrid electric DAF truck with a P2 drivetrain (Figure 2).The internal combustion engine (ICE), which is the primary power source, is connected to the driveline via a mechanical clutch.The secondary power source is the electric machine (EM), which can be operated in motor and generator modes, recuperating the kinetic energy of the truck in the battery.The operation of the EM is regulated via the power electronics unit.The two power sources can work for propulsion together or separately, which is determined by the power split controller.The power split controller is designed independently from the PDC system and is beyond the scope of this paper.The transmission gearbox connects the driveline to the wheels and is engaged in either neutral gear or one of the propulsion gears.The power produced by the ICE and EM is regulated by the fuel injection rate and power electronics controller, respectively.In this paper, we assume that the fuel may be injected in the ICE only when the mechanical clutch is closed and propulsion gear is engaged.In other words, the ICE is automatically shut off if the clutch is open or the gear is put in neutral.The EM is operating only when the transmission is set to a propulsion gear.It is not allowed for the ICE to charge the battery via the EM.The state of the clutch and the transmission gearbox determine the driving modes that the truck can be operated in cruising, eco-roll, coasting and regenerative braking.
These are summarized in Table 1.The acceleration mode is not included due to the safety requirements.Furthermore, disk brake is not considered as a viable driving mode for the fuel optimization problem due to its obvious inefficiency.There is an emergency braking system implemented in the truck that takes over the control when decelerating at low velocities (below 20 km/h).The maximum velocity of the truck is limited to 80 km/h.

Closed clutch Eco-roll Cruising Coasting
Open clutch Regenerative braking In this paper, we build a controlled switched dynamic system with autonomous subsystems.The hybrid model is written as where the velocity v is the system state.There are three forces acting on the truck, namely where is the resistance force caused by aerodynamic drag F aero , rolling resistance force F roll and gravitational pull F slope .In (12), ρ is the air density, C d the coefficient of air drag, A the frontal area of the truck, C rr the coefficient of rolling resistance, α the slope of the road and g the gravitational acceleration.The forces F ice (q) and F em (q) are delivered by the ICE and the EM, respectively.The forces produced by the power sources depend on the active driving mode and can be both positive and negative.
The negative sign of F res in (11) indicates that the force is counteracting the movement of the truck.Furthermore, we represent the force produced by either ICE or EM in terms of power and velocity (or kinetic energy) by F = P v .Such assumption is valid as long as the force is always parallel to the moving direction, which is the case when only longitudinal dynamics is considered.

Cost Function
In this paper, it is assumed that the amount of consumed fuel is proportional to the produced energy during propulsion as suggested in [23].Hence, the cost function on a segment of interest where F t (q) is the traction force produced by the ICE; F em (q) is the force produced by the EM; η is the efficiency of the EM and c is a tuning parameter that penalizes the trip duration.Note that F em (q) may be negative (during regenerative braking).The meaning of such a formulation is that the integral of force over distance results in mechanical work, which is applied to change the kinetic energy of the vehicle.As a result, the cost ( 13) is a trade-off between the fuel consumption, energy recuperation and trip duration over a selected distance segment.

Driving Modes
There are four driving modes Q = {q 1 , q 2 , q 3 , q 4 } considered in this problem: cruising, eco-roll, coasting and regenerative braking.The active mode is determined by the state of the mechanical clutch and transmission gearbox as shown in Table 1.When operating in any of these modes, the dynamics of the truck and the cost functional varies as follows.
1. Cruising (q 1 )-the propulsion force produced by all the power sources is equal to the road resistance force.Hence, the velocity is kept constant and F wheel (q 1 ) = 0.The power split ratio is The traction force that requires fuel injection is: where P ice,cr > 0 is the power losses from ICE due to engine and transmission inefficiencies.2. Eco-roll (q 2 )-the driveline is disconnected from the wheels and the truck decelerates due to the environmental resistance forces.
The ICE is shut off, therefore, the traction force is 3. Coasting (q 3 )-the driveline is closed and a relatively small engine drag P ice,dr > 0 is applied to the wheels in addition to the environmental resistance forces.The EM is shut off.
Although the ICE is coupled with the wheels, no fuel is injected, thus 4. Regenerative braking (q 4 )-the ICE is disconnected from the driveline and EM operates in generator mode, transferring power P em > 0 from the wheels.
F ice (q 4 ) = 0, The traction force that consumes fuel is

The Complete HOCP
In this study, we consider the optimal deceleration scenario where a vehicle approaches to a speed limit event.The optimal solution should balance between the consumed fuel and the trip duration as in (13).We assume that the measured velocity of the truck at the current position s 0 is v current > v target , where v target is the maximum allowed speed at the event located at a position s f .The complete HOCP is defined as where s L+1 = s f , and In addition, the following constraints are implicitly defined: where (25) ensures that the switching does not happen infinitely fast.

Remark 1.
Since there are a finite number of m autonomous subsystems, the achievable set that contains all possible terminal states is finite.Hence, the two point boundary conditions may not be satisfied simultaneously.

Discrete HMP
In this section, we describe the numerical algorithm for solving the HOCP (22d) based on the approximate discrete HMP.
In order to simplify the computational complexity of the HMP, the set of possible trajectories is reduced by discretizing the considered road segment [s 0 , s f ] into N equidistant intervals {s 0 , s 1 , . . ., s k , . . ., s N }.The interval length is δs = s f −s 0 N .It is assumed that the driving mode q k is piecewise constant on each interval s ∈ [s k , s k+1 ), k = 0, . . ., N − 1.The cost functional then becomes The Hamiltonian now includes a discrete-valued control variable q k : In addition, the following boundary conditions are imposed: where B(a, r) represents a hyperball centered at a with a radius r.A relaxation on the current velocity is imposed because the algorithm iterates backwards from the final velocity; hence, the current velocity constraint may not be met exactly.However, we will show in the sequel that iterating backwards enables a warm-start strategy of the terminal costate λ N at different sampling instants.
A numerical algorithm based on the competing Hamiltonians (CH) method [24] is used for obtaining the optimal mode for each interval.At each sample, the numerical values of the Hamiltonian are enumerated for all mode options and the pointwise minimizer is selected.In order to reduce the computational burden, the state and costate dynamics are discretized using forward Euler method with discretization length δs.Finally, the algorithm is performed iteratively backwards, starting from the last sample N to the first.The optimal discrete control variable is found by A summary of the algorithm is presented in Algorithm 1.

Algorithm 1 Discrete HMP
Require: δs > 0, N ∈ Z + , ǫ > 0 1: Set the iteration index i = 0 2: Define v N = v target and choose an initial guess for λ i Compute q i k using (30) 5: Compute v i k , λ i k using q i k obtained from step 4 6: end for 7: Set the iteration number i

Algorithm Analysis
In this section, theoretical and simulation analyses of the proposed algorithm are provided.First, we show that there exists an optimal mode sequence given the configurations of of the considered hybrid truck, which are listed in Table 2.Then, we show how to choose the cost function parameter c to trade fuel consumption and trip time off in order to maintain the optimal mode sequence.• Cruising • Eco-roll • Coasting • Regenerative braking Given a speed v k , for cruising mode to be optimal, the following must hold: Then, we have where C 1,2 (v k , δ) and C 1,4 (v k , δ) are the mode-switching boundaries for costate λ k , defined as By simulating the system using the speed range v ∈ [10, 80] km/h and the power split factor δ ∈ [0, 1], we observe that C 1,2 (v k , δ) < C 1,4 (v k , δ) always holds.Hence, assuming q 1 is the active mode on the interval [k, k + 1) and solving the problem backwards using Algorithm 1, the driving mode for the interval [k − 1, k) will either remain cruising or will switch to eco-roll.
The regenerative braking is the selected driving mode if: where C 2,4 (v k ) is a switching boundary for λ k obtained by algebraic manipulations of Hamiltonians in (32) and (34): We observe that C 2,4 (v k ) > C 1,4 (v k , δ), for the considered speed range and the power split factor.Hence, in case q 4 is the active mode on interval [k, k + 1), the driving mode for interval [k − 1, k) will either remain as regenerative braking or it will switch to eco-roll.
Based on the analysis, we conclude that the order of the driving modes when decelerating can be either of the two:
For any of these sequences to hold, the costate has to be monotonically increasing or decreasing.The monotonicity of the costate dynamics, as we shall see next, depends on the tuning parameter for trip duration penalty c.

Tuning Guidelines for Optimal Sequence
The second driving mode switching order q 4 -> q 2 -> q 1 leads to lower fuel consumption (since, according to (13), lower speed results in less produced energy, hence lower fuel consumption), while the first sequence q 1 -> q 2 -> q 4 leads to a lower trip duration having a larger average velocity.Since, in general, we prefer the first sequence, the following has to be satisfied for each mode q i , i ∈ {1, 2, 4}: Equation ( 41) holds due to the fact that the initial costate is negative (as in Figure 3) and in order to switch to another modes, the costate has to increase.This leads to positive gradients of Hamiltonian in Equation (41).The function χ q i (v, λ, δ) is derived by expressing c in terms of the rest of the variables in (41) for each mode: We obtain c > max q,v,λ,δ which is an explicit tuning recommendation for ∀v ∈ [10,80] km/h and ∀δ ∈ [0, 1] in order to maintain the desired driving mode sequence.This value can be re-computed when model parameters have been changed.

Numerical Details
In practice, local optimal solutions are usually sufficient.In this section, we discuss numerical details of the algorithm and describe the strategies to speed up the execution of the HOCP solver to find a locally (sub)optimal solution.

Costate Initialization
Since in Algorithm 1, the terminal costate λ N determines the state v 0 , a suitable strategy to choose the terminal costate will influence the computation time required for the algorithm to converge to an acceptable state that satisfies the boundary condition.For the model at hand, we observe that the initial state obtained after a complete backward sweep is monotonically nondecreasing with the increment of the costate terminal guess (see Figure 3).Therefore, we use a simple rule to reinitialize the terminal costate at each iteration i: where γ is a constant gain.
Terminal costate guess N

Watchdog Strategy
According to Figure 3, it is possible that the terminal costate updated via (46) results in the same initial velocity v 0 , leading to a so-called "dead zone".In order to escape the "dead zone", a watchdog strategy is employed to soften the termination condition and speed up the convergence of the bisection search to a trajectory with an acceptable accuracy: if, for l consecutive iterations, the initial velocity remains the same, i.e., v i−l+1

Costate Warm-Start
In the PDC system, the velocity and driving mode optimization is performed when the truck is moving.Every time the road and traffic data is updated, the identified nearest speed limiting event updates the terminal constraint in the HOCP.In this work, we use a shrinking horizon strategy and apply a warm-start on the terminal costate guess in order to speed online computations up.This is valid in the case where there is no external disturbance and the speed limit event is static, since the terminal costate λ N does not change in the HOCP at the next sampling instant.As a result, only one backward sweep is necessary, i.e., i = 1.In case that there are disturbances or the event is dynamic, such an initial guess is good enough since the event velocity does not change dramatically within a short enough sampling distance.As a result, only a few backward sweeps are necessary and the online computational burden is small.

Validation
To validate our algorithm, two data sets were collected during two baseline driving tests by a human driver near the city of Eindhoven, The Netherlands (see Figure 4).The first driving test was on a highway and has perfectly known road and traffic information.The driver was driving a pure ICE powered truck; hence, there was no benefit from regenerative braking.The second driving test is on urban roads using a hybrid prototype truck and only partial traffic information is available or accurate due to incomplete smart transportation infrastructure.Note that the data is not averaged from multiple identical driving tests.

Perfectly Available Data
The proposed algorithm is simulated using data collected from the first driving test in closed loop with the truck dynamics, where the nearest event provides the target velocity for the HOCP.The obtained optimal mode sequence is applied in a shrinking horizon fashion at each distance sample.For acceleration, it is assumed that full throttle is always used since it is the most efficient way to gain speed [25].Note that gearshifts are neglected in the model.In the baseline drive, the driver often used the disk brake.Hence, we add disk brake to our simulation to evaluate the cost and travel time of the baseline drive.
The resulting optimal velocity trajectory is compared to the velocity measured during the baseline drive in Figure 5.The modes of the baseline drive are deduced using the fueling rate, transmission gears, brake and throttle pedals position and velocity profile.The comparison of driving modes is shown in Figure 6.It can be observed that the optimal driving mode extensively uses early eco-roll to gently decelerate the truck to avoid late disk brakes.When larger deceleration is needed, the regenerative braking is used.The optimal velocity is averagely the same as the one from the baseline drive.
In Table 3, the fuel consumption and the trip duration are calculated using the modes and velocity profile from the simulation.As can be seen, using the optimal control-based algorithm leads to a significant reduction in produced energy (53.7%) at the cost of slightly increased trip duration (1.45%).Such a large reduction in fuel consumption can be explained by the following reasons:

•
The considered test drive is on a small fraction of a highway, where cruising is the dominant mode.By simply extending the testing segments to a complete driving cycle (in which more acceleration and deceleration exist), the total cost reduction is estimated to be 0.16% for a long-haul truck and 0.97% for a distribution truck; • The comparison is made between a human driver in a real road test and a simulation using perfectly available data.In the simulation, ideal conditions are presumed, where unexpected braking events would not occur.Thus, significant energy saving is achieved using early eco-roll, eliminating disk brakes and exploiting regenerative braking; • The driver drives a pure ICE truck while our algorithm gives driving suggestions based on a hybrid one.Energy gained from the regenerative braking contributes to a large part of the fuel consumption reduction.More specifically, fuel economy improvement and trip time loss using our algorithm compared to the baseline driving data for four deceleration events are shown in Figures 7 and 8.It can be observed that our algorithm is able to reduce fuel consumption siginificantly in all four events with extensive activation of eco-roll and engine braking mode.To achieve such a fuel economy improvement, slight trip time loss is observed in an acceptable range for three events.

Partially Available Data
The second data set was collected from a baseline drive on urban roads with only partially available traffic data.The raw data is in a form of an array of position-specific speed limits.In the algorithm, a speed limit event is identified only if the change in the legal or traffic speed is larger than 5 km/h on a 10 m interval.However, the data acquisition systems in the truck often provide wrong or inaccurate data due to intensive traffic and legal speed limit changes on urban roads and the disturbances caused by the city environment.During the real test, the driver was unable to follow the advice from our algorithm exact ly and was free to accelerate and decelerate based on his own driving experience.
The results of the event detection and the online trajectory optimization are shown in Figure 9 together with those of the human driver.The identified events are represented by the red dots.The corresponding maximally allowed velocity on the segment is marked by the red dashed line.As can be observed on the top plot in Figure 9, the driver was not following the speed limit from the data.This would mean that there was something else happening on the road which is not predicted and shown in the data.As a result, not all of the encountered events are available to the PDC system, which affects the performance of the algorithm and the usability of the obtained velocity trajectory.Nevertheless, the optimized velocity trajectory for the correctly detected events is depicted on the bottom plot (green dotted line).As can be observed, the optimized velocity profile is similar in shape to the ones obtained in the previous simulation and leads to the desired velocity at the location of the event.However, due to the poor quality of the road and traffic data, comparisons of the reduction in fuel consumption and the trip duration for the entire driving cycle is unfair.Nevertheless, it is fair to conclude that the algorithm is capable of working in a real world driving cycle, potentially providing an fuel-saving velocity trajectory and driving mode suggestion given a reliable road preview information. .Top: the baseline velocity profile (blue line) and the speed limit (red dashed line).Bottom: the baseline velocity profile (blue line) compared to the optimized velocity (green dots).Orange dots: the eco-driving assistance system (EDAS) has detected a speed limit event and started optimization.Red dots: speed limiting events.

Conclusions
In this study, a PDC system within EDAS has been developed for hybrid trucks.The PDC produces optimal driving mode advice for the driver using road and traffic preview data.Specifically, an approximate longitudinal dynamical model has been developed in the form of a hybrid controlled switching system.An approximate PMP algorithm with warm-start strategies has been employed to minimize the fuel consumption and trip duration and is real-time implementable in automotive ECUs.Moreover, an elaborate analysis of the algorithm is given.We show that integration with real-time data to generate velocity events is feasible and produces significant improvements without the need for installing autonoumous driving hardware.

Figure 1 .
Figure 1.Schematic of the predictive driver coaching (PDC) system.

Figure 4 .
Figure 4.The road segment near Eindhoven in the Netherlands, used for tests on a DAF hybrid truck.

Figure 5 .Figure 6 .Figure 7 .
Figure 5. Velocity profile of human test drive (blue line) and MATLAB simulator (orange line).Two selected segments are shown.

Figure 8 .
Figure 8. Trip time computed for four events identified in the driving cycle.Numbers on top of each bar are the percentages of trip time loss using our optimization algorithm.

Figure 9
Figure 9. Top: the baseline velocity profile (blue line) and the speed limit (red dashed line).Bottom: the baseline velocity profile (blue line) compared to the optimized velocity (green dots).Orange dots: the eco-driving assistance system (EDAS) has detected a speed limit event and started optimization.Red dots: speed limiting events.

Table 1 .
Possible driving modes per state of mechanical clutch and engaged transmission gear.

Table 2 .
Parameters used for the truck model and the algorithm.= 0, for s ∈ [s 0 , s f ].Compute the Hamiltonians for each mode:

Table 3 .
Comparison of energy cost and trip duration for the baseline test and the optimal trajectory from predictive cruising control (PCC).