1. Introduction
High residential energy demand has significantly increased energy costs globally. Climate change and pandemics have accelerated global residential energy consumption. In the United States, the residential energy demand has increased many folds, while in the European Union, residential power consumption increased to 26.3% in 2019 [1]. According to the energy information administration, in the last ten years, the rate of residential electricity in the U.S. has risen by 15% [2,3]. Moreover, this trend will likely continue as the estimated 80% additional increase in residential buildings by 2050.
Furthermore, combined with rising fuel prices like coal, natural gases are only likely to increase the electricity rate. However, uncertainty in producing power from renewable energy resources RER caused by the intermittent nature of the RER will lead the utility to face additional operational challenges. The residential sector is one of the most energyintensive segments and offers considerable scope to implement various power optimization methods and technologies.
Over the years, primary energy sector research has focused on various innovative techniques to address the rising demand for a stable energy system. With the modern smart grid, benefits such as energy usage reduction, cost reduction, and increased overall grid efficiency can be reaped. Managing the residential load demand by effectively scheduling the residential devices is crucial to achieving these benefits. Energy management can be broadly classified into supplyside management (SSM) and demandside management (DSM). Widespread adoption of DSM by consumers for their home energy management has been reported due to associated economic benefits [4,5]. The concept of demand side management includes all the activities which aim at modifying the consumption load curves focusing on increasing customer benefit and improving system reliability subject to the uncertainties of consumption profile. Several previous research works have emphasized the development of an improved DSM.
Employing renewable energy resources (RERs) for residential energy offers several personal and public benefits. On a personal level, using RERs provides urban consumers with a costeffective green solution to reduce their dependence on the utility grid and remote energy sources. RERs have little to no carbon emissions compared to fossil fuels, resulting in reduced environmental impact, which helps mitigate global warming. Smart Home Energy Management Systems (SHEMS) integrates RERs and energy storage systems (ESS), improving sustainability, efficiency, energy conservation, and reducing energy costs while coping with everincreasing energy demand. The most preferred model for smart homes globally comprises a combination of photovoltaic (PV) and ESS to meet the dynamic energy demand. However, climatological conditions, especially solar irradiance, significantly impact energy generation by PV modules [6].
During the COVID19 pandemic, an increasing number of people have opted for the home office, and some countries even declared work from home a legal right of the people. Spending more time at home has made residential consumers more conscious regarding their quality of life, thus increasing the significance of the consumer satisfaction aspect of energy consumption. The waiting time is considered one of the key evaluation criteria for consumer satisfaction. Therefore many scheduling algorithms aim to reduce the waiting time to achieve a higher consumer satisfaction level [7]. Previous research mostly focused on reducing energy costs but gave trivial satisfaction to the consumers. An adequate consumer satisfaction indicator is necessary to make consumers choose the most costoptimal load scheduling. Thus, a more holistic load management approach involving consumer satisfaction and energy cost reduction is needed. Few previous works have emphasized the relationship between consumer satisfaction and managing comfort conditions [8,9,10]. Manzoor et al. elaborated on the relationship between the factors like energy usage, cost, and the level of consumer discomfort. They designed a teacher learning and genetic algorithmbased hybrid optimization algorithm without considering the possibility of renewable energy [11]. The consumer discomfort is aggravated when either the operation time of devices is delayed or the consumer’s power demand for powerflexible devices is compressed. A multiobjective model was proposed by considering factors like consumer satisfaction and the economy, and its effectiveness was demonstrated by numerical simulations [12]. However, the study did not consider the integration of renewable energy. In [13], consumer satisfaction and usage rate of renewable power were considered to develop an optimization algorithm to curtail the daily electricity bill. However, this work considered an offgrid scenario where the system was entirely dependent on renewables, and the utility grid was not considered. Whereas, in [14,15] author uses the state flow method to resolve the problem of load shedding while the author does not consider consumer satisfaction. An algorithm for demand satisfaction was developed to achieve maximum consumer comfort at a minimum price for various budget scenarios [16]. The concept of a twotier consumer satisfaction [17], i.e., time and devicebased satisfactions, was utilized in [18] for optimization by a single objective competitive grey wolf algorithm design to enhance the consumer satisfaction level under a predefined budget. The results suggested that higher consumer satisfaction can be achieved with an increasing budget. However, the system is less reliable as it is only dependent on the grid. Furthermore, the comprehensive state of the art is listed in Table 1. ? and ? sign shows that the reference considered that attribute in the research or not respectively.
Considering the relevant stateoftheart, the author has found the following research gaps:

The problem of optimal home appliance scheduling objective considered either reducing the cost or comfort level of the consumer. A predefined limited budget leaves the consumer with limited scheduling options; thus, tradeoff solutions are needed between the percentage satisfaction and cost per unit satisfaction index.

In general, the proposed strategies lack the flexibility to adapt to diverse situations and systems. In that context, energy export to the grid, as well as demand response, becomes pertinent features, which are challenging to manage using stateoftheart strategies because they usually do not consider demand response and prosumer scenarios.

To the best of the author’s knowledge, most of the relevant works have only provided a comparison of results acquired from various demand response incentive programs without considering the effect of RERbased EMS on demand response programs. Furthermore, the current strategies lack the versatility to conduct such comparisons conveniently.
This work develops a novel approach for the comprehensive design of intelligent appliance scheduling with the RERESS system at the smart home level, intending to address the aforementioned challenges. The presented strategy is premised on home appliance scheduling, which is raised as a multiobjective problem and solved analytically by developing a novel multiobjective binary grey wolf accretive satisfaction algorithm (MGWASA), providing tradeoff solutions between an optimal set of cost with best satisfaction level. Demand response programs are considered by including the time and device preferences of the consumer, along with the different TOU tariffs for all seasons. Unlike previous approaches, the stability of the system is modeled using scenarios, which are based upon actual data and included in the optimization problem. The main contribution of this work and salient features of the proposed methodology includes the following:

(a). Proposes modified consumer satisfaction objectives where the importance of device and operational time is incorporated through time and device preference tables. Novel MGWASA that integrates consumer preferences with RERs in a smart home environment provides tradeoff solutions between cost and user satisfaction.

(b). Different scenarios generated through the approach are analyzed to effectively utilize the RERs for improved reliability. For the aforementioned purpose, a rulebased EMS for a smart home, which integrates RERs with the intelligent scheduling of appliances, is also proposed.

(c). To validate the improved efficacy of the proposed MGWASA for versatility and universal applicability, a comparative analysis with the binary nondominated sorting genetic algorithm2 (NSGAII), multiobjective binary particle swarm optimization algorithm (MOBPSO), Multiobjective artificial bee colony (MOABC), and multiobjective evolutionary algorithm (MOEA), is also provided.
The rest of the article is structured as follows: Section 2 presents the architecture of the proposed test case system. Section 3 describes the modeling and parameters of different smart home units, including PV, ESS, preference, and satisfaction. Section 4 illustrates the climatological conditions and energy demand of the study location. Section 5 presents the proposed EMS and its modes of operation. Section 6 introduces the proposed MGWASAbased intelligent EMS and formulates the problem of the case study. Section 7 presents, discusses, and analyzes the simulation results. The conclusion drawn from the work and outlook is provided in Section 8.
2. The Architecture of the Proposed Test Case System
The decision to switch on or off a device is based on factors like supplied energy from the utility grid and PV, the status of the batteries, and consumer preferences. In this work, the pricing scheme considers a time of use (TOU) pricing policy used in Quetta, Pakistan. An overview of SHEMS architecture is shown in Figure 1 to provide a holistic picture. SHEMS consists of a central controller with intelligent EMS and a scheduler. Central controller with EMS takes other parameters like available PV energy and level of stored energy in the ESS and regulates them according to the load demand of the consumer. On the other hand, the scheduler takes the estimated values of PV energy and $SOC$ of the ESS and provides day a head optimal scheduling pattern of appliances. The load consists of the appliances divided into a section of the small home, as shown in Figure 1. Appliances are scheduled according to the algorithms executed via the scheduler, thus making it the most vital module of the SHEMS. The scheduler utilizes a user interface to acquire the dayahead energy usage demand for individual time slots from the smart home consumer. Moreover, the appliance manager uses this schedule to control the switching activities of the appliances via the home area network (HAN). The HAN is an inhome private network that interconnects appliances with the appliance manager using wireless or/and wired technologies.
3. Mathematical Modeling and Parameters of the Smart Home Units
To design a smart home environment, modeling is divided into two sections: (1) modeling of RERs, which includes PV and ESS, and (2) modeling of the consumer preferenceenabled system. Due to the intermittent nature of RERs, it is necessary to understand the behavioral characteristics in actual meteorological conditions of the relevant locality by modeling, numerical simulation, and evaluating the PV system. The mathematical model of PV from [27] is considered in this paper. The technical and economical specifications and the product models of elements are also reported.
3.1. PV Module Modeling
The output power of the PV module ($PO{W}^{pv}$) is mainly dependent on the sun’s irradiance and ambient temperature (${T}^{amb}$). For a time interval $t$, the $PO{W}^{pv}$ can be calculated as [11]:
(1)$PO{W}^{pv}={N}^{pv}\times {P}_{r}^{pv}\left(G/{G}^{ref}\right)\left[1+{T}^{cof}\left({T}^{c}{T}^{ref}\right)\right]$
where ${N}^{pv}$, ${P}_{r}^{pv}$, $G$, ${G}^{ref}$, ${T}^{cof}$, ${T}^{c}$, and ${T}^{ref}$ represent the estimated number of required PV modules at each iteration of the sizing process [27], the rated electrical power capacity of the PV module (W), the irradiance of the sun (W/m^{2}), the value of solar irradiance at reference conditions taken as 1000 (W/m^{2}), temperature coefficient of PV module (generally rated as 3.7 × 10^{3} $\xb0{\mathrm{C}}^{1}$ for mono and polycrystalline silicon [28]), the cell temperature, and the temperature at benchmark performance testing conditions (usually taken as 25 °C), respectively. The cell temperature ${T}^{c}$ can be calculated by [29]:
(2)${T}^{c}={T}^{amb}+\left(\left(\left({T}^{noct}20\right)/800\right)\times G\right)$
where ${T}^{noct}$ symbolizes a crucial PV module performance parameter termed nominal operating cell temperature (°C) and is defined as the temperature achieved by opencircuited cells in a module when subjected to specific conditions. The PV manufacturers generally provide this value as part of their product specification data. In this work, a 36cell monocrystalline solar module (STP275S20/Wem) with a power rating of 275 W is taken into consideration [28]. Table 2 provides the economic and technical aspects of the considered PV module.
3.2. ESS Module Modeling
A battery bank is necessary to store the energy generated by intermittently available solar energy. Therefore, it is also required to know the state of charge ($SOC$) of the battery bank [30]. When the power generation from the PV module ($PO{W}^{pv}$) is more than the consumption, the battery is considered to be in the charging mode. For instance $t$, the amount of charge, can be calculated by the following equation:
(3)${E}_{BT}\left(t\right)={E}_{BT}\left(t1\right)\xb7\left(1s\right)+\left(PO{W}^{pv}\xb7{?}_{inv}\frac{{P}_{l}\left(t\right)}{{?}_{inv}}\right)\xb7{?}_{BT}$
where $s$, ${?}_{BT}$, and ${?}_{inv}$ represent the selfdischarge percentage (taken as 0.007%/h [31]), battery charging/discharging efficacy (rated as 85% for either case [32]), and efficiency of the inverter, respectively. For the case where power generation from the PV module is insufficient to meet the demand, the battery is considered to be in discharging mode, and the corresponding amount of charge is calculated as:
(4)${E}_{BT}\left(t\right)={E}_{BT}\left(t1\right)\xb7\left(1s\right)+\left(\frac{{P}_{l}\left(t\right)}{{?}_{inv}}PO{W}^{pv}\xb7{?}_{inv}\right)/{?}_{BT}$
The battery can meet the load demand with the proviso that $SOC\left(t\right)$ is more than the minimum SOC ($S\underset{\_}{O}C$). Likewise, surplus PV power generation can be used to charge the battery module to the point where $SOC\left(t\right)$ is equal to the maximum SOC ($S\overline{O}C$). The load demand along with the preferred autonomy day ($AD$) are taken into consideration to estimate the battery capacity (${B}_{cap}$) in Amperehour (Ah) [33]:
(5)${B}_{cap}=\frac{AD\xb7{E}_{L}}{{?}_{inv}\times {?}_{BT}\times DOD\times {V}_{S}}$
where ${E}_{L}$, ${V}_{S}$, and $DOD$ denote mean daily energy demand, system voltage (assumed as 48 V), and battery’s depth of discharge, representing the battery percentage that has been discharged with respect to battery capacity, respectively. Equation (6) estimates the number of batteries connected in series ($nB{T}_{ss}$), while Table 2 provides the specifications of the battery module under consideration.
(6)$nB{T}_{ss}=\frac{{B}_{cap}}{Max\_{P}_{s}}$
where $Max\_{P}_{s}$ denotes the maximum count of parallel strings. The number of batteries in the individual series string ($nB{T}_{ss}^{\text{'}}$) is calculated by:
(7)$nB{T}_{ss}^{\text{'}}=\frac{{V}_{B}}{{V}_{s}}$
where ${V}_{B}$, denotes the voltage of the battery bank. The desired aggregate quantity of batteries is computed by:
(8)$TnB=nB{T}_{ss}\times nB{T}_{ss}^{\text{'}}$
The smart home utilizes deepcycle leadacid batteries based on ESS, which are widely employed owing to their affordability, wide availability, modest performance, and life cycle properties [34].
3.3. Consumer Preference and ComfortEnabled System Modeling
A smart home typically consists of various electrical and electronic devices installed in different residence sections. The smart home under consideration contains six portions, each having different smart devices which provide varying satisfaction levels to the consumer during the course of the day. Furthermore, the power required by each device also varies according to its functionality. Table 3 lists the type and section of these devices, their quantity, and energy ratings. The evaluation of the cost of use is based on the energy tariff acquired from the energy provider in Quetta, Pakistan.
Consumers usually allocate a limited budget for their electricity demands. Therefore, a scheduling algorithm’s primary goal is to regulate appliance usage patterns to achieve the highest consumer satisfaction level with a minimum budget. Consumer satisfaction provides a comparative view of the consumer’s expectations versus their perceived experience. Consumer satisfaction tends to get higher when the scheduling algorithm schedules the appliances closer to consumer preferences.
Consumers can assign different preference values to individual devices for each hour of the day. To achieve the goals of this work, the following assumptions regarding preference are made:

(1). Preference is a quantifiable value, and its numerical analysis is possible.

(2). Preference is fuzzy in nature, implying that it has a progressive transition among the lowest (pr = 0) and highest (pr = 1) preference values.

(3). Preference is both comparable and relatable. Two modes of relativities are defined: timebased relativity and devicebased relativity.
In timebased relativity, the device’s preferences, which are assigned for different time periods of the day, vary according to time. For instance, Table 4 provides timebased preferences, ranging from 0 to 1, which are indexed rowwise (viz. horizontally) by the consumer. On the other hand, in devicebased relativity Table 5, the consumer indexes the data columnwise (viz. vertically) for hourly time slots over 24 h. This consumer preference table compares a particular device’s preference to other devices for a specific hour. Consumer preference tables (Table 4 and Table 5) were acquired from middleclass residents living in Quetta, Pakistan. For example, Table 4 and Table 5 show the consumer preferences for the summer season, where consumers require excessive air conditioning compared to other seasons. Consumer preference for other seasons was also acquired and considered for this work.
During the pandemic, more people are forced or opting for home office, resulting in commutation exclusion. Consequently, morning residential energy demand peaks have been postponed, and residential energy usage at noon has increased by 23% to 30% [29]. This changed daily routine is also reflected in the consumer preference tables (Table 4 and Table 5).
Time and devicebased preferences are taken into account to determine the absolute satisfaction, ‘${\mathsf{\mu}}_{s\left(k\right)}\left({t}_{i}\right)$’ and is calculated by [35]:
(9)${\mathsf{\mu}}_{\mathrm{s}\left(\mathrm{k}\right)}\left({\mathsf{t}}_{\mathrm{i}}\right)=\sqrt{\raisebox{1ex}{${\left({\mathsf{?}}_{\mathrm{k}}^{\mathrm{T}}\left({\mathsf{t}}_{\mathrm{i}}\right)\right)}^{2}+{\left({\mathsf{?}}_{\mathrm{k}}^{\mathrm{D}}\left({\mathsf{t}}_{\mathrm{i}}\right)\right)}^{2}$}\!\left/ \!\raisebox{1ex}{$2$}\right.}?i=\left[1,24\right]$
where time and devicebased preferences of appliance $k$ at instance $i$ are represented by ‘${?}_{k}^{T}\left({t}_{i}\right)$’ and ‘${?}_{k}^{D}\left({t}_{i}\right)$’, respectively. Table 6 shows the absolute consumer satisfaction table derived from time and devicebased preferences for summer. Figure 2 illustrates the seasonal absolute satisfaction levels.
4. Climatological Conditions and Energy Demand of the Study Location
To accurately design and evaluate the capabilities of the proposed algorithm, accurate climatological data is required to emulate realworld conditions while performing different calculations for this work. As far as this study is concerned, the actual climatological data for the year 2017 of Quetta, Pakistan, was used. This data was acquired from World Bank via ENERGYDATA.info [36]. Quetta city has GPS coordinates of 30°10'59.7720? N and 66°59'47.2272? E. This region has plenty of sunlight and low cloud cover throughout the year. The irradiance and temperature are measured using a solar station which records these values in 10 min time intervals throughout the year. The measured air temperature and solar irradiance of the selected location are shown in Figure 3. This annual climatological data was used as input for the calculations performed in this study. Figure 3 also shows the annual residential load at the study location.
5. Energy Management System for Integration of RER and ESS
The intermittency (seasonal/diurnal) and volatility of renewables exclude the possibility of exclusively relying on RERs for catering to the energy demand, which adds to the complexity of designing an EMS. The EMS optimally executes different modes of energy flow in light of consumerassigned satisfaction levels. ${P}_{l}$, $PO{W}^{pv}$, $SOC$, $S\underset{\_}{O}C$, and $S\overline{O}C$ form the basis for the definition of primary strategies. The algorithm uses subsystem models defined in Section 3 to calculate the energy production from RERs by considering the initial $SOC$ value and regional meteorological data. Subsequently, the MGWASAbased algorithm determines the optimum switching pattern based on this data and consumer input (consumer satisfaction). Our work defines the following four primary operation modes to implement the proposed SHEMS:

Mode I: Provided adequate solar energy is available to cater to the energy demand, surplus energy is used to charge the battery bank, given that the battery is not fully charged.

Mode II: The surplus solar energy is exported to the grid as long as the energy produced by the PV can fulfill the residential load demand and the battery bank is fully charged.

Mode III: In the case where the energy produced by the solar cannot meet the load demand, the energy available in the battery bank is utilized to cater to the remaining load demand.

Mode IV: When the load demand is more than the energy provided by PV and battery bank, then the remaining load demand is catered by the energy imported from the grid.
The flowchart of the implemented algorithm for SHEMS, involving the operation modes defined above, is drawn in Figure 4.
The EMS (Section 5) and preferenceenabled system of the smart home (Section 3.3) is combined with the application of realtime data in the MGWASA to obtain a set of appliance scheduling solutions. The detail of the proposed algorithm is provided in the next section.
6. Proposed MultiCriteria Grey Wolf Accretive Satisfaction Algorithm (MGWASA)
Even though the GWO algorithm is relatively new, its shortcomings have limited its usage to single optimization problems. Recently, a few variants of GWO have been introduced to deal with multiobjective problems [37]. It is also not feasible to directly employ the multiobjective GWO algorithm to handle multiobjective feature selection or load scheduling problems because it was originally designed to handle continuous optimization tasks. However, with the addition of the squashing activation function, a binary MGWO variant was proposed to tackle the abovementioned tasks [38,39]. This binary MGWO is combined with the preferencebased smart home model and EMS to develop an MGWASA. The binary population represents the scheduling patterns of the appliances. The equation formulated for updating the position is given as:
(10)${x}_{d}^{t+1}=\left\{\begin{array}{cc}1\hfill & ifsquash\left(\frac{{x}_{1}+{x}_{2}+{x}_{3}}{3}\right)=rand\\ 0\hfill & otherwise\end{array}\right.$
where ${x}_{d}^{t+1}$ represents the position amended according to binary, $d$ represents dimension, $t$ is the iteration, and $rand$ indicates a random number extracted from distribution uniform $?\left[1,0\right]$. While ${x}_{1}$, ${x}_{2}$, and ${x}_{3}$ denote positions of alpha, beta, and gamma wolves, respectively. $squash\left(a\right)$, ${x}_{1}$, ${x}_{2}$, and ${x}_{3}$ are given as:
(11)$squash\left(a\right)=\frac{1}{1+{e}^{10\left(x0.5\right)}}$
(12)${x}_{1}^{d}=\left\{\begin{array}{cc}1\hfill & \left({x}_{a}^{d}+bste{p}_{a}^{d}\right)=1\\ 0\hfill & otherwise\end{array}\right.$
(13)${x}_{2}^{d}=\left\{\begin{array}{cc}1\hfill & \left({x}_{\xdf}^{d}+bste{p}_{\xdf}^{d}\right)=1\\ 0\hfill & otherwise\end{array}\right.$
(14)${x}_{3}^{d}=\left\{\begin{array}{cc}1\hfill & \left({x}_{?}^{d}+bste{p}_{?}^{d}\right)=1\\ 0\hfill & otherwise\end{array}\right.$
(15)$bste{p}_{a,\xdf,?}^{d}=\left\{\begin{array}{cc}1\hfill & ifcste{p}_{a,\xdf,?}^{d}=rand\\ 0\hfill & otherwise\end{array}\right.$
where $cste{p}_{a,\xdf,?}^{d}$ represents continuous step size value and is expressed as
(16)$cste{p}_{a,\xdf,?}^{d}=\frac{1}{1+{e}^{10\left({A}_{1}^{d}{D}_{a,\xdf,?}^{d}0.5\right)}}$
Figure 5 summarizes the process of the proposed MGWASA. Time and devicebased preference tables, appliance power rating tables, irradiance, and temperature data are taken as input to the algorithm. Irradiance and temperature data are used to estimate the PV power production, whereas time and devicebased preference tables form the basis for the satisfaction table. All of these values are further required to formulate the multicriteria objective function.
6.1. MultiObjective Problem Formulation of DSM
The proposed multicriteria device scheduling in the smart home consists of formulating an optimization problem that constitutes the objective function, constraints, scheduling pattern, and stateoftheart metaheuristic optimization algorithm described in the subsequent subsection.
6.1.1. MultiCriteria Objective Function
Three main objective functions are of great importance in the design of a smart home, namely, the economic aspect objective (cost), the technical aspect objective (reliability), and the comfort aspect (consumer satisfaction). These objectives conflict with each other; for example, cost increases exponentially by increasing reliability and consumer satisfaction. Similarly, by decreasing the reliability and comfort level, cost decreases. Intrinsically, sets of nondominated objective functions known as the Pareto front are preferred to be calculated. The cost of energy which covers the financial aspect, and consumer satisfaction which covers the comfort aspect, are the two objective functions considered for minimization. Whereas the reliability of the system is improved by the integration of RERs into the system. The mathematical formulation of this constrained optimization problem is described in the following.
Cost per Unit Satisfaction Index (${C}_{s\_index}\left(\$\right)$)
Energy cost is related to the satisfaction level of the consumer. ${C}_{s\_index}\left(\$\right)$ is the measure of total consumer expenditure ($T{U}_{exp}$) related to the derived consumer satisfaction (${\mu}_{s}$) as shown in Equation (19)). $T{U}_{exp}$ represents the total consumer energy cost, which is the product of total energy consumption ($TEC$) and energy tariff when the load is only powered by the utility grid, while the $T{U}_{exp}$ is changed when RER is integrated into the system. The cost of PV, battery, and inverter is also added in the $T{U}_{exp}$ along with the cost of the load run by the utility grid as shown in Equation (11)). The contribution of the utility grid is based on the available amount of PV energy and $SOC$ set point. $TEC$ is computed by summation of the total operating time ($TOT$) of all the appliances with the specified power rating ($PR$).
(17)$Obj\left({C}_{s\_index}\left(\$\right)\right)=\mathrm{min}({C}_{s\_index}\left(\$\right)$
(18)${C}_{{s}_{index}}\left(\$\right)=\frac{T{U}_{exp}\left(\$\right)}{{\mu}_{s}}$
(19)$T{U}_{exp}=\begin{array}{c}TEC\times UTor\hfill \\ Gri{d}_{E}\times UT+{C}_{PV}+{C}_{ESS}\end{array}$
(20)${C}_{PV}=\frac{\left({C}_{WP}\times {P}_{C}\times {N}^{PV}\right)+{C}_{REG}}{L{S}_{PV}}+{C}_{OMPV}\times {N}^{PV}$
(21)${C}_{ESS}=\frac{{C}_{kWB}\times TBC}{L{S}_{BAT}}+{C}_{OMBAT}+\frac{{C}_{inv}}{L{S}_{inv}}$
(22)$\mathrm{TEC}=\underset{\mathrm{n}=\mathrm{A}}{\overset{\mathrm{Z}}{{\displaystyle ?}}}\left({\mathrm{TOT}}_{\mathrm{n}}\times {\mathrm{TPR}}_{\mathrm{n}}\right)$
where, ${C}_{WP},{P}_{C},{N}^{PV},{C}_{REG},{C}_{OMPV},\mathrm{and}LS$ represent cost per unit watt, panel capacity, number of panels, regulator cost, yearly PV O&M cost, and lifespan of the module. The yearly cost of the battery is calculated in Equation (21) where ${C}_{kWB},TBC,{C}_{OMBAT}\mathrm{and}LS,{C}_{inv}$ represents the cost per unit kilo watt, total battery capacity, operational and maintenance cost, the lifespan of the module, and inverter cost.
Consumer Satisfaction or Percentage Satisfaction
The energy cost is generally directly proportional to the consumer’s comfort or satisfaction level. However, a clear relationship between consumer satisfaction and cost must be established. For this purpose, the satisfaction level is quantified by the consumer’s time and devicebased preferences. A mathematical model is created that relates consumer satisfaction with energy cost. The second objective of the problem is to maximize consumer satisfaction; the formulation of consumer satisfaction is given in Equation (24).
(23)$Obj\left({\mu}_{s}\right)=\mathrm{max}\left({\mu}_{s}\right)$
(24)${\mathsf{\mu}}_{s\left(k\right)}\left({t}_{i}\right)=\sqrt{\raisebox{1ex}{${\left({?}_{k}^{T}\left({t}_{i}\right)\right)}^{2}+{\left({?}_{k}^{D}\left({t}_{i}\right)\right)}^{2}$}\!\left/ \!\raisebox{1ex}{$2$}\right.}$
(25)${S}_{desired}=\underset{\mathrm{h}=1}{\overset{24}{{\displaystyle ?}}}\underset{i=A}{\overset{Z}{{\displaystyle ?}}}{\mu}_{s\left(i\right)}\left({t}_{\mathrm{h}}\right)$
(26)$\%S={\mathrm{S}}_{\mathrm{achieved}}/{\mathrm{S}}_{\mathrm{desired}}$
6.1.2. Constraints
Constraints related to the optimization of the objective function are as follows:
If interval [${\xdf}_{l}$,${?}_{l}$] does not include $t$, then the scheduling vector ${s}_{l}\left(t\right),$ which represents the status of load in the ${t}^{th}$ scheduling interval must be zero.
(27)${s}_{l}\left(t\right)=0,t<{\xdf}_{l}?l?SL$
(28)${s}_{l}\left(t\right)=0,t>{?}_{l}?l?SL.$
A battery always exhibits a unique operating modality, defined as
(29)${B}_{c}\left(t\right)+{B}_{f}\left(t\right)+{B}_{d}\left(t\right)=1$
where ${B}_{c}\left(t\right)$, ${B}_{f}\left(t\right),$ and ${B}_{d}\left(t\right)$ represent the charging, floating, and discharging modes of operation of the battery for the interval $t$, respectively.
The battery manufacturer defines certain maximum and minimum boundaries for battery parameters, i.e., charging and discharging power and status of the charge. These constraints are described as
(30)$S\underset{\_}{O}C=SOC=S\overline{O}C$
(31)${P}_{BCmin}={P}_{BC}\left(t\right)={P}_{BCmax}$
(32)${P}_{BDmin}={P}_{BD}\left(t\right)={P}_{BDmax}$
where ${P}_{BC}\left(t\right)$ and ${P}_{BD}\left(t\right)$ denote the battery power while charging and discharging, respectively. The maximum and minimum power limits for charging and discharging are represented by ${P}_{BCmax}$, ${P}_{BCmin}$, and ${P}_{BDmax}$, ${P}_{BDmin}$, respectively.
Excess power above a certain limit may cause instabilities in the utility grid. Therefore, at a certain time interval $t$, the exported power to the utility grid ${P}_{E}\left(t\right)$ must never exceed a limit ${P}_{Emax}\left(t\right)$ set by the energy provider.
(33)${P}_{E}\left(t\right)={P}_{Emax}\left(t\right)$
(34)${P}_{E}\left(t\right)={P}_{R}\left(t\right)\left({P}_{l}\left(t\right)+{P}_{B}\left(t\right)\right)$
where ${P}_{R}\left(t\right)$ represents the expected power from RER, while ${P}_{B}\left(t\right)$ is the net battery power for the interval $t$.
7. Simulation Results and Discussion
This part validates the devised EMS employing MGWASA via a case study comprising diverse residential loads, RER and ESS. Residential loads studied in this work are located in six different sections of the residence. Table 3 provides the electrical and economic parameters of these devices. The smart home utilizes deepcycle leadacid batteries based on ESS, which are widely employed owing to their affordability, wide availability, modest performance, and life cycle properties [34]. Technical specifications of the employed battery are tabulated in Table 2. A roofmounted RER system comprising PV panels is taken into consideration in this work. The rated capacity of an individual PV panel is 0.275 kW. The electricity tariff data is taken from QESCO, the local energy provider in Quetta, Pakistan. The estimated energy production from the PV is based on the data acquired from a World Bank’s financed weather monitoring station installed in Quetta region [36]. Furthermore, MATLAB^{®} is employed to implement the MGWASAbased EMS. All the results were obtained by numerical simulations performed on a computing system having an Intel^{®} Core™ i58250U CPU with 8.00 GB RAM.
Three cases are considered for simulation to verify the proposed scheduling mechanism’s efficiency. In the first case, it is assumed that the smart home does not contain RER and ESS. Therefore, MGWASA is applied to all smart home appliances powered entirely by the utility grid. On the other hand, the second case covers a smart home’s full potential by integrating RER and ESS in the system alongside appliance scheduling by MGWASA. The third case also considered RER and ESS integration; however, the appliance switching pattern is taken directly from the consumer preference table without optimal appliance scheduling. For further validation, the performance of MGWASA for Case 1 and Case 2 is also compared with stateoftheart optimization algorithms: NSGAII, MOBPSO, MOABC, and MOEA.
7.1. Size Optimization of PV and ESS in a Smart Home
Both ESS’s PV modules and battery units require considerable investment. Several aspects of cost, such as investment net present cost, replacement cost, O&M cost, federal incentives, import/export of electricity, and cost related to power outages over the project’s lifespan, must be considered in this regard. To efficiently utilize renewable resources and increase the proposed system’s reliability, sizing is optimized using a genetic algorithm (GA), based on [40], against the annual load obtained from consumer preference. Time intervals of one hour are taken during the sizing process. Various technical and economic parameters of PV and battery units are given in Table 2. The initial investment is capped at 10 k$, while 0.3 is taken as the PV energy factor.
Furthermore, 100 and 20 are the population size and generation count for the sizing problem, respectively. The optimal sizes of PV and ESS are 9.35 kW (34 PV panels) and 11 kWh, respectively. It is worth mentioning that these optimal sizes are calculated against the consumer preferencebased load demand for the entire year.
7.2. Validation of the Load Scheduling and Energy Management by MGWASA
Before performing the optimization by MGWASA, the algorithm shown in Figure 5 was executed for an entire year, covering all four seasons, to validate its longterm robustness and resilience. In this regard, the minimum allowed $SOC$ value of ESS is taken as 30% resulting in a DOD of 70%. The PV module employed here consists of an array of 34 panels, providing a rated power of 9.35 kW, while the ESS has a rated capacity of 11 kWh. Figure 6 and Figure 7 show the working mechanism of designed EMS for an entire year, as well as a few samples of each season, illustrating the switching and energy flow of and between different system components according to the load demand. Figure 7a shows that at the start of the day (00 h), the ESS (dotted blue line) is at its minimum allowable storage limit ($SOC=30\%$). Therefore, the load demand (black dash line) is catered to by importing the power from the utility grid (brown shaded area