Abstract
The Internet of Medical Things (IoMT) leverages 5G-connected User Equipment (UE) to enable real-time health monitoring, transmitting patient data to hospital clouds for processing. However, this approach faces challenges in latency, resource efficiency, and energy use, critical for meeting 5G’s ultra-reliable low-latency communication (URLLC) demands in healthcare. This paper proposes an optimized task allocation framework for SDN-enabled 5G IoMT networks, integrating fog computing to process tasks closer to the edge. Patient-generated tasks defined by data size, CPU cycles, and deadlines are intercepted by a dedicated fog broker, which applies a multi-objective optimization model to minimize latency (transmission and processing), load imbalance, and energy consumption across fog nodes. A heuristic solves this NP-hard problem, after which the SDN controller installs optimal routing paths between UEs and selected fog nodes. We evaluate the framework using NS3, Mininet, and Ryu simulations, comparing it against Round Robin and Nearest Fog Server baselines. Results show reductions in latency, deadline violations, and energy consumption, alongside improved load distribution. By harnessing SDN’s centralized control and fog computing’s proximity, our approach enhances QoS, scalability, and sustainability in IoMT, offering a robust solution for next generation healthcare systems.
Keywords: IoMT, Fog computing, SDN, 5G
Introduction
The Internet of Medical Things (IoMT) has emerged as a transformative paradigm in healthcare, integrating sensors, wearable devices, and 5G-connected User Equipment (UE) to enable continuous, real-time monitoring of patient health conditions [1, 2]. In an IoMT ecosystem, patients generate critical data such as heart rates, glucose levels, or emergency alerts that must be transmitted to hospital clouds for analysis, storage, and decision-making [3]. Leveraging 5G’s ultra reliable low latency communication (URLLC) and massive machine type communication (mMTC) capabilities, IoMT enhances patient care by reducing response times and supporting a massive number of devices [4, 5]. However, offloading these computational tasks directly to distant clouds introduces significant challenges, including high latency, network congestion, and excessive energy consumption, which can jeopardize the stringent quality of service (QoS) requirements of medical applications [6].
Fog computing addresses these issues by deploying computational resources at the network edge, such as base stations or smart routers, closer to data sources [7]. Unlike traditional cloud computing, which centralizes processing in remote data centers, fog computing reduces latency by minimizing data travel distance and alleviates cloud load by distributing computation [8]. For IoMT, this proximity translates to faster processing of health data, enabling timely interventions—e.g., detecting anomalies in vital signs within milliseconds [9]. Additionally, fog nodes can preprocess data locally, reducing bandwidth demands and enhancing energy efficiency by offloading only essential information to the cloud [10].
Complementing fog computing, Software Defined Networking (SDN) provides a centralized programmable approach to manage the network infrastructure connecting 5G UEs to hospital clouds [11]. By decoupling the control plane from the data plane, SDN allows dynamic traffic management, real-time topology awareness, and efficient routing through OpenFlow enabled switches [12]. In the IoMT context, SDN’s benefits include optimized path selection to reduce delays, load balancing across network links, and adaptability to fluctuating traffic patterns—critical for handling bursts of emergency health data. Together, SDN and fog computing form a synergistic framework: fog nodes process tasks locally, while SDN ensures seamless data flow between UEs, fog nodes and the cloud.
Current task allocation strategies in fog-enabled IoMT networks often focus on single objectives such as latency or load balancing. However, they neglect critical factors like energy efficiency and deadline compliance, which are vital for healthcare. To address this gap, we propose an optimized task allocation framework for SDN-enabled 5G IoMT networks. Our approach introduces a dedicated fog broker that intercepts tasks from 5G patient UEs—each defined by data size , required CPU cycles, and deadlines before they reach the hospital cloud. The fog broker employs a multi-objective mathematical model to minimize a weighted sum of latency (transmission and processing delays), load imbalance across fog nodes, and energy consumption. Due to the NP-hard nature of this optimization, we design an efficient heuristic to assign tasks to fog nodes, characterized by processing power, energy rates, and bandwidth. The fog broker then instructs the SDN controller to install optimal routing paths, ensuring efficient task execution.
We implement and evaluate our framework using an integrated simulation environment combining NS3 (for 5G and UE modeling), Mininet (for SDN topology), and Ryu (for SDN control). Compared to baselines like Round Robin and Nearest Fog Server our approach achieves significant improvements in latency, deadline adherence, load distribution, and energy efficiency. These results highlight the potential of combining SDN’s network orchestration with fog computing’s edge processing to meet IoMT’s rigorous demands, enhancing both patient outcomes and system sustainability.
Unlike existing works that typically focus on either fog-based task scheduling or SDN-based traffic engineering independently, this work presents a unified framework that jointly optimizes task allocation and network routing. The novelty of the proposed approach lies in (i) a multi-objective formulation considering latency, energy consumption, and load balancing simultaneously, (ii) the integration of a fog broker with SDN control for coordinated decision-making, and (iii) a lightweight heuristic suitable for real-time IoMT healthcare environments.
The remainder of this paper is organized as follows: Section 2 reviews related works. Section 3 details the proposed architecture. Section 4 presents experimental results and performance evaluations. Finally, Section 5 concludes the paper and discusses future research directions.
Related work
Research combining 5G, Software-Defined Networking (SDN) and fog computing for the Internet of Medical Things (IoMT) is scarce, with few studies fully addressing their synergy to meet healthcare’s demanding requirements. Our work focuses on optimizing task allocation in SDN-enabled 5G IoMT networks using fog computing. Here, we review related efforts in edge computing, SDN-based networks and IoMT systems that partially align with our approach.
Several studies leverage fog computing to enhance IoMT performance. Anand et al. [13] proposed a fog-based service composition framework to improve QoS in IoMT, optimizing response time, reliability and energy efficiency. However, it lacks SDN for dynamic traffic management and does not address load balancing or efficient task allocation. Haval et al. [14] developed an IoMT framework integrating WBANs, fog and cloud computing for diabetes prediction, using fuzzy logic and machine learning to reduce latency and execution time. Yet, it overlooks 5G’s low-latency capabilities and fog node resource optimization. Patel et al. [15] introduced FORCE, a fog-based load-balancing framework for IoMT, reducing latency and energy use via region-aware node selection. However, it lacks QoS provisioning and 5G integration, limiting its suitability for next-generation healthcare systems. Sonia and Doha [16] proposed SF-HDRL, combining Federated Learning and Deep Reinforcement Learning for data placement and task offloading in edge-fog-cloud IoMT systems, improving scalability and costs. Nevertheless, it neglects QoS metrics, 5G networks and network simulator validation, reducing its practical relevance. Arafat et al. [17] presented QQAR, a Q-learning-based routing protocol for IoMT-enabled WBANs, enhancing QoS through link reliability and load balancing. However, it omits SDN for centralized control and fog computing for edge processing, limiting its real-time healthcare applicability.
In [18], Kaur and Bhardwaj proposed a Dynamic and Distributed Service Placement Policy (DD-SPP) to address the challenge of efficiently deploying latency sensitive IoT services in edge and fog environments, which suffer from limited resources compared to traditional cloud models. The approach includes three phases: Service Type Estimator (STE), Service Dependency Estimator & Resolution (SDER), and Resource Demand Estimator & Scheduling (RDES) working collaboratively to optimize service placement. Their method achieves notable performance improvements over existing techniques in terms of energy consumption, response time and overall cost. In other research [19], Kaur and Mittal proposed a Matrix-based Task-Fog Pairing (MTFP) algorithm to address the challenge of scheduling real-time, latency sensitive IoT tasks in fog environments with limited resources. By leveraging compatibility and execution time matrices, MTFP efficiently matches tasks to suitable fog nodes to ensure timely execution and improved Quality of Experience (QoE). Experimental results demonstrate that MTFP outperforms existing methods in terms of execution time, delay and energy consumption. However, these studies do not take into account the unique requirements of the Internet of Medical Things (IoMT) and 5G network environments. In [20], Yadav et al. introduced a Lightweight Adaptive Learning Offloading Algorithm to address energy and latency challenges in edge-based smart healthcare systems using IoMT devices. By formulating a joint minimization problem of energy consumption and latency while considering battery constraints and service deadlines the algorithm dynamically adapts offloading decisions using parameters (
) and a configurable tradeoff target. Simulations in iFogSim2 confirm the effectiveness of their proposed method in reducing both energy usage and latency compared to traditional resource allocation methods. As another study, Yadav et al. [21] proposed a Computation Offloading using Reinforcement Learning (CORL) scheme to address inefficient resource allocation in energy constrained, delay sensitive IoMT devices within edge enabled healthcare systems. The CORL algorithm formulates a joint optimization problem to minimize both latency and energy consumption, while respecting battery and service deadline constraints. By leveraging reinforcement learning, CORL identifies optimal resource nodes for offloading tasks, balancing energy and latency trade-offs. Experimental results using the iFogSim demonstrate improved energy efficiency, reduced latency, and better resource utilization compared to traditional methods. However, their researches omit SDN for centralized control and fog computing for edge processing, limiting its real-time healthcare applicability.
Hassan et al. [22] proposed a resource-aware load allocation algorithm for fog-cloud environments, where edge devices are assigned to fog nodes based on sensing rates and processing capacities. Their approach aims to reduce latency and network consumption by balancing workload across heterogeneous fog nodes. While their simulation results demonstrate the effectiveness of their approach in reducing latency and network usage, their model does not incorporate SDN or 5G-enabled architectures. In another work, Hassan et al. [23] proposed a load-aware resource allocation strategy for heterogeneous fog computing environments. The method estimates the volume of sensed data generated by clusters of edge devices and assigns them to appropriate fog nodes based on available computational resources. Their approach demonstrates improvements in latency and network utilization through extensive simulations on different scales using the iFogSim toolkit. However, although their results confirm the effectiveness of load-aware allocation, the proposed framework does not incorporate SDN or 5G-enabled communication mechanisms, which are essential for dynamic network control and ultra-low-latency requirements in modern IoMT systems.
Recent studies have explored SDN-based reconfigurable edge and fog architectures to improve task allocation and network adaptability. For example, Alam et al. [24] proposed a programmable edge network for IIoT that dynamically reconfigures communication and application modules to reduce actuation latency and improve energy efficiency. Similarly, Alam et al. [25] introduced OptiFog, which predicts fog node resource availability using a stochastic model to optimize task offloading and minimize latency. While these works provide effective predictive and adaptive strategies, they primarily target industrial IoT scenarios and rely on complex prediction models. Tripathy et al. [26] proposed a software defined fog architecture for healthcare IoT using WBANs, optimizing fog node utility to reduce delays and energy use via Lagrangian optimization. However, it ignores 5G, constraining its relevance for low latency IoMT systems. Imanpour et al. [27] developed an SDN-based load-balancing approach for multimedia IoMT, using long short term memory and fuzzy systems to improve QoS and efficiency. Yet, it excludes 5G and fog computing, missing critical support for high-bandwidth and edge processing needs. Patel et al. [28] introduced SDN-care, a deep learning-based SDN approach using CNNs to optimize network parameters for Healthcare 4.0 communication. Despite strong performance, it neglects 5G and fog computing, limiting its ability to meet ultra-low-latency and edge-processing demands.
In Table 1, we compare the mentioned work. To the best of our knowledge, no prior work comprehensively integrates SDN, fog computing, IoMT, and 5G to address task allocation in healthcare systems. Existing studies often focus on subsets of SDN, fog computing, or 5G. They typically overlook critical aspects like ultra-low latency or edge processing. In this paper, we aim to bridge this gap by proposing a novel framework that synergistically combines SDN, fog computing and 5G for efficient task assignment in IoMT, ensuring QoS, scalability and real-time responsiveness for modern healthcare applications.
Table 1.
Comparison of related work in IoMT systems
| Reference | Technologies Used | Strengths | Limitations |
|---|---|---|---|
| Anand et al. [13] | Fog Computing | Improves response time, reliability, energy efficiency | Lacks SDN, load balancing, task allocation |
| Haval et al. [14] | WBANs, Fog, Cloud | Reduces latency, execution, authentication time | No 5G, limited fog node optimization |
| Patel et al. [15] | Fog Computing | Lowers latency, energy use | No QoS provisioning, 5G integration |
| Sonia and Doha [16] | Edge, Fog, Cloud, FL, DRL | Enhances scalability, reduces costs | Ignores QoS, 5G, simulator validation |
| Arafat et al. [17] | Q-learning, WBANs | Improves reliability, packet delivery | Excludes SDN, fog computing |
| Kaur and Bhardwaj [18] | Fog-Edge Computing | Enhances QoS, cost efficiency | No 5G and IoMT |
| Kaur and Mittal [19] | Fog Computing | Enhances QoS, delay and energy efficiency | No 5G and IoMT |
| Yadav et al. [21] | Edge computing | Enhances utilization, delay and energy efficiency | No 5G and SDN |
| Yadav et al. [20] | Edge Computing | Enhances delay and energy efficiency | No 5G and SDN |
| Tripathy et al. [26] | SDN, Fog, WBANs | Reduces delays, energy use | No 5G integration |
| Imanpour et al. [27] | SDN | Enhances QoS, cost efficiency | Lacks 5G, fog computing |
| Hassan et al. [22] | Fog Computing | Enhances network consumption and delay | No 5G and SDN |
| Hassan et al. [23] | Fog Computing | Enhances network consumption and delay | No 5G and SDN |
| Alam et al. [24] | Fog Computing | Reduce actuation latency and improve energy efficiency | No 5G and IoMT |
| Alam et al. [25] | Fog Computing | Optimize task offloading and minimize latency | No 5G and IoMT |
| Patel et al. [28] | SDN, Deep Learning | Enhances network consumption and delay | No 5G, fog computing |
Methods
In this section, we present the proposed architecture for optimized task allocation in SDN-enabled 5G IoMT networks using fog computing. The framework integrates a multi-layered topology with a dedicated fog broker to manage patient-generated tasks efficiently, leveraging SDN’s centralized control and fog computing’s edge processing capabilities.
Architecture topology
The proposed architecture comprises several types of nodes, each with distinct functionalities, forming a cohesive system for IoMT task management. The proposed architecture is illustrated in Fig. 1 and detailed below.
Fig. 1.
Proposed architecture
5G network nodes
User Equipment (UE): Represents IoMT devices carried by patients, such as wearable sensors or smart medical gadgets. Each UE generates tasks encapsulating health condition data (e.g., vital signs, diagnostic metrics) with attributes: data size, required CPU cycles and deadlines. UEs connect to the 5G Radio Access Network (RAN) for data transmission.
Radio Access Network (RAN): Consists of gNodeBs (gNBs) that provide 5G connectivity between UEs and the core network. The RAN ensures URLLC and forwards tasks to the fog layer via SDN-managed infrastructure. The 5G RAN uses orthogonal frequency-division multiple access (OFDMA) to minimize interference among UEs, ensuring reliable task transmission. The SDN controller further mitigates network interference by optimizing routing paths to avoid congested links.
Fog layer
Fog Nodes: Deployed at the network edge (e.g., edge SDN switch), fog nodes process tasks locally to reduce latency and cloud dependency. Each fog node is defined by processing power, energy consumption rate and available bandwidth. They execute computational tasks and may forward processed results to the hospital monitoring center.
Fog Broker: A dedicated entity positioned between the RAN and fog nodes, responsible for task allocation. The fog broker receives tasks from UEs via the RAN, applies a multi-objective optimization model and determines the optimal fog node for each task. It then instructs the SDN controller to establish routing paths, ensuring efficient task execution.
SDN layer
SDN Switches: OpenFlow-enabled switches form the network backbone, connecting the RAN, fog nodes and hospital monitoring center. They forward task data based on flow rules installed by the SDN controller.
SDN Controller: A centralized entity (e.g., implemented using Ryu) that manages network traffic and routing. It receives instructions from the fog broker and installs flow rules to direct tasks from UEs to assigned fog nodes and, if needed, to the hospital cloud. The controller maintains real-time topology awareness and link states (e.g., latency, bandwidth).
Hospital monitoring center
Hospital Private Cloud: The final destination for processed health data, located in a centralized and private data center. It stores long-term patient records, performs advanced analytics (e.g., machine learning-based diagnostics) and supports medical decision-making. Tasks processed by fog nodes may be forwarded here for archival or further computation, depending on their nature (e.g., routine vs. emergency data).
This layered architecture leverages 5G’s connectivity, SDN’s flexibility and fog computing’s proximity to optimize IoMT task management, balancing latency, load and energy efficiency.
Problem formulation
We formalize the task allocation problem within the proposed fog computing architecture. To ensure consistency, we use MB/s for bandwidth, MHz for CPU cycles, and J/cycle for energy consumption throughout the model. We assume, the system comprises a set of tasks
, where each task
is characterized by its input data size
(in MB), required CPU cycles
(in MHz), and deadline
(in seconds). Additionally, there is a set of fog nodes
, where each fog node
is defined by its processing power
(in CPU cycles per second), energy consumption rate
(in J/cycle), and available bandwidth
(in MB/s).
The decision variables are binary, denoted by
, where
if task
is assigned to fog node
, and
otherwise. We define latency (
) as the sum of transmission and processing delays for task
on fog node
, calculated as
. Load imbalance is the deviation of a fog node’s load (
) from the average load (
), measured as
. The energy consumed by fog node
to process task
is given by
. The optimization model aims to minimize a weighted combination of total latency, energy consumption and load imbalance, formulated as:
![]() |
1 |
subject to the following constraints:
![]() |
2 |
![]() |
3 |
![]() |
4 |
where
are weights satisfying
, balancing the three objectives. In fact, these weights are tuned based on healthcare priorities and enable IoMT decision makers to adjust the relative importance of each objective according to their specific requirements. For instance, in delay sensitive scenarios, the α coefficient may be set close to 1.0, with other coefficients approaching 0.0. Conversely, in scenarios prioritizing energy efficiency, the β coefficient can be set close to 1.0, while other coefficients are adjusted to near-zero values. Finally, in scenarios where managers aim to distribute the workload evenly among fog nodes, ensuring an approximately equal role for each node, it is advisable to set the γ coefficient close to 1.0, with the remaining coefficients approaching 0.0. Given that evaluating various values for these three coefficients requires a comprehensive sensitivity analysis, which is beyond the scope of this article, we have utilized fixed values for them in Section 4. However, in real-world configurations, managers can determine the desired values for these three coefficients based on their specific needs.
The objective function consists of three components. The first term,
, minimizes the total latency, accounting for both transmission and processing times across all tasks. The second term,
, minimizes the total energy consumption across all fog nodes. The third term,
, minimizes load imbalance by reducing the deviation of each fog node’s load from the average load. The constraints ensure proper system operation. The task assignment constraint (Eq. 2) guarantees that each task is assigned to exactly one fog node. The deadline constraint (Eq. 3) ensures that the total latency of each assigned task does not exceed its deadline. The processing capacity constraint (Eq. 4) ensures that the total CPU cycles assigned to a fog node do not exceed its processing capacity. In fact, the objective function minimizes latency (α-term) to meet URLLC requirements for emergency health data, energy consumption (β-term) for sustainable IoMT deployments, and load imbalance (γ-term) to ensure fair resource use in hospital settings. For clarity, the main mathematical notations used in the proposed model are summarized in Table 2.
Table 2.
List of mathematical notations
| Notation | Description |
|---|---|
| T | Set of tasks generated by IoMT devices |
![]() |
Task i, defined as
|
![]() |
Data size of task (MB) |
![]() |
Required CPU cycles for task (MHz) |
![]() |
Deadline of task (seconds) |
| F | Set of fog nodes |
![]() |
Fog node j, defined as
|
![]() |
Processing power of fog node (CPU cycles per second) |
![]() |
Energy consumption rate of fog node (J/cycle) |
![]() |
Available bandwidth of fog node (MB/s) |
![]() |
Binary decision variable (1 if task is assigned to , otherwise 0) |
![]() |
Latency of task on fog node
|
![]() |
Total computational load on fog node
|
| ρ | Average load across all fog nodes |
![]() |
Energy consumption for executing task on node
|
| Z | Objective function value |
![]() |
Weight coefficients for latency, energy, and load balancing |
Heuristic algorithm
Given the NP-Complete nature of the optimization problem [29], we propose a heuristic to assign tasks efficiently. The algorithm prioritizes minimizing the cost function Z while respecting constraints.
As it shown in Algorithm 1, the task allocation heuristic operates by iteratively assigning tasks to fog nodes to optimize latency, energy consumption, and load balance. Initially, the load
on each fog node is set to zero. For each task
, the algorithm evaluates all fog nodes
by first computing the average load across all nodes as
. It then checks the feasibility of assigning
to
by ensuring the capacity constraint (
) and the deadline constraint (
) are satisfied, where
represents the total latency. For each feasible node, the algorithm calculates the energy consumption
, the load deviation
, and a weighted cost
. As we mentioned in 3.2, the selection of parameters α, β, and γ directly influences the behavior of the heuristic. Specifically, α prioritizes latency-sensitive healthcare tasks, β controls energy-aware allocation, and γ enforces balanced utilization across fog nodes. The heuristic dynamically evaluates these components for each task-node pair, enabling adaptive decision-making under varying system conditions. The fog node yielding the minimum
is selected and the task is assigned by setting
, updating the node’s load and instructing the SDN controller to install a flow rule for routing from user equipment i to the selected node. If no feasible node is found, the task is marked as unassigned and is forwarded to the hospital cloud. The time complexity of Algorithm 1 is O(nm), where n is the number of tasks and m is the number of fog nodes. This arises from the nested loop evaluating each task against each fog node to compute the cost function
. The effectiveness of the proposed heuristic stems from its ability to jointly consider multiple conflicting objectives, namely latency, energy consumption, and load balancing, within a unified cost function. Unlike conventional scheduling approaches such as nearest-node selection or Round Robin, which focus on a single criterion, the proposed method evaluates each task–node pair using a composite metric that captures both system performance and resource utilization. This enables more informed and balanced decision-making, particularly in dynamic IoMT environments. From a computational perspective, the algorithm follows a deterministic greedy strategy with a finite number of tasks and fog nodes, guaranteeing convergence in a bounded number of iterations. Specifically, the algorithm evaluates at most n × m possible assignments, resulting in a predictable execution time suitable for real-time applications. Although the underlying optimization problem is NP-Complete and computing the global optimum is computationally prohibitive, the proposed heuristic provides an efficient approximation with low complexity. Instead of seeking exact optimality, it achieves near-optimal performance in practice, as demonstrated by the experimental results, while maintaining scalability and responsiveness required for healthcare scenarios. For practical IoMT scenarios with hundreds of tasks and tens of fog nodes, the complexity of the proposed algorithm remains manageable, as m is typically small (e.g., 5–10 nodes in hospital settings). To validate scalability, we conducted simulations with up to 25 UEs and 12 fog nodes, as discussed in Section 4, demonstrating real-time performance suitable for healthcare applications.
Figure 2 illustrates the task allocation workflow, from UE task generation to fog broker assignment and SDN-controlled routing to fog nodes or the cloud. According to this figure, the UE node first sends the task specifications to the fog broker node. Based on this information, the broker utilizes the proposed heuristic algorithm to identify the most suitable fog node, referred to as the designated fog node. If such a node is found, its address is communicated to the SDN controller, which then computes the optimal path between the 5G network and the designated fog node and installs the corresponding routing rules on the network switches. Simultaneously, the requesting UE node is notified to transmit the task to the designated fog node. If no suitable designated node is found, the UE node is instructed to forward its request to the cloud layer instead.
Fig. 2.
Task allocation workflow in proposed method
Performance evaluation
In this section, we conduct a comprehensive performance evaluation of the proposed optimized task allocation framework for SDN-enabled 5G IoMT networks using fog computing. We assess its effectiveness in terms of latency, energy efficiency, task completion rates and scalability, comparing it against four baseline approaches: Random Fog Node Selection, Nearest Fog Node Selection, Round Robin and Cloud-Only processing. The evaluation leverages well-established network simulation tools NS3 [30], Mininet [31] and Ryu [32] to model the 5G IoMT environment, SDN infrastructure and task allocation process.
Simulation setup
We simulate the proposed architecture on a virtual machine equipped with 6 CPU cores and 11 GB of RAM. The simulation environment integrates NS3 to model 5G network nodes, including User Equipment (UEs) representing IoMT devices and the Radio Access Network (RAN) with gNodeBs, mimicking patient-generated health data traffic. The simulation environment also uses Mininet to emulate the SDN-based transport network, consisting of OpenFlow-enabled switches. Moreover, Ryu serves as the SDN controller, managing flow rule installation for task routing between UEs, fog nodes and the hospital cloud.
The simulation parameters are summarized in Table 3. We consider three fog nodes and one fog broker, with fog node characteristics (bandwidth, processing power and energy consumption rate) randomly assigned within specified ranges. Each UE generates tasks with random attributes (data size, required CPU cycles and deadlines) within predefined ranges, sending them to the fog broker. The broker evaluates fog nodes using the proposed heuristic (Algorithm 1) and other baselines to assign tasks, ensuring constraints on capacity and deadlines are met. If no fog node can process a task, it is forwarded to the hospital cloud, which has unlimited processing power but incurs a fixed 5 ms transmission delay and 0.5 Joules per second of processing energy. The total simulation duration is 5 minutes per scenario.
Table 3.
Simulation parameters
| Parameter | Value/Range |
|---|---|
| Network Parameters | |
| Number of UEs | 5, 10, 15 |
| Number of Fog Nodes | 3 |
| Number of Fog Brokers | 1 |
| Fog Node Parameters | |
| Bandwidth | 10–30 MB/s |
| Processing Power | 500–700 MHz |
| Energy Consumption Rate | 0.2–0.4 J/cycle |
| Objective Function Coefficients | ![]() |
| Task Parameters | |
| Data Size | 5–10 MB |
| CPU Cycles | 10–50 MHz |
| Deadline | 0.1–0.9 s |
| Cloud Parameters | |
| Processing Delay | 5 ms |
| Energy Consumption | 0.5 J/s |
| Simulation Parameters | |
| Duration | 5 min |
| Tools | NS3, Mininet, Ryu |
| Hardware | 6 CPU cores, 11 GB RAM |
To evaluate scalability, we simulate three scenarios with varying numbers of UEs: 5, 10 and 15. Each UE generates tasks periodically and the fog broker processes them in real-time, instructing the SDN controller to install forwarding rules for UE-to-fog or UE-to-cloud communication.
Baseline methods
To ensure a fair comparison, we evaluate the proposed framework against the following baselines:
Random Fog Node Selection: The fog broker assigns tasks to a randomly selected fog node without considering node capabilities or task requirements.
Nearest Fog Node Selection: The broker greedily selects the fog node with the highest processing power and bandwidth for each task, prioritizing proximity but ignoring load balancing and energy efficiency.
Round Robin: The broker assigns tasks to fog nodes in a cyclic manner, ensuring even distribution but disregarding node capabilities or task deadlines.
Cloud-Only: All tasks are sent directly to the hospital cloud, bypassing fog nodes, to highlight the benefits of edge processing.
The above mentioned baselines were selected to represent common task allocation strategies in IoMT and fog computing literature. Random reflects a naive approach, often used as a lower bound. Nearest prioritizes proximity, common in edge computing but prone to overloading. RoundRobin ensures even distribution, widely used but ignores node capabilities. Cloud-only highlights the limitations of centralized processing in latency sensitive IoMT applications. These baselines provide a balanced comparison to evaluate our optimized approach.
Performance metrics
We measure the following metrics to evaluate system performance:
Total Energy Consumption: The cumulative energy (in Joules) consumed by fog nodes and the cloud for processing tasks.
Fog Completion Rate: The percentage of tasks processed successfully by fog nodes without requiring cloud offloading.
Backhaul Bandwidth Consumption: This metric quantifies the amount of bandwidth used when tasks are offloaded from the fog layer to the cloud. It’s crucial for evaluating how much network resource is consumed when the fog fails to process tasks locally and they must be transmitted to the cloud.
Average Task Completion Time: The average time (in milliseconds) from task submission to completion, including transmission and processing delays.
Average Decision Time: The average time (in milliseconds) taken by the fog broker to execute the allocation algorithm and assign a task to a fog node or the cloud.
Experimental results
The simulation results demonstrate the superiority of the proposed framework across all metrics, particularly in latency reduction, energy efficiency and task completion rates. Below, we summarize the findings for each metric, with detailed comparisons across the three UE scenarios (5, 10 and 15 UEs).
Total energy consumption
Figure 3 illustrates the total energy consumed in each scenario, as well as the energy consumed per task for all compared methods. As shown, offloading all tasks to the cloud leads to significantly high energy consumption, highlighting the importance of fog-based solutions for energy efficiency. Our proposed method consistently achieves the lowest energy consumption across all scenarios. This is because energy efficiency is explicitly integrated into our optimization objective function, guiding the fog broker to assign tasks to nodes that minimize energy usage. Among the baseline methods, Nearest and Round Robin show comparable energy usage, outperforming the Random method. The poor performance of the Random method is due to its lack of awareness regarding node energy states, often resulting in high-energy nodes being chosen arbitrarily. In contrast, Nearest and Round Robin consider network conditions to some extent, leading to relatively better energy profiles. Although the numerical differences between the compared methods in Fig. 3 are not large, the proposed approach consistently achieves better performance. In energy-constrained IoMT scenarios, even marginal improvements can lead to noticeable enhancements in reliability and network lifetime, especially as the system scales.
Fig. 3.
Energy consumption vs. number of UE nodes
Fog completion rate
Figure 4 presents the fog completion rate, defined as the percentage of tasks completed by fog nodes without requiring cloud offloading. Our proposed method consistently outperforms all baselines in this regard. The improvement stems from our method’s balanced consideration of bandwidth, energy and processing capacity, which allows for more effective load distribution among fog nodes. The Nearest approach ranks second, as it attempts to select nodes with high bandwidth and available processing power. However, Random and Round Robin perform poorly because they fail to account for the state of fog nodes, often leading to deadline violations and task offloading to the cloud.
Fig. 4.
Fog completion rate vs. number of UE nodes
Backhaul bandwidth consumption
Figure 5 shows the amount of backhaul bandwidth consumed due to task offloading from fog to cloud. Since our proposed method maximizes fog task completion, fewer tasks are offloaded to the cloud, resulting in significantly reduced bandwidth usage. This directly reflects the higher fog utilization achieved by our method. The Nearest method follows with moderate bandwidth consumption due to its better node selection strategy. Random and Round Robin, which offload more tasks to the cloud, demonstrate the highest bandwidth consumption.
Fig. 5.
Backhaul bandwidth consumption vs. number of UE nodes
Average task completion time
The average task completion time is depicted in Fig. 6. Offloading tasks to the cloud introduces notable delays due to longer transmission and processing times. As such, methods that prioritize fog-level execution achieve lower task completion times. Our proposed method and Nearest both demonstrate shorter response times compared to Random and Round Robin. While these two methods perform closely in terms of latency, our method slightly outperforms Nearest due to its more intelligent task distribution. Round Robin ranks third by attempting a fair distribution of tasks and Random performs worst. Notably, relying entirely on the cloud leads to unacceptably high latencies, which are detrimental in latency-sensitive IoMT applications. It is worth mentioning that although the observed differences between methods in Fig. 6 may appear relatively small in some cases, they are still meaningful in latency-sensitive IoMT environments, where even slight improvements in delay and network utilization can significantly impact overall system performance and quality of service.
Fig. 6.
Average task completion time vs. number of UE nodes
Average decision time
Figure 7 presents the average decision time, which refers to the time taken by the fog broker to assign each task. Our method employs a heuristic derived from a linear programming model to solve the NP-complete optimization problem efficiently. Although our method has a slightly higher decision time compared to others, the difference is negligible less than 0.1 milliseconds and does not impact overall system performance. Round Robin, Nearest and Random exhibit faster decision times due to their simpler logic. Among these, Nearest is slower because it involves evaluating bandwidth and processing availability for node selection.
Fig. 7.
Average decision time vs. number of UE nodes
Scalability analysis of the proposed method
In this section, we evaluate the scalability of the proposed method for larger-scale scenarios. To this end, the simulation duration is set to 10 minutes, and the number of User Equipment (UE) nodes is configured to 25. The number of fog nodes varies between 8 and 12. All other simulation parameters are configured according to Table 3.
The results are presented in the Fig. 8. As illustrated, the proposed method outperforms the baseline approaches across all key performance metrics. This indicates that the proposed approach is well-suited for deployment in real-world IoMT scenarios. It is worth noting, based on both previous findings and the Fig. 8, that although the execution time of the proposed algorithm is slightly longer by approximately 0.1 milliseconds than simpler methods such as random selection, this marginal delay has no significant impact on the overall performance of the IoMT scenario.
Fig. 8.
Performance metrics vs. number of fog nodes
An important observation across all subplots is that increasing the number of fog nodes from 8 to 12 has a negligible effect on the results. This can be attributed to the fixed number of 25 UE nodes in both scenarios. Due to the high network load, the number of requests reaching the fog layer remains relatively low, resulting in minimal performance differences between the two fog node configurations. In fact, it is the large number of UE nodes that leads to saturation of the 5G network, thereby limiting the number of requests forwarded to the fog layer beyond a certain threshold. Scaling the UE count beyond 25 would require an increase in the number of gNBs; however, due to hardware limitations, we were unable to simulate more than 25 UE nodes. Nonetheless, it is important to emphasize that the primary focus of this study is on optimizing the management of the fog layer. In this regard, all obtained results demonstrate the effectiveness of the proposed method within the fog layer.
Practical deployment considerations
Although the proposed framework demonstrates promising performance in simulation, several practical challenges must be considered for real-world deployment. First, fog node heterogeneity is inherently addressed in our model through varying computational resources (e.g., CPU and memory), which are incorporated into the task allocation process. However, real-world environments may exhibit more dynamic and unpredictable resource variations. In addition, network failures and intermittent connectivity can significantly affect system reliability. The integration of SDN in the proposed architecture can facilitate dynamic rerouting and adaptive resource management to mitigate such issues. Device mobility, particularly in IoMT scenarios (e.g., wearable or portable medical devices), introduces additional complexity in maintaining stable connections and low-latency communication. Furthermore, deployment in real hospital environments requires interoperability with existing healthcare information systems, compliance with data privacy regulations, and stringent latency requirements for critical applications. While these aspects are beyond the scope of the current study, they represent important directions for future research and practical implementation.
Discussion
The results highlight the ability of the proposed framework to address the stringent requirements of IoMT. Using SDN’s centralized control and the edge processing of fog computing, it achieves lower latency, less consumption of backhaul bandwidth and reduced energy consumption compared to baselines. The multiobjective optimization of the heuristic ensures a balanced load distribution, preventing fog node overload, a common issue in the Nearest baseline. The scalability of the framework is evident as performance remains robust with increasing UE, unlike Random and Round Robin, which degrade under high loads. Compared to Cloud-Only, the proposed method underscores the advantages of fog computing in reducing latency and energy costs, critical for real-time healthcare applications. This validates the effectiveness of intelligent fog computing strategies in enhancing IoMT system performance. By increasing task processing within the fog layer and reducing reliance on the cloud, our method improves system responsiveness and energy efficiency both critical factors for ensuring patient satisfaction and reliability in healthcare applications.
Although recent studies have explored machine learning and reinforcement learning-based approaches for task offloading and scheduling, such methods often require significant training overhead and computational resources. In contrast, the proposed framework focuses on a lightweight heuristic design suitable for real-time IoMT scenarios with resource-constrained fog nodes. Incorporating learning-based strategies while preserving efficiency remains an important direction for future work.
It is also worth mentioning that in healthcare-oriented IoMT environments, data security and privacy are of paramount importance due to the sensitive nature of patient information and strict regulatory requirements [33]. While the proposed method primarily focuses on efficient task allocation and resource management, the underlying SDN–fog architecture provides a flexible foundation for integrating advanced security mechanisms. In particular, SDN enables centralized and programmable control, which can be leveraged for fine-grained access control, traffic isolation, and real-time anomaly detection [34]. Secure communication can be ensured through encryption protocols and authentication mechanisms between IoMT devices, fog nodes, and cloud layers. Moreover, fog computing allows localized data processing, which reduces the need to transmit raw sensitive data to centralized servers, thereby enhancing privacy. In addition, privacy-preserving techniques such as data anonymization, secure aggregation, and lightweight encryption schemes can be incorporated at the fog layer to further protect patient data. Although a full implementation of these mechanisms is beyond the scope of this work, the proposed architecture is designed to seamlessly support such extensions, which will be investigated in future research.
Conclusions
This paper presents an optimized task allocation framework for SDN-enabled 5G IoMT networks, leveraging fog computing to address the stringent requirements of healthcare applications. By integrating a fog broker with a multi-objective optimization model, our approach minimizes latency, load imbalance and energy consumption while ensuring deadline compliance for patient-generated tasks. The proposed heuristic efficiently solves the NP-hard allocation problem and SDN’s centralized control enables dynamic routing to support seamless task execution. Simulation results demonstrate significant improvements over baselines, including reduction in latency, fewer deadline violations and lower energy consumption, alongside enhanced load distribution. These findings validate the framework’s ability to enhance QoS, scalability, and sustainability in IoMT systems. In practical terms, the proposed approach can reduce patient monitoring delays and optimize resource usage in real-world healthcare deployments. Future work will focus on dynamic fog node orchestration, AI-driven adaptive scheduling, reinforcement learning for predicting task arrivals and prioritizing emergency tasks, and container-based deployment strategies to enable scalable and robust fog infrastructures in real-world IoMT testbeds.
Acknowledgements
The author would like to thank the Faculty of Engineering at Bu-Ali Sina University for providing the computational resources necessary for conducting this research.
Abbreviation
- 5G
Fifth Generation Mobile Network
- IoMT
Internet of Medical Things
- UE
User Equipment
- SDN
Software Defined Networking
- URLLC
Ultra-Reliable Low-Latency Communication
- mMTC
Massive Machine Type Communication
- QoS
Quality of Service
- RAN
Radio Access Network
- gNB
gNodeB (5G Base Station)
- OFDMA
Orthogonal Frequency Division Multiple Access
- WBAN
Wireless Body Area Network
- NP-hard
Non-deterministic Polynomial-time hard
- FL
Federated Learning
- DRL
Deep Reinforcement Learning
- CNN
Convolutional Neural Network
- CORL
Computation Offloading using Reinforcement Learning
- STE
Service Type Estimator
- SDER
Service Dependency Estimator & Resolution
- RDES
Resource Demand Estimator & Scheduling
- MTFP
Matrix-based Task-Fog Pairing
- DD-SPP
Dynamic and Distributed Service Placement Policy
Author contributions
R. Mohammadi conceptualized and implemented the proposed method, and also wrote the main manuscript text. He prepared figures and reviewed the manuscript.
Funding
This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors.
Data availability
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
Declarations
Ethics approval and consent to participate
This study does not involve human participants, animals, or any biological materials. The research is based solely on simulation and computational modeling. Therefore, ethical approval and consent to participate are not required.
Consent for publication
Not applicable.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Razdan S, Sharma S. Internet of medical things (iomt): overview, emerging technologies, and case studies. IETE Technical Rev. 2022;39(4):775–88. 10.1080/02564602.2021.1927863. [Google Scholar]
- 2.El-Saleh AA, Sheikh AM, Albreem MAM, Honnurvali MS. The internet of medical things (iomt): opportunities and challenges. Wireless Networks. 2025;31(1):327–44. 10.1007/s11276-024-03764-8. [Google Scholar]
- 3.Sabil NS, Uddin MM, Miah MS, Rhaman M, Mohammad KT. : wbaniomt integration for a new frontier in healthcare technology. 2024 International Conference on Integrated Circuits and Communication Systems (ICICACS). IEEE; 2024, pp. 1–7.
- 4.Zhang C, Su L. An iomt framework integrating 5g and wireless body area networks for home healthcare. Proceedings of the 2024 3rd International Conference on Networks, Communications and Information Technology. 2024, pp. 166–71.
- 5.Jena R, Barik RC, Yadav DK, Pradhan S. An enhanced qos approach for multi-objective optimization using social spider optimization 5g enable iomt network. Int J Inf Tecnol. 2025;17(3):1851–64. 10.1007/s41870-024-02044-0. [Google Scholar]
- 6.Rezaee MR, Hamid NAW, Hussin M, Zukarnain ZA. Fog offloading and task management in IoT-Fog-cloud environment: review of algorithms, networks, and SDN application. IEEE Access. 2024;12:39058–80. 10.1109/ACCESS.2024.3375368. [Google Scholar]
- 7.Srirama SN. A decade of research in fog computing: relevance, challenges, and future directions. Softw Pract Exp. 2024;54(1):3–23. 10.1002/spe.3243. [Google Scholar]
- 8.H. S, V. N. A review on fog computing: architecture, fog with iot, algorithms and research challenges. ICT Express. 2021;7(2):162–76. 10.1016/j.icte.2021.05.004. [Google Scholar]
- 9.Yıldırım E, Cicioğlu M, Çalhan A. Fog-cloud architecture-driven internet of medical things framework for healthcare monitoring. Med Biol Eng Comput. 2023;61(5):1133–47. 10.1007/s11517-023-02776-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Askar NA, Habbal A, Mohammed AH, Sajat MS, Yusupov Z, Kodirov D. Architecture, protocols, and applications of the internet of medical things (iomt). jcm. 2022;900–18. 10.12720/jcm.17.11.900-918.
- 11.Ahvar E, Ahvar S, Raza SM, Manuel Sanchez Vilchez J, Lee GM. Next generation of sdn in cloud-fog for 5g and beyond-enabled applications: opportunities and challenges. Network. 2021;1(1):28–49. 10.3390/network1010004. [Google Scholar]
- 12.Waseem Q, Din WISW, Aminuddin A, Mohammed MH, Aziza RFA. Software-defined networking (sdn): a review. 2022 5th International Conference on Information and Communications Technology (ICOIACT). IEEE; 2022, pp. 30–35.
- 13.Anand D, Kaur A, Singh P. Optimizing quality of service in iomt through fog computing-enabled service composition. 2024 13th International Conference on System Modeling & Advancement in Research Trends (SMART). IEEE; 2024, pp. 387–96.
- 14.Haval AM, Afzal M. A fog-assisted cloud computing architecture for healthcare monitoring applications using iot. 2024 International Conference on IoT, Communication and Automation Technology (ICICAT). IEEE; 2024, pp. 127–30.
- 15.Patel K, Kanjia A, Kumhar M, Bhatia J, Jadav NK, Guptall R, et al. Force: optimal resource utilization framework for fog-enabled green communication in iomt. 2024 IEEE International Conference on Advanced Networks and Telecommunications Systems (ANTS). IEEE; 2024, pp. 1–6.
- 16.Ikken S, Bitaqa D. Split-federated reinforcement learning for iomt data and task management in edge-fog-cloud infrastructure. 2024 International Conference on Computer and Applications (ICCA). IEEE; 2024, pp. 1–7.
- 17.Arafat MY, Pan S, Bak E. Qqar: a q-learning-based qos-aware routing for iomt-enabled wireless body area networks for smart healthcare. Internet Things. 2024;26:101151. 10.1016/j.iot.2024.101151. [Google Scholar]
- 18.Kaur N, Bhardwaj V. Dd-spp: dynamic and distributed service placement policy for optimal scheduling in fog-edge computing. SN Comput Sci. 2024;5(7):801. 10.1007/s42979-024-03175-8. [Google Scholar]
- 19.Kaur N, Mittal A. Mtfp: matrix-based task-fog pairing method for task scheduling in fog computing. Int J Inf Tecnol. 2024;16(5):3205–18. 10.1007/s41870-024-01817-x. [Google Scholar]
- 20.Yadav R, Shafiq M, Kumar M, Wei L, Abd Elaziz M. Lightweight adaptive learning algorithm for energy-latency tradeoff in iomt-enabled edge computing. Seventeenth International Conference on Machine Vision (ICMV 2024),. SPIE; 2025, pp. 90–97 vol. 13517.
- 21.Yadav R, Zhang W, Elgendy IA, Dong G, Shafiq M, Laghari AA, et al. Smart healthcare: rl-based task offloading scheme for edge-enable sensor networks. IEEE Sensors J. 2021;21(22):24910–18. 10.1109/JSEN.2021.3096245. [Google Scholar]
- 22.Hassan SR, Ahmad I, Rehman AU, Hussen S, Hamam H. Design of resource-aware load allocation for heterogeneous fog computing environments. Wireless Commun Mob Comput. 2022;2022(1):3543640. 10.1155/2022/3543640. [Google Scholar]
- 23.Hassan SR, Rehman AU, Alsharabi N, Arain S, Quddus A, Hamam H. Design of load-aware resource allocation for heterogeneous fog computing systems. PeerJ Comput Sci. 2024;10:1986. 10.7717/peerj-cs.1986. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Alam M, Ahmed N, Matam R, Mukherjee M, Barbhuiya FA. Sdn-based reconfigurable edge network architecture for industrial internet of things. IEEE Internet Things J. 2023;10(18):16494–503. 10.1109/JIOT.2023.3268375. [Google Scholar]
- 25.Alam M, Ahmed N, Ghosh S, Matam R, Barbhuiya FA. Optifog: a framework for acquiring state information and predicting resource availability for task offloading in cooperative fog-networks. IEEE Trans Serv Comput. 2024;1–13. 10.1109/TSC.2024.3414371.
- 26.Tripathy SS, Bebortta S, Mohammed MA, Nedoma J, Martinek R, Marhoon HA. An sdn-enabled fog computing framework for wban applications in the healthcare sector. Internet Things. 2024;26:101150. 10.1016/j.iot.2024.101150. [Google Scholar]
- 27.Imanpour S, Montazerolghaem A, Afshari S. Simulanteous load balancing of servers and controllers in sdn-based iomt. 2024 15th International Conference on Information and Knowledge Technology (IKT). IEEE; 2024, pp. 172–76.
- 28.Patel Y, Kumhar M, Ramoliya F, Gupta R, Bhatia J, Tanwar S, et al. Sdn-care: deep learning-assisted software defined networking framework for iot-healthcare. GLOBECOM 2024–2024 IEEE Global Communications Conference. IEEE; 2024, pp. 2123–28.
- 29.Karp RM. Reducibility among combinatorial problems. In: 50 years of integer programming 1958-2008: from the early years to the state-of-the-art. Springer; 2009. p. 219–41.
- 30.Simulator N -. NS-3. https://www.nsnam.org/ Accessed 2025.
- 31.Emulator M. Mininet. https://mininet.org/ Accessed 2025.
- 32.Controller R. Ryu. https://ryu-sdn.org/ Accessed 2025.
- 33.Almotiri SH. Ai driven iomt security framework for advanced malware and ransomware detection in sdn. J Cloud Comp. 2025;14(1):19. 10.1186/s13677-025-00745-w. [Google Scholar]
- 34.Karki A, Deb R. Comprehensive security analysis and threat mitigation strategies for software-defined networking (sdn) environments. 2025 3rd International Conference on Intelligent Systems, Advanced Computing and Communication (ISACC). IEEE; 2025, pp. 623–28.
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.










































