A Priority-Based Adaptive MAC Protocol for Wireless Body Area Networks

In wireless body area networks (WBANs), various sensors and actuators are placed on/inside the human body and connected wirelessly. WBANs have specific requirements for healthcare and medical applications, hence, standard protocols like the IEEE 802.15.4 cannot fulfill all the requirements. Consequently, many medium access control (MAC) protocols, mostly derived from the IEEE 802.15.4 superframe structure, have been studied. Nevertheless, they do not support a differentiated quality of service (QoS) for the various forms of traffic coexisting in a WBAN. In particular, a QoS-aware MAC protocol is essential for WBANs operating in the unlicensed Industrial, Scientific, and Medical (ISM) bands, because different wireless services like Bluetooth, WiFi, and Zigbee may coexist there and cause severe interference. In this paper, we propose a priority-based adaptive MAC (PA-MAC) protocol for WBANs in unlicensed bands, which allocates time slots dynamically, based on the traffic priority. Further, multiple channels are effectively utilized to reduce access delays in a WBAN, in the presence of coexisting systems. Our performance evaluation results show that the proposed PA-MAC outperforms the IEEE 802.15.4 MAC and the conventional priority-based MAC in terms of the average transmission time, throughput, energy consumption, and data collision ratio.


Introduction
With rapid advancements in physiological sensors and wireless communication, wireless sensor networks have grown significantly, supporting a wide range of applications including healthcare and medical services. A wireless body area network (WBAN) is a special-purpose sensor network designed to connect various sensors and actuators located on/inside the human body for continuous monitoring of vital signs like heart rate, temperature, blood pressure, electrocardiograms (ECGs), electroencephalography (EEG), etc. [1].
Quality of service (QoS), flexibility, and cost effectiveness are important goals to be achieved for healthcare and medical applications in WBANs. Different sensors placed in different parts of the human body, collect critical and non-critical information, and send them to the coordinator. Moreover, different actuators can be placed within the vicinity, on/inside the human body to communicate with the coordinator. The inside or vicinity of a human body is a challenging environment for the design of adaptable, dynamic, and flexible protocols for WBANs. Therefore, in WBANs, low delay, high reliability, low power consumption, negligible electromagnetic interface with the human body, and effective communication are to be taken into consideration.
In general, MAC protocols play a crucial role in providing QoS and in prolonging network lifetimes by controlling packet collisions, overhearing, control overheads, and idle listening [2,3].
device (RFD). The FFD can support all the network functions and operate as the network coordinator as well as an end device, whereas, the RFD can only be used as an end device. The FFD performs energy detection (ED) to detect the peak energy of a channel and select the appropriate channel for data transmission.
Sensors 2016, 16,401 3 of 15 functions and operate as the network coordinator as well as an end device, whereas, the RFD can only be used as an end device. The FFD performs energy detection (ED) to detect the peak energy of a channel and select the appropriate channel for data transmission. In IEEE 802.15.4, if a node wants to reserve the resources for periodic traffic, it should first send a GTS request during the CAP with a CSMA/CA and the network coordinator will decide the GTS allocation accordingly. The GTS allocation scheme in IEEE 802. 15.4 is shown in Figure 2. The working channel is statically selected by the network coordinator during the network initialization process. A WBAN working in an unlicensed band must share the medium with a set of coexisting systems like the Wi-Fi, Bluetooth, and the Zigbee that might cause beacon corruption and real-time connectivity problems. Moreover, the IEEE 802.15.4 MAC does not have any mechanism for data prioritization and all data traffic are treated with the same priority in the superframe. The channel scheduling presented in [10] reduces the mutual interference between nodes belonging to the same network. To reduce idle listening, the control channel is differentiated from the data channels by using different frequency bands. The channel information is announced using beacon frames that are broadcast so that all the devices are aware of the assigned channels. However, this scheme does not consider priority differentiation mechanisms.
A priority-based channel access algorithm for a contention-based MAC protocol [11] is devised to solve the contention complexity problems. The algorithm categorizes traffic packets into four different levels and divides the CAP into four sub-phases, dynamically. In this algorithm, however, the classification of continuous and discontinuous data traffic and the use of GTSs are not considered.
A traffic-aware dynamic MAC protocol (TAD-MAC) for both invasive and non-invasive WBANs is introduced in [12]. In this protocol, each node adapts its wakeup interval dynamically, based on a traffic status register bank. The dynamic wakeup interval scheme saves the extra power consumed by idle listening, overhearing, collisions, and unnecessary beacon retransmissions.
The low-delay traffic-adaptive MAC protocol (LDTA-MAC) is reported in [13], where GTS time slots are allocated dynamically, based on node traffic to overcome the shortcomings of the IEEE In IEEE 802.15.4, if a node wants to reserve the resources for periodic traffic, it should first send a GTS request during the CAP with a CSMA/CA and the network coordinator will decide the GTS allocation accordingly. The GTS allocation scheme in IEEE 802. 15.4 is shown in Figure 2. The working channel is statically selected by the network coordinator during the network initialization process. A WBAN working in an unlicensed band must share the medium with a set of coexisting systems like the Wi-Fi, Bluetooth, and the Zigbee that might cause beacon corruption and real-time connectivity problems. Moreover, the IEEE 802.15.4 MAC does not have any mechanism for data prioritization and all data traffic are treated with the same priority in the superframe. functions and operate as the network coordinator as well as an end device, whereas, the RFD can only be used as an end device. The FFD performs energy detection (ED) to detect the peak energy of a channel and select the appropriate channel for data transmission. In IEEE 802.15.4, if a node wants to reserve the resources for periodic traffic, it should first send a GTS request during the CAP with a CSMA/CA and the network coordinator will decide the GTS allocation accordingly. The GTS allocation scheme in IEEE 802.15.4 is shown in Figure 2. The working channel is statically selected by the network coordinator during the network initialization process. A WBAN working in an unlicensed band must share the medium with a set of coexisting systems like the Wi-Fi, Bluetooth, and the Zigbee that might cause beacon corruption and real-time connectivity problems. Moreover, the IEEE 802.15.4 MAC does not have any mechanism for data prioritization and all data traffic are treated with the same priority in the superframe. The channel scheduling presented in [10] reduces the mutual interference between nodes belonging to the same network. To reduce idle listening, the control channel is differentiated from the data channels by using different frequency bands. The channel information is announced using beacon frames that are broadcast so that all the devices are aware of the assigned channels. However, this scheme does not consider priority differentiation mechanisms.
A priority-based channel access algorithm for a contention-based MAC protocol [11] is devised to solve the contention complexity problems. The algorithm categorizes traffic packets into four different levels and divides the CAP into four sub-phases, dynamically. In this algorithm, however, the classification of continuous and discontinuous data traffic and the use of GTSs are not considered.
A traffic-aware dynamic MAC protocol (TAD-MAC) for both invasive and non-invasive WBANs is introduced in [12]. In this protocol, each node adapts its wakeup interval dynamically, based on a traffic status register bank. The dynamic wakeup interval scheme saves the extra power consumed by idle listening, overhearing, collisions, and unnecessary beacon retransmissions.
The low-delay traffic-adaptive MAC protocol (LDTA-MAC) is reported in [13], where GTS time slots are allocated dynamically, based on node traffic to overcome the shortcomings of the IEEE The channel scheduling presented in [10] reduces the mutual interference between nodes belonging to the same network. To reduce idle listening, the control channel is differentiated from the data channels by using different frequency bands. The channel information is announced using beacon frames that are broadcast so that all the devices are aware of the assigned channels. However, this scheme does not consider priority differentiation mechanisms.
A priority-based channel access algorithm for a contention-based MAC protocol [11] is devised to solve the contention complexity problems. The algorithm categorizes traffic packets into four different levels and divides the CAP into four sub-phases, dynamically. In this algorithm, however, the classification of continuous and discontinuous data traffic and the use of GTSs are not considered.
A traffic-aware dynamic MAC protocol (TAD-MAC) for both invasive and non-invasive WBANs is introduced in [12]. In this protocol, each node adapts its wakeup interval dynamically, based on a traffic status register bank. The dynamic wakeup interval scheme saves the extra power consumed by idle listening, overhearing, collisions, and unnecessary beacon retransmissions.
The low-delay traffic-adaptive MAC protocol (LDTA-MAC) is reported in [13], where GTS time slots are allocated dynamically, based on node traffic to overcome the shortcomings of the IEEE 802. 15 [14] prioritize the data traffic based on the data features and adaptively allocate the CAP or CFP for the data according to the priority level. However, their traffic priority and backoff value are not considered.
In [15], a traffic load-aware sensor MAC (named ATLAS) is presented for collaborative body area sensor networks. The superframe structure dynamically varies based on the traffic load and uses a multihop communication pattern. Nevertheless, the priority of the different packets and the back-off classes are not considered.
A traffic priority and load-adaptive MAC (PLA-MAC) [16] provides QoS to the packets according to their traffic priority level. Packets with a higher priority level get better service than the packets with a lower priority. Although packet-level priority and reliability are considered, the channel adaptation of a condition-based network is not performed.
The traffic-adaptive MAC protocol described in [17] uses a traffic-based wakeup mechanism and a wakeup radio mechanism, to reliably accommodate various types of data. It utilizes the traffic information to enable low-power communication. Wakeup tables are established to coordinate the transmission schedules of the nodes, while a wakeup radio mechanism is employed for emergencies.
A schedule-based heartbeat driven MAC protocol (H-MAC) [18] uses the heart rhythm information to perform synchronization and reduces extra energy costs; however, the heart beat information is not always valid owing to variations in the patient's health condition.
A context-aware MAC protocol [19] can switch between the normal state and the emergency state. The data rates and duty cycles of the sensor nodes are dynamically changed to meet the requirements of latency and traffic loads, in a context-aware manner. The sensor nodes can obtain one or more time slots for periodic or bursty applications, according to their traffic characteristics.
A hybrid and secure priority-guaranteed MAC protocol (PMAC) [20] uses two CAPs for accommodating normal and critical data, while one CFP is used for accommodating significant quantities of data packets. In addition, a set of security keys is used to prevent illegal access to the WBANs.
A MAC protocol specially designed for energy-harvesting WBANs is presented in [21]. The nodes are assigned different priorities and access methods, based on the criticality of their data packets and the type of the energy-harvesting source.
In [22], the robustness of the medical data packet transmission is experimentally investigated, based on the frequency hopping mechanism in heterogeneous environments. The measurement results demonstrate that the transmission reliability requirement depends significantly on the signal strength of the other signals as well as that of the chosen channel/frequency band. It is a fact that the heterogeneous working requirements of a WBAN, define different QoS issues that are specific to that particular application area only. WBAN applications are very sensitive; hence, QoS issues in WBANs require more attention and focus and are to be seriously considered.

Priority-Based Adaptive MAC (PA-MAC)
In this section, the proposed PA-MAC is presented in detail. Multiple channel utilization, data traffic prioritization, dynamic time slot allocation, and data transfer procedures are discussed.

Multiple Channel Utilization
In the proposed QoS-aware adaptive MAC, we exploit the channel switching capability of the IEEE 802.15.4 MAC radio hardware. Therefore, we implement two different channels: a dedicated beacon channel (BC) and a data channel (DC). The dedicated BC is available for exchange of control information like channel assignment broadcasts and access requests between the coordinator and the sensor nodes. The dedicated BC is used during the beacon frame transmission, whereas, the rest of the communication is done through the DC. During the beacon period, the node switches its channel to the BC and returns to its original DC at the end of the beacon period, as shown in Figure 3. The widely used transceivers for short range and low-power WPANs, e.g., the CC2420 and the more advanced CC2500, have a channel switching time of only 300 and 90 µs, respectively [23]. The DC information is conveyed to the sensor nodes by piggybacking the channel information on the beacon payload of the beacon frame, as shown in Figure 4. The entire network information can be determined just by scanning the BC [24]. In the 2. 4  WPANs may still exist. However, as the WPANs are generally operated at a lower transmission power, interference with these systems is negligible [25]. Channel selection schemes are not within the scope of this paper. The coordinator continuously senses all the channels in the pool of candidate channels; it assigns white spaces as the transmission slots to the body nodes. The coordinator may choose and remain tuned to an idle channel until it becomes unavailable or is degraded by the activities of the coexisting systems. the beacon payload of the beacon frame, as shown in Figure 4. The entire network information can be determined just by scanning the BC [24].  [25]. Channel selection schemes are not within the scope of this paper. The coordinator continuously senses all the channels in the pool of candidate channels; it assigns white spaces as the transmission slots to the body nodes. The coordinator may choose and remain tuned to an idle channel until it becomes unavailable or is degraded by the activities of the coexisting systems.

Data Traffic Prioritization and Dynamic Timeslot Allocation
Medical and non-medical applications are the two major categories in WBANs. Medical applications include healthcare and diagnosis-assistance related signal monitoring, whereas, non-medical applications cover signals related to consumer electronics (CE). In medical applications, emergency vital signals are directly related to the life of the patient, therefore, they should be regarded as first priority service. The priority levels for different kinds of data traffic are shown in Table 1. In the IEEE 802.15.4 MAC, the performance of the CAP significantly influences the collision probability and the final throughput. If the nodes are densely deployed in a narrow region, the contention complexities increase and lead to high collision ratios and significant energy consumption. The main goal of the proposed MAC is to provide QoS and low power consumption for various applications by dispersion of the contention complexity. Here, we divide the CAP into four sub-phases for each priority level of the traffic, as shown in Figure 5. Each specified access phase has dynamically changing length and is calculated by the proposed algorithm at the central coordinator. the beacon payload of the beacon frame, as shown in Figure 4. The entire network information can be determined just by scanning the BC [24].  [25]. Channel selection schemes are not within the scope of this paper. The coordinator continuously senses all the channels in the pool of candidate channels; it assigns white spaces as the transmission slots to the body nodes. The coordinator may choose and remain tuned to an idle channel until it becomes unavailable or is degraded by the activities of the coexisting systems.

Data Traffic Prioritization and Dynamic Timeslot Allocation
Medical and non-medical applications are the two major categories in WBANs. Medical applications include healthcare and diagnosis-assistance related signal monitoring, whereas, non-medical applications cover signals related to consumer electronics (CE). In medical applications, emergency vital signals are directly related to the life of the patient, therefore, they should be regarded as first priority service. The priority levels for different kinds of data traffic are shown in Table 1. In the IEEE 802.15.4 MAC, the performance of the CAP significantly influences the collision probability and the final throughput. If the nodes are densely deployed in a narrow region, the contention complexities increase and lead to high collision ratios and significant energy consumption. The main goal of the proposed MAC is to provide QoS and low power consumption for various applications by dispersion of the contention complexity. Here, we divide the CAP into four sub-phases for each priority level of the traffic, as shown in Figure 5. Each specified access phase has dynamically changing length and is calculated by the proposed algorithm at the central coordinator.

Data Traffic Prioritization and Dynamic Timeslot Allocation
Medical and non-medical applications are the two major categories in WBANs. Medical applications include healthcare and diagnosis-assistance related signal monitoring, whereas, non-medical applications cover signals related to consumer electronics (CE). In medical applications, emergency vital signals are directly related to the life of the patient, therefore, they should be regarded as first priority service. The priority levels for different kinds of data traffic are shown in Table 1. In the IEEE 802.15.4 MAC, the performance of the CAP significantly influences the collision probability and the final throughput. If the nodes are densely deployed in a narrow region, the contention complexities increase and lead to high collision ratios and significant energy consumption. The main goal of the proposed MAC is to provide QoS and low power consumption for various applications by dispersion of the contention complexity. Here, we divide the CAP into four sub-phases for each priority level of the traffic, as shown in Figure 5. Each specified access phase has dynamically changing length and is calculated by the proposed algorithm at the central coordinator. CAP leads to wasted time slots. The other drawback of the pure segregation is low scalability with the traffic load; i.e., the delay and data collision ratio also increase if the allocated time slot is not enough to handle offered traffic in the specific priority. When the offered traffic increases due to a large number of sensor nodes in the specific time slot, the collision probability increases significantly. Traffic with priority P1 can access the channel in all phases; a node that transmits traffic with a priority P4, can use only phase 4. The P2 priority traffic can access the channel in phases 2-4. Similarly, P3 can access the channel in Phases 3 and 4. In order to avoid wastage of the timeslots, the lengths of the sub-phases are calculated dynamically, using Equation (1) [11]: where is the length of the sub-phase , ( = 1,2,3,4) is taken from the starting point of CAP, is the length of the CAP, is the total number of nodes in the traffic category of priority , is the total number of nodes, and is initially set to zero . To obtain information regarding the node's priority classes, we modify the IEEE 802.15.4 association request command, as shown in Figure 6. Further, we assume that each node supports only one type of data. When newly arrived nodes join the network, the coordinator has the ability to sense the changes in the number of nodes of each class in the CAP of the previous superframe and calculate the value of the number of nodes in each traffic category. Medical services must satisfy a delay of 125 ms or less and consumer electronics (CE) services have to satisfy a delay requirement of 250 ms or less. Based on these delay requirements, the average transmission delay of each category is calculated by Equation (2): where is the delay of the k-th packet in the traffic category of priority and = 0.125. If the delay threshold is exceeded, the CAP is divided into "the number of exceeded categories + 1" sub-phases.  On the other hand, the pure segregation of sub-phases for only one type of traffic in each in the CAP leads to wasted time slots. The other drawback of the pure segregation is low scalability with the traffic load; i.e., the delay and data collision ratio also increase if the allocated time slot is not enough to handle offered traffic in the specific priority. When the offered traffic increases due to a large number of sensor nodes in the specific time slot, the collision probability increases significantly.
Traffic with priority P 1 can access the channel in all phases; a node that transmits traffic with a priority P 4 , can use only phase 4. The P 2 priority traffic can access the channel in phases 2-4. Similarly, P 3 can access the channel in Phases 3 and 4. In order to avoid wastage of the timeslots, the lengths of the sub-phases are calculated dynamically, using Equation (1) [11]: where l i is the length of the sub-phase i , pi " 1, 2, 3, 4q is taken from the starting point of CAP, L CAP is the length of the CAP, N i is the total number of nodes in the traffic category of priority P i , N T is the total number of nodes, and l 0 is initially set to zero . To obtain information regarding the node's priority classes, we modify the IEEE 802.15.4 association request command, as shown in Figure 6. Further, we assume that each node supports only one type of data. When newly arrived nodes join the network, the coordinator has the ability to sense the changes in the number of nodes of each class in the CAP of the previous superframe and calculate the value of the number of nodes in each traffic category. Medical services must satisfy a delay of 125 ms or less and consumer electronics (CE) services have to satisfy a delay requirement of 250 ms or less. Based on these delay requirements, the average transmission delay of each category is calculated by Equation (2): where d i k is the delay of the k-th packet in the traffic category of priority P i and α = 0.125. If the delay threshold is exceeded, the CAP is divided into "the number of exceeded categories + 1" sub-phases. On the other hand, the pure segregation of sub-phases for only one type of traffic in each in the CAP leads to wasted time slots. The other drawback of the pure segregation is low scalability with the traffic load; i.e., the delay and data collision ratio also increase if the allocated time slot is not enough to handle offered traffic in the specific priority. When the offered traffic increases due to a large number of sensor nodes in the specific time slot, the collision probability increases significantly.
where is the length of the sub-phase , ( = 1,2,3,4) is taken from the starting point of CAP, is the length of the CAP, is the total number of nodes in the traffic category of priority , is the total number of nodes, and is initially set to zero . To obtain information regarding the node's priority classes, we modify the IEEE 802.15.4 association request command, as shown in Figure 6. Further, we assume that each node supports only one type of data. When newly arrived nodes join the network, the coordinator has the ability to sense the changes in the number of nodes of each class in the CAP of the previous superframe and calculate the value of the number of nodes in each traffic category. Medical services must satisfy a delay of 125 ms or less and consumer electronics (CE) services have to satisfy a delay requirement of 250 ms or less. Based on these delay requirements, the average transmission delay of each category is calculated by Equation (2): where is the delay of the k-th packet in the traffic category of priority and = 0.125. If the delay threshold is exceeded, the CAP is divided into "the number of exceeded categories + 1" sub-phases.

Data Transfer Procedure
In the IEEE 802.15.4 MAC, the superframe consists of a CAP and a CFP. The CAP is suitable for the transfer of the command messages and short data, whereas, the CFP is implemented for continuous data. In the CAP, each node transmits its packets to a coordinator using the CSMA/CA procedure. In the CFP, each node transmits its packets to the coordinator by using dedicated guaranteed time slots (GTSs) without contention with the other nodes. In order to transmit packets in the CFP, each node transmits the request packet for the CFP to the coordinator in the CAP using the CSMA/CA procedure. When the coordinator successfully receives the GTS request packet, it allocates the GTS to the node, accordingly. The data from the P 1 and P 3 nodes are transmitted immediately after accessing the channel in the CAP. However, the P 2 and P 4 nodes send the GTS request command in the CAP to apply for GTS allocation. The slot allocation mechanism and data transfer procedure for different traffic priorities are shown in Algorithm 1 and Figure 7, respectively.
in the CFP, each node transmits the request packet for the CFP to the coordinator in the CAP using the CSMA/CA procedure. When the coordinator successfully receives the GTS request packet, it allocates the GTS to the node, accordingly. The data from the P1 and P3 nodes are transmitted immediately after accessing the channel in the CAP. However, the P2 and P4 nodes send the GTS request command in the CAP to apply for GTS allocation. The slot allocation mechanism and data transfer procedure for different traffic priorities are shown in Algorithm 1 and Figure 7, respectively.

Analytical Approximation of the PA-MAC
In this section, we present the analytical approximation of the channel status, energy consumption, and the average delay of the proposed PA-MAC.

Channel Status
The low power and the low transmission rate of the WBAN nodes do not change the access pattern of the coexisting systems contending on a shared ISM band. The channels in the ISM band alternate between a busy state (occupied by a coexistent network) and an idle state when no

end if end while
2. Calculate the lengths of the sub-phases as l i " ř i´1 k"0 l k`LCAP˚p N i {N T q, where l i is the length of sub-phase i from the starting point of the CAP, L CAP is the length of the CAP, N T is the total number of nodes, and l 0 is initially set to zero 3. Broadcast the beacon frame

Analytical Approximation of the PA-MAC
In this section, we present the analytical approximation of the channel status, energy consumption, and the average delay of the proposed PA-MAC.

Channel Status
The low power and the low transmission rate of the WBAN nodes do not change the access pattern of the coexisting systems contending on a shared ISM band. The channels in the ISM band alternate between a busy state (occupied by a coexistent network) and an idle state when no coexistent system is accessing the channel. The channel state can be characterized by a two-state Markov chain. The average length of idle and busy periods depends upon the channel usage patterns of the coexisting systems. The length of the busy and idle periods for j-th licensed channel follows an exponential distribution with a mean busy time λ j and mean idle time µ j [26]. The probability that the channel j is busy or idle at any time instant is given by: The WBAN can access the medium as long as one of the n candidate channels is idle, and it loses its access when all the channels become busy owing to the activities of the coexisting systems. In the inactive state, all the WBAN operations and services are interrupted because there is no channel available for data transmission. The inactive state occurs with the probability: When at least one channel becomes idle, the WBAN transits to the active state and its services are resumed. The probability of at least one channel becoming idle is calculated by:

Energy Consumption
Energy efficiency is one of the key measurement parameters for a reliable and efficient MAC protocol design. The energy consumption is based on the transceiver's activity; the transition state of the transceiver is shown in Figure 8. To minimize the energy consumption, the idle and wakeup states play a vital role. We assume constant energy consumption by the sensing and processing units. Let E C be the total consumed energy in one cycle, E I is the energy consumed in an idle state, and E W is the energy consumed in a wakeup state. Then: In the wakeup time duration , the nodes consume a switching energy , a transmission energy , and a reception energy . Therefore: To switch between the ideal and wakeup state, the transceiver consumes an energy : The average total energy consumption for C number of cycles is given by: Energy is a function of time and power and power itself is a function of voltage and current. In an idle state, the nodes consume less energy compared to the wakeup state. Therefore: where T F is the total time-frame duration, T I is an idle time duration, P I is the power consumed in an idle state, and I I is the current drawn in an idle state from the voltage source, V.
In the wakeup time duration T W , the nodes consume a switching energy E SW , a transmission energy E TX , and a reception energy E RX . Therefore: To switch between the ideal and wakeup state, the transceiver consumes an energy E SW : where the node draws a current I SW from a voltage source during switching time duration T SW and P SW is the switching power. Let L be the length of the packet (control or data), T TX be the time needed for a single byte transmission, and I TX be the amount of current drawn during the packet transmission. Energy consumed during the transmission is given by: Similarly, the energy consumed at the receiver end is calculated as: where P TX and P RX are the power consumptions during the transmission and reception of the packets, respectively, T RX is the time needed for a single byte reception, and I RX is the amount of current drawn during the packet reception. Hence, the total average energy consumed is given by:

Transmission Time
The data frame transmission sequence is shown in Figure 9. T bo is the total backoff time (i.e., channel access delay), T packet is the data packet transmission time, T ta is the transceiver's turnaround time, T ack is an ACK frame transmission time, and T i f s is the time for an interframe space (IFS). The IFS could be either short inter-frame spacing (SIFS) or long inter-frame spacing (LIFS), depending upon the size of the MAC frame. The average transmission delay T l is the time needed to transmit a packet from the node to the coordinator and can be calculated as in [27] as follows: T l " T bo`Tpacket`Tta`Tack`Ti f s (15) = + + + (19) where is the length of the PHY header in bytes, is the length of the MAC header in bytes, is the length of the data bytes in the data packet, is the length of the MAC footer in bytes, and is the data transmission rate.

Performance Evaluation
In this section, the performance of the proposed PA-MAC is evaluated via computer simulation and compared with the IEEE standard 802.15.4 and the conventional priority-based MAC. The four performance metrics-the average transmission time, the network throughput, the average energy consumption, and the collision ratio are evaluated.

Simulation Environment
The performance of the proposed PA-MAC is evaluated and compared with the IEEE 802.15.4 standard using an ns-2 Network simulator, Version 2.35. The ns-2 simulator is a discrete event simulator targeted at networking research and provides substantial support for the simulation of various network protocols over wired and wireless networks [28]. 20% of the total nodes generate emergency traffic; the on-demand traffic and the non-medical traffic categories each constitute 20% of the total nodes and the normal traffic occupies 40% of the total traffic generated during each simulation. The physical layer parameters are defined according to the IEEE 802.15.4 standard. We have assumed that the several biomedical sensors are implanted or attached to the human body. The star topology, in which the central coordinator is the master node, is used in our simulation as in other research works. The sensor nodes are randomly deployed within an area of 4 m radius, around the central coordinator and the data are transmitted by one hop. All the nodes intend to transmit the first packet randomly during the contention access period. Small-scale fading has been neglected and it is assumed that packet loss is solely because of collision. The Poisson arrival is used to approximate the random packet arrival process. For medical traffic, a payload size of 40 bytes is used owing to lower end-to-end latency and an acceptable packet delivery rate [11,27]. Emergency traffic occurs randomly and the packet size is the same as the normal medical traffic. The network parameters used in the simulation are summarized in Table 2. For K number of maximum back-off periods, the probability that the node can successfully access the channel is given by: where P a is the probability that a node can access the idle channel at the end of a backoff period. For m number of nodes in the network, P a is given by: where q is the probability that a network device is transmitting at any time. The average number of back-off periods, R, is calculated as in [27] as follows: The packet transmission time T packet is given by: where L PHY is the length of the PHY header in bytes, L MHR is the length of the MAC header in bytes, L payload is the length of the data bytes in the data packet, L MFR is the length of the MAC footer in bytes, and R data is the data transmission rate.

Performance Evaluation
In this section, the performance of the proposed PA-MAC is evaluated via computer simulation and compared with the IEEE standard 802.15.4 and the conventional priority-based MAC. The four performance metrics-the average transmission time, the network throughput, the average energy consumption, and the collision ratio are evaluated.

Simulation Environment
The performance of the proposed PA-MAC is evaluated and compared with the IEEE 802.15.4 standard using an ns-2 Network simulator, Version 2.35. The ns-2 simulator is a discrete event simulator targeted at networking research and provides substantial support for the simulation of various network protocols over wired and wireless networks [28]. 20% of the total nodes generate emergency traffic; the on-demand traffic and the non-medical traffic categories each constitute 20% of the total nodes and the normal traffic occupies 40% of the total traffic generated during each simulation. The physical layer parameters are defined according to the IEEE 802.15.4 standard. We have assumed that the several biomedical sensors are implanted or attached to the human body. The star topology, in which the central coordinator is the master node, is used in our simulation as in other research works. The sensor nodes are randomly deployed within an area of 4 m radius, around the central coordinator and the data are transmitted by one hop. All the nodes intend to transmit the first packet randomly during the contention access period. Small-scale fading has been neglected and it is assumed that packet loss is solely because of collision. The Poisson arrival is used to approximate the random packet arrival process. For medical traffic, a payload size of 40 bytes is used owing to lower end-to-end latency and an acceptable packet delivery rate [11,27]. Emergency traffic occurs randomly and the packet size is the same as the normal medical traffic. The network parameters used in the simulation are summarized in Table 2.

Simulation Results and Discussion
The overall performance of the average transmission time is illustrated in Figure 10. In the proposed MAC, a fixed dedicated channel is assigned for the beacon. The WBAN utilizes the single channel statically; the channel access opportunities experience less interference and interruptions. Moreover, the proposed PA-MAC and the conventional NPCA-MAC perform slotted CSMA/CA with a priority-based channel access policy, whereas, the IEEE 802.15.4 MAC protocol operates the slotted CSMA/CA without a priority-based channel access policy. Thus, as in Figure 10

Simulation Results and Discussion
The overall performance of the average transmission time is illustrated in Figure 10. In the proposed MAC, a fixed dedicated channel is assigned for the beacon. The WBAN utilizes the single channel statically; the channel access opportunities experience less interference and interruptions. Moreover, the proposed PA-MAC and the conventional NPCA-MAC perform slotted CSMA/CA with a priority-based channel access policy, whereas, the IEEE 802.15.4 MAC protocol operates the slotted CSMA/CA without a priority-based channel access policy. Thus, as in Figure 10   In Figure 12, the overall performance of the network throughput as a function of the number of nodes is illustrated. All three schemes show a similar performance, when the number of sensor nodes is less than 10. The proposed PA-MAC and the conventional NPCA-MAC, however, provide better performances compared to the IEEE 802.15.4 MAC protocol. In the IEEE 802.15.4 MAC, the collision ratio increases sharply with the number of sensor nodes. Hence, more resources are wasted on data packet collision rather than on effective data transmission. The throughput of all the three schemes seems to decrease as the number of nodes exceeds 35, because of a high contention complexity and an increased packet collision rate. Although the collision rate increases with the number of data packets, the radio resource on the data channels is efficiently managed in both the PA-MAC and the NPCA-MAC, according to the data traffic. However, in the channel access pattern, prioritization of data traffic, and the GTS allocation for continuous data traffic, the proposed PA-MAC performs better than the conventional NPCA-MAC. Energy efficiency is a key parameter in the design of efficient and reliable MAC protocols for the WBAN. Energy consumption is related to node behavior. A network with busy traffic has a higher energy consumption compared to a network with less traffic. To evaluate the energy In Figure 12, the overall performance of the network throughput as a function of the number of nodes is illustrated. All three schemes show a similar performance, when the number of sensor nodes is less than 10. The proposed PA-MAC and the conventional NPCA-MAC, however, provide better performances compared to the IEEE 802.15.4 MAC protocol. In the IEEE 802.15.4 MAC, the collision ratio increases sharply with the number of sensor nodes. Hence, more resources are wasted on data packet collision rather than on effective data transmission. The throughput of all the three schemes seems to decrease as the number of nodes exceeds 35, because of a high contention complexity and an increased packet collision rate. Although the collision rate increases with the number of data packets, the radio resource on the data channels is efficiently managed in both the PA-MAC and the NPCA-MAC, according to the data traffic. However, in the channel access pattern, prioritization of data traffic, and the GTS allocation for continuous data traffic, the proposed PA-MAC performs better than the conventional NPCA-MAC. In Figure 12, the overall performance of the network throughput as a function of the number of nodes is illustrated. All three schemes show a similar performance, when the number of sensor nodes is less than 10. The proposed PA-MAC and the conventional NPCA-MAC, however, provide better performances compared to the IEEE 802.15.4 MAC protocol. In the IEEE 802.15.4 MAC, the collision ratio increases sharply with the number of sensor nodes. Hence, more resources are wasted on data packet collision rather than on effective data transmission. The throughput of all the three schemes seems to decrease as the number of nodes exceeds 35, because of a high contention complexity and an increased packet collision rate. Although the collision rate increases with the number of data packets, the radio resource on the data channels is efficiently managed in both the PA-MAC and the NPCA-MAC, according to the data traffic. However, in the channel access pattern, prioritization of data traffic, and the GTS allocation for continuous data traffic, the proposed PA-MAC performs better than the conventional NPCA-MAC. Energy efficiency is a key parameter in the design of efficient and reliable MAC protocols for the WBAN. Energy consumption is related to node behavior. A network with busy traffic has a higher energy consumption compared to a network with less traffic. To evaluate the energy efficiency comprehensively, the average energy consumption per bit is used. The average energy per Energy efficiency is a key parameter in the design of efficient and reliable MAC protocols for the WBAN. Energy consumption is related to node behavior. A network with busy traffic has a higher energy consumption compared to a network with less traffic. To evaluate the energy efficiency comprehensively, the average energy consumption per bit is used. The average energy per bit is given by: where E avg is the average energy consumption and S b is the throughput achieved. The evaluation of the average energy consumption per bit is shown in Figure 13. The increase in energy consumption is mainly because of packet collision and packet retransmission.

Conclusions
Sharing of the ISM band leads to unpredictable service interruptions because of mutual

Conclusions
Sharing of the ISM band leads to unpredictable service interruptions because of mutual interference between coexisting systems. WBANs operating in highly coexistent interferences may

Conclusions
Sharing of the ISM band leads to unpredictable service interruptions because of mutual interference between coexisting systems. WBANs operating in highly coexistent interferences may be affected by beacon drops, data collisions, packet delays, low network throughput, and high-energy consumption. To address these issues, in this paper, a priority-based adaptive MAC protocol called the PA-MAC, has been proposed for WBANs in unlicensed bands. A fixed dedicated channel is assigned for the beacon and the rest of the communication is through the data channel. We have also differentiated the access phase of the CAP and have classified the transfer procedure of the priority-based traffic in WBANs. The proposed PA-MAC supports both CAP and CFP. The CFP is used to transfer continuous and large numbers of data packets to the coordinator. According to the simulation results, the PA-MAC shows substantial improvements in terms of transmission time, throughput, energy efficiency, and collision ratio, compared to the IEEE standard 802.15.4 and the conventional NPCA-MAC.
In the proposed MAC, it is assumed that the coordinator and sensor nodes are within the communication range and their mobility is not critical for communication between the coordinator and sensors. Any security and privacy mechanisms are not considered, either. In the proposed MAC, the GTS slots are assigned for both medical data traffic and CE traffic, but the number of GTS slots is limited and, thus, the substantial high collision ratio might result in significant performance degradation, especially in case of heavy and high data rate traffic. Functional extension of the PA-MAC for WBANs with a cognitive ratio capability may be undertaken in the future.