# An Energy-Efficient Fail Recovery Routing in TDMA MAC Protocol-Based Wireless Sensor Network
## 5 Results and Discussion
### Analysis of the Performance of NE-MCR  
In order to generate simulation results, we exploited the C++ program based on the WiSer simulation tool introduced by [27]. This tool first generates a spanning tree of the target network by conducting a routing algorithm that is presented in [27]. For example, Figure 10 illustrates such a spanning tree. Then the simulator allocates TDMA time slots to each node in the spanning tree using a multichannel and multi-hop scheduling algorithm presented by [5].  
Figure 9: Example sub-tree of network where NE-MCR selects an optimal NBP.  
To examine the reliability of the proposed algorithm, we conducted simulations using example networks of different density varying from 100 up to 1000 nodes for a 1000 m \(\times\) 1000 m area. The sink node was placed in the center of the given area. We injected faults to 10 percent of the nodes to evaluate the network connectivity ratio of the MCR, DCFR and NE-MCR algorithms, respectively. The network connectivity ratio \(\beta_{c}\) is defined as follow:  
\[\beta_{c}=M/N \tag{18}\]  
Here, \(M\) is the number of nodes that can forward the data to the sink node and \(N\) denotes the total number of nodes in the network.  
Figure 11a shows the network connectivity ratio of the proposed algorithms, and compares algorithms for 10 example networks with 100 nodes up to 1000 nodes. The NE-MCR algorithm provides an increasingly higher network connectivity ratio for denser networks. Similarly, DCFR algorithm also performs a better network connectivity ratio, but we can see fluctuating behavior as well for the denser networks such as from 400 to 800. On the other hand, MCR algorithm shows the network connectivity ratio decreasing as the network density grows beyond 300 nodes.  
Figure 11: Simulation results regarding: (**a**) network connectivity ratio; (**b**) network isolation rate.  
Figure 10: Spanning tree-based routing-enabled WSN generated in WiSer C++.  
Another set of experiments are conducted to evaluate the recovery capability for an increasing number of faults. For all algorithms we increased the number of faulty nodes until the point where the network reaches a complete halt. Figure 11b shows the number of isolated nodes with a lost connection when the number of fault injections increases for the network of 1000 nodes. We compare two network conditions: A half-network-isolated condition (red dashed line) and a whole-network isolated condition (purple dashed line).  
Figure 11b shows that NE-MCR reaches the half-network-isolated condition when the fault injection ratio is 40% (400 faulty nodes out of 1000), whereas DCFR and MCR reach this condition much earlier when the fault injection ratio becomes 32% and 24% respectively. For NE-MCR, the whole-network-isolated condition comes as late as the fault injection ratio of 65%. In contrast, for MCR, this condition is reached as early as the fault injection ratio of 40%. DCFR algorithm results in the whole-network-isolated condition when the number of injected faulty nodes accounts for 60% of the overall network nodes. This experiment demonstrates that NE-MCR sustains the operation for the rest of the network significantly longer than DCFR and MCR algorithms. The worst result is produced by the MCR which proves that this algorithm alone cannot solve the out-of-reach problem. NE-MCR and DCFR algorithms can find alternative or backup recovery solutions for most of the faulty nodes that have the out-of-reach problem.