# Fuzzy-Based Dynamic Time Slot Allocation for Wireless Body Area Networks
## 1 Introduction
It also includes the sharing of medical information among the medical institutions, family members and the related personnel [12]. IoT-based health applications are not sufficient for pervasive monitoring, which requires additional analysis and decision-making capabilities. In order to overcome this shortcoming, IoT enabled cloud-assisted monitoring services came up. However, these also suffered due to discontinuities in the network connectivity [13]. Hence, an extended version of cloud computing, called fog computing [14] or fogging, is used now, in which computations can be done in any node, called fog node or nodes at the edge of personal area network (PAN). In a similar manner to cloud computing, fog nodes are also prone to failures. However, the impact of failure is less and easier to handle for fogging in comparison with the cloud [15]. Cloud failure affects the entire hospital, whereas fog failure is restrained to a smaller area such as a hospital ward or a block. In short, fog computing can overcome the limitations of cloud computing, including high bandwidth constraints, dependency on network infrastructure, unpredictable time of response from the cloud for emergency cases, and so on. The fogging has a shorter response time, as the data processing is carried out at the edge of the network and close to the source along with securing the data within the network. Figure 1 shows an example of an in-hospital block-wise health monitoring setup that utilizes the fog computing concept [16]. Each block has a number of patients and a central coordinator. In this method, the central coordinator (battery-operated node) acts as an edge computing device or a fog node. The central coordinator classifies the sensor signal into urgency, semi-urgency, and normal data by using simple mathematical models and a threshold value, and makes the decision accordingly (i.e., whether to immediately send the data to the base station or not). Then, the central coordinator directly sends the data to the base station (BS). The health monitoring system usually consists of a number of sensor nodes worn on the patient's body, such as an electrocardiogram (ECG) sensor,  
electroencephalogram (EEG) sensor, temperature sensor, pressure sensor, glucose sensor, and a body controller. These sensor devices collect data from the body and send them to the body controller, which is placed at any appropriate position on the body. The body controller aggregates the collected information and sends it towards a central coordinator through the tree-based routes. The advantage of fog computing is that the central coordinator or the fog node sends only the valid information and drops unnecessary sensor information, thereby simplifying the complexity of data storage and computation. It also makes the decision quickly. For example, in speech analysis for [PERSON]'s disease, the audio recordings are not merely forwarded. Instead, the analysis of the recordings is done locally, and only the necessary metrics are transmitted [15]. Hence, the fog-architecture minimizes the delay which makes it suitable for various medical applications. In this paper, a fog-based architecture and dynamic slot allocation are considered to address the discussed challenges of WBANs. The performance of an in-hospital patient monitoring system is enhanced by using a QoS efficient next hop selection algorithm and a fuzzy-based dynamic slot allocation scheme. The proposed methods are designed without modifying the superframe structure of the IEEE 802.15.4 MAC standard. The main contributions of the paper are:  
* A fog-based WBAN for a real-time patient monitoring system which consists of a sensor layer, body controller layer, and a central coordinator layer. * Minimum cost parent selection (MCPS) algorithm for best parent selection and a link cost function for efficient routing. The best parent node for the tree formation is selected by comparing the link cost function, number of hops, and the distance between the nodes.