A hybrid firefly algorithm with particle swarm optimization for energy efficient optimal cluster head selection in wireless sensor networks


Wireless Sensor Networks (WSN) are operated on battery source, and the sensor nodes are used for collecting the information from the environment and transmitting the same to the base station. The sensor nodes consume more energy for the process of data communication and also affect the network lifetime. Energy efficiency is one of the important features for designing the sensor networks. Clustering technique is mainly used to perform the energy-efficient data transmission that consumes the minimum energy and also prolongs the lifetime of the network. In this paper, a Hybrid approach of Firefly Algorithm with Particle Swarm Optimization (HFAPSO) is proposed for finding the optimal cluster head selection in the LEACH-C algorithm. The hybrid algorithm improves the global search behavior of fireflies by using PSO and achieves optimal positioning of the cluster heads. The performance of the proposed methodology is evaluated by using the number of alive nodes, residual energy and throughput. The results show the improvement in network lifetime, thus increasing the alive nodes and reducing the energy utilization. While making a comparison with the firefly algorithm, it has been found that the proposed methodology has achieved better throughput and residual energy.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15


  1. 1.

    Ahmed AA, Maheswari D (2017) Churn prediction on huge telecom data using hybrid firefly based classification. Egypt Inf J 18(3):215–220. https://doi.org/10.1016/j.eij.2017.02.002

    Article  Google Scholar 

  2. 2.

    Akyildiz IF, Su W, Sankarasubramaniam Y, Cayirci E (2002) A survey on sensor networks. IEEE Commun Mag 40(8):102–114. https://doi.org/10.1109/MCOM.2002.1024422

    Article  Google Scholar 

  3. 3.

    Albath J, Thakur M, Madria S (2013) Energy constraint clustering algorithms for wireless sensor networks. AdHoc Netw 11(8):2512–2525. https://doi.org/10.1016/j.adhoc.2013.05.016

    Article  Google Scholar 

  4. 4.

    Bagci H, Yazici A (2013) An energy aware fuzzy approach to unequal clustering in wireless sensor networks. Appl Soft Comput 13(4):1741–1749. https://doi.org/10.1016/j.asoc.2012.12.029

    Article  Google Scholar 

  5. 5.

    Gupta GP, Jha S (2018) Integrated clustering and routing protocol for wireless sensor networks using Cuckoo and Harmony Search based metaheuristic techniques. Eng Appl Artif Intell 68:101–109. https://doi.org/10.1016/j.engappai.2017.11.003

    Article  Google Scholar 

  6. 6.

    Heinzelman WB, Chandrakasan AP, Balakrishnan H (2002) An application-specific protocol architecture for wireless micro sensor networks. IEEE Trans Wirel Commun 1(4):660–670. https://doi.org/10.1109/TWC.2002.804190

    Article  Google Scholar 

  7. 7.

    Iyengar SS, Wu HC, Balakrishnan N, Chang SY (2007) Biologically inspired cooperative routing for wireless mobile sensor networks. IEEE Syst J 1(1):29–37. https://doi.org/10.1109/JSYST.2007.903101

    Article  Google Scholar 

  8. 8.

    Jin Y, Wang L, Kim Y, Yang X (2008) EEMC: an energy-efficient multi-level clustering algorithm for large-scale wireless sensor networks. Comput Netw 52(3):542–562. https://doi.org/10.1016/j.comnet.2007.10.005

    Article  MATH  Google Scholar 

  9. 9.

    Kennedy J, Eberhart R (1995) Particle swarm optimization. In: Proceedings of ICNN’95-international conference on neural networks, vol 4. IEEE, pp 1942–1948. https://doi.org/10.1109/ICNN.1995.488968

  10. 10.

    Kora P, Krishna KSR (2016) Hybrid firefly and Particle Swarm Optimization algorithm for the detection of Bundle Branch Block. International Journal of Cardiovascular Academy 2(1):44–48. https://doi.org/10.1016/j.ijcac.2015.12.001

    Article  Google Scholar 

  11. 11.

    Kuila P, Jana PK (2014) Energy efficient clustering and routing algorithms for wireless sensor networks: particle swarm optimization approach. Eng Appl Artif Intell 33:127–140. https://doi.org/10.1016/j.engappai.2014.04.009

    Article  Google Scholar 

  12. 12.

    Kulkarni RV, Venayagamoorthy GK (2010) Bio-inspired Algorithms for Autonomous deployment and Localization of Sensor Nodes. IEEE Transactions on Systems, Man and Cybernetics Part C (Applications and Reviews) 40(6):663-675. https://doi.org/10.1109/TSMCC.2010.2049649

  13. 13.

    Li H, Liu Y, Chen W, Jia W, Li B, Xiong J (2013) COCA: constructing optimal clustering architecture to maximize sensor network lifetime. Comput Commun 36(3):256–268. https://doi.org/10.1016/j.comcom.2012.10.006

    Article  Google Scholar 

  14. 14.

    Liu T, Li Q, Liang P (2012) An energy-balancing clustering approach for gradient-based routing in wireless sensor networks. Comput Commun 35(17):2150–2161. https://doi.org/10.1016/j.comcom.2012.06.013

    Article  Google Scholar 

  15. 15.

    Mann PS, Singh S (2018) Optimal Node Clustering and Scheduling in Wireless Sensor Networks. Wireless Pers Commun 100(3):683–708. https://doi.org/10.1007/s11277-018-5341-1

    Article  Google Scholar 

  16. 16.

    Mann PS, Singh S (2017) Artificial bee colony metaheuristic for energy-efficient clustering and routing in wireless sensor networks. Soft Comput 21(22):6699–6712. https://doi.org/10.1007/s00500-016-2220-0

    Article  Google Scholar 

  17. 17.

    Meisel M, Pappas V, Zhang L (2010) A taxonomy of biologically inspired research in computer networking. Comput Netw 54(6):901–916. https://doi.org/10.1016/j.comnet.2009.08.022

    Article  MATH  Google Scholar 

  18. 18.

    Panag TS, Dhillon JS (2018) Dual head static clustering algorithm for wireless sensor networks. AEU Int J Electron Commun 88:148–156. https://doi.org/10.1016/j.aeue.2018.03.019

    Article  Google Scholar 

  19. 19.

    Rao PCS, Jana PK, Banka H (2017) A particle swarm optimization based energy efficient cluster head selection algorithm for wireless sensor networks. Wirel Netw 23(7):2005–2020. https://doi.org/10.1007/s11276-016-1270-7

    Article  Google Scholar 

  20. 20.

    Sabar NR, Turky A, Song A (2016) A multi-memory multi-population memetic algorithm for dynamic shortest path routing in mobile ad-hoc networks. In: Booth R, Zhang ML (eds) Proceedings of the PRICAI 2016: trends in artificial intelligence PRICAI 2016. Lecture notes in computer science, vol 9810. Springer, Cham. https://doi.org/10.1007/978-3-319-42911-3_34

  21. 21.

    Shankar T, Shanmugavel S, Rajesh A (2016) Hybrid HSA and PSO algorithm for energy efficient cluster head selection algorithm in wireless sensor networks. Swarm Evolut Comput 30:1–10. https://doi.org/10.1016/j.swevo.2016.03.003

    Article  Google Scholar 

  22. 22.

    Selvakennedy S, Sinnappan S, Shang Y (2007) A biologically-inspired clustering protocol for wireless sensor networks. Comput Commun 30(14–15):2786–2801. https://doi.org/10.1016/j.comcom.2007.05.010

    Article  Google Scholar 

  23. 23.

    SrideviPonmalar P, Kumar VJS, Harikrishnan R (2017) Hybrid firefly variants algorithm for localization optimization in WSN. Int J Comput Intell Syst 10(1):1263–1271. https://doi.org/10.2991/ijcis.10.1.85

    Article  Google Scholar 

  24. 24.

    Turky A, Sabar NR, Song A (2016) A multi-population memetic algorithm for dynamic shortest path routing in mobile ad-hoc networks. In: 2016 IEEE congress on evolutionary computation (CEC). IEEE, pp 4119–4126. https://doi.org/10.1109/cec.2016.7744313

  25. 25.

    Velmani R, Kaarthick B (2014) An efficient cluster-tree based data collection scheme for large mobile wireless sensor networks. IEEE Sens J 15(4):2377–2390. https://doi.org/10.1109/JSEN.2014.2377200

    Article  Google Scholar 

  26. 26.

    Wang S, Yu J, Atiquzzaman M, Chen H, Ni L (2018) CRPD: a novel clustering routing protocol for dynamic wireless sensor networks. Pers Ubiquit Comput 22(3):545–559. https://doi.org/10.1007/s00779-018-1117-6

    Article  Google Scholar 

  27. 27.

    Yang S, Cheng H, Wang F (2009) Genetic algorithms with immigrants and memory schemes for dynamic shortest path routing problems in mobile adhoc networks. IEEE Trans Syst Man Cybern Part C (Appl Rev) 40(1):52–63. https://doi.org/10.1109/TSMCC.2009.2023676

    Article  Google Scholar 

  28. 28.

    Yang S, Yao X (2008) Population-based incremental learning with associative memory for dynamic environments. IEEE Trans Evol Comput 12(5):542–561. https://doi.org/10.1109/TEVC.2007.913070

    Article  Google Scholar 

  29. 29.

    Yang XS (2010) Firefly algorithm, stochastic test functions and design optimisation. Int J Bio-Inspired Comput 2(2):78–84. https://doi.org/10.1504/IJBIC.2010.032124

    Article  Google Scholar 

  30. 30.

    Yang XS, Hosseini SSS, Gandomi AH (2012) Firefly algorithm for solving non convex economic dispatch problems with valve loading effect. Appl Soft Comput 12(3):1180–1186. https://doi.org/10.1016/j.asoc.2011.09.017

    Article  Google Scholar 

  31. 31.

    Yang XS, He X (2013) Firefly Algorithm: recent Advances and Applications. Int J Swarm Intell 1(1):36–50. https://doi.org/10.1504/IJSI.2013.055801

    Article  Google Scholar 

  32. 32.

    Zeng B, Dong Y (2016) An improved harmony search based energy-efficient routing algorithm for wireless sensor networks. Appl Soft Comput 41:135–147. https://doi.org/10.1016/j.asoc.2015.12.028

    Article  Google Scholar 

  33. 33.

    Zhang P, Xiao G, Tan HP (2013) Clustering algorithms for maximizing the lifetime of wireless sensor networks with energy-harvesting sensors. Comput Netw 57(14):2689–2704. https://doi.org/10.1016/j.comnet.2013.06.003

    Article  Google Scholar 

Download references


The authors would like to thank Kalasalingam Academy of Research and Education for supporting this work.


Our institution provides partial support for funding to develop our work.

Author information



Corresponding author

Correspondence to G. Murugaboopathi.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Ethical approval

This article does not contain any studies with human participants or animals performed by any of the authors.

Informed consent

Informed consent was obtained from all individual participants included in the study.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Pitchaimanickam, B., Murugaboopathi, G. A hybrid firefly algorithm with particle swarm optimization for energy efficient optimal cluster head selection in wireless sensor networks. Neural Comput & Applic 32, 7709–7723 (2020). https://doi.org/10.1007/s00521-019-04441-0

Download citation


  • Wireless Sensor Networks
  • LEACH-C Algorithm
  • Firefly Algorithm (FA)
  • Particle Swarm Optimization (PSO)
  • Network lifetime
  • Energy consumption