Optimizing the Fuel Consumption of Autonomous Vehicles using Convex-Concave Programming

The recent introduction of electronic, sensing, positioning and information technologies into road transportation systems has allowed safer cruising and faster navigation of vehicles. The next frontier is the transformation of road transport into a highly automated system through the deployment of connected and automated vehicles. One of the important challenges to achieve this, is the trajectory optimization of an autonomous vehicle while traversing a specific road segment in order to minimize some metric of interest. In this context, we formulate the problem of optimal acceleration profile selection to minimize the fuel consumption of an autonomous vehicle as a discrete-time optimal control problem. To estimate fuel consumption, we consider a non-convex empirical metamodel that computes the output as a function of the acceleration and speed profile of the vehicle. As the resulting problem is non-convex, we construct a difference-of-convex functions representation of the fuel consumption metamodel and develop an iterative convex-concave programming procedure to solve the problem. Simulation results for various scenarios demonstrate that the proposed approach is considerably faster and provides better solutions compared to a state-of-practice nonlinear solver.


I. INTRODUCTION
The ever increasing urbanization and motorization overcrowds cities with vehicles, leading to undesired phenomena, such as congestion, accidents and environmental pollution. In the European Union, road transportation systems account for about 340 billion litres of fuel or 23.2% of the total energy consumption which constitutes about 70% of petroleum fuel consumption [1] and 18% of the total greenhouse gas emissions [2]. The energy scarcity and the disastrous effects of climate change urge for a significant reduction in the total fuel consumption of road transport.
One direction to achieve this is to reduce the total vehiclemiles travelled. Nonetheless, as the global population increases and the world economies become more advanced the total vehicle-miles travelled increase rather than decrease. Another promising direction is through ecodriving that aims to reduce the total fuel consumption of vehicles through the adoption of an energy-aware driving behaviour.
Early attempts on ecodriving have focused on providing heuristic guidelines for the drivers such as shifting up early, anticipating traffic flows ahead of time to avoid unnecessary This work has been supported by the Research Promotion Foundation braking, and switching off the engine during stops in congestion or at traffic lights [3]. Software systems can also assist in ecodriving either pre-trip by helping the driver navigate thought an energy efficient route, or in-trip by advising the driver on how to be more energy-aware, or even post-trip by incentivising the ego driver to travel more efficiently through the display of energy-related comparative statistics [4].
There is also abundant literature regarding the implementation of more mathematically rigorous ecodriving frameworks that consider different aspects such as the type of powertrain (e.g. internal combustion engine [5], hybrid [6]), the road geometry (e.g., curvature, inclination [7]), the type of vehicle (e.g. passenger cars [5], heavy-duty vehicles [8]), problem type (e.g., ecodriving of one vehicle [9], platooning [10]) and the assumptions made in terms of the factors that affect the vehicle dynamics (e.g., air drag consideration [6]). Formulating the resulting ecodriving problems in a mathematically rigorous manner often leads to a difficult and non-convex optimization problem that needs to be addressed. As a result, several different solution methodologies have been proposed in the literature including dynamic programming [11], optimal control [12] and machine learning [13]. Nonetheless, these approaches suffer from several weaknesses. Dynamic programming often suffers from the curse of dimensionality and hence is not suitable for online execution; optimal control requires the derivation of analytical expressions which is cumbersome and only suitable for simple problems; machine learning requires offline training with abundant data and does not provide guarantees regarding the solution quality.
Another popular strategy for ecodriving is model predictive control [14]. Model predictive control is suitable for realtime execution and for the solution of large nonlinear problems. Nonetheless, the formulated problems are often nonconvex and hence difficult to solve. The standard practice is to employ an off-the-shelf nonlinear solver which however may yield poor quality solutions. This paper considers an ecodriving problem, that aims to minimize the fuel consumption of a specific vehicle in order to traverse a certain road segment, subject to specific boundary conditions (fixed initial speed, as well as fixed terminal time and speed), using discrete-time model predictive control. We consider a metamodel that outputs fuel consumption using the acceleration and speed profile as input. Because the resulting mathematical problem is nonconvex, we construct a Difference-of-Convex (DC) functions representation of the metamodel and develop a customized solution approach based on convex-concave programming. Extensive simulation results illustrate that the proposed so-lution procedure is superior to a state-of-practice nonlinear solver, in terms of solution quality and execution speed.
The remainder of the paper is organized as follows. Section II describes the considered problem and formulates it as a nonlinear optimization problem. Section III describes the fuel consumption metamodel, while Section IV details the procedures for the construction of the DC functions and the solution of the considered optimization problem using convex-concave programming. Section V compares the performance of the proposed algorithm against a state-ofpractice solver. Finally, Section VI concludes the paper.

II. PROBLEM FORMULATION
In this work an Autonomous Vehicle (AV) traveling from an origin, x o , to a desired destination, x d , is considered. The AV aims to travel a total distance of L meters in a straight line with minimum fuel consumption, when its initial and final desired speed are v o and v d , respectively. The AV starts its journey at time t o and aims to reach the destination exactly at time t d . As illustrated in Fig.1, such a scenario can occur when an AV aims to pass an unsignalized intersection at a time and speed pre-specified by a central unit coordinating the passing of AVs from the intersection without stopping [15].
We assume that the AV follows simple second order dynamics such that, where x(t), v(t), u(t) are the position, velocity and acceleration of the vehicle at time t, with u(t) being the control input. The travel time of the AV is defined as x o , we can consider x(t o ) = 0 and x(t d ) = L. Velocity and acceleration must be within physical or imposed limits at all times (e.g., due to infrastructure requirements). This is imposed by The acceleration of the AV at the destination is constrained to be equal to zero, i.e., u(t d ) = 0, such that the vehicle moves with constant speed at the destination. The problem of selecting the control input u(t) to optimize the total energy/fuel consumption can be expressed as where J(u(t), v(t)) is a cost function related to fuel consumption and x(t), u(t), v(t) are the optimization variables. Using Euler's forward method with a step of T , we

III. FUEL CONSUMPTION METAMODELS
To achieve fuel consumption minimization, two cost functions, J(v, u), will be considered, each representing a different fuel consumption modelling strategy. The first strategy minimizes the transient engine operation, whereas the other strategy constructs an explicit metamodel of the fuel consumption. This metamodel aims to approximate fuel consumption by developing an appropriate multivariate polynomial function that captures the mechanical and physical characteristics of vehicles. Coefficients are selected through a fitting process based on empirical data.

A. Transient Engine Operation
The first strategy is based on minimizing the transient engine operation which was shown to be related monotonically to fuel consumption in [16]. The model to minimize the transient engine operation for the duration of travel is given by which is the L 2 norm of the acceleration. It has been used by several optimal control studies such as [17] for energy efficient connected AV coordination due to its simplicity and general applicability.

B. KMMK Metamodel
One of the most popular metamodels of fuel consumption is the one introduced by Kamal, Mukai, Murata, and Kawabe (KMMK) in [7]. The authors developed a multipolynomial repeat Step 1: Step 2: Step 3: Obtain the values of (v k+1 , u k+1 ) from the solution of problem (4).
Step 4 Update iteration k k + 1; until {Convergence} function of acceleration and speed, by considering the acting forces on a vehicle and using engine efficiency characteristics. The output of the metamodel is the instantaneous fuel consumption, as shown in Fig. 2. The total fuel consumption can be obtained by integrating the instantaneous fuel consumption for the duration of the trip. The KMMK metamodel is given by where F (v(t), u(t)) is measured in milliliters (mL), c 0 to c 6 are positive coefficients and (a,b] (u(t)) is the indicator function which is equal to 1 if u(t) 2 (a, b] and 0 otherwise. The indicator function ensures that the fuel consumption is equal to zero when the acceleration is less than or equal to zero. Note that friction and air drag are incorporated in the coefficients c 0 to c 6 of the KMMK metamodel.

IV. SOLUTION APPROACH
In this section we present our solution approach to optimization problem (4) for each of the two fuel consumption strategies discussed in Section III. For the latter strategy, we employ a general optimization method called the Convex-Concave Procedure (CCP) [18]. The CCP procedure requires the construction of a difference-of-convex functions representation of the nonconvex objective of the problem.
As outlined in Algorithm 1, the main body of the algorithm consists of four main steps. Steps 1 and 2 aim to convexify the objective function J(v, u), through the formation ofĴ(v, u), which approximates the nonconvex part in linear form.
Step 3 solves the convexified problem using as objective the functionĴ(v, u) rather than J(v, u), while Step 4 updates the iteration. The procedure is repeated until convergence.
The CCP keeps all the information from the convex part and linearizes the concave part of the objective function in each iteration; hence, it retains more information about the objective function compared to other algorithms. The CCP is a descent algorithm (the objective value always improves in successive iterations) converging to a minimum, which can be local or global depending on the initial point.

A. Transient Engine Operation
The discrete-time form of (5) using Euler's forward method is given by The optimization problem for this strategy can be established by replacing J(v, u) = T D (u) in (4). The resulting optimization problem is a convex Quadratic Program (QP) which can be efficiently solved using standard QP solvers. The solution of this problem yields the optimal acceleration profile for the AV based on this fuel consumption model.

B. KMMK Metamodel
The discrete-time form of (5) can be expressed as Since the fuel consumption metamodel given by (8) is nonconvex, we construct a DC representation of the objective function to facilitate the solution procedure. Towards this direction, we need to ensure that the fuel consumption at time instant i, F i (v i , u i ), can be written as where f i and g i are convex functions. When the acceleration is positive, F i (v i , u i ) is given by In (10), the terms c 0 , c 1 v i , c 3 v 3 i , and c 4 u i are convex and can be included into f i of eq. (9). Similarly, the term c 2 v 2 i can be included into g i of eq. (9). The terms c 5 u i v i , and c 6 u i v 2 i are neither convex nor concave; nonetheless, they can also be transformed into a DC form by noting that i is convex. Now ↵ and need to be calculated to ensure the negative part, h i , is convex in the domain we are The convex functions used in the CCP are obtained by linearizing h i around the optimal solution of the previous iteration. Hence, a reasonable way of choosing a DC form is to minimize the curvature of h i at a point (v ⇤ i , u ⇤ i ) over all directions [19]. To calculate ↵ and , we solve the following optimization problem: where Tr(·) is the Trace operator and H h i is the Hessian matrix.

Lemma 1:
The optimal solution of problem (12) is given by Proof: The proof can be found in Appendix A.
Finally, we observe that the sum of DC functions is DC. Therefore, Eq. (10) can be written in DC form (9), where f i and g i are convex functions defined by while ↵ ⇤ and ⇤ are given by Lemma 1.
To employ Algorithm 1, we first transform the problem further into a standard Quadratically Constrained Quadratic Programming (QCQP) form.
Since the term v 3 i , is not in QCQP form we employ a technique used in [20]. The problem can be shown to be equivalent to minimize pi,ri,zi,vi where p i , r i , z i , and v i are the optimization variables. This can be integrated into (13a), resulting in which is a standard QCQP form. So far we have assumed that u i 0. When u i < 0 the term (0,umax] (u i ) is active, yielding that F i (v i , u i ) = 0. In order to address this issue, we approximate (8) as which can be written as a difference of convex functions, since the maximum of two DC functions is a DC function [20]. Having constructed a DC representation of (8), we can employ the CCP. The following optimization problem needs to be solved in Step 3 of Algorithm 1 minimize x,v,u,p,r,z, (19) subject to: Constraints (4b) (4g), (20) For the initialization of the CCP we require a feasible solution, (v init , u init ). Such a solution can be obtained from the transient engine minimization strategy which requires the solution of a convex QP problem. Finally, we consider that the algorithm has converged when the following stopping criterion is satisfied:  [7]. All simulations were performed using MATLAB and the Gurobi Mathematical Optimization Solver [21] using an AMD Ryzen 1600 with 16GB of DDR4 main memory.
For the simulation we have considered the fuel consumption metamodel described in Section III, and compared the performance of three solution strategies: • The strategy that tries to minimize the transient operation of the engine. • The Convex-Concave Procedure developed for metamodels KMMK in Section IV. • The performance of the nonlinear mathematical programming solver of MATLAB (fmincon) for the solution of the nonlinear and nonconvex problem. A range of travel times were considered in order to create a piece-wise affine function of the cost based on travel time,F (t m ) . The travel time, t m , was incremented by steps of t = 0.05, meaning that t m 2 {t mc , t mc + t, t mc + 2 t, . . . , t max }, where t mc is the earliest feasible time (considering constraints) to reach the desired goal.
In order to use the Convex-Concave Procedure, a solution to (12) was calculated according to Lemma 1, yielding ↵ ⇤ = 17.5 and ⇤ = 15. Figure 3 depicts the minimum fuel/energy consumption of the vehicle obtained from the three solution approaches for varying t m and v d = {8, 10, 12}. As can be seen, the fuel/energy consumption behaviour obtained from the three strategies is similar. For small values of t m the consumption is high, while as t m increases the consumption drops until it reaches a "sweet spot 1 " in the range t m 2 [8,12] s depending on the value of v d , where the fuel consumption is minimal; further increase of t m leads to a monotonic increase in fuel consumption. In terms of optimization performance, clearly the u 2 approach gives the worse results as it optimizes the fuel consumption of a different metamodel. Interestingly through, the performance of this approach is relatively good compared to the other approaches that aim at directly minimizing the fuel consumption of metamodel KMMK. Comparing the Convex-Concave Procedure with fmincon, Figure 3 indicates that fmincon performs on average the same for t m  12 s, while for t m > 12 s the performance of the developed Convex-Concave Procedure is up to 20% better compared to fmincon. Preliminary results indicated that reasonable changes (i.e. to accommodate other types of vehicles) to the parameters would not alter the results. Figure 4 depicts the execution time for finding an optimal acceleration profile for each solution strategy. As the travel time increases, the execution time increases for all approaches, since the horizon and hence the number of variables increases. Minimizing the transient engine operation requires the solution of a single QP problem and hence it is the fastest approach with an average execution time of 0.1 s. Comparing the execution of the developed Convex-Concave Procedure with fmincon, it is clear that the former is on average an order of magnitude faster.
As mentioned in Section IV, the exact model F (v, u) was approximated byF (v, u) given by (17), to avoid multiplication with the indicator function when the acceleration is negative. In order to evaluate the goodness of this approximation we consider the relative difference between the actual and the approximated metamodel given by The average relative percentage difference approximation error computed was equal to 4.3%. This indicates that the considered approximation approach is a good choice, as it yields a small approximation error and simplifies significantly the solution approach.
VI. CONCLUSION This paper has investigated the fuel consumption of an autonomous vehicle when travelling on a road segment with specific boundary conditions. The problem was formulated as a discrete-time optimal control problem, while an empirical fuel consumption metamodel was considered for evaluation. Because the resulting optimal control problem is nonconvex, an iterative convex-concave procedure was developed based on constructing a difference-of-convex function representation of the metamodel. Simulation results for various scenarios demonstrated that the proposed approach is considerably faster and provides on average better solutions compared to a state-of-practice nonlinear solver. Future research will explore the effect of nonlinear dynamics on the performance of the developed approach.
APPENDIX A: PROOF OF LEMMA 1 Problem (12) requires the computation of the trace of the Hessian matrix and also requires to ensure that h i , ↵v 2 i + u 2 i +( v 2 i u i ) is convex. Towards this direction we compute the Hessian matrix of h i (v i , u i ) yielding Eq. (22) implies that the objective of Problem (12) is equal to Tr(H h i (v ⇤ i , u ⇤ i )) = 2↵ + 2 2u i . To ensure convexity, the Hessian matrix needs to be positive semidefinite which means that the following constraints must hold: After eliminating term u i from the objective function (not a function of ↵ or ), Problem (12) becomes minimize ↵ + (24a) subject to: ↵ u max , ↵ 0, 0 (24b) Solving problem (24) using the KKT conditions yields: ↵ ⇤ = v max + u max and ⇤ = v max . This completes the proof.