An Enhanced System Architecture for Optimized Demand Side Management in Smart Grid

: Demand Side Management (DSM) through optimization of home energy consumption in the smart grid environment is now one of the well-known research areas. Appliance scheduling has been done through many different algorithms to reduce peak load and, consequently, the Peak to Average Ratio (PAR). This paper presents a Comprehensive Home Energy Management Architecture (CHEMA) with integration of multiple appliance scheduling options and enhanced load categorization in a smart grid environment. The CHEMA model consists of six layers and has been modeled in Simulink with an embedded MATLAB code. A single Knapsack optimization technique is used for scheduling and four different cases of cost reduction are modeled at the second layer of CHEMA. Fault identiﬁcation and electricity theft control have also been added in CHEMA. Furthermore, carbon footprint calculations have been incorporated in order to make the users aware of environmental concerns. Simulation results prove the effectiveness of the proposed


Introduction
World population and energy demand are increasing rapidly.The provision of reliable and sustainable energy services according to 21st century requirements is becoming more challenging day by day [1][2][3].Real-time monitoring, dynamic control and users' active participation in energy services are vital to ensure a sustainable future.The traditional grid is not supposed to provide such dynamic services because of its aged infrastructure.It is needed to convert the traditional grid into a smart grid in order to meet the energy management challenges [4][5][6].The smart grid is envisioned to provide sustainable energy services dynamically and efficiently to fulfill the requirements of meeting the ever increasing demand and addressing the green concerns.Various applications of smart grid are mentioned in literature such as smooth integration of renewable resources, transmission and distribution automation, optimized energy management etc. [7,8].
Demand Side Management (DSM) is one of the important aspects of optimal energy management in which consumers' behavior is influenced to manage the electricity consumption [9].Home Energy Management Systems (HEMS) are found among important smart grid applications to ensure DSM [10,11].HEMS help in peak load reduction and consumers' total energy cost minimization by using embedded sensors and Advanced Metering Infrastructure (AMI).Consequently, use of peaker plants and carbon footprint are reduced, which are desirable and important for sustainable future [12].
Although peak load reduction can be achieved in several different ways, appliance scheduling is one of the promising methods for this purpose.A novel energy management mechanism, namely Comprehensive Home Energy Management Architecture (CHEMA), is presented in this paper.CHEMA consists of a six-layer model with multiple scheduling options, and it has been implemented in Simulink with embedded MATLAB code.Important contributions of this work are listed as the following:

•
A unique HEMS architecture which covers more aspects of the residential energy management problem and multiple cost minimization options integrated at the second layer; • Formulation of optimization problem which is unique with the concept of partial base line load and its inclusion in the optimization problem, discussed in detail in Section 3; • Control of lighting and heating loads with the help of a Persons Presence Controller (PPC); • Solution of the energy cost optimization problem with a single Knapsack technique with embedded Matlab code in Simulink.
The remaining paper is arranged as follows.Section 2 presents related work and Section 3 is dedicated for the proposed architecture.The results are elaborated in Section 4 and conclusions are drawn in Section 5.

Related Work
Various pricing strategies have been designed for users' energy cost minimization [13].For instance, a day ahead pricing scheme has been used in [14] for appliance scheduling in order to minimize total energy cost.Authors in [15] proposed a Linear Programming (LP) model to optimize the home energy consumption and total cost.In this model, a full day is divided into equal length time slots with changing prices just like Time of Use (ToU) tariff.
A Dynamic Demand Response Controller (DDRC) has been designed in [16].The purpose of DDRC is to control the Heating Ventilation Air Conditioning (HVAC) unit according to Real-Time Pricing (RTP) signals.The controller considers thermal properties of construction materials in order to calculate the thermal insulation and losses.DDRC switches between cooling and heating modes on the basis of threshold temperature and has been tested on a single family house model.DDRC is limited to the HVAC only, and we have presented a cost minimization model with three load categories and multiple scheduling options.
Authors in [17] have proposed a distributed DSM model in which users are equipped with energy storage facilities.Game theory has been applied in the proposed model to set the energy consumption and the storage game.Distributed algorithms ensure users' privacy and cost minimization.
A Model Predictive Control (MPC) framework has been proposed for peak load shaving by optimal use of storage batteries in [18].Markov process and an "update" algorithm have been used to predict a user's location and update the energy matrix accordingly.This model considers the single user location for prediction of energy consumption.Our proposed model, CHEMA, considers a multiple number of users present in different time slots to control lighting load and hot water consumption.
A system architecture has been presented in [19], which includes three layers.The first layer is the named Admission Controller (AC), and it uses the modified spring algorithm for management of requests of appliances.The second layer is used for optimization of home energy management and is called the Load Balancer (LB).Mix integer programming is used at this layer to generate the optimized schedule for appliances.The third layer is proposed for the smart grid interface and has not been implemented in the scheme.We have proposed a new CHEMA model, which consists of six layers and multiple energy management options for users.CHEMA is based on enhanced load categories, multiple scheduling options and flexible user comfort index with relaxed temperature limits.Unique features of CHEMA include: use of multiple cost minimization options with a single Knapsack technique with inclusion of partial base line load in optimization problem.The same model includes the theft and faults detection capability along with calculations of green effects at residential level.The model also takes account of the number of users present at home to control the partial base line load and hot water consumption.Inclusion of these features make CHEMA a unique comprehensive model.On the basis of the discussion above, we have included the following features in CHEMA.
The proposed system architecture in [19] has three layers.However, there are certain aspects regarding HEMS, which should be included in the HEMS architecture to make it more comprehensive, i.e., inclusion of green effects, detection of theft and faults at residential level and incorporation of multiple pricing schemes in order to use it at different occasions.
Generally, three categories of appliances have been used in literature: base line load, regular load and burst load.Base line load consists of essential loads such as fans, lighting, etc.This type of load can be included into schedulable load on partial or half basis.
The definition of thermal comfort zone instead of sharp threshold to switch on/off the thermal loads is also helpful in cost minimization and peak load reduction.Suitable comfort zone definition, and its implementation is also necessary for comprehensive energy management architecture.
Total cost minimization for a single user has been done extensively in literature; however, the effect of the users present at different times effects the load consumption.The effect of the number of the persons present for lighting loads and hot water consumption cause effective reduction in the total cost.
We are proposing a six-layered architecture, CHEMA, which includes the above mentioned features.Energy cost minimization problem with multiple options has been solved at the second layer of CHEMA.Details of CHEMA are elaborated on in the subsequent section.

Proposed CHEMA and its Implementation
This section elaborates on the details of CHEMA and its implementation.Household appliances could be characterized on the basis of energy or power consumption.A major portion of the household appliances, almost 63%, consists of energy based loads and is very useful for DSM purposes [20].These loads include water heaters, space heaters, air conditioners and refrigerators.We have added these basic loads in CHEMA with least impact on user comfort.Our proposed model consists of six layers: Appliance Interface (AI), Optimized Energy Cost (OEC), Theft and Faults Detection (TFD), Green Effects (GEs), Demand Prediction (DP), and Dynamic Pricing.Basic layout of the proposed CHEMA is depicted in Figure 1.The first layer is used for the appliance interface, i.e., basic parameters used for modelling of various appliances and energy cost minimization algorithm are provided using a MATLAB (R2007a, National University of Science and Technology (NUST), Islamabad, Pakistan) file.Appliance rating, required slots, and capacity is loaded through this file.The second layer is used to execute four different cases of the energy cost minimization.The results of the second layer are used to detect the electricity theft and faults at the third layer.Finally, green effects are calculated at the fourth layer, and purpose of this layer is to motivate the users to reduce the energy consumption by displaying carbon emissions at users' premises.
The fifth layer is demand prediction, which is not implemented in our work; however, the purpose of including this layer in CHEMA is to enhance its capability of energy cost minimization in the context of short term load forecasting of users' load.The sixth layer is proposed for the dynamic pricing information.It is supposed that, in the smart grid environment, users are equipped with an advanced communication and control link with utility through the smart meter in order to get the real-time pricing information.The utility is also capable of monitoring the users' consumption in real-time by using the same communication link.We have used the ToU pricing scheme in CHEMA; however, the purpose of the dynamic pricing layer is to propose the inclusion of dynamic scheduling ability to CHEMA in the context of real-time information obtained from utility.We have implemented four out of the six layers in this paper.In CHEMA, all the appliances are interfaced with the first layer and basic parameters of all the appliances are loaded into the MATLAB workspace.In the case of missing parameters while loading, the model generates the error message and does not proceed to the next layer.The second layer is dedicated for energy cost optimization.Four energy management and cost minimization cases are implemented at this layer: unscheduled energy cost model, unscheduled with PPC, scheduled with PPC and scheduled with flexibility.The single Knapsack optimization technique is used for scheduling options.The third layer is used for theft and fault detection purposes and is based on a malicious node detection strategy.Whenever faults (e.g., phase to ground fault) occur, the model detects it and a beep is generated for a user's immediate attention.The fourth layer is used for GEs.The remaining two layers are proposed for demand prediction or load forecasting effects and dynamic pricing, respectively.ToU pricing scheme has been used in this model.However, various dynamic pricing models may be implemented at this layer.Complete flow chart of CHEMA is depicted in Figure 2.After the basic parameters' initialization at AI, the CHEMA algorithm checks for value of S, which stands for schedulability.If the value of S is 1, the algorithm goes to scheduling options; otherwise, it goes to unscheduled options.Furthermore, it checks for two parameters: P and F, which stand for PPC and flexibility, respectively.If P = 1, CHEMA activates the unscheduled with PPC energy cost minimization option; otherwise, it is confined to the unscheduled option.If F is one, the flexibility option is actuated.Whichever option is actuated, the power consumption, temperature variations and total cost results are displayed accordingly.In Figure 2, I i represents the appliances current and I s represent the source current.Now, the running or operational appliances are interfaced simultaneously with TFD and GE layers.Faults and theft are detected at the third layer, and the user is informed about abnormal conditions by beep generation.Carbon footprints are calculated in the fourth layer in order to make users more conscious about environmental concerns.Runtime observation of cost and carbon footprints surely affects the users' energy consumption behavior.Various aspects and modules of CHEMA are explained in subsequent sections.

Load Categorization
Home appliances are categorized with respect to different aspects in literature [21].Generally, there are three major categories of home appliances: essential load or baseline load, regular or continuously running load and burst or schedulable loads.In CHEMA, load has been divided into the following categories and subcategories.
The first category is of essential load which includes: lighting, fans and communication equipment only.Lighting can be divided into sub categories of off-peak lighting in such a way that peak lighting is at least up to half of the off-peak lighting.
where χ shows the total lighting load and χ OP denotes off-peak lighting load.This load is partially added in the scheduling problem.Inclusion of essential loads on a half-basis as indicated in Equation ( 1), such as lighting load, is the enhancement in the optimization problem presented in [19].
It will minimize the cost more effectively with the control of the lighting in peak hours.Therefore, base line load is partially added into scheduling problem.In addition, in off-peak hours, the lighting is controlled on the basis of no. of persons present in the house.If the set of time slots is presented by T = {T 1 , T 2 , ..., T N } and T N is the total no. of time slots and the set of persons is presented as P = {P 1 , P 2 , ..., P N } , and P N shows the maximum no. of persons in the house, then where, T 1 , T 2 , etc. belong to T. The second major category is of regular or continuous running loads which include: refrigerator, central heating/cooling, water heater etc.The third major category is of schedulable loads which include: water pump, electric iron, washing machine and dishwasher, etc.We are introducing flexible load categorization, which is explained with the help of the following scenarios: • HVAC temperatures are given a tolerance band yet maintain reasonable comfort of the user, • Hot water consumption is controlled with PPC, i.e., on the basis of persons present at home.

Energy Cost Optimization Model
In light of the above discussion, the scheduling problem has been formulated for a set of appliances APP = {1, 2, ..., N} in a horizon of 24 equal time slots, which are represented by a set of T = {T 1 , T 2 , ..., T N }.Appliances' power rating and per unit energy cost are used for calculating the cost for each category of the load.If A ij , R ij and B ij represent the burst, regular and partial baseline loads and a ij , r ij and b ij represent the ON and OFF states of the corresponding category with 1 and 0 values, respectively.The optimization problem will be as follows: The final objective function can be written as: subject to: where c j electricity cost in time slot j C A capacity of burst load C R capacity of regular load C χ capacity of partial baseline load j time slot T total time horizon a ij appliance ON/OFF status C t total electricity cost.
The binary optimization problem described in Equations ( 4), (4a), and (4b) is solved for different scheduling options using the single Knapsack technique.Implementation of various Simulink modules is described in subsequent sections.

Pricing Scheme
There are various pricing strategies in dynamic energy management modeling such as ToU, RTP, CPP, etc.In CHEMA, the ToU pricing scheme is used and rates are taken as Pakistani Rupees (PKR) 10.0/kWh (0.094 USD) for off-peak hours, PKR 12.0/kWh (0.113 USD) for mid peak and PKR 15.0/kWh (0.141 USD) for peak hours.The scheme is implemented in Simulink with clock and embedded code as shown in Figure 3.Rates of this module are used at various places to compute the energy cost.

Space Heating Module
The space heating module calculates the heating cost on the basis of the modelled environment, thermal parameters of premises and the heating system.Initial room temperature is taken as 20 • C or 68 • F. The model is based on the following differential equations [22,23]: where dQ dt represents the flow of heat from heater into the room, T h is heater temperature, T r is room temperature, m dot is the mass of air, and c is the specific heat capacity of the air.Room temperature variations are calculated on the basis of net heat flow by considering the heat losses as elaborated in the following equations: where R eq represents the equivalent thermal resistance of the room."Thermostat" block is used to switch ON and OFF the heater with 5 • F variations.The heater subsystem is shown in the Figure 4.

Water Heater and Refrigerator Modules
The water heater is another important load with thermal storage capability used in CHEMA for energy management.Water heaters are considered the second largest load among household appliances and consume about 30% of the total energy consumed [24].Electrical energy supplied to water heaters is divided into two parts: one is used for heating of cold water and the other is consumed for compensation of heat losses from tank to ambient.There are two ways for heat loss in water heaters: one is conduction losses through walls of the heater and the other is temperature drop by water drawn for usage and entry of colder water for compensation.Energy flow analysis of the water heater provides the following differential equation to determine the inside temperature of water.On the basis of heat flow, the water heater model is given by the following equation [24]: Water temperature inside the heater is represented on left hand, ambient losses, energy required for water heating and total input are taken on the right hand side of the equation.Refrigerator modeling is based on Equation (9) as follows: where T o , T r and T w represent the outdoor temperature, the room temperature and wall temperature, respectively.This equation gives the approximate temperature of the refrigerator wall.
The refrigerator system consists of three subsystems.The first and second subsystems are used to implement the wall and indoor temperatures, respectively.The third subsystem compares the indoor temperature and set point to turn ON/OFF the refrigerator.The same module is used to convert the joules into watts and perform subsequent cost calculations according to given rates.

TFD
Electricity theft and fault identification are important user concerns which are also addressed in CHEMA.There are many ways for theft detection and minimization [25,26].One simple approach is that whenever a line to ground fault occurs or some theft attempt is made, there is a change of total current of house loads.This fact is used in the development of faults and theft identification module.If I s is the total current required by all the on appliances and I 1 , I 2 , .....I n represent the "n" appliance current then, where I i represents the i th appliance current and I s shows the source current.Fault is detected in real-time and a beep is generated for users' immediate attention.

GEs
Another layer of environmental concerns or green effects has been introduced in order to relate the residential energy consumption to the Green House Gases (GHGs) emission or carbon footprint.Carbon footprints are defined as "the total sets of GHG emission caused by an organization, event, product or person" [27].GHGs in the earth's atmosphere are water vapor, carbon dioxide, methane, nitrous oxide and ozone.These gases absorb and emit radiations within thermal infrared range and cause the GEs.
In order to make the calculations simple, Wright, Kemp, and Williams have suggested the definition as: "the measure of total amount of CO 2 and Methane (CH 4 ) emission of a defined population, system or activity, considering all relevant sources, sinks storage within the spatial and temporal boundaries of population, system or activity of interest" [27].
The reduction of carbon footprints by developing alternative projects such as solar and wind energy is called carbon offsetting [28].GHGs can be measured by monitoring the emissions continuously or by estimating the data related to emissions, i.e., (amount of fuel) and applying relevant conversion factors.Some of the conversion factors are calorific values, emission factors and oxidation factors.These conversion factors enable us to convert activity data into fuel liters, miles driven, tons of waste into kilograms of carbon dioxide equivalent, (CO 2 )e, which is adopted as universal unit of global warming potential.There are two categories of GHG emissions.The first is direct GHG emission, which is the emission at the point of use of a fuel or energy carrier (or in the case of electricity, prior to the point of generation).In other words, the emission from sources which are owned or controlled by reporting entity.The second type is indirect GHG emission, which is the emission emitted by the use of a fuel or energy carrier, i.e., as a result of extracting and transforming energy sources.Indirect emission, i.e., purchased electricity, extraction and production of purchased fuels and transport related activities in vehicles that are not controlled by a reporting entity.There are various parameters included in the GHG conversion factors for electricity consumption [28].Calculations of carbon emissions are performed as follows: If electricity consumption = 20,000 kWh, and emission factor [29] = 0.000689551 metric tons CO 2 /kWh, then Amount o f carbon dioxide = EC * EF, (11) where EC shows the electricity consumed in kWh, and EF represents the emission factor in Kg/kWh.Amount of carbon dioxide = 13791 Kg. (for above values of EC and EF).
These results are compared with emission of carbon from different sources in Table 1 [29].Relative reduction of carbon emission with different cases of CHEMA is provided in the results section.

Results and Discussion
In CHEMA, four layers out of six proposed layers have been implemented.Three regular loads consisting of room space heater, refrigerator and electric water heater ,and six burst loads of different ratings: two of 200 W and one of 265, 300, 400, 1000 W each, have been used.Five lights of 20 W each are used in lighting modules.PPC senses the presence of persons and controls the heating and lighting of the home accordingly.The ToU pricing scheme is used with the 24 timing slots of one hour each.Simulations were performed on a Intel core i3, 2.4 GHZ machine with 6 GB RAM.Results for four major categories of energy management architecture are elaborated on in the following subsections.

Case 1
In case 1, baseline, regular and burst loads for the proposed system are run without any control or scheduling mechanism in order to find the total load for a day. Figure 5 shows the total cost of unscheduled load and pricing scheme used, in which per unit prices of PKR 10/kWh (0.094 USD) for off-peak, PKR 12/kWh (0.113 USD) for mid peak and PKR 15/kWh (0.141 USD)for peak hours are used.We have used the conversion rate of 106 PKR equivalent to 1 USD.Figures 6-9 show cost, power and temperature variation of HVAC, refrigerator, water heater and lighting, respectively.Total cost in this case is PKR 1692.3.(15.96USD).

Case 2
In case 2, a strategy has been implemented to control the consumption of devices that are dependent on the number of persons present at home.In this case, PPC senses the presence of persons at home and controls home appliances accordingly.Lighting and hot water consumption are controlled with the help of PPC.The number of persons varies from three to five in different time slots.This technique is useful to minimize the cost and to enhance the system's reliability.Figures 10-13 show the PPC, pricing scheme, HVAC cost and lighting cost, respectively.It is evident that the usage of PPC has reduced HVAC costs to PKR 1301.1 (12.27USD).This provides a 22.9% savings in total cost.

Case 3
In case 3, PPC and a single Knapsack scheduling algorithm have been implemented together for further cost reduction in CHEMA.Figure 14 shows the total consumption cost for case 3, which has now been reduced to PKR 1283.3 (12.14 USD).

Case 4
The focus of case 4 is to develop a system that schedules the loads in context of users' comfort.Burst loads can only be operated at a scheduled time, otherwise the scheduler becomes ineffective, and the net cost will not be reduced as expected by the use of the scheduler.The parameter of User Comfort Index (UCI) is introduced to measure and ensure the user comfort.In UCI, the user has been provided with the flexibility to switch ON the desired burst load at any time according to his requirement; however, UCI asks users to provide some input about comfort level.The UCI is defined as the following:  When the scheduler is used to switch ON burst load, no change in these thresholds is required.When using the option of UCI, it is necessary to provide the required change in threshold levels to ensure the operation of burst load, which has now changed its priority and has become an essential load.There are some fixed slots in which the thresholds are relaxed automatically in order to implement the concept of flexible load categorization defined in Section 3. Now, these appliances go to standby mode and new settings are updated which are: HVAC 23 • C, refrigerator 10 • C and water heater 45 • C.These appliances will now be ON if the desired comfort is breached; otherwise, they will stay in standby mode till the burst load is switched OFF by the user.Figure 15 shows the results of UCI.When the burst load is activated under UCI, the threshold of every appliance changes and it goes to standby mode.In Figure 15, "1" stands for active and "0" stands for standby mode.The burst load is switched ON between 8:00 to 12:00 a.m.When burst load is activated, the threshold changes as depicted in Figure 15.It is clearly seen that before 08:00 a.m., the threshold of the refrigerator was 5 • C, but, after the activation of the burst load, the threshold has been changed.Switching the device to standby mode will provide the user an advantage, as in this mode, these appliances consume power almost equal to zero Watts.For instance, in Figure 16, power consumed by the refrigerator during this period is almost negligible.It is the same case for the water heater and HVAC.Table 2 shows total cost for load consumed for one day while carbon footprint results are tabulated in Table 3.

Aggregated and Total Energy Consumption Results
This section is dedicated for discussion of aggregated energy consumption of five major modules used in four different cases of CHEMA.The section also includes a comparison of total energy consumption of the four cases.
As discussed earlier, the five major modules include: space heating, refrigerator, water heater, lighting and burst load/scheduling module.Case one shows the operation of these modules without any scheduling or controlling technique except the use of regular load thermostats with predefined temperature settings.Aggregated energy consumption of five major modules for case one is shown in Figure 17.In Figure 17 and similar figures of following cases, modules 1 to 5 correspond to HVAC, refrigerator, water heater, lighting and burst load/scheduling modules, respectively.It is clearly seen that the highest consumption of energy is made by the space heating module (121.76 kWh) because of continuous usage and temperature limits.The minimum energy consumption corresponds to the lighting load, which is 1.92 kWh while total energy consumption for case one is calculated as 188.486 kWh.The second case of the CHEMA is unscheduled load with PPC controller, and the strategy of PPC consists of two parts: one is the control of lighting load according to the presence of persons at home, and the second is the control of regular loads according to the forecasted consumption of water demand.The forecasting is based on the EPRI model.The basic purpose of the EPRI model is to control the consumption of energy according to demand and save the wastage of energy on basis of forecasted demand.Loads with thermal storage capacity are ideal for DSM and application of the EPRI model on a regular load is helpful in saving total energy consumption and ultimately a reasonable reduction in energy cost.The EPRI model has been designed on the basis of data collected by eleven different companies.Parameters recorded during collection of data include latitude, air temperature, water temperature, etc.The model is based on strong statistical analysis, and it considers various categories of users along with the demographic and climatic factors.Initially, 16 variables were considered for the model, but, finally, the interdependent variables were dropped off and only 7 independent variables were included in the model.Results of the aggregated energy consumption of the second case are depicted in Figure 18. Figure 18 reveals a reasonable reduction in consumption of the HVAC, water heater and lighting load which is 19.17 kWh, 23.08 kWh and 0.78 kWh, respectively.Second case corresponds to total energy consumption of 145.17 kWh.
The third case of CHEMA includes scheduling of burst loads.The scheduling is based on the single Knapsack algorithm, which is inspired from an example of a thief with a sack in a shop to decide optimally the weights and values of the items constrained to the total capacity of the sack.Results of the third case are shown in Figure 19, and it can be seen that only a minor reduction in aggregated energy consumption and cost has been obtained.This is because of the fact that the total capacity of the burst load is limited to 4.28 kWh, which is merely 2% of the total regular load.Therefore, this case shows a reduction of 43.64 kWh energy consumption as compared to the first case and a further decrease of 0.33 kWh as compared to the second case.Case four of CHEMA has been designed in order to integrate the effects of users' comfort in the energy cost minimization model.The basic idea is to relax the temperature threshold limits of the regular loads as described in Equation (12).The changing of threshold limits is subject to activation of burst loads.Results of case four are mentioned in Figure 20.This case further reduces the aggregated energy consumption by 4.55 kWh by taking advantage of the regular loads' temperature limit relaxation.Total energy consumption of cases 1 to 4 is 188.486kWh, 145.173 kWh, 144.84 kWh and 140.29 kWh, respectively.It is clearly seen that there is a visible and reasonable reduction in case 2 to case 4 as compared to case 1 while a little bit more reduction is also caused among cases 2 to 4 by application of different strategies.In summary, case 2 corresponds to 23.11%, case 3 to 24% and case 4 to 25.7% energy cost reduction as compared to case 1. Table 4 shows the total energy consumption results of four cases.Our proposed model consists of six layers and has many unique features including the partial base line load concept.Regarding the energy cost minimization, the effect of the partial base line load is compared with the reference paper [19].Figure 21 shows the ToU pricing scheme, cost of the reference paper (Cost 1) and the CHEMA cost (Cost 2).The appliances' ratings are taken as the same as the reference paper, and the base line load is assumed to be 1000 W, which is dealt with the Equation (1).It is clearly seen that, in peak hours, the cost of our proposed model is less than the reference paper.

Conclusions
In this paper, we have proposed CHEMA for home energy management with multiple appliance scheduling options for peak load reduction and users' total energy cost minimization.UCI has also been included in CHEMA to ensure the least disturbance in users' comfort.CHEMA has six layers, and four of these layers have been implemented in Simulink with embedded MATLAB code.Simulation results have shown the peak load reduction of 22.9% for unscheduled load with PPC, 23.15% for scheduled load with PPC and 25.56% for scheduled load with UCI.Similarly, total cost reduction of 23.11%, 24% and 25.7% has been observed, respectively.Aggregated energy consumption of various modules used in four cases has also been investigated.Results of energy consumption show total energy consumption of cases 1 to 4 is 188.486kWh, 145.173 kWh, 144.84 kWh and 140.29 kWh, respectively.Implementation of the remaining two layers of CHEMA is planned in our future work.

whereτ:
initial time (h) T H (τ): initial temperature ( • F) T in : incoming water temperature ( • F) T out : ambient air temperature outside tank ( • F) T H (t) : temperature of water in tank at time t ( • F) Q : energy input rate as function of time (W) R : tank thermal resistance (m 2• F/W) SA : surface area of tank (m 2 ) G = SA/R (W/ • F) W D : water demand (L/h) C p : specific heat of water (W/ • Fkg) D : density of water = 1 kg/L B : D.W D .C p (W/ • F) C : (volume of tank)(density of water)
27 • C f or HVAC T min = 5 • C and T max = 10 • C f or Re f rigrator T min = 45 • C and T max = 55 • C f or Water Heater.

( 12 )
By default, the settings for appliances are: HVAC 27 • C, refrigerator 5 • C and water heater is 55 • C.

Figure 21 .
Figure 21.Comparison of total energy consumption of four cases.

Table 2 .
Cost comparison of different cases.

Table 3 .
Carbon emission reduction of different cases.

Table 4 .
Load comparison of different cases.