Introduction

The Internet of Things (IoT) is emerging as a transformative technology that integrates various advanced communication paradigms, connects billions of devices, and enables seamless data exchange in various applications1. This evolution has positioned the IoT as a key enabler in multiple domains, including smart cities, intelligent transportation, industrial automation, and digital healthcare2. One of the most impactful areas where IoT is driving innovation is healthcare. Its integration with Wireless Sensor Networks (WSNs) and next-generation networks is revolutionizing remote monitoring, medical diagnostics, and real-time patient care3. Recent advances have facilitated the deployment of wearable medical devices, smart sensors, and cloud-integrated healthcare systems, enabling continuous health monitoring and efficient medical assistance4.

These applications rely primarily on the collection and transmission of real-time health data, enabling medical professionals to provide accurate and efficient healthcare services5. WSNs are a critical component of IoT-enabled healthcare infrastructures, facilitating data collection, aggregation, and secure transmission6. However, large-scale deployment of IoT-based healthcare applications results to a massive influx of sensor-generated data from geographically distributed medical wearables and monitoring devices7. In addition, these smart healthcare devices often integrate with cloud-based platforms and global databases, ensuring continuous access to patient data for real-time monitoring and decision- making8. The different layers of IoT-enabled healthcare systems are illustarted in Fig. 1.

The presence of a diverse network of interconnected devices poses major challenges in terms of scalability, communication efficiency, and energy consumption9. Given the ever-growing volume of health-related data, traditional routing protocols often struggle with efficient data aggregation and transmission, leading to high latency and excessive energy costs10. These limitations significantly impact the performance of IoT-based healthcare applications, particularly critical services such as real-time diagnostics, remote patient monitoring, and emergency medical responses11. For example, in telemedicine and remote therapy, efficient and low-latency communication is essential to ensure seamless interaction between patients, healthcare institutions, and medical experts12.

Several research studies have explored clustering-based techniques to improve the efficiency and accuracy of data aggregation in IoT-based healthcare networks13. A well-structured clustering mechanism ensures scalability and extended network lifespan by organizing large-scale WSNs into smaller, manageable groups based on factors such as SN density and geographic distribution14. This decentralized approach allows optimal resource utilization and energy-efficient communication, making it a preferred strategy for IoT-enabled healthcare applications15.

In clustering-based architectures, a designated SN, known as the Cluster Head (CH), is responsible for coordinating intra-cluster communication and managing data transmission16. Each CH gathers sensor SNs(SNs) data from its respective cluster, processes it, and then forwards the relevant information to the Base Station (BS) or healthcare facility for further analysis17. The selection of CHs plays an essential role in network performance, as it directly affects energy consumption, data transmission efficiency, and overall system reliability18. Therefore, identifying optimal CHs through intelligent selection mechanisms is essential to enhance the effectiveness of IoT-enabled healthcare applications19.

However, efficient communication and data transmission in IoT-based healthcare systems remain a significant challenges due to the large volume of sensor-generated data, energy constraints, and network scalability issues20. Healthcare applications demand low-latency, high-throughput, and energy-efficient communication, especially for real-time diagnostics, remote patient monitoring, and emergency response scenarios21. Traditional routing and clustering approaches in IoT often struggle with high communication overhead, inefficient CH selection, and suboptimal path routing, leading to increased energy consumption and network congestion22. Given the dynamic nature of IoT-based healthcare networks, conventional routing techniques must be optimized to ensure a longer network lifespan, efficient data aggregation, and reliable communication23. Particle Swarm Optimization (PSO) has emerged as one of the most effective metaheuristic techniques for solving optimization problems in WSN due to its simplicity, low computational cost, and fast convergence capabilities. Inspired by the collective behavior of bird flocks and fish schools, PSO efficiently explores the search space using social and cognitive components, making it highly suitable for dynamic and large-scale network environments such as IoT-based healthcare systems. Unlike other techniques, such as Ant Colony Optimization used alone, PSO adapts quickly to changing topologies and exhibits stable performance under varying network loads. Therefore, PSO is employed to optimize routing paths, ensuring minimal delay and energy consumption in real-time data transmission.

In this paper, an improved model for CH selection and path optimization has been proposed for IoT-enabled healthcare applications. The methodology of the proposed model is structured into two key components:

  • CH Selection: An Adaptive Fuzzy Logic (AFL) mechanism has been used to dynamically select CHs based on multiple parameters, including energy levels, SN density, distance from the BS and link stability24. Unlike conventional fuzzy-based approaches, our proposed approach dynamically adjusts its membership functions to optimize energy consumption and minimize communication overhead, thus improving overall network performance.

  • Path Optimization: Once CHs are selected, a hybrid optimization approach is developed that combines PSO and Genetic Algorithm (GA) to determine the most efficient data transmission paths25. The hybrid approach leverages PSO fast convergence capabilities and GA global search ability to enhance routing efficiency, reduce latency, and improve overall data throughput.

The key contributions of this work are as follows:

  • AFL-based mechanism is proposed for dynamic CH selection using parameters such as residual energy, SN density, distance to BS, and link stability.

  • A Hybrid optimization framework is introduced by integrating PSO with GA for energy-efficient routing in IoT-enabled healthcare networks.

  • Extensive MATLAB and Google Colaboratory-based simulations are conducted using real healthcare datasets from Kaggle to assess performance in terms of PDR, delay, throughput, and energy efficiency.

  • The proposed model demonstrates superior performance compared to state-of-the-art methods (ANFIS, GA-PSO, QPSO, ECPF), particularly in scenarios with varying SN densities.

While several recent studies as stated in the subsequent section explores many hybrid optimization techniques such as Fuzzy C-Means(FCM)+PSO+GA26 ,Swarm Intelligence(SI) in Internet of Medical Things(IoMT)27 and SI + Convolutional Neural Networks(CNN)-Long Short-Term Memory(LSTM) Intrusion Detection System(IDS)28 for IoT clustering and routing, these methods often struggle with either slow convergence or local optima entrapment. In contrast, the proposed model uniquely integrates AFL for dynamic CH selection with a PSO-GA hybrid optimization scheme for routing. The AFL ensures context-aware CH selection based on real-time network metrics, while the PSO-GA hybrid balances exploration and exploitation effectively. This dual-stage, lightweight strategy enhances energy efficiency, scalability, and routing stability in healthcare IoT networks, distinguishing it from prior approaches.

The remainder of the paper is organized as follows. Section 2 presents a review of related work in IoT-enabled healthcare systems. Section 3 describes the problem statement. Section 4 discusses the methodology and the details of implementation. Section 5 provides performance evaluations and comparisons with existing techniques. Finally, Section 6 concludes the paper and outlines future research directions.

Fig. 1
figure 1

Structured model for IoT-enabled healthcare systems.

Related works

Sikarwar et al.27 addressed critical challenges in the energy efficiency and connectivity of WSNs within IoT-based healthcare systems by integrating fuzzy clustering with optimization algorithms. Recognizing the limitations of traditional clustering methods, which often result in suboptimal sensor topologies and increased energy consumption, the authors proposed a hybrid approach combining Fuzzy C-Means (FCM) clustering with PSO and GA.The methodology commenced with the application of the FCM algorithm to assign SNs to clusters based on membership degrees, for better accommodation of SN uncertainties. However, FCM’s sensitivity to initial cluster centers and its propensity to converge to local minima necessitated the integration of optimization algorithms. To enhance clustering performance, PSO and GA were employed iteratively to optimize the initial positions of the cluster centers. PSO, inspired by the social behavior of flocking birds, facilitated rapid convergence by adjusting particle velocities and positions based on individual and collective experiences. Concurrently, GA, with its mechanisms of selection, crossover, and mutation, ensured a global search capability, preventing premature convergence to local optima. This hybridization aimed to achieve an optimal sensor topology that minimized energy consumption and maximized network connectivity. The simulation results demonstrated significant improvements in network performance metrics. The optimized clustering approach led to a higher rate of successful connections between CHs and the BS, as well as between non-CH SNs and their respective CHs. Specifically, the number of sensors that failed to connect to CHs and the number of CHs that failed to connect to the BS were substantially reduced.This reduction in connection failures was directly correlated with enhanced network reliability and a prolonged network lifetime. In addition, the energy consumption across the network was more evenly distributed, mitigating the rapid depletion of individual SNs and thus extending the overall operational period of the WSN.However,the iterative nature of both PSO and GA increases the processing time and computational overhead, making it less suitable for real-time healthcare applications where low latency data transmission and quick decision-making are crucial.

Alizadehsani et al.28 explored the application of Swarm Intelligence (SI) algorithms within the Internet of Medical Things (IoMT), a specialized subset of the IoT that focuses on healthcare applications. Their study investigated how SI algorithms, inspired by the collective behavior of social organisms such as ants, bees, and birds, can address several challenges in IoMT, including disease prediction, data encryption, missing data imputation, resource allocation, network routing, and hardware failure management. Given the dynamic and resource-constrained nature of IoMT environments, conventional algorithms often fail to optimize performance effectively. In contrast, SI-based approaches leverage distributed decision-making and adaptive learning to enhance network efficiency, data security, and real-time processing in healthcare applications. A major focus of their work was on disease prediction, where SI algorithms play a vital role in optimizing feature selection and model parameters, leading to improved accuracy in medical diagnosis. In addition, data encryption in healthcare applications was discussed, as SI-based encryption methods provide robust security mechanisms to protect sensitive patient data against cyber threats. Another significant contribution of SI in IoMT lies in missing data imputation, where medical datasets often suffer from incomplete records, making analysis difficult. SI-based strategies efficiently estimate and fill in these missing values, maintain data integrity, and improve analytical outcomes. The study also highlighted resource allocation in IoMT networks, ensuring the efficient distribution of limited medical resources, such as bandwidth and computing power. SI techniques dynamically allocate resources based on network demands, reducing congestion and enhancing overall system performance.However, they also noted that the real-world implementation of these algorithms necessitates further research to address issues related to computational complexity and adaptability to dynamic healthcare environments.

Praveena et al.29 proposed an intrusion detection system (IDS) to protect IoMT networks by integrating Swarm Intelligence algorithms with neural network architectures. Given the increasing number of cyber threats targeting healthcare systems, their study focused on developing a hybrid detection framework capable of identifying and mitigating security intrusions in real time. Their approach used SI for feature selection, ensuring that the system could extract relevant data from both network traffic patterns and biometric patient records. By dynamically selecting the most critical features, the system reduced computational overhead while maintaining high detection accuracy.The intrusion detection system combined Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) models to recognize complex attack patterns within IoMT environments. The hybrid architecture allowed the system to detect previously unknown attack vectors by analyzing time-dependent correlations in network behavior. Furthermore, the authors incorporated a Self-Adaptive Attention Layer Mechanism (SAALM), allowing the IDS to focus on highly relevant data segments during intrusion detection. The system was tested using the WUSTL-EHMS 2020 dataset, where it achieved high accuracy in detecting cyber intrusions, outperforming traditional IDS techniques. Despite its effectiveness, one of the primary shortcomings of the approach is its high computational complexity, which can hinder real-time implementation in resource-constrained IoMT devices. Furthermore, while the model improves intrusion detection rates, it does not incorporate adaptive learning mechanisms to dynamically adjust its parameters based on evolving cyber threats, limiting its long-term adaptability in healthcare applications.

Amiri et al.30 proposed a novel approach to enhance energy efficiency in IoT-based healthcare systems by integrating PSO with deep learning techniques. The primary objective was to develop an energy-efficient routing protocol suited for healthcare applications, where reliable data transmission and a prolonged service life of the network are critical. The authors used PSO to optimize the selection of CHs within the network, with the aim of balancing energy consumption between SNs and preventing premature depletion of the SNs. Subsequently, a deep learning model was utilized to predict optimal routing paths based on the network’s dynamic conditions, further enhancing the protocol’s adaptability and efficiency. The simulation results demonstrated that the proposed approach achieved significant improvements in energy consumption, network lifetime, and data delivery reliability compared to traditional routing protocols. However, a notable shortcoming of this approach is the increased computational complexity introduced by combining PSO with deep learning, which may pose challenges for real-time implementation in resource-constrained IoT devices.

Shabu et al.31 developed an Adaptive Neuro-Fuzzy Inference System (ANFIS) for health monitoring in IoMT applications. Their study aimed to improve the accuracy, reliability and adaptability of patient monitoring systems by integrating fuzzy logic and neural networks. Given the high variability and uncertainty in medical data collected from wearable sensors and IoT-enabled healthcare devices, conventional methods often struggle with effective health condition assessments. The authors proposed ANFIS as a hybrid intelligent system capable of processing real-time physiological data, identifying potential anomalies, and predicting the early signs of critical health conditions.The ANFIS model combines the human-like reasoning ability of fuzzy logic with the self-learning capability of neural networks, making it suitable for complex, nonlinear medical data. The system continuously adapts its rule set based on real-time sensor readings, ensuring highly accurate and personalized health monitoring. The authors trained their model on various medical datasets, including heart rate, blood pressure, oxygen saturation levels, and ECG signals, achieving superior classification accuracy compared to traditional machine learning models. Furthermore, their approach demonstrated robust performance in handling missing or noisy sensor data, a common challenge in IoMT-based health monitoring systems. The simulation results showed that ANFIS-based health monitoring led to better patient outcomes by allowing early detection of anomalies, reducing false alarms, and optimizing decision-making processes in healthcare settings. However, a notable weakness of this approach is its computational complexity, particularly when processing large-scale IoMT data streams. The integration of fuzzy logic and neural networks increases memory and processing requirements, making real-time deployment challenging for low-power IoMT devices.

Narasimhan et al.32 developed a hybrid approach that combines GA and PSO, optimized with Random Forest (RF), to improve the accuracy of the prediction of heart disease. Recognizing the critical need for an early and precise diagnosis in cardiovascular healthcare, the authors aimed to improve the feature selection processes, thus increasing the performance of predictive models. The proposed method, termed GAPSO-RF, integrates the global search capabilities of GA with the local search efficiency of PSO to identify the most significant characteristics that influence heart disease outcomes. Initially, a statistically-based discriminate mutation strategy was applied to the GA, enhancing its ability to explore the feature space effectively. Subsequently, PSO was used to refine the search, targeting the rejected individuals in the selection process to maximize the use of all candidates in each generation. The RF algorithm served as the classifier, taking advantage of the optimized feature subset to predict the presence of heart disease. The authors validated the performance of GAPSO-RF using two datasets from the University of California, Irvine (UCI) Machine Learning Repository: the Cleveland and Statlog heart disease datasets. Evaluation metrics included accuracy, specificity, sensitivity, and area under the Receiver Operating Characteristic (ROC) curve. The results demonstrated that GAPSO-RF achieved high prediction accuracies in the Cleveland and Statlog datasets, respectively, outperforming other state-of-the-art prediction methods. These findings underscore the efficacy of the hybrid optimization approach in improving the predictive performance of heart disease diagnosis models.However, a notable shortcoming of the GAPSO-RF approach is its computational complexity, attributed to the integration of GA and PSO algorithms. This complexity may pose challenges for real-time implementation, particularly in resource-constrained healthcare settings where rapid decision-making is crucial.

Hu et al.33 proposed an energy-efficient clustering and routing protocol for WSNs by integrating Quantum Particle Swarm Optimization (QPSO) with a fuzzy logic system. The primary objective was to improve energy efficiency and extend the life of the network by optimizing the CH selection and routing processes. The authors employed an enhanced QPSO algorithm to select optimal CHs, utilizing Sobol sequences for population diversification during initialization and incorporating Lévy flight and Gaussian perturbation-based position updates to prevent local optima trapping. Subsequently, a fuzzy logic system determined the best next-hop CH based on descriptors such as residual energy, energy deviation, and relay distance. Extensive simulations demonstrated that the proposed protocol outperformed existing approaches in terms of network lifetime, throughput, energy consumption, and scalability. However, a notable shortcoming of this approach is the increased computational complexity introduced by combining QPSO with fuzzy logic, which may pose challenges for real-time implementation in resource-constrained WSN devices.

Lei et al.34 proposed a hybrid energy-aware routing approach for IoT-based networks, integrating PSO with fuzzy clustering to improve network efficiency and longevity. The study focused on addressing the fundamental challenges of energy consumption and data transmission efficiency by optimizing cluster formation and routing decisions. The methodology involved an initial fuzzy clustering process, in which SNs were probabilistically assigned to clusters based on geographical distribution, ensuring flexible and adaptive cluster boundaries. This clustering method took into account uncertainties in the mobility and deployment of SNs, improving the adaptability of the network. To further optimize the CH selection, a fitness function was developed that incorporates parameters such as SN residual energy, intra-cluster distance, and overall transmission efficiency. The PSO algorithm was then applied to determine the optimal CHs within each cluster. Each particle in PSO represented a candidate CH and its position was iteratively adjusted on the basis of fitness evaluations to minimize energy consumption and maximize data aggregation efficiency. Routing decisions were dynamically updated to ensure a balanced load distribution among CHs, preventing premature depletion of SNs, and improving the overall lifespan of the network. The proposed hybrid PSO clustering approach was evaluated using the MATLAB simulator, comparing its performance against traditional protocols like DEEC and LEACH. The results demonstrated significant improvements in energy consumption, network longevity, and data transmission efficiency. The method successfully reduced energy usage, extending the operational period of the network while ensuring higher packet delivery rates and reduced latency. However, the study also highlighted key limitations. The computational complexity introduced by integrating PSO with fuzzy clustering poses challenges for real-time implementation in resource-constrained IoT devices. Furthermore, as the size of the network scales, the efficiency of clustering and optimization may diminish, requiring further enhancements to maintain performance in large-scale IoT applications.

To provide a concise comparison of the existing clustering and routing approaches used in IoT-based networks, a summary of selected recent methods is presented in Table 1. This table outlines the core methodologies, their advantages and key limitations.

Table 1 Comparative summary of existing clustering and routing approaches.

While these techniques contribute significantly to their respective areas, they often fall short in addressing multiple real-time requirements simultaneously−such as adaptability, energy efficiency, and routing stability. To bridge these gaps, our proposed AFL–PSO–GA model is designed to provide a balanced solution. The following points summarize how our approach overcomes the key limitations observed in prior works:

  • Methods such as FCM + PSO + GA and QPSO + Fuzzy Logic suffer from high computational overhead and complexity, making them less suitable for real-time applications. Our method addresses this by using adaptive fuzzy logic, which reduces decision-making overhead, and a hybrid PSO-GA, which balances convergence speed and solution diversity more efficiently.

  • Techniques like SI + CNN-LSTM IDS and PSO + Deep Learning offer high accuracy but are not feasible for low-resource IoT SNs due to their intensive computational requirements. Our model focuses on lightweight operations optimized for healthcare sensor networks.

  • Protocols such as ANFIS-based and GA + PSO + RF show strength in prediction or anomaly detection but are not optimized for routing or clustering. In contrast, our model provides a complete solution−adaptive CH selection and optimal route discovery−with energy and delay-awareness built-in.

Problem statement

The rapid advancements in IoT-based healthcare networks have facilitated seamless patient monitoring, real-time diagnostics, and intelligent transmission of medical data. However, ensuring energy efficiency, optimal cluster formation, and reliable data aggregation in WSNs remains a persistent challenge. The large-scale deployment of IoT-enabled medical devices generates large volumes of data, leading to increased energy consumption, inefficient routing, and higher communication overhead. Existing clustering and routing mechanisms often do not adapt dynamically to network conditions, leading to premature energy depletion of SNs, degraded network performance, and high latency. Several recent studies have attempted to address these challenges through optimization-driven CH selection and energy-efficient routing strategies. Lei et al. (2024) introduced an Energy-Efficient Clustering and Path Finding (ECPF), a hybrid fuzzy clustering approach of PSO to balance energy consumption and data transmission in IoT-based networks. Their method significantly improved network lifespan and packet delivery ratio, but suffered from computational overhead, making it less feasible for real-time healthcare applications. Similarly, Hu et al. (2024) developed a Quantum Particle Swarm Optimization (QPSO) and fuzzy logic-based clustering approach, which demonstrated superior energy efficiency and scalability. However, the method introduced higher computational complexity, limiting its deployment in resource-constrained IoT healthcare environments. Furthermore, Narasimhan et al. (2025) used a hybrid GA-PSO model for the prediction of heart disease, achieving greater classification accuracy. Although their work optimized feature selection for healthcare applications, it lacked a comprehensive energy-efficient clustering and routing framework for IoT networks. Shabu et al. (2024) proposed an Adaptive Neuro-Fuzzy Inference System (ANFIS) for IoMT, which efficiently handled uncertainties in sensor data. However, the approach posed computational challenges in real time for large-scale IoT healthcare implementations. Although these studies have contributed significantly to optimization-based IoT healthcare networks, existing approaches still struggle with trade-offs between computational efficiency, network longevity, and real-time adaptability.In contrast, this paper proposes a novel hybrid model that combines AFL for dynamic CH selection with a PSO-GA hybrid optimization for routing. This dual-stage design leverages AFL’s contextual decision-making capability and the strengths of PSO (fast convergence) and GA (global exploration) to optimize communication paths. The proposed model not only adapts to real-time network conditions but also reduces energy usage and latency while maintaining scalability and minimal computational burden. This distinguishes our work from existing methods by offering an integrated, intelligent, and resource-efficient routing framework tailored for IoT-based healthcare systems.

Methodology

The proposed model integrates AFL-based clustering with PSO and GA to improve energy efficiency, optimal CH selection, and efficient data routing in IoT-enabled healthcare networks. To facilitate a clearer understanding of the proposed methodology, a detailed flow chart is provided in Fig. 2, which outlines the overall process from data collection to CH selection and final route optimization using the hybrid PSO-GA algorithm.

The mathematical formulations used throughout this section is given in Table 2 which summarizes all notations and symbols along with their respective descriptions. These notations are employed in the adaptive fuzzy clustering, PSO-GA based routing, and energy evaluation formulations.

Fig. 2
figure 2

Flowchart of the proposed AFL-based CH selection and hybrid PSO-GA routing methodology.

Table 2 Table of notations.

Adaptive fuzzy logic-based CH selection

The CH selection process plays a critical role in ensuring energy-efficient communication in IoT-based healthcare networks. Unlike traditional static methods, the proposed approach employs a fuzzy inference system to evaluate potential CHs based on the following parameters.

  • Residual Energy - SNs with the highest remaining energy are favored for CH functions.

  • SN Density – A higher local density increases the likelihood of selection.

  • Distance to BS – Closer SNs help minimize transmission costs.

  • Link Stability – Ensures reliable communication and fewer retransmissions.

A fuzzy logic controller processes these inputs using membership functions and inference rules to select the most suitable CHs dynamically.

Dynamic adaptation of membership functions in AFL

To ensure responsiveness to the dynamic nature of IoT-based healthcare environments, the proposed AFL mechanism includes adaptive updates to its membership functions during each network round. The adaptation process is driven by real-time network metrics such as residual energy levels, link stability, and SN density. Specifically, the triangular membership functions used to represent linguistic variables (e.g., Low, Medium, High) adjust their parameter bounds (abc) based on the evolving distribution of SN values.

For instance, the residual energy membership function adapts as follows:

  • The minimum bound (a) is updated using the minimum energy value among all active SNs.

  • The maximum bound (c) is recalculated from the maximum energy value in the current round.

  • The center (b) is redefined as the dynamic mean or median of energy values to reflect central tendency.

This ensures that SNs are more accurately classified according to their current energy status, rather than static thresholds. Similar adjustments are applied to the membership functions of other inputs like distance to BS and link stability.

To avoid excessive fluctuation, a smoothing factor \(\lambda\) is applied:

$$\begin{aligned} b^{(t+1)} = \lambda \cdot b^{(t)} + (1 - \lambda ) \cdot b^{\text {new}} \end{aligned}$$
(1)

This dynamic adaptation process enables the fuzzy inference system to remain robust and context-sensitive across rounds, ensuring accurate CH selection even in fluctuating network conditions. The update mechanism is implemented at the start of each clustering phase, using current sensor readings.

Energy-efficient routing using PSO and GA

Once CHs are identified, the next step involves discovering optimal routing paths using the hybrid PSO and GA algorithm. The workflow includes:

  • Population initialization – Each particle represents a potential path.

  • Fitness evaluation – Based on energy usage, delay, congestion, and PDR.

  • Position and velocity updates – Guided by local and global solutions.

  • Convergence – Optimal paths are finalized through iterative optimization.

This routing strategy minimizes overall energy consumption and latency while improving reliability.

Data collection

In IoT-enabled healthcare environments, medical data is collected through sensor-embedded devices that monitor and transmit critical physiological information34. These devices, often in the form of wearable sensors, operate continuously to observe the patient’s health status in real time. Data such as heart rate, temperature, blood oxygen level, and pulse rate are recorded and transmitted to a central monitoring system35. These IoT devices provide reliable communication and seamless integration with other digital healthcare infrastructures, facilitating accurate and timely diagnosis36.

To ensure replicability and relevance to real-world scenarios, publicly available healthcare datasets were selected from Kaggle, focusing on heart rate, pulse rate, and blood pressure readings. These physiological parameters are commonly monitored in IoT-enabled healthcare applications. Before simulation, the datasets were pre-processed to remove missing values and outliers using z-score normalization and median imputation. Feature scaling was applied to standardize data ranges. Additionally, timestamps are aligned to ensure synchronized sampling for multi-sensor fusion. The datasets are then mapped onto virtual SNs to simulate real-time monitoring in the network model.

The first dataset, titled “Healthcare IoT Data”, contains simulated sensor readings including temperature, heart rate, \(\hbox {SpO}_2\) levels, and respiration rate, collected from a virtual healthcare setting. This data set mimics continuous monitoring and comprises thousands of time-stamped entries that represent patient observations in a smart hospital environment37.

The second dataset used is the “Health Monitoring System”, which includes multiple health parameters such as pulse rate, systolic and diastolic blood pressure, and body temperature. These values are generated in a simulated IoT framework and reflect the typical input received from wearable health trackers used in remote patient management38.

The third dataset incorporated into the study is ”Patient Temperature and Pulse Rate”, consisting of continuous logs of body temperatures and pulse rates of patients.The readings are captured over time to simulate the monitoring of real-world patients using IoT sensors. Each observation in this dataset includes the identification of the patient, the reading time, the temperature, and the heart rate39.

The selected Kaggle datasets were chosen for their practical relevance to real-world healthcare IoT scenarios. Each dataset includes core physiological parameters−such as heart rate, pulse rate, blood pressure, temperature, and SpO2 levels−that are typically monitored by wearable or bedside sensors in smart hospitals or home-based health monitoring systems. These signals are captured at regular intervals, emulating the temporal frequency expected in continuous patient monitoring applications. Additionally, the datasets reflect natural variations and mild noise typically observed in clinical IoT deployments, offering a suitable testbed for validating our proposed clustering and routing framework.

Together, these datasets provided a rich foundation for modeling a WSN in which each reading simulates SN behavior in a healthcare setting. Data entries were used to assign values for energy consumption, SN density, link stability, and proximity to the BS, serving as input to the AFL-based CH selection algorithm. Following cluster formation, these same inputs were utilized in the PSO and GA stage to determine the most energy-efficient and reliable communication paths throughout the network.

Adaptive fuzzy logic–based CH selection

AFL algorithm dynamically selects optimal CHs by continuously adjusting its membership functions and fuzzy rules according to the varying IoT-based healthcare network environment. The mathematical formulation for the selection of CH based on AFL involves the following main steps40:

Definition and normalization of inputs

The adaptive fuzzy inference system considers four key inputs:

  1. 1.

    Residual energy (\(E_r\)): Calculated as the ratio of the remaining energy (\(E_{\text {curr}}\)) of SN i to its initial energy (\(E_{\text {init}}\)):

    $$\begin{aligned} E_r(i) = \frac{E_{\text {curr}}(i)}{E_{\text {init}}(i)} \end{aligned}$$
    (2)
  2. 2.

    Distance to BS (\(D_{BS}\)): Euclidean distance between SN i and BS, normalized as:

    $$\begin{aligned} D_{BS}(i) = \frac{d(i, BS)}{d_{\text {max}}} \end{aligned}$$
    (3)
  3. 3.

    SN Density (\(N_d\)): Density around SN i calculated as the ratio of neighbor SNs within communication radius:

    $$\begin{aligned} N_d(i) = \frac{N_{\text {neighbors}}(i)}{N_{\text {total}}} \end{aligned}$$
    (4)
  4. 4.

    Link Stability (\(L_s\)): Evaluated as the ratio of packets successfully received (\(P_{\text {recv}}\)) to packets sent (\(P_{\text {sent}}\)):

    $$\begin{aligned} L_s(i) = \frac{P_{\text {recv}}(i)}{P_{\text {sent}}(i)} \end{aligned}$$
    (5)

Adaptive fuzzification

Each crisp input value (x) is mapped to adaptive fuzzy membership functions. Typically, triangular functions are used:

$$\begin{aligned} \mu (x;a,b,c)= {\left\{ \begin{array}{ll} 0, & x \le a \\ \frac{x - a}{b - a}, & a< x \le b \\ \frac{c - x}{c - b}, & b < x \le c \\ 0, & x > c \end{array}\right. } \end{aligned}$$
(6)

Membership parameters (abc) are adaptively updated using optimization algorithms by minimizing a cost function J:

$$\begin{aligned} J = \alpha \cdot E_{\text {total}} + \beta \cdot \text {Delay} + \gamma \cdot (1 - \text {PDR}) \end{aligned}$$
(7)

where \(\alpha ,\beta ,\gamma\) represent the weighting coefficients.

Adaptive fuzzy rule base

The adaptive fuzzy system uses fuzzy rules of the general form:

$$\begin{aligned} \text {IF } E_r \text { is } A, \text { AND } D_{BS} \text { is } B, \text { AND } N_d \text { is } C, \text { AND } L_s \text { is } D, \text { THEN CH suitability is } Z \end{aligned}$$

Fuzzy rules dynamically adjust their weights \((w_k)\) according to network performance:

$$\begin{aligned} w_k^{(t+1)} = w_k^{(t)} + \eta \cdot \frac{\partial J}{\partial w_k} \end{aligned}$$
(8)

where \(\eta\) is the learning rate.

Adaptive fuzzy inference engine

The firing strength of each rule (\(\alpha _k\)) is computed using the minimum (AND operation) of the membership values:

$$\begin{aligned} \alpha _k = \min \left[ \mu _{E_r}(x), \mu _{D_{BS}}(y), \mu _{N_d}(z), \mu _{L_s}(w)\right] \end{aligned}$$
(9)

Adaptive defuzzification

Defuzzification is performed using the centroid method, providing the CH suitability score:

$$\begin{aligned} CH_{\text {score}}(i) = \frac{\sum _{k=1}^{N}\alpha _k \cdot z_k \cdot w_k}{\sum _{k=1}^{N}\alpha _k \cdot w_k} \end{aligned}$$
(10)

where \(z_k\) is the centroid of the fuzzy output set for the \(k^{th}\) rule, and \(w_k\) is the adaptive rule weight.

CH selection criterion

The SNs having the highest \(CH_{\text {score}}\) in their local region are selected as CHs for the current round. Consequently, selected CHs possess high residual energy, proximity to the BS, high local SN density, and high link stability, thereby achieving balanced energy consumption, reduced latency, and enhanced reliability.

The AFL–based CH selection process integrates multiple critical criteria to dynamically optimize energy consumption, improve connectivity, and ensure efficient data transmission within IoT-based healthcare networks. These criteria systematically prioritize SNs that exhibit optimal characteristics, essential for maintaining efficient and reliable data aggregation and transmission, thus significantly improving network performance and longevity.

First, the residual energy level of the SNs is a fundamental factor in the selection of CH. SNs with higher residual energy are favored as potential CH candidates due to their enhanced ability to support energy-intensive operations associated with data aggregation and transmission tasks. Prioritizing these SNs ensures balanced energy usage, directly contributing to a longer network life.

Secondly, the distance to the BS plays a vital role in improving energy efficiency and reducing transmission latency. Considering that data transmission from the CH to the BS consumes substantial energy, reducing this distance effectively conserves energy. The Euclidean distance is utilized to accurately measure the spatial separation between the SNs and the BS. SNs positioned closer to the BS are therefore prioritized in CH selection, as they incur a lower energy expenditure for data transmission, significantly reducing overall latency and enhancing network reliability.

Third, SN density is incorporated as a key adaptive criterion within the fuzzy inference process. The density of the SNs represents the concentration of neighboring SNs surrounding a potential CH within a specified communication radius. SNs located in regions with higher SN density are more desirable as CHs, as they can aggregate data from multiple neighboring SNs efficiently, reducing the number of required transmissions and subsequently minimizing overall energy consumption.

Lastly, link stability is crucial to ensure continuous and robust network communication. Link stability is assessed based on the quality and consistency of the communication link between the SNs and the BS, often evaluated by the packet reception rate or signal strength. SNs demonstrating high link stability are preferred as CHs to maintain uninterrupted communication, minimize data loss, and ensure reliable network operations.

By systematically integrating these adaptive criteria, residual energy, distance to the BS, SN density, and link stability, the AFL algorith effectively identifies optimal CHs. This comprehensive selection strategy significantly improves energy efficiency, promotes compact and well-connected clusters, reduces transmission latency, and substantially contributes to the improved overall performance and extended lifetime of IoT-based healthcare networks.

Energy-efficient routing using PSO and GA

The routing mechanism in the proposed IoT-based healthcare network leverages PSO and GA to dynamically identify energy-efficient communication paths from selected CHs to BS41. PSO is a population-based stochastic optimization algorithm inspired by social behaviors observed in flocking birds or schooling of fish. It effectively searches for optimal solutions through collaborative adjustments of particle positions and velocities.To further enhance the exploration capability of the routing optimization process, the GA is integrated with PSO in a hybrid framework. GA operations are periodically applied to the swarm to diversify the population and escape local optima.The iterative optimization process for routing is demonstrated in Figs. 911, where the most energy-efficient routes from selected CHs to the BS are visualized across varying SN densities and datasets.

Problem formulation

PSO identifies the optimal route by minimizing an objective fitness function \(f(x)\), which considers energy consumption, link quality, latency, and network throughput. The general form of this fitness function is expressed as follows:

$$\begin{aligned} f(x) = \alpha \cdot E_{\text {route}} + \beta \cdot D_{\text {route}} + \gamma \cdot (1 - L_{\text {stability}}) + \delta \cdot (1 - \text {PDR}) \end{aligned}$$
(11)

where:

  • \(E_{\text {route}}\) = total energy consumed along the selected routing path.

  • \(D_{\text {route}}\) = total end-to-end delay experienced by the packets on the selected path.

  • \(L_{\text {stability}}\) = stability of the selected path.

  • \(\text {PDR}\) = packet delivery ratio on the selected route.

  • \(\alpha , \beta , \gamma , \delta\) = weighting factors (with sum equal to 1).

Particle representation

Each particle within the swarm represents a candidate routing path from a CH SN to the BS. Mathematically, the position of the particle \(X_i\) can be represented as:

$$\begin{aligned} X_i = [CH \rightarrow N_1 \rightarrow N_2 \rightarrow \dots \rightarrow N_k \rightarrow BS] \end{aligned}$$
(12)

where each \(N_j\) represents an intermediate SN along the route.

Initialization of Swarm particles

Initially, a population of \(M\) particles (candidate paths) is generated randomly. Each particle has:

  • **Position (\(X_i\))**: an initial routing path randomly selected from the available paths.

  • **Velocity (\(V_i\))**: represents the rate of adjustment of the path of the particle during optimization.

The velocity is initialized as:

$$\begin{aligned} V_i^{(0)} = \text {randomly generated within defined bounds} \end{aligned}$$
(13)

Fitness evaluation

The fitness \(f(X_i)\) of each particle is evaluated using:

$$\begin{aligned} f(X_i) = \alpha \cdot E(X_i) + \beta \cdot D(X_i) + \gamma \cdot (1 - L(X_i)) + \delta \cdot (1 - \text {PDR}(X_i)) \end{aligned}$$
(14)

where:

Energy consumption:

$$\begin{aligned} E(X_i)= & \sum _{m=1}^{k+1} E_{\text {transmit}}(N_{m-1}, N_m) \end{aligned}$$
(15)
$$\begin{aligned} E_{\text {transmit}}= & E_{\text {elec}} \cdot d + \epsilon _{\text {amp}} \cdot d^n \end{aligned}$$
(16)

Delay:

$$\begin{aligned} D(X_i) = \sum _{m=1}^{k+1} T(N_{m-1}, N_m) \end{aligned}$$
(17)

Link Stability:

$$\begin{aligned} L(X_i) = \frac{1}{k+1} \sum _{m=1}^{k+1} L_s(N_{m-1}, N_m) \end{aligned}$$
(18)

Packet Delivery Ratio:

$$\begin{aligned} \text {PDR}(X_i) = \prod _{m=1}^{k+1} \text {PDR}(N_{m-1}, N_m) \end{aligned}$$
(19)

Particle velocity and position update

After evaluating fitness, velocity and position are updated as:

Velocity Update:

$$\begin{aligned} V_i^{(t+1)} = wV_i^{(t)} + c_1 r_1 (P_{\text {best}}^{(t)} - X_i^{(t)}) + c_2 r_2 (G_{\text {best}}^{(t)} - X_i^{(t)}) \end{aligned}$$
(20)

Position update:

$$\begin{aligned} X_i^{(t+1)} = X_i^{(t)} + V_i^{(t+1)} \end{aligned}$$
(21)

where:

  • \(w\) is inertia weight,

  • \(c_1, c_2\) are cognitive and social acceleration constants,

  • \(r_1, r_2\) are random numbers in [0, 1],

  • \(P_{\text {best}}^{(t)}\) is the best position of particle \(i\),

  • \(G_{\text {best}}^{(t)}\) is the best global position.

Genetic Algorithm integration (GA Phase)

Selection:

A tournament selection strategy is used to choose the parent particles of the swarm. The fitness function \(f(X)\) defined in Equation (13) guides the selection, ensuring that fitter individuals have a higher probability of combining.

Crossover:

A path-based crossover operator is used to recombine selected parent particles. Given two parents:

$$\begin{aligned} P_1= & [CH \rightarrow N_1 \rightarrow N_2 \rightarrow \cdots \rightarrow BS]\\ P_2= & [CH \rightarrow M_1 \rightarrow M_2 \rightarrow \cdots \rightarrow BS] \end{aligned}$$

a crossover point is selected, and sub-paths are exchanged to generate offspring. This preserves feasible routing paths while introducing variability42.

Mutation:

To maintain genetic diversity, a mutation operator randomly alters part of the route of the offspring. For example, a SN \(N_k\) in the path may be replaced by another neighbor SN within the communication range. This operation helps to avoid premature convergence43.

Replacement:

New offspring generated by crossover and mutation replace the worst performing particles in the population based on their fitness values. This elitism ensures that only improved or equally fit solutions are retained44.

Integration with PSO:

The proposed model periodically integrates GA with PSO at every \(T\) iteration of the PSO loop . While PSO excels at rapid convergence through swarm intelligence, it is susceptible to premature convergence and can get trapped in local optima. To mitigate this, GA operations−such as selection, crossover, and mutation−are applied after fixed intervals during the PSO iterations.

This periodic hybridization introduces genetic diversity into the swarm, allowing the algorithm to explore new regions of the solution space and avoid stagnation. The crossover operation enables recombination of high-fitness solutions, while mutation ensures continued variability in the population. As a result, the combined PSO-GA optimization improves the global search capability, yielding more energy-efficient and stable routing paths in dynamic IoT environments.

This synergy between PSO and GA provides a balance between exploration and exploitation, leading to more robust route selection compared to standalone optimization methods.

Convergence criteria

The algorithm terminates when:

  • A maximum number of iterations is reached, or

  • A minimal fitness threshold is achieved, or

  • The global best solution shows no improvement.

Computational complexity analysis

The computational complexity of the proposed AFL–PSO–GA model can be qualitatively estimated as follows:

  • The AFL-based CH selection has a per-round complexity of \(\mathcal {O}(n \cdot r)\), where n is the number of SNs and r is the number of fuzzy rules. This is due to the evaluation of input features and rule firing strengths for each SN.

  • The PSO component has a complexity of \(\mathcal {O}(p \cdot k \cdot I)\), where p is the number of particles (candidate routes), k is the average route length (number of hops), and I is the number of iterations.

  • The GA enhancement, invoked periodically every T iterations, contributes an additional cost of \(\mathcal {O}(g \cdot \log g)\) per invocation, where g is the population size, assuming tournament selection and crossover.

Overall, the model exhibits polynomial-time complexity and is amenable to real-time application for small-to-moderate SN densities. For larger-scale deployments, complexity can be mitigated through parallelization, tuning GA invocation intervals, and adopting lightweight fuzzy approximations.

Routing path selection

Once convergence is reached, the optimal route is:

$$\begin{aligned} X_{\text {Optimal}} = G_{\text {best}} \end{aligned}$$
(22)

The CH transmits data via this route to ensure energy efficiency, stability, and extended network lifespan.

AFL-PSO-GA-Based CH selection and routing algorithm

figure a
Table 3 Simulation parameters and optimization settings43,44,45.

Result and discussion

The integration of IoT-enabled sensors in healthcare plays a vital role in collecting real-time physiological data such as pulse rate, temperature, blood pressure, and oxygen saturation. In this paper, publicly available Kaggle datasets, Healthcare IoT data, Health Monitoring System, and Patient Temperature and Pulse Rate were used to simulate realistic conditions as shown in Table 3 in a wireless sensor environment. These data sets allowed the modeling of SN behavior and energy consumption in an IoT healthcare network. To efficiently manage communication, the AFL mechanism is used to identify optimal CHs from the collected information, followed by hybrid PSO and GA path optimization.

Simulation environment and tools

To evaluate the performance of the proposed PSO-GA-based AFL clustering and routing protocol in IoT-enabled healthcare systems, simulations are conducted using MATLAB and Google Colaboratory. MATLAB is selected due to its robust set of toolboxes and wide adoption in WSN simulation. Its numerical computing environment allows precise modeling of energy consumption, cluster dynamics, and routing behavior. Google Colaboratory is employed for parallel implementation and testing of the optimization algorithms, leveraging cloud-based GPU/TPU support and easy integration with Python-based AI libraries. The combination of these two tools enabled both flexibility and computational efficiency, ensuring the reproducibility of experiments and enabling scalable validation of results across multiple parameter sets.

Network model assumptions and practical limitations

To simulate and evaluate the proposed energy-efficient clustering and routing algorithm for IoT-enabled healthcare networks, certain assumptions are made to simplify the system model and focus on core algorithmic evaluation. While these assumptions allow for controlled simulation, they introduce certain limitations when considering real-world deployment. These are outlined below:

  • Ideal network conditions: The simulation assumes ideal wireless conditions without environmental interference, mobility, or physical obstructions.

  • SN homogeneity: All SNs are considered homogeneous in terms of hardware and energy capacity.

  • Static BS: The BS is assumed to be static and centrally located.

  • Computational overhead: The use of hybrid PSO-GA introduces computational complexity. Resource-constrained IoT devices may not efficiently support such operations without optimization or hardware acceleration.

  • Real-time constraints: The execution of fuzzy inference and meta-heuristic algorithms in real time might introduce latency, which needs to be minimized for time-sensitive medical data transmission.

  • Unmodeled dynamics: The simulation does not account for dynamic changes such as patient mobility, SN failure, or environmental variations, which are common in real IoT healthcare infrastructures.

Furthermore, the scalability of the proposed AFL–PSO–GA model has been considered. Although current simulations are conducted for 5 and 20 SNs to maintain clarity in visualization and validation, the underlying mechanisms, such as AFL for CH selection and hybrid PSO-GA routing, are designed to be extensible to larger deployments (e.g. 100 + SNs). In larger networks, clustering naturally reduces communication overhead by confining local data aggregation within clusters. Additionally, the GA component in routing optimization can be invoked periodically rather than continuously to reduce complexity. These properties enable the model’s applicability to hospital-wide or urban-scale IoT healthcare infrastructures.

In terms of real-time feasibility, the AFL–PSO–GA model is designed with modular execution in mind, allowing key components to be executed at different frequencies. For instance, CH selection via AFL can be performed periodically, rather than in every round, especially in stable environments. To support deployment on embedded IoT platforms, lightweight approximations of fuzzy inference systems−such as using reduced rule sets or quantized membership functions−can be employed. Additionally, recent advancements in edge computing and low-power AI accelerators (e.g., NVIDIA Jetson Nano, Google Coral) provide the capability to run PSO-GA modules in real-time with reduced latency. These approaches collectively ensure that the proposed model remains practically viable for real-time, resource-constrained healthcare IoT applications.

Despite these challenges, the proposed model lays a strong foundation for energy-aware and adaptive routing in healthcare IoT systems and can be further adapted through lightweight algorithmic variants and real-time optimization techniques.

Formation of clusters using AFL system

SN clusters were initially formed using the AFL system based on parameters such as residual energy, SN density, link stability, and proximity to the BS. The CH selection step is critical to ensure minimal energy usage and high data transmission reliability. As illustrated in Figs. 3, 4, and 5, the AFL-based clustering mechanism dynamically groups SNs based on physiological parameters and network characteristics. These figures visualize how heart rate and age influence cluster formation under different SN densities.

The network structure becomes denser and more refined with an increasing number of SNs, clearly affecting the clustering dynamics.

Fig. 3
figure 3

SNss grouped into clusters for Healthcare IoT data (heart rate vs.age) (a) at 5 SNs and (b) at 20 SNs.

Fig. 4
figure 4

SNss grouped into clusters for Health Monitoring system data (heart rate vs. age) (a) at 5 SNs and (b) at 20 SNs.

Fig. 5
figure 5

SNss grouped into clusters for patient temperature and pulse rate data (heart rate vs. age) (a) at 5 SNs and (b) at 20 SNs.

Once the CHs are selected, the SNs are associated with their nearest CH based on adaptive fuzzy inference. Figs. 6,7,8 presents a heat map of the SNs and their corresponding CHs. This step reflects how data are collected at the CH level before they are forwarded to the BS. The selected CHs are dynamically distributed across the network based on the residual energy and topological location of the SNs, thus maximizing coverage and minimizing redundancy.

Fig. 6
figure 6

Heatmap of SNss grouped into clusters for Healthcare IoT data (Blood pressure vs. age) (a) at 5 SNs and (b) at 20 SNs.

Fig. 7
figure 7

Heatmap of SNss grouped into clusters for Health Monitoring System data (Blood pressure vs.age) (a) at 5 SNs and (b) at 20 SNs.

Fig. 8
figure 8

Heatmap of SNss grouped into clusters for Patient Temperature and Pulse Rate data (Blood pressure vs.age) (a) at 5 SNs and (b) at 20 SNs.

The final stage involves selecting the most efficient route between the CHs and the BS using the hybrid PSO and GA optimization algorithm. This method ensures that routing decisions are made considering a composite fitness function that balances energy usage, latency, congestion, and reliability. Figures 9,10,11 illustrates the best routes identified by the algorithm at different SN densities, demonstrating how the hybrid method finds optimal paths under varying network complexities. These routes consider PSO and GA-driven perspectives, enabling faster convergence to energy-efficient solutions.

Fig. 9
figure 9

Best route (heart rate vs.age) (a) at 5 SNs and (b) at 20 SNs.

Fig. 10
figure 10

Best route (heart rate vs.age) (a) at 5 SNs and (b) at 20 SNs.

Fig. 11
figure 11

Best route (Blood pressure vs.age) (a) at 5 SNs and (b) at 20 SNs.

Performance metrics

To evaluate the proposed model performance, four primary performance metrics were considered: Packet Delivery Ratio (PDR), Average Delay, Throughput, and Energy Efficiency. These metrics provide a comprehensive assessment of network quality, responsiveness, and sustainability in IoT-enabled healthcare applications.

Simulations were carried out using sensor datasets collected from three real-world healthcare sources available on Kaggle: Healthcare IoT Data (data1), Health Monitoring System (data2), and Patient Temperature and Pulse Rate (data3). Performance was observed across 100 iterations at two SN densities - 5 SNs and 20 SNs - to reflect low- and high-load environments.

Packet Delivery Ratio (PDR)

PDR is a key performance metric that is used to evaluate the reliability and efficiency of a communication network. It represents the ratio of the number of data packets successfully received by the destination SNs to the total number of data packets sent by the source SNs46.

A higher PDR value indicates more reliable data transmission, which is crucial in IoT-enabled healthcare networks, where loss of critical patient data can lead to adverse outcomes.

$$\begin{aligned} \text {PDR} = \frac{P_{\text {received}}}{P_{\text {sent}}} \end{aligned}$$
(23)

Where:

  • \(P_{\text {received}}\) is the total number of packets successfully received at the destination.

  • \(P_{\text {sent}}\) is the total number of packets transmitted from the source.

To express PDR in percentage form:

$$\begin{aligned} \text {PDR (\%)}= & \left( \frac{P_{\text {received}}}{P_{\text {sent}}} \right) \times 100 \end{aligned}$$
(24)
$$\begin{aligned} \text {PDR}(X_i)= & \prod _{m=1}^{k+1} \text {PDR}(N_{m-1}, N_m) \end{aligned}$$
(25)

where:

  • \(X_i\) represents the routing path from CH to BS,

  • \(N_{m-1} \rightarrow N_m\) denotes each hop along the path,

  • \(\text {PDR}(N_{m-1}, N_m)\) is the packet delivery success ratio of the link between two consecutive SNs.

In the simulation setup:

  • For the 5-SN cluster scenario as shown in Figs. 12,13,14, PDR is calculated over fewer hops. Reflects the success of data transmission through a simpler routing path and is highly sensitive to individual link quality.

  • For the 20 SN cluster scenario as shown in Figs. 12,13,14, the PDR is calculated on more hops and complex routes. This increases the probability of packet loss, but the proposed routing strategy minimizes this risk by selecting stable links with high reliability.

The final PDR value for each configuration is obtained by averaging the results over 100 simulation iterations.

Fig. 12
figure 12

Packet delivery ratio of the suggested model for Healthcare IoT data (a) Packet delivery ratio of 5 SNs and (b) Packet delivery ratio of 20 SNs.

Fig. 13
figure 13

Packet delivery ratio of the suggested model for Health Monitoring System data (a) Packet delivery ratio of 5 SNs and (b) Packet delivery ratio of 20 SNs.

Fig. 14
figure 14

Packet delivery ratio of the suggested model for Patient Temperature and Pulse Rate data (a) Packet delivery ratio of 5 SNs and (b) Packet delivery ratio of 20 SNs.

Average delay

The average delay is a critical performance metric used to evaluate the responsiveness and timeliness of data transmission within an IoT-enabled wireless sensor network. Quantifies the total time taken by the data packets to travel from the source (CH) to the destination (BS) through multiple intermediate SNs47.

The delay includes transmission time, propagation delay, queueing time, and processing delays at each SN. A lower average delay indicates a faster and more efficient communication network, which is essential for real-time healthcare applications.

$$\begin{aligned} D(X_i) = \frac{1}{k+1} \sum _{m=1}^{k+1} T(N_{m-1}, N_m) \end{aligned}$$
(26)

Where:

  • \(D(X_i)\) is the average end-to-end delay for the routing path \(X_i\),

  • k is the number of intermediate SNs in the path,

  • \(T(N_{m-1}, N_m)\) is the total delay (transmission + propagation) between SN \(N_{m-1}\) and \(N_m\).

5-SN Scenario:

In this scenario, as shown in Figs. 15,16,17 the route from CH to BS includes fewer hops. As a result:

  • The cumulative delay is lower.

  • There is minimal queuing and transmission overhead.

This configuration is better suited for applications that require low-latency data delivery.

20-SN Scenario:

With a higher number of SNs as shown in Figs. 15,16,17:

  • The number of hops increases.

  • Each SN introduces additional transmission and queueing delays.

Despite the increased path length, the proposed PSO-GA-based routing approach reduces redundant transmissions and chooses optimal paths, thus maintaining delay within acceptable limits.

Fig. 15
figure 15

Delay of the suggested model for Healthcare IoT data (a) delay of 5 SNs and (b) delay of 20 SNs.

Fig. 16
figure 16

Delay of the suggested model for Health Monitoring System data (a) delay of 5 SNs and (b) delay of 20 SNs.

Fig. 17
figure 17

Delay of the suggested model for Patient Temperature and Pulse Rate data (a) delay of 5 SNs and (b) delay of 20 SNs.

Throughput

Throughput is a vital performance indicator that quantifies the rate at which data packets are successfully delivered from the source to the destination in a specified time period. In IoT-based WSNs, especially for healthcare applications, high throughput means efficient data transmission and better utilization of network resources.

It reflects the network’s ability to handle traffic without significant packet loss or delay and is directly influenced by routing stability, link quality, and congestion management mechanisms48.

$$\begin{aligned} T(X_i) = \frac{P_{\text {received}} \times S_{\text {packet}}}{T_{\text {total}}} \end{aligned}$$
(27)

Where:

  • \(T(X_i)\) is the throughput of path \(X_i\), measured in bits per second (bps),

  • \(P_{\text {received}}\) is the number of packets successfully received at the BS,

  • \(S_{\text {packet}}\) is the size of each packet in bits,

  • \(T_{\text {total}}\) is the total time duration of communication or simulation in seconds.

Throughput is computed for every simulation iteration and averaged across 100 iterations to ensure consistency in performance evaluation.

5-SN scenario:

In the case of 5 SNs as shown in Figs. 18,19,20:

  • The route from the CH to the BS involves fewer hops.

  • Reduced transmission time and lower interference contribute to higher throughput.

This configuration is suitable for smaller networks with real-time monitoring requirements, such as wearable sensors or body area networks.

20-SN Scenario:

In the 20-SN case as shown in Figs. 18,19,20:

  • The routing path spans more SNs, increasing potential delay and interference.

  • Despite this, the proposed PSO and GA routing strategy selects stable paths to maintain high throughput levels.

This scenario evaluates the scalability of the system and its robustness under denser network conditions.

Fig. 18
figure 18

Throughput of the suggested model for Healthcare IoT data (a) throughput of 5 SNs and (b) throughput of 20 SNs.

Fig. 19
figure 19

Throughput of the suggested model for Health Monitoring System data (a) throughput of 5 SNs and (b) throughput of 20 SNs.

Fig. 20
figure 20

Throughput of the suggested model for Patient Temperature and Pulse Rate data (a) throughput of 5 SNs and (b) throughput of 20 SNs.

Energy efficiency

Energy efficiency (EE) is a critical performance metric in IoT-based wireless sensor networks, particularly in healthcare applications where prolonging the network’s lifetime is essential. EE quantifies the amount of energy consumed per successfully transmitted bit. A higher EE implies a more energy-conscious network, translating into a prolonged operational lifetime for battery-powered SNs49.

The general mathematical formulation for EE is expressed as follows:

$$\begin{aligned} EE = \frac{\text {Total Bits Successfully Received}}{\text {Total Energy Consumed (J)}} \end{aligned}$$
(28)

Specifically, for a routing path \(X_i\), EE is calculated as:

$$\begin{aligned} EE(X_i) = \frac{P_{\text {received}} \times S_{\text {packet}}}{E_{\text {route}}} \end{aligned}$$
(29)

Where:

  • \(EE(X_i)\) is the energy efficiency of the routing path \(X_i\) (in bits per Joule, bits/J),

  • \(P_{\text {received}}\) is the total number of packets successfully received at the BS,

  • \(S_{\text {packet}}\) is the size of each packet in bits,

  • \(E_{\text {route}}\) is the total energy consumed (in Joules) along the routing path \(X_i\).

5-SN scenario:

In the 5-SN scenario, the routing paths are typically shorter as shown in Figs. 21,22,23 resulting in :

  • Lower energy consumption as a result of fewer transmission hops.

  • Higher energy efficiency as SNs use less power per packet transmission.

This configuration is advantageous in energy-sensitive small-scale healthcare monitoring applications, such as wearable and personal sensor networks.

20-SN scenario:

For the 20-SN scenario as shown in Figs. 21,22,23:

  • Longer paths and additional intermediate SNs potentially increases energy consumption.

  • The proposed PSO and GA-based routing method optimally selects energy-efficient paths and reduces unnecessary transmissions.

This maintains relatively high energy efficiency despite the deployment of fewer SNs, demonstrating the scalability and effectiveness of the routing approach in larger network environments.

Fig. 21
figure 21

Energy Efficiency of the suggested model for Healthcare IoT data (a) Energy Efficiency of 5 SNs and (b) Energy Efficiency of 20 SNs.

Fig. 22
figure 22

Energy Efficiency of the suggested model for Health Monitoring System data (a) Energy Efficiency of 5 SNs and (b) Energy Efficiency of 20 SNs.

Fig. 23
figure 23

Energy Efficiency of the suggested model for Patient Temperature and Pulse Rate data (a) Energy Efficiency of 5 SNs and (b) Energy Efficiency of 20 SNs.

Performance comparison on Dataset 1: Healthcare IoT data

Table 4 and Table 6 presents a comparative analysis and improved precenatge of the proposed model on the existing methods (ANFIS, GA-PSO, QPSO, ECPF) for the Healthcare IoT Data dataset with 20 SNs. The Proposed Model demonstrates superior performance across all evaluated metrics.

Table 4 Performance comparison on healthcare IoT Data (20 SNs).

Performance comparison on Dataset 2: Health monitoring system

Table 5 and Table 8 illustrate the performance metrics and the improved percentage of the proposed model compared to other methods for the Health Monitoring System data set with 20 SNs. The Proposed Model consistently outperforms the existing methods.

Table 5 Performance comparison on health monitoring system (20 SNs).

Performance comparison on Dataset 3: Patient temperature & pulse rate

Table 6 and Table 9 provides the proposed model comparative overview and it’s improved precentage over the existing methods for the Patient Temperature & Pulse Rate dataset with 20 SNs. The Proposed Model achieves the best results across all metrics.

Table 6 Performance comparison on patient temperature & pulse rate (20 SNs).
Table 7 Percentage improvement over existing methods (Dataset 1).
Table 8 Percentage improvement over existing methods (Dataset 2).
Table 9 Percentage improvement over existing methods (Dataset 3).

Sensitivity analysis of PSO parameters

To evaluate the robustness of the proposed PSO-GA-based routing mechanism, a sensitivity analysis was conducted on the PSO parameters−specifically the inertia weight (w). The inertia weight controls the balance between global and local search abilities of the swarm, which significantly influences convergence speed and accuracy. By varying the inertia weight across different values (0.3, 0.5, 0.7, 0.9), we observed its impact on Packet Delivery Ratio (PDR), delay, and energy efficiency. The results are summarized in Table 10, and reveal that the optimal performance is achieved at \(w = 0.7\), offering a suitable trade-off between exploration and exploitation.

Table 10 Sensitivity analysis of PSO inertia weight.

Statistical significance analysis

To validate the superiority of the proposed approach over existing techniques, we performed statistical significance testing using a paired t-test. This test compares the performance metrics of the proposed model against four benchmark protocols: ECPF, QPSO, GA-PSO, and ANFIS. The metrics evaluated include Packet Delivery Ratio (PDR), Delay, Throughput, and Energy Efficiency. The results, presented in Table 11, confirm that the performance improvements achieved by our model are statistically significant (p-value \(<\) 0.001).

Table 11 Paired t-test results comparing proposed method with existing protocols.

Scalability analysis

To evaluate the scalability of the proposed AFL-PSO-GA approach, simulations are conducted by gradually increasing the number of SNs in the network. The results show that the proposed model maintains its performance in terms of PDR, delay, and energy efficiency, even as SN density increases. This robustness can be attributed to the adaptive nature of FL in CH selection, which dynamically adjusts to the local conditions of the network such as residual energy and SN density.

Furthermore, the hybrid optimization strategy combining PSO and GA ensures optimal routing paths are maintained across varying network sizes. PSO effectively explores the solution space, while GA introduces genetic diversity to avoid premature convergence, thereby supporting better route discovery in larger networks.

However, as the network becomes denser, there is a slight increase in computational overhead due to the increased complexity of decision-making and optimization processes. To address this, future research will focus on implementing lightweight fuzzy inference systems and decentralized routing decisions to further reduce complexity. Additionally, hierarchical clustering and data aggregation strategies may be explored to enhance scalability in ultra-dense deployments.

Analysis of performance indicators

To evaluate the effectiveness of the proposed AFL-based clustering and PSO-GA hybrid routing technique in IoT-enabled healthcare networks, all the above calculated performance indicators are analyzed.

  • Packet Delivery Ratio (PDR): The proposed model achieves a high PDR because of the adaptive fuzzy logic-based CH selection, which ensures that CHs are selected based on link stability and SN density. Furthermore, the PSO-GA-based routing algorithm continuously adapts to network changes, reducing the likelihood of path failures and retransmissions. These mechanisms together contribute to minimizing packet loss and ensuring successful data delivery to the BS.

  • Average delay: The delay is significantly reduced in the proposed method due to the optimal selection of CHs and communication paths. By prioritizing SNs closer to the BS and using stable links, the protocol minimizes transmission hops and queuing delays. The PSO-GA algorithm further ensures that routes with lower congestion and latency are preferred, thereby enhancing the timeliness of medical data delivery.

  • Throughput: Higher throughput is observed as a result of the stable and efficient data transmission facilitated by reliable CHs and optimized routing paths. The fuzzy logic-based CH selection avoids overloaded SNs, and PSO-GA ensures quick path recovery and effective traffic distribution, which maximizes the number of successfully delivered packets per unit time.

  • Energy efficiency: The proposed model extends the overall network lifetime by distributing energy consumption evenly among SNs, reducing premature SN failures. The adaptive selection of CHs based on real-time SN conditions, and efficient multi-hop routing through PSO-GA, delays the energy depletion of critical SNs, thus prolonging network operability.

For further validation and to position our work within the scope of recent advances, we reviewed several recent studies that utilized hybrid and nature-inspired metaheuristic techniques for IoT and Flying Ad Hoc Network (FANET) routing. The work in50 introduces a hybrid metaheuristic routing model for IoT networks during viral pandemics, but is mainly focused on emergency data flow scenarios. In another approach51, the Squirrel Search Algorithm was applied to FANETs to improve mobility-aware routing, although its application in low-resource healthcare IoT environments remains unexplored. Similarly, hybrid optimization models using Black Widow and Harmony Search52, and the Emperor Penguins Colony Algorithm53, offer promising improvements in routing performance54, but their computational overhead and specific problem formulations limit their generalizability55. Compared to these methods, the proposed PSO-optimized fuzzy clustering approach offers a more balanced trade-off between energy efficiency, routing stability, and scalability - particularly suited for healthcare-oriented IoT systems where lightweight and adaptive protocols are essential.

Conclusions

This paper presents a robust and energy-aware clustering and routing framework for IoT-enabled healthcare environments, integrating Adaptive Fuzzy Logic (AFL) with hybrid metaheuristic optimization using Particle Swarm Optimization (PSO) and Genetic Algorithm (GA). The strength of the model lies in its dual-layer optimization strategy−first, adaptive CH selection via fuzzy inference using residual energy, SN density, distance to BS, and link stability; second, efficient route discovery via a hybrid PSO-GA algorithm that balances exploration and exploitation in dynamic network conditions.

The proposed model was evaluated using real-time healthcare datasets (heart rate, pulse, blood pressure) and benchmarked against established protocols including ECPF, QPSO, GA-PSO, and ANFIS. Across all scenarios, the proposed model achieved significant gains: PDR improved by over 30%, delay reduced by more than 60%, and energy efficiency enhanced by up to 40%.These improvements are due to the model’s ability to adapt to network dynamics and avoid energy-intensive or unstable routing paths. The integration of GA further boosts convergence stability and helps escape local optima, making the routing process more adaptive and reliable under complex network conditions Furthermore, visual evidence from clustering heatmaps, optimized routing maps, and temporal plots reinforces the robustness of the proposed model under varying SN densities and deployment scenarios. Furthermore , to support reproducibility, the simulation codes and models used in this study are available from the corresponding author upon reasonable request.

Limitations and future directions

While the proposed AFL with PSO-GA framework demonstrates significant improvements in clustering efficiency and routing reliability, it is not without limitations. The use of hybrid metaheuristics introduces computational overhead, which may pose challenges in resource-constrained real-time healthcare environments. Additionally, dynamic fuzzy adaptation and multi-objective fitness evaluation can increase latency when scaled to very large networks.

To address these challenges, future work may explore:

  • Lightweight approximations of hybrid optimization algorithms.

  • Deployment on edge-computing devices to reduce central processing burden.

  • Integration of online learning or reinforcement learning techniques for real-time adaptive decision-making.

  • Real-world pilot testing in hospital or wearable health networks to assess practical feasibility and responsiveness.

These advancements can further refine the scalability, response time, and real-time applicability of the proposed model in mission-critical IoT healthcare settings.