Abstract
In order to increase the reliability, accuracy, and efficiency in the eHealth, Internet of Medical Things is playing a vital role. Current development in telemedicine and the Internet of Things have delivered efficient and low-cost medical devices. The Internet of Medical Things architectures being developed do not completely recognize the potential of Internet of Things. The Internet of Medical Things sensor devices have limited computation power; in case if a patient is using implanted medical devices, it is not easy to recharge or replace the devices immediately. Biosensors are small devices with limited energy if these devices do not wisely utilize the energy may drain sharply and devices become inactive. The current medical solutions place the bulk of data on cloud-based systems that ultimately creates a bottleneck. In this article, an energy-efficient fog-to-cloud Internet of Medical Things architecture is proposed to optimize energy consumption. In the proposed architecture, Bluetooth enabled biosensors are used, because Bluetooth technology is an energy efficient and also helps to enable the sleep and awake modes. The proposed fog-to-cloud Internet of Medical Things works in three different modes periodic, sleep–awake, and continue to optimize the energy consumption. The proposed technique enabled the sensing modes that gathers the patients’ data efficiently based on their health conditions. The sensed data are transmitted to the relevant fog and cloud devices for further processing. The performance of fog-to-cloud Internet of Medical Things is evaluated through simulation; the results are compared with the results of existing techniques in terms of an end-to-end delay, throughput, and energy consumption. It is analyzed that the proposed technique reduces the energy consumption between 30% and 40%.
Introduction
Over the last decade, with the help of technology, the overall budget for the management of chronic diseases has been reduced. Many technologies/techniques contain specialized devices that continuously monitor real-time body conditions. The use of these devices increased high-speed Internet access, the latest smartphones, advanced applications, and so on. Now, these devices with the latest applications are combined with telemedicine known as Internet of Medical Things (IoMT). The IoMT plays an important role to digitally transform real-time healthcare data. IoMT introduces different business models to develop and enable variations in work procedures, productivity enhancements, cost containment, and improved client experiences. Mobile applications and wearable devices support medical education, tracking, body fitness, healthcare conditions, and so on. The new IoMT analytics can increase the relevancy of data analysis and reduce the medical world and real-time decision-making. As a result, a new group of telemedicine advisors will increase. These groups will have a complete hold on the skills and have the capability to understand real-time health-related data. It can also help their clients to overcome serious chronic diseases and recover cognitive functions. Cloud computing facilities can be retrieved everywhere around the world through the Internet. Cloud computing and Internet of Things (IoT) are mostly reliant on each other. The IoT consists of physical network devices fixed with sensors, software, and network links that allow the devices to gather and transmit data. The combination of information technology and medical technology becomes medical informatics, which reduces the deficiencies in an efficient way. 1 With computers, the Internet, and numerous medical databases, physicians can better understand how to treat patients more efficiently. The use of well-being informatics has opened up the new doors for hospitals to be more proficient of treating patients in a more effective way and helps these hospitals enhance their existing process to make it more streamlined.
IoMT supports device-to-device communication and real-time data gathering which completely transforms the healthcare data, reliability, and affordability in the future. Moreover, patients’ engagement in decision-making increases healthcare services and the usage rate of IoMT will be high in the future. Current research in sensor networks, cloud computing, device mobility, and big data fields will lead to inexpensive medical devices and connected health environment. IoMT has a complex and interdependent system, which enables various components to sense and interact with each other and display real-time data for the users. As it delivers the connected environment, which integrates human intervention with computing-based systems and facilitates data-driven decision procedures. IoMT enabled sensors are used to monitor physical activities, life quality, and diet. IoMT devices have enabled well-being supervision with observing systems for diet, physical activities, and life quality. Advanced sensor devices, like wearable, implantable, and embedded systems, track continuous body data on patients’ activities. Advanced sensor devices, converters, and firmware in smart devices allow users to examine and associate various vital activities with well-being conditions locally. Furthermore, the remote networking abilities of these sensor devices deliver medical expert support in emergency conditions in any remote area using cloud computing. Real-time monitored data from the medical sensors allow physicians to manage medications and assess response during an emergency that ultimately reduces the cost of hospitalization. 2
The traditional medical system is on the edge of the radical variation with the rapid improvement of wireless technologies. The acute diseases are the top reasons for death; the traditional medical care is not sufficient in case of serious conditions. According to the survey, more than 50% of the deaths are caused by the strike and heart attacks. 3 IoMT healthcare with wireless communications offers an uninterrupted real-time health monitoring that improves the quality of service and decreases the cost. It also increases the capabilities to predict the exact disease. The enhancement of the system is based on the improved wireless body area network (WBAN). 4 A WBAN contains the wireless biosensors placed around the body, which are used to measure the body movement, temperature, and signals even in their daily activities. 5 WBAN gathers and analyzes the real-time data, which is further handled by the smart medical servers. 6 The monitoring of public healthcare arises with the perception of creating a network covering a region around a local community. A public healthcare system should have an efficient IoMT network. The series of such networks can be recognized as support networks. It is highly required to raise awareness about children’s health and educating the community as well as children themselves on requirements of children with sensitive, behavioral, or mental health-related issues. This also has encouraged researchers to implement a particular IoT-based system.
In order to invent a context-aware IoMT, third-party inventors need standard frameworks with appropriate appliances, known as embedded context prediction (ECP) service. IoMT applications are categorized into two groups, clustered disease and single disease IoMT applications.6–9 A single disease IoMT application is used for a single specific disease where a clustered disease IoMT application is used for more than one diseases at the same time. Many non-intrusive medical sensors have been invented for different medical applications, based on wireless sensor network criteria. These sensors can send the required enough data. On the other side, wearable medical sensor devices have invented with different required features. The combination of the above-mentioned medical sensors in the wearable devices is apparent. The first system to observe the patient condition since the disease at an initial stage and it can prevent the serious condition. The second system is the medical automation wearable device that has the ability to offer continuous medical treatment and enhance the quality of life. 7 There are different types of electronic devices, wearable smart devices that are usually placed in, on, or close to the body. These devices have an efficient and intelligent functional system. Near body devices, which are located near the body organs where it does not directly interact with the outer surface. On body devices, which are located near the body organs where it can directly interact with the outer surface. In body devices that fixed inside the body organ and electronic textile devices, which are fabric-based devices and a patient can wear it as shown in Figure 1.

Medical wearable smart devices.
In this article, IoMT communication is divided into two groups based on the communication range. Communication between WBAN devices is considered as short-ranged communication and long-ranged communication is between WBAN central device and base station.
The whole area is divided into clusters, where all the medical sensors are connected to their respective cluster heads also known as bio-gateways. The major task of the bio-cluster is to forward the received data to the respective bio-fog that monitors the data and forward to the bio-cloud for further processing.
The proposed technique has three sensing modes periodic, sleep awake, and continuous, which are used for monitoring and sensing.
The rest of the paper is organized as follows: in section “Related work,” literature review and problem statement of the related work are analyzed. In section “The proposed an energy-efficient FC-IoMT architecture,” the proposed work is described where it reveals how efficiently fog-to-cloud Internet of Medical Things (FC-IoMT) gathers and handles the medical data. The performance evaluations and results are analyzed in section “Results and discussion.” Finally, the conclusions are drawn in section “Conclusion.”
Related work
Cloud technologies had extensively researched because of their help in the management and processing of big data. There are many cloud-based IoT techniques like smart grid 10 and mobile cloud computing for smartphones, 11 where complex calculations are unloaded from the low-resource mobile devices to the cloud locations before the outcome is reverted to the mobile device. A number of related research articles have been surveyed in the cloud-based medical systems. It is analyzed that none of the articles is considering all the pros and cons of medical in IoTs. In recent years, many research conducted on the benefits of the cloud-based healthcare system. These benefits based on the three main services mentioned by cloud technologies. First, software as a service offers healthcare applications required to process healthcare information and other related tasks. Second, platform as a service offers an environment where inventors generate and deploy applications. Third, infrastructure as a service presents virtualized resources like storage, communication, and computation on request.
The collected data from different IoT sensors always reached at physical data centers through multi-hop, which can affect the latency. In the heterogeneous medical system, the administration of the cloud-based resources performs different tasks to overcome continues re-allocation of resources in response to unreliable data overload from the healthcare systems. In this scenario, fog computing is the best solution that discovers capable and low weight computing edge devices near the medical IoT structure. 12 The edge devices include routers, switches, or other low computing devices equipped with computational management tools, services, and infrastructure. A fog computing system is organized in a hierarchical manner, where each device is equipped with memory for data buffering and data processing. In a fog-based healthcare system, the lowest fog level includes an application gateway device. An application gateway device has the abilities to get the sensed data, process it, and forward to the upper-level fog computational devices for further processing. A fog device has the ability to keep the core, memory, bandwidth, and other fog resources virtualized and share in a micro-computing instance form. A fog-enabled system allows the users to turn fog devices inactive if these are not in use and reactivate according to the requirement. The resources of fog computing are controlled in terms of energy consumption; these are flexible to modify according to the application framework. Hence, a fog computing system is an energy efficient and scalable system. 13 As an output, data processing can perform near the edge devices; it reduces the multi-hop communication latency and increasing service flexibility.
There is an emerging trend in the deployment of fog computing in IoMT. A fog-based health monitoring system is presented in Gia et al., 14 which explains a reliable cardiac monitoring system at a low cost. The system consists of energy-efficient smart sensors and gateways. The smart sensors gather ECG, data analysis, notification, respiratory rate, temperature, and so on. The authors 15 proposed fog-based healthcare technique, which behaves as an intermediate layer between the cloud and IoT sensor to improve data confidentiality and security. This model can deploy in a modular way and it is capable of combining data from many sources with the acceptable cryptographic assessment. The service-oriented architecture of fog computing 16 evaluates and validates the healthcare data through IoMT. In this proposed technique, resource-constrained embedded computing instances to gather data mining and analysis. The instances are also responsible to detect the key patterns form healthcare data and forward it to cloud for further processing. The main purpose of this technique is to highlight big data processing with low-power fog computing resources.
The system architecture of a cloud-based IoT healthcare solution (CBS) is presented in Mahmud et al., 13 which follows a general architecture but uses different functionalities of applications. The medical sensors transmit the gathered data through Bluetooth, ZigBee, or infrared. As IoT devices have less computational and networking capabilities, therefore it includes the use of smartphones. The smartphones provide application interfaces and transmit received data to the cloud data centre, which is the main platform for IoT healthcare solutions. The cloud data centre consists of (1) resource manager: that is responsible for managing cloud resources, deploying and monitoring the architecture and healthcare services. (2) Servers: the cloud healthcare system, consist of application and database servers are used that manages the set of policies for allocating resources. (3) Virtual machines (VM): the relevant applications and web services are executed in the VMs of the application server. The great amount of healthcare data is handled within the VMs of the database server. The general cloud-based Healthcare application model is described through a flowchart as shown in Figure 2. Where after the initialization and authentication, sensors start monitoring and send monitored data to the smart devices. Smart devices send monitored data to the cloud system; the cloud system performs data abstraction, analysis, and evaluation. After evaluating the data, the cloud system sends notifications or alerts to smart devices.

CBS healthcare model. 13
The problem with the CBS system is that the fog structures are different from the cloud structures in terms of capacity, capability, and organization, therefore, CBSs lose interoperability when they are used with the fog environment. Moreover, when the CBSs get the data for different patients and forward to the cloud where a cloud each time performs data abstraction, analysis, and evaluation. It is also responsible to notify the correspondent users through notifications. When a cloud will perform these tasks for many users, the performance of the cloud system will reduce and there will be a delay. It would be difficult to manage the user’s requests on time.
To facilitate placement of CBS in fog environment, a fog-based IoT-healthcare solution structure with the integration of cloud fog services in interoperable Healthcare solutions as presented in Fog Cluster-based IoT-Healthcare (FCIH). 13 An overview of interoperable fog-based solutions is presented in Figure 3. Where fog devices are arranged hierarchically, the lower level fog nodes exist closer to the IoT. Thus, for a specific healthcare solution, a lower level fog device can be considered as a gateway. A gateway device can process the monitored health data or can forward to the upper-level fog devices. According to the technique, many devices from same or different fog levels can create a cluster among themselves with faster networking standards. In a cluster, some devices are responsible to run the applications and other devices act as host database or manage communication with the other clusters. Usually, each fog cluster is responsible for a specific healthcare solution. The devices, which do not belong to any cluster in this architecture, are considered as networking devices. All the communications inside or outside of the cluster are handled by the cluster head. In a cluster, whenever a device receives information, it matches the data relevancy with the related healthcare solution and informs the cluster head. The cluster head based on the notification forwards the data information for further processing. The main problem with FCIH is energy consumption, it consumes more energy because it performs clustering and selects a cluster head from the available devices at different levels, and this technique assigns different tasks (administrative tasks like scheduling, processing, and storing) to different devices. If a fog device is only responsible for a specific healthcare solution and executes in more than one cluster, it will consume more resources and create a delay for the other healthcare solutions.

An overview of interoperable fog-based solutions.
Many research issues have been observed from the literature review, wearable medical devices have limited battery power, flexible movement, and group-based mobility. 17 The batteries of biological sensors require battery replacement after a limited time. The major problem with the system is the service disconnection and data loss. The implanted sensors’ battery replacement is very inconvenient. The other critical issue is related to mobility, as WBAN is dynamic and varying the topology frequently. There are many biosensors along a gateway device are moving at the same time, called cluster. There will be an interference if there are many clusters moving freely in the same location. As biosensors can utilize limited frequencies for the communication between biosensors and the smart device, interference will occur if the communication range will cross the available frequency. Due to the traditional scheduling techniques that monitor the channel frequently, battery life decreases. Therefore, an energy-efficient IoMT network is required. As biosensors are wearable, implanted, or attached to the user due to the energy and design constraints, sometimes these sensors cannot transmit the data to the main device directly. In this case, a relay device is needed which can balance the energy and decrease the response time and delay of IoMT network.
The proposed an energy-efficient FC-IoMT architecture
The general overview of the proposed an energy-efficient FC-IoMT architecture is illustrated in Figure 4, that consists of biosensors, bio-gateways, bio-fog devices, and a back-end bio-cloud system. These devices are reserved for the medical purpose, therefore, called bio-devices. This architecture refers to a framework for the description of physical devices, their functions, techniques, and principles. The biosensors monitor the body and send the sensed data to the closed bio-gateway where it extracts the essential data through data abstraction. The biosensors and a bio-gateway are connected through Bluetooth technology. A bio-gateway connects to the bio-fog through WiFi where it receives the extracted data and transmits to the bio-fog for further analysis and processing. A bio-fog is further connected to the bio-cloud through WiFi, where a bio-cloud provides a user application platform and other services like storage, analysis, evaluation, notifications, and reports. End users, for example, medical experts can get the real-time data and medical history from a bio-cloud.

General overview of the proposed FC-IoMT architecture.
The FC-IoMT communication is classified into two groups based on coverage range, short range and long range. The short-range communication shows the communication between WBAN devices and central device, whereas the long-range communication shows the communication between the WBAN central device and a WBAN base station. In the framework of WBAN, short-range communication links are usually established between sensor devices and the central data processing device. The short-range devices use Bluetooth, where the central device acts as a center of topology linking other Bluetooth enabled sensors. The range of Bluetooth technology is 10 m, which is sufficient for WBAN. Bluetooth has low energy consumption is low as it operates on 2.4 GHz frequency, it has low latency (3 ms), high data rate (1 Mbps), and high security. Energy consumption is very low. It is presented that a 180 mAh coin cell battery can execute a Bluetooth chip for 18 non-stop hours, creating 21.6 million transactions. If a chip switched off when not in use, the battery life increased. Bluetooth is highly recommended for medical sensors with appropriate hardware design and low power consumption. It offers robustness to interference and many security techniques.
According to the proposed FC-IoMT architecture, the area is divided into clusters as shown in Figure 5. Where patients’ sensors are connected to a bio-gateway, which acts as a cluster head. Through the clusters, communication can be managed locally. The bio-gateways receive the sensed data and forward to the respective bio-fog and then bio-cloud for further processing. The proposed FC-IoMT optimally assigns the users’ requests in FC-IoMT architecture. In order to optimize energy efficiency and decrease the latency of FC-IoMT, bio-gateways are integrated with the fog devices because bio-gateways can respond and optimize the data quickly. The bio-fog has the capability to connect many gateways from the same location and the bio-cloud can connect many bio-fogs from different locations.

A scalable and well-structured hierarchy of FC_IoMT.
It is assumed that there is a total n number of bio-gateways BG = {BG1, BG2,…, BGn} where each bio-gateway has m number of connected biosensors BS = {BS1, BS2,…, BSm}. Biosensors send the resource information and collected data to the bio-gateway where it performs the data abstraction, and forward the data to bio-fog. Bio-fogs are physically located in the local regions close to the respective bio-clusters where they access many bio-cloud resources to execute their requests. There are l number of bio-fogs BF = {BF1, BF2,…, BFl} located in different regions. One region is divided into many clusters; each cluster has one bio-gateway. One region has one bio-fog with specific virtualized hardware resources. These resources include storage memory, processor, bandwidth, load balancer, virtual machine monitor, and so on. A bio-fog has many virtual machines VM = {VM1, VM2,…, VMn}, managed by a virtual machine monitor. A virtual machine monitor is capable to execute different operating systems and it behaves like an interface between the operating system and virtual machine. Bio-fogs are intermediate devices between bio-gateways and bio-cloud. A total number of requests Rt from n number of bio-gateways can be calculated through equation (1) as follows
In order to determine the total processing time (Pt), first, there is a need to gather information about all the requests and related virtual machines. A symbol λ is used to show the status of a request. After that Pti, j of assigned request i to virtual machine j can be calculated as follows
where Pe is the initial response time (ResT), DT is delay time, ET is end time, and arrival time is denoted by AT. Equation (4) shows that ResT is the time reserved by a bio-fog to get the requests from bio-clusters.
Bio-fogs are positioned in different areas to facilitate the local bio-clusters; it helps to reduce the response time and increase the efficiency of resource allocation. Bio-cloud delivers the required resources and increases overall efficiency. According to the proposed FC-IoMT technique, Bluetooth enabled medical sensors were used. Bluetooth technology has appeared as an ideal wireless technology in the diagnostic and medical devices. It is mostly available in smart devices and commonly accepted by the medical system. Bluetooth enabled bio-devices (due to energy efficient) become more integrated into objects that a patient can swallow, hold around, or wear. The use of Bluetooth was helpful as it can enable the sensor devices with sleep–awake mode with respect to the event and time. A biosensor includes the following modules:
Microcontroller: An integrated circuit embedded with memory, processor, input–output, and a sensor. It is responsible to execute specific operations. It is responsible to process the transduced signal and make it for display. The complex electronic circuitry performs amplification and signal conversion.
Serial peripheral interface (SPI): it behaves as an interface used for local communication over the short distances. SPI enabled biosensors to have the ability to communicate in a full-duplex mode. According to FC-IoMT architecture, biosensors are considered as slave devices and bio-gateways as master devices. SPI is preferred because of its high data rate and less power consumption.
nRF24L01 module: A microcontroller obtains the detected data and sends to the nRF block through SPI. It consists of an integrated circuit and an antenna. A nRF24L01 is selected because it is specially designed for the medical and scientific frequency band. The communication link that transmits the data known as uplink, conversely, it is known as a downlink for receiving the control messages.
After initializing and scanning, the biosensors select the required monitoring mode. FC-IoMT has defined three sensing modes “periodic, sleep–awake, and continuous.” In period mode, monitoring is done based on the predefined periods; this mode consumes very less energy. The monitoring periods of this mode are fixed. The periodic mode avoids the overhead of biosensors, minimize idle time, reduces data loss, and overcomes collision. When biosensors will monitor periodically, more energy can be saved but for the serious patients, we cannot prefer it.
In the sleep–awake mode, monitoring is performed as requested; in this mode, several functional modes are switched off but it is made capable to accept the requests. The sleep–awake overcomes the data traffic and energy consumption issues. The use of the sleep–awake mode of biosensors shows energy optimization. The main purpose of this mode to saving energy, prolong the network lifetime, reduce the delay by using optimized sleep awake mode. It is highly required to check the energy status of biosensors before executing the sleep–awake mode. The energy status shows the remaining energy of biosensors; if the remaining energy is more than the transmission power threshold, sleep–awake mode is used normally. If the remaining energy is within the range of power of transmission and receives threshold, biosensors will only transmit the data. If the remaining energy of a biosensor crosses the transmit and receive power threshold, biosensors will be considered as dead nodes which cannot monitor and transmit the data. It is assumed that the devices in the network are synchronous and sensors can sense the events and predict the remaining energy. Following is the assumption of each biosensor’s monitoring and transition in the network: initial energy E (J), monitoring range Mr (cm), data packet load L (bits), and transmit range Tr (cm). Equation (5) shows the energy consumption of biosensors for data transmission. Equation (6) shows the energy consumption of biosensors for receiving data
where L represents a data packet load and Ereq is the required energy for data transmission. Due to data transmission,
The third mode is the continuous monitoring mode; it is highly recommended in case of emergencies, even though it consumes more energy. Once all the biosensors paired with their respective bio-gateways over the Bluetooth link, biosensors start capturing the data and save as first-in-first-out manner in an array. The minute’s array is full, and data are sent to the bio-gateway through GATT-UART standard service. This service is used because it provides information about the location, name, and actions of the paired devices. A request of the GATT-UART Service can be modified by calling the function (object’s notification), explained in the header of GATT-UART Service. Once these are updated, modifications are sent to the bio-gateway. Bio-gateways are smart devices, equipped with android applications. Bio-gateways and bio-fogs are configured with the Message Queuing Telemetry Transport (MQTT) protocol, as this protocol is specially designed for the fog and IoMT devices. It has the ability to purify the required data based on the topic and message type. After a successful MQTT configuration with a protected socket, devices’ IDs and passwords allocated to subscribe or publish for the further security.
The FC-IoMT bio-gateways have enabled local mode and foreign mode. The local mode shows the whole information received from the biosensors through the Bluetooth links. The foreign mode is playing the role of a bridge between sensors and bio-fog. An Android-based bio-gateway receives the sensed data updates after every 100 ms and then it filters the data. The biosensors send the data in a byte array form, after receiving the relevant essential data; it uploads the data to a bio-fog for further processing. A bio-fog performs data abstraction and displays the data in the simplified form. A bio-fog receives the data from many connected bio-clusters; it identifies the clusters having critical data and forwards to the bio-cloud through Wi-Fi for an immediate decision and further processing. It has the capability to display the evaluated results to the physician and patient. A bio-cloud authenticates users and creates sessions for them. Once the user authentication process is completed, the user can download and upload new information based on IDs. A user can be a patient, physician, or any other authorized person. These users can access the data anytime from anywhere. The framework of the proposed FC-IoMT is shown in Figure 6.

The FC-IoMT framework, biosensors stream gathered data for processing.
Results and discussion
Simulation parameters and performance metrics
In this section, the performance of the proposed FC-IoMT is analyzed through simulation. It shows that it is not necessary for a patient to spend more time at the hospital; patients can get their quick response from the physicians. In order to show the feasibility of FC-IoMT architecture and interoperations with the fog and cloud computing, we have simulated in the iFogSim. 18 The results are compared with the CBS and fog–cluster-based IoT healthcare (FCIH). As CBS and FCIH techniques are closely related with the proposed framework. The simulation parameters are summarized in Table 1.
Simulation parameters.
CSMA/CA: carrier-sense multiple access with collision avoidance.
The network technology links patient sensor devices to remote areas and control monitored data transmission. These network technologies grouped into Bluetooth low energy (BLE), WiFi, cellular, ZigBee, and so on. The IoMTs are wireless technologies; these are user-friendly and permit the user to move freely. In the majority of cases, the remote monitoring devices are considered more user-friendly form factor, appearing to the patients or users to be more like wearable technology than medical devices. When devices appear more like wellness devices, patients are more likely to actually wear them. There is significant interest in the use of medical wearables, including a smartwatch, smart fabric, glucose monitoring devices, pulse oximeters, electrocardiogram patches, and many other devices. The new trend in medical devices is based on more user-friend, well-organized data collection, and efficient remote monitoring. Rather than a doctor’s clinic or hospital visit, remote health monitoring depends on patients regularly monitoring their own glucose level, blood pressure, oxygen level, and other conditions in a home environment. The IoMTs perform this process automatically and transmit data to the healthcare organization’s platform using wireless links.
Simulation results
Network delay is an important parameter in healthcare application; therefore, it is highly required to calculate the network delay. In the health monitoring systems, some applications are responsible to capture the audio/video data from the patients and transmit. If there will be a delay and data will not receive on time, it may create a critical situation. The end-to-end network delay is defined as the time consumed in data transmission from one end to other end and it is calculated through equation (7). In order to overcome the delay, we used clustering techniques based on their locations. Different biosensors in a cluster gather the data and send to the respective bio-gateway. To avoid delay, we utilized three modes of sensing the data (periodic mode, continuous mode, and sleep–awake mode). Biosensors set the continuous mode in case of a critical situation when a patient is under observation for 24 h. Biosensors set a periodic mode during the patients’ normal condition when data are not required continuously; it gathers and sends the data after some predefined periods. When data are required on demand, sleep–awake mode is set.
FC-IoMT analyses the data at the bio-gateway; it transmits the simplified data to the bio-fog. When a bio-fog receives the simplified data from different clusters from different locations, it can easily perform its processing and send data to the bio-cloud for further processing and decisions. The previous techniques CBS and FCIH consume more time because they performed clustering based on similar or different fog levels and they choose a cluster head from the available devices at different levels. FCIH simplifies the data at fog device that ultimately takes more time to simplify and send it to the cloud for further processing. According to the previous FCIH, some devices gather the data and others are assigned administrative tasks like scheduling, processing, and storing. Network delay is depicted in Figure 7; the graph shows the average delay from biosensor → bio-gateway → bio-fog →→ bio-cloud. The graph shows the average network delay for up to 35 patients having a different number of sensors in different clusters. From the results, it is observed that delay increases with the increase in patients. When patients increase, the number of sensors will also increase and ultimately they will take some time to start up the devices and for making new connections

Average end-to-end network delay result of multiple patients’ monitoring.
Energy consumption is calculated for the successful transmission of data. Figure 8 depicts the energy consumption rate of FC-IoMT against CBS and FCIH. The result shows how average energy consumption differs when the sensors’ transmissions rate increases. The proposed FC-IoMT’s energy consumption rate for sending different data is less than the CBS and FCIH. The reason behind more energy consumption of previous FCIH is an inefficient clustering, where each fog device is only responsible for a specific healthcare solution, which executes more than one cluster. The isolated devices that do not belong to any cluster will execute the role of the network node. The graph represents the highest performance of FC-IoMT compared to the previous techniques. The reason behind the best performance of FC-IoMT is an efficient clustering and data abstraction techniques. It manages the data load first at the bio-gateway and then discards the metadata and extracts the healthcare data at bio-gateway and bio-fog. Finally, it transmits the final evaluations to the bio-cloud for further processing.

Average energy consumption rate per data packet over the time unit.
We used Carrier-sense multiple access with collision avoidance (CSMA/CA) protocol that permits a network to optimize the network resources especially energy consumption. The total energy consumed by an FC-IoMT device depends on the number of tasks performed by the device to send the data. There are four energy parameters listed in equation (8). The results show that first energy consumption increases and after 200 ms, it starts decreasing because of different monitoring modes based on patients’ conditions. When continuous modes were set, the network consumed more energy, as the continuous mode is used during the patients’ critical condition when it was highly required to monitor the patients continuously. After that, the periodic mode was set to monitor the patients’ condition where network consumed less energy as compared to the continuous mode. Finally, we set sleep–awake mode, and it was observed that the overall network energy consumption was low
where T_Ed is used to show the total energy consumed by the FC-IoMT device, E_Tx shows the total energy consumed for data transmission, E_ReTx is the total energy consumed for data retransmission, E_Cacc is the total energy consumption for channel access, and E_ack is the energy consumed for the packet acknowledgments.
From the FC-IoMT throughput evaluation results, as shown in Figure 9, it received a maximum number of data packets as compared to the other techniques. The throughput was monitored with respect to the number of sensors; the throughput increases for the lower number of sensors and when more sensors were added then due to heavy load it starts gradually decreasing. The reason behind the throughput dropping can be a delay. Links passed by from end to end is biosensors–bio-gateways–bio-fog–bio-cloud. One bio-gateway receives the data from all connected biosensors and transmits to the bio-fog. Whereas a bio-fog receives the data from many connected bio-gateways, therefore a single bio-fog has to manage the heavy load. Bio-fog is not only responsible to transfer the data; it has to perform its specific tasks link abstraction and processing of data. So if there will be a heavy data load, then there may be delay and contention that causes some packets loss. There are two main packet loss reasons: one is the packet lifetime expiry due to the predefined transmission attempts and the other reason is the Bluetooth link error between sensors and gateway devices. It can occur due to retransmissions and delay.

Evaluation of network throughput with respect to the number of biosensors.
It is observed from the results; with the same number of transmitted data packets, the received packet rate is different in all different techniques. The proposed FC-IoMT has received the maximum number of the data packet as compared to the FCIH and CBS techniques because FC-IoMT handles the data efficiently on each phase of data processing. It is a very important factor, especially when we are dealing with telemedicine or IoMT-based systems. It is essential, as medical vital information needs to be received on time at their predefined ends in the highest data rate. Throughput is a measurement that reveals the average rate of received data packets over the communication channel with respect to the total transmitted data packets. It can be calculated by the following equation
Conclusion
Smart devices are developing as a low power, low cost, and feasible for the fast development of medical applications. However, the real potential of smart mobile devices on the Internet of medical thing scenarios should be carefully scrutinized. This article has presented an energy-efficient FC-IoMT architecture, in which a set of smart devices are considered, which gathers and analyzes the medical data. A bio-gateway is used between biosensors and bio-fog; it enables two modes: foreign and local. Local mode enables the links between biosensors and bio-fog through Bluetooth links whereas the foreign mode uses WiFi to make the links between bio-gateways to bio-fog and further between a bio-fog to the bio-cloud. In order to make it an energy-efficient technique, FC-IoMT enables three sensing modes periodic, sleep–awake, and continuous. During simulation, different modes are dynamically activated based on patients’ conditions. The sleeping sensors process their sleeping schedule according to their own remaining energy and attain the usefulness of saving energy. The sensed data are transmitted to the relevant fog and cloud devices for further processing. The performance of FC-IoMT is evaluated through simulation, and the results are compared with the results of previous techniques. It was observed that more power of biosensors is saved that prolong the life of the entire network. For latency optimization, a bio-fog is integrated into the bio-gateways because bio-gateways can optimize the data quickly. The simulation results of FC-IoMT are compared with the previous techniques and it was observed that FC-IoMT is an efficient technique because it optimally gathers the data from biosensors and assigns the patients’ requests in the bio-fog and bio-cloud-based architecture. By applying FC-IoMT architecture in the daily life medical systems, the critical patients’ conditions and emergencies can be informed on time to the medical experts to avoid serious consequences.
In the future, artificial intelligence can be utilized to predict the data load and network failure. It is highly required that the bio-fog should include a module that will predict the mobility of patients and gateways and manage it accordingly.
Footnotes
Acknowledgements
The authors, therefore, acknowledge with thanks DSR for technical and financial support.
Handling Editor: Ghufran Ahmed
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This project was funded by the Deanship of Scientific Research (DSR), at King Abdulaziz University, Jeddah, under grant no. G-260-612-39.
