Energy Optimization for Smart Cities Using IoT

ABSTRACT When it comes to smart cities, one of the biggest issues is energy optimization. This is because these cities employ a large number of interconnected devices to autonomously manage city operations, which consumes a lot of energy. This difficulty has been addressed in this paper by using the advantages of contemporary cutting-edge technologies such as the Internet of Things (IoT), 5 G, and cloud computing for energy efficiency in smart cities. With the use of these cutting-edge technologies, we have proposed a model that can be used to optimize energy consumption in smart homes and smart cities alike. Street lighting, building and street billboards, smart homes, and smart parking are among the four essential features of smart cities that would benefit from the proposed model’s energy savings. All smart city electric appliances will be equipped with IoT sensors that will detect movements and react to commands. In order to transport data swiftly between communication channels and the cloud, 5 G technology will be deployed, and the cloud technology will be used to store and retrieve data effectively. The suggested model was evaluated using mathematical modeling, and the findings indicate that the proposed model may assist in improving energy usage in smart cities.


Introduction
The devices in a smart home are interconnected with each other to form a network that is centrally controlled and monitored. One home automation system can manage all the appliances available in a smart home. This automation system is controlled through a smart device by the homeowner as per choice. All this automation is due to IoT technology that interconnects these various devices and provides help in data collection and sharing (Alaa et al. 2017;Marikyan, Papagiannidis, and Alamanos 2019;Li et al. 2018). A smart city is an evolution of a smart home that is an effort toward the automation of the whole city. It aims to improve citizens' life by optimizing city activities and increasing economic growth. Various kinds of hardware and software are employed in these smart cities along with IoT for providing interconnectivity between the overall cities. However, IoT is the most important of them (Hamid et al. 2019;Kirimtat et al. 2020;Rathore, Ahmad, and Paul 2016). IoT-based sensors are small intelligent computing devices that interact with each other and collect data, this collected data is stored on the cloud for decision making. The data gathered through these devices help the public and private sector of the city improve their working by overcoming existing shortcomings and providing better facilities of life to the smart city residents.
To handle the ever-increasing difficulties, the smart city needs real-time data. The processed and interpreted data enable for more efficient use of resources (energy, temperature, etc.). Installing IoT devices is therefore critical for efficient environmental management systems as these devices have self-learning capabilities. These IoT devices are designed to make routine chores simpler and more efficient, while also alleviating pain points associated with public safety, transportation congestion, and environmental concerns. Smart utility meters, smart grids, smart air quality monitors, and smart waste management systems are just a few of the common applications for IoT devices in smart cities (Ullah et al. 2021;Shahid et al. 2021;Zhang et al. 2020).
Smart cities use the latest technologies for improving economic growth and quality of life. This is usually accomplished in four different phases. These phases include gathering real-time data, analyzing the data to gain insights into municipal operations, communicating the studied results to decision-makers, and taking measures to enhance city operations. The trend of urbanization is increasing rapidly. It is estimated that it will increase up to 66% by 2050, which means more than 2.5 billion people in the next 2 decades (Kumar, Kumar Banga, and Kaur 2020;Al Mojamed 2022). Key features of the smart city are mentioned in Figure 1, these features are discussed in various studies including (Basiri, Zeynali Azim, and Farrokhi 2017;Caragliu et al. 2019;Eremia, Toma, and Sanduleac 2017;Khan et al. 2020;Lombardi et al. 2012;Lynggaard and Skouby 2015) To successfully manage this high expansion, there is a need to start new projects that may use the latest technologies for managing the assets of smart cities for satisfying the needs of a rapidly increasing population of smart cities. With all of the advantages that smart cities provide, there are also obstacles to solve, such as overcrowding, climate change, environmental quality, and energy resource optimization. Optimal energy usage, resource management, and active energy efficiency are all aspects of energy optimization, one of the key challenges faced by smart cities (Eckhoff et al. 2017;Jeong et al. Park 2019;Trencher and Gregory 2019).

Contribution of the Paper
A smart city is a fully interconnected city with a lot of energy-consuming devices internally and externally. In such a case, energy optimization is inevitable for the effective usage of energy resources. Although smart cities are equipped with smart and energy-efficient products still there is further space for improvement (Mahmood et al. 2021;Khalil et al. 2021). To address energy optimization in smart cities, this research article proposes a green energy system model that will address energy optimization at both the smart home and smart city levels. The proposed model will save energy in four key dimensions of smart cities including street lights, buildings and street billboards, smart homes, and smart parking. The proposed model is evaluated mathematically and findings indicate that the proposed model helps in improving the energy efficiency of smart cities.

Organization of Paper
The remaining organization of the paper is given in Figure 2. Section two of the paper will give us an overview of the existing research work for energy optimization in smart cities and identify the research gaps. Section three will provide a proposed model of our study. Section four will evaluate the proposed model using mathematical modeling, Section five will discuss the findings of the study along with practical implications of the study. The last section provides the conclusion of our paper along with insights into future work.

Literature Review
In this section, we'll look at several current research studies that use IoT to enhance energy efficiency in smart cities.
According to Mary et al., one of the energy-consumable sources is Street Lighting (SL) which is necessary for everyday living. Traditional street lighting systems (SLS) need a human operation and waste significant energy since they are left on from dusk until early morning. Furthermore, traditional manual SLS waste a lot of energy, need human operators, and have a high installation cost, which has been a major drawback and source of worry. This article proposes a strategy for lowering overall consumption expenses by up to 42% through regular maintenance. While people or cars are surrounding the post when it is dark, the suggested solution employs an energy-efficient system that controls the SL by automatically switching through intelligent on/off mechanisms, targeted progressive darkening, and a structured style of power usage, as a result, energy expenditures may be lowered by up to 35%. The smart SLS is extremely adaptable, and it is made up of a variety of sensors and a controller that works together to create an intelligent SLS. Therefore, it solves the drawbacks of traditional SLS (Mary et al. 2018). Abbas et al., give a quick overview of energy management and challenges in smart cities before laying up a coherent structure for energy sustainability in IoT-based smart cities. This paper used a deep learning technique for improving energy efficiency in smart cities by using IoT-based sensors. A data set entitled combined cycle power plant with 47840 data instances is utilized in the training and testing of deep learning estimation of electrical energy production, such that each instance comprises various and diverse features. As a result, the approach is examined and compared against state-of-the-art procedures in the same field. When compared to prior research, the suggested technique has the greatest accuracy rate of 98.6%. The suggested scheme's prediction efficiency is confirmed by simulation data (Abbas et al. 2020).
Sundhari et al., have suggested Hybridized IoT-assisted hierarchical computation strategic making approach and a Dynamic stochastic optimization technique for optimizing the energy of wireless sensor networks (WSN) to better monitor and track the smart city. The Cluster head selection node and the K-means algorithm were used to enhance the network lifetime and energy efficiency. By integrating diverse elements under a unified framework, the suggested approaches reduce maintenance costs, reduce energy consumption, lower environmental effects, and make energy management easier and more efficient than existing alternatives (Sundhari et al. 2020).
Carli et al., provide a multi-objective optimization technique for improving the building stock's energy efficiency, maintenance, and comfort integrated and holistic while efficiently allocating the available money to the structures. In a smart city, the created algorithm generates a set of optimal energy plans for public buildings. The case study is based on an existing portfolio of public buildings in the area of Bari, Italy. The findings of the application show that the developed algorithm provides an effective support tool for the administration of a smart city in terms of improving the energy efficiency of public buildings (Carli et al. 2015).
The Traffic Adaptive Control (TAC) method was proposed by Shahzad et al., for an energy-efficient intelligent SLS. This approach optimizes energy consumption for smart SL and may also be used to build a smart grid-based system architecture that uses the least amount of electricity. The author discusses the ZigBee mesh WSNs, which enable high adaptive traffic control with minimum energy consumption. TAC employs both wireless and wired technologies for electrical control and Smart SLS (Shahzad et al. 2016).
According to Prasad and Ruchika, SL is a crucial component in guaranteeing city safety and establishing a sense of security in residents' minds. However, the related expense is extremely considerable, and the local governments pay it. Recent advancements in lighting devices have resulted in a paradigm change in the sorts of devices utilized, resulting in minor energy savings but significant waste. Smart SL is a cost-effective solution for urban lighting that combines advanced wireless communication technology, low-e2037255-2414 cost LED lights, and additional sensors to manage light intensity. Compared to the traditional ON-OFF switching approach, this innovative technology saves a lot of money and energy. This article offers a case study of an SLS in Nagpur Smart City, where one of the objectives was to minimize carbon emissions by lowering energy usage. This was accomplished by replacing 320 out-of-date SL and adding 63 LED lights to a motion-detecting smart LS. The Nagpur smart city's installed intelligent SLS has cut energy usage by 55% per month while maintaining illumination standards for pedestrians and vehicles (Prasad and Ruchika 2020). Table 1. provides the comparison of existing studies to provide an overview of the state-of-the-art.
The preceding discussion demonstrates that energy optimization is a problem in smart cities. While there are studies that address the issue of energy efficiency in smart cities, the solutions provided are focused on a specific domain of a smart city, such as SL, power plants, or home appliances. There is a need for a comprehensive energy optimization solution in smart cities that can handle energy savings across the board, including power plants, SL, billboards, and smart home appliances, among other things.

Proposed Approach
This part will present a green energy model for smart homes and smart cities to address energy issues. The proposed model is depicted in Figure 3, and the key aspects of the model are discussed below.
According to the proposed model, SL and billboards consume a huge amount of energy. There are two sorts of controllers in our proposed model for dealing with SL and billboards. A smart schedule is a conventional method of regulating SL and billboards that automatically turn them on and off from dusk until early morning. Another component of the proposed model is realtime control, which reduces energy consumption by turning on SL and billboards when human or vehicle movement is detected. This real-time controller is an IoT-based controller that is linked to SL, signboards, and smart parking. It gathers data from connected devices and sends it through a 5 G communication channel to the cloud platform. If there is a problem with the electrical devices, control management receives a signal from the cloud via a communication channel and takes appropriate action.
The proposed model's second essential aspect is internal energy optimization; smart homes employ a lot of energy-consuming gadgets. The proposed model would recommend connecting these household appliances with IoTbased sensors to make them more energy-efficient. These IoT-based sensors can detect motion and use artificial intelligence to make decisions following the supplied instructions. The intelligent IoT sensors will automatically put inactive household appliances into sleep mode, which will save energy. In the event of a problem with a home appliance, a notification will be sent to the user's dashboard through the cloud via a communication source. Through a communication source, the smart home/smart building will also transfer data to the cloud.
The proposed model saves energy by combining IoT, cloud computing, and 5 G technologies. IoT sensors will be installed in all smart city electric appliances (SL, billboards, smart parking, and smart household appliances) to detect motion or respond to commands. The 5 G technology will be used to transmit data quickly between communication channels and the cloud. The cloud will be utilized to store and retrieve data efficiently. The communication source is a hub between control management, real-time control, smart schedule, smart home, and cloud. The troubleshooting process in case of any malfunctioning is presented in Figure 4 The complete working of the proposed model is shown in the algorithm of the proposed model. The proposed model manages the smart city's energy at four levels: smart home, smart parking, SL, and street, and building billboards. All the SL, billboards, home appliances, and parking areas are equipped with intelligent motion detection sensors. These sensors sense human and vehicle movement and switch on accordingly. Home appliances are also motion detectors such as sensors for turning airconditioners (AC), lights, etc. They are intelligent sensors that react as per direction, e.g. switching ON AC before the person's arrival to maintain the room temperature.

Mathematical Modeling and Evaluation
The proposed model aims to optimize energy by reducing energy consumption using motion detection sensors attached to the smart devices available in smart cities. The objective function in our case will be to reduce energy consumption through energy optimization. Let's consider that smart city devices are divided into four clusters C 1 ; C 2 ; C 3 ; C 4 where C 1 is the first cluster that has all the SL working in a smart city named as S i then cluster one will be in an optimized situation if Equation (1) is satisfied In the same way C 2 is the second cluster that has all the billboards working on the road of smart city and mounted on the buildings named as B i andb j respectively then cluster two will be in an optimized situation if Equation (2) is satisfied

e2037255-2418
C 3 is the third cluster of smart cities that have all the smart parking appliances named as P i , cluster three will be in an optimized situation if Equation (3) is satisfied The smart home is an important factor of smart city that is equipped with several smart home appliances named as � h 1 ; � h 2 ; � h 3 ; . . . . . . � h n . Our fourth cluster C 4 include all the smart home appliances working in a smart home, cluster four will be in an optimized situation if Equation (4) is satisfied To make sure that all four Clusters C 1 ; C 2 ; C 3 ; C 4 are having relevant data of appliances, we will calculate the entropy of all these clusters E C i ð Þ as shown in Equations (5-8). Let normal sensor nodes be represented as n d and the motion detection sensor nodes be represented as m d then  connectivity ((B 1 , B 2 , . . ..B n with RTC) && (b 1 , b 2 , . . ..b n with RTC)) = yes? Next: Go to step 23 (12) Check Smart-parking-functioning() (13) If(P 1 , p 2 , . . ..,P n = true) then Go to step 17 (14) Check connectivity (P 1 , p 2 , . . ..,P n with PS) = yes? Next:Go to step 23 (15) Check connectivity (P 1 , p 2 , . . ..,P n with SM) = yes? Next:Go to step 23 (16) Check connectivity (P 1 , p 2 , . . ..,P n with RTC) = yes? Next:Go to step 23 The aim of Equations (5-8) is to minimize the entropy of clusters C 1 ; C 2 ; C 3 ; C 4 . Once the impurity is removed from the clusters by minimizing entropy. Next, the aim is to optimize the energy-saving in each cluster as mentioned in Equation (9) where EC refers to energy consumption and SC refers to smart city and ε refers to the standard error of estimation. We have used the multiobjective optimization (MOO) method, as energy consumption in our case is the sum of energy consumption in all four clusters. The mathematical equation of energy optimization is given below Where W is the weight associated with the objective function in the range of 0; 1 f g. The energy will be optimized using m d ,n d by applying it in all C 1 ; C 2 ; C 3 ; C 4 and reducing the wastage of energy. Now we prove from Equations (1-4) in the context of our proposed approach Let S 1 ; S 2 ; . . . . . . :S n are SL equipped in a part of smart city, then S 1 \ S 2 \ S 3 . . . ::; \ S n will be 1 if all the SL are functional ("1" signifies IoT device is functional and 0 signify malfunctioning, hence intersection will be 1 only if all devices in a cluster are operating correctly). Suppose that S 2 is not working properly. If we apply the \ operation as S 1 \ S 2 \ S 3 . . . ::; \ S n then answer will be zero as the value of S 2 will make the intersection operation false. Hence Equation (1) models all SL working in a smart city. In the same way, we can prove the situation of B 1 ; B 2 ; B 3 ; . . . . . . :B n and b 1, b 2 ,b 3 ,. . ..b n . This shows that all the billboards equipped on a building or across the roads should be functional. This can be mapped as (B 1 ∩B 2 ∩B 3 ,. . ..B n ) ∩ (b 1 ∩b 2 ∩b 3 . . .. . ..∩b n ). This statement will be only true if all the billboards are functional. In the same way, we can prove Equations (3-4).
As far as the entropy of various clusters C 1 ; C 2 ; C 3 ; C 4 is concerned, it will be minimum, the reasons of minimum entropy are: all the clusters are independent of each other and sensors included in various clusters have different functionality, therefore, they cannot be interleaved. Thus Equation (5-8) is also satisfied. Last but not least, we must demonstrate that the suggested paradigm saves energy; we will do so analytically below.
Definition 1: n d are conventional sensors (sensors that switch on the lights after sunset and thus save energy by keeping it off during sunlight) that save energy by auto-switching on lights from sunset to sunrise.
Definition 2: m d are intelligent motion detection sensors that save energy by sensing human and vehicle movement and switch on accordingly Definition 3: m d and n d together save more energy Let all the small city devices are functioning properly. When n d and m d involve during this operation, the energy is saved as switching off time is increased in the absence of light and motion respectively.
So without sensors total energy consumed is as shown in Equation (10) Where TEC refers to the total energy consumed and EC refers to the energy consumed.
Let n d save energy ck times and m d saves energy c þ 1 ð Þk times where c is a positive coefficient whose value lies between the interval 0; 1 f g and k refers to the amount of energy in watt that is saved. Then the total consumed energy in the case of the proposed approach will be as shown in Equation (11) If we compare Equations (10-11), it is clear that the total energy consumed in the case of Equation (11) is better than Equation (10). Hence proved that the proposed system saves energy by reducing unnecessary energy consumption through IoT sensors.

Discussions of Findings and Practical Implications
The fast transition from rural to urban regions had a significant impact on metropolitan communities, putting pressure on resource usage efficiently. The creation of smart cities is a solution to this problem, as smart cities give better life facilities to their residents. However, efficient utilization of limited resources such as energy is a great challenge in smart cities as a huge number of interconnected devices consume a lot of energy. In such a case, efficient use of limited resources such as energy is a significant problem. There is a need to provide an energy optimization solution in this instance. The existing solutions so far address the energy issue in a particular smart city area, such as; smart lighting systems, smart parking or smart homes, etc. However, to the best of our knowledge, no study provides the energy optimization solution for the smart city as a whole. To do so, we have provided a green energy system model that optimizes energy consumption in smart cities by saving energy using various intelligent and motion-based sensors. Our proposed model saves energy in smart cities at four levels namely: SL, billboards, smart parking, and smart home. The proposed model uses modern cutting-edge technologies for improving smart city energy optimization. These technologies include IoT, 5 G, and Cloud computing. The widespread use of the IoT has enabled Smart City projects and efforts throughout the world. IoT is intended to assist the Smart Municipal idea, which intends to enhance services for city administration and people by employing the most sophisticated communication technology. In our proposed model, IoT sensors detect human or vehicle motion and act accordingly to save energy. 5 G also plays its role by improving bandwidth, reducing latency, improving reliability, 24/7 availability. These 5 G features improve user confidence in using the proposed model as it suggests a 5 G connection for transmitting data from smart devices to the cloud for decision making. The objective of the suggested cloud computing technology is to let smart city managers benefit from the latest technologies without requiring indepth knowledge or experience in each one. Cloud facilitates users by providing them efficient storage capability without the need to maintain it. The administrator retrieves smart city data from the cloud and uses it to make decisions in the event of a problem.
The proposed model is evaluated mathematically, this evaluation guide the researchers and practitioners about saving energy in all four domains of smart cities by minimizing energy waste. The sensors used in all four domains are categorized into different clusters. The impurity in each cluster is minimized by calculating entropy for each cluster. The efficiency and reliability of each cluster can be measured from the performance of smart devices used in that cluster. The energy-saving is achieved through smart IoT-based sensors which sense human or vehicle movement and run accordingly. This research is helpful for the industry in the planning of the smart city. It is also helpful for academia, as it provides a detailed roadmap for energy saving in a smart city.

Conclusion and Future Work
We live in an increasingly urban environment, with cities housing more than half of the world's population. Globally, urbanization is accelerating at a rapid speed. Urban life is typically linked with higher quality education, healthcare, and social services and more possibilities for cultural and political engagement than rural living, especially in smart cities. Urbanization, on the other hand, offers long-term challenges to socio-economic growth and environmental preservation. Energy consumption reduction is a high-priority problem in smart cities. The answer might be found in the adoption of energy-efficient ways by using the latest cutting-edge technologies. To optimize the energy in smart cities, this paper provides a model based on IoT, 5 G, and cloud computing. IoT-enabled sensors are used for saving energy, 5 G provides fast communication between smart energy-consuming devices. The data generated through smart IoT devices is stored in the cloud through a communication channel using 5 G. The working of smart devices is monitored through the application, in case of any problem with smart devices, control management gets the data from the cloud through a communication channel and resolves the issue. The proposed model is evaluated using mathematical modeling and findings indicate that the proposed model is an optimized solution for a smart city.
In the future, we will apply the proposed model in a real-life case study to further strengthen our findings. We are also planning to add other smart city challenges such as security in the proposed model to make it more comprehensive. We will also simulate our proposed mathematical model using programming languages or tools