# An Energy-Efficient Fail Recovery Routing in TDMA MAC Protocol-Based Wireless Sensor Network
## 1 Introduction  
The recent advancement of WSNs has enabled a variety of Internet of Things (IoT) applications that penetrate our daily life [1]. Many IoT applications are often safety related and mission-critical (e.g., health care, active volcano monitoring, fire alert, etc.) where device failures might cause serious consequences [2; 3]. Especially, wireless sensor nodes deployed for environment monitoring, periodically send their sensing data to a gateway called a sink node in a multi-hop topology [2]. Sensor nodes are used widely in the industry to monitor and accumulate the data related to the object. For instance, deploying sensor nodes, we can receive periodic information about the environments such as wild nature (forests or deserts), special industrial facilities, etc. [2]. We may apply WSN to obtain up-to-date temperature information or monitor toxic gas levels in different branches of industry. Large-scale self-organized wireless sensor and mesh network provide an opportunity to develop Smart Environment and Smart Grids applications [1]. The WSN is critically important to support these advanced applications. In the past, many WSNs employed a carrier sense multiple access (CSMA) protocol due to its simplicity [4]. Such networks, however, share the media and therefore suffer from frequentcollisions, which incur retransmissions of packets causing extra energy loss. A time division multiple access (TDMA) protocol is regarded as an effective alternative to CSMA, since it can ensure fair and collision-free data forwarding from all nodes, therefore reducing the energy loss [4; 5]. Our proposed method is thus based on TDMA. Regardless of the choice of protocol, however, any WSN is susceptible to devise failure or battery depletion, and therefore it may lose network connectivity. Recent studies on WSNs have achieved considerable enhancement in network architecture and data forwarding protocols to reduce the energy consumption [2]. The primary goal of many WSNs is to maximize the network lifetime even under the event of node failures [6]. Hence, it needs a fail recovery method that operates the rest of the WSN to maintain the desired lifetime. For low-power WSNs, a tree structure topology is often adopted [7], since it permits simple routing paths from all the nodes towards the sink (root) node, which acts as a gateway collecting all the sensing data. In WSNs of tree structure topology, each child node at a lower level forwards its sensing data to its parent node at a higher level until all data are delivered to the sink node [7]. If any parent node fails, then, all nodes in the subtree under the failed parent lose their routing path towards the sink node. A large portion of the network, therefore, can be isolated, resulting in all their sensing data being lost. Figure 1 illustrates such a faulty parent and its isolated subtree marked by a dotted line. There are many causes of node failures such as sensor hardware impairment, radio frequency (RF) transceiver malfunctioning, and battery depletion [8]. In the field of network fail recovery, many previous researchers consider battery depletion as the most common cause of node failures [8; 9; 10]. Our work also assumes battery depletion as the cause of node failures for the sake of presentation, while the proposed recovery algorithm can be extended to any types of node failures. When the number of faulty nodes exceeds a certain level, the network may cease to operate. The time until the first sensor node runs out of energy is called the First-node Die-Time (FDT). The period from FDT to the time when all the sensor nodes are dead, or the network is completely disabled, is called All-node Die-Time (ADT) [11; 12]. As the percentage of faulty nodes in the network exceeds the threshold of the fault ratio, the network is considered as disabled and the remaining alive nodes of the network become useless. The network lifetime is defined as the duration from a network initialization to the time when the network is disabled [13].