Optimal Eco-Driving Cycles for Conventional Vehicles Using a Genetic Algorithm

The goal of this work is to compute the eco-driving cycles for vehicles equipped with internal combustion engines by using a genetic algorithm (GA) with a focus on reducing energy consumption. The proposed GA-based optimization method uses an optimal control problem (OCP), which is framed considering both fuel consumption and driver comfort in the cost function formulation with the support of a tunable weight factor to enhance the overall performance of the algorithm. The results and functioning of the optimization algorithm are analyzed with several widely used standard driving cycles and a simulated real-world driving cycle. For the selected optimal weight factor, the simulation results show that an average reduction of eight percent in fuel consumption is achieved. The results of parallelization in computing the cost function indicates that the computational time required by the optimization algorithm is reduced based on the hardware used.


Introduction
In recent days, vehicle energy efficiency is progressively becoming a significant concern for consumers, industries, and international organizations. With the development of the automotive industry, the number of vehicles has been increasing. Therefore, the related problem of environmental pollution has also been rapidly rising. In automotive industries in general, one of the leading research tracks towards improving energy efficiency with an emphasis on reducing carbon dioxide (CO 2 ) emissions. Currently, pure electric vehicles (EVs) are considered to be the cleanest automobiles. However, their core components, such as the power batteries and the electric motors, require significant breakthroughs within a limited period of time, which has predominantly slowed their development [1]. On the other hand, the environmental impacts of, for example, vehicles' energy consumption and emissions have been reduced significantly through engine downsizing, hybridization, and other clean-engine technologies.
In order to aid drivers in reducing the net energy consumption of the vehicles, integrating a human-machine interface (HMI) in the vehicle is becoming a recent trend among automobile industries. Currently, HMIs with eco-driving capabilities achieve this purpose by providing information to the driver regarding optimal speed and gear selection. The process of optimizing the vehicle speed and the gear selection can be formulated as an optimization problem subjected to specific constraints such as environmental conditions (speed limits, traffic, and weather conditions) and vehicle physical limitations [2][3][4]. Although dependent on the available constraint conditions, for example, 1.
No turns on the road are considered, that is, the vehicle model does not react to steering behavior, and therefore, only longitudinal forces acting on the vehicle are considered.

2.
No reverse gear is considered, that is, the travel distance and vehicle speed take only non-negative numbers.
3. The vehicle model experiences gradient resistance on slopes, except for standard driving cycles, where the slope is considered to be zero. 4.
During vehicle deceleration, the regenerative braking power is not considered.

5.
The engine idling is not considered, that is, at vehicle stops, no fuel consumption is measured.
The vehicle equations are modeled based on typical longitudinal dynamics [7], and the index and notations are placed in Section 7. The basic principle of dynamics for a vehicle subjected to longitudinal analysis gives: The engine torque T e (t) is related to the wheel torque T wh (t) as given by: The resistive force F R (t) for the vehicle includes gradient, rolling, aerodynamic force, and is defined as follows: The rotational speed of the wheel ω wh (t) and the engine ω e (t) is given as: The optimization of the speed trajectory is carried out under the following stable vehicle position and acceleration dynamics:

Vehicle Transmission Modeling
The proposed optimization algorithm in this paper does not optimize the gear shifting data points. Instead, the optimization algorithm gets the gear shifting data points for the optimal eco-driving cycle from a lookup table-based gear shifting strategy, similar to the one discussed by Chu Xu et al., for the DP-based gear shifting strategy [14]. The simplified lookup table-based gear shifting strategy depends on the wheel torque and speed demand, and from Figure 1 the static gear shift map is implemented as a 3D lookup table. A short window time is introduced to avoid possible gear hunting, and it is a time interval within which no gear shifting is performed. In the proposed optimization algorithm, it is not that necessary to have an accurate gear shifting method because the optimization is performed only on the velocity data. The lookup table-based gear shifting method produces gearshift curves comparable to the results of the simulated rule-based automatic manual transmission (AMT) model shown in Figure 2, where the computation is done for the extra-urban driving cycle (EUDC) part of the standard New European Driving Cycle (NEDC). However, in this research, the clutch or torque converter dynamics are not considered, since in general, for an optimization problem, the clutch or torque converter dynamics increase the implementation complexity with little to no effect on the results [15].

Formulation of the Optimal Control Problem
The purpose of computing an eco-driving cycle is to optimize the vehicle speed trajectory subjected to specific constraints so that the total energy consumption is minimized. In the case of a conventional vehicle, the idea is to minimize the total fuel consumption and the sum of the positive acceleration for the fixed travel duration [7,16]. Figure 3 represents a petrol engine consumption map for a typical passenger vehicle. In the optimization algorithm, the fuel consumption is estimated using Figure 3 as a kind of lookup table. The computation of the optimal speed trajectory is calculated for a specific travel duration, subjected to the specific vehicle and environmental constraints such as speed limits, acceleration limits, and traffic constraints [4]. However, for reducing the implementation complexities, constraints subjected to external factors, such as thermal, vibration, and frictional effects, are not considered. This method of optimization formulation is often regarded as an optimal control problem (OCP) [17]. In the proposed OCP, the idea is to minimize the cost function so that the optimal energy consumption is achieved. In this work, the minimization cost function is defined as: Therefore, the OCP can be written as: Equation (11) combines both the sum of fuel consumption . m(ω e (t), T e (t)) in kg/s and the sum of positive acceleration a(t) in m/s 2 of the vehicle by introducing the weight factor β. The tunable weight factor β controls the influence between fuel consumption and velocity fluctuations to the cost function, so the performance of the optimization can be adjusted by varying the weight factor. Both sums in the cost function are normalized with λ . m , and λ a . The sum of positive acceleration also serves as one of the driver comfort factors by reducing the number of jerks, in addition to a comparative influence in reducing the overall net fuel consumption [16]. Though there are many other approaches to deal with the speed fluctuations [13], this research focuses on the OCP cost function defined in Equation (12), which incorporates the weighted sum of positive acceleration for the implementation of the optimization algorithm.
In Equation (12), ω e (t) and T e (t) are the control variables to be optimized by varying the velocity v(t). For a specific vehicle, the engine speed, the engine torque, and the gear-box ratios are physically limited to specific values. Therefore, the optimization for the eco-driving cycle is computed under mixed state and input constraints to the vehicle.
The input and the mixed state constraints for the OCP related to the vehicle limitation, and the speed limits, are listed as follows: v Equation (13) limits the speed of the vehicle v max (x) with respect to the vehicle position. To induce the speed limit for the standard driving cycles, a fixed limit margin of e l on the input driving cycle v re f (x) is used. The fixed margin varies based on real-world scenarios such as geographic limits, rules, and regulations, etc. The speed limit function is defined as: The speed limit v max (x), given by Equation (20), requires that the number of vehicles stops in the eco-driving cycle must be the same as that of the input driving cycle [4]. Other methods to assign speed limits can also be considered [18,19]. For instance, the speed limit values can be given by external or internal sources such as an intelligent transportation system (ITS), advanced GNSS, and on-board vehicular sensors. Equation (14) limits the vehicle acceleration to its physical minimum a min and maximum a max . For simplicity, the maximum acceleration limit used in this paper is fixed based on few widely used standard driving cycles such as the NEDC, the Common Artemis Driving Cycles (CADC) (Urban), and the Worldwide Harmonized Light Vehicles Test Cycles (WLTC) (Class 3b). From the fuel map in Figure 3, Equations (15) and (16) limit the maximum engine torque T max and engine speed of the vehicle to its physical maximum ω max . Equations (17)- (19) manage the optimal eco-driving which makes the total travel distance D, final speed v f , and the total travel time t f to the same values as those of the input driving cycles.

Design of Genetic Algorithm-based Solution Methodology
The OCP problem defined by Equation (12) can be approached by many global optimization solving methods such as DP, the Pontryagin minimum principle (PMP), and genetic algorithms (GA). Although DP-based methods always gives the best solution, the computational time increases exponentially with the increase in problem dimensions and thus requires the implementation of additional independent tuning parameters to reduce the problem dimension within a certain error margin [13]. Due to the non-linear nature of the OCP and the mixed state-input constraints, the formulation of the PMP is more complicated [20][21][22]. The GA-based algorithm, like any other heuristic-based global optimization algorithm, does not guarantee the best optimal solution and depends on the initialization parameters. However, the GA has a low implementation complexity and computational time, sometimes used along with other deterministic algorithms [18,23]. Thus, the method proposed here is based on the genetic algorithm.

Genetic Algorithm-based Optimization Method
A constrained genetic algorithm (GA) is used in this paper and considers mixed linear constraints for optimizing the vehicle speed [24]. Figure 4 represents the general workflow of the GA. The fitness function of the GA is the OCP is defined in Equation (12), where time t in seconds ranges from k = 1 : N fixed steps. The GA implementation in this paper maintains a fixed population of size M for every generation, and the best candidate from the last generation is selected as the final optimal solution.

Linear Feasibility Constraints
The OCP linear constraints, defined in Equations (13) and (14), are formulated as feasibility constraints for the genetic algorithm as given in Equations (21) and (22). The OCP linear constraints defined in the Equations (17) and (18) are formulated as feasibility constraints with fixed tolerances I Tol = 2% and J Tol = 0.2%, respectively, in Equations (23)-(26) [15]. The OCP constraint Equations (15) and (16) are formulated as saturation functions, i.e., the functions replace the values exceeding limits by the limit values. Any candidate from a generation not satisfying these constraints within constraint violation tolerance V Tol are excluded, where V Tol ∈ [0, 1], in this work V Tol , is fixed to 1e −6 .

Solution Candidate Representation
Each element in a candidate is represented as a double precession floating-point number, where each element corresponds to one velocity data point. Therefore, the total number of discretized velocity datapoints N is equal to the length of the chromosome. The total number of candidates in a generation is fixed to M, and Equation (27) shows a generic representation of a population matrix. Though operation on each floating-point array candidate requires more computing resources compared to a binary bits array candidate, this eliminates certain implementation complexities pertaining to encoding and decoding schemes.

Initialization of Population
The population for the first-generation of the GA is generated by minimizing the OCP function using a local minimization algorithm, therefore enabling a reasonably large and diverse initial solution space for the GA optimization to find an optimal solution close to the ideal true global value [18]. Sequential quadratic programming (SQP) [25][26][27][28][29][30] is used to create an initial population of size M subjected to the same set of constraints and fitness functions defined previously. The SQP tries to generate feasible candidates from a variety of pseudorandom initial data points. Figure 5 shows an example of the initial population for the EUDC with the population size M = 25 and discreet velocity points N = 102.

Evolution Strategies for the Proposed GA
Similar to other evolutionary algorithms, in GAs, the operations are applied in a loop with modifications performed during every iteration. In this work, modifications are performed using selection, mutation, and crossover functions on candidates at every generation. At each generation, three types of children are produced, namely, the elite, the crossover, and the mutation children. The density or number of children corresponding to a particular type is controlled by the predefined ratio of Q e , Q c , and Q m such that the size of the population remains the same as defined in Equation (28). Q e multiplied by M candidates from the previous generation are selected as the elite children for the next generation based on the fitness function value. The other two types of children are created by mutation and crossover functions with the help of a tournament-based selection method used to choose parents. M = Q e * M + Q c * M + Q m * M, where Q e + Q c + Q m = 1 (28)

Selection Method
A tournament selection is used for the selection of candidates from the previous generation to be parents for the next generation. In the tournament method, a random fixed number of candidates is picked, and then the best candidate from that fixed set of candidates is selected to be the parent for the next generation. In this work, both the mutation function and crossover function select parents using the tournament selection method, and the fixed number of candidates for selection is set to four.

Mutation Function
A mutation is performed on a single parent, and random changes are applied to that parent to produce children. Equation (29) shows an example candidate matrix with the mutated chromosomes emphasized. An adaptive mutation function is used in this work that produces Q m multiplied by M children for the next generation. The mutation function randomly selects the step length and direction based on the last successful or unsuccessful generation so that all the children produced by the mutation function always satisfy the linear feasibility constraints.

Crossover Function
A crossover operation is performed using two candidates from the previous generation as parents; each child is unique and inherits different traits from both parents. In this work, the crossover function creates children equal to the random weighted arithmetic mean of both the parents, as shown in Equation (30). The total number of crossover children is equal to Q c multiplied by M.

GA Stopping Criteria
The genetic algorithm runs in the form of a loop with an incrementing generation. The loop is terminated and the best solution from the last generation is selected as the final solution, if any of the three conditions are satisfied:

•
The total number of generations exceeds the specified limit Gen lim • The total number of stall generations exceeds the specified limit Stall lim , a generation is considered as a stall generation when the average change in the fitness function value is less than the fixed tolerance H Tol • The total computation time exceeds the specified limit Time lim .

Analysis and Results
The OCP optimization is performed on several widely used driving cycles such as the Common Artemis Driving Cycles (CADC-Urban and CADC-Road), the Worldwide Harmonized Light Vehicles Test Cycles (WLTC)-Class 3b, the Federal Test Procedure (FTP-75), the Supplemental Federal Test Procedure (SFTP)-US06, the New European Driving Cycle (NEDC), the RTS Aggressive or RTS 95, California Unified Cycle (UC), the Highway Fuel Economy Test (HWFET or HFET), and the EPA New York City Cycle (NYCC). The optimization is carried out using the OCP defined in Equation (12) and using the genetic algorithm discussed previously. The optimal eco-driving cycles from the optimization algorithm are fed to and simulated with the virtual vehicle model to get the fuel consumption. Figure 6 shows the percentage reduction in fuel consumption with respect to the initial driving cycle for various weight factors, and the percentage value is corrected in a way that, if fuel consumption from the optimal eco-driving cycle exceeds the initial cycle, then the percentage reduction in fuel consumption is considered zero. The optimal value for the weight factor β = 0.5 is selected, based on the average of the weight factors fitting to the maximum improvement in terms of the percentage reduction in fuel consumption for the various standard driving cycles.    Figure 8 shows the eco-driving cycle computed for the NEDC and Figure 9 displays the optimal eco-driving cycle computation for a simulated real-world driving cycle, pertaining to an area in RWTH Aachen University, Nordrhein-Westfalen, Aachen, Germany. The velocity data is acquired by microscopic traffic simulation software.   Table 1 represents the fuel reduction of the computed optimal eco-driving compared with the initial cycle, and the results show that an average reduction of eight percent in fuel consumption is achieved. One of the conclusions drawn is that the algorithm works more effectively in high-speed compared to low-speed areas. One of the main advantages of the proposed method of optimization is that the total memory requirement of the computing device is less compared to the DP algorithm, since at every iteration, unlike the DP, the GA deletes the poor candidates and thus reduces the search space. Another advantage is that every chromosome in the proposed GA is independent to from the others and thus gives the possibility of scaling the computation across multiple computing resources in parallel. Figure 10 illustrates the advantages of parallelization in computing the cost for all the candidates in a generation at the same time, and from Figure 10a the GA execution time is compared with the single-threaded CPU (central processing unit), the multi-threaded CPU, and the CPU+GPU (graphics processing unit)-based implementation. The generic execution flow of the multi-threaded CPU and the CPU+GPU-based implementation is illustrated in Figure 10b. For the CPU only calculation, a 48 core Intel Skylake Platinum 8160 with a clock speed of 2.1 GHz is used, and for the GPU, one Nvidia Tesla V100 is used. For all three types, the same initial population is used, and the OCP is converted to a distance-based function using interpolation, similar to the work done by D. Maamria et al. [13].

Conclusions
The computation of eco-driving cycles for vehicles fitted with internal combustion engines is addressed and formulated as an optimal control problem by considering both the fuel consumption and driver comfort of the vehicle. The proposed method is performed on several widely used standard driving cycles, and a simulated real-world driving cycle, and the results show that an average reduction of eight percent in fuel consumption is achieved, while the algorithm works more effectively in high-speed compared to low-speed areas of the driving cycles. The cost function calculation part of the proposed GA is parallelized on different computing hardware and the outcomes indicate that the execution efficiency can be improved based on the availability of the computing resources.
The idea is that the proposed optimization method can be adopted onto a cloud-based cluster computing system, where the environmental constraints, such as traffic conditions, vehicle specific limitations, and likewise, are fed to the optimization algorithm in real-time, and so the results can then be communicated to the vehicle or driver to improve fuel consumption. The robustness of the proposed optimization methodology to deal with appreciable uphill and/or downhill paths in the route, has been ascertained through the gradient resistance component of the vehicle model proposed. However, in an ideal case of network connected autonomous vehicles, the percentage reduction in fuel consumption can further be improved, since some of the effects related to the behaviors of human drivers, such as parallax errors, comfort preferences, travel time forbearances and likewise, are minimized.
It is planned in a future study to take the predictive horizon into account, as this will enable the possibility of using the proposed method in the on-line optimization with a fixed look-ahead distance or time. This work can also be extended to an electric vehicle, where the mass flow rate . m is replaced with electric power, and the vehicle energy demand can be modeled in terms of the state of charge (SOC) while replacing the integrated fuel map of the internal combustion engine with the efficiency map of the electric motor.

Definitions of Notations
The following Table 2 shows the nomenclature and the unit system used for the mathematical modeling of the vehicle dynamics used in this paper.