A Novel Energy-Efﬁciency Optimization Approach Based on Driving Patterns Styles and Experimental Tests for Electric Vehicles

: This article proposes an energy-efﬁciency strategy based on the optimization of driving patterns for an electric vehicle (EV). The EV studied in this paper is a commercial vehicle only driven by a traction motor. The motor drives the front wheels indirectly through the differential drive. The electrical inverter model and the power-train efﬁciency are established by lookup tables determined by power tests in a dynamometric bank. The optimization problem is focused on maximizing energy-efﬁciency between the wheel power and battery pack, not only to maintain but also to improve its value by modifying the state of charge (SOC). The solution is found by means of a Particle Swarm Optimization (PSO) algorithm. The optimizer simulation results validate the increasing efﬁciency with the speed setpoint variations, and also show that the battery SOC is improved. The best results are obtained when the speed variation is between 5% and 6%.


Introduction
In recent years, vehicle electrification technology including hybrid electric vehicles (HEVs) and pure electric vehicles (EVs), has gained popularity in public and private transportation systems. The reasons behind this are the continuous use of fossil fuels and environmental damage caused by the internal combustion engines used for transportation [1][2][3][4]. The optimal energy management in electric vehicles becomes one of the challenges faced by new algorithms that include vehicle performance and driver behavior. The latter significantly influences the battery consumption and is difficult to forecast. The main objective of research efforts in this field is to find a solution to improve energy efficiency and fuel savings in EV and HEV transportation systems, considering the maximum limits of the vehicle. This topic has been studied from different approaches in the literature [5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23].

Literature Review
Driving style studies have significant relevance when analyzing the energy consumption of EVs and HEVs. Controllers have been proposed to use the information of driving styles to decide the optimal vehicle commands at each instant of the driving cycle (DC). Results of the automatic control of an EV for driving styles recognition (DSR) suggest that the most significant fuel savings can be attained if the most aggressive drivers focus on reducing acceleration, and less aggressive drivers focus on lowering speeds on the highway [5][6][7]. The research presented in [5] uses unsupervised machine learning approach to recognize driving styles (aggressive, moderate and conservative) and controllers for each driving style. In order to improve efficiency and comfort, a sliding mode controller is proposed for the aggressive style [8]. For conservative and moderate styles, the PI controller is considered. Table 1 presents a summary of the literature on the strategies for improving EV efficiency, particularly showing methods and algorithms used, computational cost, experimental data of EV performance. The proposed optimization strategy is included in Table 1 to observe the differences concerning the cited literature. Table 1. Methods and algorithms, computational cost, EV performance experimental data, and required database for training models used in the literature for tackling the problem of EV efficiency.

Ref. Methods Computational Experimental Data Database and Algorithms
Cost for EV Modeling Required [8,9] FL,GA,PSO medium large and DSR [10,11] DP high small [12] Rapid-DP medium small [13] iDP medium small [16] Cluster Analysis medium large [17] GA and PSO medium large [18] PSO and DSR low medium [19] DP, PnG medium small and Opt-CPPT [20] PSO and IPSO low smal [21] SDP medium small [22] PSO medium medium [23] ECMS and PSO medium large This Paper PSO low small The adaptive optimal control strategy of driving style applies a combination of the driving style recognition with the equivalent consumption minimization strategy [9]. Based on the classification and identification of DCs, the accelerator pedal opening and change rate are analyzed through Fuzzy Logic (FL). The proposed driving style adaptive control strategy's effectiveness is validated by a real vehicle test, which indicates that, compared with the original performance, the minimization strategy improves its consumption. The proposed driving style recognition based on adaptive optimal control improves the energy economy by 3.69% in the New European DC.
Dynamic Programming (DP) is a numerical method based on a recurrent formula to solve complex problems, broken down into simpler subproblems. DP is used for studies that dedicate efforts to enhance the energy consumption in HEV and EV [10,11]. A drawback of these methodologies is that this algorithm is computationally expensive for large quantities of data. An algorithm of fuel economy for HEVs based on an improved DP approach called rapid dynamic programming (Rapid-DP) is proposed in [12], reducing the run time effectively. Another alternative applied for DP is the proposal shown in [13]. This approach considers iterative dynamic programming (iDP) to solve the eco-driving control problem of EV through optimized control profiles in each iteration; however, it cannot be used for extended periods of operation due to the huge computational effort. A methodology for the design of optimal control of EVs using stochastic DCs generated according to a broad set of properties such as topography, traffic, location, driving characteristics of the operator, and the environment is detailed in [14]. However, a large amount of representative DC data are required to simulate real scenarios for a vehicle [15]. An alternative study is shown in [16], in which DC determines data clustering and representative points in the torque-speed profile to enhance the computational cost.
Other solutions include driving styles to improve energy consumption, use metaheuristic approaches and evolutionary computation. Fuzzy control based on Genetic Algorithm (GA), PSO and DSR is proposed by [17], which considers energy consumption as the objective function. Nevertheless, the time-effort of these algorithms is not suitable for real-time optimization. In addition, the optimization method used in this article is only applicable when the DC has analysis and characterization in advance. The driving pattern recognition using clustering analysis and the powertrain system efficiency analyzed at each operation mode is used to design a dynamic energy management algorithm for EV. The optimization problem is solved by the metaheuristic algorithm PSO and was tested under the random driving condition for evaluating the performance [18].
The findings reported in [19] consider the acceleration torque ratio, braking torque ratio, and constant speed level as variables that guarantee a driving profile characterization. This proposal presents an algorithm called the optimal constant pedal position technique (CPPT). This algorithm shows a progressive increase in the initial torque demand on an EV and final regenerative braking with decreasing travel times. Optimization of control parameters of power-split HEV equipped with ultracapacitors to achieve better fuel economy is proposed in [20]. The effectiveness of the proposed optimization method is verified in simulations and experiential tests. However, this implies additional hardware and extra space for an ultracapacitor pack for possible implementation. The authors in [21] present stochastic dynamic programming (SDP) to optimize PHEV power management over the distribution of drive cycles, rather than a single cycle. Different approaches are shown in the literature to minimize consumption and maximize EVs' energy-efficiency according to driving styles. Some proposals present strategies based on Machine Learning and Fuzzy Logic to recognize driving styles by analyzing the EV driving pattern [5][6][7]9]. An optimal energy management strategy for PHEVs using a PSO algorithm is proposed in [22]. Firstly a rule-based strategy that can be implemented online is proposed to solve the energy management problem of PHEVs. Then some key threshold values in the rulebased strategy are selected as the optimization objectives of the PSO algorithm. In the document presented in [23] six kinds of typical driving cycle for HEVs trucks are obtained by hierarchical clustering algorithm, and a driving condition recognition (DCR) algorithm based on a neural network is put forward. PSO algorithm is applied to optimize three key parameters of ECMS under a specified driving cycle, including equivalent factor, scale factor of penalty function, and vehicle speed threshold for start-up.

Motivation
In line with what is stated in [19], we propose to analyze the vehicle's torque acceleration ratio and establish a correlation between speed, torque and consumed power. To establish an optimization algorithm, the authors in [10][11][12][13]21] have shown DP and iDP as an alternative to find a solution to this problem. However, its implementation has some limitations due to the increase in the computational cost according to the amount of data generated by routes. The proposed optimizer keeps a low computational cost in any scenario generated by the routes o driving styles.
Strategies found in [5,17,18,20], show that hybrid metaheuristic optimization algorithms such as PSO, GA, simulated annealing (SA) and identification algorithms such as FL and clustering are used in their formulations. These proposals generate the need for a large amount of training data to identify patterns in driving modes. The proposal of this paper shows that a priori knowledge of driving patterns is unnecessary to generate an optimization strategy.
Despite that, in the energy management strategies presented by authors in [22,23], the optimization objective is to minimize total energy cost (fuel and battery ) on EV and HEV. However, the dynamic model, longitudinal equations and internal losses of vehicles were not considered.
The motivation of this paper includes two main aspects. According to this idea, the use of EV efficiency maps is proposed to establish an optimization problem in which real driving cycles are considered. A complete EV system model is proposed using the vehicle dynamics, longitudinal forces and lookup tables that contain internal non-linearities. Due to the complexity of the model and the impossibility of having a closed mathematical form to describe the optimization problem, a metaheuristic strategy is used. Since it is unnecessary to identify or search for the classification of management patterns, it is unnecessary to generate hybrid metaheuristic strategies; therefore, only the PSO algorithm is considered to generate the search for the best solution.

Contributions of the Study
This research aims to address the above challenges to present a formulation for an optimizer covering distinct scenarios of driving patterns for EVs; this proposal is developed with the mathematical model including a differential drive, lookup tables made from experimental data, and a solution of the objective function using a metaheuristic algorithm.
The contributions of this proposal are the following: • We formulate a model for commercial EV that aims to include a realistic efficiency analysis for the whole system of the vehicle using a mathematical model, experimental tests in a dynamometric bank and the On-Board Diagnostics (OBD) that provides access to data from the Electronic Control Unit (ECU), allowing the inclusion of realistic nonlinear effects of EV in lookup tables. • A strategy is proposed to improve consumption and energy efficiency in an EV through an optimization algorithm that adapts to the user's driving pattern in real conditions, generating corrections in vehicle speed according to defined ranges. This formulation guarantees the improvement of the EV's energy efficiency without the need to generate previous training for the identification or classification of driving styles.

Outline
The paper is organized as follows: in Section 2, the EV model is presented, describing with detail subsystems such as the dynamical model, battery pack, electric motor, and inverter; in Section 3, the energy-efficiency optimization methodology is presented using a metaheuristic optimization algorithm. Simulation results and discussion are presented in Section 4. Finally, the conclusions of this study are presented in Section 5.
In order to describe and understand the proposed method easily, we summarize the notation needed in our formulation in Appendix A.

Electric Vehicle System and Dynamic Modeling
In this section, first, the power-train modeling of the EV is detailed. Then, the longitudinal and lateral dynamic model is proposed. The architecture of the power train is shown in Figure 1. The motor's command torque is dynamically coupled through simple gearbox and transmitted to front-wheels via a conventional differential drive.
The power train modeling parameters and lookup tables were obtained through its technical specifications and laboratory experimentation in a commercial EV detailed in [24].
It is essential to mention that for EV modeling, the altitude of 2550 m above sea level was considered. This information was factored into the calculation of the air density. Given that vehicle driving at higher altitudes, the air density would have lower values, and so the air resistance as well. According to [25], the air density of 0.96 kg/m 3 was considered.
On the other hand, the rolling resistance coefficient was calculated in relation to different types of roads and variable weather conditions. Taking into account the real road scenarios, the value for this parameter is 0.017. The Aerodynamic Drag Coefficient (C d ) is a rather complex parameter, and in practice, wind tunnels and coast down tests are often used to obtain it. For this document, the Kia Soul EV manufacturer provided the 0.35 value for C d . Finally, the value of a vehicle's frontal area can be estimated as the multiplication of width and height. However, as the shape differs between model vehicles, this value is perhaps not applicable. Nevertheless, various estimations can be found in the literature [4,26]. Based on the EV's model, the frontal area's estimate is found according to the weight and the Cd of the vehicle [26].
The parameters are shown in Table 2.

Dynamic Modeling
A system model is required for designing the vehicle motion control, with motor torque as input and EV speed as output. Tire forces influence the vehicle's longitudinal dynamics model, the aerodynamic drag force of the vehicle, rolling resistance forces, and the gravitational force related to the inclination of the vehicle as shown Figure 2 [4,27]. The external longitudinal forces acting on the vehicle are described in (1) as follows.
The torque T e applied to the front wheels through the differential drive causes the vehicle to move. The aerodynamic drag force is defined as shown in Equation (2): EV is driven by a transmission system between motor and wheel to improve vehicle performance. The primary function is to transfer power from the electric motor to the wheels, allowing the torque and motor speed to fulfill performance requirements [28]. The torque generated by the electric motor is distributed in the front wheels via differential bevel gear. Considering the effort to overcome these forces, the differential drive allows the drive wheels to turn at different speeds when turning a corner or maneuvers while driving the vehicle. Another essential feature is distributing equal torques on each of the wheels, even when rotating at different speeds.

Battery Model
This model describes the battery state of charge (SOC) and the batteries' output voltage using experimental data gathered during the driving of the EV on pre-established routes. In addition, the temperature effect was considered [29].
The state of charge is formulated as: where, i(t) is the instantaneous current of the battery, considered positive for discharge and negative for discharge. The factor Q is the nominal capacity measured in ampere-hour (Ah), the factor 0.997 is defined as the product of parameters that depend on the performance of the battery (charge-discharge) and the number of cycles of the battery [30,31]. Finally, f (T) is an expression that depends on the battery temperature expressed as follows: where, a, b, and c are coefficients of the second-order polynomial found. Considering the equivalent circuit or the Thevenin model, which consists of an array of a Resistor-Capacitor (RC) network in series with a voltage source [29,[32][33][34], the proposal is replacing the RC circuit with a transfer function as shown in Figure 3. Where R refers to the internal resistance of the battery. This model considers negative current for the discharge battery process; in contrast, for the charging process, the current is positive. To determine open-circuit voltage (V OC ) several experiments of charge-discharge under low constant current were performed.
According to the data obtained during experiments on the EV battery during a previous research detailed in [29] , the fitted curve for the relationship between V OC and SOC is shown in Figure 4 using 5th order regression, V OC is represented as shown in Equation (5): The model of the battery presented in this subsection determines the impact of temperature on the performance of the cell. The model shows better performance at low temperatures (25 • C), with a lower discharge rate. For temperatures higher than 35 • C, the discharge rate increases; this can be observed in the SOC decreasing rapidly for high temperatures, as shown in Equation (3).

Inverter and Electric Motor
The inverter is a key component of the EV, similar to the Engine Management System (EMS) of combustion vehicles, determining driving behavior. The inverters design and different topologies aim to transfer the battery pack's energy in direct current to the motor, modifying the voltage and frequency according to its needs. The inverter is also responsible for transforming the energy obtained by the regenerative brake to power the batteries. As a result, the performance of the EV is directly related to the inverter efficiency [35][36][37].
To determine inverter performance there should to measure of battery power, motor performance, and power directly at the EV's front wheels. The measurement experiment tests were made using the LPS 3000 dynamometer bench manufactured by MAHA Maschinenbau Haldenwang GmbH and Co. KG in Haldenwang, Germany.
In addition, the information obtained through the OBD II port directly from the ECU of EV is used by the authors in [38] in order to generate an analysis of losses and efficiency curves in the vehicle subsystems as shown in Figure 5. Before starting with the experiments, MAHA LPS 3000 recommends establishing the following conditions: tires pressure must be 30 PSI, the tire tread temperature must reach 30 • C, secure the vehicle with tension straps, and follow the measurement protocol that governs the dynamometer bank [38,39].  After analyzing data from experiments, the inverter efficiency curve as a function of the motor's rotational speed is shown in Figure 6. The inverter in this study shows minimum efficiency of 94% at high speed and maximum efficiency of 99% at low speed. The electric motor of the test EV is a Permanent Magnet Synchronous Motor (PMSM) and has advantages of high efficiency and torque current ratio, high power density, and wide speed range. These features are suitable for automotive applications, especially for HEV and EV [24,38,[40][41][42]. Technical specifications declare the nominal parameters of the PMSM as 81.4 kW of maximum power, 400-V voltage, and 285 Nm maximum torque. The non-linear effects generated by the PMSM model, mechanical elements and the internal losses are considered within the lookup tables that were generated through experimentation in the dynamometric bank.
According to data of experiments, the transmission and torque efficiency curves as a function of the motor's rotational speed are shown in Figure 7, where the mechanical transmission torque efficiencies improve when increasing motor speed. It is essential to mention that Figure 7 includes all losses between PMSM and gearbox, such as inertial losses, losses in couplings, and lubricant losses. The PMSM mechanical power was calculated as follows The efficiency factor η MI shown in Figure 6 is obtained through mechanical power tests in the dynamometric bank and electrical power obtained from OBD data. Rewriting the Equation (6) in terms of torque, voltage, and current, it can be expressed as: The equation for motor torque can be expressed as follows where N s is the motor rotational speed in (rpm). The mechanical power output of the transmission is calculated by Equation (10).
where η Tr represents the efficiency factor shown in Figure 6. Substituting from Equation (7) into Equation (10), the mechanical power output and torque of the transmission is obtained as The EV model and its subsystems were implemented in MATLAB/Simulink. Experiments and power tests have previously validated the model feasibility and efficacy on a dynamometer bank. The measured experimental data also was used for the parameters adjustment of the mathematical model. The presented EV model leads to the calculation of torque, PMSM rotational speed, battery pack power, and the resulting energy consumption in each subsystem.

Energy Efficiency Optimizer
In order to propose an optimization algorithm for the driving patterns to achieve maximum efficiency energy, it is important to understand the traction management and the energy consumption flow, from the battery to the EV wheels. In addition, the power conditions and limitations of battery discharge EV during its operation were considered as studies showed in [43,44]. Figure 8 shows an overall diagram where each subsystem is interconnected. The proposal includes the electric vehicle's dynamic model described in Equation (1), the battery model presented in Figures 3 and 4, the PMSM, and the inverter model as lookup tables obtained from Figures 6 and 7a. The proposed optimizer requires as input the torque, battery power from OBD data, and dynamometer lookup tables and the output of the optimizer is the reference signal Vr op .  For establishing a strategy for the optimizer, the objective function is obtained from the value analysis of the inverter and mechanical transmission efficiency lookup tables shown in Figures 6 and 7. The total energy-efficiency function between power supplied for battery and power wheel of the system is given as: It is essential to mention that the Jη represents the efficiency function between the battery and the transmission drive of EV. The decision variable of the optimization problem in (14) is the rotational velocity generated by PMSM (Ns) expressed in rpm. The speed correction generated by the optimizer on the driving pattern can be assigned in real-time, improving the EV's overall efficiency during its operation. The energy efficiency objective function was formulated according to the Equations (6)-(10), and inequality constraints are given as follows max N s Jη j = πT e Ns 30V batt I batt where j is the value obtained during the DC with a sampling period of 0.5 s and δ is the maximum variation between real and optimal velocity reference that depends on driving patterns. The optimal vehicle velocity depends on the value of Ns found by the optimizer, radio of tire, and transmission ratio, as shown in Equation (15).
To evaluate the optimizer's performance, real data collected on specific routes is used where the speed profile is determined by limits speed conditions and patterns driving.
According to the established speed limits by Ecuador's traffic law, three test routes were established. Figure 9 shows data for a route on highway roads where the speed limit is 90 km/h, this route is considered as DC 1 in the analysis.
The DC 2 is considered the route generated by driving the EV in urban areas, where the maximum limit speed established is 50 km/h. The data for this route is shown in Figure 10 describe a typical driving pattern inside the city. Figure 11 shows a combination of highways and urban areas, where variations in driving patterns can be seen. This route is considered as DC 3. The objective is to find a suitable optimization algorithm, among strategies used in the literature such as GA, SA and PSO. Table 3 presents the fitness values and computational time requirements for each algorithm. PSO obtains the best results on maximizing energy efficiency and minor computational time. In this study, the PSO, introduced for Eberhart and Kennedy [45][46][47][48] for swarm behavior and social cooperation, is applied to solve the discontinuous and highly nonlinear objective function and inequality constraints. Each iteration adjusts the particle position according to its own experience and neighboring, where it is established in the best position encountered by the swarm. The direction that the population takes is defined by particles neighboring the main particle and the swarm history experience. The velocity v i and position x i of particles are updated by the following equations: where, k is the iteration number, gbest is the best value global in iteration k, pbest is the best position of the best particle, r 1 and r 2 are random numbers in the range of [0, 1] and the particles number is defined since i = 1, 2, . . . , N. The PSO convergence depends on the learning factors c 1 and c 2 , the inertial weight w, the maximum generation k of a PSO stage, and the number of particles N.
The objective function solution in Equation (14), is given in two-dimensional lookup tables with the desired motor rotational speed in a specific range of the desired speed. The proposed solving process for optimal driving employs the process described in the flowchart illustrated in Figure 12. The variation of the rotation speed of the PMSM and the EV operating points are simulated under different driving pattern conditions, where the initial positions and the convergence of the particles during the execution of the algorithm are shown in Figure 13.
The performance of the algorithm shows that all particles converge towards the same point in an average of 6 iterations for each scenario while the EV is driven. As a result, the swarm's collective behavior converges to the same state, suggesting that a global minimum has been found. • Step 1 Parameter settings: the maximum number of iterations N, particle size X, the inertial weight factor ω, acceleration coefficients c 1 and c 2 , random numbers for r 1 and r 2 , and constraint conditions (P max , T max and delta); • Step 2 Fitness calculations and evaluation: compute the best value p best and position g best of the particle that maximizes the objective function in Equation (14) determined for j t h driven pattern sample; • Step 3 Compare value p best and previous Jη: If p best is greater than Jη then update new velocity v i and position x i of particles using Equations (16) and (17), otherwise keep the previous values. • Step 4 If the maximum iteration is met, terminate the algorithm. Otherwise, go to step 2. • Step 5 Repeat the process for sample j + 1.

Results and Analysis
In order to evaluate the energy efficiency algorithm presented in this paper, the dynamic modeling for a commercial EV and experimental tests presented in Section 2, and real DCs were used. The simulation model was built with Matlab/Simulink is shown in Figure 8. All parameters used in the simulation are described in Table 2 and the solution for optimization problem (14) where using PSO flowchart shown in Figure 12 for solving the optimization problem.
The algorithm proposal aims to make small changes (δ) in speed reference without affecting the driver's behavior. In other words, the algorithm intends to make small changes in the speed, improving the efficiency of the vehicle, without removing control of EV of the driver, Figure 14. Variations of the delta factor are considered, ranging δ factor between 0% and 10% with increases of 1% to determine the optimizer's performance. The results obtained from the simulations are presented in Table 4. Table 4 shows that the SOC value of the battery, according to the model described in Figures 3 and 4, presents modifications below 1% without applying the optimizing algorithm. Equation (5) shown the VOC in the function of SOC where the battery voltage keeps the value without variations compared to the original value.
The optimizer algorithm proposed to maximize the EV's energy efficiency. The (EEOptimizer) is designed to make speed adjustments in the vehicle depending on the data of mechanical torque, battery power, and a maximum variation of δ. These adjustments are made by following the trajectory of a real-world driving cycle.
Given the variety and complexity of vehicle driving patterns, it is essential to consider several of them to evaluate optimizer performance. These driving patterns are created from various speed characteristics described as driving styles: conservative, moderate, and aggressive [5,20]. Table 4. Results of energy efficiency in EV applying the driver cycle optimizer in 3 tests with different variations in the reference speed. It is highlighted that the most significant increase in efficiency occurs when the variation δ is between 5% and 6%.

Variation
Wheel The information is obtained by evaluating the EV on specific routes and real driving conditions described in Figures 9-11 that include different driving styles. During the simulation, the following information from ECU is required: power in the wheel, battery power, energy efficiency, torque and SOC for each speed variation of δ defined in the optimization problem.
According to the performance of the PSO optimization algorithm presented in Figure 13, the best locations of efficiency during the entire simulation time are located as a function of speed. In each DC, a specific driving pattern is presented, where results of the efficiency improvement for each DC are shown in Figure 14.
The value of 0% for δ refers to the fact that the VE operates without the optimization algorithm through DC. Before starting with the simulations, it is necessary to take into account that the initial value of the SOC is 1 and a simulation time is 3000 s for each DC. According to the results shown in Table 4 and Figure 14, it is possible to determine that the highest energy efficiency value is reached when δ is 10%. However, it is important to note that the evolution in the increase in efficiency is greater when the variation δ is between 5% and 6%. Figure 14a shows that for a 5% variation in speed the efficiency increases to 63% of the efficiency when δ is 10% and 74% when delta is 6%. For DC 2, Figure 14b shows the efficiency of 68% and 72% when δ is 5% and 6%, respectively. Finally, Figure 14c presents 66% and 89% of the maximum efficiency value.
It is important to note that the power saving of the DC 3 is better than the others; This result corresponds to the test path that has moderate and aggressive style components in its driving pattern, therefore, the algorithm has several search spaces in the look-up tables.
On the other hand, when δ = 5%, it is considered the best solution given that the SOC value remains fixed while the energy efficiency increases for all DC simulations. In this scenario, it is verified that there is an improvement in the EV's energy efficiency without causing additional consumption in the battery pack. Figure 15b shows that the proposed algorithm does not generate significant changes in the speed adjustment in EV during its operation, ensuring the following of the trajectory at the reference speed.  Figure 15a presents the result of the variations carried out by the optimizer. The efficiency of the EV during operation shows an increase during the entire simulation process. This result verifies that the proposed optimizer adapts to any driving style, improving efficiency throughout the EV travel; besides, it can be applied for long driving times. Another advantage of this approach is the computational time required to execute the proposed algorithm. The formulation was carried out according to (14), the generated search tables and the metaheuristic algorithm used, present an average execution time of 0.55 milliseconds. Figure 16 shows the calculation time required by the algorithm to generate a solution for each sample j of the DC. The sampling time of the vehicle measurements from OBD is 0.5 s, which implies the proposal can be implemented. To examine the effectiveness of the optimizer, the operation of the algorithm is compared with strategies reviewed in the literature that show the use of DP and iDP as an alternative to find a solution to this problem. However, the computational cost increases depending on the amount of data it must process. The proposed optimizer keeps its computational cost in low levels, specifically 0.55 milliseconds average for any DC. Another aspect that can be emphasized is that during the formulation of the optimization problem, a δ factor is proposed such that guarantees that the algorithm works within a specific band according to the EV's speed. Finally, only the PSO algorithm is considered to generate the search for the best solution, because no prior training or identification of additional DC is necessary, avoiding hybrid algorithms. These features show the advantages of the proposed method over the strategies presented in the literature.

Conclusions
A strategy for improving energy-efficiency based on mathematical modeling, experimental data, optimization formulation problem, and driving patterns in electric vehicles was proposed in this study. The main conclusions are: • The optimal rotational speed is calculated online corresponding to the driving requirements of DC using a metaheuristic algorithm and vehicle constraints (maximum torque and maximum power), ensuring minimal energy consumption between the battery pack and wheel over the road during driving. • The mathematical model of the EV and the optimization algorithm proposed were designed for a commercial test vehicle. Its performance was verified using simulation on driving profiles described in Figures 9-11. This methodology could be applied to other electric propulsion vehicles with different architectures in the power train and even HEVs. For each variation in the speed reference, the proposal is improving efficiency. The results presented in Table 3 and Figure 15 are evaluated with 3000 s (50 min). On a daily route, the average driving time for a common citizen is approximately 7200 s (120 min), which means that EV's energy efficiency can increase. • According to the simulation results and considering improving the energy efficiency performance, the strategy showed that the best results are obtained when δ is 10%. However, according to Figure 15 is possible to determine that the major efficiency increment is when δ is between 5% and 6%. Therefore, this scenario can be considered to obtain the greatest increase in efficiency with low speed variation. The use of lookup tables and PSO for solving the optimization problem generates an alternative for implementation. • The simulations have shown that the optimizer finds the best solution for each sample of DC in a 55-millisecond average, considering that samples of DC have a rate of 0.5 s; thus, the optimizer has enough time to complete the whole process.
In future work, lateral forces and trajectories with curvature on the road can be considered for energy efficiency analysis. Furthermore, a combination of metaheuristics and machine learning algorithms can be applied to solve the optimization problem; However, it should be considered that the execution time increases, according to the reviewed literature.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: