## 4 WBANs: The Key M2M Area Network Technology for mHealth Applications
### MAC Layer Design for WBANs
#### 4.4.2 QoS Provisioning Mechanisms
The Flipping algorithm schedules the transmissions within a TDMA superframe based on the outcome of the previous superframe. All good links of the previous frame are scheduled first, but with reversed order, in order to exploit the most recently observed good quality links. On the other hand, all bad links are scheduled last in the new superframe, thus increasing the probability of having their channel quality changed to the best. BANMAC [95] is a more advanced cross-layer scheme that exploits the fact that, even though the channel quality of WBANs experiences many fluctuations (e.g., due to the movement of body parts), some regular patterns can still be observed. BANMAC is able to predict the channel fluctuations and schedule the transmissions of the nodes opportunistically when the channel conditions are more favorable. Another cross-layer approach is adopted in CICADA [81], where a joint MAC scheduling and routing scheme is employed to ensure ensure low-latency and network flexibility to topology changes. Although QoS is the main objective of the scheduling mechanisms presented in this section, sometimes scheduling may also result to a reduction of energy consumption. In continuation, we present some schemes that include energy-related parameters such as power constraints (e.g., power limitations of implantable devices) or battery lifetime levels in the scheduling decisions. In BSN-MAC [96], for example, four priority classes are defined to match four energy levels: (i) unconstrained, for the coordinator node that is assumed to have no energy constraints; (ii) constrained, for wearable sensor devices; (iii) highly constrained, for ingestible sensor devices; and (iv) extremely constrained, for implantable devices. The protocol also defines three levels of data criticality (low, normal and high). These parameters, along with the remaining battery lifetime level and the buffer occupancy, are combined to produce a cross-layer metric used to adjust the length of the IEEE 802.15.4 superframe with the objective of reducing latency while enhancing energy efficiency. DQBAN takes into account the quality of the wireless link, the residual battery lifetime and the waiting time of the nodes in the transmission queue to implement a cross-layer, fuzzy-logic scheduler [83]. The main idea is that each node can affect the scheduling order by sending a specific request in the scheduling part of the frame. For example, a node may request to be given priority if its energy level becomes critical or to delay its transmission if bad channel quality is detected. A cross-layer TDMA scheme that aims to increase the battery lifespan of the nodes without compromising reliability and QoS requirements, has been proposed in [97]. The main driver of the proposed scheme is based on battery discharge dynamics which dictate that battery lifetime can be increased if the battery remains idle for a certain amount of time. In order to maximize the idle time between transmissions, nodes may choose to accumulate several packets in their buffers. A decision on whether to transmit in a given time slot is made depending on cross-layer information regarding the battery recovery level, the buffer occupancy and the wireless channel state. Finally, PEH-QoS [98] promotes energy-aware management and QoS provisioning in a WBAN with energy harvesting capabilities by proposing a three-module architecture that comprises: (i) the Power-EHAware Management (PHAM), which ensures the optimal use of the harvested energy, by preventing transmission attempts by nodes with insufficient energy levels and encouraging the detection of all events by the sensor nodes (to ensure the detection of critical medical events); (ii) the Data Queue Aware Control (DQAC), which prevents the saturation of the data packet queue and maintains the clinical validity of the data by discarding outdated packets; (iii) the Packet Aggregator/Scheduling System (PASS) that maximizes throughput and energy efficiency by supporting the transmission of aggregated data packets.