## 3 Data Routing Approaches in WSNs
### Fault-Tolerant Approaches
#### 3.3.2 Fault Recovery
Next, among the remaining nodes, cell manager selects the one with highest residual energy as the back-up manager. Distributed and Reliable Data Transmission (DRDT) scheme is proposed in [74] to enhance the reliability of data delivery. In DRDT, in case of packet loss, a neighbor node as a _helper node_ which listens to packet transmission may handle the transmission of the lost packet. This is happened based on the link quality of the nodes. The quality of link (PRR) in this approach is calculated as below:  
\[\text{PRR (d)}=\textbf{(1}-\frac{1}{2}e^{-\frac{\gamma(d)}{2}\frac{1}{0.64}} \textbf{)}^{16f-8l}\]  
In this equation, d denotes the distance between two nodes, \(\gamma(d)\) demonstrates a Signal to Noise Ratio (SNR) for \(d\),\(f\) presents the length of a frame, and \(l\) is the length of a preamble. In Figure 11, all the neighbor nodes which are in the radio range of the source and are able to listen to its transmission can be a helper node. Therefore, only when the data packet of the sender becomes lost and the PRR of the helper nodes is lower than the primary sender, it is asked to transmit the packet again. By using this strategy, the chance of packets to be received at the destination is increased and the number of attempts to perform packet retransmission is reduced. For selecting a neighbor as a helper node, a node with the highest PRR to both sender and receiver is chosen. Therefore, the _helper value (H)_ is defined which demonstrates the conditions of the neighbors. A neighbor with the highest \(H\) is the best candidate of the helper node. The helper value is calculated as below:  
\[\mathrm{H}=w_{1}H_{PRR}(s,c)+w_{2}H_{PRR}(r,c)\]  
\[w_{2}\geq w_{1}\geq 0\text{ and }w_{1}+\ w_{2}=1\]  
where \(c\) is the neighbor as a helper node and \(w_{1}\)and \(w_{2}\)denote the weighting values. In this approach, in case of failure, each node which has listened to its neighbor transmission, checks the packet header to be sure that the destination is one of its neighbors. Then, it should wait to receive a possible command of retransmission. Thus, a Waiting Time (WT) is considered for a node which states how long it should wait for receiving the command of retransmission. It is computed as follows:  
\[\mathrm{W}=(1-\mathrm{H})\times\delta\]  
where \(\delta\)_is_ the predefined maximum waiting time. Dynamical jumping real-time fault-tolerant (DMRF) [75] is proposed for doing fast fault recovery. In this approach, when there is no fault, data routing is done in a normal hop by hop mode. But when a fault occurs, transmission is done in another mode named jumping mode. In this mode, the nodes use the transmission time of data packets along with the state of the next hop to compute the probability of packet reception at the next hop. This probability can be updated by getting some feedbacks from the downstream node. The goal of jumping mode is guarantying the packet delivery and reducing the delay of transmission in case of failure. To guarantee fault-tolerant transmission, M paths from source to destination which don't have any overlapping are considered in the initialization phase. Each node computes the distance and delay of message delivery for each path. Then, it selects k paths with minimum delay from the entire M paths and selects other M-K paths as alternative paths. The process of packet transmission in this approach is done by considering the deadline of the received packet, the transmission delay of the current path, the jumping probability and the congestion level. Figure 11: Retransmission process in DRDT [74]. In initialization phase, the nodes detect their neighbors and modify the list of neighbor nodes, Forwarding Candidate Set (FCS), table of jumping probability and the preliminary transmission route. On the other hand, in data forwarding phase, the proposed approach discovers failure and congestions. For detecting the failures, a packet is transmitted to FCS nodes and according to the received responses, the faulty nodes are specified.