# An Optimized and Decentralized Energy Provision System for Smart Cities

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Literature Review

#### 2.2. Background Study

#### 2.2.1. Particle Swarm Optimization

_{1}and k

_{2}are acceleration coefficients. Tuning the parameters such as k

_{1}, k

_{2}and $\mathsf{\omega}$ will affect the movement of particles and the exploration and exploitation of the search space. As the swarm keeps track of the best solution in the problem space and searches around them only, the time complexity of performing a search operation is greatly reduced and the probability of finding the global optimum increases, as compared to other deterministic algorithms.

#### 2.2.2. Genetic Algorithm

_{c}).

_{m}) is used to determine the rate of mutation by generating a random number in the range [0, 1] and comparing it with P

_{m}. A gene is mutated only if P

_{m}is greater than the random number generated.

_{r}), which can then be utilized in the process of selection, recombination, and mutation in the next generation for improving the quality of solutions. This is how the evolutionary mechanisms in the genetic algorithm are used to maximize the fitness of the population through each generation.

#### 2.2.3. Blockchain Technology

^{−9}ETH), is used as a fuel to drive the process of adding a block to the public ledger so as to compensate for the computational power spent by the miners to verify and validate the transactions. This is how the consensus mechanism and hence a trustless computation works in blockchain technology.

#### 2.3. Proposed Work

_{m}+ β * E

_{r}+ γ * d

_{b}

_{m}is the average Euclidean distance of a node from all other member nodes in a cluster, i.e., d

_{m}= $\sqrt{{(\mathrm{xi}\text{}-\text{}\mathrm{xj})}^{2}{\text{}+(\mathrm{yi}\text{}-\text{}\mathrm{yj})}^{2}\text{}}$, d

_{b}is the distance from the base station and E

_{r}is the total residual energy of all alive member nodes divided by the residual energy of node in consideration. The residual energy of a node will be maximum if the factor $\left[\mathrm{sum}\text{}\mathrm{of}\text{}\mathrm{residual}\text{}\mathrm{energy}\text{}\mathrm{of}\text{}\mathrm{all}\text{}\mathrm{memner}\text{}\mathrm{nodes}/\mathrm{residual}\text{}\mathrm{energy}\text{}\mathrm{of}\text{}\mathrm{current}\text{}\mathrm{node}\right]$ is minimum. α, β and γ are the constants having values equal to 0.38, 0.38 and 0.18 respectively. So, all the three factors sum-up to the structure of the cost function. The aim is to minimize the cost function that will give the optimal location of the cluster head which has the maximum residual energy and minimum distance from the member nodes and base station. The steps involved in the PSO algorithm are as follows:

- Initialization of a set of particles and their position, velocity, and residual energy;
- Initialization of PSO parameters such as swarm size, number of iterations, inertia weight, personal acceleration, and social acceleration coefficients;
- Calculation of the cost function of each particle;
- Finding the personal best and global best location;
- Updating particles’ position, velocity and energy lost in each iteration;
- Updating the particle with the least value of cost function as the cluster head in every iteration;
- Repeating steps 3 to 6 till all the nodes become dead.

- Initialization of population;
- Calculation of fitness value of each chromosome;
- Selection of best chromosomes as parents for the next generation using the roulette wheel mechanism;
- Crossover of parent chromosomes;
- Mutation of chromosomes;
- Evaluating fitness of each chromosome in the new population;
- Repeating steps 3 to 6 until the shortest path is established.

## 3. Results

- Maximum number of iteration = 30,
- Swarm size = 10,
- Inertia coefficient = 0.9,
- Personal acceleration coefficient = 2,
- Social acceleration coefficient = 2,
- Initial energy of a node = 45 units,
- Location of the base station on the graph = (40, 40).

- Size of population = 75,
- Number of generations = 100,
- Mutation rate = 0.04,
- Crossover rate = 0.78.

## 4. Discussion

_{1}and c

_{2}may result in the termination of the algorithm before finding a good solution and larger values can increase the acceleration, resulting in the abrupt movement of particles over the search space. So, the summation of c

_{1}and c

_{2}should be maintained less than or equal to 4 for the smooth trajectories of particles. Therefore, the parameters in these stochastic algorithms should be set carefully. Even though the genetic algorithm is easy to implement and uses less computational resources, it might not give the best results in the case of complex problems. In the case of PSO, the algorithm is simple, efficient, and robust, however, it is computationally expensive as it consumes a lot of memory, which can limit its usage in high-speed applications. Based on these limitations, future work can be carried out by developing more efficient computational intelligence strategies that can improve data aggregation and transmission and prolong network lifetime in heterogeneous sensor networks.

## 5. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Gungor, V.C.; Sahin, D.; Kocak, T.; Ergüt, S.; Buccella, C. Smart Grid Technologies: Communication Technologies and Standards. IEEE Trans. Ind. Inform.
**2011**, 7, 529–539. [Google Scholar] [CrossRef][Green Version] - Warsi, N.A.; Siddiqui, A.S.; Kirmani, S.; Sarwar, M.D. Impact Assessment of Microgrid in Smart Cities: Indian Perspective. Technol. Econ. Smart Grids Sustain. Energy
**2019**, 4, 1–16. [Google Scholar] [CrossRef][Green Version] - Hirsch, A.; Parag, Y.; Guerrero, J. Microgrids: A review of technologies, key drivers, and outstanding issues. Renew. Sustain. Energy Rev.
**2018**, 90, 402–411. [Google Scholar] [CrossRef] - Rathnayaka, V.M.; Potdar, A.J.D.; Kuruppu, S.J. An innovative approach to manage prosumers in smart grid. In Proceedings of the 2011 World Congress on Sustainable Technologies (WCST), London, UK, 7–10 November 2011. [Google Scholar]
- Sharma, P.; Pandove, G. A Review Article on Wireless Sensor Network in Smart Grid. Int. J. Adv. Res. Comput. Sci.
**2017**, 8, 1–5. [Google Scholar] - Mylrea, M.; Gourisetti, N.G. Blockchain for smart grid resilience: Exchanging distributed energy at speed, scale and security. In Proceedings of the Conference Resilience Week (RWS), Wilmington, DE, USA, 18–22 September 2017. [Google Scholar]
- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. Available online: www.bitcoin.org (accessed on 31 March 2009).
- Brilliantova, V.; Thurner, T.W. Blockchain and the future of energy. Technol. Soc.
**2019**, 57, 38–45. [Google Scholar] [CrossRef] - Yide, L. Wireless Sensor Network Applications in Smart Grid: Recent Trends and Challenges. Int. J. Distrib. Sens. Netw.
**2012**, 8, 492819. [Google Scholar] [CrossRef] - Kumar, J.; Rishiwal, V.; Ansari, M.I. Quality of Service in Wireless Sensor Networks: Imperatives and Challenges. Int. J. Sens. Wirel. Commun. Control
**2019**, 9, 419–431. [Google Scholar] [CrossRef] - Shi, Y. Particle swarm optimization: Developments, applications and resources. In Proceedings of the Congress on Evolutionary Computation, Seoul, South Korea, 27–30 May 2001. [Google Scholar]
- Gouda, O.; Nassif, A.B.; Talib, M.A.; Nasir, Q. A Systematic Literature Review on Metaheuristic Optimization Techniques in WSNs. Int. J. Math. Comput. Simul.
**2020**, 14, 187–192. [Google Scholar] - Manshahia, M.S.; Dave, M.; Singh, S.B. Firefly algorithm based clustering technique for Wireless Sensor Networks. In Proceedings of the International Conference on Wireless Communications, Signal Processing and Networking (WiSPNET), Chennai, India, 23–25 March 2016. [Google Scholar]
- Poonguzhali, P.K.; Ananthamoorthy, N.P. Improved energy efficient WSN using ACO based HSA for optimal cluster head selection. Peer-to-Peer Netw. Appl.
**2020**, 13, 1102–1108. [Google Scholar] [CrossRef] - Kanoosh, H.M.; Houssein, E.H.; Selim, M.M. Salp Swarm Algorithm for Node Localization in Wireless Sensor Networks. J. Comput. Netw. Commun.
**2019**, 4, 1–12. [Google Scholar] [CrossRef][Green Version] - Haldurai, L.; Madhubala, T.; Rajalakshmi, R. A Study on Genetic Algorithm and its Applications. Int. J. Comput. Sci. Eng.
**2016**, 4, 139–143. [Google Scholar] - Fahim, H.; Javaid, N.; Khan, Z.A.; Qasim, U.; Javed, S.; Hayat, A.; Iqbal, Z.; Rehman, G. Bio-inspired Routing in Wireless Sensor Networks. In Proceedings of the 9th International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing, Blumenau, Brazil, 8–10 July 2015. [Google Scholar]
- Majumdar, A.; Sarkar, D. Various types of routing protocols in Wireless Sensor Network with vulnerabilities: A review. In Proceedings of the International Conference and Workshop on Computing and Communication (IEMCON), Vancouver, BC, Canada, 15–17 October 2015. [Google Scholar]
- Radi, M.; Dezfouli, B.; Bakar, K.A.; Lee, M. Multipath Routing in Wireless Sensor Networks: Survey and Research Challenges. Sensors
**2012**, 12, 650–685. [Google Scholar] [CrossRef][Green Version] - Wang, J.; Guan, T.; He, H.; Chen, Y. Research of Improved GA in WSN Mobile Agent Routing Algorithm. In Proceedings of the International Conference on Computational Intelligence and Software Engineering, Wuhan, China, 11–13 December 2009. [Google Scholar]
- Li, J.; Luo, Z.; Xiao, J. A Hybrid Genetic Algorithm with Bidirectional Mutation for Maximizing Lifetime of Heterogeneous Wireless Sensor Networks. IEEE Access
**2020**, 8, 72261–72274. [Google Scholar] [CrossRef] - Tianshu, W.; Gongxuan, Z.; Xichen, Y.; Ahmadreza, V. Genetic algorithm for energy-efficient clustering and routing in wireless sensor networks. J. Syst. Softw.
**2018**, 146, 196–214. [Google Scholar] - Zhang, Y.; Wu, Y.I. Multiple Sources Localization by the WSN using the Direction-of-Arrivals Classified by the Genetic Algorithm. IEEE Access
**2019**, 7, 173626–173635. [Google Scholar] [CrossRef] - Bouzid, S.E.; Seresstou, Y.; Raoof, K.; Omri, M.N.; Mbarki, M.; Dridi, C. MOONGA: Multi-Objective Optimization of Wireless Network Approach Based on Genetic Algorithm. IEEE Access
**2020**, 8, 105793–105814. [Google Scholar] [CrossRef] - Tehrani, K. A smart cyber physical multi-source energy system for an electric vehicle prototype. J. Syst. Archit.
**2020**, 111, 101804. [Google Scholar] [CrossRef] - Ruan, D.; Huang, J. A PSO-Based Uneven Dynamic Clustering Multi-Hop Routing Protocol for Wireless Sensor Networks. Sensors
**2019**, 19, 1835. [Google Scholar] [CrossRef][Green Version] - Singh, B.; Lobiyal, D.K. Energy-Aware Cluster Head Selection Using Particle Swarm Optimization and Analysis of Packet Retransmissions in WSN; Elsevier: Amsterdam, The Netherlands, 2012; Volume 4, pp. 171–176. [Google Scholar]
- Yadav, A.; Kumar, S.; Singh, V. Network Life Time Analysis of WSNs Using Particle Swarm Optimization. Int. Conf. Comput. Intell. Data Sci.
**2018**, 132, 805–815. [Google Scholar] [CrossRef] - Al-Baz, A.; El-Sayed, A. A new algorithm for cluster head selection in LEACH protocol for wireless sensor networks. Int. J. Commun. Syst.
**2018**, 31, 1–13. [Google Scholar] [CrossRef] - Arjunan, S.; Sujatha, P. A survey on unequal clustering protocols in Wireless Sensor Networks. J. King Saud Univ. Comput. Inf. Sci.
**2019**, 31, 304–317. [Google Scholar] [CrossRef] - Li, Z.; Bahramirad, S.; Paaso, A.; Yan, M.; Shahidehpour, M. Blockchain for decentralized transactive energy management system in networked micro grids. Electr. J.
**2019**, 32, 58–72. [Google Scholar] [CrossRef] - Shao, W.; Xu, W.; Xu, Z.; Liu, B.; Zou, H. A Grid Connection Mechanism of Large-scale Distributed Energy Resources based on Blockchain. In Proceedings of the Chinese Control Conference (CCC), Guangzhou, China, 27–30 July 2019. [Google Scholar]
- Zamfirescu, A.; Șuhan, C.; Golovanov, N. Blockchain Technology Application in Improving of Energy Efficiency and Power Quality. In Proceedings of the 54th International Universities Power Engineering Conference (UPEC), Bucharest, Romania, 3–6 September 2019. [Google Scholar]
- Adeyemi, A.; Yan, M.; Shahidehpour, M.; Botero, C.; Guerra, A.V.; Gurung, N.; Zhang, L.; Paaso, A. Blockchain technology applications in power distribution systems. Electr. J.
**2020**, 33, 106817. [Google Scholar] [CrossRef] - Silvestre, M.L.D.; Gallo, P.; Guerrero, J.M.; Musca, R.; Sanseverino, E.R.; Sciumè, G.; Vásquez, J.C.; Zizzo, G. Blockchain for power systems: Current trends and future applications. Renew. Sustain. Energy Rev.
**2020**, 119, 109585. [Google Scholar] [CrossRef] - Jabbarpour, M.R.; Joozdani, M.R.; Farshi, S.S. Blockchain Applications in Power Industry. In Proceedings of the 28th Iranian Conference on Electrical Engineering (ICEE), Tabriz, Iran, 4–6 August 2020. [Google Scholar]
- Teufel, B.; Sentic, A.; Barmet, M. Blockchain energy: Blockchain in future energy systems. J. Electron. Sci. Technol.
**2019**, 17, 100011. [Google Scholar] [CrossRef] - Petri, I.; Barati, M.; Rezgui, Y.; Rana, O.F. Blockchain for energy sharing and trading in distributed prosumer communities. Comput. Ind.
**2020**, 123, 103282. [Google Scholar] [CrossRef] - Kazerani, M.; Tehrani, K. Grid of Hybrid AC/DC Microgrids: A New Paradigm for Smart City of Tomorrow. In Proceedings of the 15th International Conference of System of Systems Engineering (SoSE), Budapest, Hungary, 2–4 June 2020. [Google Scholar]
- Yu, Y.; Guo, Y.; Min, W.; Zeng, F. Trusted Transactions in Micro-Grid Based on Blockchain. Energies
**2019**, 12, 1952. [Google Scholar] [CrossRef][Green Version] - Wang, J.; Wang, Q.; Zhou, N.; Chi, Y. A Novel Electricity Transaction Mode of Microgrids Based on Blockchain and Continuous Double Auction. Energies
**2017**, 10, 1971. [Google Scholar] [CrossRef][Green Version] - Gür, A.O.; Öksüzer, S.; Karaarslan, E. lockchain Based Metering and Billing System Proposal with Privacy Protection for the Electric Network. In Proceedings of the 2019 7th International Istanbul Smart Grids and Cities Congress and Fair (ICSG), Istanbul, Turkey, 25–26 April 2019. [Google Scholar]
- Bhushan, B.; Khamparia, A.; Sagayam, K.M.; Sharma, S.K.; Ahad, M.A.; Debnathh, N.C. Blockchain for smart cities: A review of architectures, integration trends and future research directions. Sustain. Cities Soc.
**2020**, 61, 102360. [Google Scholar] [CrossRef] - Meeuw, A.; Schopfer, S.; Wortmann, F. Experimental bandwidth benchmarking for P2P markets in blockchain managed micro grids. Energy Procedia
**2019**, 159, 370–375. [Google Scholar] [CrossRef] - Ahl, A.; Yarime, M.; Tanaka, K.; Sagaw, D. Review of blockchain-based distributed energy: Implications for institutional development. Renew. Sustain. Energy Rev.
**2019**, 107, 200–211. [Google Scholar] [CrossRef] - Jeon, J.M.; Hong, C.S. A Study on Utilization of Hybrid Blockchain for Energy Sharing in Micro-Grid. In Proceedings of the 20th Asia-Pacific Network Operations and Management Symposium (APNOMS), Matsue, Japan, 18–20 September 2019. [Google Scholar]
- Agung, A.; Agung, G.; Handayani, R. Blockchain for smart grid. J. King Saud Univ. Comput. Inf. Sci.
**2020**. [Google Scholar] [CrossRef] - Tsao, Y.C.; VanThanh, V.; Wu, Q. Sustainable micro grid design considering blockchain technology for real-time price-based demand response programs. Int. J. Electr. Power Energy Syst.
**2021**, 125, 106418. [Google Scholar] [CrossRef] - Danalakshmi, D.; Gopi, R.; Hariharasudan, A.; Otola, I.; Bilan, Y. Reactive Power Optimization and Price Management in Micro grid Enabled with Blockchain. Energies
**2020**, 13, 6179. [Google Scholar]

**Figure 10.**Decrease in total residual energy of alive nodes with the iterations as per the PSO algorithm.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Swain, A.; Salkuti, S.R.; Swain, K. An Optimized and Decentralized Energy Provision System for Smart Cities. *Energies* **2021**, *14*, 1451.
https://doi.org/10.3390/en14051451

**AMA Style**

Swain A, Salkuti SR, Swain K. An Optimized and Decentralized Energy Provision System for Smart Cities. *Energies*. 2021; 14(5):1451.
https://doi.org/10.3390/en14051451

**Chicago/Turabian Style**

Swain, Ayusee, Surender Reddy Salkuti, and Kaliprasanna Swain. 2021. "An Optimized and Decentralized Energy Provision System for Smart Cities" *Energies* 14, no. 5: 1451.
https://doi.org/10.3390/en14051451