Research ProposalPDF Available

Title of Research Proposal Towards Smart Cities: A Move for Efficient Energy Management from a Home to Cities Exploiting Clouds Signature of Student

Authors:

Abstract

The reliable, efficient, sustainable and optimal management of city resources to facilitate the inhabitants define the Smart City (SC). A SC has many management sectors; however, the power sector is the backbone, which has a complex and expensive structure. The integration of the conventional power grid with Information and Communication Technologies (ICTs) defines the Smart Grid (SG). Two-way communication between supply and demand sides provides an opportunity to optimize power production and consumption. In this synopsis, Demand Side Management (DSM) is proposed for the residential sector. The residential sector is divided into islanded Smart Homes (SHs) and smart communities. In SHs, the appliances are scheduled to shift the load from on-peak to off-peak hours to reduce the energy cost and mitigate the load peak demand. In this synopsis, four scheduling algorithms are proposed for a SH’s appliances. The cost efficient energy consumption using the algorithms shall be analyzed by implementing with three pricing schemes; Critical Peak Pricing (CPP), Day Ahead- Real Time Pricing (DA-RTP) and Inclined Block Rates (IBR) with three Operation Time Intervals (OTIs); 10, 30 and 60 minutes for a SH. The habitants of a set of SHs in a region or building in a city share the things on common grounds, which define the community. When SHs of a region schedule their load from on-peak to off-peak hours, the load peak is generated in off-peak hours. In the synopsis, four cloud-fog based system models are proposed for communities to optimize energy consumption with time efficiency. The Response Time (RT), Processing Time (PT) and computing cost of the system are optimized with Service Broker Policies (SBPs) and load balancing algorithms (managing the load of requests and tasks) to balance the load of physical and virtual resources for the fog. SBPs route the requests on potential data center and load balancers (heuristic techniques) manage the load of requests on virtual resources efficiently. The quality of resource utilization effects the RT, PT and computing cost. Cloud-fog based models for realistic environments, in which Fog-as-a-Power-Economy-Sharing and Fog based Energy Management as a Service (FEMaaS) for prosumers are proposed for communities. The cost efficient energy consumption and efficient computing cost will validate the feasibility of proposed system. The proposed research will strengthen the concept of SC with cost efficient energy management in SG.
COMSATS University Islamabad, Islamabad Campus
Synopsis For the Degree of M.S/MPhil.
XPhD.
PART-1
Name of Student Rasool Bukhsh
Department Computer Science
Registration No.
FA15-PCS-006 Date of Thesis Registration
Name of
(i) Research Supervisor
(ii) Co-Supervisor
(i) Dr. Nadeem Javaid
(ii) Dr. Majid Iqbal Khan
Research Area Energy Optimization in Smart Grid
Members of Supervisory Committee
1 Dr. Nadeem Javaid
2 Dr. Majid Iqbal
3 Professor Dr. Sohail Asghar
4 Dr. Muhammad Manzoor Ilahi Tamimy
Title of Research Proposal Towards Smart Cities: A Move for Efficient Energy Management
from a Home to Cities Exploiting Clouds
Signature of Student:
Summary of the Research
The reliable, efficient, sustainable and optimal management of city resources to facilitate the in-
habitants define the Smart City (SC). A SC has many management sectors; however, the power
sector is the backbone, which has a complex and expensive structure. The integration of the con-
ventional power grid with Information and Communication Technologies (ICTs) defines the Smart
Grid (SG). Two-way communication between supply and demand sides provides an opportunity to
optimize power production and consumption. In this synopsis, Demand Side Management (DSM)
is proposed for the residential sector. The residential sector is divided into islanded Smart Homes
(SHs) and smart communities. In SHs, the appliances are scheduled to shift the load from on-peak
to off-peak hours to reduce the energy cost and mitigate the load peak demand. In this synopsis,
four scheduling algorithms are proposed for a SH’s appliances. The cost efficient energy con-
sumption using the algorithms shall be analyzed by implementing with three pricing schemes;
Critical Peak Pricing (CPP), Day Ahead- Real Time Pricing (DA-RTP) and Inclined Block Rates
(IBR) with three Operation Time Intervals (OTIs); 10, 30 and 60 minutes for a SH. The habitants
of a set of SHs in a region or building in a city share the things on common grounds, which define
the community. When SHs of a region schedule their load from on-peak to off-peak hours, the
load peak is generated in off-peak hours. In the synopsis, four cloud-fog based system models are
proposed for communities to optimize energy consumption with time efficiency. The Response
Time (RT), Processing Time (PT) and computing cost of the system are optimized with Service
Broker Policies (SBPs) and load balancing algorithms (managing the load of requests and tasks)
to balance the load of physical and virtual resources for the fog. SBPs route the requests on po-
tential data center and load balancers (heuristic techniques) manage the load of requests on virtual
resources efficiently. The quality of resource utilization effects the RT, PT and computing cost.
Cloud-fog based models for realistic environments, in which Fog-as-a-Power-Economy-Sharing
and Fog based Energy Management as a Service (FEMaaS) for prosumers are proposed for com-
munities. The cost efficient energy consumption and efficient computing cost will validate the
feasibility of proposed system. The proposed research will strengthen the concept of SC with cost
efficient energy management in SG.
1 Introduction
Electricity generation and distribution are expensive and complex processes. In the conven-
tional power grid, power is produced according to demand and transmitted to end-users. The
rise in power demand causes high production. The power plants run on fossil fuels, which pol-
lutes the environment due to the high emssion of carbon [1]. Unfortunately, more than 65%
of the total produced electricity is wasted during the processes of production, transmission and
distribution [2]. The 80% of the world’s population has access to electricity and technologi-
cal developments have rapidly increased the electrical and electronic gadgets from personal to
corporate usage [3]. Moreover, power consumption behavior of the masses defines the on-peak-
load and off-peak-load on the supply side. The power plants run the generators on fossil fuels,
which emit the carbon-dioxide. The huge amount of carbon dioxide is emitted during on-peak
time due to the functioning of additional generators to fulfill the load demand. The efficient
energy management optimizes energy consumption on the demand side to avoid the on-peak-
load as well as to minimize carbon gas emission. The high concentration of the gas pollutes
the environment and has greenhouse effects. A variety of optimization solutions for demand
side energy management have been proposed. However, an efficient mechanism for two way
communication between supply and demand sides guarantees the effective energy consumption
management. The integration of Information and Communication Technology (ICT), to provide
communication platform, with the traditional power grid makes the Smart Grid (SG).
The energy management is required in various scenarios, i.e., Smart Homes (SHs), smart
communities, integration of renewable energy with utility, energy trading and incentives for
prosumers. A SH optimizes power consumption by scheduling the load; however, for com-
munities, energy is managed in distributive or centralized pattern. In this synopsis, scheduling
algorithms are proposed to optimized energy consumption of home appliances and cloud-fog
based semi-centralized system models are proposed for rigid and flexible communities. The
various components used for energy management in SHs and smart communities are discussed
in following subsections.
1.1 The SG
The National Institute of Standards and Technology (NIST) has defined the SG as the integration
of power infrastructure with communication and computing services. The two way communi-
cation and energy controlling enable the new applications and functionalities for businesses [4].
The intelligent integration of electricity network and actions of end-users incorporating the lat-
est smart technologies ensures a sustainable, economic and secure supply of electricity is called
SG; defined by European technology platform (European Commission 2006). The Smart Me-
ters (SMs), smart appliances, Renewable Energy Sources (RESs) and Energy Storage Systems
(ESSs) are used on the demand side for intelligent energy usage. However, power production,
transmissions and distribution are the vital operations performed with advanced ICTs in SG.
The ICTs enable the SG to be operated within time frames using control command defined by
international standards, e.g., IEEE-1547 (an IEEE standard defined for control and management
of distributed energy sources). The SG provides simultaneous and smart interaction of power
operators and consumers to attain the objectives of safe, efficient and reliable power system [5].
The global electricity demand has increased in recent years and it is expected to increase
exponentially till 2050 [6]. The scientists propose the integration of ICTs and RESs with tra-
ditional power grids to control the greenhouse effects due to carbon emission. The integration
of RESs increase the complexity of the power system and has become challenging to stabilize
the distributed power generation at large scale [7]. The autonomous smart decisions of SG
promise the integration of RESs, ESSs and utility with fault-detection, self-healing, monitoring
and controlling to balance between supply and demand sides. In SG, energy management is di-
vided into Supply Side Management (SSM) and Demand Side Management (DSM). The energy
production, transmission and distribution are performed on the supply side; however, planning,
monitoring, scheduling of loads are performed on the demand side.
1.2 The DSM
The SG is scalable and can integrate RESs, distributed grids, ESSs and SHs on demand side.
The demand side consists of industrial, commercial and residential users for Demand Response
(DR) activities [8]. The DSM educates the consumers to reduce power demand or schedule
their energy demand to avoid peak-load. The consumers are encouraged to optimize their power
consumption by providing them financial incentives [9]. The stability of the grid is attained
only with balanced demand and supply. On the peak-load demand, additional generators are
turned on to fulfill the demand. The DSM is comprised of various strategies to convince the
consumers to reduce the energy consumption during peak-load demand, e.g., peak clipping,
shifting load, valley filling, energy conservation [10]. In peak clipping strategy, the consumer
reduces the power consumption by turning off unnecessary or low priority appliances via direct
load control. In load shifting techniques, incentive based schemes are proposed to encourage
the users to shift load from on-peak to off-peak time. Here, the total load demand of consumer
remains unchanged. In the valley filling strategy, the load builds during peak time. An effort
to reduce energy consumption by modification of services is known as energy conservation
strategy, e.g., driving less.
1.3 DSM in Residential Sector
The growing electricity demand compels to produce more energy, which causes high carbon
emission. The Energy Management Systems (EMS) for optimized and efficient energy con-
sumption on demand side minimize the energy demand. To analyze the demand side, it is
further divided into industrial, commercial and residential sectors. The commercial buildings
like hotels, hospitals, offices and stores are reluctant to participate in energy optimization due to
their business and profits [11]. Industries are also reluctant to schedule their energy due to their
huge profit [12]. The residential sector has more elastic behavior of power consumption as com-
pared to industrial and commercial sectors [8], which provides a high opportunity to optimize
power consumption [1], [13]-[14]. The information shared between the supply side and resi-
dential sector encourages the consumers (on the demand side) to use cost efficient micro-power
generators to avoid expensive utility energy. The variety of RESs and ESSs are widely accepted
in the residential sector to fulfill cost efficient energy demands [15]. When homes shift from
utility to RESs or ESSs for cost efficient energy consumption, it off-loads the utility to shave the
peaks of high load demand, which minimize power production and carbon emission. The SHs
with smart appliances schedule the operation of appliances to shift the load for cost efficiency
[16]-[17].
Load optimization techniques are applied to schedule the appliances in SHs in the residential
sector for cost efficient power consumption. However, consumer’s satisfaction is compromised
due to the shifting of appliances’ operations from the desired time. The RESs based Micro Grids
(MGs) provide uninterrupted and cost efficient power supply; however, RES based MGs are ex-
pensive and difficult to maintain. Moreover, the intermittent nature of the sources makes the
system complex [18]. ESS provides an alternative and effective solution to solve the aforemen-
tioned problem. Battery based ESS (BESS) is resilient and affordable with lesser maintenance
as compared to RES. The BESS is a popular power backup solution for residential consumers
[19]. The energy storage companies have been developing scenario based power solutions using
the storage systems [13]. These power solutions have high flexibility, reliability and availability.
To avoid expensive energy from the utility during on-peak hours, the storage systems provide
the promising cost efficient solution [14], [17]. The demand side management with energy stor-
age system reduces the load on the utility and also minimizes the cost of consumption [20]-[21].
The RESs based energy solution is more beneficial for multiple homes (e.g., community); how-
ever, for islanded SHs, BESSs are popular. So, in SG the residential sector is further divided into
islanded SHs and the communities. The efficient energy management from SHs to communities
eventually leads to Smart City (SC) energy management.
1.3.1 Islanded SH
The presence of conventional and SHs in a residential area consume the energy at utility defined
pricing. The utility broadcasts the tariff information and conventional homes consume energy
at defined rates; however, SHs optimize their power consumption to reduce energy consumption
cost. The SHs use the features of ICTs to automate and control the smart appliances [22]. The
Home Energy Management Controller (HEMC) manages the appliances to consume energy ef-
ficiently. The HEMC is installed with intelligent programs, which find optimal, economical and
reliable energy optimization solutions with high user comfort at reduced cost and curtailment
of peak-load. A variety of mathematical and heuristic load scheduling techniques for various
scenarios; considering single and multiple homes, have been proposed [1], [14]. The use of
RESs or ESSs or both in islanded SHs also reduce the peak-load on the supply side and energy
consumption cost. The system models for cost efficiency with load scheduling for single and
multiple homes in the residential area have been proposed to analyze the load peaks reduction
and consumers’ cost minimization [23]. The load is optimized by shifting from on-peak to off-
peak time. If all the homes in the area shift their load from on-peak to off-peak time then the
peak will generate in off-peak time. This communal optimization is an inefficient solution.
1.3.2 Community
The load optimization with respect to energy tariff is an efficient solution when neighboring
SHs have a different solution in a community. The optimization of energy consumption in
consideration of whole community needs a centralized mechanism of energy optimization; e.g.,
cloud and fog based energy management [24], [25]. The development of ICTs provides the
platform for the Internet of Thing (IoT), which led to cloud and fog based systems for distributed
and centralized environment. The cloud has the huge computing resources as compared to
fog; however, cloud based system suffer from latency issue due to mega infrastructure [26].
The fog based energy consumption optimization is proposed to overcome the latency issues of
cloud based system [27]. The centralized energy management solutions are proposed depending
on the category of the community. The number of SHs in region or building, which cannot
be expended with additional SHs in future is the rigid community; however, the expandable
region with additional SHs in (near) future is known as flexible community. The system model
with the computational resource, resource optimization, computing cost, energy consumption
optimization and time-efficiency are key challenges for rigid and flexible communities.
1.4 The Cloud Computing
Cloud computing, referred as “the cloud”, delivers the services on demand on pay-as-you-use
basses. The NIST defines the cloud as, a model for enabling convenient, on-demand network
access to a shared pool of configurable computing resources (e.g., networks, servers, storage, ap-
plications, and services) that can be rapidly provisioned and released with minimal management
effort or service provider interaction [28]. However, researchers have redefined cloud comput-
ing according to their use of services over the Internet. The IBM has defined the cloud as, the
computing service over the Internet on pay-as-you-use bases with three basic services; Software-
as-a-Service (SaaS), Platform-as-a-Service (PaaS) and Infrastructure-as-a-Service (IaaS) [29].
The resources of cloud computing are scalable to meet the demand. The services are metered
to calculate payments for use of services. The services are, usually, self-service for end-users
to customize according to their demands. In SaaS, the softwares run on distance computers (the
cloud), which are owned by a company to facilitate their users. The end-users’ machines are
connected with the cloud via the Internet for the software services. It gives the opportunity to
access the service from anywhere and anytime. Data is safe, if the user’s computer crashes, the
resources are automatically scaled according to demand or use. An instant business startup and
many more benefits are there for SaaS on the cloud. The user does not need to have complete
hardware with software computing machine to manage complete life-cycle of building applica-
tion. All the service can be accessed via the Internet from the cloud of PaaS. The user does not
need to maintain personal computing machine and there is no risk of system crash. The cor-
porate companies can access the cloud for infrastructures like servers, networking, storage and
other computing resources via IaaS. IaaS provides flexible, scalable and on-demand resources
without maintaining and investing in personal hardware resources.
The IBM also defines the types of the cloud according to their use and kinds of users.
For example, the public cloud is owned by the companies or government agencies to facilitate
the public to use the services (e.g., SaaS, PaaS, IaaS) without investing expensive personal
computing machines. The private cloud is owned by an organization to use solely for own use.
The physical systems are usually placed in the premises of the company to manage; however,
maintained by the third party or internally. These systems have company specific services only
and managed with sophisticated data security. The hybrid cloud is a combination of public and
private clouds. The companies access the services of the public cloud to manage their own
services.
The cloud has huge resources and provides access to heterogeneous service for a variety of
requests from the end-users via the Internet. The long physical distance between cloud comput-
ing resources and the users is resolved with routers and switches. However, a number of hops
between the user and the cloud as well as the load of tasks performed on the cloud compromise
the Response Time (RT) [30]. Moreover, a common pool of data of a variety of users makes it
unsecured [31].
1.5 The Fog Computing
The limitations of cloud based systems due to the distance between physical computing envi-
ronment and end-users as well as due to a huge common pool for data storage for a variety of
end-users can be solved with the fog computing system. The Cisco defined the fog computing as
the extension of cloud computing from the core to the edge of network [32]. The fog resources
are placed at the edge of the network and close to the end-users. The end-users are usually
directly connected with the fog for high computation with minimum RT. The fog has limited
computing resources as compared to the cloud. Multi-layered systems are proposed in [33], if
more resources are required to the fog. The end-users’ layer is connected with the fog and the
fog is connected with the cloud to access the computing resources. The RT for the end-users’
requests is significantly reduced with the fog as compared to the cloud based system. Moreover,
performance bottleneck is created for the fog when a huge load of tasks or requests reach out
from the end-users’ to process due to limited resources. However, an efficient resource utiliz-
ing techniques are required to solve the aforementioned issue. The following basic components
are important to manipulate for the enhancement of the performance of the fog and the cloud
resources.
1.5.1 Communication Network
In SHs, home area network is designed for communication of smart appliances with centralized
EMC or among the appliance themselves. The communication helps to optimize power con-
sumption with respect to the information shared and architecture design with control programs
implemented in the SH. The network supports wired and wireless technologies. The wireless
media like Bluetooth, WiFi, WiMAX, etc. are used in the network [34]. A control program with
user interface links the SM, appliances and the consumers. The high bandwidth Internet and
proliferation of the IoT have accelerated the deployment of home area network with static and
mobile controlling facility. The IoT devices also encourage to design a network for distributed
and centralized environment for energy management using the cloud and fog based systems. In
fog based systems, the end-users are directly connected with the fog using long range wireless
like ZigBee as well as wired technologies for efficient RT [35]-[36].
1.5.2 Virtual Machine
Virtual Machines (VMs) are softwares that mimic the physical machines. Unlike simulator that
mimics of how a physical machine works, the VM extends the utility by serving and supporting
the resources [37]. In fog and the cloud, VMs share the computing resources like storage and
processing of CPU [38]. Each VM acts as an independent resource while residing in the same
machine. In fog and the cloud, data centers have physical components for huge storage and
processing units, where VMs are created to share these huge resources. The VMs have sizes
and are created or killed according to the static or dynamic scenarios. The performances of the
fog and the cloud are affected by the size and number of VMs created. Moreover, the load of
requests or tasks are assigned to VMs in the data center; however, inefficient load assigning
compromise the resource utilization. Meta-heuristic techniques are used to balance a load of
tasks on the VMs in the data center to enhance the performance.
1.5.3 Bio-inspired Heuristic Techniques
There are mathematical, logical and nature inspired solutions for optimization. The meta-
heuristic solutions for optimization inspired by nature are efficient and effective. These are
inspired from Physics, Chemistry, Biology and computational psychology, etc.; however, bio-
inspired optimizing techniques are more adopted by the researchers as compared to rest of the
techniques [39]. Bio-inspired heuristic techniques are categorized into five categories based
on; evolutionary process, the behavior of collective swarm, ecological processes, human intelli-
gence and the physical phenomenon [40]. In SG, the algorithms inspired from these categories
are used for optimized power consumption on demand side. In islanded SHs, heuristic tech-
niques are used to optimize the power consumption of the appliances by shifting load from
on-peak to off-peak time. In fog and the cloud computing, the balanced load of tasks or requests
are allocated on VMs in the data centers.
1.5.4 Service Broker Policy
The Service Broker Policies (SBPs) are constraints used to route the tasks or requests on po-
tential data centers of the cloud and fog. The potential data center is selected on rules defined
for efficient RT. These rules consider the constraints like a nearest data center, load traffic on
the network, a load of tasks or requests on the data center, shortest RT, load and RT prediction
and proximity. The SBPs are also defined in consideration of data center architecture, design
(distributed/centralized), data center energy consumption, static and dynamic load traffic and
routing mechanism, etc. [41]-[42]. The SBPs and load balancing algorithms manage the tasks
or requests onto the computing resources to overcome the latency issues. Moreover, efficient
resource utilization also reduces the computing cost.
1.5.5 Prosumers: Integration of Renewable Energy with Utility
National policies are set by many countries to generate and integrate green energy with the
utilities. The European Union has set the goal to reduce greenhouse gases by generating 35% of
power from RESs [43]. However, 14% of world’s power is being supplied by RESs [43]. The
deployment of MGs with RESs and ESSs can fulfill energy demand and can reduce emission of
CO2[44]. The information and communication technologies provide efficient power production
and consumption with autonomous, sustainable, scalable and self-healing characteristics to form
SG [45]. The SGs around the globe require efficient energy management in such a way that
renewable energy producers are encouraged to participate for their maximum revenue. For
this purpose, small and large scale renewable power generators should be configurable in the
existing SG systems. Around 179 countries have set the target to fulfill part of power demand
from green energy sources; by 2020 Germany has set the target to produce 35% energy from
RESs, U.S states like California has set 33% and the Republic of Korea has set 10% [46].
The governments have launched subsidized projects for renewable power usage as social
welfare without considering the willingness of the public to pay [47]. These projects overburden
the expenditure for governments. As a result, Spain stopped subsidizing on PVs in 2012 and
in European countries such schemes are partly reduced [48]. Therefore, the trading strategies
can encourage large and small scale renewable energy producers to participate in an integrated
power grid system. It reduces carbon emission while fulfilling energy demand.
The integration of Distributed Energy Resources (DERs) is challenging due to various fac-
tors like intermittency of RESs, uncertain energy demand, scalability of the system and number
of participants in the system, etc. [49]-[50]. In the literature, a variety of solutions have been
proposed to integrate renewable and stored energy with the power grid. Moreover, a variety
of bidirectional dispatch network designs for power flow have been investigated for distributed
generators [51]-[53]. The conventional power distribution system has the limitation for dis-
patching Distribution Generation (DG), which makes the unmanaged DG output accepted pas-
sively for power grids and local demand load. In the SG, renewable energy is managed by
clustering DG installations to form the Virtual Power Plant (VPP) [54], which is operated by
the centralized control unit. The well-managed cluster of DERs can maximize their profit by
considering their types, geographic locations, energy efficiencies and their capacities [55]. The
energy management techniques with DR on demand side considering conventional and VPP
promote market efficiency and reliability, which are currently operated in independent system
operators, regional transmission organization [56] and distribution system operators [57]. Simi-
larly, MGs optimizes energy states in islanded and grid-connected mode [58], [59]. The efficient
management for unmanaged DG, VPP, DR and MGs is expensive to implement. Moreover, the
complexity increases with business and operation models by the deployment of more DERs.
To maximize the incentive for distributed energy producers net metering provides economic
benefits even at small scale [60]. It allows prosumers to participate in the energy market to trade
surplus energy in this power market by choosing a Retail Energy Provider (REP), which offers
buy-back programs. However, there are few, which buy-back the energy [61]. The residential
prosumers produce a small amount of surplus energy and the residents face the difficulty to
have sufficient choices. To tackle such issues, authors have proposed a variety of centralized
solutions like cloud computing based energy management system.
The cloud based systems have latency issue due to the processing of a load of tasks and
the infrastructure designs. The end-users are physically at distance from the actual processing
machine, which also increase the RT. In this paper, the Fog based Energy Management-as-a-
Service (FEMaaS) for smart communities is proposed. The residents of the communities are
equipped with RESs and ESSs to consume cheaper energy. The FEMaaS forms the virtual
REPs out of these distributed energy generators, which are integrated with existing REPs. The
resident of a smart community who produces and also consumes the energy is called prosumer.
The FEMaaS provides intermediate services between the utility and the prosumer for power
generation, trading and consumption with the optimized choice. The FEMaaS cooperates with
different components of the system through Linear Programming (LP) model to: 1) minimize
global cost or maximize the incentives to encourage prosumers and companies to equip RESs
and 2) enhance the integration of renewable energy by following the commitments. The commit-
ments are contracts designed for FEMaaS and utility, on which both are agreed. Such contracts
already exist between utilities and REPs [62].
2 Related Work
In this section, literature for energy management in residential sector has been discussed for
islanded SHs and for communities;
2.1 Islanded SHs: Energy Optimization for Cost Reduction (RESs, ESSs and Util-
ity)
The authors [63] introduce the management framework for Electrical Vehicle (EV) charging and
discharging for efficient utilization of PhotoVoltaic (PV) throughput. A coordination between
home energy management and grid management systems is established by exchanging the infor-
mation. The charging-discharging plan of EV assists the Home EMS (HEMS) to reduce the cost
and curtailment of PV without compromising the EV energy demand for driving. The proposed
framework is evaluated on the simulated model and the results advocate the efficiency of the
framework in terms of cost reduction for the SH and PV curtailment. Similarly, the authors in
[64] propose a stochastic based dynamic programming framework energy management of a SH
using EV to overcome intermittency of RESs. Battery model for EV, the probabilistic behavior
of EV drive and operating modes among EVs, EVs-to-grid, grid-to -EVs, SH’s demand and
utility rates are the elements of the framework. The simulation results show the optimized cost
for SH and operational cost between EV and SG [65].
The appliances scheduling on the basis of experience for operations of SH’s appliances is
an effective technique. The authors of [66] propose a Quality of Experience (QoE) based HEM
for a SH. The appliances of a SH are scheduled using the Cost Saving Appliance Scheduler
considering the QoE; (Q-CSAS) algorithm with Time Of Use (TOU) pricing, which suffers the
appliances. Where there is surplus energy by considering the QoE, the appliances are scheduled
using Renewable Source Power Allocation (Q-RSPA). The simulations are performed for 1000
SHs and results show that the proposed algorithms are 22% cost efficient without RESs and
are 30% of cost is reduced with RESs installation. A distributed HEMS is proposed by [67].
The SHs schedule the appliances, consume energy from storage and the utility. Local energy
optimization is achieved by scheduling the devices according to day-ahead pricing. The pricing
structure is defined on generation and consumption; however, the distributed control method is
proposed for energy efficiency and cost optimization for every SH.
An EMC is proposed by [68] that uses three scheduling algorithms: Ant Colony Optimiza-
tion (ACO), Binary Particle Swarm Optimization (BPSO) and Genetic Algorithm (GA). The
simulations are performed for three categories of SH’s appliances: fixed, interruptible and non-
interruptible. The algorithms schedule the appliance to avoid peak pricing hours using TOU and
IBR pricing signals. The results show that the GA reduce more Peak to Average Ration (PAR)
and electricity bill with maximum user comfort than ACO and BPSO. The ACO and BPSO have
high time and space complexity.
A multi-objective Home Energy Management (HEM) is proposed by [69]. The objective of
HEM is to reduce the consumer’s maximum cost by managing the shiftable and nonshiftable
appliances of a SH. The sequential system model averts the peak-load in MG by scheduling
shiftable appliance in SH and managing plug-in EVs, PV panels and small scale storage system.
The linear techniques are used to prevent non-linear nature of the proposed system model. The
simulation results with three scenarios advocate the load and cost efficiency of the proposed
system model. Another multi-objective system model is proposed by [70]. The system is a
combination of Multi-Objective Dynamic Economic and Emission Dispatch (MODEED) and
DSM to analyze the beneficiary effects of DSM on SSM. In a test system of six thermal units,
the objective of MODEED is reduced by Multi-Objective Particle Swarm Optimization (PSO);
(MOPSO) and the results are compared with Non-dominated Sorting GA (NSGA). The simula-
tion results show that the proposed system model has benefits for DSM and SSM. However, the
thermal power generation system is harmful to the environment while the same system can be
tested for RESs based MGs [71].
Converting a conventional home into SH helps the DSM to optimize the power consumption.
The authors of [72] propose a wireless plugins for conventional homes to control the operation
of appliances. The SM receives the two pricing signals: day ahead and real-time, from the
power companies. The SM controls the appliances using plugins by shifting the operation time
of appliances with the proposed algorithm. The appliances are shifted in less tariff hours, which
reduces the power consumption bill. The simulation results show that SM controller and the
wireless plugins reduce 8% power consumption cost in a day. The authors in [73] propose a
HEMS architecture. The control algorithm manages battery storage and temperature of appli-
ances. The proposed storage system stores the energy during off-peak hours, which is utilized
during on-peak hours. The temperature of thermal sensitive appliances is managed during on-
peak hours. The algorithm maintains the maximum energy in the storage system during the day.
The simulation results show that the proposed HEMS architecture with the algorithm reduces
20% cost for a day. The user satisfaction remained maximum.
Every SH has its own behavior of power consumption, which depends on the residents. The
optimization of multiple SHs with their unique behavior of power consumption is a challenging
task. The authors [1] consider multiple SHs with multiple appliances of different power rating
and propose a DSM scheme to reduce electricity bills and PAR. Cuckoo Search Algorithm
(CSA) and strawberry algorithm are used to schedule the appliances of SHs. Every SH has
own energy storage system, which is charged from the utility during the off-peak hour and used
during the on-peak hour. The surplus energy of the storage system is sold back to the utility to
reduce electricity cost. The simulations are performed for the proposed system model with the
schemes in three scenarios. The results show that CSA is more cost efficient than strawberry
algorithm.
The storage system is not suitable for some scenarios due to its life and the constraints like
heating and maintenance. The efficiency of RESs are dependent on geographical and environ-
mental conditions. The authors [74] propose a cost effective solution for the SH, which has
its own PV based MG, which is connected to the utility. A genetic wind driven optimization
algorithm is proposed to schedule the shiftable and non-shiftable appliance. The simulations are
performed with two pricing signals: real time pricing and IBR. The proposed scheme efficiently
shifts the appliances from off-peak hours to on-peak hours and reduce the maximum cost. The
simulation results show that the proposed algorithm reduces PAR and cost more efficiently than
GA and BPSO.
Three case studies are discussed in [75] to study the energy saving for Singapore house-
holds with smart technologies. The authors suggested to adopt smart technologies for SHs to
save maximum energy. The analysis shows that the awareness of environmental pollution, se-
curity and comfort convince an individual to alter energy consumption behavior. The immature
technology and poor design discourage the consumers to adopt smart technology. Artificial
Intelligence (AI) based technologies that are integrated with public service and the utility sec-
tors, convince the consumers to use smart technologies. The residents of buildings are provided
with SMs in Singapore to detect power consumption behavior and these take action according
to the predefined program. The SM controls the appliances without making the consumer an
active operator. The consumer is notified on mobile gadgets and on automated house console
(which were provided to them). The analysis shows that SMs provided to the consumers are
in immature phases, which discourage the consumers to adopt the proposed smart system. The
findings of this research shall be helpful for projects like Singapore Smart Nation (SSN) [76].
Researchers are hopeful with such leading projects to improve the technology and SHs in near
future in Singapore.
The DSM requests for more power during peak demand hour and the SSM has to increase
power production, accordingly. The increased power production adds carbon dioxide in the
environment, which pollutes it. Moreover, high production increases the tariff rates. The au-
thors of [77], propose a model to determine the peak demands for limited number of appliances.
Four scenarios are simulated to investigate the peak demand with real time pricing. The pro-
posed model shaves the peak demand and reduces the energy cost. The performance evaluation
protocol reveals that peak demand is aggressively increasing for unlimited (huge number of)
appliances. The authors in [78] propose RES based energy model for HEMS. The size of RESs
is analyzed using GA for charging and discharging of battery storage. The study shows that the
proposed system contributes to load demand.
A multi-objective energy management model for the building is proposed in [79]. The
building has RESs based MG for cheaper energy. The model is implemented with TOU pricing
scheme. The simulation results validate the effectiveness and adaptability of the proposed en-
ergy management model. The use of sparse energy load resolves the user discomfort problem.
The authors in [80] propose distributed load shift for user comfort with cost and PAR optimiza-
tion. A centralized coordination for distributed load on demand side is maintained by employing
the Newton method. The simulation results show the Newton method is efficient as compared
to Nash equilibrium method.
The end-users in SG are educated to optimize their load consumption; however, for last few
years, the insightful researchers are proposing autonomous DSM programs [81]. The purpose
of the DSM is to autonomously optimize the load consumption on the demand side. In [82], the
authors propose the cloud based EVs charging and discharging system for SG. Priority assign-
ment algorithm optimizes and reduces the waiting time for EVs on public supply stations. The
proposed system manages SG operations and maintains the communication between the cloud
and SG. The simulation results validate the usefulness of the proposed approach for charging of
EV during on-peak hours, which improve the SG stability.
In the literature, various scenarios, system model and algorithms have been proposed to op-
timize the energy consumption to reduce the cost and user discomfort. The DSM is responsible
for energy production, energy cost and user comfort [83]. MGs with RESs and storage systems
are expensive and complex. Every SH is not necessarily supposed to afford the MG; however,
appliances are scheduled to avoid costly tariff hours. A SH is assumed to be connected with
utility, which has eight appliances. The appliances are scheduled to reduce maximum energy
consumption cost. Four hybrid scheduling algorithms are proposed. The effectiveness of pro-
posed algorithms is analyzed by simulating with three types of pricing signals and three different
Operation Time Intervals (OTIs).
2.2 Community: Infrastructures, Energy and Resource Management (Cloud, Fog)
The cloud has huge computing resources to deal with huge data and tasks from various lo-
cations. The cloud based systems provide centralized service for distributed and centralized
environments. The state-of-the-art cloud, fog, cloud-fog based systems and efficient resource
allocation techniques have been discussed in followings sub-sections.
2.2.1 Cloud based Distributed Systems
In [84], the authors proposed an architecture that is decentralized cloud based architecture.
The authors aimed to schedule the requests sent by the consumers side in a real-time envi-
ronment. For this purpose, they have performed experiments for real-time electric load data of
Toronto city in Canada. However, a pricing model is proposed for energy load optimization dur-
ing the on-peak hours by maintaining stability of MG. A new SBP is proposed for data center
selection in [85]. The authors used master fuzzy context for provisional fuzzy logic. The fuzzy
rules are designed for Optimized RT (ORT) and data center priority.
The authors of [86], propose the stochastic model for consumers to schedule the energy load
of appliances using the cloud based DSM in SG. The model creates small energy hubs for users
and shifts the load from on-peak to off-peak hours using Monte Carlo method. The proposed
model reduces the PAR and the cost. However, authors of [87] analyze the Distributed DR
(DDR) and Cloud based DR (CDR). The comparative analysis of simulation results shows that
CDR performs better than DDR with high scalability, reliability of power and stable commu-
nication network. Unlike CDR the DDR has unreliable channels, which are prone to lose the
messages. The simulation results show that the proposed CDR reduces more cost and PAR as
compare to DDR.
2.2.2 Cloud based Centralized Systems
A cloud based model for direct current nano-grid is proposed for next generation smart cities in
[88]. Low voltage smart appliances are controlled for energy and cost efficiency using cloud-
based energy management. The model is proposed with the uninterrupted power supply to
reduce maximum cost. For experimental analysis, a group of buildings from the SC is taken,
which are controlled by generating alerts from the data centers on high power consumption.
These data centers are connected with a centralized cloud infrastructure to control the energy
consumption of SC buildings. The simulation results show that the proposed scheme has high
satisfaction ratio, curred delay and reduced demand supply gap. The authors in [89], propose the
analysis for new trends in next generation cloud computing. The cloud infrastructure is modified
into multi-tier architecture and applications are also modified accordingly. The multiple infras-
tructure providers and distributed computing have resulted in new cloud infrastructure. The
authors analyze that emerging cloud architecture will improve the connection between people
and devices. It will provide self-learned cloud based system.
The cloud is a cost efficient platform for the delay and data security immune applications.
The authors of [90] propose a cloud-to-edge system in which cloud services migrate to the edge.
The existing cloud based system is connected with the edge system using message-oriented
middleware. The middle-ware uses the instant message protocol for efficient data sharing from
the cloud to the edge; however, data security is the challenge. The authors address the data
security issues and overcome the data security, authenticity and integrity in the cloud-to-edge
system. The experimental results validates the data security when services move from cloud to
the edge without compromising the performance. The security wall is not introduced for time
efficiency in inter modules. However, it is highly recommended to introduce a security wall for
the program to program, people to program and people to people for secure communication.
The challenge is to overcome the latency due to the security wall.
The authors in [91] propose a model of bi-level optimization to schedule power consumption
of local appliances and amount of power production. Adequate constraints on optimization
vector reduce the cost of power generation in local grid. Using cloud computing, it is possible to
design and implement an optimized DSM program for utilities and consumers. In [92], authors
propose an efficient energy management scheme for SG based on Cyber Physical System (CPS).
Smart devices are located at physical plane and controller on cyber plane. Nash equilibrium
approach is used to analyze the performance of proposed coalition. Proposed scheme provides
cost efficient energy management solution during peak hours.
The cloud has huge computational resources, which are shared to facilitate the clients with
the provision of services. Due to these resources, the cloud provides IaaS, PaaS and SaaS instead
of client’s personal computing system. The maintenance of the private system is complex and
requires special skills to operate. This encourages clients from different domains to seek their
services from the cloud. The size and number of requests for the services on the cloud are huge,
which are managed with a variety of strategies. VMs on the cloud act as individual machines
with processors, memories and storage. Each VM executes tasks assigned to them. The authors
in [93] propose the breakdown of a framework into groups of tasks. Each group is called the
fragment of tasks, which is assigned to the VM for execution. The tasks are assigned to VMs
according to their capacity for optimized RT, PT and the cost. The simulations are performed
with three different configurations. The results validate the efficiency of RT, PT and the cost
as compared to baseline techniques. The specification, size and number of VMs created on
physical unit affect the overall performance of the system. The challenge is to find a mechanism
to create an appropriate number and sizes of VMs with the consideration of specifications of the
physical system and fragments.
2.2.3 The Cloud: Resource Allocation
There is a trade-off between the optimized scheduling of VMs for optimized resource utilization
and the cost. The prediction of future instances assists for optimized allocation of the tasks
on VMs. The authors in [94] use the Neural Network (NN) for prediction of instances and
validating them with the current instances. The predictive instances of tasks are efficiently
scheduled on VMs using the proposed modified PSO algorithm in [94]. Experimental results
show that the proposed algorithm outperforms the state-of-the-art optimization algorithms. The
authors also propose the heterogeneous infrastructure of cloud computing, which is used as
IaaS. The authors in [95], propose Parallel PSO (PPSO) algorithm for optimized selection of
VMs in the cloud data centers. The efficiency of the algorithm is analyzed by implementing it
on the predictive model for kidney disease. The proposed model outperforms the state-of-the-art
models considering the execution and response efficiency. Healthcare data is very sensitive and
the authors have not suggested the solution for the cure of error in the accuracy of prediction.
The author in [96] proposed a cloud load balancing algorithm for load balancing on cloud
and compare the results with previously used algorithms applied for the same scenario. The per-
formance of the proposed algorithm is better than the other algorithms. Therefore, load is bal-
anced when a multiple number of users logged in at the same time. The authors present a new
communication model using two models: the cloud based DR model and distributed DR model
for computing the communication efficiency with reference to optimal resource allocation [86].
This scheme procures the high cost by incorporating the high DR scenarios. The authors pre-
sented a cost oriented model for DSM by optimally allocating the cloud resources [87]. The
model has the flexibility, which accommodates the resource allocation schemes to perform effi-
ciently.
The authors proposed a new load balancing algorithm in [97]. For efficient task allocation,
the load is balanced using a proposed algorithm. The mathematical model is used to allocate
low power tasks and others are allocated to human resources. However, the proposed algorithm
improves the throughput by reducing the tardiness. However, the authors in [98] compared mul-
tiple SBPs to estimate the PT. However, the round robin scheduling algorithm is used to compare
broker policies. Three SBPs are compared for RT and request PT. These policies include ser-
vice proximity, optimise RT and dynamically reconfigure with load SBPs. In [99], a Service
Oriented Middleware (SOM) model is proposed for the integration and utilization of fog and
cloud of things (CoTs). The SC ware summarize the components and services used for applica-
tions accessed through the service oriented model in the SC.
The author in [100] proposed a certificate-less provable data possession method. The method
is proposed for cloud based SG applications. The main the focus is to provide sufficient storage,
processing capacity and security using data management system proposed to support SG ap-
plications. In addition, the authors in [101] used Wavelet Recurrent Neural Network (WRNN)
predictors. The solutions are given for a cloud distributed model and balance for energy manage-
ment is also achieved for available devices by means of prediction. The power is used according
to the requests coming from consumer side due to predictions made using WRNN predictors.
2.2.4 The Fog based Systems
Cloud and fog computing provide a virtual environment to provide efficient resource sharing to
the connected consumers. These resources are allocated to increase the use of VMs instead of
using physical machines for energy consumption reduction. However, fog computing extends
the concept of cloud computing by reducing the load on the cloud. To maintain the load of
requests of connected consumers on cloud and fog, different load balancing algorithms are ap-
plied. These algorithms are used to schedule the requests and allocate the number of requests to
VMs. Mostly, both heuristic and static algorithms are used for load balancing among VMs as
in [102]-[105].
The fog is similar to the cloud; however, it has limited resources as compared to the cloud.
The fog is placed on edge of the network and closer to the end-devices. When a huge number of
requests of end-devices approach to the fog, the optimization for resource utilization becomes
a challenge. Various techniques have been proposed by the researchers for data security, real-
time response, efficient processing and reduced cost. The SG also generates the huge number
of requests, which are delay sensitive and need to be entertained in real time. In this synopsis,
cloud-fog based system model for SG is proposed. In the scenario, the system model has six
regions. Each region has two clusters of residential buildings connected with two fogs. The goal
is to reduce RT, PT and the cost of VMs on the fogs. The load of requests is balanced on the
VMs to optimize PT, RT and the cost of VMs. The authors of [106] propose the algorithms for
a balanced load of requests allocation on VMs. The potential data center or the fog is selected
using ORT to route the requests on it. Routing the requests on the potential data center and
balancing the load of requests on VMs optimize the RT, PT and the cost of VMs. In this work,
an extension of [108] is proposed, in which hybridized SBP is introduced for potential data
center selection. The requests are routed on the potential data center. The proposed Modified
Honey Bee Colony (MHBC) algorithm allocates the requests on VMs in the data center or the
fog. The proposed SBP and load balancing algorithm optimize the RT, PT and VMs cost as
compared to the state-of-the-art techniques.
The cloud facilitates the consumers with: computing, storage and highly centralized con-
nectivity. However, it suffers from latency, security and downtime issues. For improving the
latency, flexibility, resiliency and reliability of the cloud computing services, a new scheme is
proposed in [109]. The scheme is implemented using devices profile for web services, which
presents energy management as a service using fog computing environment. Two energy man-
agement prototypes are developed in this methodology: the HEM prototype and MG energy
management prototype for cost minimization and latency reduction.
The energy management on the fog for SHs is a novel approach to optimize energy con-
sumption with direct or indirect autonomous control. In [110], energy management-as-a-service
over fog computing platform is proposed for SHs. The software and hardware for SHs’ energy
controlling architectures with efficient utilization of fog computing resources are proposed.Fog
computing provides flexibility, data privacy, interoperability and real time energy management.
Two prototypes are implemented to validate the reduction of implementation cost and time-to-
market.
The home appliances are categorized to form the subsystems by connecting with the con-
trollers. The controllers and the appliances are connected with the SM. The SM communicates
with the fog for controlling and scheduling the load of appliances. The authors of [111], pro-
pose the hardware and software architectures for fog computing. The fog provides services for
energy management for SHs. The fog based energy management service reduces the cost, RT
and PT as compared to the cloud. Similarly, in [112], cloud-based CPS for energy efficiency in
smartphones is proposed. Energy aware dynamic task scheduling algorithm is proposed to re-
duce the energy consumption in smart-phones. However, latency issue of the cloud compromise
the performance, which is challenging to resolve.
The fog and cloud can provide similar services; however, fog is newer research domain,
which makes its way to CPSs with IoT. Cloud has huge computational resources to process
extensively large data stored on remote and centralized data centers. However, data security
and remote access to the resources have reliability and latency issues [113]. The fog extends
the cloud services with reliability, data security and mobility of end-devices with local storage
and processing [113], [114]. Virtual resources of fog and cloud are efficiently allocated with
requests using load distribution algorithms. In [115], authors propose a heuristic algorithm
to allocate customers0requests on VMs of the cloud using the Coefficient of Variance (CoV)
as the objective function. Simulation results verify the performance of proposed algorithm as
compared to five existing state-of-the-art algorithms. The authors consider the one-time frame
of the request; however, the behavior of the request changes in its processing lifetime.
The authors propose a Privacy Preserving Fog-enabled Aggregation (PPFA) architecture for
data security and efficient energy consumption for data transmission in [116]. The fog node
collects data from SMs and estimates the cost of fog level aggregation; however, cloud or the
utility supplier calculates the total cost while aggregating all fogs. The transmission of data and
security techniques are the overhead on computing performance of fog and cloud. Performance
inefficiency compromises the cost, RT and PT which the authors of [116] have not considered.
The energy consumption of computing resources increases according to a load of requests to
be processed. The authors in [117], propose the joint optimization; for energy consumption
of resources and allocation of requests on VMs. Two heuristic algorithms are implemented
for scheduling workload on VMs for energy efficiency of resources. VMs generations and
degeneration take startup time and time for freeing the occupied resources. However, the energy
of resources have a direct relationship with the performance.
The trade-off between energy efficiency, system performance and the latency are the core
challenges of cloud based system. To overcome these challenges, the authors in [27] propose a
multi-layer fog architecture in context SC. The system is applicable for academics, businesses,
government organizations and different corporate companies in the smart city; however, leg-
islation is the challenge. The simulation results show that architecture is energy efficient for
computing devices with high performance. Similarly, the authors in [118] address the chal-
lenges realted to the fog based system model in the context of the SC by proposing the Fog-
as-a-Service (FaaS) platform. The platform consists of two sub-system models based on the
information and the utility. The platform provides self-adaptation and composition of services
for end-users. The models are executable on end-devices (end-users0devices) and in the cloud.
The priority of information and context based filtering by the FaaS proves effective. These are
capable to run on end-devices and in the cloud. The data from heterogeneous devices in the SC
has emerged the trade-off between the performance of processing and information accuracy.
2.2.5 The Fog: Resource Allocation
The authors in [119] propose energy-aware load balancing of equipments in smart factory using
fog based system. An improved PSO algorithm is proposed for efficient energy consumption
model. The distributed scheduling of manufacturing cluster is resolved with proposed multi-
agent system. Similarly, to improve the performance of cloud and fog computing a variety of
heuristic and meta-heuristic techniques are implemented and have been proposed. In [120] and
[121], heuristic based load balancing schemes are proposed for fog computing resources. The
fogs are preferred over the clouds for (near) real-time applications and their efficient perfor-
mances. Hence, optimized utilization of limited fog computing resources improves the perfor-
mance and minimize the computing cost.
Similarly, a Transmission Control Protocol/Internet Protocol (TCP/IP) based single hop net-
work is proposed in fog data centers with adoptive resource scheduler for energy efficiency
in [122]. The requests of traffic arrive at fog data center where scheduler configures the VMs for
minimum energy dispatching. Moreover, requests are instantaneously processed and responded
to vehicular clients. In [123], a platform of fog-of-everything with Internet-of-everything is pro-
posed for the required satisfactory quality-of-service. The proposed algorithm in the platform
saves more energy as compared to existing state-of-the-art algorithms for the fog data centers.
Fog and Internet-of-everything are also integrated in [124] and design the fog-of-everything like
in [123]. However, the authors of [124] performed simulations to study the reduced energy and
enhanced the performance of fog computing for huge data.
2.2.6 The Cloud-Fog based Systems
A huge number of residential energy consumers are connected with the SG. The energy con-
sumers generate hundreds of thousands of requests to meet their demands with cost efficiency.
These requests need to be processed and respond back in real time for efficient energy manage-
ment. Similarly, in various domains and scenarios, huge data is produced, which needs to be
processed and respond in real time. For instance, the authors in [114] propose cloud-edge based
system to compute extensively huge requests generating from the portable devices used for mi-
crobial studies. From the previous work done by the authors, it is suggested that edge computing
and end-devices should have a direct connection for efficient processing and real time response.
The cloud to edge or fog computing system is effective for large scale communities and huge
data processing. However, the challenge is to choose a communication medium with appropri-
ate bandwidth for huge data transportation between cloud and fog computing nodes. So, energy
consumers also generate the huge requests and data every day to be efficiently processed and
responded.
The authors monitor the bulk power grids with grid cloud concept [125]. This concept is an
open source platform for real-time data estimation. In grid cloud, SG is supported on Amazon
web services and is similar to the cloud platform. The authors used cloud tools for cost re-
duction, software oriented redundancy to overcome the failures and different methods to secure
the sensitive data. The authors proposed a Privacy Preserving Fog-enabled Aggregation (PPFA)
architecture in [126]. The fog node collects data from SMs and estimates the cost on fog level
aggregation; however, cloud or the utility supplier calculates the total cost while aggregating all
fogs. In [127], authors conduct an analysis that shows, how the cloud based utilities improve the
SG ecosystem and how services on fog computing work for the same scenario. The algorithms
run on the fog while interplaying with the cloud and verify, if these are applicable for realistic
environment provided with delay free SG services.
The cloud computing has huge resources for centralized processing which is suitable for
processing of big data and delays oriented applications. So, an individual would prefer cloud
based services. However, for real-time applications and services, the cloud based system is un-
suitable. Hence, the authors of [128] propose the integration of cloud and fog based system
model for optimized RT and PT. The authors study the key challenges and propose their so-
lutions. The cloud-fog computation provides semi-centralized with near-real time computing
services. However, the key challenges are resource management, quality of service, features
of communication medium between fog and cloud as well as between fog and end-devices,
mobility, job scheduling, feature of IoT data, security and migration of cloud services on the
fog. In consideration of these challenging parameters, the authors propose a framework called
“iCloudFog”. It provides configurable integration between cloud and fog. The platform consid-
ers the type of communication medium between cloud and fog, features of IoT devices and data
security, etc.
With the development and invention of high bandwidth wired and wireless communication
medium, the end-computing-devices are becoming powerful too. The applications for the de-
vices need high processing with the storage. The end-users’ devices have limited power backup;
hence, the applications are processed on the high executing entity to save the power of end-
devices and meet the execution requirement of the applications [129]. For this purpose, tasks
from the devices are offloaded on the fog or the cloud using proposed intelligent middle-ware
service. The simulation results for various scenarios validate the efficiency of the proposed of-
floading service for computation, energy consumption and the cost. Similarly, a strategy for
energy and cost efficiency is proposed by [130] for mobile devices. Applications of mobile de-
vices are offloaded on to the fog for processing with reduced delays and payment cost. A three
queuing model is proposed with theoretical multi-objective optimization to reduce response and
processing delays with reduced billing cost. Extensive simulations show the effectiveness of
the proposed scheme by offloading such that execution and delays are minimized. Physical
equipment cost, installation and maintenance of a three layered system is expensive and costly.
In [131], comparative analysis of cloud and fog based system is proposed using mathematical
formulation considering the characteristics of fog and cloud in the context of IoT. The emission
of carbon-dioxide is proportional to energy consumption. It is concluded that the fog is suitable
for IoT based latency sensitive applications, the quality of service and eco-friendly as compared
to cloud computing platform.
The above discussion elaborates that the cloud computing system has virtually infinite re-
sources to process huge or big data and provides services like infrastructure and platform on
pay-as-you-use bases. Virtual resources are created on physical resources for resource shar-
ing and efficient service provision; however, virtual resources need efficient management. The
authors of [93], [115], [94], [95] and [117] propose the variety of schemes and scenarios for
resource optimization according to the load of requests from
Table 1 Literature: Systems, Architectures and Frameworks
Technique Feature Tool Limitation
Proposed multi-tier
architecture [27]
Reduced energy
consumption of
whole platform,
subsumes of
devices communi-
cation, task routing
algorithms grantee
the platform
effectiveness
iFogSim Legislative issues and
challenges
Message oriented
middleware on
Instant message
protocol [90]
Shift cloud services
to the edge with se-
cured data
XML (extensible
Markup Language)
for web-services,
Java, Open source
Lightweight Di-
rectory Access
Protocol (OpenL-
DAP)
Middle-ware security
wall is necessary.
Challenge is to
overcome the time
complexity overhead.
Proposed scheduler
for VMs allocation
[93]
1.Improved PT; 2.
Improved RT; and
3. Reduced cost
Workflow schedul-
ing applying adapt-
able and dynamic
fragmentation
Hardware capacity
limitations
Prediction and
enhanced heuristic
technique [94]
Reduced cost,
Tasks prediction
for proposed algo-
rithm is efficient
CloudAnalyst,
Python based
simulator
Specifications of phys-
ical and virtual re-
sources affect the per-
formance in real envi-
ronment.
Proposed PPSO,
NN prediction,
hybrid model [95]
VM optimization,
high prediction
accuracy of next
tasks, flexible
proposed model
CloudSim, Win-
dows Azure
Flexible features, fre-
quent update the num-
ber of VMs which con-
sumes time for startup
and deallocation.
Architecture pro-
posed for cloud-
edge computation
[114]
1. Combining
cloud and edge;
2. Low power
processing for
portable devices; 3.
Large scale envi-
ronment and huge
data computation
MinION: genome
sequencing device.
Deepnano: data file
producer. Plato-
forms: XeonD
1540, Pentium
N3700, Pentium
J4205
Challenge of band-
width for communi-
cation medium, end
devices and edge
computing.
Requests distribu-
tion algorithm on
VMs [115]
Requests parti-
tioning, theoretical
evaluation for
hardness of the
partitioning
Simulator not spec-
ified
Effects of resource
co-relation on perfor-
mance
PPFA, [116] Statistic aggrega-
tion on both; fog
and the cloud level
MATLAB R2016a Data security tech-
niques compromise
the performance and
system efficiency
Two heuristic
techniques for
deterministic and
random schedul-
ing, [117]
Resource optimiza-
tion, energy opti-
mization, job man-
agement for execu-
tion
Not specified Frequent resource and
job management com-
promise the system
time efficiency
Information and
utility based model
for FaaS, [118]
FaaS runs on
end-devices and
cloud, explored
trade-off between
computing speed
and accuracy
Distributed Node-
RED (D-NR),
OpenVolcano,
Linux Containers
(LXC), SaltStack
Trade-off between
processing perfor-
mance and informa-
tion accuracy
Proposed config-
urable framework
“iCloudFog” [128]
Agile integration
of cloud and fog
computing with
vast features
Not specified Dimensionality of net-
work and configura-
tion, quality of ser-
vices, resource man-
agement and localiza-
tion could not meet.
Middleware
technology for
offloading [129]
Off-loading on en-
ergy consumption,
number and sizes
of tasks, monitor-
ing services, fault
tolerance, integra-
tion and interoper-
ability
Wireless technolo-
gies, autonomous
applications,
visualization
techniques
Trade-off in number,
sizes of resources and
services, energy con-
sumption and band-
width
Proposed setup for
networking, energy
consumption, cost
and emission of
CO2, [130]
Reduced cost,
emission of CO2,
latency and im-
proved quality of
service
Not specified Bandwidth limitation
between end-devices
and the fog
Mathematical for-
mulation, [131]
Reduced energy
consumption, de-
lay and payment
cost
Not specified Limitations of the fog
resources, bandwidth
of wireless medium
end-users0devices. However, data security, energy consumption and latency are the chal-
lenges for cloud based systems.
The researchers encourage the cloud-to-fog based computing system for mobility, avail-
ability, latency sensitive applications and data security. However, the authors in [27] and [131]
propose fog based solution for latency and data sensitive applications. Moreover, the collocation
of end-devices with the fog optimize processing and minimize computing cost due to sharing
of tasks executions. However, resource limitation of fog cannot replace the cloud for huge data
from dispersed logical and geographical locations. In the view of the characteristics of cloud
and fog computing, a hybrid of both are proposed by researchers to fetch maximum benefits.
The authors in [90] and [114], propose the connectivity mechanism of existing cloud with the
fog for latency sensitive applications. In [128], a cloud-fog based framework is proposed to
analyze the key challenges of integration of two computing environments. The authors of [116]
are implemented the privacy based aggregation of smart-meter data on the fog. The aggregation
of fog information and data on the cloud for secure data, reduced cost, energy consumption and
the cost are optimized. The literature discussed above is summarized in Table 1.
Table 2 Literature: Resource Allocation in Cloud and Fog
Technique Feature Limitation
Proposed load and pro-
cessing efficient architec-
ture with two load balanc-
ing algorithms [96]
The load balancing ar-
chitecture validates perfor-
mance of virtual and physi-
cal resources of servers
The high number of con-
nections compromise the
performance
Proposed colorful ants
based load balancing
algorithm [97]
Dynamic load balancing,
HR ranking based tasks
queue
The time complexity of the
algorithm is high due to it-
erative nature and not ap-
propriate for huge requests
3 SBPs and 3 load balance
algorithms [98]
RT and PT using closest
data center policy is opti-
mized as compared to rest
Static requests data limit
the understanding of per-
formance with Closest
Data Center (CDC) policy
Proposed service oriented
architecture and design of
middleware for cloud and
fog computing in SC [99]
Mobility, heterogeneity,
real-time response and dta
security
Limitation of fog resource,
limit of number of devices
registration, Java has limi-
tation for implementation
Proposed management
architecture predictive sys-
tem for power generation
from integration system
and power consumption
using cloud distribution for
energy dispatch [100]
Real-time processing, pre-
diction of power generation
and load demand
Number of nodes between
power generation and
cloud node and between
cloud node to power
consumers cause latency
issues
Proposed hybrid of active
monitoring load balancing
and throttled [102]
Improved RT, PT, through-
put and reduced opera-
tional cost
Static data implementation
Proposed linear program-
ming based Dynamic
Weighted Live Migration
(DWLM) mechanism [103]
Runs information based
policy, improved migration
time, throughput and RT
Dynamic evaluation has
high time and space com-
plexity while LP waits un-
til dynamic migration eval-
uation is performed. Costly
and complex
Proposed fog computing as
energy management plat-
form [109]
Open source hardware and
software for customized
services, scalability, adapt-
ability, interoperability,
scalability and connectivity
of devices with fog, energy
management
System deployment of res-
idential sector is challeng-
ing due to low budget, op-
erational and maintenance
cost are additive cost and
important for residents.
Proposed an open source
GridCloud platform for
bulk interconnected power
grid [125]
Data security, reduced cost
and software based failure
overcome
Geographic diversity com-
promise performance of the
cloud, latency
Proposed cloud and fog
level aggregation for
SG [126]
Data security, robust, direct
link of smart meters with
fog node
Security key sharing for
huge number of users is
expensive, limitation of
downstream bandwidth
Proposed the fog based
model for SG [127]
Mix of fog and cloud com-
puting assures high com-
putation with security and
mobility
Redesign and development
of delay sensitive appli-
cations for fog node with
migration characteristics,
New SG service services
need to develop, security
challenges between cloud
and fog nodes
Proposed PSO based load
balancing algorithm [132]
Reduce task overhead and
enhance resource utiliza-
tion
Redundant and costly, eval-
uation of a VM has to wait
until first completes
Proposed autonomous
agent based load balancing
algorithm [133]
Increase throughput, re-
source utilization, reliabil-
ity and scalable
Dynamic iterative tech-
nique has high time and
space complexity
The literature discussed above is summarized in Table 2. From the literature, it is analyzed
that fog computing helps to maintain and reduce the load of cloud efficiently. Multiple algo-
rithms are introduced for load balancing and new SBPs are proposed in research articles. How-
ever, the results are improved and cost is reduced with efficient utilization of VMs as compared
to using physical machines.
2.2.7 Cloud and Fog based Systems with Energy Sharing Services
Energy production considering the environmental pollution, green-house effect and mainte-
nance of grid equipments propose the efficient energy management on demand side. In the
last decades, various intelligent solutions of energy management for the residential sector have
been proposed. In [134], the authors propose the priority based model for demand side to shave
the peak-loads from on on-peak hours to off-peak hours. The proposed solution saves the energy
consumption cost. However, only three appliances are scheduled for a SH. Similarly, authors in
[135] implement the CSA and strawberry algorithms for scheduling of SH appliances.
In the aforementioned researches, the researchers propose solutions for cost efficiency of in-
dividual SHs; however, in communal scenarios, the parameters related to mutual interaction for
multiple SHs energy optimization are considered. In a community, SHs have RES, power stor-
age systems and the combination of different power systems. Hence, studies are made for cost
efficient energy generation, consumption and sharing in the community. For multiple homes,
authors in [136] propose a transactive energy framework for sharing private MGs of multiple
SHs for power consumption rather than trading with the utility. The prosumers are encouraged
to participate in the proposed framework. However, the authors do not suggest how many MGs
are feasible for the framework. Authors in [137] propose a power economy sharing model using
BESS. The proposed model is feasible only for a small community; however, authors do not
explain how big community or communities can benefit from the system.
Authors in [138] propose an optimal planning for connectivity of communal MGs for eco-
nomics, reliability, variability, adaptability and uncertainties of operations performed. The in-
terconnection planning is applied to only six MGs in a cluster form. The proposed plan is
feasible for practical MG applications. While studying the economic aspect, they discuss the
only capital cost to install and connect MGs. However, consumer benefits are important. SHs in
communities are equipped with RES, storage systems and are also connected with utility for an
emergency. The SHs without power systems have to use utility power only. However, SHs with
personal power backup systems can share with other SHs in a community. The authors in [139]
have proposed similar sharing approach using game based coalition in the community to reduce
electricity consumption cost. Communal participants reduce the cost, however, a computational
module for pricing is not explained. Moreover, feasibility of energy optimization according to
the size of the community is important to consider.
Sharing of communal energy resources are important to reduce cost instead of increasing
load on utility. Sharing of MGs with RESs are risky due to their intermittent nature [137]. MGs
with RES are expensive and difficult to maintain. ESS along with RES makes overall expensive,
complex and intermittent system which reduces the lifespan of the BESS [139]. Moreover, more
the participants in communal power systems generate a number of requests to get processed
and entertained. The delaying and expensive computational environments are unfit to deploy.
Authors in [140] propose the cloud based plug-in electric vehicle charging and discharging. A
huge number of requests from plug-in stations, electrical vehicles, RES and HEMS are send to
the cloud for computation. Authors in [141] propose a cloud based future generation power grid
applications considering data, computation and proposed framework of direct load control for
power grid application. The cloud computing is feasible for computation of huge data; however,
it suffers from delay, data security and deployment issues [142].
Authors in [106] propose a cloud-fog based system model for the SG. A number of build-
ings with RESs are connected with the fog layer. Each building consists of a number of SHs
which generates requests for power. The requests are processed on the fog. Two scenarios are
simulated using four resource sharing algorithms to enhance RT, PT and reduce the cost of re-
source utilization. The simulations show the efficiency of fog with 5 VMs as compared to the
fog with 2 VMs. RT, PT and the cost are optimized. Moreover, proposed hybrid algorithm for
Table 3 Literature: SH and Community based Systems with RESs, ESSs and Utility
Technique Objective Limitation
Two tier cloud based demand
side management [14]
Reduce cost, improve power
grid performance
There is always computa-
tional cost which is important
to calculate for the system.
VM allocation algorithms on
cloud-fog based system [106]
Enhance computational per-
formance and reduce the
computing cost
Benefits to consumers for
computing environments is
important.
GA, EDE, BPSO and OSR
heuristic algorithms [134]
Reduce power consumption
cost for a SH
Limited scope: Small infras-
tructure of single SH with
only three appliances
Cuckoo Search and Straw-
berry heuristic algorithms
[135]
Reduce power consumption
cost for SHs using miroc grid
and ESS
Compromised user satisfac-
tion and utilization of extra
storage are not discussed
Coalition of MGs [136] Gaining competitiveness in
power market
Effects of intermittent nature
of RESs based MG on coali-
tion, Physical constraints of
network
Multi-agent based Unified
Energy Storage System
(UESS) of communal SHs
[137]
Reduction of communal cost
for power consumption
Limited size community
Interconnection plan of MGs
cluster [138]
Reduce cost and power on
demand side and applicabil-
ity of the plan in practical ap-
plications
Only installation cost, rem-
edy for intermittent nature of
MG not proposed
Two game theory based com-
munal power sharing of RES
and ESS [139]
Reduce communal cost and
trading without ESS SHs
within community
Limitation of proposed sys-
tem with respect to size of
cooperating RESS and ESS
owners
Electrical vehicle based
energy storage using GA and
multi-constrained integer
programming [140]
Reduce energy purchasing by
maximum use of ESS for cost
efficiency
Surplus storage is kept rather
utilization
Discussion over the cloud
based future generation
SGs[141]
Compute and data intensive
applications
Cybersecurity, practical im-
plementation and complex-
ity of infrastructure are chal-
lenging
Survey: fog/edge computing
covers limitations of cloud
computing [142]
Near real time response, se-
curity and simplicity
Resources and infrastructural
limitations
Communal battery storage
system with household bat-
teries and PV [143]
Self-sufficient power for
community
Communal battery system
suffers more when PV pan-
els fall short than individual
household.
Column and constraints al-
gorithms along with experi-
ments [144]
Self power generations for
trade and self consumption
optimization
Storage system and their ef-
fects on renewable energy
system need to study
VMs allocation is efficient as compared to state-of-the-art algorithms.
The integration of PV power generation and battery storage system for SHs in the commu-
nity are proposed in [143]. The batteries are explained considering their types and capacities.
Authors concluded that BESS with PV develops a self-sufficient energy community. Moreover,
the system is more economical than an individual household system. The intermittent nature
of PV sources and weak power generation affect the efficiency of batteries storing. However,
for individual SH PV power generating system is effective. In [14], two tier of a cloud based
system model for the SG is proposed. Regional or edge cloud facilitates the SHs which have
MGs and energy storage systems. The cloud on the second tier covers the multiple regions by
connecting with the regional clouds. The proposed system reduces the cost for consumers and
improves power grid performance.
The RESs are integrated with the main grid for trading in [144]. The intermittency of RESs
is tackled with proposed probable identification solution. The solar power generators, power
storage system and power exchange with the main grid for cost optimization are implemented
with the proposed algorithm. Moreover, charging and discharging, islanding operation, line
switching and power trades with robust optimization formulation is proposed. The proposed
system is validated by implementing different test cases. However, renewable PV power gener-
ation required complex and expensive deployment to trade with the main grid.
Authors in [134] and [135] proposed load optimization techniques on SH appliances for cost
optimization. Authors in [136], [137] and [144] propose the joining of micro power production
units and storage systems for cost reduction at community level. However, the big sized com-
munity, as well as dispersed SHs can be combined using the cloud infrastructures [141], [106],
[143]. Delay and data security are core issues of the cloud [142]; however, two tier cloud for
SG tackles delay and data security issues [14]. ESSs are cheaper than the RES based MGs as
well as most of SHs in communities, which already possess storage systems so, unification of
these systems has the potential to make a small community self-sufficient [137]. In this synop-
sis, BESSs of SHs in a community are integrated using the fog to form UESS. There are twelve
communities each has a fog for Service-as-a-Power-Economy-Sharing by designing the UESS.
These fogs are connected with a cloud for sharing utility pricing and permanent data storage of
fogs. The literature discussed is summarized in Table 3.
3 Problem statement
DSM’s strategy of load shifting is generally adopted to minimize the cost of power consumption
by shifting the load from on-peak to off-peak time [145]. In the literature, variety of heuristic
techniques are proposed to schedule the electric appliances in order to reduce the cost of power
consumption. Moreover, different hybridization schemes are available in the literature to ex-
plore and exploit the search space to achieve better optimality. However, complexities of these
heuristic algorithms have not been considered to analyze the performance efficiency. The algo-
rithms with high complexity may provide efficient scheduling of appliances; however, execution
and time complexities are challenging to tackle [146]. These algorithms are loaded in energy
management controller which is installed in a home or building to manage, schedule and control
the electric appliances. Moreover, the integration of RESs is being widely promoted across the
globe [147]. The surplus energy generated by RESs is being shared among the energy deficients
through peer-to-peer energy sharing. In peer-to-peer energy sharing, a local market platform is
provided where all the prosumers share power without the involvement of a third party [147].
The peer-to-peer sharing requires an efficient system with minimum delay and elimination of
single point failure [148]. Cloud computing provides efficient energy management platform
for centralized and distributed environments with the cure of single point failure [149], [150].
This motivates the companies to use the resources: hardware, storage, applications, etc. without
huge investment to purchase, install and maintain system [151]. The cloud has virtually infi-
nite resources and provides efficient energy management in SG [152]; however, the cloud based
infrastructure has latency issues [153]. The fog provides services on the edge of the network
with direct connectivity of end-users. The fog based system reduced the latency. A huge load
of requests or tasks creates the performance bottleneck for fog based system because of limited
resources [154]. An efficient resource utilization is required to minimize computing cost, RT,
PT and to provide optimal energy management services for communities. In real world, renew-
able energy is integrated under the signed contract between power utility and prosumers [155];
however, PT increases with the expansion of community size [156]. From the end-user’s aspect,
longer latency (sum of PT and RT) can degrade the energy management service.
4 Proposed System Models
Two types of system models are proposed considering islanded SH in a region and the commu-
nities in a city (rigid and flexible). In Section 4.1, appliance scheduling techniques are proposed
for islanded SH. However, in sections 4.2, 4.3, 4.4, 4.5 and 4.6 cloud-fog based system models
are proposed to provide energy management services to the communities. Various scenarios for
efficient computing resource utilization to provide efficient services have been proposed in the
manuscript. The cloud has huge computing resources to provide efficient computing services;
however, increasing services with huge computation, communication and performing intelligent
tasks are challenging for the performance of cloud based systems. To overcome the challenges,
processing, storage and network facilities are offloaded in fog, which act as intermediate com-
puting layer between cloud and end-users or end-devices [157]. The direct connectivity of
end-devices with computing node (fog) through high bandwidth wired and wireless medium
provides near real time services [158]. In SG, real time services are indispensable [45], [159]-
[161]. The intelligent energy management services in real time, especially for communities, the
fog based system is appropriate and suitable for SG scenarios [109], [162]-[163].
4.1 1st Proposed System Model: Islanded SH
The EMS consists of SSM and DSM. The supply side generates, transmits, distributes, main-
tains and controls the electricity. The prices of power consumption are also defined at supply
side, which depend upon generation, supply, control, maintenance and demand. The price rises
with the increase in demand because of high power generation and high cost is required for
the maintenance. The DSM provides a variety of scenario based cost efficient solutions. The
popular strategy to reduce maximum cost is shifting the appliances load from on-peak to off-
peak time. DSM controls the operations of appliances to reduce the bills for the consumer. The
appliances are divided into classes according to their nature of operation and consumer’s prior-
ity request for load. In proposed system model, a SH with eight appliances is connected with
the utility. The appliances are categorized into “A” and “B” classes. The class “A” consists of
shiftable appliances and class “B” consists of non-shiftable appliances. The class “A” has an
electrical geyser, an air conditioner, a washing machine, a dishwasher and a cloth dryer. The
class “B” has a portable heater, a microwave and a fridge. The class “A” is scheduled to opti-
mize energy consumption while class “B” is unscheduled. Shiftable appliances are scheduled
to meet the specific goal(s); for example, cost reduction, minimize waiting time and maximize
user satisfaction. In this work, the main focus is to reduce cost with proposed schemes for a SH.
In the proposed system model; Figure 1, an EMC is a hardware device, which is placed in a SH
which provides an interface to the user. In the real world, the proposed scheduling algorithms
are installed in EMC and the user can choose any scheduler to optimize SH appliances. The
smart meter is connected with EMC and the utility to measure the energy consumption of SH
and request for power load from the utility.
Energy
Management
Controller
Smart
Meter
User Interface
Class A
Class B
Class A:
Shiftable
Appliances
Class B:
Non-shiftable
Appliances
Washing Machine
Dish Washe r
Cloth Dryer
Electrical G eyser
Air Conditione r
Portable He at er
Microwav e
Fridge
Utility
Two-way
Communication
Smart Home
User
Power supply
Figure 1. 1st Proposed System Model: Islanded SH
4.1.1 Classes of Appliances
Operating behavior of appliances in time space depends on the consumer’s requirement. If
an appliance is shifted in low pricing time it reduces the power consumption cost; however,
user comfort is compromised. Hence, there is a trade-off between the cost and user comfort.
Every appliance in the home cannot be shifted for example, fridge remains switched-on for a
whole day because food preservation is very important. The use of a washing machine can be
shifted from high-pricing to low-pricing hour; however, it compromises the user comfort. The
shifting of appliances from on-peak to off-peak hours reduces the power consumption cost by
compromising the consumer’s satisfaction. In the proposed scenario, domestic appliances are
classified into these two classes that are described in Table 4.
Table 4 Classes for home appliances
Shiftable Loads Non-Shiftable Loads
Electrical Geyser Portable Heater
Air Conditioner Microwave
Washing Machine Fridge
Dish Washer
Cloth Dryer
Shiftable Appliances
The appliances that are schedulable from consumer’s required time to any time-slot of a day
are called shiftable appliance. The load of an appliance in particular time slot shows the status
of that appliance and the power rating is shown by Pap
r. The status is “1”, if the appliance is ON
and the status is “0” if the appliance is OFF. The load of the shiftable appliance is calculated as
Eq. 1.
Lap
t=Pap
r×ωap
t,(1)
where Lap
tis the load of a shiftable appliance for specific time-slot t.ωap
tis the status of an
appliance in specific time-slot t. Suppose, Asis the set of all shiftable appliances and λAsis
power rating of given shiftable appliances, the total load in a day is the sum of all power rating
of shiftable appliances times statuses for all time-slots of a day. The Eq. 2 calculates the total
load of all shiftable appliances for the time-slots in a day.
LAs
T=
T
t=1
As
ap=1
Pap
r×ωap
t,(2)
where, LAs
tis the total load of all shiftable appliances and ωtis the statuses of appliance in
a day. Total number of time-slots in a day is Tand Asis total number of shiftable appliances.
Cost of an appliance for a given time-slot is the product of load and unit price for that time-slot,
as given in Eq. 3,
Cap
t=Pap
r×γap
t×ωap
t,(3)
where, Cap
tis cost of shiftable appliance for specific time-slot and γap
tis the tariff rate in given
time-slot. The sum of all costs for all time-slots is the total cost for a day as computed in Eq. 4.
CAs
t=
T
t=1
As
ap=1
Pap
r×γt×ωt,(4)
Where, γtis the price in given time-slot.
Shiftable appliances can be shifted to other time-slots in a specific day. For example, wash-
ing machine, dish washer. The load and cost of all appliances are calculated accordingly. In
proposed scenario, electrical geyser, air conditioner, washing machine, dishwasher, cloth dryer
are shiftable appliances for the home.
Non-shiftable Appliances
The appliances which have to operate for fixed time-slot and cannot shift to other time-slot
are called non-shiftable appliances. In the proposed scenario, portable heater, microwave and
fridge are non-shiftable. It is assumed that the operation time of these appliances is known in
advance, as given in [1]. Let, ANsis the set of non-shiftable appliances and φANs then the
load for a non-shiftable appliance Lφ
tfor a specific time-slot is given in Eq. 5,
Lφ
t=Pφ
r×ωφ
t,(5)
where, Lφ
tis the power rating of a non-shiftable appliance and ωφ
tis the status (ON/OFF) of it.
The total load of all non-shiftable appliances is calculated as in Eq. 6
LANs
t=
T
t=1
ANs
ap=1
λANs ×ωt,(6)
λANsis the power rating for all non-shiftable appliances and omegatis the status (ON/OFF) of
appliances. The total cost of all non-shiftable appliances is the product of load and tariff rate.
Hence, the total cost of non-shiftable appliance is calculated as in Eq. 7.
CANs
t=
T
t=1
ANs
φ=1
Pφ
r×γφ
t×ωφ
t,(7)
Where, CANs
tis the total cost and γtis the tariff rates.
4.1.2 Proposed Techniques
In this research work, four hybrid schemes are proposed. The two parts of Elephant Herding Op-
timization (EHO) are hybridized with the state-of-the-art GA, Firefly Algorithm (FA), Bacteria
Foraging Algorithm (BFA) and BPSO. The simulations are performed to schedule the SH appli-
ances to minimize the cost with optimized load using DA-RTP, CPP and IBR pricing schemes.
It is assumed that the intervals of operation for each appliance are equal. The implementation
is performed with OTIs of 60, 30 and 10 minutes. With OTI of 60 minutes, the appliances start
operation at the beginning of an hour and complete at the end of the hour (completion of 60th
minute). Similarly, these assumptions are made for OTIs of 30 and 10 minutes. If the appli-
ance is turned ON, it must take complete OTI (maybe 10, 30 or 60 minutes). However, in 60
minutes OTI case, if the operation of an appliance is completed in 20 minutes in the real world,
the remaining time would be wasted. The data for appliances: their operation time and power
ratings are taken from [66]. The pricing signals like IBR, CPP and DA-RTP are taken from [1]
and [134]. The simulation results of each proposed schemes are analyzed and discussed in the
following sub-sections.
EHO Algorithm
Elephants are social animals and they live in the form of herd. They maintain herding rules.
A herd has more than one clans and each clan lives under the leadership of a female called,
matriarch. The matriarch is responsible to keep the clan under herding rules. The females and
calves live in the main family group; however, males live separated and maintain the bond with
their main family group using low frequency vibrations. The vibrations are produced by tapping
the ground with their feet. The male calves at their adulthood are separated from the main family
group and are forced to join other males. [164].
The two characteristics of elephant herding rules are very important: making the clans and
separating the males from the main family group. These two steps of elephant herding rules
are incorporated with GA, FA, BFA and BPSO. The first step is used to divide the population
of a problem into sub-populations (clans) and in the second step, worst elements are discarded
from the clans or best elements are selected. The elements (position of an elephant) of a clan
are updated under the influence of the best element (matriarch) in the clan. The elephant Efrom
a clan updates its position using the Eq. 8.
P
new,Clani,E=P
Clani,E+β×(P
Clanbest ,EP
Clani,E)×w,(8)
where, P
new,Clani,Eis the updated position of the elephant from Clani.P
Clani,Eis the old position
of the elephant E. The P
Clanbest ,Eis the current position of matriarch, which is the fittest in clan.
βis the influence of matriarch with scale factor [0,1].wis used for uniform distribution having
range of [0,1]. In simulations, the random function is used to generate βand w.
Algorithm 1 EHO-Clans Population Update
1: for Clani=1 : nClans (for all clans) do
2: for E=1 : Cpop (All elephants in the clan) do
3: Update Clani,Eand generate P
new,Clani,Eusing Eq. 8
4: if Clani,E>Clanbest,Ethen
5: Update Clani,Eand generate P
new,Clani,Eusing Eq. 9
6: end if
7: end for
8: end for
If elephant Efrom the clan is best, then matriarch is updated using Eq. 9,
P
new,Clani,E=γ×P
Clancent er,E,(9)
Where γis the factor of [0,1]to determine the influence of the central elephant of the clan
P
Clancent er,Eto update the position of best elephant; P
new,Clani,E.
Algorithm 2 EHO-Selecting Best
1: for Clani=1 : nClans (for all clans) do
2: Find the best elephant using Eq. 9
3: end for
The two major steps of EHO; Algorithm 1 and Algorithm 2 are incorporated with GA, FA,
BFA and BPSO for efficient scheduling the SH appliances for cost reduction with optimized
load consumption. The proposed hybrid algorithms are explained in the following subsections.
EHO-GA
GA is a bio-inspired evolutionary natural selection algorithm which is proposed by John
Holland in 1960 [165]. The evolutionary steps comprise of crossover and mutation, which trans-
form the genetic characteristics of a gene. Evolutionary steps are initiated with the population
generation and selection criteria. The initial population is generated randomly according to the
problem and selection of elements is performed by the fitness process. The population is evalu-
ated with the fitness function. The elements are selected on which genetic operators; crossover
and mutation are performed, which generate next generation. In GA, if selected candidates have
similar value or rank, then the crossover process leads to a less optimal solution. The scalabil-
ity of GA is compromised for complex problems. The mutation process is affected by a large
number of elements which increases the search space exponentially. For many problems, the
stopping criteria is not clear. Moreover, it has a tendency towards converge local optima.
In proposed hybrid EHO-GA, the population is initialized and evaluated for positions of el-
ements using the earliest steps of GA. The evaluated population is fed to the first step of EHO.
The wnumber of clans are created of npopulation. The population of each clan is updated and
are converged. The elements of each clan are updated under the influence of matriarch (best
fitted element in the clan). If an element is better than the matriarch, then it takes the position of
the matriarch. In the second step, worst (unfit) elements are discarded and remaining elements
are the best (most fitted) elements. These updated clans are converged and form an updated
population. The crossover and mutation operations of GA are implemented on updated popula-
tion. The stopping condition is applied until the selection of the appropriate (best) solution. The
efficiency of optimization and time complexity is enhanced with convergence of GA and EHO
steps. The probability of crossover is kept 0.9 while for mutation it is 0.1. The steps of EHO-GA
are elaborated in Algorithm 3. The time complexity of the proposed (EHO-GA) algorithm de-
pends on the total population nand the number of clans w(subpopulations). In proposed system
Algorithm 3 EHO-GA
1: Initialize the population n
2: for i=1 : ndo
3: Evaluate the population
4: end for
5: wclans (subpopulations) of dsize=n/w
6: while MaxGeneration do
7: Generate new population using algorithm 1
8: for i=1 : w; For Number of Clans do
9: for j=1 : d; For all elephants in Clan ido
10: Evaluate jth elephant in Clani
11: end for
12: end for
13: Cln=Converge evaluated Clans
14: Evaluate Fitness of population (Cln)
15: end while
16: Lbp=Produce list of Best positions
17: CLbp=Calculate costs for list of Best positions (scheduled positions)
18: Update Best positions using Algorithm 2 from (Cln)
19: Conv=Converge (Cln) and (Lb p)
20: for k=1 : IntrpApp; For all interruptible appliances do
21: for m=1 : Positions; For all positions for a day for kt h Intr pApp do
22: CrossOver(Conv[m], rand(CLbp))
23: end for
24: end for
model the complexity of EHO-GA is O(n×w), where n6=wand size of population n> size of
a clan d. The time complexity of EHO-GA is smaller than GA, which is O(g×n×m). Where,
“g” is the number of generations and “m” is the size of individual.
EHO-FA
FA is inspired by the flashing pattern of fireflies and proposed by Xin-She Yang et al. [166].
FA is inspired by the flashing pattern of fireflies. The flashes are used to attract the potential
mating partner and for protection. The intensity of luminosity is variable from the distance,
which is inversely proportional to the distance. The attraction of potential partner makes a
social interaction by solving a swarm problem with optimization. Solving the attractiveness of
a firefly to intensive flashing one formulates objective function or the artificial firefly solution.
FA is flexible and has the tendency to integrate with other optimization techniques to develop
hybrid schemes. In the proposed hybrid algorithm, the population is updated using EHO sub-
steps; Algorithms 1 and 2. The population is inputted to FA. The steps of this hybrid algorithm;
EHO-FA, are explained in Algorithm 4.
In proposed hybrid technique, initial population generated by FA is updated using two steps
of EHO. First step has two sub-steps which are selected conditionally. In first step, population
is divided into two subpopulations; each is termed as clan. Each clan has best fitted element and
named as ‘matriarch’. Elements of clans are updated according to the position of the matriarch.
The second level is selected when clan has better elements than matriarch. The matriarch is
updated with best fitted element from the clan. Elements of wclans are fed to the main execution
of regular FA. In second part of EHO algorithm, worst elements are separated leaving behind
best elements in each clan. The best positions are then converged. This hybrid algorithm is
Algorithm 4 EHO-FA
1: Calculating Objective function f(X),X= (x1,x2, ....xT
n)
2: Generate initial population of fireflies Xi(i=1,2,....n)
3: Light intensity Iifor Xiis determined by f(xi)
4: coeficient of light obsorption is defined (β)
5: Divide population into wequal subpopulations (wclans)
6: UCc=Update clans using Algorithm 1 and converge the updated clans
7: Bps=Find best positions using Algorithm 2
8: while l<=MaxGeneration do
9: for i=1 : n, all n fireflies (UCc)do
10: for j=1 : iall n fireflies do
11: if (Ij>Ii),move i toward j then
12: Distance rvaries the attractiveness
13: Find new solutions and update light intensity f(xi)
14: end if
15: end for
16: end for
17: Idx=Find current best and store in an index
18: CIdx=Calculate the costs for (Idx)
19: Mb p=Merge best positions (Bps) and (Idx)
20: for k=1 : length(NApp >AvgPr )do
21: For NApp appliances greater than average power rating AvgPr
22: for m=1 : BT ; for length of Burst Time (BT )for kthshiftable appliance in a day
do
23: Select locations from (Mb p) (priority) minimum cost (CId x)
24: end for
25: end for
26: end while
described in Algorithm 4.
In the steps of Algorithm 4, the initial population is divided into wsub-populations and
update using Algorithm 1. The best elements of the sub-populations or each clan are selected
using Algorithm 2. The best elements are kept and unfitted are discarded. Each sub-population is
inputted to FA, which generates the best elements. These best elements from all clans are stored
in a list. The cost of each element is also maintained. The list is merged with best elements
generated from Algorithm 2 and form new updated population. The appliances which have
higher power rating than the average of all shiftable appliances are rescheduled in last phase
of proposed EHO-FA. These appliances are repositioned at minimum cost locations (already
determined). The time complexity of proposed EHO-FA depends on BP, which is determined
using Algorithm 2 and total updated population n. However, BP 6=nand the time complexity of
proposed EHO-FA is O(BP ×n).
EHO-BPSO
BPSO is used for binary discrete search space and is proposed by [75]. BPSO is used for
binary discrete search space. However, PSO is used for the continuous problem. The logical
characteristics of PSO and BPSO remain intact by forcing the velocity either 0 or 1 (in BPSO)
instead of between 0 and 1 (in PSO). In the proposed EHO-BPSO, the population is initialized.
The fitness of each particle is evaluated. The population is updated by evaluating every particle
with currently fitted particle. The velocity and position of each particle is updated. This returns
the list of updated (best) particle using BPSO. The cost of each particle is calculated in the
list. The list is divided into wsub-populations or clans and is updated using Algorithm 1. The
update is performed under the influence of ‘matriarch’ (best in the clan). If the particle has
better value as compared to the matriarch, then particle becomes a matriarch. The best elements
are selected from each clan using Algorithm 2. The resultant of all clans are converged. The
cost of each element is calculated and the appliances with high power rating than the average of
all appliances are scheduled into the lesser cost time-slots. This hybridized result provides cost
optimized solution.
Algorithm 5 EHO-BPSO
1: Initialize all Tparticles with (n) dimensions
2: while MaxGeneration do
3: for i=1 : Tdo
4: Evaluate fitness values for each particle Ti
5: if Tipart ical is bett er than f itness value then
6: Set current particle as BEST
7: end if
8: end for
9: for i=1 : m Select global BE ST f rom all particals do
10: Update velocity of particle (between 01)
11: Update Position of particle
12: end for
13: end while
14: Lup= Return list of updated positions of particles
15: CLup=Calculate cost (Lup)
16: Divide list (Lup) into wequal subpopulations (Clans)
17: Update each Clan using algorithm (1)
18: Find best positions using algorithm (2)
19: Bp=Find best positions using algorithm (2)
20: Cp=Converge list (Lup) and best positions (Bp)
21: for k=1 : length(NApp >AvgPr ); Appliances NApp, with greater than average power rating
AvgPr do
22: for m=1 : BT ; for length of Burst Time (BT)for kt h for a day do
23: Select positions from (Cp) prefer minimum scheduled cost (CLup)
24: end for
25: end for
The evaluation of population and the update are performed separately, which do not effect
the running time. However, time complexity of proposed algorithm depends on the number of
appliances, which has higher power rating as compared to average power rating of all shiftable
appliances length(NApp >AvgPr)and their burst time BT . The time complexity of proposed
EHO-BPSO is O(length(NApp >AvgPr)×BT ).
EHO-BFA
BFA is inspired by the food searching behavior of bacteria species ‘E.coli’. In the process of
foraging, the bacterium searches the food in its environment and communicates with the neigh-
boring bacteria to announce the availability of food, which forms the swarm characteristics.
Following swarm behaviors are observed;
Bacteria are dispersed around the food.
Algorithm 6 EHO-BFA
1: Initialize all mpopulation
2: for i=1 : mdo
3: Fitness evaluation of each Bacterium mi
4: end for
5: while MaxGeneration do
6: for j=1 : mdo
7: Discard and introduce new for unfit positions
8: end for
9: for k=1 : mdo
10: Calculate Fitness and Tumble in radom direction [-1, 1]
11: Calculating new direction (position)
12: Evaluate the Fitness for new position
13: if LastFitness <Cureent then
14: Replace LastFitness with Cureent position
15: Else
16: Assign random direction (new position)
17: end if
18: Evaluate Fitness for new position-select Best position
19: end for
20: Lbp=Return list of Best positions
21: Cbp=Calculate cost of list Best positions
22: Divide Best (Lbp) into wsub-populations (Clans)
23: Update each Clan using Algorithm (1)
24: Fbp=Find best positions using Algorithm (2)
25: LFbp=Converge (Lbp) and (F b p)
26: for k=1 : length(NApp >AvgPr )do
27: For NApp appliances greater than average power rating AvgPr
28: for m=1 : BT ; for length of Burst Time (BT) for kt h for a day do
29: Select positions from (LFbp) prefer (priority) minimum cost (Cbp)
30: end for
31: end for
32: end while
A bacterium locates the food in its surroundings by chemotaxis motion (tumble and swim-
ming).
The bacterium with scarce food dies and disappears.
The bacterium which successfully accesses the food survives and reproduces. It also
invites other by producing chemicals.
The bacteria disperse again for new food resources.
In proposed EHO-BFA, the population is initialized then fitness of randomly selected bac-
terium is evaluated. Then steps of BFA are applied; discard unfit bacteria, perform tumble and
swim. On every step of tumble or swimming, either the bacterium is closer to food or away
from it. The population is updated on each tumble or swimming step. The steps are performed
for the whole population and it returns the list of best bacteria. The list is new population which
is divided into wsub-population or clans. The subpopulation is updated using Algorithm 1. The
update is performed under the influence of ‘matriarch’ (local best). If any other element is best
fitted than matriarch then matriarch is updated. Each clan is updated and Algorithm 2 finds
only best and discard remaining unwanted elements from the population. The resultant of each
clan are converged to form new list and cost of listed elements is calculated. The appliances,
which have power rating more than the average of all appliances are scheduled into less cost
time-slots. Hence, appliances are scheduled with the best positions. The steps of EHO-BFA
are given in Algorithm 6. The time complexity of proposed EHO-BFA depends on number of
appliances, which have power rating greater than the average power rating of all shiftable appli-
ances length(NApp >AvgPr)and burst time BT of those appliances. Hence, the complexity of
EHO-BFA is O(length(NApp >AvgPr )×BP).
The scheduling behaviors of BFA and FA are almost similar due to conceptual similarity. In
BFA, attractiveness is due to chemical gradient in environment and in FA attractiveness is due
to luminosity of flashes. In proposed EHO-BFA and EHO-FA, this behavior remains dominant.
4.2 2nd Proposed System Model: Rigid Community (Single Building-Single Fog)
In this research work, a three-layer system model is proposed for rigid community connected
with single fog for energy management, as shown in Figure 2. The clusters of residential build-
ings exist at the end-user layer. The cluster generates a number of requests for their energy
consumption. Each cluster is attached with a fog in the middle-ware layer. The fog receives
requests from the cluster for processing. MG with RESs and storage system is placed near each
fog. The SBP routes the traffic of requests in potential fog server or data center. The load bal-
ancing algorithm efficiently allocates the requests on VMs in the data center. The recurring cost
of MGs and computational cost of the fogs form the system cost and added in consumers energy
consumption bills. The fogs are connected with core or cloud layer where necessary data from
the fogs are sent for permanent storage. The cloud also broadcasts the utility tariff to the fogs.
In the system model, each region has a Nnumber of clusters of residential buildings. Each
cluster has nbuildings, B={b1,b2,..., bn} and each building has mSHs, H={h1,h2, ...,hm}.
It is assumed that the production and current status of MGs are shared with the fog. The fogs
have utility tariff and information of MGs to process the energy demand requests. In this system
model, PV, Wind Turbine (WT) and Fuel Cell (FC) are assumed for energy producing sources
and battery storage systems are used to store the energy in MGs. It is assumed that fogs0servers
or data centers are placed near the end-users to reduce the end-to-end latency. Moreover, when
huge requests congestion is created on fogs then the requests can be routed on the cloud for
processing. The communication between end-devices and the fogs take place through wired
and wireless communication medium like Wi-Fi, Z-Wave or ZigBee.
The end-devices generate requests and send to the fogs for processing. Each request contains
information of previously load consumption, current load demand, the source of energy (utility
or MG), cost and time (for request generation, which is sent to the fog and receive back). The
request can have other information like number of appliances, power ratings of appliances, the
current cost for consumed energy depending on the consumers services and facilities from the
fogs. Every cluster generates a huge number of requests and sends to the fog for processing. The
optimization of resource utilization is performed on the fog. Two necessary and effective steps
are; selection of efficient server or data center where traffic of requests are routed for processing
and balanced load requests allocation of routed requests on the VMs in the server. The necessary
information of these requests is sent to the cloud for permanent storage and to be used in future
for statistics and projects. The fogs also contain the information of MGs (production, capacity,
the rate of energy flow out, etc.). When a MG has insufficient power to fulfill the demand then
fog requests the cloud to facilitate energy consumer.
In end-user layer, the SMs of SHs in residential buildings have information of smart appli-
ances. The set of smart appliances, Sa p ={ap1,ap2, ...,a pp} in a SH are connected with the SM.
The SMs share the request with the fog and the request carries the information of Sap and own-
ership of SH. Hence, information of each appliance and biodata of the consumer are sensitive
Service Providers
Cloud
Utility
Fog 1 Fog 2 Fog N
Core Cloud Layer
Middle-ware Layer
End-User Layer
MG-1 MG-2 MG-N
Cluster-1
Cluster-2
Cluster-N
Two-way
Communication
Power Supply
Cloud Storage
Fog Server Cloud Servers
Figure 2. 2nd Proposed System Model: Rigid Community (Single Building-Single
Fog)
and called private data of the SH. However, it is assumed that the total power consumption of
a SH is shareable and called public data. The SMs categorize the energy data of each SH into
private and public.
Private data is usually never shared; however, the companies use this information for their
statistic and analysis for future or upgrade the existing system. Such sensitive data can be
compromised in the cloud based system. In the fog based system, the information is local
and it is less likely to be compromised.
Public data refers to total energy consumption from a building, power generation of each
MG and utility tariff. This information does not contain sensitive data and there is no risk
of sharing data.
The fog in fog-layer receives requests for energy demand from the cluster of residential
buildings and the current status of the MG. On the basis of this information, fog decides either
energy is supplied from MG or the utility. The cluster does not directly communicate with the
MG and utility. Similarly, in case of utility, the fog requests the cloud, which facilitates the
energy demand request from the utility.
4.2.1 Problem Formulation
Effective task scheduling can be done in such a way that the upcoming requests from end-
users get minimum execution time. Let ‘x’ be the number of requests received by task handler
with task length TL. The set of independent tasks is represented by Tt ask ={t1,t2,...,tx}. Every
independent task is assigned to a VM with processor speed P
s, bandwidth bw, memory Mem
and the number of CPUs Cpu. Let, V M ={vm1,vm2, ..., vmy}is the set of yVMs in the fog. The
VMs execute the xtasks in parallel. Each VM runs on its own resources and processes the tasks
independently.
The maximum completion time required for a task is the makespan of the task. The objective
of load requests balancing is to mitigate the makespan and RT. The makespan of rtask on V Mi
is denoted by CTr,i. The makespan for ron V Miis elaborated using following equation 10:
MakeS panr=Max(CTr,i).(10)
Where rεTtask,Tt ask ={1,2,3,..., r, ...,x}and sεV M ,V M ={1,2,3,...s..., y}. Mapping of
the task Ttask to yVMs affects performance parameters. Now, the total tasks assigned to each
VM are dependent on the set of end-users0requests and on the performance of load balancing
algorithm. The PT and RT of tasks are formulated using linear programming. The PT of the
allocated task Trto sVM is PTr,sand status of the task is αr,s. Total PTTof xtasks allocate to y
VMs:
α=I f t ask x is asssigned,1,
otherwise,0.(11)
The objective is to minimize PT,
PTT=Σx
i=1Σy
j=1(PTi,jαi,j),(12)
where,
PTi,j=TL(i)
P
s(j).(13)
Where, TL(i)is the length of task iand P
s(j)is the processing speed of VM j. RT is the total
time taken from sender to data center, PT in data center (by VMs) and time to receive back from
data center. It is computed with the help of Eq. (14),
RTi,j=CTi,j+TD(i) + NTD(i),(14)
Where, RTi,jis the RT for the task iassigned to VM j,TD(i)is the transfer delay and NTD(i)
is the network delay for task i.
The VM is installed on physical machine in a data center, acquiring resources to process
the tasks. There are two types of cost; fixed and recurring cost. The cost of physical machine,
maintenance and installation refers to fixed cost. The recurring cost is associates with the use
of resources of physical machine. Optimized utilization of resources reduce the recurring cost.
Average fixed cost of a VM can be calculated with Eq. 15 when ynumber of VMs are installed
on a physical machine,
V Mc
f ixed =Pc+Mc
y,(15)
where, Pcand Mcare cost of physical machine and maintenance. The recurring cost is calculated
on the bases of number of requests arrive in the VM and the computational efficiency of VM.
The length of a task TLis directly proportional to the number of instruction in the task IN,
TLIN.(16)
The cost of a VM is calculated by the number of instructions executed in a given time. Cost for
a VM is defined by execution of a Million of Instructions Per Second (MIPS). Cost of VM for
given task of length TLis,
V Mc
TL= (IN×CostMIPS ).(17)
Where, V Mc
TLis a cost cof VM for a task Twith length L. The CostMIPS is the unit cost for
MIPS. The total cost of VM for all xtasks,
CostVM =Σx
TL=iVM c
TL.(18)
The MG is placed near the fog, in middle layer, for cheap power generations; from WT (GW T ),
PV (GPV ) and stored in FC (GFC) with the costs of CostWT ,CostPV and CostFC , respectively.
The PrMG is the unit price for energy produced from the MG, which depends on the types of
RESs based power generators. The energy generated by WT and PV depend on the weather
conditions. The power generation from these resources are intermittent which also effects the
recurring their energy generation cost. FC is used for backup to keep MG alive. The capacity
of power generation of MG CapMG is the sum of power generation by RESs like GW T ,GPV and
GFC ,
CapMG =GW T +GPV +GFC .(19)
Total cost of energy produced by MG is calculated using Eq. 20. Where PrMG is the unit price
of power generating in MG, in aggregation of all types and sizes of RESs.
CostMG =Ca pM G ×PrMG .(20)
Cost of DT is the composite of interconnect and transit costs. Interconnect is a fixed cost
used for connectivity with Internet Service Provider (ISP) cross linking. Transit cost T RCis a
variable depending upon bits-per-second or bytes-per-second. The cost of DT (DTC) is com-
puted by transit rate times the data size Datasz need to be transfered. The DT is calculated using
Eq. 21,
DTC=T RC×Datasz.(21)
The total cost of the system is the sum of VMs, MG and DT cost, as given in Eq. 22,
Costsys =CostVM +CostMG +CostDT .(22)
Where Costsys,CostV M ,CostMG and CostDT represents the total system cost, VM cost, MG cost
and DT cost. The objective is to minimize Costsys by optimizing PT and RT of xtasks on yVMs.
4.2.2 Load Balancing Algorithms
Efficient resource utilization enhances the performance of computing resource. The cloud and
fog have huge resources to execute a huge number of requests. The resources are shared to
enhance the performance. In the synopsis, resources of a fog are shared by creating VMs.
The requests are executed according to the performance of VMs. However, execution of the
overall load of requests is optimized by the efficient allocation of the requests to the VMs. The
performance of a data center is compromised when some VMs have overloaded requests and
some have very few requests or they are idle. To resolve this issue, load balancing algorithms
are used to allocate balanced load of requests on the VMs. The mechanism of load balancing is
illustrated in Figure 3. From top-to-bottom, the end-users generate requests, which are sent to
the fog data centers. The data center controller routes the requests on the potential server where
the load balancer (load balancing algorithm) efficiently allocates the load of requests on VMs.
The VM manager furnishes the VMs for the load of requests to execute. The VMs are created
on physical resources, which are maintained by VM monitor. However, collective performance
of these VMs depends on the load of requests assigned to them. The PT, RT and the execution
cost with proposed load balancing algorithm PSO-SA are analyzed by comparing with Round
Robin (RR), throttled and PSO algorithms.
Users
Data Center Controller
VM
Load Balancers
(Applying Algorithms)
Virtual Machine Manager
VM VM VM VM VM VM VM VM
Physical
Server
Physical
Server Physical
Server
VM Monitor VM Monitor VM Monitor
Figure 3. Load balancing mechanism in data centers
RR Algorithm
The RR algorithm is based on equal time slicing. The RR algorithm is used to allocate the
resources by equal time slicing for efficient utilization of resources. This algorithm is used to
balance the load of requests on the VMs by assigning equal time slice. The basic steps are
described in Algorithm 7.
Algorithm 7 RR based resource allocation
1: Input: List of tasks, List of the VMs
2: Output: VmId where tasks will be assigned
3: Initialize VmId=1, maxIter=maxValue
4: for vm=1; vm length (VmList); vm++ do
5: Find N_tasks allocated to vm
6: if VmId=1 then
7: cur_count=0;
8: else
9: cur_count=vm.getCurAssign()
10: end if
11: find (cur_VmState)
12: State=VmState
13: if (cur_count MaxCount &&
14: State.equals (available)) then
15: MaxCount=cur_count;
16: VmId=vm;
17: end if
18: end for
19: Return VmId
The Proposed PSO-SA Algorithm
In the proposed algorithm, PSO is used to find local best position (Lbest ) and global best
position (Gbest ) with Simulated Annealing (SA). In PSO, the best solution Gbest is found by a
sequential flow of information. The best solution sends information to nearby particles. In lo-
cal search, each particle is compared to its neighbors to find Lbest particle. However, in global
search, all particles are compared with a single best solution which compromises the Gbest per-
formance of PSO. On the other hand, the SA algorithm is inspired by the natural process of
metallurgy. SA converge to global best search after long cooling process. Hence, during heating
and long cooling process, the performance of Lbest suffers. The hybridization of Lbest of PSO
and Gbest of SA provide efficient solution. The basic steps of the proposed hybrid PSO-SA are
illustrated in Algorithm 8.
PSO Algorithm
PSO is inspired from the motion behavior of birds or fish to improve the candidate solution.
The individual particle (animal) is not intelligent enough to solve complex problem. The swarm
intelligence (all the animals in search space) provides the efficient solution. Each particle is
influenced by its neighbors and each particle updates itself with respects to its neighbor, which
make the whole swarm update. This leads the whole swarm to the best solution. The PSO algo-
rithm uses following steps to find best solution.
The particles (swarm) move in the search space by making calculations.
The movement is made with two constraints: locally best position and best position in whole
swarm.
Any update in a position will update the whole particle swarm, which makes the PSO ineffi-
cient for its global search.
The basic steps of the algorithm are given in Algorithm 9.
Algorithm 8 PSO-SA based resource allocation
1: Input: Load of requests, list of VMs
2: Initialize Population (all VMs)
3: Initialize the Best known VM Bkfor the requests
4: for Number of all VMs do
5: Input Load of Requests LR
6: if (Number of Bk==0 && LR)>1then
7: Select random VM
8: end if
9: if LR < VM (capacity) then
10: Update the the population according to Bk
11: end if
12: for x=1 to Population do
13: T=x/Bk
14: NewV M =Pick random neighbor of Bk
15: if Acceptance-Probability P(NewV M ,CV M ), T)>=rand(0,1) then
16: CVM =NewVM ; Assign current VM with NewV M
17: end if
18: end for
19: end for
20: Return list of best VM
Algorithm 9 PSO based resource allocation
Input: List of tasks/requests, List of Population Pop V Ms
Output: P
gbest
P
gbest =0
for c=1 to Pop do
Particle velocity P
vel =Rand(01)
Particle position Ppsn =Rand(Popsize )
Pp_best =Ppsn
if Cost(Pp_best )<=P
g_best then
P
g_best =Pp_best
end if
Stopping-condition
for (dod=1 to Popsize)
P
vel =Update(P
vel ,P
g_best ,Pp_best )
Ppsn =Update(Ppsn,P
vel )
if Cost(Cost(Ppsn )<=Cost(P
g_best )then
P
g_best =Ppsn
if Cost(Cost(P
g_best ))<=Cost(Ppsn )then
Ppsn =P
g_best
end if
end if
end for
end for
Return P
g_best VM
Throttled Algorithm
In the throttled algorithm, “throttledVMLoad” balancer maintains the table by indexing the
all VMs, which are available at the beginning. Data center controller receives new requests
Algorithm 10 Throttled based resource allocation
1: Input: List of tasks, List of the VMs
2: Output: VmId where tasks will be assigned
3: Throttled Load Balancer initialize an index
4: VmList checking ();
5: VmState ();
6: DC controller receives request
7: NextAllocation ();
8: CheckAvailability ();
9: if (VmId=1) then
10: Return VmId;
11: waitforNextAllocation ();
12: ModifyIndex ();
13: else
14: Return VmId=-1;
15: end if
16: if (more requests are in queue) then
17: Repeat step 8 to 15
18: end if
19: Return VM with load
from end-users. The requests query the controller where to be assigned. The algorithm 10
assigns the requests to the VMs by identifying the tags assigned by the data center controller.
If identical tags are found, then requests are considered for next allocation after amending the
tag information. The table is also updated according to the amendments. If there is no next
request then balancing function returns “-1”. The basic steps of the Algorithm are explained in
Algorithm
4.2.3 The Proposed SBP
The SBP selects the data center where requests are routed for processing. The requests from
the end-user layer are sent to the fog where SBP selects efficient data center (according to the
policy algorithm) [104]. The requests query the service broker for the destination. In this work,
a hybrid of ORT and Service Proximity (SP) is proposed for selection of an efficient data center.
In both SBPs index tables are maintained for available data centers. In the table of SP, the table is
indexed according to the nearest data centers. The regions are ordered in the list by the sender0s
region and region queried. The remaining are ordered in lowest latency first. The earliest data
center (lowest latency) is picked from the list. If there are more than one data centers, then a
random data center is selected. However, the table of ORT is indexed according to RT from
the data centers using the Internet characteristics. The requests query the closest destination
(according to latency) using the service broker algorithm. The best RT is found by iterating
through each data center due to:
Last performed task using Internet characteristics.
If time is recorded before the threshold time, then PT is appended ‘00. It defines the idle
state of the data center.
If closest data center does not have estimated smallest RT then on 50:50 chance either of
them is selected.
In proposed hybrid SBP, following points are followed:
A table is maintained with index of all available data centers.
The requests query the data center controller about the destination.
The sender0s region and queries for the regions are enlisted using SP.
The network delay for the regions are enlisted from the Internet characteristics and by
querying the last recorded PT (using ORT step).
The network delay for other regions from the given region also enlisted (using SP step).
The CDC with minimum RT is selected; otherwise, data center with least RT is selected
(using ORT and SP steps).
4.3 3rd Proposed System Model: Flexible Community (Multiple Buildings-Multiple
Fogs)
In this research work, a system model is proposed for flexible community for energy manage-
ment. A cloud-fog based model is proposed in order to manage the consumers’ load requests
regarding electricity consumption. Similar, system models have also have been proposed by
[167] and [168]. The simulator, proposed for this work, divides the world into geographical
regions. It is assumed that these regions are residential which communicate with fogs for elec-
tricity load management based on users0requirements. Fogs communicate with cloud and MGs
for storing the data permanently on cloud and trigger electricity supply from MGs according to
users0requests.
Every cluster of residential buildings in the regions generate a huge number of requests and
are sent to the fog for execution. In this work, every building has 100 SHs which generate a
number of requests. Each region has two fogs forming three tier model as shown in Figure 4.
In the first tier, each building has a controller to communicate with fog and it also manages
the power supply for the homes in the building. In the second tier, requests of end-users from
buildings are computed on fog and responded back. In the third tier, the data from fogs are
sent to the cloud for permanent storage and future use. Cloud receives data from all the fogs
and provides centralized data storage and necessary processing. The stored data can be used for
future statistical analysis and prediction based projects.
The clusters of buildings are directly connected with the fogs. The range of buildings in
a cluster is 50 to 100 and each building have 50 to 80 apartments. If there are nnumber of
buildings in a cluster then each cluster has set of buildings, C={B1,B2, ..., Bn}. The set of m
apartments in a building xis: Bx={Ap1,A p2, ...Apm}. Fog receives data from a cluster where
private data of every apartment of each building needs to be secured. Each building is equipped
with a controller which encodes the identity of apartments and appliances of it. The controller
also manages the demand and supply from and to the buildings by communicating with the fog
nodes in a region. Each region has multiple MGs which are equipped with a distributed energy
source like PV arrays, WT, Micro-Turbines (MT) and also a diesel engine for backup. If there
are kMGs in a region then set of MGs are MG ={MG1,MG2, ...,MGk}.
The requests are sent to the nearer fog node from the controller of a building for electricity
demand of each apartment. The fog node decides either demand should be fulfilled by MG or
utility depending on cost constraints. In case of MG, a nearest one to the building is instructed
to fulfill electricity demand. In case of macrogrid, fog forwards the requests to cloud which
instructs the utility to assist MG to fulfill the electricity demand. End users use web based
applications to control IoT based smart appliances in the apartments.
In this synopsis, a system model is proposed and will be implemented in the simulator, in
which the world is divided into six regions and fog nodes are placed in each region. Each region
has two clusters which are connected with two fogs to process the requests of each building with
Cloud
Fog 1
Fog 2
C1
C2
MG-1 MG-5
Fog 11
Fog 12
C11
C12
MG-1 MG-5
Service Providers
Tier 1
Tier 2
Utility
Tier 3
Power Supply
Two-way
Communicaiton
Fog Server Cloud Data
Center
Figure 4. 3rd Proposed System Model: Flexible Community (Multiple Buildings-
Multiple Fogs)
apartments. The fog node has features as shown in Table 5. End users0requests are processed at
fog which instruct the MGs or utility via cloud to fulfill the energy demands. The fog decides
to select appropriate MG or make macrogrid to facilitate the requests of building. In the model,
the set of ffogs is, F={F1,F2,...,Fn}and set of rregions where these fogs are placed are:
R={R1,R2,..., Rr}. Data is stored temporary on the fog and later, it is sent to the cloud for
permanent storage.
Table 5 Features of the fog
Resources Parameter Value
VM
Image Size 10000 MB
Memory 512 MB
Bandwidth 1000 Mbps
Fog
Architecture X86
Operating System Linux
VM Manager Xen
Number of Machines 20
Machines
Memory 2048 MB
Storage 100 GB
Available BW 10000
Number of Processors 4
Processor Speed 100 MIPS
VM Policy Time Shared
4.3.1 Problem Formulation
The consumers generate requests, which are processed in the fog. The efficient resource uti-
lization of fog computing minimizes the RT, PT and the computing cost. The RT and PT of
consumers’ requests are calculated as these have been formulated in the section 4.2.1. The RT
and PT are calculated using Eq. 13 and Eq. 14. The computing cost of VM is calculated using
Eq. 17 and 18. The cost of a VM also depends on the storage, memory and bandwidth assigned
to it. The total storage Stt, memory Memtand bandwidth V M Btfor the VM depends on unit
cost of them; Stuc,Memuc and V M Buc, respectively. The cost of VM in the proposed system
is calculated using Eq. 23. The cost of DT is calculated using Eq. 21. The MGs used in the
proposed system model have same RESs, hence recurring cost of the MGs are calculated using
Eq. 20. The system operating cost is the sum of VM, MG and DT cost, calculated using Eq. 22.
V M_Cost =Stuc ×Stt+Memuc ×Memt+V MBuc ×V M Bt,(23)
4.3.2 The Proposed MHBC Algorithm
The cloud and fog have huge physical computing resources, which are shared by creating virtual
resources on them. The VMs are created to process the requests of a variety of applications or
to process the requests for cross platforms or to process an extensively huge number of hetero-
geneous requests. VMs share the physical resources for efficient utilization. However, VMs
themselves need to have a balanced load of tasks or requests for efficient processing. The au-
tonomous load balancing algorithm is efficient which neither overloads nor underloads any VM.
Heuristic and static algorithms are proposed for load balancing over VMs [102]-[103]; however,
for this research work the MHBC is proposed.
The VMs are installed on servers of cloud or fog data centers. The capacities of data centers
are different due to specifications of physical components and current status of load or traffic of
requests. A SBP selects the potential data center (or server) to route the traffic of requests on
it. Constraints and threshold values of parameters are used to define the policy for selection of
data center. For example, ORT is proposed, which selects the data center with minimum RT to
route the requests on it. When requests arrive at the data centers the load balancing algorithm
allocates VMs to process the requests.
Honey bees are insects which live in colonies under the command of a queen. The colony
consists of larvae, pupae, developing eggs, male drones and female worker bees. The diversity
and survival of the population depend on seasonal changes and rules defined by the queen.
Algorithm 11 MHBC Algorithm
1: Start
2: Initialize Drones Population:P
V M
3: Enlist all VMs on the fog
4: Initialize the status of current VMs on the fog
5: List of Fitness of VMs on Fogs
6: Set probability fitness P
7: Initialize cut-off = 8
8: Initialize Scout Population PsVM
9: for t = 1:24 do
10: for (iter ← −1 to (PsV M))do
11: ListPsV M PsV M ()
12: end for
13: while PsVM > -1 do
14: PathFS(i)Probabil it yO f Fog(i): Routing on Food Source FS
15: PathFS : Routing Requests
16: until Scout Bee ==-1
17: end while
18: return PathFS: Requests on it h fog
19: for Regional search (local search from PsV M )do
20: MinCostVM (i)=MinCostPsVM :Minimum cost from Scout VMs
21: end for
22: Fit nessV M MinCostVM (i): Bee drone waggle dance
23: for Overall regional search (global search) do
24: MinCostVM (i)Overall(MinCostVM (i))
25: end for
26: if V MFitness P
V M (j): jth from P
V M then
27: Set V MFitness =P
V M
28: else if V MFit ness P
V M (j): jth VM from P
V M
29: Current fitted VM V MFitness assigned the request then
30: return fitted VM
31: end if
32: end for
33: Return list of VMs with Load of Requests
The population is affected in cold season as well as tasks performed by the castes of bees.
When more than one queens exist they extend to form new colonies with the help of drones and
workers. The fertilization, food and wax to construct hive are provided by drones and worker
bees to build new colony [169]. Inspired from the colonial behavior of honey bees, honey bee
colony optimization algorithm is proposed. However, MHBC algorithm is proposed for load
balancing on VMs in the fog data centers. This algorithm is inspired by the foraging behavior
of honey bees. The scout bees represent the number of VMs for each fog. The remaining or
waiting tasks are updated according to the next allocated tasks assigned to VMs. This behavior
is found in bees when plenty of food source is found. The bees in the hives are updated about
location, distance from the hive and the amount of food though the waggle dance. In the dance,
motion relative to hive indicates the direction, vertical motion relative to source indicates the
position of Sun and duration of waggle is the distance. The waggle dance updates the VM
availability, status and load on VMs. The VMs allocated with load of requests with optimized
cost.
4.3.3 The SBPs
The policies are defined to route the requests to the appropriate data center for efficient process-
ing, response and cost. Service broker policy used by the service broker of cloud or fog to decide
the data center to which requests are routed. Hence, the selection of a data center is made by
SBP [104]. The selection of data center affects the RT, PT and cost. The SBPs; ORT, DR with
load and proposed New Dynamic Service Proximity (NDSP) are elaborated in the subsequent
headings.
ORT Policy
It maintains the index of all available fogs or data centers located in the regions.
Estimates the RT of available fogs in the region using proximity policy by evaluating
Internet characteristics.
Checks the history of fog or data center and validates with the recent best RT.
The requests coming from the clusters are routed to the fog located in the same region
with least RT.
DR with Load
This policy maintains the index of all fogs or data centers available in the region.
Requests are directed to destination fog or data center.
Maintains the list of delays of communication medium (using Internet characteristics)
calculated from the requests it receives recently.
The closest fog or data center to the cluster of a same region with best RT is selected.
It also manages the fogs or data centers on current status basis. If current RT is better than
the best RT then it selects another fog with better RT otherwise current fog is selected.
If there are more than one fogs on better statuses then random fog or data center is se-
lected.
VMs are increased or decreased by creating and releasing the VMs on the basis of traffic
load.
The Proposed NDSP
The proposed NDSP is a hybrid of ORT and SP. The limitations of ORT and SP are resolved
by hybridization of both policies. In ORT, a random selection of data center can choose inef-
ficient data center; however, in DR with load, increase and release of VMs are decided on the
basis of requests traffic load. This characteristic of DRL enhances the RT efficiency due to the
evaluation of traffic load then creation or releasing of VMs.
The proposed SBP is the extension of DRL and SP.
Index of fogs or data centers in a region is maintained.
Latency list is maintained by evaluating the characteristics of the Internet (communication
medium) of request coming from the region.
Prediction of upcoming requests is made from the current requests load on fogs.
New requests are planned to route using prediction.
Closest data center or fog is selected on which new VMs are created or freed earlier, if
required.
4.4 4th Proposed System Model: Flexible Community (Multiple Buildings-Single
Fog (Hardware Scale-Up))
In the proposed system model, six geographic regions with groups of buildings are considered
for simulation, as shown in Figure 5. Each building has multiple SHs or apartments with IoT
based appliances. Every home has a smart meter with 5G enabled controller to monitor, control
the IoT based appliances and communicate with the controller of the building. Each building
communicates using the controller with fog node in the region for processing of energy requests
of SHs. Fog is connected with MG and the cloud. If demands of SHs are not fulfilled by
MG, then fog requests the utility via the cloud to fulfill the demand. Fog transmits the data of
consumers to cloud for permanent storage and future usage. The communication takes place
between home appliances and smart meter, building controller and smart meters, fog and the
controllers, MG and fog, utility and fogs, and cloud and fogs; however, power flows from utility
and MG to the buildings. It is assumed that every communicating device has an IoT module to
share data over the Internet. Parameters for the group of buildings considered for the proposed
system model are given in Table 6.
Fog receives requests from the building controller for energy demands. Fog prefers MG,
due to cheaper energy as compared to utility and instructs to facilitate the required SH in the
building. If MG has insufficient power, then it responds to the fog accordingly. The fog re-
quests the utility via the cloud to meet the energy demand of the building. The SHs generate
frequent energy requests and send to respective fog node in the region for energy demands.
When hundreds of SHs generate a number of requests for a day then computational perfor-
mance becomes challenging. High Processing Fogs (HPFs) are introduced between cloud and
buildings (end-users). HPF, unlike cloud, has low latency, lesser PT and RT with data security.
The communicating modules in the system model are monitored and controlled using IoT based
applications over web services.
Fog is like a small cloud; however, it has limited resources as compared to the cloud. It
is placed close to the end devices (end-users) and extends the cloud services on the network
edge with high performance and real-time responses. The resource sharing techniques are used
for efficient resource utilization in cloud and fog computing. VMs are installed on the fog for
resource sharing to efficiently process the huge number of energy requests. Load of requests
on VMs effect the performance of fogs, hence load optimizing algorithms are used. The First
Come First Serve (FCFS) and ACO algorithms shall be implemented for load balancing over
VMs. However, selection of potential data center on fog node is made by SBPs; ORTP. The
simulations are performed with the simulator “CloudAnalyst” [170], in which calibration of fog
parameters are tuned, as shown in Table 7.
VMs are the programs that mimic the operations of physical machines. Resources of phys-
ical computing machines are divided logically to create VMs. Hence, physical resources are
shared using VMs to enhance the performance and unbound the specifications of resources.
However, too many VMs on physical resources limit the capacity of the resources; hence, it is
assumed that overall performance of the system should not be compromised. The system model
is proposed for SG applications, in which a huge number of requests are generated in a day for
every hour from residential buildings and are sent to the HPFs. The load of requests is routed
on data servers for RT optimization as well as on VMs which are allocated with balanced load
of requests to reduce the PT. Three scenarios are implemented with the same specification of
hardware; however, VMs are doubled in scenario 2 as compared to scenario 1 and doubled in
scenario 3 as compared to scenario 2.
TV Coffee Maker Dryer
Washer Fridge Video
Game
IOT Appliances
HPF-1 HPF-6
MG-1
Utility
TV Coffee Maker Dryer
Washer Fridge Video
Game
IOT Appliances
MG-6
R1 R6
Each apartment
in each building
has IOT based
appliances
Consumers send request
Energy supply
request
Insufficient
energy in MG
Cloud
Power supply
Power supply
Power supply
Pricing
signals
Data center
Energy management response
Request
supply
Figure 5. 4th Proposed System Model: Flexible Community (Multiple Buildings-
Single Fog
MGs are equipped with RESs, which are placed closer to consumers to save power losses.
Five MGs, as shown in Equation (24), are taken with a battery storage system, RESs: photo-
voltaic arrays and wind turbines. MGs are preferred to use when the utility has on-peak hours,
while, during off-peak hours, RESs store the energy. The set of regions (R) with a set of build-
ings (GB) are given in Equations (25) and (26):
MG =MG1,MG2, ...,MGn,where n =5,(24)
R=R1,R2,..., Ri,where i =6,(25)
GB =GB1,GB2,..., GBj,where j =6.(26)
Table 6 Parameters for groups of buildings
Group of
Buildings Region Number of
Buildings
Requests/
Building/ hour
Data Size/
Request
(bytes)
Number of
MGs Avail-
able
G1 R1 100 100 128 3
G2 R2 90 70 128 4
G3 R3 72 66 128 5
G4 R4 59 59 128 2
G5 R5 86 80 128 4
G6 R6 70 60 128 2
In the proposed scenario, each region has one group of buildings with SHs or apartments.
On average, 1000 are off-peak users and 100 are on-peak users. Cost of energy consumption
is reduced in off-peak hours—this is why most users are off-peak consumers. Each region has
an HPF computing node with memory, storage, number of processors, operating system and
VM manager, etc. HPFs store data temporary and transfer to the cloud for permanent storage.
Parameters of HPFs are given in Table 7. A huge number of requests are processed on HPFs;
however, an efficient load of requests over VMs and selection of potential data centers reduces
PT and RT for the consumers’ requests. Moreover, the groups of buildings generate peak-load
of requests in a day. The peak hours of “G1”, “G2”, “G3”, “G4”, “G5” and “G6” are during
4:00 p.m. to 11:00 p.m., 8:00 a.m. to 5:00 p.m., 7:00 p.m. to 11:00 p.m., 6:00 p.m. to 10:00
p.m., 3:00 a.m. to 11:00 a.m. and 3:00 a.m. to 11:00 a.m., respectively. Peak load of requests
also affects the performance and overall computation cost, which ultimately electricity users
have to pay. The tuning of parameters given in Table 6 for the load of requests of a day will be
implemented in “CloudAnalyst” for three scenarios.
Table 7 Input parameters for HPF
Parameter Value
VM
Image Size 10,000 MB
Memory 512 & 1024 MB
Bandwidth 1000 Mbps
HPF
Architecture X86
Operating System Linux
VM Manager Xen
Number of Machines 20
Machines
Memory 2048 MB
Storage 100 GB
Available BW 10,000
Number of Processors 4
Processor Speed 100 MIPS
VM Policy Time Shared
Homes Grouping Factor 1000
Requests Grouping Factor 100
Executable Instruction
Length 100
4.4.1 Problem Formulation
In the proposed system model, energy consumers generate the requests, which are computed on
the fog like in section 4.2. The PT and RT are calculated using equations; Eq. 13 and Eq. 14.
The computing cost of requests is calculated by calculating the VM cost; Eq. 23. The recurring
cost of the system is the sum of DT, MG and VM cost. The cost of DT is calculated using Eq.
21 and the cost of MG are calculated by Eq. 20. The operating cost for the system is calculated
by Eq. 22.
4.4.2 The SBP for the Proposed System
The SBP selects potential data center for efficient processing and RT. If there are multiple fog
nodes, each with the single data center then they are accessible for a user. The SBP selects a
potential fog node (fog data center) to route the traffic of requests on it. The policies are defined
considering a variety of parameters like PT, RT, resource availability, etc. to select the data
center where requests are routed [170]. The ORT policy is used to select potential data center in
fog node. The steps for ORT are elaborated in the section 4.3.3.
4.4.3 FCFS VM Load Balancing Algorithm
In the FCFS algorithm, the order in which requests arrive on the data center is allocated to VMs,
accordingly. When huge requests arrive on data center, then these are put in wait in a pool in
the same order as they are received. Each request is assigned with time or incremental priority
tag. The algorithm picks the first request by calculating tag associated with it and prefers the
earliest request to feed into the system for processing. The system has VMs which receive these
requests for processing on FCFS bases. The algorithm has steps given in Algorithm 12.
Algorithm 12 FCFS
1: Input the requests along with their burst time (bt)
2: Find waiting time (wt)for all requests.
3: The request comes first, need not to wait so, waiting time
4: Request 1 will be 0
5: wt[0] = 0
6: Find waiting time for all other requests i.e.; for Request = i + 1do
7: wt(i) = bt(i1) + wt(i1)
8: Find turnaround time (Tt)for all requests
9: Tt(i) = wt(i) + bt(i)
10: Find average waiting time
11: Total_wt(i)/No.o f Processes
12: Similarly, find average turnaround time
13: Total_Tt(i)/No.o f Processes
4.4.4 ACO VM Load Balancing Algorithm
The ACO algorithm is inspired by the behavior of ants when they search for food. Ants have
no eyes and use pheromones chemical for their route to search the food. When plenty of food
is found, then others are directed to the same destination from the nest with multiple paths.
Initially, ants have multiple paths; however, after some time, the shortest path is chosen us-
ing swarm intelligence. Ants follow pheromones, which can be evaporated and the chance of
availability from one location to other is also reduced. Hence, the performance of finding or
calculating the shortest path is effected. Availability of pheromone is probabilistic; hence, ACO
is a probabilistic meta-heuristic problem solving technique. The optimized solution inspiring
from the behavior of ants is calculated with Eq. (27):
pd
i j =(τi j (t))α×(ηi j(t))β
sJd(i)(τis(t))α×(ηis(t))β,(27)
where pd
i j is the probability of pheromone, τi j(t)between iand jants at time t.τand ηi j(t)are
heuristic factors with coefficients of αand β. The ACO algorithm has steps given in Algorithm
13.
The time required to allocate an available number of requests on the VMs is called time
complexity of ACO. The time complexity from one pheromone’s position to other is O(n)for n
positions. For iteratively visiting all positions, the time complexity is O(n2). This exponential
increase in time is too high for large instances. Hence, the PT and RT for ACO are higher as
compared to FCFS in Scenario 1. The time complexity differences in Scenario 2 and Scenario 3
are higher as compared to Scenario 1 due to a higher number of VMs. Local search is imple-
mented in each fog computing for VM allocation; hence, the space complexity is linear (n)
while a global solution of ACO has space complexity of (n2). The space and time complexity
of ACO are very high.
In this work, requests are the food and VMs are ants while HEMC acts as a nest of ants
and generates requests and sends to HPF using 5G technology. The potential VM is selected by
evaluating the availability and capacity for every request. Hence, before allocating the VM, the
probability and suitability of VMs are updated in the list. Thus, iterative update and prioritiza-
tion increase the time for manipulation.
Algorithm 13 ACO
1: ACO parameters initialization: pheromone, routes, iteration
2: Solution = 0
3: Iteration = 1
4: Probability of allocation of VM computed using Equation (27)
5: Random allocation of tasks to VMs
6: The value of VM is inserted into list of VMs
7: Repeat the step until the completion of tour of ants
8: Compute the Solution
9: Calculate the distance between source to destination
10: Update the pheromone
11: Again calculate the distance
12: For every edge update the pheromone locally
13: Optimal solution is replaced by current solution
14: Continue the process until best optimal solution
15: Display the results
The high time and space complexity of ACO makes it unsuitable for huge data (e.g.; more
than 3800 data requests [171]). For huge data, ACO traps in local optima. However, the number
of requests or data are small and do not trap in local optima. However, time complexity is very
high as compared to FCFS. It is assumed that probability of pheromone evaporation is reduced.
Moreover, co-efficients αand βare reduced to control local optima of ACO.
4.5 5th Proposed System Model: Rigid Community (Power Economy Sharing)
In this subsection, a three layered system model is proposed for rigid community in realistic
scenario, as shown in Figure 6. In the lowest layer, there are nnumber of smart communities.
Each community has the hnumber of SHs. Each SH has BESS for uninterpretable and cheap
power supply. The energy is stored during off-peak hours and consumed during on-peak hours to
save maximum cost. However, these BESSs of the community are interconnected and controlled
from the fog in the middle layer. The interconnection of BESSs forms a UESS, which fulfill
the demands of SHs in the community instead of shifting them on the utility. The decision of
shifting a SH from utility to UESS or UESS to utility is made on the fog. Each community has
a fog in the middle layer to serve as-a-Power-Economy-Sharing. These fogs are connected to
a cloud on the top layer. The cloud provide storage-as-service and broadcast the utility tariff to
the fogs in the middle layer. The data from fogs are moved to the cloud for permanent storage
to be used in future for statistical analysis and forthcoming projects.
Cloud Utility
1. Price Signals from Utility
2. Permanent Storage for future
Unified-
ESS Smart
Community
Community 1
Unified-
ESS Smart
Community
Community 2
Unified-
ESS Smart
Community
Community n
Fog 1 Fog 2 Fog n
1. Switching: ESS and Utility
2. Smart Billing
Power Supply
Power Supply
Power Supply
Power Supply
1. Switching: ESS and Utility
2. Smart Billing
1. Switching: ESS and Utility
2. Smart Billing
Figure 6. 5t h Proposed System Model: Rigid Community (Power Economy Shar-
ing)
There are ten SHs in each community which communicates with their respective fogs for
energy management and share the information of BESSs to participate in UESS. A community
consists of 10 SHs which communicate with the fog for energy management. Energy distri-
bution of UESS within the community is performed in the fog layer which serves as-a-Power-
Economy-Sharing. Four agents are proposed; Home Agent (HA) is responsible for energy man-
agement at SH level and share the necessary information with the fog, Energy Storage Agent
(ESA) and Power Distribution Agent (PDA) reside on the fog and control the power distribu-
tion according to the capacities of BESSs and the Cloud Agent (CA) performs two operations;
broadcasting the utility tariff to the fogs and manages the fog data for permanent storage. The
twelve smart communities are considered and will be implemented in aforementioned system
model with three scenarios.
In the first scenario, SHs without BESS are connected with utility. In the second scenario,
SHs have BESS and also connected with the utility. The load of appliances is scheduled ac-
cording to utility tariff; however, the consumer can interrupt the scheduling for his satisfaction.
When battery based energy is full then the SH shifts power consumption from utility to BESS
until it is fully discharged. In the third scenario, appliances are scheduled according to the utility
pricing. The fogs receive information of BESSs from SHs of respective community and utility
pricing from the cloud. The information of BESSs is used to form UESS for the community.
On the basis of this information, fog generates signals for SHs to switch between the utility and
UESS.
4.5.1 Scenario-1: Communal SHs with Utility
In this scenario, SHs fulfill their energy demands from the utility. In order to minimize the
energy consumption cost a load of appliances is scheduled according to utility pricing. The
scheduling of a load of appliances from high to low tariff time minimizes the power consumption
cost. The heuristic techniques are used for autonomous scheduling of appliances to minimize
the energy consumption cost.
In the scenario, hnumber of SHs in each community consume power from the utility. The
utility tariff fluctuates according to the consumers’ demands and characterized as on-peak and
off-peak hours. The load of a SH is shifted to off-peak hours to reduce the power consump-
tion cost; however, practically, the whole load cannot be shifted in off-peak hours. Therefore,
the total power consumption is the sum of power consumed in on-peak hours ONpand power
consumed in off-peak hours OFFp, as given in Eq. 28,
Ts
pc =ONp+OF Fp,(28)
Where Ts
pc is the total power consumption of a SH s.
Total power consumption for all SHs Th
pc in the community is calculated by Eq. 29,
Th
pc =
h
n=1
Tpc.(29)
The behavior of power consumption of every SH in the community is different from others. So,
the average power consumption of a SH in community is calculated with Eq. 30,
AvgPCh=h
1Tpc
h.(30)
Where AvgPChis average power consumption of hSHs of a community. The cost of power
consumption in given time Costt
pc is the product of power consumed PCtand tariff Trtin the
time, as shown in Eq. 31,
Costt
pc =PCt×Trt.(31)
4.5.2 Scenario-2: Communal SHs with Personal BESS
In this scenario, unlike scenario-1, SHs use BESS along with the utility. During on-peak time the
demands are fulfilled with BESSs; however, demands of SHs and batteries are charged during
off-peak time from the utility. Appliances are scheduled according to utility pricing signals;
however, the consumer can use any appliance at any time without considering pricing signals
because of BESS. If storage of BESS falls short then the SH consumes utility power at its tariff.
For instance, there are sSHs consume power from BESSs and the utility. The total payable bill
is the sum of power consumed from the utility at its tariff and cost of energy consumed from the
BESS. The power cost of BESS is less than the utility or has the maximum cost equal to tariff
at off-peak time of the utility. The cost of ‘s0is calculated as shown in Eq. 32,
Cs
total =(PCt
BESS ×E Pt
BESS ) + (PCt
Ut ×T rt
Ut ),(32)
where PCt
BESS is power consumed from BESS and EPt
BESS is electricity price of BESS in
given time t. Similarly, PCt
Ut .is power consumption from utility and EPt
Ut .is the electricity
price for given time t. The power consumption of utility during on-peak hours increases the
overall cost. User comfort is achieved however, the cost is compromised when utility power is
consumed.
4.5.3 Scenario-3: Communal SHs Participating in UESS
When the storage of a SH falls short, it has one of two options: either buy energy from the
utility or from the energy storage of the neighboring SH. The utility energy is expensive as
compared to battery storage. In this scenario, the BESSs of SHs in the whole community are
unified and shared among SHs during on-peak hours or when the storage of a SH falls short.
The unification of BESS is based on no-profit-no-loss, where no SH seeks personal benefits
only. Every SH has invested in their BESS according to their own demands so, every BESS
has the different capacity with a different investment. Suppose, the nnumber of SHs participate
in UESS for the communal economic benefit. Appliances are scheduled according to utility
pricing signals; however, when the consumer interrupt the scheduling the system warns with a
preferred power source (UESS or utility). The pricing signals of UESS are always lesser than
the utility.
Every SH has a program called HA, which measures the demand for SH and current storage
status of BESS. The HA updates the ESA in the fog, which generates control signal for SH to
use UESS or the utility. It also maintains the communication between the communal SH and
the fog. ESA communicates with PDA for ensuring smooth power supply to the SHs of the
community. SHs of the community. The excessive stored energy of BESS is utilized in the
community rather than selling back to the utility. The agents unify the BESSs with excessive
energy and demanding SH is entertained with this energy rather than buying from the utility.
BESSs use the utility energy for storage during off-peak hours and UESS provides cheaper
energy in the community rather than the utility. The agents: HA, PDA and ESA are used to
ensure the effective energy cost for the community.
Every SH is equipped with different power rated appliances in different numbers; hence,
BESSs are installed accordingly. For this scenario, some assumptions are made:
Installation of BESS is devised according to demand of the SH.
Power consumption behavior of every SH is unique.
The investment of BESS is made according to the capacity.
Every BESS has a one-time (fixed) cost.
The SHs are preferred to use UESS during on-peak hours; however, if sufficient storage is
available during off-peak hours UESS is still preferred. Because, UESS has lesser or equal to
tariff of the utility during off-peak time. Total cost for the hnumber of SHs in a community is
calculated using Eq. 33,
Costn
total =
n
i=1
(PCi
UE SS ×T rt
UE SS +PCi
ut ×Trt
ut ),(33)
where, Costn
total is total cost for nSHs, PCi
UE SS is power consumption of ith SH at tariff of
UESS Trt
UE SS for time t, the ith SH consumed. PCi
ut.is power consumed from the utility ut.by
ith SH at utility tariff Trt
ut.for tlong time.
UESS is charged during off-peak hours and is discharged during on-peak hours. PDA gen-
erates signals to shift SH from personal BESS to UESS when storage depth left with 20%. If
UESS is at lowest storage depth then SH is shifted to the utility. It is assumed that UESS should
not reach at 0% storage. For that when UESS reaches 20% remaining storage then it is consid-
ered as “0-level”. When it lefts with “10%” of storage, it is considered at “-10 level” and when
the storage is zero then it is considered as “-20 level”. So, when UESS reaches at “0 level” SHs
are shifted to utility and UESS put to charge.
It is also assumed that the investment made for every BESSs is different and according to
the demand of the SH. So, BESS of different storage capacities are used in UESS. HAs share
the information of BESSs with the ESA on the fog to form the UESS. When a SH consumes all
the energy from its BESS then ESA requests the PDA to facilitate the SH from UESS or utility
depending on current UESS storage. The pricing of UESS is not more than the tariff of utility
during off-peak hours.
4.5.4 The Fog Environment
In the system model, every community has its own fog node. In the fogs, physical computing
resources are shared by creating virtual resources [172]-[173]. The requests and number of VMs
affect the RT, PT and the cost. VMs are programs of physical machines with similar functions.
The processing speed of a VM is measured in a number of instructions processed in a unit time.
To enhance the performance, the potential data center is selected where requests are routed. The
requests are efficiently allocated to VMs in the data center. The RT is optimized by selecting the
potential data center or server using CDC SBP. The PT is optimized by allocating the requests on
VMs using RR algorithm. The RR assigns the time quanta to each VM to process the requests
without priority. The RT and PT are optimized using SBP and the load balancing algorithm.
However, number of VMs also affect the performance of fog, hence number of VMs are altered
to analyze the affects on the performance.
4.5.5 Mapping of Multiple Agents
In adherence to the system model a multi-agent communication model is proposed for each
community, as shown in Figure 7. In the figure “Com. 1”, “Com. 2” and “Com. n” represent
the communities. Agents are standard programs used in intelligent systems to run, maintain
and self healing the system. In the proposed system model, a communication model for the
agents is proposed for energy management. SHs in the community have HAs, which perform
three tasks; maintain storing operation during off-peak hours, the energy demand of SHs are
entertained from BESS during on-peak hours and share the status of BESS with ESA. The HA
resides between the SH and BESS and ESA resides on the fog. The ESAs form the UESS with
the help of HAs of respective community. ESA also communicates with PDA which uses smart
metering between the community and the fog for smooth power supply to SHs. ESA and PDA
also communicate with Cloud Agent (CA) for utility tariff and permanent storage of fog data on
the cloud.
HA1 HA2 HA10
Com. 1
ESA-1
PDA-1
HA1 HA2 HA10
Com. 2 Com. n
Figure 7. Multi-Agent Communication Model
4.5.6 The Cloud Environment
In the Section 1 and the Section 2 the purpose, the sizes, the computing infrastructures and the
feasibility of cloud for various kinds of problems are discussed. The cloud has virtually infinite
computing resources. The resources are shared by creating virtual resources and different tech-
niques are used for efficient performance. Although, the cloud has efficient PT; however, RT is
higher due to a number of hops between the client and the cloud [174]. These characteristics
make the cloud feasible for delay immune applications. In the proposed system model, the cloud
is considered for Storage-as-a-Service for permanent storage of fog data. It also broadcast the
utility tariff to the fogs. The CA performs the data storage and broadcasting of the utility tariff
to the fogs.
4.5.7 Appliances Scheduling Schemes for SHs in the Communities
The SHs in the community schedule their appliances using GA, EHO and their hybrid, named as
EGO or EHO-GA. The algorithmic steps of proposed hybrid scheme are given in Algorithm 3.
In the proposed system model, the scheduling schemes are implemented according to aforemen-
tioned scenarios. In first scenario, appliances of SHs are scheduled in consideration of utility
tariff only. Similarly, in second scenario appliances are scheduled in consideration of BESSs
and in third scenario scheduling are performed considering the UESSs.
4.6 6th Proposed System Model: Prosumer Oriented Fog based Energy Manage-
ment as a Service (Flexible Community)
In this synopsis, the proposed FEMaaS considers price fluctuation for multiple time steps T,
forecast renewable energy generation, power storage and power demand factors to achieve op-
timal global cost for the smart community. Considering the factors like utility pricing and ESS
can help to avoid on-peak time steps. However, the storage more than actual future power de-
mand with RESs can degrade the system. Hence, it is important to consider forecast renewable
power generation and energy demand altogether. In the following subsections, the system model
and its operations for cost-efficient energy management service for prosumers are explained.
4.6.1 Data Utilization
The sequential time-series data from different components are utilized by FEMaaS. The param-
eters used are: production capacity, the energy demand of the smart community and energy
pricing for Ttime steps. The one hour time step makes T=24 for a day. The production ca-
pacities of large Cland small Cmscale RESs depend on the environmental conditions and can
be forecast according to the geographical location. The energy demand for a smart community
Dis foreknown if consumers intimate their demand in advance or predicted from the historical
data. Each community has dedicated power lines with pre-assigned load capacities depending
on the load demand and decided by the local utility companies.
Pricing data is used to calculate the cost of power consumption. It is also used for selling
cost of energy. Puis the buying price from the utility or power grid. The prices are time-variant
and are predetermined by the utility companies depending on the environmental and power
demand conditions. The Puis broadcast to the fogs and kept in information pool to input for
management. Pru is the price when renewable energy is sold to the power grid.
Pru is considered lower than Pudue to free energy sources like wind and sunlight for power
generation as well as to facilitate the utility. The Eq. 34 shows the relationship between Pu
and Pru, where the coefficient αis the regional environmental penalties and it ranges from 0
to 1. Pris the trading price of renewable energy in the community, which is based upon the
agreement between FEMaaS provider and the prosumers. The value of Pris determined with
Eq. 35, which is between the Puand Pru .βranges from 0 to 1, which is fixed according to the
contract between prosumers and FEMaaS.
Pru =αPu,(34)
Pr=β(1α)Pu+Pru.(35)
Figure 8. 6th System Model
4.6.2 Cloud-Fog based Architecture
Cloud computing provides the computing services over the network (Internet) by sharing the
hardware and software resources. NIST defines the cloud as a model accessible via network for
on-demand, convenient and ubiquitous shared pool of customizable computing resources with
easy management or minimum interaction of service provider. Individuals and organizations
use cloud resources to reduce investment, i.e. purchase, install and maintain the computing
systems with minimum management [31], [151]. In SG, end-users access the cloud infrastruc-
ture for energy management services through Application Programming Interface (API) and
Web browsers. The cloud has virtually infinite computing resources [175]-[176]; hence, it can
accommodate maximum end-users or customers for energy management services. However,
increased number of end-users and centralized cloud infrastructure increase the PT and RT [27],
[61]. Fog is like a cloud and it is also termed as cloudlet (small cloud) to provide services on the
edge of the network; i.e., close to the end-users, for low-latency and provision of real-time ser-
vices [130]. In SG, the delayed response for energy management can cause the instant demand
load-peak creation, which degrades the system efficiency. Therefore, in this synopsis, inspired
from [177] a cloud-fog based system model is proposed and shown in Figure 8. It is proposed
for energy management of multiple smart communities with near real-time services provision.
The smart communities are directly connected with their respective fogs for energy man-
agement services using high bandwidth wired and wireless technologies. A big community can
have access to multiple fogs to overcome the increased PT due to limited computing resources
as compared to the cloud. However, the fogs are dedicated to the community only. Each smart
community has dedicated one or more fogs (depending on size of the community). In case of
more than one fogs, an appropriate is selected by defining SBP. The service broker policy is
defined for prosumers’ aspect (service with minimum RT). Single fog is sufficient for a small
community to provide the service. How big a fog should be to fulfill the requirements of a com-
munity?. The answer to this question lies in resource sharing techniques, number and sizes of
physical and virtual resources [178]-[179]. These community fogs are connected with the cloud
to store periodic information like community energy demands, the number of registered end-
users or prosumers and change in community size, etc. It is done for permanent storage to be
used for future statistical analysis and projects. Hence, the cloud provides Memory-as-a-Service
in this synopsis. Cloud-fog based infrastructre can reduce significant energy consumption by
providing real time service. The proposed FEMaaS is an extension of the Platform-as-a-Service
model designed to achieve optimal global cost by integrating conventional and renewable en-
ergy generators. Prosumers are encouraged to integrate their ESSs and small-scale RESs to
gain maximum incentives. A large-scale renewable power generator is also integrated into the
system to reduce conventional fuel based expensive power generation and reduce the emission
of CO2. Hence, FEMaaS integrates DERs to form virtual REPs and improves the integration of
renewable energy for the optimized cost.
4.6.3 Infrastructure
In Figure 8, the cloud communicates with power grid and fogs for sharing periodic energy
prices. The cloud receives pricing signals from the power grid and broadcast to the fogs.The
sequential periodic information from the components of a smart community: large-scale RESs,
small-scale RESs, prosumers’ energy demand, surplus renewable energy, geographical data and
prices from/to the power grid makes the information pool in the fogs.bThe service managers run
these information to provide service in the community. The service manager of the fog provides
FEMaaS to suggest ideal choices for prosumers of the respective smart community.
Every community has access to two types of nondispatchable DERs; large-scale renewable
generators and small-scale renewable generators. In large-scale, energy sources are installed and
maintained by the individual company for business purposes. They own wind farms and solar
parks to generate a huge amount of power. In small-scale, the RESs are installed on the rooftop
of a building. In smart communities, photovoltaic panels are installed on the rooftop of every
residential building. The energy of these small-scale RESs is consumed for building’s demand
and storage. The surplus energy is traded with the power grid and the smart community. Hence,
these small-scale renewable energy producers prosumers (consume and trade the energy). The
prosumers are encouraged to participate in the system to reduce CO2emission from conven-
tional fossil fuel-based power generators. The prosumers are incentivised with reduced energy
cost by trading their surplus energy. The trade takes place under the signed agreement between
renewable energy producers and the local utility. There are variety of agreements available be-
tween prosumers and utility companies [180]-[183]; however, authors of [61] mention the rule
25.211 i.e. present in public utility commission of Texas. The conventional power generators
are also connected to fulfill the power demand; however, it is not environment-friendly due to
the emission of CO2, which causes global warming.
ESSs store cheap or free energy and consume during on-peak time steps. The storage of re-
newable energy is free and stored energy is cheap when bought from the utility during off-peak
time steps. The ESSs also cures the intermittency of renewable generators. In the proposed
infrastructure, ESSs are the components for small-scale renewable generators, which are main-
tained by the service manager of respective fog. The ESS and RES are connected in pairs with
community power lines to store energy from RESs and participate in FEMaaS.
4.6.4 Cooperative Procedure
The cooperative procedure between fog’s service manager and rest of the components take place.
The data of the components for Ttime intervals are gathered in the information pool of the fog.
The optimal global benefits are determined by utilizing information with the running of the
energy management program. The decision variables are utilized to calculate the corresponding
energy cost for every prosumer. Every prosumer is suggested through API for the amount of
power selling/buying in every time step of T. The power generation from the large-scale RESs
is sold to the power grid or to the smart community. The amount of energy bought/sold by every
prosumer (Ae
x,i,t) in a smart community xis mapped in Eq. 36 and the As
x,i,tin Eq. 37 indicates
the bought or sold renewable stored energy from ESS of a prosumer from the community.
Ae
x,i,t=Bd
x,i,t+Bu
x,i,t+Bs
x,i,tSrc
x,i,tSsc
x,i,tSsu
x,i,tSru
x,i,t(36)
As
x,i,t=Bs
x,i,tSrs
x,i,tSsu
x,i,t.(37)
The power demand can fluctuate suddenly, which can cause forecast error. This inaccurate
unpredicted gathered data makes the service impractical to satisfy ideal demand suggestion for a
prosumer. Hence, adjustment for such error needs to be performed in the cooperative procedure
in the fog. When anomalies are observed, then deficient or surplus power (γa) is bought from
the external grid at current pricing Pct or sold at αPct and differential cost (γc) is determined.
The γcis affected by forecast error (difference of Pct and Pu).
The adjustment process requires a time interval, which is calculated from the current real-
time market operation. In [184], the authors use the interval of ten minutes in the process of
economic dispatch problem. The service manager verifies every prosumer for the actual amount
of energy acquired and produced in real-time during adjustment interval. The real-time data of
prosumers are obtained via APIs by the service managers to calculate ω; the ration of γcand
(Copt
x) a corresponding cost for whole community x. If the value of factor ωis greater than
threshold λ, then energy management program runs again for next time steps untill T. In other
case, decision variables continue to follow each prosumer for next adjustment interval until the
time (Tinterval ) is reached.
4.6.5 Formulation for FEMaaS
The components of a smart community cooperate with FEMaaS to enhance the integration of
renewable energy with power grid supply and maximize incentives (maximum reducing global
cost). A LP model is formulated for FEMaaS to operate the huge information of a smart commu-
nity and the participants. The model is formation is inspired from [61] with decision variables
Bd,Bu,Bs,Src,Ssc,Ssu,Sru,Sl u,Sl c and state of charging and discharging variable S. However,
operation cost for RESs and ESSs are negligible and ignored.
The objective function of the LP model minimizes corresponding cost for every prosumer
Cmand every large-scale renewable generator Clduring Ttime steps. The Eq. 38 shows the
objective function where the Eq. 39 and Eq. 40 show the corresponding cost for the prosumer
and large-scale renewable energy generators, respectively.
min
xN,tT
Copt
x,t=
xN,tT
iM
Cm
x,i,t+
jL
Cl
x,j,t,(38)
Cm
x,i,t=Bu
x,i,t×Pu
t(Ssu
x,i,t+Slu
x,i,t)×Pru
t+ (Bd
x,i,t+Bs
x,i,tSsc
x,i,tSrc)×Pr
t,(39)
Cl
x,j,t=Slu
x,j,t×(Pru
t) + Slc
x,j,t×(Pr
t).(40)
To ensure the smooth integration of renewable energy some constraints are necessary to
define with subject to objective function to avoid conflicts due to physical components of the
system or the limitation of the system. To attract maximum prosumers to participate in renew-
able energy generation, they should be given equivalent chance to fulfill the energy demand.
The criterion is to fulfill the total power demand of a community with grid power and renewable
power generations. The constraint is defined in Eq. 41, which guarantees the satisfaction to
fulfill the required demand without using load shifting algorithms and attracts the prosumers to
participate in FEMaaS.
Dx,i,t=Bd
x,i,t+Bu
x,i,t.(41)
The total sold renewable energy should be equal to the produced energy. The constraints are
given in Eq. 42 and Eq. 43. The constraints assure that sold energy to all communities is equal
to the produced energy from large and small scale RESs.
Slc
x,j,t+Slu
x,j,t=Gl
x,j,tn communities,(42)
Src
x,i,t+Sru
x,i,t=Gm
x,i,tn communities.(43)
For every time step, the choices of every prosumer changes, which makes the variations in avail-
able renewable energy for the smart community. Hence, it is important to trace the renewable
energy variations using Eq. 44 to avoid buying of power more than the available amount.
jL
Slc
x,j,t+
iT
(Ssc
x,i,t+Src
x,i,t) =
iMBd
x,i,t+Bs
x,i,t.(44)
It is discussed earlier that every smart community has power lines, which have power car-
rying capacities. The power load should not be more than the capacity Wz,tof the power line (z)
in a given time step (t). The assigned power load should satisfy the constraint given in Eq. 45.
iWz
Ae
x,i,t+
jWzSlu
j,t+Slc
j,tWz,tzW.(45)
The ESS should be efficient with negligible energy conversion loss. The lowest energy state
is set as 0 when the battery is left with 15% of remaining storage (to ensure the battery life).
However, the maximum storage state is set Smax . The state variable Sdepends on the state of
previous time step and curring charging or discharging decision, which is given in Eq. 46 for
community x. The sold energy from storage to power grid and community should not be greater
than state 0, which is given in Eq. 47. The storage with bought energy should not exceed the
maximum storage capacity Smax
x,iof the battery in smart community xas given in Eq. 48.
Sx,i,t+1=Si,tSsu
x,i,t+Ssc
x,i,t+Bs
x,i,t(46)
Sx,i,tSsu
x,i,t+Ssc
x,i,t0 (47)
Sx,i,t+Bs
x,i,tSmax
x,i.(48)
The FEMaaS coordinates with many DERs and power demand to form a single system and
restricts the production of renewable energy between upper and lower bounds. The upper Vup
and Vlw values are decided by the commitments to enhance the integration of renewable energy.
If the difference of Vup and Vl w is less, then the reserved capacity from convention power
generation is also less. Hence, RESs in the smart community should smoothly with the lesser
running of reserve conversational generator fog requirement. The difference of total demand
and total bought energy from the conventional power generators in every time step of Tshould
satisfy the constraint given in Eq. 49, which is the amount of renewable energy produced during
every time step for the smart community.
Vlw Dtot al "
iMBu
x,i,tSsu
x,i,t
jL
Slu
j,t#Vup.(49)
5 Results and Discussions
The simulations have been performed for 4th proposed system model with three scenarios.
However, one of them is elaborated to analyze the efficiency of proposed system model.
5.1 4th Proposed System Model: Flexible Community (Multiple Buildings-Single
Fog (Hardware Scale-Up))
5.1.1 Scenario-1
In the scenario, 25 VMs are installed on HPFs and group of buildings generating requests,
which are sent to the fog computing node hourly, as shown in Figure 9. VMs are allocated to
these requests using ACO and FCFS load balancing algorithms. Every HPF entertains group of
buildings in the respective region. RT is measured in milliseconds for each group of buildings
and average, minimum and maximum RT is given in Table 8 using ACO algorithm.
1 2 3 4 5 6 7 8 9 101112131415161718192021222324
Time (hrs)
0
2
4
6
8
10
12
Number of Requests
×104
Fog1
Fog2
Fog3
Fog4
Fog5
Fog6
Figure 9. Number of Requests Load on each HPF
The PT of each HPF with the given scenario using ACO algorithm is given in Table 9.
Average, minimum and maximum PT with 25 VMs of each HPF are also given in the table.
Similarly, for same number of requests the RT for each group of buildings has average,
minimum and maximum are given in Table 10 using FCFS algorithm. Average, minimum and
maximum PT of each HPF using FCFS for requests allocation to VMs are given in Table 11.
The PT of each HPF is given for the requests of buildings generated for a day.
Total cost of VMs, MGs and DT for ACO and FCFS algorithms are same as shown in Figure
10. Each HPF covers requests of group of buildings in each region; hence, costs of each fog
Table 8 RT of each Group of Buildings for ACO
Group of
Buildings
Average
(ms)
Minimum
(ms)
Maximum
(ms)
G1 52.31 38.82 64.63
G2 51.29 39.99 66.39
G3 52.47 40.22 66.60
G4 52.31 38.67 64.17
G5 54.66 41.24 70.15
G6 54.92 42.28 71.27
Table 9 PT of each HPF for ACO
HPF Average
(ms)
Minimum
(ms)
Maximum
(ms)
HPF1 2.59 0.04 9.82
HPF2 1.58 0.03 6.18
HPF3 2.64 0.03 9.06
HPF4 2.63 0.04 9.93
HPF5 4.79 0.08 17.15
HPF6 5.19 0.67 19.56
Table 10 RT of each Group of Buildings for FCFS
Group of
Buildings
Average
(ms)
Minimum
(ms)
Maximum
(ms)
G1 52.20 38.82 64.63
G2 51.22 39.97 66.39
G3 52.33 39.90 66.60
G4 52.19 38.67 64.17
G5 54.38 41.24 66.78
G6 54.51 42.28 67.12
Table 11 PT of each HPF for FCFS
HPF Average
(ms)
Minimum
(ms)
Maximum
(ms)
HPF1 2.47 0.04 4.08
HPF2 1.51 0.03 2.70
HPF3 2.50 0.03 4.06
HPF4 2.51 0.04 4.10
HPF5 4.51 0.08 7.25
HPF6 4.78 0.67 7.09
associated with respective MGs, VMs of HPF and DT. The total cost at “Fog4” is the least and
the reason is, number of requests are just above the average for early 18 hours and reduced to
minimum for next 3 hours reached to above average again for next 3 hours.
The scenario is also implemented with cloud computing based system. The cloud has sum
of requests of all HPFs with FCFS and ACO algorithms for allocation of requests to VMs along
with ORTP service broker policy for selection of data center. In the Table 12 RT is increased
compared with ACO and FCFS compared to individual HPFs. However, RT for groups of build-
Fog1 Fog2 Fog3 Fog4 Fog5 Fog6
0
100
200
300
400
500
Cost ($)
VM
MG
Data Transfer
Total
Figure 10. VM, MG, DT and Total Cost for ACO or FCFS
ings in all regions from cloud computing using FCFS lacks from using ACO algorithm. The PT
of cloud computing based system is reduced compared to individual HPFs. Similar, difference
is observed with minimum and maximum RT and PT using ACO and FCFS algorithms in the
table. The delay in RT can affect the cost efficiency of energy consumer. For instance, electricity
price rates are updated in some time at cloud which would be responded with delay to consumer.
The consumer would continue the scheduling with previous pricing which can increase the cost.
Performance of SG is a real-time based system. Implementation for cloud and cloud-fog based
SG validate the performance of HPFs based system with efficient processing and permanent
storage of data on cloud for future use.
Table 12 Scenario 1:Response and Processing Time of cloud
Time Load Balancer Average (ms) Minimum (ms) Maximum (ms)
Response ACO 98.31 69.68 106.62
Processing ACO 1.12 0.06 2.1
Response FCFS 101.34 87.02 112.03
Processing FCFS 1.92 0.10 2.6
5.2 2nd Proposed System Model: Rigid Community (Single Building- Single Fog)
In this system model, extensive simulations are performed for the NSBP and load-balancing al-
gorithm. Three scenarios are implemented to analyze the performance of proposed techniques.
However, in this synopsis results of scenario-1 are discussed. The RT, PT and cost are analyzed
using CDC, ORT and proposed NSBP to route the requests on the potential data center. The
requests in data centers are allocated on VMs using RR, PSO and proposed PSO-SA. The sim-
ulations are performed for 24 hours (a day) using the CloudAnalyst tool. The load and size of
requests from the consumers, number, and size of VMs, hardware and virtual specifications of
fog computing are initialized according to [106].
5.2.1 Scenario 1: 25 VMs and Residential Buildings
In this scenario, three residential buildings from three clusters in three regions are considered.
Each building has 100 SHs which generate requests every hour to process on the fog in the
region. Each cluster is also connected with MGs for uninterrupted and cheap power supply.
The requests are routed on potential data center using ORT. The balanced load of requests is
allocated to VMs using RR, throttled, PSO and proposed PSO-SA. Simulations are performed
with each algorithm separately to analyze the performances of RT, PT, and the cost. Each fog
data center in the region has 25 VMs. The data for users for peak and off-peak hours is taken
from [107]. The simulation results for RT are discussed in the following headings.
RT for Residential Buildings
The buildings generate different number of requests, which are sent to the fog. The request
traffic is routed on the data centers using ORT. ORT reduces the RT and increases the system
performance for end-users (SHs in the buildings). Four scheduling algorithms; RR, throttled,
PSO and PSO-SA are used to allocate load of requests on the VMs in the data centers. Effi-
cient allocation enhances the performance for PT. Therefore, SBP and load-balancing algorithm
enhance the system performance and reduce the computational cost. The fog has limited re-
sources and its performance is compromised due to traffic congestion and load of requests. The
RT is compromised during peak hours when end-users generate huge numbers of requests for
the fogs to process. Every building belongs to a different region and residents of each region
have different power consumption behavior. Hence, each building generates a different number
of requests, which are processed on the fog. The least number of requests are generated by
Building-2 and the most requests are generated by Building-1. In Building-1 and Building-3,
the RR has the highest RT. The proposed PSO-SA has the least RT. Meanwhile, throttled has
higher RT than PSO. In Building-3 during hours 2, 12, 14, 15, 16, 17 and 21, the RT using RR
and throttled are almost same and the number of requests during this time are few. Similarly,
in Building-2, the number of requests is less than Building-1 and Build ing-3. RT using RR is
smaller or equivalent to throttled. Similarly, PSO-SA also performs better with fewer number
of requests. The simulations validate the inefficiency of RR, throttled and PSO with high load
of requests while proposed PSO-SA is the efficient. The PSO-SA has the least average RT and
RR has the highest RT. The PSO has 64.04 ms, throttled has 75.11 ms, RR has 83.00 ms and
PSO-SA has 60.77 ms average RT as given in Table 13.
Table 13 RT in Scenario 1
Algorithm Average RT (ms) Minimum RT (ms) Maximum RT (ms)
RR 83.00 42.78 99.74
Throttled 75.11 40.26 96.53
PSO 64.04 39.53 90.28
PSO-SA 60.77 37.98 290.86
PT of Requests
The RT is affected by network latency and the PT. If the average PT of PSO-SA is efficient
then RR, PSO are throttled; however, PSO-SA is the most efficient as given in Table 14. The
requests from all (three) buildings in respective regions are sent to the fogs for processing. As
discussed earlier, the most requests are generated by Building-1 and Building-3 and sent to
Fog-1 and Fog-3, respectively. In Fog-2 there is a lesser number of requests as compared to
Fog-1 and Fog-2 to process. The PT of PSO is more compromising than PSO-SA in Fog-
2. These hourly performances for PT in Fog-2 show that proposed PSO-SA is most efficient.
The performance of RR is compromised when sizes and number of requests are big. Because,
partially executed requests sit in wait for their next turn. However, PSO-SA performs efficiently
for any number of requests due to efficient local and global solutions.
Table 14 PT in Scenario-1
Algorithm Average PT (ms) Minimum PT (ms) Maximum PT (ms)
RR 2.37 0.21 3.99
Throttled 2.49 0.25 4.47
PSO 2.91 0.26 4.96
PSO-SA 1.14 0.17 2.30
References
[1] Aslam, S., Javaid, N., Khan, F.A., Alamri, A., Almogren, A. and Abdul, W., 2018. “Towards
Efficient Energy Management and Power Trading in a Residential Area via Integrating a
Grid-Connected Microgrid.” Sustainability, 10(4), p.1245.
[2] Evangelisti, S., P. Lettieri, R. Clift, and Domenico Borello. “Distributed generation by en-
ergy from waste technology: a life cycle perspective.” Process Safety and Environmental
Protection 93 (2015): 161-172.
[3] Missaoui, R., Joumaa, H., Ploix, S. and Bacha, S., 2014. Managing energy smart homes
according to energy prices: analysis of a building energy management system. Energy and
Buildings, 71, pp.155-167.
[4] Framework, N. I. S. T. (2012) Roadmap for smart grid interoper-
ability standards. National Institute of Standards and Technology. htt ps :
//www.nist.gov/sites/d e f ault/f il es/documents/smartgrid/N IST _Framework_Rel ease_2
0_corr.pd f .[Accessed on 1st Dec.2017].
[5] Reka, S. Sofana, and Tomislav Dragicevic. "Future effectual role of energy delivery: A
comprehensive review of Internet of Things and smart grid." Renewable and Sustainable
Energy Reviews 91 (2018): 90-108.
[6] Paul Chefurka, “http://www.paulchefurka.ca/EnergyGap.html”, (last visited 19th November
2018).
[7] Pilloni, Virginia, Alessandro Floris, Alessio Meloni, and Luigi Atzori. "Smart home energy
management including renewable sources: A QoE-driven approach." IEEE Transactions on
Smart Grid 9, no. 3 (2018): 2006-2018.
[8] Moon, Seokjae, and Jang-Won Lee. "Multi-residential demand response scheduling with
multi-class appliances in smart grid." IEEE transactions on smart grid 9, no. 4 (2018): 2518-
2528.
[9] Lund, Henrik. "Renewable heating strategies and their consequences for storage and grid
infrastructures comparing a smart grid to a smart energy systems approach." Energy 151
(2018): 94-102.
[10] Khalid, Adia, Nadeem Javaid, Mohsen Guizani, Musaed Alhussein, Khursheed Au-
rangzeb, and Manzoor Ilahi. "Towards dynamic coordination among home appliances using
multi-objective energy optimization for demand side management in smart buildings." IEEE
Access 6 (2018): 19509-19529.
[11] Ma, Zheng, Joy Dalmacio Billanes, and Bo Nørregaard Jørgensen. "Aggregation Potentials
for Buildings—Business Models of Demand Response and Virtual Power Plants." Energies
10, no. 10 (2017): 1646.
[12] Ma, Zheng, Henrik Tønder Aabjerg Friis, Christopher Gravers Mostrup, and Bo Nørre-
gaard Jørgensen. "Energy flexibility potential of industrial processes in the regulating power
market." In 6th International Conference on Smart Cities and Green ICT SystemsInterna-
tional Conference on Smart Cities and Green ICT Systems, pp. 109-115. SCITEPRESS
Digital Library, 2017.
[13] Hassan, Naveed Ul, Yawar I. Khalid, Chau Yuen, and Wayes Tushar. “Customer engage-
ment plans for peak load reduction in residential smart grids.” IEEE Transactions on Smart
Grid 6, no. 6 (2015): 3029-3041.
[14] Hassan, Naveed Ul, Yawar Ismail Khalid, Chau Yuen, Shisheng Huang, Muhammad Adeel
Pasha, Kristin L. Wood, and See Gim Kerk. “Framework for minimum user participation
rate determination to achieve specific demand response management objectives in residen-
tial smart grids.” International Journal of Electrical Power & Energy Systems 74 (2016):
91-103.
[15] Baronti, Federico, Sergio Vazquez, and Mo-Yuen Chow. "Modeling, Control, and Integra-
tion of Energy Storage Systems in E-Transportation and Smart Grid." IEEE T