Fuzzy Logic-Based Duty Cycle Controller for the Energy Management System of Hybrid Electric Vehicles with Hybrid Energy Storage System

: Due to increasing fuel prices, the world is moving towards the use of hybrid electric vehicles (HEVs) because they are environmentally friendly, require less maintenance, and are a green technology. The energy management system (EMS) plays an important role in HEVs for the efﬁcient storage of energy and control of the power ﬂow mechanism. This paper deals with the design, modeling, and result-oriented approach for the development of EMS for HEVs using a fuzzy logic controller (FLC). Batteries and supercapacitors (SCs) are used as primary and secondary energy storage systems (ESSs), respectively. EMS consists of the ultra-power transfer algorithm (UPTA) and FLC techniques, which are used to control the power ﬂow. The UPTA technique is used to charge the battery with the help of a single-ended primary inductor converter (SEPIC) during regenerative braking mode. The proposed research examines and compares the performance of FLC with a proportional integral (PI) controller by using MATLAB (Simulink) software. Three scenarios are built to conﬁrm the efﬁciency of the proposed design. The simulation results show that the proposed design with FLC has a better response as its rise time (2.6 m) and settling time (1.47 µ s) are superior to the PI controller.


Background and Motivation
Nowadays, the cost and demand for fuel are increasing and this also plays an important role in global warming. Therefore, there is a need for an alternative form of energy that has less cost and is more reliable and efficient. The temperature of the world is increasing due to pollution and the emission of hazardous gases. As a result, the world is moving towards the use of a clean form of energy. Electric vehicles (EVs) are environmentally friendly, have lower fuel consumption, are pollutant-free and are a clean urban transport technology. Electric vehicles are of many types, including hybrid electric vehicles (HEVs), fuel cell electric vehicles (FEVs), battery electric vehicles (BEVs), and battery-ultra-capacitor hybrid electric vehicles (BUHEVs) [1,2]. The energy flow between sources and the load is the main issue of energy losses. These losses can be reduced by using efficient energy management techniques.

Literature Review
The researchers provide a solution to distribute power from the battery supercapacitor (SC) to the load using the composite power supply. As a result, the current spikes are reduced on the battery side [3]. Different types of converters and their pros and cons are discussed in [4]. The mostly rule-and optimization-based control strategy is used to implement energy management system (EMS) in HEV. A detailed comparison of the battery SC-based voltage compensator is given. The compensator was interfaced to the grid connected solar system to overcome the power quality issues [5]. EMS is proposed to distribute the power intelligently. To keep the direct current (DC) voltage constant, a fuzzy logic controller (FLC)-based low pass filter and adaptive proportional integral-based charge controller are used. It also prevents the SC from overcharging and increases battery health and performance [6]. An adaptive FLC-based supervisory EMS is proposed [7]. By using the parallel active topology, the battery's current variation is minimized. Moreover, the system's efficiency has been maximized and the DC link voltage matching problems have been solved. The choice of converter for HEVs and EVs is an important issue. Several types of converters such as unidirectional, bidirectional, four quadrant converters, etc. have already been discussed by researchers. Every topology has a specific and particular application and configuration. In [8][9][10][11][12], different types of converters with their application and disadvantage for EVs are discussed. As a result, the effects of converter losses are reduced. The bidirectional SEPIC converter of type-III can be used to transfer the energy in both directions. This can be done in buck-boost mode with non-inverted output voltage polarity and is cheaper than the conventional converter. The SEPIC converter in continuous conduction mode (CCM) combined with the internal model control (IMC) gives the fastest response. A new SEPIC-based high step-up DC-DC converter is used [13]. However, with a greater number of passive components, it becomes costly and produces losses. In [14], a SEPIC converter comparison was carried out between a coupled and uncoupled inductor in CCM, which gives some ripple current; it is efficient for the proportional integral derivative (PID) controller.
In [2], an inter-leaved bidirectional SEPIC converter in discontinuous conduction mode (DCM) was used to provide smooth current to charge the battery. As a result, the output voltage was regulated. However, due to continuous the charging and discharging of SC, minimal converter losses occurred. Fuel cells can also be used instead of internal combustion engines and batteries. In [15], proton exchange membrane fuel cells (PEMFCs) were combined with a lithium-ion battery with boost converters. In [16], a case study has been carried for the selection of batteries of EVs. The analysis shows that lithium-ion batteries would be best suited for EVs. This is due to their enhanced performance as compared to other types of batteries.
Different energy storage systems (ESS) such as batteries and SCs are used for HEVs and plug-in HEVs. Additionally, advanced charging schemes of the batteries have been depicted in [17,18]. In [19], several control strategies for HEVs and a detailed investigation on EMS for the conversion of the traditional vehicle into plug-in HEV have been carried out. For the efficient controlling of the motor, FLC is utilized so that the energy consumption of the battery can be reduced.
An excellent introduction to fuzzy control and its vast applications to industrial applications is presented in [20]. A detailed explanation about the mathematics of fuzzy control and fuzzy relations is given. Moreover, representation of a set of fuzzy rules, non-linear fuzzy control, adaptive fuzzy control, and more are given. Chao Gao and Jian, et al. [21] worked on the improvement of battery health and battery discharge current. The gold ratio cut-off technique was utilized to optimize the membership function of the FLC for HEV. Several fuzzy theories, such as fuzzy classification, fuzzy diagnosis, and their applications, are represented in [22]. Several applications related to fuzzy control are carried out at Siemens in Germany. Examples of these classifications, such as optimization theory, fuzzy data analysis, and fuzzy expert systems, etc., are also explained. Different optimization techniques for fuzzy controllers such as generic algorithms (GA) and Rosenbrok's algo-rithms are also presented. Moreover, the multilevel qualitative optimization of fuzzy controllers is explained in detail [23].
Hajer Marzougui et al. [24] used FLC for the rule-based algorithm. A flatness control was used for the fuel cells or ultra-capacitor. A rule-based algorithm was utilized to distribute the power requirements between the sources and load in HEVs, ignoring converter losses. This EMS is flexible and does not require any of the vehicle's trajectory in advance, but its cost is high. In [25], the battery's current variation was minimized and the power flow from the SC was managed using Karush-Kuhn-Tucker (KKT) conditions. A detailed investigation was carried out on several control algorithms. Among them, rule-based control algorithms and optimization-based control algorithms are the most significant for EMS of HEVs. By utilizing the SC and battery as ESSs, the energy demand of the motor has been supplied with a fuzzy logic controlled EMS [26]. In [27], a comparison of different techniques has been carried out. Among them, for braking control mechanisms, various EMSs are significant. A combination of battery and SC with the use of a bidirectional converter related to fuel-cell HEVs are studied. However, it resulted in a complex and expensive system. It was also justified by the author that the SC is the best source of capturing braking energy. This is due to its high power density. Some researchers [28] used two ESS and Pontryagin's minimum principle (PMP) in their research to fulfill the requisite energy demand for HEVs. The main purpose of using these strategies is to conserve the available electric power. As a result, the lifetime of the battery increases, so that the battery will provide power for a longer duration.
In [29], a through-the-road (Ttr) HEV scheme is presented by using FLC-based EMS. The purpose of FLC is to efficiently control the power flow mechanism; hence, the fuel economy can be improved. Comparison with other published articles has also been carried out. EMS in [30] plays a key role in improving the performance and energy efficiency of HEVs. So, most of the researchers have carried out research in this field to provide better and more efficient EMSs. A comprehensive comparison of such EMS techniques is discussed both qualitatively and quantitatively based on the bibliometric technique. These techniques validate the use of fuzzy logic-based EMSs for HEVs. It also shows that a fuzzy logic-based EMS gives a robust result and is best suited for the commercial manufacturing of HEVs.
Zhou Shengzhe et al. [31] also worked on increasing the stability and efficiency of a hybrid energy storage system (HESS). As a result, the problem faced in the short life span and poor range of ESS in EVs can be minimized. For this purpose, the unscented Kalman filtering (UKF) algorithm was used to evaluate the SOC and state of power (SOP). The proposed control strategy uses two FLCs-one for SOC estimation and the other for SOP estimation. The state of power (SOP) gives information about the battery peak power. This peak power can easily be found by using the SOC of a battery. On the basis of SOC and SOP, fuzzy logic rules are built. These rules provide the required continuous power to the motor and minimize the rapid discharge of the battery.
Kunqi Ma et al. [32] used the battery's SOC and torque required (Tr) as inputs, whereas engine torque (Te) was taken as the output of the FLC. This gives validation to using an FLC as an EMS. As a result, it reduces the fuel consumption of vehicles by between 4.5 and 13.3%. These results were deduced under the worldwide harmonized light vehicles test cycle (WLTC) and new European driving cycle (NEDC). These results can also be tested under different control strategies and various driving cycles. It validates and verifies the best fuel economy given by an FLC as compared to a traditional controller. Some researchers gave preferences in the use of permanent magnet synchronous motor (PMSM) in HEVs. Power distribution in these strategies is carried out by using a fuzzy logic-based power management strategy without the need for an extra controller. A back-stepping direct torque control technique (BS-DTC) [33] with the help of space vector modulation (SVM) was used. By using this technique, the torque and flux of the PMSM machine has been controlled. The regenerative braking mode of charging the SC was used to restore the power and voltage regulation. It also justifies the robustness and stability of power management strategy and removes the effect of chattering. However, the choice of the converter and its losses were ignored. The main component used and requirements for the fabrication of HEV are discussed. Types of motor, converter, control strategies, and energy storage devices were also discussed in detail. The low power and limited range of HEVs can be overcome by using a combination of different energy storage devices. Among them, battery packs with ultra-capacitors, fuel cell batteries, and ultra-capacitors, etc. can be used [34].
Rui Xiong et al. [35] discussed different topologies and arrangements of batteries. SC, with their pros and cons used for HEVs, are also discussed. The parallel combination of battery and SC always requires two converters capable of supplying constant voltage. These converters also limit the current and voltage charging the battery. Series combinations of ESSs require the balancing of power flow and minimize the converter losses. The overall system efficiency can greatly increase by using a UPTA system. This UPTA system can be combined with another control strategy to control the battery charge or discharge rate.
Following the research literature provided, the research work in [16,17] has few limitations. One of the major drawbacks is the decrease in battery life. The life of the battery is very much expected to decrease while braking and accelerating the EV. Batteries face huge stress during continuous charging and discharging. In [27], a detailed review of HEVs based on fuel cell/battery/SC has been presented; however, it has one drawback: that the overall system of EV becomes expensive due to the implementation of three different ESSs. Moreover, there is no method provided to minimize the current spikes on the battery side during braking and acceleration. To overcome these drawbacks and similar issues in the literature, an FLC-based EMS has been presented in this research for HEVs. To eliminate the cost constraint of the battery, SC was used as the secondary energy storage device which was being used to charge the battery regularly. A UPTA technique along with FLC was implemented to efficiently manage the power flow. In order to reduce the inrush current on the battery side during braking and acceleration, a SEPIC converter was designed. The feature of the SPEIC converter is to provide a constant current to the battery so that battery health and the life cycle can be improved.

Research Contribution and Objectives
In this paper, a fuzzy logic-based EMS for HEVs has been designed. A battery and SC were used as a primary and secondary energy source, respectively. The battery was connected to a unidirectional boost converter to provide power to a brushless direct current (BLDC) motor. The motor acted as the load and the SC was connected to the SEPIC converter to charge the battery. Moreover, it also provided extra power to the load during acceleration. For the charging of SC, regenerative braking has been utilized. A UPTA technique followed by an FLC is proposed to manage the power flow of the system.

Paper Organization
The remaining paper is organized in the following section: Section 2 describes the proposed system. Section 3 consists of component modeling of the proposed design. Section 4 comprises an energy management system based on FLC. The FLC and PI controller-based energy management systems are compared in Section 5. Results are discussed in Section 6. The conclusion of the study is presented in the last section (i.e., Section 7). Figure 1 shows the block diagram of the entire system. The system is modeled in Simulink/MATLAB environment with the help of mathematical equations. SC aids the charging of the battery pack during the driving mode. There is a different way of using energy storage devices in HEVs. Some researchers use series combination according to their design. A parallel combination of a fuel cell with a battery/SC was also proposed, but it increased the cost of vehicles. The parallel combination of a battery with SC is most abundant and preferred. Series combination of using these storage devices gives better efficiency but energy losses and the weight of the vehicle are increased [36]. SC is used as a battery backup and protects the battery from inrush current. SC has a high power density; low energy density can supply and absorb peak current, and can provide constant power. It can increase the vehicle's overall efficiency and the lifetime of batteries. It can handle the power output from a regenerative braking system. Due to these many advantages, an SC/battery HES for EVs is proposed and analyzed in this study. The overall block diagram of the proposed model is shown in Figure 1. Designing of an EMS comprises of FLC and ultra power transfer algorithm. The fuzzy rule-based method was employed in this system due to its robustness and adaptation application. A rule-based FLC is used to supervise and measure the motor speed and boost converter current. Then, the control output is delivered in the form of a duty cycle, which is fed into a boost converter, and then it is provided to the BLDC motor to meet the load requirement. The EMS controls the speed of the BLDC motor and power flow from SC to the battery pack. UPTA checks the SOC of SC and battery, then different logic gates can be used to decide for transferring energy from SC into the battery. The overall Simulink model that explains the whole process can be seen in Figure 2. In this figure, the battery and SC are the main ESSs that fulfill the energy demand. The block named "load" is the BLDC motor that is receiving the power from the battery via a boost converter. FLC is designed to generate pulse width modulation (PWM) pulses for the efficient control of the boost converter. The secondary ESS (SC) is being used to charge the battery and also provides power during acceleration mode when the power requirement is high. The main purpose of the SEPIC converter is to provide constant power to charge the battery, utilizing the energy of SC, while, for charging the SC, a regenerative braking scheme is being used. UPTA manages the power flow between the ESSs and the load.

Components Modeling of Proposed Design
A BLDC motor, also known as a synchronous DC motor, consists of a permanent magnet rotor while the stator is wound. BLDC motors are used in EVs and HEVs due to their long lifetime, high efficiency, and low maintenance. BLDC motors can deliver greater torque as compared to other motors. Different types of motor show various qualities that can be used in EVs with a particular control mechanism to operate the motor [37]. In [38], the researchers verify the advantage and use of a BLDC motor and three-phase induction motor for EVs due to extreme fidelity, productivity, efficiency, reliability, and average acceleration. It has a permanent magnet for excitation and high flux density, which is responsible for giving the high efficiency. It also has advanced power density, high productivity, and a small size, which is why it is used for HEVs and EVs [39].
In [40], the BLDC motor is used for HEV application for restoring the braking energy into the battery. In this paper, two types of mechanisms were discussed for obtaining the rotor position by using the Hall sensor and the zero cross detection method. Since the BLDC motor has no carbon brushes, there is no issue of sparking which gives the motor more durability and a long life. It has a long life and the power-to-weight ratio is also high. This motor gives torque ripples at commutation and uses trapezoidal back electromotive force (EMF). A comparison between the PID controller and FLC for the speed controlling of different motors has been studied [41]. Comparison of different types of motors [37,38] which are extensively used in EV application is shown in Table 1. The performance of the BLDC motor is also better than its other alternatives. The Hall sensor measures the angular speed and angular position. The angular position from the Hall sensor is used in the commutation logic circuit, which computes the switching pattern for the three-phase inverter. The following Equations (1)-(3) can be used for the calculation of three-phase terminal voltages of armature winding: where L is the armature self-inductance, V a , V b , V c are the three-phase terminal voltages, e a , e b , e c are the three-phase motor's back emf, R is the armature resistance, and i a , i b , i c are the three-phase motor's input current. The motor's back EMF three-phase voltages can be calculated by using Equations (4)- (6) respectively.
The relation between the electrical (θ e ) and mechanical rotor (θ m ) angle is shown in Equation (7), given below: where p represents the number of poles on the rotor, θ e is the electrical rotor angle, θ m is the mechanical rotor angle, and ω is the angular speed of the motor. The total electromagnetic torque (T e ) for modeling the BLDC motor can be calculated using Equation (8). The Simulink model of the BLDC motor is shown in Figure 3.
where, T e represents the total electromagnetic torque of the motor, e is the back EMF of the motor, and i is the input current of the motor. The input to the boost converter is a switching pattern that can be used for controlling the on and off state of the phase pairs of the BLDC motor. To rotate the BLDC motor, a stator winding should be energized in a proper sequence which is possible only if the exact position of the rotor is known. In MATLAB simulation, we assume that we know the angular rotor position as the rotor consist of a single-pole pair and the stator has three coils spaced 120 • apart. For this purpose, three Hall sensors are embedded on the stator, which works on the principle of the Hall effect. It works only when a current-carrying conductor experiences a magnetic field; the charge carriers experience an electrostatic force due to which voltage developed across the two side of the conductor. This induced electromotive force (EMF) is responsible for determining the direction of the north and south poles. When the rotor of the BLDC motor faces the magnetic poles that pass near the Hall sensor it gives the low and high signal, which indicates the north (N) or south (S) poles are aligned with the sensor. There are six possible combinations of energizing the coil pairs, as shown in Table 2. Where, Q-1, Q-2, Q-3, Q-4, Q-5, and Q-6 represents the switching signals or pulses of the universal bridge, and Ha, Hb, and Hc represents Hall's sensors, which detect the position of the rotor. When commutating two phases at a time, the stator magnetic field rotates, which results in a rotating rotor; hence, the rotor angle was measured in the horizontal axis. In this way, there are six different commutation logics for the rotor.

DC-DC Boost Converter
The main purpose of DC-DC converters is to regulate the voltage coming out of the battery pack and SC. The battery pack is connected to a unidirectional boost converter which steps up and supplies the voltage from the battery to the BLDC motor. The boost converter adjusts the DC voltage from the battery pack to different levels to control the BLDC motor at varying speeds.
The following Equations (9)- (12) were used in designing the boost converter for the proposed system. The boost converter parameters are given in Table 3.
where, V o represents the output voltage, V i is the input voltage, while C and L repre-sent the capacitance and inductance of the boost converter, respectively, K is the duty cycle of the boost converter, R is the load resistance, and f is the switching frequency.

DC-DC SEPIC Converter
The second DC-DC converter used is a single-ended primary inductive converter (SEPIC). A SEPIC is a non-inverting, bidirectional converter capable of working in DCM. The advantage of the SEPIC converter over others is that its output has the same polarity as the input. It has minimal active components. It has an inductor at the input which reduces the switching harmonics experienced by the source. In the proposed system, the SEPIC converter regulates the voltage coming out of the SC. The voltage from the SC is then used to recharge the battery pack. The SC is charged with the help of a regenerative braking system which converts kinetic energy to electrical energy. A comparison of different types of converters and all the features are given in Table 4. Among these, the SEPIC converter was selected because it is best suited for EV application. The circuit diagram for the SEPIC converter can be seen in Figure 4.
where "D" is the duty cycle of the SEPIC converter and "T s " is the total time period. Volt-sec balance of inductor L 2 .
Combining (15) and (16), the transfer ratio is obtained as: The average voltage across capacitor C 1 is The average voltage across capacitor C 2 is The relation between the input and output power can be expressed as: To calculate the ripple current across the inductor, we will use the expression in Equation (21). By combining Equations (18) and (21), we form Equation (22): Inserting Equation (22) in (23), we form the following relation: The ripple current across inductor L 1 is found by Equation (24).
Inserting equation Equation (18) in Equation (24), the following relation is obtained: The ripple current across inductor L 2 is To ensure our converter remains in CCM, the inductor L 1 should fulfill the following condition: Adding Equation (26) into (27), we obtain Similar conditions need to be fulfilled for inductor L 2 to keep our converter in CCM, and are given in the following equations: By using all the above Equations (14)- (31), the parameters of the SEPIC converter are shown below in Table 5.

Energy Management System Based on Fuzzy Logic Controller (FLC)
The overall system is based on two types of systems to manage power flow.

Ultra Power Transfer Algorithm
The designed EMS is intended to be used for the control of the power flow towards the battery pack from the regenerative braking system and to control the speed of the BLDC motor. The EMS power flow algorithm measures the SOC for the battery. If the SOC of the battery is below 85%, then it checks the SC's SOC. If the SC's SOC is greater than 45% and if both conditions are met, then the power flows from the SC towards the battery pack, as given by the truth table in Table 6. In this way, charging of the battery and SC is done by using AND gate. The power flow algorithm is shown in the flow chart given in Figure 5. According to this figure, firstly the battery's SOC will be measured through the FLC technique; if the battery's SOC is greater than 85%, then the motor will be run and the motor's speed will also be continuously measured through FLC, and during this process, if the current motor's speed (C) is greater than the previous motor's speed (P), then the FLC will calculate error currently. Now, if the error current is greater than zero, then the FLC will increase the duty cycle and start the motor, and if the duty cycle is less than zero, then the FLC will decrease the duty cycle and then start the motor corresponding to the duty cycle. On the other hand, if the battery's SOC is not greater than 85%, then at this point, the SC's SOC will be checked. If the SC's SOC is greater than 45%, then the SC will start charging the battery; if the SC's SOC is not greater than 45%, when the brakes are applied, the SC will start charging through the regenerative process. If the brakes are not applied, which means the motor is running, then at this point, the charging of SC will not take place because, during the running condition, the SC provides the power to the system.

Fuzzy Logic Controller (FLC)
The nonlinear characteristics of the DC motor could degrade the performance and efficiency of the conventional controller. The conventional controller has fixed parameters and structure and the tuning of their parameters is tedious and tiresome work. The FLC, unlike other controllers, is used for modeling systems with no exact values defined for process flow. Fuzzy logic can also be defined in such a way as "computing words rather than numbers" and "control with a sentence rather than equations". A basic block diagram of the FLC is shown below in Figure 6, in which there are three main processes. Firstly, fuzzification is used to convert the input data into some crisp value or linguistic variable. There are three main types of fuzzifier used for the fuzzification process, namely:

1:
Gaussian Fuzzifier 2: Singleton Fuzzifier 3: Triangular/Trapezoidal Fuzzifier All the input to the proposed fuzzifier is triangular [37]. This crisp value or fuzzy set is then used to construct some rule in the inferencemaking block for simulating the human decision-making process. There are two main types of fuzzy inference system (FIS) such as:

I. Mamdani FIS II. Takagi-Sugeno-Kang FIS
The last defuzzification process is used for converting linguistic variables into numerical ones or crisp outputs. There are several different types of defuzzification process. In the proposed FLC, the center of gravity (COG) defuzzification method is used, which is given as (in Equation (32)): where, U COG represents the center of gravity, X j is the point in the universe of conclusion, and Uc X j is the membership value of the resulted conclusion. Pulse width modulation (PWM) for the duty cycle of the designed boost converter in the EMS is determined by the FLC. There are three inputs to the FLC, i.e.,

1:
Error between the input and output current of the boost converter. 2: SOC of the battery.

3:
Speed of the BLDC motor.
Based on these three parameters, the PWM signal is generated as shown in Figure 7. According to this figure, PWM signals are generated by using FLC in which the Mamdani rule-based system is utilized. The error current, battery's SOC, and speed are the three inputs given to this FLC, while the error current is calculated as the difference between the input and output current of the boost converter. Based upon these inputs, the FLC will generate the membership functions. The ranges of these inputs are further explained in detail in Figures 8-11, respectively.     The error current input and battery SOC input has three member functions; the speed of the BLDC motor input has five member functions. The membership functions of error current are shown in Figure 8. If the error current is between −30 and 5 A, it belongs to the negative membership function. If the error current is between −30 and 40 A, it belongs to the zero membership function. If the error current is between 5 and 40 A, it belongs to the positive membership function.
The membership functions of the battery's SOC are shown in Figure 9. If the battery's SOC is between 0 and 30%, it belongs to the low membership function. If the battery's SOC is between 30 and 70%, it belongs to half the membership function. If the battery's SOC is between 70 and 100%, it belongs to the full membership function.
The membership function for the speed of the BLDC motor is shown in Figure 10. If the speed is between 0 and 66.67 RPM, it belongs to the very low membership function. If the speed is between 26.66 and 106.6 RPM, it belongs to the slow membership function. If the speed is between 66.67 and 146.6 RPM, it belongs to the medium membership function. If the speed is between 146.6 and 240 RPM, it belongs to the super-fast membership function.
The duty cycle, which is the output value of the FLC controller shown in Figure 11, consists of five different membership functions. After determining the duty cycle generated by FLC followed by the rules, it is then fed to Mosfet of the boost converter to provide the control output to the BLDC motor. The variation in output of the boost converter will affect the speed of the BLDC motor. The three inputs to the FLC are the error current, battery's SOC, and the speed of the motor. Based on these inputs, the membership function for the duty cycle of FLC will be made. Furthermore, the rules have been made for these inputs which are named as very low, low, medium, high and very high. The ranges of very low, low, medium, high, and very high are 0-15, 5-45, 25-65, 55-85, and 75-100, respectively. These rules for three inputs to the FLC are given in Table 7. The abbreviation of fuzzy sets used as an input and output can be explained as the speed of BLDC motor = very large as VL, small as S, medium as M, fast as F, and super-fast as SF error current = N stand for negative for zero and P for positive battery's SOC = low as L, high as H, and full as F.

Comparison between Fuzzy Logic Controller (FLC) and PI Controller-Based Energy Management System
The FLC shows better performance as compared to the PI controller. The PI controller parameters are tedious and tiresome to tune as compared to the FLC. In the FLC, the performance of the entire system depends upon the membership function selected. The FLC has a wider range for operating conditions. The step response of the PI controller and fuzzy logic controller has been compared in Figure 12, which shows the effectiveness of FLC. It can be seen that the rise time of the fuzzy logic controller is smaller than the PI controller. The response time of the fuzzy logic controller is also smaller as compared to the PI controller. In FLC applications, non-numerical data can also be used to ease the expression of rules and facts. The main benefit of using the FLC is in the rule-based formulation of the control problem and the nonlinear characteristics of the control surface, which depicts a better match with the nonlinear system. Moreover, the development cost of FLC is less than the PI controller. The flexibility of FLC is more than the PI controller because they shape their controlling surface due to the high number of parameters. The FLC is easy to understand due to its rule-based representation. The PI controller can be tuned by using the following equation: where, K p , K i represents the proportional gain and integral gain, respectively, e represents the difference between reference and actual speed and Y is the output response. The rise time of the fuzzy logic controller is 2.6 ms as compared to the PI controller, which is 67.2 ms. The overshoot of the FLC is −0.82%, while for the PI controller, it is 0.5%, which is shown in Table 8. The settling time for FLC is low as compared to the PI controller.  The output voltages and current of the SEPIC converter at a variable input voltage are shown in Figure 13. From these results at variable input voltages, the output voltage corresponding to the 80 V input voltage is chosen for the charging of the battery. The losses become high as we increase the input voltages.
The oscillations in output voltages and current of the boost converter using FLC are less than the results of the converter using a PI controller which are shown in Figures 14  and 15, respectively.   The overall 3D output of the proposed model is depicted in Figure 16a,b, which shows the behavior of the system. According to Figure 16a, the duty cycle increases or decreases when the value of the error current increases or decreases, while, during this process, if the battery's SOC is greater than 85%, then speed will increase. According to Figure 16b, the duty cycle increases or decreases when the error current increases or decreases so that the speed of the motor can be increased or decreased. The stability of our proposed fuzzy logic algorithm mainly depends upon the control measures. Three main control measures have been used to achieve the stability of the proposed fuzzy algorithm, which are the integral squared error (ISE), integral absolute error (IAE), and integral time-weighted absolute error (ITAE). These measures can be calculated from the following equations: While the main purpose of ISE is to integrate the square of the error over the specified time (or until the time when responses settle). ISE reduces the large errors while tolerating the smaller ones. The main function of IAE is to integrate the absolute error over the specific time during which the responses settle. The response of IAE is slower than ISE, but by utilizing this, oscillations are minimized. Finally, ITAE integrates the absolute error multiplied by the time over time. This tuning method is very good as it produces systems that settle much faster than the other two tuning methods. After applying these tuning methods, we have achieved values of these terms for PI controller and fuzzy logic. A detailed comparison is made for the stability analysis between PI and fuzzy logic using these values. This comparison is carried out when the battery's SOC is 45% and 95%, respectively. The comparison is shown in Table 9. As can be seen from Table 9, the ISE value for FLC is 0.41 when the battery's SOC is 45%, which is better than the ISE value of the PI controller. Similarly, the IAE and ITAE values for FLC are better than the PI controller response. Now, when the battery's SOC is 95%, then similar criteria will be applied for comparison. The ISE, IAE, and ITAE values of FLC are better than the values of the PI controller response. Hence, the FLC is a more stable system than the PI controller.

Results and Discussion
The performance of the system developed within this study was tested and validated using the following three scenarios listed below: 1.
Scenario 1 (constant speed cruise with a constant power supply) 2.
Scenario 2 (charging of the SC during regenerative mode) 3.
Scenario 3 (acceleration and deceleration of the vehicle during variable speed) These scenarios are explained one by one below.

Scenario 1 (Constant Speed Cruise with Constant Power Supply)
When the SOC of the battery is kept at 95% and the SC is not providing any power to the battery, then the boost converter boosts the power to meet the motor requirement. The speed of the motor is uniformly increased because the DC input to the BLDC motor is constant. The speed of the BLDC motor can be observed in Figure 17.
The battery's SOC is 95% and it can be seen in the figure below that the battery is discharged. Since the starting current of the BLDC motor is high, as a result, it will draw more current from the battery in the beginning. It can be observed that in beginning there is a sudden increase in the battery discharge rate. This is because of the high starting current. Similarly, the FLC also responds to the high starting current by adjusting the duty cycle of the boost converter to regulate the voltage. The battery's SOC and response of the FLC can be shown in Figures 18 and 19, respectively.   The purpose of the boost converter in the system is to regulate the voltage from the battery. The boost converter minimizes any fluctuation at its input and provides a constant output. This regulation can be seen in Figure 20 where it can be observed that the output voltage remains constant regardless of battery's SOC, since in the beginning, the current drawn by the BLDC motor is high, which causes a sudden spike in the output voltages and current of the boost converter.

Scenario 2 (Charging of SC during Regenerative Mode)
When the battery's SOC is 40% and the regenerative braking system is engaged, then the speed of the motor is decreased if the battery is in regenerative mode or normal mode. We have decreased the battery's state of charge to 40% to observe the effect of the SC on the system. The battery's SOC can be seen in Figure 21, which is decreasing initially so that the SCs are charged enough to provide power to the battery. Now the regenerative braking system is engaged. Every time the BLDC motor accelerates after deceleration, it draws a large amount of starting current. The effect of a large current drawn can be seen in Figure 22, where there is a sudden dip in the battery's SOC at 2.5 s. The second dip is less noticeable at 3.3 s because at this point the SC is charged up to a point where it can supply the energy generated back to the battery from regenerative braking via the SEPIC converter. The voltage and current supplied by the SEPIC converter can be seen in Figure 23.  The response of FLC when the regenerative braking system is engaged can be seen in Figure 24. By taking a closer look, it can be observed that in this case, the FLC controller responded to the change in the system at three different time intervals. The first time FLC responds at the beginning when the motor is starting and drawing a high starting current from the battery pack. At time 2.5 s, the second FLC response can be observed and it can be seen that the FLC response is relatively larger in the period. This is the same time when the BLDC motor accelerated after almost coming to a standstill. The third response of the FLC can be seen at time 3.3 s and the response period is smaller than the previous one. This is because at this point the SC has stored enough charge to supply the energy back to the battery. The same effect can be seen in the output of the boost converter voltage and current; the voltage spike at the time 3.3 s is larger than the spike at time 2.5 s because at that time the SC is relieving the burden of the battery. Observing the boost converter output voltages and current, the DC voltage of the boost converter is constant. The output current of the boost converter is also constant, as can be seen in Figure 25 below, due to the constant speed of the BLDC motor. Since the motor's speed is uniformly constant due to which the output current and voltages are constant. The current and voltage from the boost converter can be seen in Figure 25a,b.

Scenario 3 (Acceleration and Deceleration of Vehicle during Variable Speed)
In this scenario, acceleration and deceleration of the vehicle at varying speeds has been considered. The SOC of the battery is given in Figure 26, which shows the discharging of the battery. At time 2.8 s, the BLDC motor almost comes to a stop. When the motor is running at a slow speed, the boost converter output voltages and current are also decreased by the FLC which can be seen from the time 2.8 s to 4 s. After time 4 s, the BLDC motor is accelerated again till time 6 s. The boost converter output voltages and current can be seen in Figure 27a,b.  Due to the deceleration mode, the SEPIC converter voltage and current first rise, and then acceleration occurred, which shows the reduction of converter power because it supplies power to charge the battery. These results are shown in Figure 28a,b. Now, in deceleration mode, the SC SOC charge is increased from duration 2 s to 3.9 s and the speed goes on decreasing and does not need any power due to inertia in this route until acceleration occurs as presented in Figure 29a,b.

Conclusions
This paper presents the modeling, design, and simulation result of the fuzzy logicbased EMS of HEVs for the ESS. EMS comprises two main parts: the FLC and the ultrapower transfer algorithm. The FLC consists of three inputs, namely error current, speed, and SOC of the battery, and one output which is the duty cycle to feed in Mosfet of the boost converter. A UPTA system is used to control the power flow mechanism and also charge the battery using an ultra-capacitor during regenerative braking. The braking mechanism helps in charging the SCs. Most hybrid vehicles use a DC-DC boost converter for charging and discharging of the battery, but in this paper, a boost converter was used for discharging the battery and to provide power to the BLDC motor, and a SEPIC converter was used with an SC to charge the battery and to minimize the inrush current and spikes, which increases the battery health and system efficiency. The results show that the FLC has a better response than the PI controller and the different scenarios discussed in Section 6, which confirms the validity of EMS developed in this study. In future work, stability analysis of the proposed fuzzy algorithm will be implemented to further validate the superiority of the proposed algorithm.