Improving Data Aggregation in IoT Sensor Networks Using Self-Organizing Maps and Firefly Optimization Algorithm
Abstract
1. Introduction
2. Related Works
3. Proposed Method
3.1. Firefly Optimization Algorithm
| Algorithm 1. Pseudocode of the Firefly Algorithm |
|
| Algorithm 2. Pseudocode of SOM method |
|
3.2. Data Collection
3.3. Data Pre-Processing
3.4. Distance Calculation
3.5. Cluster Formation with Self-Organizing Maps
- Initialization: SOMs commence with a preliminary weight matrix, wherein each sensor node in the SOM is linked to a weight vector that matches the dimensionality of the input data.
- Input data representation: Each sensor node i is denoted by a feature vector:
- 3.
- Finding the Best Matching Unit (BMU): For each input vector , the SOM determines the BMU, which is defined as the sensor node with the weight vector most analogous to the input vector. Similarity is frequently quantified by the Euclidean distance:
- 4.
- Updating weights: Once the BMU is identified, the weights of the BMU and its adjacent sensor nodes are modified to align more closely with the input vector. The weight update formula is specified as follows:
- 5.
- Iteration: Steps 3 and 4 are reiterated for a predetermined number of iterations or until the weight vectors achieve convergence. Eventually, the sensor nodes will arrange into clusters that reflect the fundamental structure of the input data.
- 6.
- Cluster formation: Following training, sensor nodes with analogous weight vectors are combined into clusters. Each cluster signifies a collection of sensor nodes that exhibit analogous properties derived from the attributes utilized in the input vector.
3.6. Data Aggregation and Energy Consumption
4. Simulation and Results
4.1. Simulation Environment
4.2. Accuracy and Error Comparison of Algorithms
4.3. Residual Energy per Round
4.4. Throughput with Number of Nodes
4.5. Network Lifetime
5. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Alshehri, H.; Bajaber, F. A Cluster-Based Data Aggregation in IoT Sensor Networks Using the Firefly Optimization Algorithm. J. Comput. Netw. Commun. 2024, 2024, 8349653. [Google Scholar] [CrossRef]
- Zhang, L. A Tree-Based Energy-Aware Data Aggregation Method in the Internet of Things Using the Firefly Optimization Algorithm. Multiscale Multidiscip. Model. Exp. Des. 2023, 6, 223–233. [Google Scholar] [CrossRef]
- Mosavvar, I.; Ghaffari, A. Data Aggregation in Wireless Sensor Networks Using Firefly Algorithm. Wirel. Pers. Commun. 2018, 104, 307–324. [Google Scholar] [CrossRef]
- Ullah, I.; Youn, H.Y. A Novel Data Aggregation Scheme Based on Self-Organized Map for WSN. J. Supercomput. 2019, 75, 3975–3996. [Google Scholar] [CrossRef]
- Abdalkafor, A.S.; Aliesawi, S. Applying of (SOM, HAC, and RBF) Algorithms for Data Aggregation in Wireless Sensors Networks. Bull. Electr. Eng. Inform. 2022, 11, 354–363. [Google Scholar] [CrossRef]
- Wang, L.; Yan, Z.; Yan, H.; Liu, J.; Liu, J.; Wang, Y. Load aggregation method for electric vehicle based on som neural network clustering. In Proceedings of the IEEE/IAS Industrial and Commercial Power Systems Asia, Chongqing, China, 7–9 July 2023; pp. 908–912. [Google Scholar]
- George, M.N.; Shelly, S. Energy-Efficient LEACH Approach Employing SOM and K-Means. In Proceedings of the IEEE Recent Advances in Intelligent Computational Systems (RAICS), Kothamangalam, Kerala, India, 16–18 May 2024; pp. 1–6. [Google Scholar]
- Merah, M.; Aliouat, Z.; Kara-Mohamed, C. An energy efficient self organizing map based clustering protocol for iot networks. In Proceedings of the IEEE 9th International Conference on Sciences of Electronics, Technologies of Information and Telecommunications (SETIT), Hammamet, Tunisia, 28–30 May 2022; pp. 197–203. [Google Scholar]
- Panwar, A.; Nanda, S.J. Data Analysis in Wireless Sensor Networks with Distributed Self Organizing Map. In Proceedings of the IEEE 1st International Conference on Advances in Signal Processing, Power, Communication, and Computing (ASPCC), Bhubaneswar, India, 19–21 December 2024; pp. 61–66. [Google Scholar]
- Zhang, X.; Shen, W.; Cui, L. Network Information Security Technology and Application Based on SOM-BP Neural Network. In Proceedings of the 2024 IEEE 13th International Conference on Communication Systems and Network Technologies (CSNT), Jabalpur, India, 6–7 April 2024; pp. 329–333. [Google Scholar]
- Mohammadi, M.; Mobarakeh, M.I. An integrated clustering algorithm based on firefly algorithm and self-organized neural network. Prog. Artif. Intell. 2022, 11, 207–217. [Google Scholar] [CrossRef]
- Zivkovic, M.; Bacanin, N.; Tuba, E.; Strumberger, I.; Bezdan, T.; Tuba, M. Wireless Sensor Networks Life Time Optimization Based on the Improved Firefly Algorithm. In Proceedings of the 2020 International Wireless Communications and Mobile Computing (IWCMC), Limassol, Cyprus, 15–19 June 2020; pp. 1176–1181. [Google Scholar]
- Pakdel, H.; Fotohi, R. A firefly algorithm for power management in wireless sensor networks (WSNs). J. Supercomput. 2021, 77, 9411–9432. [Google Scholar] [CrossRef]
- Hosseinzadeh, M.; Ionescu-Feleaga, L.; Ionescu, B.-Ș.; Sadrishojaei, M.; Kazemian, F.; Rahmani, A.M.; Khan, F. A Hybrid Delay Aware Clustered Routing Approach Using Aquila Optimizer and Firefly Algorithm in Internet of Things. Mathematics 2022, 10, 4331. [Google Scholar] [CrossRef]
- Abdalkafor, A.S.; Aliesawi, S.A. The impact of data aggregation strategy on a performance of wireless sensor networks (WSNs). In Proceedings of the 14th International Conference on Developments in eSystems Engineering (DeSE) IEEE, Sharjah, United Arab Emirates, 7–10 December 2021; pp. 217–222. [Google Scholar]
- Bhushan, S.; Kumar, M.; Kumar, P.; Stephan, T.; Shankar, A.; Liu, P. FAJIT: A fuzzy-based data aggregation technique for energy efficiency in wireless sensor network. Complex Intell. Syst. 2021, 7, 997–1007. [Google Scholar] [CrossRef]
- Sudha, C.; Suresh, D.; Nagesh, A. Accurate data aggregation created by neural network and data classification processed through machine learning in wireless sensor networks. Theor. Comput. Sci. 2022, 925, 25–36. [Google Scholar] [CrossRef]
- Krishnasamy, L.; Dhanaraj, R.K.; Ganesh Gopal, D.; Reddy Gadekallu, T.; Aboudaif, M.K.; Abouel Nasr, E. A Heuristic Angular Clustering Framework for Secured Statistical Data Aggregation in Sensor Networks. Sensors 2020, 20, 4937. [Google Scholar] [CrossRef] [PubMed]
- Surya, S.; Suresh, K. A novel Hybrid technique for solving Data Aggregation problem based on Extended Weighted K-means algorithm and Key Performance Indicators. In Proceedings of the IEEE 2nd Mysore Sub Section International Conference (MysuruCon), Mysuru, India, 16–17 October 2022; pp. 1–8. [Google Scholar]
- Tanushree, M.; Roopa, H.; Vani, V. Hierarchical Cluster Based Data Aggregation with Fault Tolerance to Extend Network Lifetime. In Proceedings of the Second International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 15–17 July 2020; pp. 785–789. [Google Scholar] [CrossRef]
- Roy, N.R.; Chandra, P. EEDAC-WSN: Energy efficient data aggregation in clustered WSN. In Proceedings of the International Conference on Automation, Computational and Technology Management (ICACTM) IEEE, London, UK, 24–26 April 2019; pp. 586–592. [Google Scholar]
- Al-Humidi, N.; Chowdhary, V. Lightweight data transmission scheme based on data aggregation technique in wireless sensor networks. In Proceedings of the International Conference on Communication and Information Processing (ICCIP), Pune, India, 17–18 May 2019. [Google Scholar]
- Sharifi, S.S.; Barati, H. A method for routing and data aggregating in cluster-based wireless sensor networks. Int. J. Commun. Syst. 2021, 34, e4754. [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] [PubMed]
- Wang, J.; Gao, Y.; Liu, W.; Sangaiah, A.K.; Kim, H.-J. An Improved Routing Schema with Special Clustering Using PSO Algorithm for Heterogeneous Wireless Sensor Network. Sensors 2019, 19, 671. [Google Scholar] [CrossRef] [PubMed]
- Manuel, A.J.; Deverajan, G.G.; Patan, R.; Gandomi, A.H. Optimization of Routing-Based Clustering Approaches in Wireless Sensor Network: Review and Open Research Issues. Electronics 2020, 9, 1630. [Google Scholar] [CrossRef]
- Manshahia, M.S.; Dave, M.; Singh, S. 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; pp. 1273–1276. [Google Scholar] [CrossRef]
- Rayenizadeh, M.; Kuchaki Rafsanjani, M.; Borumand Saeid, A. Cluster Head Selection Using Hesitant Fuzzy and Firefly Algorithm in Wireless Sensor Networks. Evol. Syst. 2022, 13, 65–84. [Google Scholar] [CrossRef]
- Battar, S.; Kumar, R. A Hybrid Approach to Increase Network Lifetime in WSN Using PSO and Firefly Optimization. In Proceedings of the IEEE International Conference on Electrical, Computer and Communication Technologies (ICECCT), Coimbatore, India, 20–22 February 2019; pp. 1–7. [Google Scholar] [CrossRef]
- Christian, L.; Camacho, V.; Thomas, S.; Marco, D. Grey Wolf, Firefly and Bat Algorithms: Three Widespread Algorithms that Do Not Contain Any Novelty. In Proceedings of the International Conference on Swarm Intelligence (ANTS), Barcelona, Spain, 26–28 October 2020; pp. 122–133. [Google Scholar] [CrossRef]
- Christian, L.; Camacho, V.; Marco, D.; Thomas, S. Exposing the grey wolf, moth-flame, whale, firefly, bat, and antlion algorithms: Six misleading optimization techniques inspired by bestial metaphors. Int. Trans. Oper. Res. Wiley 2022, 30, 2945–2971. [Google Scholar] [CrossRef]
- Aranha, C.; Villalón, C.L.C.; Campelo, F.; Dorigo, M.; Ruiz, R.; Sevaux, M.; Sörensen, K.; Stützle, T. Metaphor-based metaheuristics, a call for action: The elephant in the room. Swarm Intell. 2022, 16, 1–6. [Google Scholar] [CrossRef]
- Sumedha, S.; Samarth, A. Issues of data aggregation methods in wireless sensor network: A survey. Proc. Comput. Sci. 2015, 49, 194–201. [Google Scholar] [CrossRef]
- Choudhari, R.; Uday, R. Data Aggregation Approaches in WSNs. In Proceedings of the International Conference on Computer Communication and Informatics (ICCCI), Coimbatore, India, 27–29 January 2021; pp. 1–6. [Google Scholar]
- The Intel Berkeley Research Lab Dataset. Available online: https://db.csail.mit.edu/labdata/labdata.html (accessed on 7 July 2025).








| Reference | Key Technology | Characteristics |
|---|---|---|
| [4] 2019 | Self-Organizing Map Data Aggregation (SOMDA) | The SOMDA technique excels in handling datasets with high outlier and duplication tendencies, significantly enhancing data reduction and energy efficiency. Its optimized data aggregation approach effectively extends network longevity, outperforming benchmark schemes on all evaluated metrics. |
| [5] 2022 | RBF | The modified RBF algorithm achieves high classification accuracy, reaching 97.54% during training and 97.70% during testing. These enhancements to the hidden layer structure significantly improve data aggregation performance in WSNs, demonstrating the algorithm’s effectiveness and reliability. |
| [11] 2022 | FA-SOM | The FA-SOM algorithm demonstrates competitive cost function values compared to PSO-ACO-K and K-means algorithms on cancer datasets, showcasing its robustness and adaptability. Its superior ranking in the Friedman test further validates its efficiency and effectiveness across diverse datasets. |
| [12] 2020 | Improved Firefly Algorithm (IFA) | The Improved Firefly Algorithm (IFA) significantly extends network lifetime by delaying the death of the first node to 1170 iterations and increases communication efficiency by successfully transmitting 21,000 packets to the base station. It outperforms both the original Firefly Algorithm and LEACH-PSO in prolonging network longevity and reducing power consumption. |
| [13] 2021 | EM-FIREFLY | The EM-FIREFLY method increases network lifetime by approximately 25% and 35% compared to Algorithm-PSO and optimal clustering methods, respectively. It also efficiently manages power consumption, outperforming other approaches in extending the operational duration of WSNs. |
| [14] 2022 | Hybrid Aquila Optimizer and Firefly Algorithm (HAOFA) | The HAOFA routing model improves energy efficiency in IoT networks by intelligently selecting and evenly distributing cluster head nodes. This strategy significantly reduces power consumption and extends the overall network lifetime. |
| [15] 2021 | SOM | The SOM algorithm significantly reduces the number of transmitted packets in WSNs, effectively lowering traffic load and conserving sensor energy. This data aggregation approach improves overall network performance by enhancing energy efficiency and increasing the accuracy of the collected data. |
| [16] 2021 | FAJIT | The FAJIT algorithm leverages fuzzy logic-based parent node selection and min–max normalization to enhance WSN performance. It achieves about 40% better average aggregation factor than the Distributed Algorithm for Integrated tree Construction and data Aggregation (DICA), with shorter schedule lengths and lower energy consumption during data transmission. |
| [17] 2022 | ACNM | The ACNM algorithm stands out due to its superior performance in reducing the packet dropping ratio, routing overhead, network delay, and testing errors while improving throughput and accuracy. It minimizes computation periods and adapts transmission rates based on node capabilities, resulting in lower latency and more reliable data transmission compared to ELM. |
| [18] 2020 | RSC | The RSC algorithm outperforms fan-shaped clusters by offering better scalability and longer network lifetime, especially in large-scale sensor deployments. It achieves this through improved load balancing and energy efficiency by dividing the deployment area into virtual concentric rings and sectors, applying angular routing to minimize hops and reduce energy consumption. |
| [19] 2022 | K-means | The extended weighted K-means approach is highly effective for healthcare data analysis, as it assigns weights to data points to assess patient criticality and prioritize information while avoiding redundancy. Its performance is validated through key performance indicators (KPIs), demonstrating improved clustering feasibility and accuracy for healthcare applications. |
| [20] 2020 | Hierarchical Clustering | The use of multiple sinks in WSNs reduces energy consumption, increases throughput, and significantly improves the packet delivery ratio (PDR). This approach outperforms traditional single-sink systems by enhancing overall network efficiency, reliability, and scalability through better load distribution and reduced communication bottlenecks. |
| [21] 2019 | Energy Efficient Data Aggregation Scheme (EEDAC) | The EEDAC-WSN algorithm improves WSN stability by 17.67%, with the EEDAC-WSN-Silent variant achieving a 23% increase. This improvement is driven by minimizing intra-cluster communication using metadata frames and enabling direct communication to the base station for nodes close to it, resulting in extended network lifespan and enhanced throughput. |
| [22] 2019 | LDT | The LDT scheme offers a linear time complexity of O(n), performing better than LEACH and EACCC in overall results. Its multipath clustering strategy delivers high scalability, low delay, reduced overhead, low energy consumption, and minimized traffic load, making it well-suited for efficient WSN operations. |
| [23] 2021 | Hierarchical Routing | This method improves packet delivery rate significantly compared to rendezvous-based routing and binary tree-based aggregation. It also reduces energy consumption by 20% relative to rendezvous-based routing and by 28% compared to binary tree-based aggregation, resulting in more efficient and reliable WSN operation. |
| [24] 2019 | PUDCRP | The PUDCRP protocol significantly enhances network lifetime by delaying the first node death and increasing the time at which half the nodes expire. It maintains balanced energy consumption with higher average residual energy and reduces energy consumption per round, leading to overall improved network performance and efficiency. |
| [25] 2019 | EC-PSO | The EC-PSO algorithm enhances energy efficiency and network lifetime by effectively avoiding energy holes and balancing energy consumption through a specialized clustering and protection approach. It outperforms VD-PSO by extending the network lifetime to about 900 rounds before the first node dies, significantly improving overall network performance. |
| Techniques | Strategy | Redundancy | Accuracy | Avg. Energy Consumption |
|---|---|---|---|---|
| DBST | Tree Based | Moderate | Moderate | Less |
| SDRE | Tree Based | Less | High | Less |
| BHCDA | Cluster Based | Moderate | Less | Less |
| REDD | Cluster Based | Less | Moderate | Less |
| EERDAT | Cluster Based | Less | High | Less |
| EEBCDA | Cluster Based | Less | High | Less |
| DEAD | Tree Based | Less | Moderate | Moderate |
| LEACH | Cluster Based | Moderate | Moderate | Less |
| SOM-FOA Proposed Method | Cluster Based | Less | High | Less |
| Absorption coefficient | |
| I | Light intensity |
| Attractiveness | |
| Distance between fireflies | |
| Randomization parameter in the range ∈ [0, 1] | |
| Stochastic variable evenly distributed throughout the range [0, 1] | |
| Energy used for aggregated data | |
| Consumed energy for each bit | |
| Energy used for transmission |
| Parameter | Value |
|---|---|
| Number of nodes | 54 |
| Number of rounds | 2000 |
| Initial node energy | 2 J |
| 5 nj/bit | |
| 10 pJ/bit/m2 | |
| 0.0013 pJ/bit/m4 | |
| 0.2 | |
| 1 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Alshehri, H.S.; Bajaber, F. Improving Data Aggregation in IoT Sensor Networks Using Self-Organizing Maps and Firefly Optimization Algorithm. Sensors 2025, 25, 7107. https://doi.org/10.3390/s25237107
Alshehri HS, Bajaber F. Improving Data Aggregation in IoT Sensor Networks Using Self-Organizing Maps and Firefly Optimization Algorithm. Sensors. 2025; 25(23):7107. https://doi.org/10.3390/s25237107
Chicago/Turabian StyleAlshehri, Hassan Sh., and Fuad Bajaber. 2025. "Improving Data Aggregation in IoT Sensor Networks Using Self-Organizing Maps and Firefly Optimization Algorithm" Sensors 25, no. 23: 7107. https://doi.org/10.3390/s25237107
APA StyleAlshehri, H. S., & Bajaber, F. (2025). Improving Data Aggregation in IoT Sensor Networks Using Self-Organizing Maps and Firefly Optimization Algorithm. Sensors, 25(23), 7107. https://doi.org/10.3390/s25237107

