Energy-Saving of Battery Electric Vehicle Powertrain and E ﬃ ciency Improvement during Di ﬀ erent Standard Driving Cycles

: This article focuses on the energy-saving of each driving distance for battery electric vehicle (BEV) applications, by developing a more e ﬀ ective energy management strategy (EMS), under di ﬀ erent driving cycles. Fuzzy logic control (FLC) is suggested to control the power management unit (PMU) for the battery management system (BMS) for BEV applications. The adaptive neural fuzzy inference system (ANFIS) is a modeling technique that is mainly based on data. Membership functions and FLC rules can be improved by simply training the ANFIS with real driving cycle data gathered from the MATLAB / SIMULINK program. Then, FLC console blocks are rewritten by enhanced membership functions by ANFIS traineeship. Two di ﬀ erent driving cycles are chosen to check the improvement in the e ﬃ ciency of this proposed system. The suggested control system is validated by simulation and comparison with the traditional proportional-integral (PI) control. The optimized FLC shows better energy-saving.


Introduction
The main cause of global warming is the pollution produced through exhaust emission from the traditional internal combustion engine (ICE), and cars today are a critical part of our lifetime. Battery-powered electric vehicles (BEVs) provide high powertrain efficiency while reducing carbon dioxide emissions, one of the biggest challenges today [1]. However, battery-related flaws for the relatively short-range driving associated with long charging time. So, BEVs are prevented from partaking in commercial competition with large-scale fuel-powered cars [2][3][4]. We should have a suitable vehicle model to estimate the energy consumption of electric vehicles [5][6][7]. Developing an efficient energy management strategy (EMS) for BEVs is critical to addressing the above issues.
Therefore, battery capacity restrictions in BEVs today strongly stress the importance of understanding the causes of energy consumption in BEVs during operation, or more precisely how driving itself influences powertrain efficiency, power consumption, and hence the available driving cycles range [4,8]. Since the middle of the last century, numerous comprehensive studies have been conducted around the world, aiming at identifying the leadership that led to the development of different driving cycles [9]. But also a survey shows how emission, energy consumption, and efficiency

•
Exploiting the concept of improving membership functionality and FLC rules by simply training ANFIS with real driving cycle data gathered from the MATLAB/SIMULINK program.

•
The procedure for FLC console blocks is recast with enhanced membership functions by ANFIS training. After that, the proposed FLC controller is very suitable for dealing with non-linear problems, thanks to its strength and adaptability. • As a result, the new control unit not only improves the reliability of the vehicle's control system but also the energy management strategy achieves a promising performance for energy saving. Ensure that battery power is optimal for operating the vehicle.

•
Ensure that the risk of battery damage is minimal and protect battery cells from abuse and damage.

•
Control the charging and discharging of the battery and ensure that the battery is always ready for use.

•
Extend battery life for as long as possible.
This article is organized as follows: after the introduction within the first section, vehicle modeling and its parameters are described in the second section. Moreover, discharging curves are obtained by simulation and validation with the manufacturer's data-sheet. Within the third section, a method is presented for the design of the energy management strategy (EMS) for battery electric vehicles, which ensures that the wants are met due to the distance of drive and acceleration. The fourth section contains an example of the application where the EMS is employed within the complete simulation of BEVs. The fifth section gives the concluding remarks.

Vehicle Modeling
A lightweight small vehicle (4-5 seats) was visualized based on dimension and performance data from the various passenger cars available on the market [28] for modeling in this article. Car parameters can be seen in Table 1. The power train comprises of three main parts as shown in Figure 1, a lithium-ion battery, an Insulated Gate Bipolar Transistors (IGBTs) inverter with the control system, and a permanent magnet synchronous motor (PMSM) connected to the wheels via a gearbox transmission, to match the high speed of the electric motor shaft to the lower speed of the wheels. The simulation structure is designed and integrated into MATLAB/SIMULINK as shown in Table 2. Finally, the three-phase voltage and frequency control system is applied to the electrical motor, depending on the driver's current request, which is connected by the accelerator pedal or/and brake pedal.

The Force Model
This section will explain the energy consumption and analysis of the power train load levels, and it's assumed that the car body is solid, and therefore it can be modeled as a grouped mass at the center of gravity of the car [29]. Moreover, the dynamics in only one direction, which is the forward longitudinal direction, are of importance while assuming that the stability of the car does not violate under any circumstances. According to the principle of forces balance contained in Newton's Second Law' of mechanics, the dynamic movement of a car in one completely coordinated axis is determined by the sum of all forces operating on it in the same direction axis, as shown in Figure 2. Law' of mechanics, the dynamic movement of a car in one completely coordinated axis is determined by the sum of all forces operating on it in the same direction axis, as shown in Figure 2. The tractive force, Fwheel, which must come to the wheels from the electrical machine, must overcome the sum of all the resistance forces influential on the car which are: force due to aerodynamical drag, Fd, tires rotation resistance, Frr, acceleration force, Fa, and gradient force on road, Fg. The traction force of a vehicle can be described as in [30]: where Rotation resistance occurs due to many different influences that occur around and inside the car's tires through the rotation. The rotation resistance factor depends on tire pressure, linear speed, road phenomena, road surface type, and car tires. One of the main influences is that the repeated tire deviation causes a slowdown within the tire material, resulting in an internal force that resists movement [31], and the direction of this force opposite the direction of movement, and the value is directly proportional to the gravitational force factor. The rotation resistance depends on more than seven different influences, which makes estimating the rotation resistance by analytical modeling very complicated in [29], so, the factor of rotation resistance, Frr, is expressed in [32] as follows: where 3.6 is the velocity conversion unit (the kilometers traveled within one hour). Figure 3 shows the different velocity dependencies available for Frr in [33,34], both of which assume that they typically depend on available tire measurements. The marks from Bosch symbolize tire design velocity limits: 180 km/h for S, 190 km/h for T, 210 km/h for H, 240 km/h for V, 270 km/h for W, above 240 km/h for Z, and finally, ECO tires are low-roll resistant tires specially designed to reduce tire rotation energy, which reduces the required rotation effort, that comes in various speed ranges. Also, Figure 3 usually illustrates three analytic expressions: one is linear [30], one that is weakly dependent on the velocity square [31], and one that is strongly dependent on the velocity square [29]. It can also be observed that Frr increase with velocity is somewhat smaller for tires with a lower velocity rating and that Frr is slightly larger compared to tires with higher velocity ratings. In [35], based on manufacturer datasheet for new tires from 2005, the average Frr for low-velocity tires (up to 180-190 km/h) is 0.0098 for high-velocity tires (up to 210-240 km/h) is 0.0101, in whereas highvelocity tires (greater than 240 km/h) are 0.0113. Both acceleration and gravitational forces are the product of car mass, and consequently, it follows that a given acceleration level for any car causes the same force of the wheel as a certain level of the road gradient as shown in Table 3. The tractive force, F wheel , which must come to the wheels from the electrical machine, must overcome the sum of all the resistance forces influential on the car which are: force due to aerodynamical drag, F d , tires rotation resistance, F rr , acceleration force, F a , and gradient force on road, F g . The traction force of a vehicle can be described as in [30]: . Rotation resistance occurs due to many different influences that occur around and inside the car's tires through the rotation. The rotation resistance factor depends on tire pressure, linear speed, road phenomena, road surface type, and car tires. One of the main influences is that the repeated tire deviation causes a slowdown within the tire material, resulting in an internal force that resists movement [31], and the direction of this force opposite the direction of movement, and the value is directly proportional to the gravitational force factor. The rotation resistance depends on more than seven different influences, which makes estimating the rotation resistance by analytical modeling very complicated in [29], so, the factor of rotation resistance, F rr , is expressed in [32] as follows: where 3.6 is the velocity conversion unit (the kilometers traveled within one hour). Figure 3 shows the different velocity dependencies available for F rr in [33,34], both of which assume that they typically depend on available tire measurements. The marks from Bosch symbolize tire design velocity limits: 180 km/h for S, 190 km/h for T, 210 km/h for H, 240 km/h for V, 270 km/h for W, above 240 km/h for Z, and finally, ECO tires are low-roll resistant tires specially designed to reduce tire rotation energy, which reduces the required rotation effort, that comes in various speed ranges. Also, Figure 3 usually illustrates three analytic expressions: one is linear [30], one that is weakly dependent on the velocity square [31], and one that is strongly dependent on the velocity square [29]. It can also be observed that F rr increase with velocity is somewhat smaller for tires with a lower velocity rating and that F rr is slightly larger compared to tires with higher velocity ratings. In [35], based on manufacturer datasheet for new tires from 2005, the average F rr for low-velocity tires (up to 180-190 km/h) is 0.0098 for high-velocity tires (up to 210-240 km/h) is 0.0101, in whereas high-velocity tires (greater than 240 km/h) are 0.0113. Both acceleration and gravitational forces are the product of car mass, and consequently, it follows that a given acceleration level for any car causes the same force of the wheel as a certain level of the road gradient as shown in Table 3.  In the state of a road gradient (or slope), car dynamics will be influenced by the gravitation force factor Fg parallel to the road.
where α is the angle between a road gradient and the horizontal plane (rad/s) while the rising is the vertical axis and the driving is the horizontal distance as shown in Figure 2. The road inclination is often expressed as a percentage of gradient %. The mechanical power, Pw, that must come to the wheels, from the power train required to drive a car at speed v, is the product of the wheel force and velocity of the car as follows: The total energy of the wheels expended while driving, dEw, is as follows: Meanwhile, the car may move up or down, these forces may be resistant or contribute to the net traction force on the car, meaning that it will be either negative or positive. Thus, driving on an uneven road will cause temporary storage and drain the energy inherent in the car. Still, passenger cars are commonly temporarily displacement for only a day or so, from the starting point (home for example), regardless of the path they took, the potential energy remains the same when returning to the starting position. Whereas, BEV is usually able to recover some energy from going down as it is with deceleration. For each time step, you must pay attention to the wheel force tick to calculate propulsion, braking, and power separately.

The Battery Model
The battery is the heart of electric cars. There are many different types of batteries, for example, lead-acid, nickel-metal hydride, lithium-ion, etc. The type of battery selected on this sheet was Li-ion battery: this category belongs to the family of rechargeable batteries. The lithium-ion battery is the preferred choice due to its relatively specific power, also its strength to deal with the harsh operating environment that it undergoes in BEV [36]. The battery was designed using a simple controlled  In the state of a road gradient (or slope), car dynamics will be influenced by the gravitation force factor F g parallel to the road.
where α is the angle between a road gradient and the horizontal plane (rad/s) while the rising is the vertical axis and the driving is the horizontal distance as shown in Figure 2. The road inclination is often expressed as a percentage of gradient %. The mechanical power, P w , that must come to the wheels, from the power train required to drive a car at speed v, is the product of the wheel force and velocity of the car as follows: The total energy of the wheels expended while driving, dE w , is as follows: Meanwhile, the car may move up or down, these forces may be resistant or contribute to the net traction force on the car, meaning that it will be either negative or positive. Thus, driving on an uneven road will cause temporary storage and drain the energy inherent in the car. Still, passenger cars are commonly temporarily displacement for only a day or so, from the starting point (home for example), regardless of the path they took, the potential energy remains the same when returning to the starting position. Whereas, BEV is usually able to recover some energy from going down as it is with deceleration. For each time step, you must pay attention to the wheel force tick to calculate propulsion, braking, and power separately.

The Battery Model
The battery is the heart of electric cars. There are many different types of batteries, for example, lead-acid, nickel-metal hydride, lithium-ion, etc. The type of battery selected on this sheet was Li-ion battery: this category belongs to the family of rechargeable batteries. The lithium-ion battery is the preferred choice due to its relatively specific power, also its strength to deal with the harsh operating environment that it undergoes in BEV [36]. The battery was designed using a simple controlled voltage source in a series with a fixed resistance, as shown in Figure 4. Internal resistance is presumed to voltage source in a series with a fixed resistance, as shown in Figure 4. Internal resistance is presumed to be fixed for simplicity reasons, though it may usually change depending on the value of the battery current or the charge and discharge status. The circuit equivalent loop that holds the Kirchhoff voltage law is proven to produce a terminal voltage expressed as: where Vbatt is the battery voltage (V), Ebatt is the no-load voltage (V), Ri is the internal resistance (Ω), Ibatt is the battery current (A). As V and Ri depend on the charging status of the instant battery. Internal resistance Ri can be expressed as a function of battery charge and operating temperature as well as certain charge and discharge currents.

Extracting Model Parameters
The model can accurately represent the behavior of many types of batteries, provided the parameters are well defined. The main advantage of this battery model is that it is easy to draw parameters from the manufacturer's discharge curve. Figure 5 shows the computed discharge curve typically for (Type Li-ion battery: 288 Volt 120 Ampere-hours) and is an indicator of battery voltage versus elapsed time during discharging. The fixed current used to discharge the battery is 6 Amperes (0.4C), determined by the nominal amplitude of the battery divided by one hour [37].  The circuit equivalent loop that holds the Kirchhoff voltage law is proven to produce a terminal voltage expressed as: where V batt is the battery voltage (V), E batt is the no-load voltage (V), R i is the internal resistance (Ω), I batt is the battery current (A). As V and R i depend on the charging status of the instant battery.
Internal resistance R i can be expressed as a function of battery charge and operating temperature as well as certain charge and discharge currents.

Extracting Model Parameters
The model can accurately represent the behavior of many types of batteries, provided the parameters are well defined. The main advantage of this battery model is that it is easy to draw parameters from the manufacturer's discharge curve. Figure 5 shows the computed discharge curve typically for (Type Li-ion battery: 288 Volt 120 Ampere-hours) and is an indicator of battery voltage versus elapsed time during discharging. The fixed current used to discharge the battery is 6 Amperes (0.4C), determined by the nominal amplitude of the battery divided by one hour [37].
Sustainability 2020, 12, x FOR PEER REVIEW 7 of 26 voltage source in a series with a fixed resistance, as shown in Figure 4. Internal resistance is presumed to be fixed for simplicity reasons, though it may usually change depending on the value of the battery current or the charge and discharge status. The circuit equivalent loop that holds the Kirchhoff voltage law is proven to produce a terminal voltage expressed as: where Vbatt is the battery voltage (V), Ebatt is the no-load voltage (V), Ri is the internal resistance (Ω), Ibatt is the battery current (A). As V and Ri depend on the charging status of the instant battery. Internal resistance Ri can be expressed as a function of battery charge and operating temperature as well as certain charge and discharge currents.

Extracting Model Parameters
The model can accurately represent the behavior of many types of batteries, provided the parameters are well defined. The main advantage of this battery model is that it is easy to draw parameters from the manufacturer's discharge curve. Figure 5 shows the computed discharge curve typically for (Type Li-ion battery: 288 Volt 120 Ampere-hours) and is an indicator of battery voltage versus elapsed time during discharging. The fixed current used to discharge the battery is 6 Amperes (0.4C), determined by the nominal amplitude of the battery divided by one hour [37].  The battery model has been validated by specifying battery parameters, to reproduce the behavior of the LiFePO4 (3.2 V/20 Ah) battery, a real commercially available device (Li-ion battery commercial datasheet available at "https://www.ev-power.eu" accessed on 4 January 2020). Through the manufacturer's data sheet and model output characteristics, represented by the discharge curve plot. The controlled voltage source is described by the main equations for the general battery model for a Li-ion battery as: Charging phase: Discharging phase: where V c is the fixed battery voltage (V), K is the polarization voltage (V), Q is the maximum battery capacity (Ah), i t is the extracted capacity (Ah), A is the exponential area capacity (V) and B is the exponential area time constant inverse (Ah) −1 .

Sizing Battery Pack
The battery pack sizing method depends on a predetermined minimum for all-electric range and power required by the electric motor to drive the car from initial acceleration to a fixed speed. Meantime, battery-pack operational variables such as voltage, maximum charging, discharging current, and power are related to chemistry within individual cells. The cells are connected in series and/or parallel configurations to provide the required voltage, power, and energy. The main parameters involved in battery sizing include:

Battery Pack Power
If the car is a battery-powered electric vehicle, all of the power sources comes from the electric motor and the battery, battery power can be obtained by: where P batt is the maximum battery power in kW, P w is the wheel power, and η motor is the efficiency of the electric motor.

Specific Battery Energy (SE batt )
The amount of energy per unit of the battery mass is called the specific energy of the battery. This parameter is a condensed property of the battery system and is expressed in watt-hours per kilogram (Wh/kg). The actual energy that can be extracted from the battery system depends on several factors such as temperature and discharging rate. As a general expression, the battery's specific energy is: where E dis is the discharging energy, and M batt is the total battery mass. Since the discharging energy varies with the battery discharging rate, the specific battery energy also varies accordingly. The specific power of the battery system is the parameter that specifies the amount of energy that can be obtained per unit mass, expressed in watts per kilogram (W/kg), and is determined by: where P dis is the discharging power, and M batt is the total battery mass. This parameter also works as an approximation to the available power level of the battery system.

Battery Pack Capacity
The battery system can measure the amount of free charging produced by the active substance in the cathode and consumed by the anode. The battery capacity is calculated by the intrinsic properties of the battery cell design.
where C batt is the maximum battery capacity in kWh, and R P/E is the ratio of the specified power (kW) to the specified energy (kWh) of the battery.

Maximum Battery Pack Storage
The maximum battery storage is determined by the car's entire electric range and the electrical consumption in the electrical model (Equation (13)). For BEV, the charge exhausting mode corresponds to the entire electric range.
where E batt is the maximum battery energy storage in kWh, R electric is the fully electric range of the vehicle in km, and Celectric is the electric consumption during the fully electric operating in Wh/km. The denominator constant of 0.8 in the equation depends on the design of the state of charge (SOC%) control logic of 20% used for most battery systems [38,39].

Efficient Battery Power
Battery energy efficiency is defined as the percentage of electrical energy that is connected by a battery from a particular charge state to the energy required to return the battery to the same charge condition. Although battery efficiency is not a clear parameter for measuring battery performance, it is effective as a comparative measure of different power and energy management strategies. If using the battery management system operates the battery by reducing high energy quick discharges, the battery efficiency is expected to increase compared to the battery operation without a management system. In the case of a pure electric vehicle, a comparison should be made based on the battery charger profile itself. The battery discharging energy (E dis ) can be expressed as a function in the discharging time t f , open-circuit voltage V oc , the internal resistance R i and the current constant discharging I d as: Charge the battery for the same discharging period t f , the same as the magnitude of charging current, as the discharging current gives the charging energy (E chg ) as: Therefore, the battery efficiency expressed as a function of the current battery can be indicated as:

Battery Cell Numbers
Battery cells must be placed in series and parallel to meet voltage and power needs. Particularly, strings rank in a series can lead to increased voltage and resistance while strings rank in parallel can lead to increased energy capacity.
where V cell and V pack are the battery cell voltages and pack, E cell and E pack are the battery cell energy capacity and pack, N series is the number of series cells, and N parallel is the number of parallel cells. The studied 288 V/120 Ah battery bank is composed of six-packs in parallel, and every pack is made up of 6 × 48 V/20 Ah modules in series. The specifications are listed in Table 4. Table 4. Technical data of battery system parameters.

Specifications Symbol Value Unit
Type of cells and 3C are the stability rates during high current discharge, determined by the high discharge current (Ah) divided by the battery's nominal capacity (Ah). * DOD is the depth of discharge.

Monitoring and Estimating the Battery SOC
The state of charge (SOC) indicates the remaining battery capacity. SOC units are percentage points (0% = empty, 100% = full). SOC is usually used when discussing the current state of the used battery. SOC rating can help determine thresholds for each battery operating mode (i.e., charge or discharge) and overcharge and over-discharge can also be avoided. SOC is expressed as: The state of discharge (SOD) is defined as the charge gauge derived from the battery, as: The depth of discharge (DOD) is the inverse of SOC (100% = empty, 0% = full), one on SOC. DOD is often seen when discussing battery life after repeated use.
The state of health (SOH) is the battery status today compared to its ideal state. The SOH units are percentage points (100% = new battery). By detecting SOH, the battery life and health status can be estimated and the percentage of battery life can be used to determine whether or not it will be replaced.

Energy Management Strategy
The EMS is responsible for distributing energy between multiple energy systems in light of the vehicle's continuous energy requirements, as shown in Figure 6. Then the EMS task is to implement decision-making rules and restrictions for generating this energy distribution and recovery orders or actions. All simulations started with the battery charged to 95% of its energy capacity, as a margin of a few percent is typically used in BEVs to prolong the battery lifetime. Figure 7 demonstrates the energy management strategy in the Simulink model.
The state of health (SOH) is the battery status today compared to its ideal state. The SOH units are percentage points (100% = new battery). By detecting SOH, the battery life and health status can be estimated and the percentage of battery life can be used to determine whether or not it will be replaced.

Energy Management Strategy
The EMS is responsible for distributing energy between multiple energy systems in light of the vehicle's continuous energy requirements, as shown in Figure 6. Then the EMS task is to implement decision-making rules and restrictions for generating this energy distribution and recovery orders or actions. All simulations started with the battery charged to 95% of its energy capacity, as a margin of a few percent is typically used in BEVs to prolong the battery lifetime. Figure 7 demonstrates the energy management strategy in the Simulink model.  The energy management strategy (EMS) corrects DC bus load disturbances in a low time horizon. Indeed, the horizon period is the EMS decision era, and it is time-limited to generate reference power paths. Figure 8 shows battery power limits (Pbatt max, Pbatt min) and power rate limits (dPb/dt) as a function of battery charge status. In graphs (a) and (b), the battery discharging power limit and battery charging limit, respectively, (∆EMS) represent the charging and discharging power limits during a specified period of EMS decisions. Consequently, the inclusion of these restrictions in the definition of EMS allows control of step-change for both charging and discharging levels.

Battery Management System
The old battery management systems (BMS) do not include a power control unit. Advanced battery technologies such as lithium-ion require a power control unit to ensure the safety and longterm performance of the battery pack. The suggested power control unit also controls battery recharging by forwarding recovered energy (i.e., regenerative braking) to the battery pack as shown in Figure 7. The suggested power control unit will also work on: 1. Fully protect the battery from damage. 2 Monitor cells, units, and packages to ensure that they operate within the appropriate range and avoid faulty operation such as short circuits, overvoltage, overcharging, over-discharging, and overheating of particular importance to Li-ion cells. The energy management strategy (EMS) corrects DC bus load disturbances in a low time horizon. Indeed, the horizon period is the EMS decision era, and it is time-limited to generate reference power paths. Figure 8 shows battery power limits (P batt max, P batt min) and power rate limits (dP b /d t ) as a function of battery charge status. In graphs (a) and (b), the battery discharging power limit and battery charging limit, respectively, (∆EMS) represent the charging and discharging power limits during a specified period of EMS decisions. Consequently, the inclusion of these restrictions in the definition of EMS allows control of step-change for both charging and discharging levels. The energy management strategy (EMS) corrects DC bus load disturbances in a low time horizon. Indeed, the horizon period is the EMS decision era, and it is time-limited to generate reference power paths. Figure 8 shows battery power limits (Pbatt max, Pbatt min) and power rate limits (dPb/dt) as a function of battery charge status. In graphs (a) and (b), the battery discharging power limit and battery charging limit, respectively, (∆EMS) represent the charging and discharging power limits during a specified period of EMS decisions. Consequently, the inclusion of these restrictions in the definition of EMS allows control of step-change for both charging and discharging levels.

Battery Management System
The old battery management systems (BMS) do not include a power control unit. Advanced battery technologies such as lithium-ion require a power control unit to ensure the safety and longterm performance of the battery pack. The suggested power control unit also controls battery recharging by forwarding recovered energy (i.e., regenerative braking) to the battery pack as shown in Figure 7. The suggested power control unit will also work on: 1. Fully protect the battery from damage. 2 Monitor cells, units, and packages to ensure that they operate within the appropriate range and avoid faulty operation such as short circuits, overvoltage, overcharging, over-discharging, and overheating of particular importance to Li-ion cells.

Battery Management System
The old battery management systems (BMS) do not include a power control unit. Advanced battery technologies such as lithium-ion require a power control unit to ensure the safety and long-term performance of the battery pack. The suggested power control unit also controls battery recharging by forwarding recovered energy (i.e., regenerative braking) to the battery pack as shown in Figure 7. The suggested power control unit will also work on:

1.
Fully protect the battery from damage.

2.
Monitor cells, units, and packages to ensure that they operate within the appropriate range and avoid faulty operation such as short circuits, overvoltage, overcharging, over-discharging, and overheating of particular importance to Li-ion cells.

3.
Ensure safe operation and extend battery life for as long as possible.

4.
Communicate with the supervisor of the vehicle and meet all the requirements for operating the vehicle.

5.
Balance cell groups during dynamic charging and discharging to ensure that the entire battery system provides optimum performance.

Power Control Unit Suggested
The main function of the suggested power control unit is to connect and disconnect the battery from the load or the charger. It also measures the current and voltage of the battery pack and limits the flowing current in [40]. Figure 9 shows a schematic diagram of the suggested power control unit. The power control unit model relies on the battery pack specifications that monitor its status, calculating secondary data, report that data, control its environment, authenticate, and balance it. 3. Ensure safe operation and extend battery life for as long as possible. 4. Communicate with the supervisor of the vehicle and meet all the requirements for operating the vehicle. 5. Balance cell groups during dynamic charging and discharging to ensure that the entire battery system provides optimum performance.

Power Control Unit Suggested
The main function of the suggested power control unit is to connect and disconnect the battery from the load or the charger. It also measures the current and voltage of the battery pack and limits the flowing current in [40]. Figure 9 shows a schematic diagram of the suggested power control unit. The power control unit model relies on the battery pack specifications that monitor its status, calculating secondary data, report that data, control its environment, authenticate, and balance it. For lithium-ion batteries are the main energy storage units for BEVs, these batteries must be able to handle random charges due to regenerative braking. The regenerative braking force can reach a 10 kW level. Safety limits must be applied to ensure the optimal and safe operation of the battery pack. The constant-current constant-voltage (CCCV) charge technique is the charge profile recommended by most manufacturers of lithium-ion batteries [41]. Figure 10 shows the charge profile for a single Li-ion battery cell. The three most common stages are charge, discharge, and standby. These stages can also be summarizing below. In Stage 1: (Charging Mode), this mode works when the EMS orders the battery to be charged. This mode can include a power level, in which case the charge current is controlled to deliver the required power. Also, a different charging strategy is determined depending on the SOC of the batteries. Figure 10 shows a diagram of the three battery charging strategies as follows: For lithium-ion batteries are the main energy storage units for BEVs, these batteries must be able to handle random charges due to regenerative braking. The regenerative braking force can reach a 10 kW level. Safety limits must be applied to ensure the optimal and safe operation of the battery pack. The constant-current constant-voltage (CCCV) charge technique is the charge profile recommended by most manufacturers of lithium-ion batteries [41]. Figure 10 shows the charge profile for a single Li-ion battery cell. The three most common stages are charge, discharge, and standby. These stages can also be summarizing below. 3. Ensure safe operation and extend battery life for as long as possible. 4. Communicate with the supervisor of the vehicle and meet all the requirements for operating the vehicle. 5. Balance cell groups during dynamic charging and discharging to ensure that the entire battery system provides optimum performance.

Power Control Unit Suggested
The main function of the suggested power control unit is to connect and disconnect the battery from the load or the charger. It also measures the current and voltage of the battery pack and limits the flowing current in [40]. Figure 9 shows a schematic diagram of the suggested power control unit. The power control unit model relies on the battery pack specifications that monitor its status, calculating secondary data, report that data, control its environment, authenticate, and balance it. For lithium-ion batteries are the main energy storage units for BEVs, these batteries must be able to handle random charges due to regenerative braking. The regenerative braking force can reach a 10 kW level. Safety limits must be applied to ensure the optimal and safe operation of the battery pack. The constant-current constant-voltage (CCCV) charge technique is the charge profile recommended by most manufacturers of lithium-ion batteries [41]. Figure 10 shows the charge profile for a single Li-ion battery cell. The three most common stages are charge, discharge, and standby. These stages can also be summarizing below. In Stage 1: (Charging Mode), this mode works when the EMS orders the battery to be charged. This mode can include a power level, in which case the charge current is controlled to deliver the required power. Also, a different charging strategy is determined depending on the SOC of the batteries. Figure 10 shows a diagram of the three battery charging strategies as follows: In Stage 1: (Charging Mode), this mode works when the EMS orders the battery to be charged. This mode can include a power level, in which case the charge current is controlled to deliver the required power. Also, a different charging strategy is determined depending on the SOC of the batteries. Figure 10 shows a diagram of the three battery charging strategies as follows: (1) Bulk charging mode or CC charge (current control)-used for fast charging when the SOC is low, where the charger current is kept at a steady rate, and the battery voltage is enabled to grow accordingly during recharging. (2) Absorption charging mode or CV charge (voltage control)-used to prevent battery overcharging when the SOC is higher than a certain level. (3) Float charging mode (voltage control)-used when the battery is close to full charge and maintains the full charge state of the battery.
In Stage 2: (Discharging Mode), this mode works when EMS orders the power storage device (batteries) to discharge. In this mode, the discharge current is controlled to deliver the required power. There are two factors that EMS should consider: (a) the energy capacity of an electrochemical battery decreases at a higher discharging current [42,43]; and (b) a minimal SOC is often required during discharge to increase the life of the cycle [44,45].
In stage 3: (Standby Mode), the system usually enters into standby mode when charging ends when the maximum SOC is reached. In this mode, the battery pack is still attached to the system but is not significantly charged or discharged. For the electrochemical battery, float charging can be used to compensate for the self-discharging [46][47][48][49][50][51].

Suggested Fuzzy Logic Controller
Fuzzy logic control is used as a strategy implementation tool, Figure 9. First, the input variables and output variables of the FLC have to be defined, then a set of fuzzy rules suitable for the control strategy can be created. The main objective of BMS control is to improve the battery operating point and electric motor through efficient operation, reliability, and high power quality of the power train. This is done by controlling charging and discharging limits utilize FLC. Thus the electric motor operation should be adjusted according to the battery charging state (SOC) and current road load. As shown in Figure 9, the input variables for the power control unit are the SOC of the battery, voltage state, and current at the node to which it is connected. If the SOC battery charge state is low that is (less than 20%) and the node voltage is high, the EV battery will be charged, but if the SOC battery charge state is high that is (greater than 80%) and the node voltage is lower, the EV will be discharged. Also, there are several different conditions where both the SOC and the node voltage can be low or both are high. In these situations, specified charging and discharging rates are employed. Thus, to keep node voltage changes within standard rates, FLC should be adjusted to monitor such other conditions also. Figure 11 provides a schematic diagram of an FLC. (1) Bulk charging mode or CC charge (current control)-used for fast charging when the SOC is low, where the charger current is kept at a steady rate, and the battery voltage is enabled to grow accordingly during recharging. (2) Absorption charging mode or CV charge (voltage control)-used to prevent battery overcharging when the SOC is higher than a certain level. (3) Float charging mode (voltage control)-used when the battery is close to full charge and maintains the full charge state of the battery.
In Stage 2: (Discharging Mode), this mode works when EMS orders the power storage device (batteries) to discharge. In this mode, the discharge current is controlled to deliver the required power. There are two factors that EMS should consider: (a) the energy capacity of an electrochemical battery decreases at a higher discharging current [42,43]; and (b) a minimal SOC is often required during discharge to increase the life of the cycle [44,45].
In stage 3: (Standby Mode), the system usually enters into standby mode when charging ends when the maximum SOC is reached. In this mode, the battery pack is still attached to the system but is not significantly charged or discharged. For the electrochemical battery, float charging can be used to compensate for the self-discharging [46][47][48][49][50][51].

Suggested Fuzzy Logic Controller
Fuzzy logic control is used as a strategy implementation tool, Figure 9. First, the input variables and output variables of the FLC have to be defined, then a set of fuzzy rules suitable for the control strategy can be created. The main objective of BMS control is to improve the battery operating point and electric motor through efficient operation, reliability, and high power quality of the power train. This is done by controlling charging and discharging limits utilize FLC. Thus the electric motor operation should be adjusted according to the battery charging state (SOC) and current road load. As shown in Figure 9, the input variables for the power control unit are the SOC of the battery, voltage state, and current at the node to which it is connected. If the SOC battery charge state is low that is (less than 20%) and the node voltage is high, the EV battery will be charged, but if the SOC battery charge state is high that is (greater than 80%) and the node voltage is lower, the EV will be discharged. Also, there are several different conditions where both the SOC and the node voltage can be low or both are high. In these situations, specified charging and discharging rates are employed. Thus, to keep node voltage changes within standard rates, FLC should be adjusted to monitor such other conditions also. Figure 11 provides a schematic diagram of an FLC. Second, the functions of the individual membership and the fuzzy sets of FLC are determined based on the fuzzy expert knowledge system to more accurately reflect the status of the input and output variables. Each membership function consists of some fuzzy sets. A fuzzy set is a set of values related to fuzzy input. Each element of the fuzzy set contains real values that range in varying degrees between 0 and 100%, as shown in Figure 11, known to be the degree of their membership within the set. Also, the symmetric triangle function was chosen because it provides good results and has better Second, the functions of the individual membership and the fuzzy sets of FLC are determined based on the fuzzy expert knowledge system to more accurately reflect the status of the input and output variables. Each membership function consists of some fuzzy sets. A fuzzy set is a set of values related to fuzzy input. Each element of the fuzzy set contains real values that range in varying degrees between 0 and 100%, as shown in Figure 11, known to be the degree of their membership within the set. Also, the symmetric triangle function was chosen because it provides good results and has better transition performance and calculations using these simpler shapes. E.g., affording to a battery expert, the battery state SOC membership function is divided into three levels, high SOC (>80%), medium SOC (40-80%), and low SOC (<40%), each value represents a fuzzy set. Figure 12 below shows the battery SOC% membership function.
Sustainability 2020, 12, x FOR PEER REVIEW 15 of 26 transition performance and calculations using these simpler shapes. E.g., affording to a battery expert, the battery state SOC membership function is divided into three levels, high SOC (>80%), medium SOC (40-80%), and low SOC (<40%), each value represents a fuzzy set. Figure 12 below shows the battery SOC% membership function.

Adaptive Neural Fuzzy Inference System
FLC relies fundamentally on the fuzzy expert knowledge system based on the description included in Section 3.4, and thus it cannot achieve satisfying efficiency permanently. So ANFIS theory will be used to improve membership functions and FLC rules after training ANFIS with actual driving cycle data for better efficiency [44,45]. This paper aims to save energy by a specific path. Figure 13 illustrates the adaptive neural fuzzy inference system (ANFIS) consisting of two inputs in a general form of common rules and one output. The method of adjusting the fuzzy logic control within ANFIS has five layers as shown in Figure 13. Simulating ANFIS requires five main steps, as follows: (1) Obtaining training data of different driving cycles, each driving cycle is characterized by different road modes, and partial samples of NEDC and UDDS driving cycles are selected in the simulation of ANFIS training to achieve the improved FLC. In simulations, points 0-100, 500-600, 1000-1100 of the different driving cycles are determined as samples.

Adaptive Neural Fuzzy Inference System
FLC relies fundamentally on the fuzzy expert knowledge system based on the description included in Section 3.4, and thus it cannot achieve satisfying efficiency permanently. So ANFIS theory will be used to improve membership functions and FLC rules after training ANFIS with actual driving cycle data for better efficiency [44,45]. This paper aims to save energy by a specific path. Figure 13 illustrates the adaptive neural fuzzy inference system (ANFIS) consisting of two inputs in a general form of common rules and one output. The method of adjusting the fuzzy logic control within ANFIS has five layers as shown in Figure 13. where x1 and x2 as status input variables and Yi representing the output variable, Ai are the input membership functions, Ψi are the rules firing strengths, as follows: Figure 13. The architecture of the ANFIS system. Simulating ANFIS requires five main steps, as follows: (1) Obtaining training data of different driving cycles, each driving cycle is characterized by different road modes, and partial samples of NEDC and UDDS driving cycles are selected in the simulation of ANFIS training to achieve the improved FLC. In simulations, points 0-100, 500-600, 1000-1100 of the different driving cycles are determined as samples. where x 1 and x 2 as status input variables and Y i representing the output variable, A i are the input membership functions, Ψ i are the rules firing strengths, as follows: Using (P batt max) as the output function's fuzzy inference system, the rule instance for creating a fuzzy base rule as: FIS → IF speed is fast AND battery SOC is high THEN P batt max = P batt max (23) By recursive calculation of each rule, the fuzzy logical output variable P batt is evaluated as the maximum output, where Aij is the combined membership function which is evaluated as:

Results and Discussion
The battery-powered electric vehicle model is shown in Figure 6 by applying the detailed mathematical models of the system described earlier in the MATLAB/Simulink ® environment. Simulation results are obtained based on typical driving cycles. Different driving patterns and situations have been chosen to assess the performance of the proposed EMS to define typical driving patterns on different types of roads. In this paper, two different driving cycles were simulated: NEDC and UDDS. Figure 14 shows simulated car results for 20 s (a) car speed, (b) battery power, (c) battery voltage, (d) battery current, and (e) battery charge status (%), respectively. The electric car starts to operate from the stop position at the time (t = 0), and the car is suddenly pushed to 70% of the vehicle's acceleration. After about (t = 0.8 s), the power required for the car reaches about 10 kW. The brakes are pushed to 70% at the time (t = 8 s), which causes the electric motor to convert the brake energy using the regenerative braking method, the energy is stored again in the battery and charged for (t = 8 s). After that the accelerator is suddenly pushed back to 70% at the time (t = 16 s), thus it is observed that the battery power and current decrease are slowly until the battery reaches the value of the initial charge state. Sustainability 2020, 12, x FOR PEER REVIEW 17 of 26 The simulation results performed under the accelerated braking cycle revealed in Figure 14, Reveal that FLC gives a 35% increase in the fundamental output with improved quality (i.e., less THD compared to PI) and that the resulting THD was 1.564% for PI, versus 0.552% for FLC. FLC results also showed good and high performance in time domain response, and the effect of rapid perturbations rejection on the system compared to the charts in the literature. Thus, the core loss of PMSM greatly reduces, thus improving the efficiency of the drive system.
The results obtained are tabulated as a comparative performance in light of the settling time and peak overshoot, as shown in Table 5. The outputs of the conventional proportional integrated control (PI) system have a very high overshoot and settling time. The enhanced fuzzy logic controller (FLC) has a better settling time and lower overshoot. The simulation results performed under the accelerated braking cycle revealed in Figure 14, Reveal that FLC gives a 35% increase in the fundamental output with improved quality (i.e., less THD compared to PI) and that the resulting THD was 1.564% for PI, versus 0.552% for FLC. FLC results also showed good and high performance in time domain response, and the effect of rapid perturbations rejection on the system compared to the charts in the literature. Thus, the core loss of PMSM greatly reduces, thus improving the efficiency of the drive system.
The results obtained are tabulated as a comparative performance in light of the settling time and peak overshoot, as shown in Table 5. The outputs of the conventional proportional integrated control (PI) system have a very high overshoot and settling time. The enhanced fuzzy logic controller (FLC) has a better settling time and lower overshoot.

Description of Driving Cycle NEDC
The driving cycle is a series of points representing the car's speed against time, to calculate the car's efficiency (Energy Saving). The New European Driving Cycle (NEDC) consists of four ECE-15 repeated driving cycles and an (Extra-Urban Driving Cycle) or EUDC to simulate highway driving in a vehicle. NEDC driving cycle operates at a distance of 11 km per hour approximately in 1180 s and has an average speed of 33.6 km per hour, as shown in Table 6. During this cycle, the SOC of the battery pack almost decreased to 50% from 70% of the initial SOC. The frequent start and stop characteristics of city driving were more suitable for energy recovery using regenerative braking. Simulation results show that the car was able to meet the driver's requirements, as it can be seen that the demand and actual speeds of the car were identical. Figures 15-17 show graphs of the demanded and actual speeds of the NEDC driving cycle simulator, along with the plots of the motor, and the battery. The entrance to the simulation will be the repeated NEDC 15 times as this should provide a drive distance of 165 km which should be acceptable.

Description of Driving Cycle NEDC
The driving cycle is a series of points representing the car's speed against time, to calculate the car's efficiency (Energy Saving). The New European Driving Cycle (NEDC) consists of four ECE-15 repeated driving cycles and an (Extra-Urban Driving Cycle) or EUDC to simulate highway driving in a vehicle. NEDC driving cycle operates at a distance of 11 km per hour approximately in 1180 s and has an average speed of 33.6 km per hour, as shown in Table 6. During this cycle, the SOC of the battery pack almost decreased to 50% from 70% of the initial SOC. The frequent start and stop characteristics of city driving were more suitable for energy recovery using regenerative braking. Simulation results show that the car was able to meet the driver's requirements, as it can be seen that the demand and actual speeds of the car were identical. Figures 15-17 show graphs of the demanded and actual speeds of the NEDC driving cycle simulator, along with the plots of the motor, and the battery. The entrance to the simulation will be the repeated NEDC 15 times as this should provide a drive distance of 165 km which should be acceptable. Average acceleration (m/s 2 ) 0.528 Average deceleration (m/s 2 ) −0.719 Figure 15. NEDC driving cycle. The NEDC drive cycle will be repeated 15 times thus act as a MATLAB/Simulink simulation entry profile.

Description of Driving Cycle UDDS
The Urban Dynamometer Driving Schedule (UDDS) driving cycle aims to simulate city driving conditions that are used to test light vehicles. UDDS driving cycle operates at a distance of 12 km per hour approximately 1369 s and has an average speed of 31.6 km per hour, as shown in Table 7. During this cycle, the SOC of the battery pack almost decreased to 45% from 70% of the initial SOC. Simulation results show that the car was able to meet the driver's requirements, as it can be seen that the demand and actual speeds of the car were identical. Figures 18-20 show graphs of the demanded and actual speeds of the UDDS driving cycle simulator, along with the plots of the motor, and the

Description of Driving Cycle UDDS
The Urban Dynamometer Driving Schedule (UDDS) driving cycle aims to simulate city driving conditions that are used to test light vehicles. UDDS driving cycle operates at a distance of 12 km per hour approximately 1369 s and has an average speed of 31.6 km per hour, as shown in Table 7. During this cycle, the SOC of the battery pack almost decreased to 45% from 70% of the initial SOC. Simulation results show that the car was able to meet the driver's requirements, as it can be seen that the demand and actual speeds of the car were identical. Figures 18-20 show graphs of the demanded and actual speeds of the UDDS driving cycle simulator, along with the plots of the motor, and the

Description of Driving Cycle UDDS
The Urban Dynamometer Driving Schedule (UDDS) driving cycle aims to simulate city driving conditions that are used to test light vehicles. UDDS driving cycle operates at a distance of 12 km per hour approximately 1369 s and has an average speed of 31.6 km per hour, as shown in Table 7. During this cycle, the SOC of the battery pack almost decreased to 45% from 70% of the initial SOC. Simulation results show that the car was able to meet the driver's requirements, as it can be seen that the demand and actual speeds of the car were identical. Figures 18-20 show graphs of the demanded and actual speeds of the UDDS driving cycle simulator, along with the plots of the motor, and the battery. The entrance to the simulation will be the repeated UDDS 15 times as this should provide a drive distance of 180 km which should be acceptable. battery. The entrance to the simulation will be the repeated UDDS 15 times as this should provide a drive distance of 180 km which should be acceptable.     battery. The entrance to the simulation will be the repeated UDDS 15 times as this should provide a drive distance of 180 km which should be acceptable.    A reduction in traction energy demand can be observed when moving from NEDC to UDDS, while brake energy increases by 21.8% as shown in Figure 21, which shows more opportunities to exploit regenerative braking. A reduction in traction energy demand can be observed when moving from NEDC to UDDS, while brake energy increases by 21.8% as shown in Figure 21, which shows more opportunities to exploit regenerative braking. A reduction in traction energy demand can be observed when moving from NEDC to UDDS, while brake energy increases by 21.8% as shown in Figure 21, which shows more opportunities to exploit regenerative braking.

Conclusions
In this research, an energy management strategy was conducted for electric vehicles in MATLAB/SIMULINK environment. The electric car battery is chosen in a way that meets the power and energy requirements of a specific driving cycle. The loss of every component in the car depends on the interior conditions of the car, such as voltages, currents, speed, torque, and charge/discharge status. The battery good fuzzy logic control is set up and is the basis for the power management controller in the same battery management system. The results show that EMS tested vehicle strategies can achieve, in nearer-reality test conditions such as those for NEDC, higher efficiency levels than those currently evaluated in UDDS. This model also helps to develop the PMS system, which controls all adapters in addition to the PMSM motor, so that it does not exceed the maximum battery power. Finally, it is possible to precisely control the charge and discharge of the battery.

Conclusions
In this research, an energy management strategy was conducted for electric vehicles in MATLAB/SIMULINK environment. The electric car battery is chosen in a way that meets the power and energy requirements of a specific driving cycle. The loss of every component in the car depends on the interior conditions of the car, such as voltages, currents, speed, torque, and charge/discharge status. The battery good fuzzy logic control is set up and is the basis for the power management controller in the same battery management system. The results show that EMS tested vehicle strategies can achieve, in nearer-reality test conditions such as those for NEDC, higher efficiency levels than those currently evaluated in UDDS. This model also helps to develop the PMS system, which controls all adapters in addition to the PMSM motor, so that it does not exceed the maximum battery power. Finally, it is possible to precisely control the charge and discharge of the battery.
The driver can choose the operating mode (energy-saving) using the graphical user interface or device selector. Moreover, the benefits of the proposed EMS and its control strategy can be summarized as follows:

1.
Simulation results showed better performance of the proposed adaptive FLC over conventional PI control.

2.
Adaptive FLC introduced an effective solution to correctly EMS. 3.
Using adaptive FLC, much better results can be achieved due to lower harmonic current and thus torque ripple less than conventional PI.

4.
Several tests were performed using simulations to analyze harmonic components for speed. All THD values are less than 5%, which is acceptable harmonic distortion according to the IEEE standard.

5.
Finally, adaptive FLC offers very good speed control performance. Wind speed (m/s) w Wheel speed (rad/s) w e l The electrical angular speed (rad/s) w r The rotor angular speed (rad/s) α Road inclination angle (rad/s) ρ Air density (kg/m 3 ) Ψ d , Ψ q Flux linkage in the d-and q-axis Ψ m Flux linkage related to the permanent magnet