An Intelligent Hybrid Energy Management System for a Smart House Considering Bidirectional Power Flow and Various EV Charging Techniques

Compelled by environmental and economic reasons and facilitated by modern technological advancements, the share of hybrid energy systems (HES) is increasing at modern smart house (SH) level. This work proposes an intelligent hybrid energy management system (IHEMS) for an SH connected to a power network that allows a bidirectional power flow. The SH has electrical and thermal power loops, and its main components include renewable energy from wind and photovoltaics, electric vehicle (EV), battery energy storage system, a fuel cell which serves as a micro-combined heat and power system, and a boiler. The proposed IHEMS models the components of the SH, defines their constraints, and develops an optimization model based on the real coded genetic algorithm. The key features of the developed IHEMS are highlighted under six simulation cases considering different configurations of the SH components. Moreover, the standard EV charging techniques are compared, and it is observed that the charging method which is flexible in timing and power injection to the EV is best suited for the economic operation of the SH. The simulation results reveal that the proposed IHEMS minimizes the 24-hour operational cost of the SH by optimally scheduling the energy resources and loads.


Background and Motivation
The contribution of hybrid energy systems (HES) is increasing in the world at industrial, commercial, and domestic levels to address environmental and economic concerns [1].A HES consists of two or more energy resources operated together to obtain an improved efficiency and a better energy balance.Due to advanced technology, compact and high-efficiency micro-combined heat and power systems (micro-CHP) are gaining popularity at domestic level [2][3][4][5][6][7].According to the American Council for an Energy-Efficient Economy's report, the modern CHP systems can work at an efficiency as high as 80% in contrast to the commonly prevailing methods of generating electricity and thermal power separately, which have a lower combined efficiency of 45% [8].Similar to HES, electric vehicles (EVs) are another important and eminent element of modern life.Despite being eco-friendly and less reliant on scarce petroleum products, EVs are challenging to the power grid's stability and economy.They require ample power to charge their batteries resulting in an increased demand on the network and potentially worsening peak power demand events.This situation has called for various charging techniques and other strategies to enable increased penetration [9][10][11].
In addition to HES and EVs, the modern power system has an increased share of inexhaustible renewable energy systems (RES) which are human-and eco-friendly.Due to technological advancements, their integration at household level is increasing and results in improved economy and reliability especially when the power systems allow a bidirectional power flow.Moreover, the role of RES is also attractive for the power system operator as it reduces the requirement of network expansion, especially when many EVs are integrated.
Keeping in view the higher penetration of RES and EV at a smart house (SH) level which is equipped with a micro-CHP system, this work fulfills the need for a comprehensive study that explores their optimal operation in a bidirectional utility grid.Moreover, the possibility of combined operation of HES and EVs will increase if their economic operation is analyzed and optimized carefully.As such, this work presents an intelligent hybrid energy management system (IHEMS) for an SH which has an EV and a RES that are connected to a bidirectional utility grid.

Literature Review
The idea of an SH is an emerging topic in the recent research, and it has a great potential of improvement due to its diverse nature.Though the impression of SH is very attractive, it faces diverse challenges, especially associated with energy management [12,13].There are several studies that address the energy management system (EMS) of an SH, and a comprehensive survey of the existing literature is presented as follows: The application of micro-CHP systems for domestic use is reported to yield benefits such as reduced CO 2 emission [2], and an improved operational economy [3][4][5].The study in [6] analyzes different design options of fuel cell (FC) working as micro-CHP systems in residential buildings.Developing a discrete optimization model, Xie et al. reported the operation of a CHP system in [14], and showed that an increased CHP loading does not guarantee a profitable operation because yield of a CHP system is affected by the thermal to electric power ratio (r TE ).When the thermal power demand was higher than electrical demand at night, the CHP was operated at low value of r TE (e.g., 0.8).In the day, when electricity requirement was much higher than thermal requirement, the CHP was operating at a high value of r TE (e.g., 1.4 or 2.2).A model containing a battery energy storage system (BESS) and a micro-CHP system was reported in [7], and the study concluded that the system's efficiency decreases gradually as the load reduces.
A review of techniques used for EV charging is presented in [11,15].The charging methods are broadly categorized as follows: charging without following any controlled mechanism, charging during off-peak hours, charging for the sake of peak-shaving and load factor improvement.It is observed that the first two techniques are easy to implement but result in low benefits as compared to the last two strategies.The last two methods help the power system obtain an improved voltage and frequency profile, a flattened load profile, and a better integration of RES.In [16], the impact of EVs loading on the distribution system voltage is reviewed, and a scheme is proposed to reduce the effects of EV loading.An EMS that uses the EVs as source of ancillary services to regulate the voltage profile of a power grid is proposed in [10].An intelligent technique for EV charging is proposed in [17] where a variable tariff of energy cost is considered.A hybrid EMS based on Monte Carlo simulation is proposed in [18] for an SH with a photovoltaic (PV) and a BESS to schedule the controllable loads.A closed-form solution which addresses the scheduling of responsive loads and EV charging with uncertain departure times is provided in [19].The benefits of the responsive nature of electric loads in grid stability and system economy are discussed in [20,21].The strategy proposed in [22] optimally schedules the charging and discharging times of EVs in a parking lot equipped with BESS and PV to minimize the operating cost.
A combined operation of an EV with a micro-CHP system generally results in an improved economy as compared to their individual operation as reported in several studies (e.g., [23][24][25][26]).Their combined operation for a typical semidetached home in two different sites of Italy is reported in [23], and results in a cost saving of up to 60% compared to their individual operation.Similarly, a model for their combined operation is proposed and evaluated using mixed-integer linear programming in [24].This study shows that due to an improved thermal power supply rate and electric power capacity factor, this combined operation results in a better efficiency.Furthermore, the impact on annual energy consumption for their combined operation is reported in [25], and the results show an energy saving of up to 3.7% compared to their separate operation.
The intermittent behavior of RES and stochastic nature of departure and arrival times of EVs pose a challenge to the power system.However, researchers are developing strategies to technically and economically optimize their combined operation [27,28].In [29], an optimal design of an EV fast-charging station integrated with RES and ESS is proposed using Monte Carlo and Genetic Algorithm methods.An adaptive and robust optimization-based combined operation of EVs and RES is proposed in [30] with the consideration of uncertainties in arrival and departure times of EVs.An optimization scheme for the cost minimization of EV charging is presented in [31], which models the stochastic behavior of parameters related to EVs.In [32], a real-time EV charging strategy is proposed for the commercial building's EMS with on-site PV generation and EV charging facilities.The proposed scheme considers the uncertainties of PV generation and EV parking, and maximizes the building's profit in a real-time operation by scheduling its net electricity exchange with the power grid.An FC-based micro-CHP system for an SH with EV, boiler and BESS is presented in [33] for electrical and thermal power loops.However, the RES installation was not considered.
The preceding work provides a helpful contribution to the literature and forms a basis for future research.However, a combined operation of HES and EVs in a bidirectional power network requires further attention as the present environmental and economic concerns call for their integrated operation at the SH level.The studies mentioned above do not address their combined role and/or do not present an optimized schedule of electrical and thermal loads (e.g., [3][4][5][6][7]10,11,14,[16][17][18][19][20][21][22]).Similarly, the increased role of EV loading and impact of its charging methods require special attention as the EVs make up a major part of the electric load in an SH.

Contribution and Paper Organization
The highlights and contributions of this study are: 1.
A detailed model of an SH is developed whose components include an EV, a micro-CHP system, a BESS, and an RES.The RES includes solar and wind energy conversion systems.The SH is connected to a bidirectional utility for which two typical types of tariffs (i.e., flat and variable tariff) are considered.

2.
Since the EV has special characteristics (i.e., it is a heavy electric load which raises electric demand significantly without affecting the thermal loads), there are several charging techniques to harmonize its impacts on the system.A comprehensive comparison of four charging methods is presented in this work.

3.
An optimization model for the IHEMS is defined, and the constraints are modeled for the components of a SH.The problem is designed to apply the real coded genetic algorithm (RCGA) which optimizes the scheduling and use of energy resources and responsive loads.4.
To model and explain the role of various components of the SH, a comprehensive set of six case studies is developed.The simulation results demonstrated the interesting features of the optimization process and the developed model.The necessary conditions for optimal operation of the energy resources are also explored.
The paper is organized as follows: Section 2 is devoted to the model development of the SH with its various components.Section 3 defines the optimization problem and the constraints associated with the loads and the components of the SH.A description of the RCGA and its application to the proposed model is explained in Section 4. The test cases and simulation results are discussed in Section 5. Finally, Section 6 concludes the paper.

Development of SH Model
Figure 1 shows the model of the SH used in this study.To meet the electrical and thermal demands, the SH incorporates a HES consisting of electrical and gas resources.The electrical power from the utility, BESS, FC, wind, and PV energizes the household appliances and charges the EV batteries.The FC and the auxiliary boiler use natural gas as their energy source.The thermal loads use the recovered heat from the FC.The auxiliary boiler provides the deficient heat if the FC cannot meet the thermal load demand of the SH.In this work, bidirectional power flow between the utility and the SH is considered.Therefore, electrical power is purchased from the utility when required, and the SH can export surplus power to the utility.

Modeling the FC
FCs have various types depending on their fuel types and construction.Figure 2 shows the main components of a typical FC.It consists of a fuel processing unit, a stack, and a power conditioning unit.A proton exchange membrane FC is used in this work whose input is natural gas and outputs are electrical power and heat.The efficiency of an FC depends on its part load ratio (PLR).The PLR is the ratio of electrical power generated by the FC at the i-th interval to its power capacity rating as given in Equation (1): where PLR i is the PLR at i-th interval for P FC.i output in this interval.
Mathematically, FC's efficiency η FC and its thermal to electrical power ratio (r TE.i ) are represented for the i-th interval as follows: When PLR i < 0.05: When PLR i > 0.05: Next, the thermal power (H FC.i ) generated by the FC at interval i is determined as: Figure 3 shows the relationship between PLR and the efficiency of FC.At low PLR (<5%), the efficiency of FC is low due to high parasitic losses [34].Beyond this low PLR region, the FC works at 30-40% efficiency.Looking at the efficiency curve, it is evident that η FC is comparatively higher at lower PLR regions in contrast to the regions of FC's peak power operation.

Modeling the EV
The model of an EV depends on various factors such as EV driving style, distance traveled, type of route, and SOC at plugged-out time.This work models the EV initial SOC at plugged-in time depending upon the daily traveled distance [31] and uses the data available in [35,36].
where If d and SOC EV po are known, then SOC EV pi is computed using Equation (7).It is evident from this equation that a lower boundary condition is applied to SOC EV pi to safeguard the EV batteries.

Modeling the BESS
The charging and discharging of the BESS is governed by Equation (9).
where W B.i is the BESS energy at i-th interval, µ i = P B.i,ch P B.i,dch is a column vector that contains charging and discharging powers of the BESS while η B.ch and η B.dch are the respective charging and discharging efficiencies.T is the step time for simulation.P B.i,ch is the positive (+ve) value of P B.i and P B.i,dch is the negative value of P B.i whenever it occurs.It should be noted that at any time interval only one value will exist in the µ i vector and the other value will be zero.

Electricity Import and Export Tariffs
A variable time-of-use tariff offers different electricity prices at different hours of the day to reduce the stress on electrical network and to improve the load factor of the power grid.In this work, a variable tariff known as 'peak-valley tariff' is deployed for both import (buying) and export (selling) of the electrical energy [37,38].This tariff has three rates (i.e., peak, plain, and valley) for different time slots of the day as explained in Table 1.Comparing the buying (T b ) and selling (T s ) tariffs in Table 1, it is evident that the values of both tariffs are different for their respective time intervals.The value of T s is actually less than T b to incentivize the buyer (in this case utility) to purchase electricity from the SH.The values of T b and T s are normalized with respect to the peak tariff and are used in Equation ( 13).

Optimization Model
The main purpose of an EMS is to optimize the power generation and use of different sources and loads to minimize the total cost while satisfying the load and devices constraints.This operating schedule of devices is performed one day ahead to ensure their effective use.The current section proposes an IHEMS for the SH optimization model.The 24-hour operational cost minimization of the SH is the ultimate objective of this paper subject to the following assumptions: 1.
The forecasted data for wind and PV, and the thermal and electrical loads is available.

2.
The EV daily trip distance as well as the initial energy levels of the BESS, are known.3.
The system installation costs are neglected.

Objective Function
The objective function is to minimize the total operating cost of the SH for 24-hours, as expressed in (10).T b , T s Multipliers for Buying, Selling tariff as described in Table 1 η FC.i FC efficiency It should be noted that P U.i will be positive for purchasing and negative for selling electrical power to the utility.

Constraints
The devices installed and power requirements in the SH have certain mechanical and electrical operating limits.Therefore, constraints related to power balance and devices are defined in the following subsections.

Electrical Power Balance
If load shedding is to be avoided, the system should meet the electrical demand completely.When BESS is charging, the electrical power balance should be: and in the discharging interval of the BESS, the electrical power balance should be:

Thermal Power Balance
The thermal power is provided by FC and auxiliary boiler, therefore, following constraint must be satisfied to balance the thermal power requirements of the SH.
where H FC.i is the heating produced by FC (kW) and H BL.i is the auxiliary boiler output (kW) at interval i. H D.i is the thermal demand of the SH.

Constraints of Devices
The constraints applying to the devices in the SH are given as below.

Constraints of FC
For the smooth operation of the FC, the rate of change in its output power is subjected to ramp rate constrains.
Similarly, FC output is also bound by the minimum and maximum limits of power generation.
where ∆P FC up , ∆P FC dn FC ramp up, ramp down rates P FC min , P FC max FC minimum, maximum power limit

Constraints of EV
The following EV charging and SOC limit must be taken into account to prevent damage to the EV battery.
SOC EV min ≤ SOC EV.i ≤ SOC EV max (22) where P EV chmax is the upper limit of EV charging power in (kW) and SOC EV max denotes the maximum possible SOC of the EV battery.

Constraints of BESS
The following constraints for minimum and maximum energy of the BESS must be fulfilled.
Depending on whether the BESS is charging or discharging, the rate of change of energy in the BESS in succeeding hours is limited by the maximum charging and discharging rates of the BESS power.
During charging interval: During discharging interval:

Renewable Energy Generation
The powers from wind and PV systems depend on the weather.Figure 4 shows a typical power curve of wind and PV [39].During the daytime (10:00-17:00), wind power fluctuates sharply, while PV generates at its peak.PV stops working during the night because of the unavailability of the irradiance from the sun, while wind power generates its peak output energy.These two curves are used as estimated (forecasted) curves for wind and PV power in this model and mean to peak ratios of the values in these curves are 53.16%,26.46% respectively.However, the forecasting of loads and renewable energy resources is a complex task.The data obtained from the forecast has a direct influence on the scheduling of system devices performed in the optimization model.The prediction modeling of renewable power generation has been a hot issue and it requires numerous factors to be considered.Researchers have developed a variety of prediction models.A wind-prediction framework based on chaotic time series and singular spectrum analysis is presented in [40].Barque et al. presented the use of retraining machine learning algorithms to improve wind power prediction [41].Results suggest a 17% increase in the prediction accuracy compared to persistence approach.A hybrid model for renewable energy and load prediction based on data mining is proposed in [42].The outputs of these models (and others like them) enable us to use the optimization model to work out the power generations of energy resources for the forthcoming day.The main focus of this paper is to develop the optimization model for the SH.Therefore, it neglects the prediction and control models.
The right section of Figure 5 presents the flowchart for the RCGA-based optimal scheduling process.The details of these modules are presented in the next section.

Real Coded Genetic Algorithm
The optimization models based on modern heuristics show better results in comparison to the conventional derivative-based models.Based on evolution in nature, Genetic Algorithm (GA) is one of the most popular algorithms used in power system applications.RCGA is an improved version of the GA which yields comparatively better results for real-valued numerical optimization problems.In RCGA, the population variables are represented by floating point or integer values in contrast to the GA which represents them as binary variables.Studies show that the RCGA generally result in faster convergence, more consistency, and higher precision in comparison to the GA [43][44][45][46].This work uses RCGA to model and solve the optimization problem of IHEMS, and a summary of the steps involved in this process is presented in the following sections:

Step I: Initialization
Like other global optimization techniques, the first step in RCGA is to generate the initial population.This initial population is called chromosomes.The chromosomes are composed of genes where each gene represents power (kW) of a certain device installed in the SH.If N is the total number of genes in a chromosome, then the position of i-th gene is represented as: It is important to take into account the dimensionality of the IHEMS.The system presented in this work is constitutes of dependent and independent variables.The independent variables are used by the RCGA for optimization.Here P FC , P EV , and P B are the independent variables.With their use, and with the use of fixed variables of power demands and renewable resources, the remaining dependent variables of H FC , P U , H BL , PLR, η FC , r TE etc. are computed.Finally, these variables are used in Equations ( 11)-( 14) to calculate the cost.
The RCGA calculates the cost of the SH for a 24 h period.The time interval used in this study is 1 h.Therefore, the IHEMS is studied for 24 time sections with 3 variables (P FC , P EV , P B ) in each interval resulting in the size of optimization problem N = 24 × 3 = 72.
Expression below represents one chromosome of the RCGA with each power denoting one gene of the chromosome.
P EV

Step 2: Implementation of the Constraints
The system constraints for P FC.i , H BL.i and P EV.i are checked during each time interval.The equations governing this step are given in Section 3.2.2.The logical process and variable operations in the RCGA for the fulfillment of these constraints are given in the flow chart in Figure 5.

Selection
The selection of the fittest individual to the successive generation is a significant process in the RCGA.The individuals (chromosomes) are carefully chosen for the succeeding generations based on their fitness value.Ranking, tournament, and roulette-wheel are some commonly used selection strategies.In this work, the selection procedure is carried out by the roulette-wheel selection method [47].

Crossover
For the RCGA to be able to successfully search the promising solution, the search space must be reachable by the initial population.To ensure this global search property of the GA, a crossover operation is used.This operator performs a crucial role in RCGAs.In reality, it is regarded as its defining characteristic [48].It should be observed that during the process of generating intermediate populations, all chromosomes are not subject to this operator.An arbitrary choice is made, where the chance of crossover application on a chromosome pair is determined by the crossover rate also known as the crossover probability, P c [49].

Mutation
The mutation operator randomly modifies one or more genes of a certain chromosome to enhance the fundamental variability of the population.Without mutation RCGA can prematurely converge to sub-optimal solutions.The role of this operator is to reinstate the unexplored or lost; but possible solutions into search space of the population.Mutation ensures a non-zero probability of the RCGA algorithm to arrive at any solution in the search space.All positions of each chromosome in the population has an arbitrary chance of undergoing into a random alteration.This alteration chance is defined by a mutation rate, or mutation probability, P m .Muhlenbeins Mutation operator described in [50] is used in this work.
With crossover and mutation, another selection approach, called elitism is also adopted to make certain that the best performing chromosomes always survive unharmed from the previous to the subsequent generations [51].

Simulation Results
This section presents multiple simulation scenarios to demonstrate the important features of the proposed optimization model.The RES, FC, BESS, variable tariff and EV are added incrementally into the IHEMS as summarized in Table 2.In all the cases, the electric power can be purchased from and sold to the utility and the auxiliary boiler is available for thermal power requirements.Note: ='yes', ='no'.
Figure 6 shows the normalized electrical and thermal load requirements of a typical SH [52].The peak electricity and thermal demands are 1.8 kW and 2 kW, respectively for the SH.For the EV, a Mitsubishi's compact i-MiEV is used in this work [53].The U.S. National Household Travel Survey (NHTS) is used to select EV parameters of T i , T o and d [35,36].The numerical values of the parameters used in this study are summarized in Table 3.

Base Case
In this mode of operation, electrical load is powered by the utility and the thermal load is supplied by the gas boiler.No other devices are available in this case as shown in Table 2.The operating cost of the house in this case is $6.84 per day, and it will be used as a reference for later cases.

Case 1: Addition of RES
In this mode of operation, a solar and wind-based RES is installed in the SH with the following considerations:

•
In supplying the electrical loads, the wind and solar power resources must be given priority.

•
Heating is still provided by the auxiliary boiler.

•
Bidirectional power flow is considered.In this way, the consumers can sell surplus electric energy to the utility.

•
The RES curve in the subsequent figures is the summation of both wind and PV output powers in each time interval.
Figure 7 shows the optimal allocation of HES where the negative utility powers indicate the utility power purchase from the SH.In the intervals 01:00-05:00, 11:00-16:00 and 23:00-24:00 the electrical load is less than the total RES generation, and the SH is selling excessive energy to the utility.The peak loading in the system occurs in 06:00-10:00 and 17:00-22:00 when the RES cannot fulfill the demand, therefore, the power is purchased from the utility.The daily operational expenses of the SH are $2.6272 in this case.

Case 2: FC Included
In this case, the FC-based micro-CHP system is included in the IHEMS.Thermal output of the FC and the boiler satisfy the thermal load demand, while the RES and electrical output of the FC supply the electrical load of the house in combination with the utility.
As shown in Figure 8, the FC is idle in the early hours of the day.At 6:00 A.M., when the load demand exceeds the RES power, the FC starts its operation to meet the load demand.Most of the time, no power is purchased from the utility in this mode while selling the surplus power during 01:00-05:00, 11:00-16:00 and 23:00-24:00 time intervals.However, at 18:00 the combined output of the FC and the RES is unable to meet the load demand.Therefore, electric power is purchased from the utility during this hour.An important observation in this case is the low power operation of the FC during 11:00-16:00.The reason behind this behavior of the FC is the consideration of startup and shutdown costs of the FC in the developed model.The inherent nature of the RCGA is to move towards an optimal cost; therefore, the algorithm calculates and compares if it is beneficial to shut down the FC or to keep it operating at a lowest optimum level.During this time period, the FC is running at its minimum possible output described as P FC min .The daily operational cost of the SH is $2.3968 in this case which is a decrease of 8% as compared to Case 1.

Case 3: BESS Included
In this case, a BESS is added to the SH which can store the surplus power available in the SH. Figure 9 shows the optimal hourly allocation of the BESS proposed by the IHEMS.A detailed explanation of BESS charging and discharging and its energy routing dependence upon the efficiency has already been presented in [33] by the same authors.The operational cost of the SH is $2.337 in this case which is a reduction of 3% compared to case 2.

Case 4: Variable Tariff Considered
In this case, a peak-valley tariff is considered for the purchase and sale of electricity as given in Table 1.The hourly allocation of the HES is similar to what was observed in Case 3.However, total cost in this case is $2.30 which is a drop of 2% in comparison to the cost in case 3.This difference is comparatively small although a substantial cost saving was anticipated because of peak-valley tariff.This is due to the fact that price for selling the excessive electricity has reduced too in intermediate and valley periods of the tariff to incentivize the buyer.
Case 5 and 6 evaluate the impacts of EV charging on the utility loading and the SH's daily energy cost.The study of EV charging is divided into two cases: Case 5 considers the EV charging without any scheduling, and Case 6 has three charging strategies which consider the schedulable EV charging.Table 4 summarizes the characteristics of four electric vehicle supply equipment (EVSE) for EV charging.The impact of these charging techniques on charging powers of EV and utility loading are presented in Figure 11 and 12.In this case, an EV is added to the SH which is charged by a charging strategy named as EVSE-1.The EV charges with a constant rate of maximum charging capability of the charger which is 3.3 kW.It presents itself as a constant load from the time it is plugged-in (T I ) until it gets fully charged as shown in Figure 10.A comparative view of this charging technique with others EVSEs is depicted in Figure 11.This is the simplest charging strategy, termed as "dumb charging".
In this case, the cost has increased to $3.58 due to power demand by the EV.This type of charging method exerts a significant loading on the utility.The maximum utility loading in this case is 3.02 kW at 20:00 as shown in Figure 12.

Case 6: Scheduling of the EV Charging
In this case, EV is modeled as a schedulable load and gets scheduled considering it a responsive demand.An EVSE type is selected from Table 4 from EVSE 2 to 4. Under this case, the EV is scheduled and charged in such a way that the overall cost of powering the SH decreases.The demand response algorithm shifts the EV charging considering multiple factors.These factors are prioritized according to the cost of power.The first priority is the availability of power from the RES.The EV gets charged in those hours when RES generation is available after fulfilling critical load demand.The second priority is to shift the EV charging to the hours of valley tariff.The proposed IHEMS schedules the charging of the EV using various EVSEs as explained in the following subsections:

EVSE-2
In this charging strategy, the EV is charged with the same charger as that of EVSE-1 with an added capability of turning on and off at a particular hour as commanded by the IHEMS.This mode shifts the charging of the EV on the time axis as shown in Figure 11.The charging time is shifted depending upon the utility tariff or status of HES.
Figure 11 shows that the charging time is shifted from (T I ) to the low utility tariff window (i.e., 23:00 to 08:00).The EV is charged from 22:00 to 23:00 and then charging is stopped from 23:00 to 02:00 due of the unavailability of surplus power from the RES.Although the RES power is not zero from 23:00 to 02:00, it must meet the demand of critical loads (please refer to Figure 7 for the RES generation and load demand curves).The charging starts again at 03:00 when surplus wind energy is available.
In this mode of charging, the peak utility loading occurs at 23:00, but this peak is less than the peak observed for EVSE-1 in Case 5.The maximum utility loading of 2.49 kW is noted in this case which is a 17.6% reduction compared to EVSE-1 as shown in Figure 12.The energy cost is $3.30 which is an 8% reduction in comparison to EVSE-1.

EVSE-3
This charging strategy implements a variable charger with discrete charging powers.An example is the Siemens VersiCharge systems [54].This work considers the discrete power values of {3.3, 3, 2.7, 2.4, 2.1} kW, and the charger can turn on and off according to the signals from the IHEMS.Figure 11 shows that EV charging has expanded to 5 h as compared to EVSE-1 and EVSE-2.This charging strategy enables the EV to get charged more from the RES, and consequently, the utility loading decreases as shown in Figure 12.The peak utility load decreases to 1.14 kW at 01:00, which is a 62% decrease as compared to EVSE-1.

EVSE-4
This charging strategy considers an adaptive charger and EV gets charged rigorously according to the continuous values of power given by the IHEMS.Intuitively, the algorithm tries to follow the RES power availability trend to charge the EV as shown in Figure 11.The RES power is used at its maximum level, and the utility loading decreases further to 0.31 kW at 05:00 as shown in Figure 12.This is a decrease of 90% compared to EVSE-1.The reason for this large reduction in utility loading is the adaptive nature of EVSE-4 that resulted in the EV charging time expansion to 14 h in search for the surplus power from the RES.The cost of 24-hours operation of the SH decreases to $3.24 which is 9.5% less than the cost for EVSE-1.Figure 13 presents the electrical powers of each device installed in the SH, and Figure 14 shows the thermal powers from the FC and boiler for this case.The cost comparison between EVSE-1 and EVSE-2 shows a cost reduction of 8% although EVSEs for the two cases have the same constant charging powers.This difference is due to considering the EV as a schedulable load.The impact of different chargers on cost is minimal as the difference between EVSE-4 and EVSE-2 is only 1.5%.However, in comparison to EVSE-1, the peak load on the utility decreases by 17.6%, 62% and 90% by using EVSE-2, EVSE-3, and EVSE-4, respectively.Therefore, the scheduling of the EV is beneficial for the power system operator as it reduces the urgent need for generation capacity enhancement and expansion of transmission and distribution networks.This is the case in many places around the world.Toronto, Canada [55] and Perth, Western Australia [56], are the examples of two places where this is a big concern and researchers advised using the controlled charging schemes for reducing the loading impacts of the EVs.
A summary of the costs of the boiler, the FC and the utility is presented in Table 5 for each case.Savings in the net cost relative to the previous and the base case is also presented at the end of this table.A negative utility cost shows a net profit to the SH for 24 h.A negative saving value relative to the previous case represents an increase in the SH operating cost as shown by −55 % for case 5. Figure 15 shows the convergence of RCGA for Case 6.It is evident that the algorithm moves rapidly towards the optimal solution in the initial generations, and takes around 600 generations to converge at the optimal cost.6 provides the numerical values of the power demands and generations, and the costs for the 24-hours operation of the SH.The costs for the FC, boiler, and utility make a major part of the total cost of the SH.The total cost for the operation and maintenance of the BESS is very small (i.e., $0.0062 per day), and is not shown in the cost table.This table can serve as a look up table for the comparison purpose by the future researchers if they work on similar simulation conditions.

Conclusions
The present climatic and economic circumstances of the world necessitate an increased role of HES and EVs at domestic levels, and a significant research work is devoted to effectively accommodate their role.Adding to the existing literature, this work defined and modeled an IHEMS in the framework of modern SHs to optimize their economic operation using RCGA.To meet the thermal and electrical demands, the developed SH model included a HES which (in an all-inclusive case) consisted of natural gas-based micro-CHP system and electric power from a utility, a BESS, a wind turbine, and a PV system.In this study, a modern utility grid which allows a bidirectional power flow was considered where the customer can sell their surplus energy to the utility.Keeping in view the high loading impacts of the EV, typical EV charging methods were incorporated, and their impact on the SH's economy was discussed.The developed IHEMS optimally scheduled the energy resources and EV charging simultaneously, and resulted in a cost-effective economic operation of the SH as indicated by the simulation results.A comparison of costs and savings of SH devices was summarized to show the features of the developed model.Moreover, a comparison of different EVSEs showed that flexible charging mechanism was beneficial for both the customer and the utility.The work revealed that optimal use of HES improved the economy of SHs while reducing the utility loading in the presence of EVs.This work may be extended in future to include stochastic behavior of various components of SH.Similarly considering thermal energy storage devices and a bidirectional flow of thermal energy in the proposed model may yield interesting results.

Figure 1 .
Figure 1.A smart house overview.

Figure 2 .
Figure 2. Typical Model of an FC.

Figure 3 .
Figure 3. Representation of part load ratio's role on efficiency and thermal to electrical ratio of FC.

Figure 4 .
Figure 4. Wind and PV Power Curve.

Figure 5
Figure5presents the IHEMS.Its left section shows three main parts: forecast, optimization, and online control.The forecast model uses external forecasting data and foretells the generations from PV and wind, and predicts the electrical and thermal demands.The optimization model uses these predicted values and produces the optimized schedule for these devices to minimize the operational costs.The control model gets input from the online measurements, and balances the generation and load because of the inherent difference between the forecasted data and the actual requirement.However, the forecasting of loads and renewable energy resources is a complex task.The data obtained from the forecast has a direct influence on the scheduling of system devices performed in the optimization model.The prediction modeling of renewable power generation has been a hot issue and it requires numerous factors to be considered.Researchers have developed a variety of prediction models.A wind-prediction framework based on chaotic time series and singular spectrum analysis is presented in[40].Barque et al.  presented the use of retraining machine learning algorithms to improve wind power prediction[41].Results suggest a 17% increase in the prediction accuracy compared to persistence approach.A hybrid model for renewable energy and load prediction based on data mining is proposed in[42].The outputs of these models (and others like them) enable us to use the optimization model to work out the power generations of energy resources for the forthcoming day.The main focus of this paper is to develop the optimization model for the SH.Therefore, it neglects the prediction and control models.The right section of Figure5presents the flowchart for the RCGA-based optimal scheduling process.The details of these modules are presented in the next section.

Figure 5 .
Figure 5. Flow chart of the proposed IHEMS with RCGA.

Figure 6 .
Figure 6.Daily thermal and electric power demands.

Figure 7 .
Figure 7. Installation of RES and Utility Bidirectional Power Flow.

Figure 8 .
Figure 8. Hybrid energy supply with the FC.

Figure 9 .
Figure 9. Optimized generation schedule with BESS included.

Figure 10 .
Figure 10.Optimized generation schedule with EV included but unscheduled.

Figure 12 .
Figure 12.Power purchased from the utility with different EVSE.

Figure 14 .
Figure 14.Contribution of FC and the boiler to satisfy the thermal demand in system.

Table 1 .
Electricity Import and Export Variable Tariffs.
FC.i , C BL.i , C U.i , C B.i Total cost of the FC, Boiler, Utility, BESS at interval i ($) Electrical power purchased from, or sold to, the utility at interval i (kW). C

Table 2 .
Illustration of the test cases.

Table 5 .
Summary of costs and savings for each case.

Table 6 .
Powers and Costs.