You are on page 1of 17

Applied Energy 282 (2021) 116145

Contents lists available at ScienceDirect

Applied Energy
journal homepage: www.elsevier.com/locate/apenergy

An Artificial Intelligence based scheduling algorithm for demand-side energy


management in Smart Homes
Helder R.O. Rocha a ,∗, Icaro H. Honorato a , Rodrigo Fiorotti b , Wanderley C. Celeste a ,
Leonardo J. Silvestre a , Jair A.L. Silva a
a
Federal University of Espírito Santo, Vitória-ES, Brazil
b Federal Institute of Espírito Santo, São Mateus-ES, Brazil

ARTICLE INFO ABSTRACT

Keywords: A new methodology, that combine three different Artificial Intelligence techniques, is proposed in this paper
Demand planning to solve the energy demand planning in Smart Homes. Conceived as a multi-objective scheduling problem,
Elitist Non-dominated Sorting Genetic the new method is developed to reach the compromise between energy cost and the user comfort. Using an
Algorithm II
Elitist Non-dominated Sorting Genetic Algorithm II, the concept of demand-side management is applied taking
Support Vector Regression
into account electricity price fluctuations over time, priority in the use of equipment, operating cycles and
K-means
a battery bank. The demand-side management also considers a forecast of a distributed generation for a day
ahead, employing the Support Vector Regression technique. Validated by numerical simulations with real data
obtained from a smart home, the user comfort levels were determined by the K-means clustering technique. The
efficiency of the proposed Artificial Intelligence combination was proved according to a 51.4% cost reduction,
when Smart Homes with and without distributed generation and battery bank are compared.

1. Introduction energy, a reduction in the cost of energy generated by alternative


sources, and an improving in the quality of the energy and the effi-
The current model of the electricity supply is inefficient because the ciency of the electric grid. They also provide reductions in technical
generation is performed centrally in large power plants electricity. In losses, as well as in the greenhouse gas emissions. On the other hand,
this circumstance, the energy needs to be transmitted over long dis- this new network configuration is more complex, mainly when it
tances and distributed to consumer units, spending up many resources
reaches high penetration levels of DGs, demanding new procedures of
on the construction, maintenance of all systems involved and high
operation, control, planning, and network protection.
levels of technical losses [1]. In addition, centralized generation tech-
The Smart Home (SH) concept is part of the smart grid paradigm,
nologies generally causes more environmental impacts than distributed
generation ones. From the consumer’s perspective, especially among incorporating smartness into dwellings to get more comfort with the
small and medium-sized consumers, electric energy has been used in minimum energy expenditure possible. One of the problems to be
an unintelligent way and practically without control. Added to these dealt with in a SG/SH is the Demand-Side Management (DSM), which
two perspectives, it is worth highlighting the fact that electricity has consists of planning, implementing and monitoring actions by the Dis-
become increasingly expensive [2]. tribution Network Operator (DNO), whose purpose is to allow greater
Facing this reality, Distributed Generation (DG) and Smart Grid (SG) control of the user over his energy consumption to promote the efficient
emerges as new paradigms of electricity supply and consumption. These use of electricity.
concepts are becoming more present in electric energy markets around The most common actions of a DSM are load management, strategic
the world. According to [1], DG can be defined as a generating source, conservation, power generation by the consumer and replacement of
small-sized, connected directly to the distribution system (low voltage obsolete equipment with newer and more efficient. DSM programs can
consumer network). Among the main DG technologies, it highlights the be divided into two categories, namely: the direct DSM, in which the
Microgrids [2], which have allowed the development of the Smart Grids
DNO determines the loads to be disconnected or reduced, according to
concept [3].
conditions specified in an interruption contract with the consumer; and
SGs are Microgrids with communication and control systems be-
the indirect DSM, where the consumer changes his demand in response
tween their elements, providing an optimized use of the produced

∗ Corresponding author.
E-mail address: helder.rocha@ufes.br (H.R.O. Rocha).

https://doi.org/10.1016/j.apenergy.2020.116145
Received 13 July 2020; Received in revised form 24 October 2020; Accepted 28 October 2020
Available online 10 November 2020
0306-2619/© 2020 Elsevier Ltd. All rights reserved.
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

to price signals generated by the DNO [4]. The last one is the focus of DSM problem with coordination among smart appliances using the
this work. dynamic programming approach. The coordination was achieved by
data generated from the appliances of multiple homes, employing
1.1. Related works heuristics. The resultant coordination reduced the electricity cost and
increased the user comfort.
Several works in the literature addressed some of the problems An overview that considers the implementation of Computational
emerged from DSM. Performance comparisons between DSM for in- Intelligence and Machine Learning strategies in DSMs is provided
dividual users and cooperative consumers, between deterministic and in [20], and in [21] the authors modeled 30 homes with different
stochastic DSMs, as well as between day-ahead and real-time DSMs sizes, lengths of operational time, and appliance power ratings. Some
were made in [5]. The authors of [6] focused in DSM for user-side load homes have a renewable energy sources and a battery storage units.
control in order to balance, more effectively, the demand-side with the The authors of [22] presented a survey where the studies are clas-
supply side, thus reducing demand peak. In the work presented in [7], sified into exact algorithms and metaheuristics to address the power
the approach focus was in a load allocation among different classes of scheduling problem in a smart home. The smart home system is
devices. The allocated electricity resources are demand, priority and modeled based on dynamic energy pricing schemes to motivate users
fairness, and the system has an energy storage to reserve energy during to schedule their smart home appliances. A Variable Neighborhood
low-price times to be used during high-price times. The implemented Search (VNS) metaheuristic was proposed in [23] in a DSM based on
algorithm reduces the peak demand and increases the efficiency of the the cooperative combination of activity plans. The method does not
system. depend on the installation of load-control devices, neither in knowledge
In [8], Kai et al. present a power scheduling problem for residential of the user about electricity or tariffs. The VNS optimization search
consumers with two types of electric appliances. One has a flexible plans that minimize both the cost of energy and discomfort. Rasheed
starting time and works continuously with a fixed power, and the et al. described in [24] an intelligent multi-agent based multilayered
second works with a flexible power in a predefined working time. The hierarchical control system for residential load management, under
optimization problem demonstrated the tradeoff between the payments real-time pricing environment. The major objectives was to reduce peak
and the discomfort. The authors of [9] consider a multi-residence with load demand, electricity cost, and user discomfort. In [25], a DSM
multiple classes of appliances operating in a distributed manner, such was proposed to analyze the usage behavior of consumers from their
that each residence solves its own subproblem and reports only limited historical data, and to predict the demand for energy-using time series
information to the system. The algorithm provided a near-optimal analysis.
solution of the multi-residential DR problem. In [26], Arabul et al. presented an energy management algorithm
Scheduling algorithms for different users and priorities based on for wind-PV-battery-FC hybrid power system to reduce hydrogen con-
energy demand in a real-time pricing has been studied in [10]. In sumption in a smart home. The proposed algorithm uses a fuzzy-logic
order to minimize the electricity and comfort maximization, two al- based controller to reduce fuel consumption, with a minimum effect on
gorithms were proposed and the results validated the effectiveness of user comfort levels. Their results show that the load demand supplied
the proposed algorithms. Marzban proposed in [11] a hybrid DSM by the PV and the wind power is increased by 2% and 2.5%, re-
algorithm based on multi-layer and colony optimization. The optimum spectively, whereas the annual hydrogen consumption reduced by 4%.
operation of the sources decreased the electricity production cost by The authors of [27] presented a mixed-integer quadratic-programming
hourly day-ahead and real-time scheduling. The algorithm based on predictive control for a smart home that considers PV power, energy
Lyapunov optimization suggested in [12] for load scheduling at a storage, shift-able loads, as well as a thermal heating model. Their main
residential with integrated renewable generation and energy storage, objective was the minimization of energy cost, ensuring the thermal
provided performance improvements and cost reductions. In [13], the comfort of the user. A Fuzzy logic and a heuristic optimization were
authors does a comparative evaluation in the performance of DSM employed to control the throttleable and interruptible appliances, as
using Genetic algorithm, binary particle swarm optimization and ant well as the schedule of shiftable appliances in the smart grid examined
colony optimization, considering efficiency in terms of electricity bill in [28]. The simulation results provided in [28] show a reduction of
reduction, peak to average ratio minimization and user comfort level energy costs and peak of demand.
maximization. The authors of [29] proposed a multiobjective optimization that
Metaheuristics were used in [14] and [15] to optimize the energy employs the NSGA-II to compute compromise solutions, by balancing
management of a system composed of renewable energy source and the minimization of energy and power total cost with the dissatisfaction
energy storage that supply a smart home. Energy consumption and caused to the users. Their smart home model include the grid, the local
comfort that takes the human being’s preferences into consideration energy production and four types of manageable loads. The proposed
were managed in [14], in a way that the consumption is modified algorithm was evaluated in a scenario that contemplates contracted
in response to the real-time price signal. Energy consumption as well power with known fixed costs and limits on the power requested from
as the PAR were reduced in [15], considering a DSM designed with the grid, and in another with power charges that varies according to
exogenous grid signals, day-ahead pricing signals, ambient temperature the peak power requested from the grid.
and solar irradiance. The energy scheduling method, proposed in [30], was evaluated in
Four metaheuristic algorithms were combined in [16] to design a an SH regarding both residents’ goals (costs and comfort) and utilities
DSM that reduces the energy consumption and maximizes user com- goals (PAR improvement). In [31], Luo et al. suggested a DSM that
fort, whereas in [17], Hussain et al. evaluated a DSM based on a minimizes the home’s one-day electricity cost charged by the real-time
Genetic harmony search algorithm to reduce electricity expense and pricing. This approach took into account operational constraints of
peak to average ratio, and to maximize user comfort. The algorithm household appliances, to ensure the user’s comfort. However it does
implemented in [17] achieved higher search efficiency and a dynamic not provides a metric to determine the users comfort and does not
capability to attain optimal solutions in single and multiple homes. seek to maximize it. More recently, the authors of [32] proposed a
In its turn, the study described in [18] show high-cost savings with methodology to mitigate risks, considering technical and economic
minimum user PAR, using a binary hybrid optimization through the aspects in the transition from traditional houses to Smart Homes.
Multiple Knapsack Problem technique. Their proposal helped the effort Economic Predictive Control Models were used in [33] and [34] to
of finding an optimal solution, while employing dynamic programming optimize the energy management of Microgrids (see [35] for further
and respecting the total capacity of available time. In the meantime, details) composed of renewable energy sources and energy storage
Rahim et al. proposed in [19] a bacterial harmony algorithm for a that include the grid connection and disconnection functionalities.

2
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

The computational performance of the methods described in [33] 3. Forecasting the power generated by the 𝝁DG
and [34] are suitable for online operation in time intervals of 10 and
15 min, respectively. Nevertheless, it should be stressed that the specific Data from the internal generation module and the weather station
Microgrid characteristics found in [35] are not considered in this work. are stored in a database to be used in training and configuration of
The methodologies proposed in the above-mentioned related works the demand forecast [36]. Initially, due to the lack of energy produc-
does not consider equipment real data, social class, climatic seasons and tion data from the 𝜇DG, the mathematical models of the wind and
grouping techniques in the generation of the user’s comfort matrix. It is photovoltaic generator were used to train the forecaster.
in this context that, in this article, we propose the k-means technique to
creates a comfort matrix using data obtained from real Smart Homes, 3.1. The powers generated by the wind turbine and the photovoltaic panels
thus providing a realistic DSM methodology to the specific addressed
problem. This is, indeed, the main contribution of this work.
Among the several models used to determine the power generated
by wind machines [37], the polynomial power curve and the least-
1.2. Our contributions
squares (LS) methods are the most usual [38]. Thus, in this work, the
The DSM methodology proposed in this article considers a daily model based on LS with a 9-degree polynomial was chosen, as seen in
electric energy price curve with a variation that reflects typical situ- Eq. (1). Data from the wind turbine’s manual and the Matlab’s polyfit
ations of energy supply and demand. Two micro-generators based on tool, which is used to model a curve, were used to determine the
wind and solar energy sources are contemplated, which means that coefficients of the 9-degree polynomial in the wind power determined
the formed distributed generation system is influenced by climatic as
parameters such as ambient temperature, wind speed, air humidity, ⎧0, 0 ≤ 𝑉 < 𝑉𝑖
pressure, cloudiness and solar radiation. Therefore, the contributions ⎪
𝑃𝑤 = ⎨(𝑎 × 𝑉 9 ) + ⋯ + (𝑖 × 𝑉 ) + 𝑗, 𝑉𝑖 ≤ 𝑉 < 𝑉0 (1)
of this work include: (I) the proposition of a forecast of the hybrid ⎪
generation capacity, which is done for a day ahead by an artificial ⎩0, 𝑉 ≥ 𝑉0 ,
neural network based on an SVR that make use of climatic information where 𝑉 is the wind speed, 𝑉𝑖 is the cut-in speed, 𝑉0 is the cut-out speed
and mathematical models of the wind and photovoltaic generator to and 𝑎, … , 𝑗 are the coefficients of the polynomial.
train the forecaster; (II) the implementation of a new and simple The modeling process proposed in [39] was applied to model the
technique used to obtain the user’s comfort, which is determined power generated by the pannels, which is a function of the solar
by the K-means grouping with data obtained from real SHs; (III) a irradiation incident on the modules and the ambient temperature. This
reformulated optimization based on NSGA-II to specifically solve the
method obtains the parameters through meteorological measurements
presented problem, allowing a high monetary reduction of the energy
and the panel manufacturer’s manual. Hence, the power generated by
paid by the final consumer, according to the comfort desired by the
the photovoltaic panels calculated as
tenants of the residence; and (IV) the evaluation of a new algorithm
proposed to manage a battery bank, aiming energy cost reduction and 𝑁 × 𝐹𝐹 × 𝑉
𝑃𝑝 = , (2)
comfort improvement in the considered Smart Homes. 𝐼
The rest of the article is organized in 8 sections. More details about 𝑉𝑚𝑝𝑝𝑡 −𝐼𝑚𝑝𝑝𝑡
for 𝑁 the number of photovoltaic panels, 𝐹 𝐹 = 𝑉𝑜𝑐 −𝐼𝑠𝑐
a dimen-
the implemented DSM are presented in Section 2 and the module used
in the power forecasting by DG using SVR is described in Section 3. Sec- sionless form factor, 𝑉 = 𝑉𝑜𝑐 − 𝐾𝑣 (𝑇𝑐 − 25) is the voltage in the
tions 4 and 5 demonstrate the algorithm that manages the battery and photovoltaic module and 𝐼 = 𝑟[𝐼𝑠𝑐 + 𝐾𝑖 (𝑇𝑐 − 25)] the current in a
𝑁 −20
the construction of the comfort matrix, respectively. Section 6 contains cell. The parameter 𝑇𝑐 = 𝑇𝑎 + 𝑟( 𝑜𝑡0.8 ) represents the photovoltaic
the formulation of the optimization problem and the modifications panel temperature in ◦ C, for 𝑇𝑎 the average environment temperature
made in the NSGA-II to address the problem. The simulations results in the period, 𝑟 the solar irradiation in kW/m2 and 𝑁𝑜𝑡 the nominal cell
are commented in Section 7 and the concluded remarks provided in operating temperature. In these equations, 𝐼𝑠 𝑐 is the cell short circuit
Section 8. current, 𝐾𝑖 is a current/temperature coefficient, 𝑉𝑜𝑐 is the open circuit
voltage of the module, 𝐾𝑣 is the stress temperature coefficient in 𝑉 ∕◦ C,
2. The implemented demand-side management 𝑉𝑚𝑝𝑝𝑡 is the voltage at the point of maximum power and 𝐼𝑚𝑝𝑝𝑡 represents
the current at the point of maximum power. The total electrical power
The DSM used in the proposed methodology consists of systems of the 𝜇DG, composed by the sum of the 𝐾 = 2 microgenerators is
that modify the load curve, by changing consumer habits with stimuli obtained as 𝑃𝜇𝐷𝐺 = 𝑃𝑤 + 𝑃𝑝 .
provided by electricity distributors. To change energy consumption
habits, these stimuli include variant tariffs in time, control and au- 3.2. Generation of the forecasting system using support vector regression
tomation systems of the electricity grid, to assist the decision-making
process. The implemented Demand Curve Management and Control
In order to achieve the forecasting goal, the meteorological data
System (DCMCS) is shown in Fig. 1.
and the internal generation capacity, obtained in the mathematical
The DCMCS receives information related to the amount of en-
model described in this Section, are utilized in the SVR. Therefore, it is
ergy generated by DG; to the energy consumed in extensions; to the
necessary to know the meteorological history in the region where the
consumer financial availability; to the current tariff, which is the
instantaneous amount paid for energy purchased from DNO; and to 𝜇DG is located.
the energy purchased via the distribution network, resulting in on/off To perform the computational experiments with the SVR neural
operations on the consumer branches and on the DG, as well as on the network, data were obtained from a meteorological station located in
branch that connects the distribution network to the SHs. the São Mateus Campus of the Federal University of Espírito Santo
To provide the electrical power, the micro DG (𝜇DG) treated in the (UFES). The hourly meteorological data correspond to 20.208 entry
new methodology is composed of 𝐾 microgenerators based on seasonal patterns. Each pattern contains the variables date, time in UTC, average
sources that depend on meteorological variables. Therefore, we faced temperature in ◦ C, average relative humidity in %, mean pressure
with the problem of forecasting the internal generation capacity of in hPa, wind speed in m/s, wind direction, wind gust in m/s and
a 𝜇DG. The mathematical model of the 𝜇DG, as well as the set of irradiation in kW/m2 .
meteorological variables used to meet the model, and the learning Initially, the power generated was simulated based on using Eqs.
system based on artificial intelligence techniques are described in the (1) and (2), considering the data of each input pattern measured by
next Section. the weather station, as well as some information provided by the

3
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 1. The demand curve management and control system evaluated in the methodology proposed in this paper. The DCMCS is composed by 𝐾 microgenerators based on seasonal
sources, as well as by a battery bank and equipment energy consumption.

datasheets of the Wind Turbine and the Photovoltaic Panels. In the Thus, the function that solves the problem is
𝜇DG simulation, a total peak power of 8.0 kW was considered. Then,

𝑙
the total power values were shifted within 24 h, forming a complete 𝑓 (𝑥) = (𝛼𝑖 − 𝛼𝑖∗ )𝑘 ⟨𝑥𝑖 , 𝑥⟩ , (5)
pattern that contains meteorological data measured by the station in 𝑖=1
hour 𝑘 of day 𝐷 (SVR input) and the total simulated power in hour 𝑘 where 𝛼𝑖 , 𝛼𝑖∗ ∈ [0, 𝐶] are the Lagrange multipliers and 𝑘 ⟨𝑥𝑖 , 𝑥⟩ is the
of day 𝐷 + 1 (desired SVR output). The input and the output data were kernel function (non-linear).
normalized, in the range between 0 and 1, according to the minimum It is important to note that the results obtained by the SVR depend
and maximum limits identified in each variable. In sequence, the data significantly on the values of the regularization constant C, the margin
were separated into two sets: the first set (80% of the data) was used 𝜖, the type of kernel function and its respective parameters. Functions
to train the SVR and the second with 20% of the data to test it. that fit the analyzed problem’s data are obtained according to the
selection of such variables. The chosen kernel function is a radial
3.3. A basic description of the support vector regression technique base function (RBF), which is the most complex among the functions
normally used in SVRs, but also the most general [40].
Support Vector Regression is a non-linear regression technique
based on the Support Vector Machines proposed in [40]. Both tech- 3.4. The SVR procedure used in the power forecasting of the next day
niques are firmly based on the theory of statistical learning, that allows
the optimal generalization of unseen data. The learning process of an It is important to noticed that, in this work, the SVR procedure was
SVR-type ANN considers a training set (𝑥1 , 𝑦1 )...(𝑥𝑙 , 𝑦𝑙 ), 𝑥 ∈ 𝑅𝑑 , 𝑦 ∈ employed to forecast the power of the 𝜇DG a day ahead. The steps that
𝑅𝑑 , where 𝑥 denominates the input space and 𝑦 the output space of the constitute the entire procedure are described as follows:
set [41].
The objective of the SVR is to find a function 𝑓 (𝑥) that presents • (1) Select the 20,208 entry patterns from the meteorological
at most one deviation 𝜖 from the target values. In other words, it data history to train and test the SVR. Each pattern contains the
looks for a function with an error margin characterized by the interval variables date, time in UTC, average temperature in ◦ C, average
[𝑦𝑖 − 𝜖, 𝑦𝑖 + 𝜖], as following relative humidity in %, mean pressure in hPa, wind speed in m/s,
wind direction, wind gust in m/s and irradiation in kW/m2 .
𝑓 (𝑥) = ⟨𝑤, 𝑥⟩ + 𝑏 (3) • (2) Calculate the power generated by the 𝜇DG using Eqs. (1) and
(2), considering the average temperature, the wind speed and the
where ⟨., .⟩ denotes the internal product over the space 𝑅𝑑 ,
𝑤 is the
irradiation presented in the meteorological data history. Some
vector of the weights ∈ 𝑅𝑑 and 𝑏 ∈ 𝑅. The problem can be formulated
information provided by the datasheets of the Wind Turbine and
as the following convex optimization problem
the Photovoltaic Panels are also used in this calculation.
1 • (3) Shift the total power values within 24 h to form a complete
𝐌𝐢𝐧 ‖𝑤‖2 (4)
2 pattern. This pattern contains meteorological data measured by
𝐒.𝐭.
the station in hour 𝑘 of day 𝐷 and the total power in hour 𝑘 of
1. 𝑦𝑖 − (𝑤 ⋅ 𝑥𝑖 ) − 𝑏 ≤ 𝜖; ∀𝑖 = 1, … , 𝑙 day 𝐷 + 1.
2. −𝑦𝑖 + (𝑤 ⋅ 𝑥𝑖 ) + 𝑏 ≤ 𝜖; ∀𝑖 = 1, … , 𝑙. • (4) Normalize the input and output data.

4
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

• (5) Separate the 20,208 data patterns into two sets. Use the first supply in 10 min. If this is the case, the battery will supply all possible
set, composed by 80% of the data, to train the SVR according to energy in 10 min with some energy remaining, and the public network
Eq. (5). Use the second (test set), with 20% of the data, to validate will be used to supply the remaining energy. If 𝐸𝑏𝑎𝑡 − 𝐸𝑏𝑎𝑡𝑚𝑖𝑛 <
the SVR, considering mean square error (MSE) and a root mean 𝑃 𝑏𝑎𝑡𝑚𝑎𝑥 × 𝑖, the battery will supply all the available energy, being
square error (RMSE) as performance metrics. discharged to the minimum energy level and the public network will
be used to supply the remaining energy.
4. The battery bank management Sub-process 4 - If 𝐸𝑏𝑎𝑡−𝐸𝑏𝑎𝑡𝑚𝑖𝑛 ≥ 𝑃 𝑑𝑖𝑓 𝑓 ×𝑖, it is checked whether
𝑃 𝑑𝑖𝑓 𝑓 is less than the battery’s discharge power. If this is true, all
As mentioned, the battery bank is the energy storage system used charge demand will be met by the battery, without the use the public
in the SHs, to promote greater flexibility in the energy management. network. Otherwise, the battery will supply all possible energy in 10
When 𝜇DG generates more energy than the SH is able to consume, the min and the remaining energy will be supplied by the distribution
excess is sold to the DNO or stored in the battery bank. It is worth network.
noting that this choice depends on the momentary price of the energy
5. Generation of the comfort matrix
and the adopted energy management control strategy. Moreover, the
battery must be charged during periods when the price of energy is The comfort matrix conceived in this work represents a weighting
lower and/or the 𝜇DG has surplus generation. The energy should be of how the consumer uses the branches/electric devices during a day.
discharged in periods of higher price to decrease the cost of the tariff. Fig. 3 shows the annual average power consumed by a dryer in a real
However, some restrictions on the battery operation procedures home, in a daily time. Preliminary analysis allows the conclusion that
must be adopted to prevent accidents and preserve its lifespan. The the most comfortable region is between 10 am and 2 pm. However, the
restrictions considered in this article are the maximum energy the generation of a comfort matrix, using artificial intelligence, permits a
battery can store to avoid overcharge (Ebatmax), the minimum energy more realistically representation of the user comfort, when compared
the battery must store to avoid over-discharge (Ebatmin) - which is to the average consumption depicted in Fig. 3.
determined by the maximum depth of discharge adopted in the design To quantify the user’s comfort, the metric adopted in this work was
and the maximum charge∖discharge power (Pbatmax). classified in the 3 levels: maximum, average and minimum comforts.
The management of the battery usage depends on the following The maximum comfort, represented by the number 3, is the schedule
six main parameters: Pdiff that represents the difference between the that defines the moment the consumer frequently uses the electric
household charge demand and the generated power, HP that indicates devices of his residence. The average comfort, denoted by the num-
the peak time registered when the tariff is more expensive, Ebat which ber 2, is the schedule used when the consumer sometimes uses the
is the energy present in the battery, 𝜎 that represents the self-discharge branches, whereas, the minimum comfort, denoted by the number 1, is
rate of the battery, 𝜂𝑏𝑐 denoting the charge efficiency and 𝜂𝑏𝑑 rep- defined by the periods when the consumer rarely uses it. To obtain
resenting the discharge efficiency. The flowchart illustrated in Fig. 2 the aforementioned matrix, we apply the k-means algorithm in the
shows that the battery power management algorithm is divided into 4 database illustrated in Fig. 3, to form clusters based on similarity. Thus,
sub-processes to reduce the cost of energy. considering this database with 𝑛 hourly loads observed over a period,
The output variable is PC, that represents the net power provided an algorithm with the following steps was suggested:
by the public power grid. When 𝑃 𝐶 > 0 the SH consumes power • (1) define the number of groups (𝑘 = 3 load levels);
from the grid, on the other hand, when 𝑃 𝐶 < 0 the SH injects power • (2) choose the 𝑘 = 3 first load levels as centroid of 𝑘 = 3
into the DNO network. In the beginning of the process, the parameter clusters (the centroid of a group is, in this case, a load threshold
Pdiff is checked, before the execution of one or more of the following that corresponds to the arithmetic mean of the load thresholds
sub-processes. associated with this group);
Sub-process 1 - If the demand is less than the generation of re- • (3) associate each of the remaining 𝑛−𝑘 load levels in the database
newable energy (𝑃 𝑑𝑖𝑓 𝑓 < 0), it is verified whether the energy the to the group whose centroid is the closest, recalculating the value
battery can still store (𝐸𝑏𝑎𝑡𝑚𝑎𝑥 − 𝐸𝑏𝑎𝑡) is greater than or equal to the of the increased group’s centroid;
surplus energy produced by the renewable energy generation system, • (4) go through the entire database associating each load level to
in a fraction of 1∕6 of an hour (𝑃 𝑑𝑖𝑓 𝑓 × 𝑖). If the battery cannot store the nearest centroid cluster (when associating a load level with a
all the energy, it will be fully charged and the power exported to group different from the previously associated, it is necessary to
the DNO network will be (𝑃 𝑑𝑖𝑓 𝑓 − (𝐸𝑏𝑎𝑡𝑚𝑎𝑥 − 𝐸𝑏𝑎𝑡)∕𝑖). Otherwise, recalculate the centroid of the increased and subtracted clusters);
the battery will be charged according to the following rules: if the • (5) repeat step (4) until the observation of no more cluster
maximum battery power is greater than or equal to Pdiff module, all changes in any database load level;
excess energy will be stored in the battery and there will be no energy • (6) define the regions of the highest level with value 3, average
consumed or exported to the DNO (𝑃 𝐶 = 0); if not, the battery will be level 2 and lowest level as 1 in the comfort matrix.
charged to its maximum charge rate and a 𝑃 𝑑𝑖𝑓 𝑓 + 𝑃 𝑏𝑎𝑡𝑚𝑎𝑥 amount
of electricity will be delivered to the public grid. The comfort matrix is generated as the end of the algorithm and the
Sub-process 2 - If the demand is greater than the generation, choice of the number of clusters must attend the compromise between
the desired quality in modeling the problem and the computational
two conditions lead the system to consume the 𝑃 𝑑𝑖𝑓 𝑓 power from the
effort the user wants to spend in the search for the optimal solution.
public network. The first condition is that the time in question is not the
Table 1 illustrates a comfort matrix where it is possible to observe the
peak, and the second it is that the time is peak and it is not possible to
classification of the hours of the day, with the indicative indices of
use the battery because its power is minimal. If the time is the peak and
comfort, as previously described.
the battery energy is higher than the minimum energy, it is verified, in
each 10 min, if the energy available in the battery is greater than or 6. Problem formulation and the proposed NSGA-II optimization
equal to 𝑃 𝑑𝑖𝑓 𝑓 .
Sub-process 3 - If 𝐸𝑏𝑎𝑡 − 𝐸𝑏𝑎𝑡𝑚𝑖𝑛 < 𝑃 𝑑𝑖𝑓 𝑓 × 𝑖, it is necessary to After forecasting the generation capacity and after obtaining the
obtain energy from the public grid to support the entire load demand. user comfort levels, we modify the NSGA II Genetic algorithm to
Hence, If 𝑃 𝑑𝑖𝑓 𝑓 is less than the maximum battery discharge power, the obtain a monetary reduction in the energy consumed by an end-user,
battery is discharged to the minimum energy level and the public grid considering the comfort sought by the tenants of a residence. The
will be used to supply the remaining energy. Otherwise, it is verified if problem formulation and the optimization procedure are described in
the available energy in the battery is greater than the energy that it can this Section.

5
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 2. The algorithm proposed to manage the energy of the battery bank. The flowchart shows that it is divided into 4 sub-processes.

Fig. 3. Annual average power in KW consumed by a dryer in a real home.

6
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Table 1 • (6), (7), (8) and (9) ensure, respectively, that 𝑃 is a vector with
Example of comfort matrix for 16 devices, indicating the indices of comfort at each
the priority of each extension where each element is an integer,
hour of the day.
in the interval {1, 3}, 𝑋 is a matrix- binary solution, 𝑍 a binary
1 2 3 4 5 6 7 8 ⋯ 24
vector and 𝑌 represents the comfort matrix which is an integer in
Eq. 1 1 1 1 1 1 2 2 3 ⋯ 1
the interval {1, 3}.
⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Eq. 16 1 1 1 1 1 1 2 2 ⋯ 3
6.2. Optimal Pareto front solutions
Table 2
The mathematical formulation of the demand-side energy management problem. A multiobjective optimization problem provides a set of optimal
∑𝑀 [((∑𝑁 ) ) ]
Min. 𝑖=1 𝑗=1
𝑋(𝑖, 𝑗) × 𝑃𝐿 (𝑗) × 𝑇𝑢 (𝑗) − 𝑃𝜇𝐷𝐺 (𝑖) + 𝑃 𝑏𝑎𝑡(𝑖) × 𝐶(𝑖) solutions known as Pareto front, which represents the best compro-
∑𝑀 ∑𝑁
Max. 𝑖=1 𝑗=1 𝑋(𝑖, 𝑗) × 𝑌 (𝑖, 𝑗) × 𝑃 (𝑗) mise between the goals of the problem. In a multiobjective optimiza-
s.t. tion, there are two approaches normally used in handling this type of
∑𝑀
𝟏. 𝑓 =1 𝑋(𝑓 , 𝑘) = 𝐶𝑦𝑐𝑙𝑒(𝑘) × 𝐷𝑢𝑟𝐶𝑦𝑐𝑙𝑒(𝑘); 𝑘 = 1, … 𝑁 problems. Defined the priorities and the weights between the various
∑𝑀 [((∑𝑁 ) ) ]
𝟐. 𝑖=1 𝑗=1
𝑋(𝑖, 𝑗) × 𝐸𝐿 (𝑗) × 𝑇𝑢 (𝑗) − 𝑃𝜇𝐷𝐺 (𝑖) + 𝑃 𝑏𝑎𝑡(𝑖) × 𝐶(𝑖) ≤ 𝐶𝐿𝑖𝑚 objectives of interest, the first method generates the optimal solution
∑𝑀 ∑𝑁
𝟑. 𝑖=1 𝑗=1 𝑋(𝑖, 𝑗) × 𝑌 (𝑖, 𝑗) × 𝑃 (𝑗) ≤ 𝐶𝑜𝑚𝑓𝑚𝑎𝑥
∑𝑁
based on the provided information. The other method produces a
𝟒.𝐶𝑜𝑚𝑓𝑚𝑎𝑥 = 𝑗=1 𝑌𝑚𝑎𝑥 × 𝐶𝑦𝑐𝑙𝑒(𝑗) × 𝐷𝑢𝑟𝐶𝑦𝑐𝑙𝑒(𝑗) × 𝑃 (𝑗) set of nondominated solutions (Pareto front) and, without additional
∑𝑁
𝟓. 𝑗=1 𝑍(𝑗) ≤ 𝐿𝑚𝑎𝑥
information, chooses one of the solutions.
𝟔.𝑃 ∈ [1, 2, 3]
𝟕.𝑋 ∈ [0, 1] In a maximization problem, the Pareto mathematical definition can
𝟖.𝑌 ∈ [1, 2, 3] be, without loss of generality, described as in [42]. According to [42],
𝟗.𝑍 ∈ [0, 1] to define Pareto dominance it is convenient to assume the vectors
𝑥⃗ = (𝑥1 , 𝑥2 , … , 𝑥𝑘 ) and 𝑦⃗ = (𝑦1 , 𝑦2 , … , 𝑦𝑘 ). The vector 𝑥 dominates the
vector 𝑦 (represented as 𝑥 ≻ 𝑦) if
6.1. Problem formulation [ ] [ ]
∀𝑖 ∈ {1, 2, … , 𝑘} , 𝑓 (𝑥𝑖 ) ≥ 𝑓 (𝑦𝑖 ) ∧ ∃𝑖 ∈ 1, 2, … , 𝑘 ∶ 𝑓 (𝑥𝑖 ) . (6)

The demand optimization specified in this work is a combinato- A solution 𝑥⃗ ∈ 𝑋 is called the Pareto optimal if 𝑦⃗ ∈ 𝑋 ∣ 𝐹 (𝑦)
⃗ ≻ 𝐹 (⃗
𝑥),
rial problem, subject to load allocation restrictions. The multiobjec- whereas the set that includes all non-dominated solutions is called the
tive optimization aims the designation of a solution that minimizes Pareto optimal set, and it is defined as
electricity costs and maximizes the comfort of residents, subject to
restrictions such as operation, equipment priority, and daily fixed cost. 𝑃𝑠 ∶= {𝑥, 𝑦 ∈ 𝑋 ∣ ∃𝐹 (𝑦) ≻ 𝐹 (𝑥)} . (7)
The problem was mathematically formulated as shown in Table 2.
The set composed by the results of the objective functions of the
In the formulation summarized in Table 2, 𝑋(𝑖, 𝑗) indicates if the 𝑗th
Pareto optimal solutions is called the Pareto optimal front and it is
equipment energy consumption on time 𝑖; 𝑃𝐿 (𝑗) is the power demanded
mathematically designated as
by the 𝑗th extension of the residence; 𝑇𝑢 (𝑗) is the time spent by an
{ }
equipment in fractions of hours; 𝑃𝜇𝐷𝐺 (𝑖) is the power delivered by the 𝑃𝑓 ∶= 𝐹 (𝑥) ∣ 𝑥 ∈ 𝑃𝑠 . (8)
distributed generation on the time 𝑖; 𝑃 𝑏𝑎𝑡(𝑖) is the power stored by
the battery on time 𝑖; 𝐶(𝑖) is the cost of electricity purchased from Therefore, a multiobjective optimization obtains an optimal set of
the public grid at the time 𝑖; 𝑌 (𝑖, 𝑗) represents the comfort of the 𝑗th Pareto that normally contains more than one element, unlike single-
equipment at the time 𝑖; 𝑌𝑚𝑎𝑥 is the maximum value of the 𝑌 ; and 𝑃 (𝑗) objective optimization that provides an unitary solution. To address
represents the priority of the 𝑗th extension of the residence. 𝐶𝐿𝑖𝑚 is the DSM problem discussed in this article, the work described in [43]
the daily limit cost determined by the consumer; 𝐶𝑜𝑚𝑓𝑚𝑎𝑥 expresses provided an economic and environmental analysis, whereas in [44], the
the sum of the maximum comfort of all equipment; 𝑀 is the number authors managed the trade-off between electricity bill and waiting time
of parts divided into one day of an SH operation; 𝑁 is the number of of appliances shifting, according to a defined electricity load pattern.
extensions into which a load of an SH can be divided; 𝐶𝑦𝑐𝑙𝑒(𝑘) shows The DSM designed in [45] consider the energy costs of residential users
the number of operation cycles of the 𝑘th equipment; 𝐷𝑢𝑟𝐶𝑦𝑐𝑙𝑒(𝑘) indi- and the load factor of the underlying grid, and in [46], the authors tried
cates the maximum duration, in number of intervals, of the operation to minimizes energy costs and maximizes privacy protection. It is worth
cycle of the 𝑘th appliance; 𝑍(𝑗) represents the amount of equipment noting that all these works have proposed multiobjective formulations
in operation; and 𝐿𝑚𝑎𝑥 is the maximum number of devices that can be with Pareto front, as well as weighted monobjective formulations. Their
connected to the SH. Nine constraints were designed, considering that: conclusions claimed that the weighted monobjective formulations are
• (1) indicates that the number of operating cycles of the 𝑘th equip- not able to give the best values for both considered objectives. It
ment must acknowledge the cycle information predetermined on should be stressed that the Pareto fronts generated by the monobjective
it; approaches were made by varying the values of the weight 𝜔 from
• (2) shows that demand plans must be generated, taking into 0 to 1. The results obtained after comparisons with the Pareto fronts
account that the cost limitation parameter considers the amount generated by multiobjective algorithms show better performances of
that the consumer wants to pay in a day; the multiobjective optimizations in the knee regions.
• (3) indicates that the comfort of a plan should be at most equals The knee point in the optimal Pareto front refers to the point with
to the maximum comfort determined by the matrix; the maximum marginal rates of return. This means that there is a small
• (4) represents the calculation of maximum comfort as the sum improvement in an objective, accompanied by severe degradation of at
of the product between the maximum comfort value [𝑌 = 3], least one of the other objectives [47,48]. In addition, it was proved that
the number of cycles and the duration of the cycles of each the knee point is better than the other points of the Pareto Front in the
equipment; hypervolume metric [49]. The higher the hypervolume, the better the
• (5) indicates that not all equipment needs to be used in SH, population’s convergence and distribution. The algorithm proposed in
because depending on the maximum financial value that the user this article facilitates better decision in contexts where high marginal
is willing to pay with the energy bill,it is necessary to restrict the rates of return are desirable, providing decision makers, with a high
use of some equipment; concentration of solutions, in the knee regions of the Pareto front.

7
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 4. The Elitist Non-dominated Sorting Genetic Algorithm II optimization procedure.

6.3. The modified NSGA-II optimization algorithm Table 3


Example of chromosome representation indicating the daily hours operation of the
equipment and the battery.
The NSGA-II proposed by Deb et al. at [50] is an elitist evo-
1 2 3 4 5 6 7 8 ⋯ 24
lutionary algorithm and it incorporates a mechanism that preserves
Eq.0 0 0 0 0 1 1 0 0 ⋯ 0
the dominant solutions through the generations. However, to address
⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
the DSM problem formulated in this article, the traditional NSGA-II Eq. 16 0 0 0 0 0 0 1 0 ⋯ 0
procedure was profoundly modified according to the implementation Eq. Bat 0 0 0 0 0 1 1 1 ⋯ 1
of a heuristic for the generation of viable initial population, and to
adaptations in the crossover and the mutation genetic operators aiming
a matrix representation of a chromosome. Figs. 4 to 8 show details
of the modifications in a way that facilitates a comparison with the After completing the battery allocation, the algorithm verifies the
operations described in [50]. possibility of chromosomal differentiation by comparing chromossoma-
lDifferentiation to 𝛼. If 𝛼 is greater, all equipment will be reallocated
from the generated individual. For each use of reallocated equipment,
6.3.1. Initial population
the algorithm generates a new individual. In this way, it generates 𝑁
In this work, each chromosome in the population represents a
new individuals, with 𝑁 being the number of equipment. From these
residential electricity demand plan. A gene of this chromosome denote
𝑁 individuals, it chooses a set of 𝑝 individuals to compose the initial
an equipment in the residence and its architecture consists of a binary
population together with individual 𝑖, for 𝑝 less than or equal to 𝑁.
vector of twenty four positions. Each position portrays the hours of the
To do this, the algorithm follows the rule: 𝑖 + 𝑝 must be less than or
day, where 1 means that the equipment is operating at the respective
equal to the size of the population; if 𝛼 is less, only one individual is
time and 0 indicates that the equipment is off. The last binary vector
inserted into the population. This process is repeated until the number
of the chromosome illustrates the battery, where 1 indicates that it can of individuals in the population is equal to the predetermined number,
supply or receive electricity and 0 indicates that it will not be used returning to the complete initial population.
at the respective time. Table 3 illustrates a chromosome, where the
classification of the daily hours announces if the equipment and the 6.3.2. Ranking of solutions
battery are in operation or not. The ranking of all individuals, at non-dominance levels, designate
Fig. 5 presents the algorithm proposed to heuristically generates the way used to get the set of solutions that form the Pareto Front. It
the population. The container Equipment Use Allocation generates an should be reminded that the Pareto front represents the best compro-
individual 𝑖. For each device, the possibility of the device being turned mise between the objectives of the problem. For this, we compared each
off is verified by randomly determining deletionProcess. If its value individual with all others from the population in terms of objectives.
is less than or equal to 𝜂, the process will turn off the equipment. A solution 𝑥 is said to dominate 𝑦, if, and only if, for all objectives
Otherwise, it will randomly allocate the equipment usage, respecting involved in the function, 𝑥 it is not worse than 𝑦 in any objective, and
its operating cycle rules. For the battery, the procedure consists only of there is at least one objective in which 𝑥 is better than 𝑦. Fig. 6 shows
a random allocation of 0 or 1 for each of the 24 gene positions. the ranking algorithm used in this work.

8
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 5. Flowchart of the algorithm proposed to generates the initial population of the modified NSGA-II.

6.3.3. Crossover description Table 4


After selecting the individuals, the population is effectively inserted Main parameters of the GERAR 246 model turbines.

in the crossover process. Initially, it chooses two individuals as parents Wind turbine parameters Values
and define the definitive occurrence of the crossover by comparing 𝛼 Nominal power 1000 W
and crossoverProbability, defined in this work as 0.95 (95%). Cut-in speed 2 m/s
rated speed 12.5 m/s
If 𝛼 is greater, the crossover does not occurs and the process will
Cut-out speed 38 m/s
begin again with the choice of the next two individuals. Otherwise, the
crossover is obtained as: the algorithm determines the crossover point
randomly between 1 and 𝑁, where 𝑁 is the number of equipment;
it sections the two individuals chosen as parents from crossingPointing Fig. 9 shows the tariff used to tax the daily energy consumed in an
until the last gene; then, each individual receives the sectioned section SH. It is clear from Fig. 9 that in two periods, between 6 am to 9 am
of the other, generating two children individuals. The process restarts and from 5 pm to 10 pm, the price of energy is more expensive.
and chooses the next two parent individuals until including the entire As previously mentioned, the data we obtained from a meteoro-
selected population. Fig. 7 describes the entire crossover process. logical station, to perform computational experiments with the SVR
algorithm, has 20,208 input patterns. The generated power was sim-
6.3.4. Mutation description
ulated considering a 𝜇DG with a total peak power of 8.0 kW, 3 kW
For each individual in the population, the algorithm verifies the pos-
of wind generation and 5 kWp of photovoltaic generation. The wind
sibility of mutating by comparing 𝛼 to the mutate probability, defined
power has 3 Enersud turbines of the GERAR 246 model, with main
as 0.1 (10 %). If 𝛼 is greater, the mutation process does not occurs for
technical parameters provided by their datasheets summarized in Ta-
that individual. Otherwise, the mutation process arises as follows: if the
ble 4. The considered photovoltaic system has 11 modules of the model
equipment is turned on, it should be turned off; otherwise, it is turned
CS1U-420MS with the technical specifications summarized in Table 5.
on by randomly allocating its use, respecting the duty cycle restrictions.
Fig. 8 illustrated the proposed the mutation process. A shift of 24 h was applied in the total power values to form the
input and output data of the SVR, with data separated in 80% for
7. Tests and results training and 20% for tests. The test set was used to measure the quality
of the predictions generated by the SVR algorithm. The application
The methodology proposed in this work was implemented in of the SVR resulted in a mean square error (MSE) equals to 0.00536
Matlab® and the results presented in terms of energy cost, consumed and a root mean square error (RMSE) of 0.0732. Fig. 10 presents a
power and levels of comforts. comparison between a daily demand provided by the mathematical

9
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 6. Algorithm used to ranking the non-dominance solutions.

Fig. 7. Flowchart of the proposed crossover algorithm used in the modified NSGA-II.

10
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 8. The proposed mutation algorithm used in the modified NSGA-II.

Fig. 9. Energy cost used by the electricity company to tax the daily energy consumed in an SH.

Table 5 predicted by the SVR. Fig. 10 shows that a small discrepancy between
Main parameters of the CS1U-420MS photovoltaic modules.
the curves is observed.
Photovoltaic module parameters Values
Fig. 11 shows a comparison between the comfort values of a Dryer
Nominal power 420 Wp obtained with the Kmeans algorithm, and the average annual power.
Open circuit voltage (𝑉𝑜𝑐 ) 53.8 V
Short circuit current (𝐼𝑠𝑐 ) 9.8 A
This result is part of the comfort matrix that represents, in a weighted
Voltage at maximum power (𝑉𝑚𝑝𝑝𝑡 ) 44.9 V way, how the extensions are used by a consumer during a day.
Current at maximum power (𝐼𝑚𝑝𝑝𝑡 ) 9.37 A Fig. 11 shows that the region of maximum comfort is between 10
Voltage temperature coefficient (𝐾𝑣 ) 0.29 V/◦ C am and 3 pm. In this period, the consumer usually uses the extensions
Current temperature coefficient (𝐾𝑖 ) 0.05 A/◦ C
Nominal cell operating temperature 43 ◦ C
of his residence. Average comfort comprises the interval between 9
am and 10 am, as well as between 3 pm and 6 pm, with values close
to maximum comfort. The Minimum comfort was registered between
6 pm and 8 am.
model, using the real meteorological data randomly selected, and that We performed tests with an SH of 16 branches, considering 1
equipment per branch, to evaluate the performance of the proposed

11
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 10. Comparisons between the demand provided by the mathematical model and that forecast by the proposed SVR algorithm.

Fig. 11. Comfort of a Dryer obtained with the K-means, and the average annual power.

Fig. 12. The Pareto front generated by the proposed NSGA-II optimization.

12
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 13. Equipment operating hours provided by the NSGA-II, at maximum comfort.

Fig. 14. Optimized values of residence energy, battery energy, renewable energy, and energy demanded from the public grid, at the maximum cost plan.

optimization method. Table 6 shows the characteristics of each res- We also highlighted the maximum, medium and lowest cost/
idence’s equipment, in terms of average power, operating time in comfort plans, to demonstrate to the consumer that a readjustment in
minutes and the number of cycles of use of the equipment during 24 h. the equipment’s use is influenced not only by the quantity of equipment
The equipment with the lowest average power has 200 W and the SH but also by the energy efficiency, time and moment of their use. Fig. 13
has an installed load of 26.886 kW. To promote the aforementioned shows the operating hours of the equipment provided by the proposed
flexibility in the SH, we adopted an energy storage system with the NSGA-II, considering maximum comfort depicted in Fig. 12. In this
technical data specified in Table 7. demand plan, most of the equipment was switched on at the moments
The parameters used in NSGA-II simulation are: heuristic initial- of maximum user comfort. It can be observed from Fig. 13 that the
ization of the population with 100 possible solutions, roulette selec-
scheduling obtained by the meta-heuristic led to a cost of R$14.87 and
tion, crossover at a rate equal to 0.95, mutation with rate equals to
a comfort of 230 units.
0.1 and 500 generations. The result of the suggested multi-objective
optimization is a set of non-dominated solutions called Pareto Front. Considering the maximum cost plan, Fig. 14 shows the optimized
Fig. 12 shows the Pareto curve obtained after the convergence of the values of the energy demanded in the residence, of the battery energy,
modified NSGA-II, resulting in 40 demand plans for a predetermined of the generated renewable energy, and the energy consumed from the
maximum cost of R$15.00. The numerical results show that the demand public grid. It can be observed from Fig. 14 that, at 10 am to 6 pm, the
plans have a costs ranging from R$-8.38 to R$14.87. Negative cost surplus energy comes from the renewable energy system. At 12 pm, the
values indicate the sale of energy from SH to the public energy grid, battery starts to charge until it reaches the maximum point at 4 pm.
considering that the cost of sales is the same of the adopted in the Therefore, the battery can be used in the second schedule bridge, that
purchases. occurs from 5 pm to 10 pm. This leads to a less use of energy supplied

13
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 15. Overview of the medium cost plan provided by the NSGA-II optimization for values of residence energy, battery energy, renewable energy, and energy demanded from
the public grid.

Fig. 16. Equipment operating hours provided by the NSGA-II, at minimum comfort.

Table 6 Table 7
Characteristics of the equipment present in the SH. Energy storage system parameters.
Equipment 𝑃𝑁𝑜𝑚𝑖𝑛𝑎𝑙 (W) Op. Time (min) Cycles Battery parameters Values
Electric shower 4500 10 3 Maximum energy (𝐸𝑏𝑎𝑡𝑚𝑎𝑥) 10,000 Wh
High pressure washer 2000 30 1 Minimum energy (𝐸𝑏𝑎𝑡𝑚𝑖𝑛) 2000 Wh
Electric fryer 1500 60 1 Maximum charge∖discharge power (Pbatmax) 8000 W
Water pump 736 80 1 Charge∖discharge efficiency (𝜂𝑏𝑐 ∖𝜂𝑏𝑑 ) 0.95%
Electric shower 4500 10 3 Self-discharge rate (𝜎) 0.01% per hour
Air conditioner 2200 240 2
Electric coffee maker 600 60 2
Washing machine 1550 120 1
Mini system 1800 30 2 by the public power grid. At almost any time of the day, it is necessary
Desktop computer 600 180 3
Induction cooker 3000 60 2 to buy energy from the public network, with the only exception being
Lamps 300 600 1 at hours 11, 18 and 19.
Refrigerator 400 1440 1
Electric car 1500 360 1 Table 8 shows the operating hours of the contemplated equipment,
Television 200 60 3
considering average comfort. In this demand plan, almost all equipment
Clothes iron 1500 30 1
works during peak hours or intermediate pricing. It is shown in Table 8
that some equipment were not used in the daily schedule optimization
process, due to its low priority over other equipment.

14
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Fig. 17. Residency energy, battery, 𝜇GD and public grid provided by the NSGA-II optimization at the minimum cost plan.

Fig. 18. Monetary consumption for maximum cost plan with and without 𝜇GD and battery.

Table 8 Fig. 15 shows an overview of the medium cost plan, with the
Operating hours of the equipment proposed by the NSGA-II, considering average curves of residence power demand, of the energy generated by the
comfort.
𝜇GD, of the battery energy and the energy consumed from the public
Equipment Time of use of appliances
grid, depicted in a single graphic to facilitate the analysis. It can be
Electric shower – observed from Fig. 15 that the peak of renewable energy is between
High pressure washer –
15 and 16 h. In hour 7, the battery started to discharge because of
Electric dryer –
Water pump 22:00–23:00 and 23:00–24:00 the first cost peak. At 11 am, it starts to charge so that at 20 pm
Electric shower 13:00–14:00, 20:00–21:00 and 21:00–22:00 it discharges again. It can also be seen that, when renewable energy
Air conditioner – increases, the battery starts to receive part of that energy. Furthermore,
Electric coffee maker 9:00–10:00, 13:00–14:00 and 19:00 – 20:00 Fig. 15 shows that, in this energy plan, the amount of energy sold to
Washing machine –
the network increases, leaving several pieces of equipment turned off
Mini system –
Desktop computer 13:00–16:00, 19:00–22:00 and 22:00–01:00 in the analyzed residence.
Induction cooktop – Fig. 16 shows the operating hours of the equipment provided by the
Lamps 20:00–06:00 modified NSGA-II, considering minimum comfort shown in Fig. 12. In
Refrigerator 01:00–24:00 this demand plan, no equipment works during the peak or intermediate
Electric car –
tariffs. The proposed methodology designated that only the water
Television –
Clothes iron 14:00–15:00 pump, the electric shower, the electric coffee maker, the television and
Cost [R$/day] −3,70 the iron have been connected, due to their higher priority. The curves
Comfort 91 depicted in Fig. 17, obtained at the minimum cost plan, show that the
residential energy demand is low and all renewable energy generated
from 9 am to 9 pm is sold to the public energy network. Besides, part
of that energy is used to charge the battery after 1 pm. At almost all
day, there are energy sales to the public network.

15
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

Finally, we analyze the cost behavior of the maximum cost plans References
with and without 𝜇DG and battery. Fig. 18 shows that the cost dif-
ference at the end of the day is R$15.73, which corresponds to a [1] Ackermann Th, Andersson G, Soder L. Distributed generation: a definition. Electr
Power Syst Res 2001;57(3):195–204.
reduction of 51.4% in the energy cost. It should be stressed that,
[2] Lasseter RH. Microgrids. In: 2002 IEEE power engineering society winter
analyzing such behavior, the optimization process provided a medium meeting. Conference proceedings (Cat. No. 02CH37309). 2002, p. 305–8.
and a minimum measurement plans with variations around R$11.87 [3] Farhangi H. The path of the smart grid. IEEE Power Energy Mag
and R$11.41, respectively. 2009;8(1):18–28.
[4] Flores JT, Celeste WC, Coura DJC, Rissino SdD, Rocha HRO, et al. Demand
planning in smart homes. IEEE Lat Am Trans 2016;14(7):3247–55.
8. Conclusion [5] Barbato A, Capone A. Optimization models and methods for demand-side
management of residential users: A survey. Energies 2014;7:5787–824. http:
The energy demand planning in Smart Homes was solved in this //dx.doi.org/10.3390/en7095787.
work, with a new methodology proposed to deal with the tradeoff [6] Gelazanskas L, Gamage KAA. Demand side management in smart grid: A review
and proposals for future direction. Sustainable Cities Soc 2014;11:22–30.
energy cost versus user comfort. Combining three different Artificial
[7] Hong SH, Yu M, Huang X. A real-time demand response algorithm for
Intelligence techniques, the demand-side management problem was heterogeneous devices in buildings and homes. Energy 2015;80:123–32.
formulated before the implementation of an optimization algorithm. [8] Ma K, Yao T, Yang J, Guan X. Residential power scheduling for demand response
The proposed optimization methodology took into account a modified in smart grid. Int J Electr Power Energy Syst 2016;78:320–5.
version of the Elitist Non-dominated Sorting Genetic Algorithm II to [9] Moon S, Lee JW. Multi-residential demand response scheduling with multi-class
appliances in smart grid. IEEE Trans Smart Grid 2016;9(4):2518–28.
manage the user energy demand considering a Smart Home scenario [10] Rasheed MB, Javaid N, Ahmad A, Awais M, Khan ZA, Qasim U, et al. Priority
with electricity price fluctuations over time, priority in the use of and delay constrained demand side management in real-time price environment
equipment, operating cycles and a battery bank. Moreover, prior the with renewable energy source. Int J Energy Res 2016;40(14):2002–21.
Elitist Non-dominated Sorting Genetic Algorithm II modification, the [11] Marzband M, Yousefnejad E, Sumper A, Domínguez-García JL. Real time exper-
imental implementation of optimum energy management system in standalone
methodology employed the Support Vector Regression technique to
microgrid by using multi-layer ant colony optimization. Int J Electr Power Energy
forecast the distributed generation, as well as the K-means clustering Syst 2016;75:265–74.
method to determine the user comfort levels. [12] Li T, Dong M. Real-time residential-side joint energy storage management
The efficiency of the proposed solution was demonstrated according and load scheduling with renewable integration. IEEE Trans Smart Grid
to a 51.4% cost reduction, when Smart Homes with and without 2016;9(1):283–98. http://dx.doi.org/10.1109/TSG.2016.2550500.
[13] Rahim S, Javaid N, Ahmad A, Khan SA, Khan ZA, Alrajeh N, et al. Exploiting
distributed generation and battery bank are compared. The proposal
heuristic algorithms to efficiently utilize energy management controllers with
generate benefits to the consumer, who will pay less for the consumed renewable energy sources. Energy Build 2016;129:452–70.
energy. At the same time, it will benefit the electricity distribution [14] Javaid N, Hussain SM, Ullah I, Noor MA, Abdul W, Almogren A, et al. Demand
company, since, with such readjustments, there will be a smoothing side management in nearly zero energy buildings using heuristic optimizations.
in the load curve and reduction in the maximum demand. Energies 2017;10(8):1131.
[15] Ahmad A, Khan A, Javaid N, Hussain HM, Abdul W, Almogren A, et al. An
Finally, it should be stressed that the methodology proposed in this optimized home energy management system with integrated renewable energy
paper is universal, which means that it can be applied by any residential and storage resources. Energies 2017;10(4):549.
consumer around the world. Beyond adaptations to local tariff models, [16] Nadeem Z, Javaid N, Malik AW, Iqbal S. Scheduling appliances with GA, TLBO,
its application requires the measurements of a local weather station, as FA, OSR and their hybrids using chance constrained optimization for smart
homes. Energies 2018;11(4):888.
well as the consumption history of the Smart Home.
[17] Hussain HM, Javaid N, Iqbal S, Hasan QU, Aurangzeb K, Alhussein M. An
efficient demand side management system with a new optimized home energy
CRediT authorship contribution statement management controller in smart grid. Energies 2018;11(1):190.
[18] Khalid A, Javaid N, Guizani M, Alhussein M, Aurangzeb K, Ilahi M. Towards
Helder R.O. Rocha: Conception and design, or analysis and in- dynamic coordination among home appliances using multi-objective energy
optimization for demand side management in smart buildings. IEEE Access
terpretation of the data, Drafting the article or revising it critically
2018;6:19509–29.
for important intellectual content, Approval of the final version. Icaro [19] Rahim MH, Khalid A, Javaid N, Alhussein M, Aurangzeb K, Khan ZA. Energy
H. Honorato: Conception and design, or analysis and interpretation efficient smart buildings using coordination among appliances generating large
of the data, Drafting the article or revising it critically for important data. IEEE Access 2018;6:34670–90.
intellectual content, Approval of the final version. Rodrigo Fiorotti: [20] O’Dwyer E, Pan I, Acha S, Shah N. Smart energy systems for sustainable
smart cities: Current developments, trends and future directions. Appl Energy
Conception and design, or analysis and interpretation of the data, 2019;237:581–97.
Drafting the article or revising it critically for important intellectual [21] Ullah I, Hussain S. Time-constrained Nature-Inspired Optimization Algorithms
content, Approval of the final version. Wanderley C. Celeste: Concep- for an efficient energy management system in smart homes and buildings. Appl
tion and design, or analysis and interpretation of the data, Drafting Sci 2019;9(4):792.
[22] Makhadmeh SN, Khader AT, Al-Betar MA, Naim S, Abasi AK, Alyasseri ZAA.
the article or revising it critically for important intellectual content,
Optimization methods for power scheduling problems in smart home: Survey.
Approval of the final version. Leonardo J. Silvestre: Conception and Renew Sustain Energy Rev 2019;115:109362.
design, or analysis and interpretation of the data, Drafting the article or [23] de Christo TM, Perron S, Fardin JF, Simonetti DSL, de Alvarez CE. Demand-
revising it critically for important intellectual content, Approval of the side energy management by cooperative combination of plans: A multi-objective
final version. Jair A.L. Silva: Conception and design, or analysis and method applicable to isolated communities. Appl Energy 2019;240:453–72.
[24] Rasheed MB, Javaid N, Malik MSA, Asif M, Hanif MK, Chaudary MH. Intelligent
interpretation of the data, Drafting the article or revising it critically multi-agent based multilayered control system for opportunistic load scheduling
for important intellectual content, Approval of the final version. in smart buildings. IEEE Access 2019;7:23990–4006.
[25] Tom RJ, Sankaranarayanan S, Rodrigues JJPC. Smart energy management and
Declaration of competing interest demand reduction by consumers and utilities in an IoT-Fog based power
distribution system. IEEE Internet Things J 2019;6(5):7386–94. http://dx.doi.
org/10.1109/JIOT.2019.2894326.
The authors declare that they have no known competing finan- [26] Arabul FK, Arabul AY, Kumru CF, Boynuegri AR. Providing energy management
cial interests or personal relationships that could have appeared to of a fuel cell–battery–wind turbine–solar panel hybrid off grid smart home
influence the work reported in this paper. system. Int J Hydrogen Energy 2017;42(43):26906–13.
[27] Killian M, Zauner M, Kozek M. Comprehensive smart home energy man-
Acknowledgment agement system using mixed-integer quadratic-programming. Appl Energy
2018;222:662–72.
[28] Khalid R, Javaid N, Rahim MH, Aslam S, Sher A. Fuzzy energy manage-
The authors acknowledge the support from the FAPES, Brazil 538/2018, ment controller and scheduler for smart homes. Sustain Comput: Inform Syst
601/2018 and CNPq, Brazil 309823/2018-8 projects and NiDA, Brazil. 2019;21:103–18.

16
H.R.O. Rocha et al. Applied Energy 282 (2021) 116145

[29] Goncalves I, Gomes A, Antunes CH. Optimizing the management of smart [40] Schölkopf B, Bartlett P, Smola A, Williamson R. Support vector regression with
home energy resources under different power cost scenarios. Appl Energy automatic accuracy control. In: International conference on artificial neural
2019;242:351–63. networks. London: Springer; 1998, p. 111–6.
[30] Sharifi AH, Maghouli P. Energy management of smart homes equipped with [41] Cortes C, Vapnik V. Support-vector networks. Mach Learn 1995;20(3):273–97.
energy storage systems considering the PAR index based on real-time pricing. [42] Coello CAC. Evolutionary multi-objective optimization: some current research
Sustain Cities Soc 2019;45:579–87. trends and topics that remain to be explored. Front Comput Sci China
[31] Luo F, Kong W, Ranzi G, Dong ZY. Optimal home energy management system 2009;3(1):18–30.
with demand charge tariff and appliance operational dependencies. IEEE Trans [43] Mbhamidi L, Sivasubramani S. Optimal planning and operational strategy
Smart Grid 2019;11(1):4–14. of a residential microgrid with demand side management. IEEE Syst J
[32] de Souza Dutra MD, da Conceição Júnior G, de Paula Ferreira W, Chaves MRC. 2019;14(2):2624–32.
A customized transition towards smart homes: A fast framework for economic [44] Khan ZA, Khalid A, Javaid N, Haseeb A, Saba T, Shafiq M. Exploiting
analyses. Appl Energy 2020;262:114549. nature-inspired-based artificial intelligence techniques for coordinated day-
[33] E Silva DP, Salles JLF, Fardin JF, Pereira MMR. Management of an island and ahead scheduling to efficiently manage energy in smart grid. IEEE Access
grid-connected microgrid using hybrid economic model predictive control with 2019;7:140102–25.
weather data. Appl Energy 2020;278:115581. [45] Chiu WY, Hsieh JT, Chen CM. Pareto optimal demand response based on energy
[34] Romero-Quete D, Garcia JR. An affine arithmetic-model predictive control costs and load factor in smart grid. IEEE Trans Ind Inf 2019;16(3):1811–22.
approach for optimal economic dispatch of combined heat and power microgrids. [46] Chang HH, Chiu WY, Sun H, Chen CM. User-centric multiobjective approach to
Appl Energy 2019;242:1436–47. privacy preservation and energy cost minimization in smart home. IEEE Syst J
[35] Hossain MA, Pota HR, Hossain MJ, Blaabjerg F. Evolution of microgrids with 2018;13(1):1030–41.
converter-interfaced generations: Challenges and opportunities. Int J Electr Power [47] Rachmawati L, Srinivasan D. A multi-objective genetic algorithm with control-
Energy Syst 2019;109:160–86. lable convergence on knee regions. In: 2006 IEEE international conference on
[36] Rocha HRO, Silvestre LJ, Celeste WC, Coura DJC, Junior LOR. Forecast of dis- evolutionary computation. 2006, p. 1916–23.
tributed electrical generation system capacity based on seasonal micro generators [48] Chiu WY, Yen GG, Juan TK. Minimum Manhattan distance approach to multiple
using elm and pso. IEEE Lat Am Trans 2018;16(4):1136–41. criteria decision making in multiobjective optimization problems. IEEE Trans
[37] Thapar V, Agnihotri G, Sethi VK. Critical analysis of methods for mathematical Evol Comput 2016;20(6):972–85.
modelling of wind turbines. Renew Energy 2011;36(11):3166–77. [49] Zou J, Li Q, Yang S, Bai H, Zheng J. A prediction strategy based on center
[38] Carrillo C, Montaño AO, Cidrás J, Díaz-Dorado E. Review of power curve points and knee points for evolutionary dynamic multi-objective optimization.
modelling for wind turbines. Renew Sustain Energy Rev 2013;21:572–81. Appl Soft Comput 2017;61:806–18.
[39] Abdelaziz AY, Hegazy YG, El-Khattam W, Othman MM. Optimal allocation [50] Deb K, Agrawal S, Pratap A, Meyarivan T. A fast elitist non-dominated sorting
of stochastically dependent renewable energy based distributed generators in genetic algorithm for multi-objective optimization: NSGA-II. In: International
unbalanced distribution networks. Electr Power Syst Res 2015;119:34–44. conference on parallel problem solving from nature. 2000, p. 849–58.

17

You might also like