Fuzzy Control Assisted Vehicle-to-Home (V2H) Energy Management System

Abstract In developing and underdeveloped countries, the electric power generation doesn’t suffice the electrical energy demand. With no or incorrect peak load controlling schemes, load shedding is very common. Regular unscheduled power outage for hours creates the demand for residential microgrid and the need of home-based standby power supply. Normally, a low-capacity stand-by inverter power supply is used for essential/emergency loads. Electric vehicle batteries have massive energy storage capacity and can be potentially utilized as backup power supply for most of the home loads during load shedding or blackout. Moreover, solar energy can also be utilized to charge plug-in electric vehicles (PEVs) to further enhance the backup power for home loads and to make it a residential microgrid. In this work, a fuzzy logic inference system is utilized for efficient power management and utilization of V2H. It imitates the decision-making process of charging/discharging of the PEV battery through priority decision-making of power management and emergency backup power supply of a typical home in developing countries like India.


Introduction
There is a global interest in decreasing CO 2 emissions and in understanding the strategy of providing cleaner energy with low cost [1]. According to U.S. Environmental Protection Agency, in 2014, the transportation sector represents 26% of greenhouse gasses (GHG) emissions all over the U.S. [2]. These challenges have directed the automotive industry towards bringing forward the plug-in electric vehicle (PEV) into the market [3,4]. The use of electric vehicles is an initial step toward the reduction of CO 2 emission [5][6][7]. The U.S. Department of Energy KEYWORDS electric vehicle; load shedding; plug-in electric vehicle; V2H; fuzzy logic inference system; emergency backup power India has a goal of having all-electric transportation system by 2030 to reduce fuel import bill (National Mission on Electric mobility) [25]. Currently, more than 17,000 electric vehicles are on the roads of India [25]; this capacity can be easily utilized during load shedding and blackout. India already installed 3.45 GW solar PV and the target of generation of 100 GW has been planned by the Government of India with the investment of US$100 billion [26]. The cost and payback period of solar PV is decreasing day by day with the rapid growth in PV technology [27]. Therefore, PV modules are becoming more economical and are used in many applications. Utilizing the PV system on rooftop, in addition to saving money for house owner, can save more energy in the generation side because of energy loss in transmission line. In India, transmission line losses account for 23% [28]. Generation of 1 kW energy based on rooftop PV systems save 1.23 kW on the power plan. In India, coal consumption for power generation is 545.9 MT [28]. At present, typical global efficiency rate of coal-fired power plants is 33% [29]. A 100 W light bulb consumes 876 kWh per year and the thermal energy content of coal is 6150 kWh/ton [28]. Therefore, the electricity generated per ton of coal is 2460 kWh/ton (0.4 × 6,150 kWh). Therefore, 357 kg coal is burned to feed the 100 W light bulb that it produces 2.26 kg SO 2 , 2.31 kg NO x , and 840 kg CO 2 .
This work emphasizes the utilization of PEV as a backup power supply for household load in developing and underdeveloped countries as a part of the residential microgrid, without affecting its operation as an electric vehicle. Proposed V2H also introduces the solar PV-based charging of vehicle so that the whole system could work as a nanogrid. Slow DC charging and fast DC charging regimes are applied besides constant voltage and constant current charging modes during the daytime to reduce the dependency of EV on the electric power grid. The key contributions of this work are: • The PV-generated energy (including the effect of load leveling) is better utilized by dividing the load into three categories. • Reduced dependency of proposed system on the utility grid. • Best utilization of EV with two different regimes of charging based on the type of power source (grid/ PV) • The proposed system can also work as a residential nanogrid at islanding condition. • Moreover DC bus for DC load has been used to avoid power loss in DC to AC and the AC to DC converters. • The priority of utilizing power sources is as follows: (i) photovoltaic array (PVA); (ii) plug-in electric report shows that there were more than 2 million electric vehicles at the end of 2016 and they had estimated that there would be 20 million electric cars by 2020 and 100 million by 2030 [8]. Moreover, PEVs have enormous energy storage capacity while they can also be utilized as residential battery storage systems for a grid outage or load shedding [9][10][11]. The vehicle to home (V2H) capability describes a scenario that PEVs not only take power from the grid to charge the vehicle but also give backup power to the home and other islanded load during an interruption load shading, similar to a stand-alone emergency power generator [12][13][14]. When PEVs are used the energy is supplied from the grid or microgrid to charge the battery. Thus, it increases the extra load on the microgrid, which leads to more power demand, hence to increased power rating of conventional power plants. This creates another problem which adds to, not minimizes, the problem of pollution or fossil fuel reduction [15]. Therefore, charging the PEVs by grid, due to the uncertain period of charging, causes a sudden pressure on the power grid (peak power demand). This type of energy consumption on a local scale can lead to microgrid unpredictability and need of a gas/diesel-based peak power plant. Therefore, reducing the power fatality and optimizing the main electricity grid load factor are important issues [16,17]. Thus, optimizing the utilization of PEVs and smart charging become new issues [14]. Fuzzy logic controller, one of the popular methods, is also utilized for this purpose [18]. It includes the use of fuzzy logic to control the battery state-of-charge (SoC) and to fulfill the drive cycle loads of PEVs. Moreover, optimizing the time of the battery charging is discussed in [5,19]. The fuzzy logic controller is also used when the PEVs are connected to the smart home [20]. Smart homes are going to be the next generation of homes in the distributed energy sources infrastructure [21,22].
In India, over 85% of the households in five of the six states (Bihar, Jharkhand, Madhya Pradesh, Uttar Pradesh, West Bengal, and Odisha) had electric power for less than 8 h (even for less than 50 W load) or no electrical energy at all for the whole day [23]. In general, Lead-acid battery-based UPS/inverter system is used at home as a standby power supply in developing and underdeveloped countries. It has low power/energy capacity (2-5 kWh). Typically, one or two lead-acid batteries are used for this purpose (12 V,. In comparison to that system, the batteries of EV have large energy storage capacity. The subcompact EV has 12-18 kWh (except Toyota Prius PHEV) capacity, the middle-sized electric vehicles have 22-32kWh battery package, and the luxury sedan (like Tesla S) has a range of 60-90 kWh to provide long driving range [24]. vehicle (PEV); (iii) Grid; and (iv) Emergency Backup Power Supply. Section 2 presents the proposed Vehicle-to-Home (V2H) Strategy and section 3 presents the modeling and simulation of the V2H to apply fuzzy logic controller. The hardware in the loop setup of the V2H system has been describe in section 4.

Proposed V2H System
The proposed system is a combination of stand-alone and grid-connected system shown in Figure 1. It uses the benefit of both the applications as the cost of the inverter, for a standalone system, is low. Integration of the PV system to the utility grid provides cheap as well as reliable power supply. The proposed system has a hierarchical control which the loads are divided into three group, viz. luxury loads, normal loads and essential/emergency loads.
The luxury loads (e.g. washing machine, room heaters, air conditioners, etc.) receive power directly from the utility grid and during the load shedding, these loads remain switched off. The normal loads (fans, lights, fridge, room coolers are commonly used in developing countries) receive power from the proposed system, which comprises solar power and utility grid power or EV as a power supply. The emergency loads (emergency light, fans) are connected to the low power storage battery-based DC-to-AC inverter/UPS. This system is most suitable for the urban localities of developing countries where a power supply with few hours of load shedding is common. The proper and total utilization of solar energy will help in reducing the load demand on the utility grid during daylight. Thus, the system also works as peak power plant by letting off the home load from the grid during maximum insolation hours which matches with the daily peak load times. Thus, the system also works as an H2G system. However, in the late hours at night and when the stored energy of the EV battery is exhausted (reached to the preset level of SOC), the load shedding at this condition causes a complete shutdown of power supply. Therefore, a low-power standby power supply is required for essential/ emergency load (lights and fans only). where The proposed system is designed to provide reliable and economical power supply. In case of economical purpose, the main focus is to maximize the use and harness of solar energy such that no energy from solar modules remains unutilized. Thus, EV battery storage is used to store the extra solar energy.
During high solar insolation, system expression is: Also, during low insolation: Similarly, during night when the battery gets discharged: (1) P Generation ≥ P Demand (2) P Generation = P PV , P Grid , P EV or P Standby emergency where E max BES is the maximum power capacity of the BES. Therefore, for designing of the system, above limitation should be considered as the critical constraint.

Architecture of the Controlling System
The block diagram view of the controlling signal for proposed V2H scheme is shown in Figure 2. The first block (1) is the PEV which is acting as a backup power supply for home. The second block (2) is the power grid, which is the primary source of energy. The normal home appliances and loads are labeled as home (third block (3)). There is a block (fourth block (4)) of 'emergency backup' power supply which consists of the battery-based DC-to-AC inverter/UPS for essential home loads supply. It operates in emergency condition when no power is available from any source. The fifth block (5) consists of PVA and buckboost converter for charging of battery.

Operating Modes of Proposed Method
The operational strategy of the proposed V2H system is categorized into six modes to encompass every possible scenario. Mode-I (grid supplies power to home and UPS), Mode-II (grid supplies power to home as well as PEV and UPS), Mode-III (PVA charging PEV and grid supplies to home and UPS), Mode-IV (PVA supplies power to the home and charges the PEV), Mode-V (PEV supplies power to home), and Mode-VI (Emergency Backup Battery-based power supply/UPS provides power for home). These modes of operation are shown in  Mode I (grid-connected): This mode, due to unavailability of PEV or low SoC of PEV, cannot be used to feed the power to the home. In this condition, PVA source cannot provide sufficient power due to partial shading, cloudy weather or night hours. Therefore, the grid provides power for the home loads (730 W AC loads and 120 W DC loads) through the bidirectional DC-AC converter.
Mode II (grid-connected and grid-connected charging): In this case, PEV is connected to home, but due to the emergency need of charging (low SoC of PEV), the grid power supply charges PEV as well as provides power for the home loads. In this mode, PVA is not available, and charging of PEV is in fast charging mode (which can provide up to 43 A current for 24 V batteries).
Mode III (PVA charging and grid-connected rectification): In this mode, home receives power from the grid power supply, and PVA provides power for charging of PEV. In this case, charging of PEV batteries is done through slow charging mode (which can provide up to 13 A for 24 V batteries) as the rooftop PVA and mounted PV When there is load shedding during night: In reliability mode of operation, the main objective is to have a reliable standby power supply available, even if the solar power is underutilized. This condition is required where scheduled and unscheduled load shedding is frequent and sometimes up to 10 to 12 h a day. Thus, during the availability of grid power supply and very low level of EV battery, the proposed system works on: During load shedding hours it works on (4). Moreover, for rural applications where scheduled, unscheduled and long-duration load shedding is common, 'reliable mode' of operation is required. In this case, the emergency battery is always kept charged, either by grid or by solar energy, to meet the sudden load demand at load shedding. The characteristics of PV output often repeat in a cycle of 24 h. Hence, assuming that the battery energy storage (BES) should return to the same state in 24 h, the constraint on BES energy balance is expressed in [30] as: where BES is the efficiency of the BES, and H1 and H2 are the total charging time and discharging time of the BES per day, respectively.
The BES can work in charge or discharge mode and can be charged from PV or the system depending on the operating model. The charge/discharge power capacity of the BES should not go above the acceptable margins to guarantee stable performance and extend the life of the battery, which is expressed in [30]. Therefore: (6) P Standby esential∕emergency ≥ P Essential/emergency load (7) P Grid = P Load + P EV Battery charging − P PV Figure 2. the block diagram of proposed V2H system controlling signals.
night time is not available, and grid power is not available too. In this mode, the PEV is available and its SoC is sufficient (more than 80%); therefore, it is able to feed power to the home loads through DC link bus.
Mode VI (an emergency backup battery-based power supply connected): This is the worst case, when all other sources of energy are unavailable due to various reasons, and the low-power emergency backup which is placed at home provides the necessary power for the home loads. on the vehicle have limited power which cannot generate large charging current.
Mode IV (PVA connected to home and PEV charging): In this case, PVA supplies power for both PEV charging and home Loads. PVA (1000 W p ) provides power to home loads and the mounted PV (250 W p ) supplies power to PEV batteries through slow charging mode.
Mode V (PEV connected to the power supply): In this mode, PVA source, due to partial shading, cloudy day or   demand; (iv) utility voltage; (v) sun irradiation; and (vi) PEV plug-in status. The six output variables are defined as crisp values, which are: (i) photovoltaic on-off switch; (ii) emergency battery cut-off switch; (ii) PEV discharging switch; (iv) PEV photovoltaic base charging switch; (v) PEV grid base charging switch; and (vi) grid on-off switch.
Input and output variables are applied to the fuzzy logic controller. According to the different input parameters, FLC decides according to the proposed priority as discussed earlier.

Fuzzy Input Membership Functions
Generally two basic modes of membership design, namely, data-driven and linguistic design can be chosen [33]. In most applications, fuzzy membership functions are generated by experts in the area using linguistic design. However, with increasing number of inputs and outputs, the number of rules increases exponentially which makes the design difficult for the expert [34]. The input membership functions (MF) are designed based on the linguistic method for the SoC of PEV, SoC of emergency backup battery, the home loads demand, the sun irradiation, the grid availability, and the PEV plug-in status, which are shown in Figures 8-13, respectively.

Vehicle SoC Membership Function
SOC is defined as the fraction of electrical energy remaining in the PEV's battery. To extend the battery life, the minimum SOC is set to 40% in this study. The MFs are composed of four functions:

Simulation of V2H System
The simulation model of the proposed model is developed MATLAB/Simulink as shown in Figures 6. It includes a PVA block which consists of PVA and buck-boost converter, PEV and its on-board DC boost charger, AC-DC converter, power grid, and home AC/DC loads. The model of PVA consists of four solar insolation and temperature-dependent PV panels (250W p at 25 °C and l000 W/ m 2 ), which are installed on the rooftop of a home. A model of single-phase AC voltage of 230 V, 50 Hz is used as a grid power supply. The fixed maximum load of 850 W is considered in the simulation which consists of 120 W DC loads and 730 W AC loads. Different components of the V2H system are used, and their Simulink models are developed in various operating modes and vehicle operations. Figure 7, shows the fuzzy inference system (FIS).The proper definition of fuzzy logic controller (FLC) inputs parameters is an important part of the modeling to minimize the fuzzy rules [31]. The fuzzy logic controller consists of a Sugeno-based inference system with inputs and outputs membership functions, which have fuzzy inputs and crisp output [32]. This model has six input parameters: (i) SoC of the electric vehicle; (ii) SoC of the emergency battery; (iii) power demand or domestic load, which is a summation of home loads demand and PEV charging

Emergency Backup Battery SOC MF
The MFs are composed of three functions and in this case, the SoC objective is considered between 25 and 90%.
• E or empty: the SoC is (less than 20%); hence, it has to be charged. • H or high: the SoC is in objective portion (25% < SoC < 90%); hence, it is ready to use. • F or full: the SoC backup battery is more than 95% and it is fully charged.
• E or Empty: The battery SoC is below the 40% of SoC; hence, the battery has to be charged through any possible way. • L or Low: The battery SoC is low (45% < SoC < 65%) in relation to the SoC objective. However, it is not too low; hence, it can be charged by PVA. • H or High: The battery SoC is close to the SoC objective (65% < SoC < 95%); so PEV can be used as a backup or ready to use for traveling. • F or Full: the battery SoC is fully charged, and there is no need for more charging.  • NL or negative low: defined between −900 W and 200 W • Zero: it is between −150 W and 0 W • PM or positive medium: defined between + 100 W and + 800 W. • PH or positive high: it has defined between + 950 W and + 1000 W.

Sun Irradiation MF
The sun irradiation MF is defined to estimates the power of PVA base on the sun irradiation value, which hourly PVA energy output (kWh) has a strong correlation with hourly solar irradiation (kW/m 2 ) and can be expressed using linear equation [35]. The MFs consist of three functions, and it is between 0 and 1000 W/m 2 .

Home Load Power MF (Pd)
The domestic load is defined as the summation of home loads and PEV power minus 1000. This constant value represents maximum output power of PVA.
The positive value of P d shows that the summation of home loads and PEV are more than the nominal value of PVA and it cannot supply power for these loads. The negative value of P d shows that the PVA output is more than demand. The MF consists of five functions which are defined between −1000 W to + 1000 W: • NH or negative high: defined between −950 W and 1000 W (11) P d = P home + P PEV − 1000

Hardware in the loop setup (HIL)
To implement this system, a residential house shown in Figure 14(a), which is located in Aligarh Muslim University, has been selected. It has a 1 kW rooftop solar panel to utilize the solar energy to reduce its dependency on the grid and provide reliable power supply. Figure  14(b) shows the regular controller which includes battery based DC-to-AC inverter/UPS to harvest solar energy. Solar insolation and temperature data of Aligarh city almost follow the same pattern which is considered in [36]. This data is a 12 h sample for summer, autumn, winter, and spring viz. February, June, September, and December. Figure 15 shows the variation of solar insolation and PVA (1 kW) output power for four different months, respectively.

Vehicle Operation
The home loads receive power from the utility power grid, but during the periods of the load shading or peak time, ESU of PEV delivers power to the house through the DC-AC converter and the DC bus. Figure 14(a), shows a vehicle which is equipped with roof-mounted PV to charge the EV battery to utilize solar energy whenever the EV is parked outside of the garage; the EV also can be charged by grid power.

Home Loads
Home loads are classified into three categories; loads with high electrical demand (e.g. vacuum cleaner, electric heaters, microwave oven) which are directly connected to the grid and during the outage remain switched off. The normal loads (fans, lights, room coolers are commonly used in developing countries) receive power from the proposed system. Emergency loads (emergency light, fans) which are connected to battery-based DC-to-AC low-power inverter/ UPS. Figure 16, shows the measured power demand of the normal load on a specific day and the PV output power. During daytime, the demand is less than the PVA power so the extra power which produced by PV panel cannot be utilized; so, it is necessary to find a way to utilize the energy. One solution is to use Tesla Powerwall as a battery storage system because 1 kW installed-solar PV panel with Powerwall system can reduce dependency on the grid up to 20% [37]. Another solution is the utilization of EV/PHEV as an ESS. So residential V2H system tied with rooftop PV could deliver power for about 19-600 h, depending on the time of year and the precise vehicle configuration [38][39][40].
• Low: less than 250 W/m 2 , which is too low, so the output power of PVA also is too low to supply power for home loads or PEV. • Medium: the sun irradiation is between 300 W/m 2 and 700 W/m 2 . It is estimated that PVA can provide power to charge the battery on slow mode or some light loads.
Good: more than 750 W/m 2 , so PVA array can provide power for the home loads and charge the PEV.

Grid Availability MF
The grid MF is defined as a single trapezoidal MF to check the availability of power grid by monitoring the voltage amplitude of grid. It has one MF and if the value is between 190 and 230 V, it shows that power grid is available. Otherwise, it is unavailable.
Available: the grid voltage is between values mentioned above.

Vehicle Plug-in Status MF
The vehicle plug-in status has one MF, which shows whether the vehicle is connected to home or not.
• High: it shows that vehicle is connected to home.

Fuzzy Output Membership Function
There are six output variables which are given in Table 1; they are a constant value and in the range of zero to one (Sugeno-Type Fuzzy Inference). Name of the variable, the range of each output variable, the number of membership 'high': 'constant, [1] PEV power curve shows negative value, which means it is in charge condition. At time t = 1s, the grid is off, but the PVA supplied power for home loads and mounted PV supplies power for PEV. At time t = 2s, sun irradiation is low level and the PEV battery SoC is not in the range of SoC objective. Therefore, the backup battery supplies power for home loads, and PEV charging has stopped. At time t = 2.5s, grid power is available. Therefore, the battery is disconnected, and power is supplied to home loads from the grid. The PEV also does not charge through grid due to its SoC value, which is in a low condition (40 to 60%), but it is not in the emergency case of charging (waiting to be charged by PVA). Figure 19, shows the simultaneous availability of input sources, which apply to FIS to validate the application of FIS for following the priority rules mentioned in the introduction section. In this case, Figure 20 shows the results of using these inputs to the system. It also shows that the fuzzy controller has been designed properly and it follows the priority rules as well as the switching modes in critical areas. Figure 17, shows different profile for the availability of sun irradiation, vehicle plug-in status, and grid. In this profile, all three power sources are available, and the FIS based on the defined priority in introduction section decided which source of power should apply to home. Figure 18, shows the results corresponding to the input profile. In this figure, after 0.5s, the PEV is connected and, due to low SoC, it starts charging through the mounted PV. The

Conclusion
This paper has presented a new PEV energy control strategy, which integrates the V2H and H2 V capabilities. The batteries of PEV have substantial energy storage capability which is utilized in UPS/inverter-based standby power supply. Thus, it provides additional utility batteries, especially in underdeveloped and developing countries. Indeed, it uses the ability of PVA and PEV to provide the The comparison of this work with paper [41] that provides a low-cost controlling system for residential microgrid, shows that this work has a better controlling system to utilize the PV power even in low sun irradiation. It also utilized EV energy without affecting the EV performance by applying proper MSs Function. Implementation of this work is more costly compared to paper [41]. It has benefits of robustness in integration of the V2H and H2 V capabilities.  working hardware, it reached up to 42% enhancement efficiency and zero power outage since last 18 months. Moreover, PVA is used for home loads, as well as charging of energy storage unit of PEV. Thus. the use of PEV has an additional advantage in the proposed system as it also improves dependency on the conventional grid supply and reduces GHG emission. reliable power sources for the home by considering the priority use of the clean and low CO2 emission system to charge the PEV. The six cases presented in this paper show the behavior of the proposed system, under the SoC objective of PEV and power demand. The energy storage capacity of PEV is further utilized for standby power supply of home loads in case of load shading. Based on the   Figure 19.