Application of Ant Colony Optimization for Co-Design of Hybrid Electric Vehicles

One key subject matter for effective use of Hybrid Electric Vehicles (HEVs) is searching for drivetrains which their component dimensions and control parameters are co-optimally designed for a desired performance. This makes the design challenge as a problem, which needs to be addressed in a holistic way meeting various constraints. Along this line, the strong coupling between components sizes of a drivetrain and parameters of its controllers turns the optimal sizing and control design of HEVs into a Bi-level optimization problem. In this chapter, an important application of continuous Ant Colony Optimization (ACO R ) for integrated sizing and control design of HEVs is thoroughly discussed for minimizing the drivetrain cost, minimizing the fuel consumption and addressing the control objectives at the meantime. The outcome of this chapter provides useful information related to incorporation of soft-computing, modeling and simulation concepts into optimization-based design of HEVs from all respects for designers and automotive engineers. It brings opportuni-ties to the readers for understanding the criteria, constraints, and objective functions required for the optimal design of HEVs. Via introducing a two-folded iterative framework, fuel consumption and component sizing minimizations are of the main goals to be simultaneously addressed in this chapter using ACO R .


Introduction
With the advent of hybridization concepts into the automotive field, searching for drivetrains which their component dimensions and control parameters are simultaneously designed for optimal objectives has been attained huge attention from the researchers. The hybrid drivetrains comprise several energy sources and components such as electric motors, batteries, power electronics converters and Internal Combustion Engine (ICE). Hence, making concrete design decisions for their topologies is significantly complicated compared to conventional ones in terms of sizing. Furthermore, the design space becomes larger considering complexities caused by indispensable power control parameters and consequently high degrees of freedom due to presence of multiple power sources [1,2]. This produces a large search space making it sophisticated for achieving objectives which are often counteracting, but equally important, e.g. satisfactory charge maintenance and fuel consumption minimization [3][4][5][6].
Due to their inevitable interrelations, the design levels of drivetrains cannot be performed independently or through standalone sequential framework as it leads one to suboptimal results. This makes the design challenge as a problem, which needs to be addressed in a holistic way meeting various constraints. Along this line, the strong coupling between components sizes of a drivetrain and parameters of its controllers turns the optimal sizing and control design of HEVs into a Bi-level optimization problem. For obtaining an optimal system design, the drivetrain components dimensions and the vehicle energy management strategy (EMS) should be designed in an interconnected and cohesive manner called integrated optimal design or co-design leading to minimum drivetrain cost and minimum fuel consumption as main objectives. There are several optimization algorithms and sequences available for integrated design of HEVs such as stochastic, gradientbased, deterministic, and derivative-free optimization methods [7]. The algorithm selection for integrated design of hybrid drivetrains depends on design targets. However, among variety of existing approaches, the metaheuristic algorithms e.g. Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Simulated Annealing (SA) etc., owing to their derivative-free features, could bring great potential and flexibility toward handling the non-monotonic, non-linear, and highly dynamic nature of HEV design.
In this chapter, an application of continuous Ant Colony Optimization (ACO) as a relatively recent nature-inspired algorithm is presented for integrated design of HEVs focusing on minimization of drivetrain costs besides fuel consumption at the meantime. The design variables include power rating of the components (i.e. battery, ICE, electric motors) and control parameters dealing with power sharing through the components. Various equality and inequality constraints involve in the optimization procedure related to components power sharing limitations, initial and final battery state-of-charge (SoC), maximum and minimum allowable SoC boundaries, and charging rate limitations. To this end, first there is a need to establish a full vehicle model and its corresponding energy management strategy (EMS) which will be performed in Simulink® environment. A modeled passenger vehicle will be coupled into an ACO algorithm scripted in MATLAB to work in tandem for the optimization purpose. The developed framework triggers the integrated design objectives via minimizing sizing and control objective functions while satisfying the design constraints to be eventually compared with an initial non-optimal case. The optimization includes two iterative nested parts linked into each other through an inner loop to consider the optimization objective and constraints for component sizing and control in an integrated and iterative manner as simplified in Figure 1.
The present chapter is organized as follows. Section 2 presents the drivetrain architecture of the studied passenger HEV. In Section 3, individual modeling of the vehicle's components, EMS and corresponding descriptions will be elaborated. Section 4 reviews the principles of the used ACO algorithm. Section 5 narrows down the objective functions, optimization constraints and the integration of the simulation into optimization process for the studied application. Section 6 discusses and compares the attained results, and finally Section 7 recapitulates the conclusions. The outcome of this chapter provides useful information related to incorporation of soft-computing, modeling and simulation concepts into optimization-based design of HEVs from all respects for designers and automotive engineers.

Drivetrain architecture
In general, the HEVs are a combination of conventional and full-electric vehicles using both ICE and electric motor/generator for propulsion. Various topology of HEVs (e.g. series, parallel, series-parallel) exist depending on how the comprising power sources and components are connected through the vehicle structure. The parallel architecture for a passenger HEV is considered for the drivetrain topology of this study. The parallel drivetrain utilizes more than one direct power source in its architecture to provide energy for the propulsion system. The ICE and electric motor (EM) in such a topology can be coupled/decoupled to the wheels when required which brings more degree of freedoms (DoFs) of operating the vehicle in different modes. Hence, the traction force can be provided by means of both ICE and EM or either of them independently leading to lower number of energy conversions and consequently lower losses in such a topology compared to the series HEVs [8]. In a parallel drivetrain the wheels can receive the generated power from the EM plus the one received from ICE. Since the EM can operate as an electric generator in such a topology, the battery pack can be charged during regenerative braking or when the ICE output power is greater than the required power at the wheels. Figure 2 illustrates a schematic of the considered parallel HEV architecture.

Modeling of the vehicle subsystems
Three main approaches exist for modeling and simulation of electric vehicles topologies: 1. the kinematic (backward-facing) approach, 2. the quasi static (forward-facing), and 3. the dynamic approaches. The backward-facing and forward-facing approaches are also known as "effectcause" and "cause-effect", respectively. Since a backward methodology carries out significant advantages such as simplicity and low computational cost in model-in-the-loop applications it is the most ideal testbed for integration into optimization algorithms requiring iterative operations [9]. Therefore, the backward-facing method is used for drivetrain modeling and simulation phase of this study. In principle, the backward facing calculation starts from the driving cycle velocity inputs to calculate the required tractive force at the wheel for propulsion. The required power, the translated torque and rotational speed will be calculated in a backward direction distributed through the components considering the powersplit control block defined in an EMS subsystem. In this regard, Figure 3 illustrates the calculation direction of a backward-facing model in a simplified way. The detailed modeling process of the subsystems are provided as follows.
The driving cycles are velocity time series representing a driving pattern; bring the road to a computer simulation and provide the profile that a vehicle requires to follow. The use of driving cycles assists modeling the drivetrain and the required performance to be considered for an appropriate design [8]. The standard New European Driving Cycle (NEDC), as represented in Figure 4, as the timedependent dynamic input of simulation process is used in this chapter.
A vehicle simulation model is required to be linked into the optimization algorithm for optimized integrated design and evaluation of the vehicle performance over the considered driving cycle. Hence, an energetic vehicle model based on the longitudinal dynamic motion laws is developed in MATLAB/Simulink® in this study. The vehicle longitudinal dynamic model uses speed and acceleration timeseries of a driving cycle to calculate the required tractive forces considering the  drag resistance force, the rolling resistance force, the gradient resistance force, and the inertia force: where its constant values are described and given in Table 1.
Consequently, the torque T w and the rotational speed ω w required to be supplied can be modeled. Along this line, by knowing the wheels radius R w one can readily have the output of vehicle dynamic model to be fed into transmission subsystem model: In general, the vehicle components can be modeled using physical equations, analytical models (i.e. equivalent circuit) or considering related efficiency maps, which relate torque-speed or voltage-current pairs to their corresponding efficiency [11]. Using the obtained input torque and rotational speed values, the efficiency map defined in a look-up-table (LUT), power flow through the Electric Motor (EM) can mathematically be expressed as: It is notable that the efficiency term in Eqs. (4) and (5) must be treated contrarily for motoring and regenerating braking modes having positive and negative power flows, respectively. To this end, the efficiency operators β = À1 for the motoring mode (P > 0), and β = 1 for the braking mode (P < 0) are considered in the modeling process. Figure 5 represents the efficiency map of the 75kw EM considered for the present study stored in EM LUT which can be scaled by torque and consequently power as an EM sizing decision variable in the optimization procedure. Similarly, the core functionality of the ICE subsystem used in this study is based on an input-output approach using torque-speeds pairs corresponded to the efficiency and fuel rate map stored into LUTs in the vehicle model. Having the output fuel consumption rates data and the fuel density, the consumed fuel in liter can be modeled in fuel tank subsystem as given in Eq. (7), where _ m represents the fuel consumption rate and ρ f is the fuel density [13]. Figure 6 represents the efficiency map of the 41 kW engine considered for the present study which can be scaled by torque and consequently power as a sizing variable in the optimization procedure.
A lithium-ion battery pack based on a semi-empirical first order Thevenin equivalent circuit is modeled in the battery subsystem. The elements of the battery model can be identified by using the experimental data [14] for open circuit voltage (V oc ), the internal resistance (R int ), the polarization capacitance (Cp), and the polarization resistance (R p ), which are stored in the LUTs of the corresponding subsystem. The terminal voltage of the pack V batt and SoC can be expressed as: Figure 5. 75 kW EM efficiency map [12]. Figure 6. 41 kW ICE efficiency map [12]. Table 2 provides the specification of LiFePO 4 (LFP) battery cells used for modeling while number of cells are considered as the battery power sizing decision variable in the optimization procedure.
The output of power converters is modeled considering the power flow calculation direction and the components efficiency are used in their corresponding LUTs. The operators β = À1, and β = 1 are considered for the motoring mode (while P > 0), and the braking mode (while P < 0), respectively.
The main role of the energy management strategy (EMS) subsystem in HEVs is to define power sharing control principles satisfying set of required control objectives. The control strategies are mainly categorized into rule-based (RB) and optimization-based (OB) ones. The RB strategies as they are structurally working under If-Then rules, may handle trivial control objectives (e.g. HEV battery chargesustaining), however, they are highly fragile in leading to optimal results when it comes to fuel consumption minimization. Hence, there is a need for coupling RB strategies into OB strategies to form a robust control framework as considered in the context of the present chapter. To this end, a RB strategy considering different vehicle operation modes is linked to a Low Pass Filter (LPF) OB strategy in the EMS block of the modeled vehicle to satisfy control optimization constraints and objectives. The RB control part updates the operating modes through the simulation considering the requested load, speed, accessible power from energy sources, battery state-of-charge (SoC) and power split control variables. The operating modes considering these objectives can be categorized as follows: • Pure electric mode; • Hybrid-traction mode; • Engine traction and battery charging mode;
• Hybrid battery charging by both ICE and regenerative breaking; • Regenerative braking mode.
However, the fuel consumption is significantly depended not only on the defined operating rules, but also on the OB power-split method used, specifically for the hybrid operating modes for improving efficiency and control robustness. Hence, an optimized Low Pass Filter (LPF) strategy will be introduced to the optimization algorithm to optimize the power-split control part by finding the best sharing control variable of LPF strategy satisfying power sharing objectives and constraints. In this regard, the considered OB-LPF strategy optimizes power sharing between the supplying components (i.e. battery and ICE) to provide required driving power while minimizing fuel consumption. Through using a filter-based transfer function, the filtered component of the required power passes to be supplied by the ICE while its difference with the total demand will be supplied by the battery subsystem [15]. The standard transfer function defined in the energy management subsystem and optimization process is considered as below. Here the LPF denominator (τ) is the control variable to be searched through optimization routine toward having the control objectives and constraints satisfied: The elaborated subsystems are integrated in the Simulink® environment to form the whole vehicle model to work in tandem with a MATLAB-based ANT Colony (ACO R ) algorithm for component sizing and control optimization.

ACO R algorithm
The metaheuristic Ant Colony Optimization (ACO) system, inspired by foraging behavior of ants, was first developed by Dorigo et al. [16] for discrete optimization problems. In the discrete ACO the ants represent stochastic procedures toward establishing set of candidate solutions in presence of a pheromone model. The pheromone model encompasses numerical values as pheromones being updated in iterations leading ants to promising solution regions of the search space. Hence, in the discrete ACO, pheromone information is used in a sampling process to construct a discrete probability function based on the sorted solutions. Later on for solving continuous domains, Socha and Dorigo [17] developed the continuous ACO (ACO R ) which can utilize continuous multimodal probability functions such as weighted Gaussian functions over the search space to solve a non-linear function optimization problem as Min f x ð Þ : a ≤ x ≤ b where vector x ¼ x1, … , xn ð Þrepresents the decision variables having vectors a and b as the lower and upper search space boundaries, respectively [18]. To this end, it produces a probability density function for each iteration using solution archives as an explicit memory of the search history in the pheromone model. Accordingly, the ACO R used in this study includes three main phases as: • Pheromone representation; • Probabilistic solution construction; • Pheromone update.
In this regard, first in pheromone representation stage the algorithm uniformly and in a random manner initializes the solution archive of k solutions where each solution is a D-dimensional vector for x i ∈ x min , x max ½ where i ¼ 1, 2, … , D: The archived solutions are sorted based on their quality (best to worth). In the probabilistic construction stage a solution (i.e. S j ) for j th solution will be selected considering the choosing probability p j defined by a Gaussian probability function where each solution S j is corresponded to its weight w j , mathematically expressed as follows [19,20]: In this regard, the better solutions would get higher choosing chances. Correspondingly, rank j ð Þ is the rank of sorted solutionS j , and the intensification factor (selection pressure factor),q, is a modifiable algorithm parameter dealing with uniformity of the probability function while larger q values make the probability function more uniform. A solution would be chosen based on the probabilistic approach and new candidate solutions are generated as the algorithm samples neighborhood of i th decision variable, S i guide , using the Gaussian function G (see Figure 7) with mean μ i guide ¼ S i guide and standard deviation σ i guide values as follows [21]: It calculates the average distance value of the i th component of S guide and the values of the i th components of solutions in the archive. Here the multiplier ξ > 0 is the user-specified pheromone evaporation rate parameter affecting the convergence while lower ξ values lead to lower convergence speed.
In the phoremone update phase, the process repeates forNa(number of ants) times while appending the new generated solutions to the k solutions of the archive, to incrementally sort k þ Na solutions and remove the worst solutions. Therefore, before a next iteration starts, the algorithm updates the archive keeping only the best k solution and discarding the worst ones having the archive size unchanged. For a considered number of itterations, the algorithm runs till reaching a stoping Figure 8. General flowchart of the algorithm for the inner loops of the nested framework [22]. criteria to eventually select the best solution among the the evaluated positions. Figure 8 provides the algorithm flowchart for the elaborated procedures.

Incorporation of the vehicle model into the optimization procedure, objectives and constraints
The established Simulink® model previously explained in this chapter is integrated to the MATLAB-based ACO script to iteratively work in tandem for the optimization purpose. The framework considers set of defined control and component sizing constraints and objectives. The co-design optimization process includes two iterative phases linked into each other through an outer loop to consider finding optimized EMS and component sizes at the meantime as simplified in Figure 9.
Two objective functions corresponding to the fuel consumption and components cost are considered for control and sizing optimizations, respectively. For the control parameter optimization, the decision variable would be the previously introduced LPF denominator (τ). Therefore, for the EMS optimization the algorithm aims to search for the power sharing variable which minimizes the fuel consumption (FC) while satisfying the constraints.
On the other hand, another objective function is used for the component sizing formed based on the cost of powertrain components considering their prices per power unit. In other words, for the optimal sizing, the algorithm searches for the sizes which minimize the powertrain cost while satisfying the constraints. In this regard, the following formulation can be readily expressed for this objective function: where the cost, €, for each component is considered in Euros and can be calculated based on per-power unit price, Q comp , of each component considering its size: The used per power unit price are given in Table 3 for the ICE, the battery and the DC-DC converter while the inverter cost can be directly included based on the following equation.
For minimization of the objective functions, the charge sustaining HEV is subjected to the following inequality constrains: C_Rate t ð Þ ≥ À 3; Negative sign stands for charging (23) where the sizes of components are bounded between the considered minimum and maximum values of the search space. Regarding the SoC, constraint in Eq. (21) indicates the charge sustaining requirement, and Eq. (22) stands for the allowable limits of the SoC over the total driving cycle. The constraint in Eq. (23) is considered based on LiFePO 4 battery type chemistry to avoid sudden charges, to avoid fast aging of the battery pack, and to improve battery's lifetime and performance. It is notable that some constraints must be incorporated into the objective function as penalties to penalize the cost via adding (in minimization problems) or deducting (in maximization problems) a big enough penalty value when the constraint(s) is violated. This technique is useful to consider the inequality constraints which cannot be directly involved in the formulations of the objective function. As the optimization problem for both objectives are both minimization type here, the added penalty is considered.  Table 3.
Per-power unit prices used in cost objective function.

Results and discussion
To investigate the effectiveness of the proposed framework, simulation and optimization over NEDC driving cycle are performed and the results are provided in this section. The comparisons are considered for an initial non-optimized case (before integrated design) versus optimized cases (after integrated design). The main objective of the integrated design is to minimize component sizes and as a result the cost of powertrain besides achieving optimized fuel consumption while satisfying the constraints through the developed nested iterative framework. For achieving close enough values of the initial and final SoC, ε 0 ¼ 0:3%, and for providing slight degree of freedom on allowable SoC min and SoC max , small ε allowable sliding value as 4%, were all considered in the formulations of the optimization constraints. Figure 10 presents the power sharing between the battery and the ICE satisfying driving power. In addition, evolution of the battery SoC and C-Rate for the studied driving cycle after the integrated design are plotted in the same figure.
As can be seen, the regulated EMS could successfully recover the SoC to achieve close values for initial and final SoC over the full cycle (SoC f ≃ SoC f )having the ICE charging the battery when needed while considering the definedC_Rate t ð Þ violation limit at the meantime. In addition, the SoC allowable minimum and maximum boundary is satisfied through the desired window range for the whole cycle. Consequently, Table 4 provides detailed evaluations in terms of control constraints satisfaction related to triggered EMS goals.
Correspondingly, Table 5 summarizes the design parameters before and after optimal integrated design while fuel consumption besides powertrain cost

Considered features
Before After Driving power needs ✓ ✓ C_Rate t ð Þ < À 3 ✓ ✓ All EMS objectives satisfied? ✘ ✓ improvements for the studied cases are provided in Table 6. The sizes of the decision variable values attained after integrated design indicates that the algorithm could efficiently downsize the component sizes and consequently the powertrain costs. It can be observed that improvements are achieved in the fuel consumption and cost of powertrain components after the co-design design by 5% and 17%, respectively as illustrated in Figure 11.

Chapter conclusions
This chapter investigated a combination of optimization-based and rule-based energy management strategies to perform an integrated design approach for a passenger hybrid electric vehicle use-case. The modeling procedure of the components were presented, and the corresponding Simulink® model was developed and linked to an ACO R algorithm to work iteratively for the co-design design purpose.
To check the performance of the proposed framework, simulations and optimizations were carried out over the NEDC driving cycle. The detailed results through Improvement (%) -17 Table 6.
Fuel consumption and powertrain cost improvements. the cycle for power splitting, battery SoC values, battery C rate values, fuel consumption and powertrain costs were obtained and compared for before and after applying the approach. The results indicated that the proposed framework not only was able to provide an acceptable management regarding the battery SoC and C rate , but also was competent of bringing significant added values in terms of the fuel consumption and powertrain cost reduction. The outcome of the present study paves the path for experimental Hardware-in-the-Loop and Vehicle-in-the-Loop validations.