Received October 5, 2019, accepted October 22, 2019, date of publication October 28, 2019, date of current version November 8, 2019. Digital Object Identifier 10.1109/ACCESS.2019.2949863 Energy Management in Smart Sectors Using Fog Based Environment and Meta-Heuristic Algorithms ZAHOOR ALI KHAN 1 , (Senior Member, IEEE), AYESHA ANJUM BUTT 2 , TURKI ALI ALGHAMDI 3 , AISHA FATIMA 2 , MARIAM AKBAR 2 , MUHAMMAD RAMZAN 4,5 , AND NADEEM JAVAID 2 , (Senior Member, IEEE) 1 Computer Information Science Division, Higher Colleges of Technology, Fujairah 4114, United Arab Emirates 2 Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan 3 Department of Computer Science, College of Computer and Information Systems, Umm Al-Qura University, Makkah 11692, Saudi Arabia 4 Department of Computer Science and IT, University of Sargodha, Sargodha 40100, Pakistan 5 School of Systems and Technology, University of Management and Technology, Lahore 54000, Pakistan Corresponding authors: Zahoor Ali Khan (zkhan1@hct.ac.ae) and Nadeem Javaid (nadeemjavaidqau@gmail.com) ABSTRACT Smart Grid (SG) plays vital role in modern electricity grid. The data is increasing with the drastic increase in number of users. An efficient technology is required to handle this dramatic growth of data. Cloud computing is then used to store the data and to provide numerous services to the consumers. There are various cloud Data Centers (DC), which deal with the requests coming from consumers. However, there is a chance of delay due to the large geographical area between cloud and consumer. So, a concept of fog computing is presented to minimize the delay and to maximize the efficiency. However, the issue of load balancing is raising; as the number of consumers and services provided by fog grow. So, an enhanced mechanism is required to balance the load of fog. In this paper, a three-layered architecture comprising of cloud, fog and consumer layers is proposed. A meta-heuristic algorithm: Improved Particle Swarm Optimization with Levy Walk (IPSOLW) is proposed to balance the load of fog. Consumers send request to the fog servers, which then provide services. Further, cloud is deployed to save the records of all consumers and to provide the services to the consumers, if fog layer is failed. The proposed algorithm is then compared with existing algorithms: genetic algorithm, particle swarm optimization, binary PSO, cuckoo with levy walk and BAT. Further, service broker policies are used for efficient selection of DC. The service broker policies used in this paper are: closest data center, optimize response time, reconfigure dynamically with load and new advance service broker policy. Moreover, response time and processing time are minimized. The IPSOLW has outperformed to its counterpart algorithms with almost 4.89% better results. INDEX TERMS Cloud computing, fog computing, smart grid, smart city, load balancing, server broker policies. I. INTRODUCTION In the modern era, the traditional grid is converted into Smart Grid (SG) by integrating Information with Communi- cation Technology (ICT) with it. Further, Renewable Energy Sources (RESs) are used to reduce the usage of fossil fuels. SG provides the facility of bi-directional communication. Smart meters are used to monitor and manage the household energy consumption of the users, which minimizes the elec- tricity bill [1]. If the users’ demand is more than the generated The associate editor coordinating the review of this manuscript and approving it for publication was Christos Verikoukis. energy, Control Energy Management System (CEMS) is used to provide energy [2]. The sole purpose of CEMS is to minimize the energy consumption and to maximize the revenue. Similarly, the community Photo Voltaic (PV) with non-cooperative Stackelberg game theory is introduced to manage the energy demand of the community consumer [3]. The solutions to fulfill the energy demand of the consumers through RES and CEMS is applicable only at the com- munity level. Owing to the rapid increase of smart cities, smart societies, smart communities and Smart Sectors (SSs), the demand for energy is increased. Therefore, handling the consumer demand and request is also a challenging task. 157254 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ VOLUME 7, 2019