# La-CTP: Loop-Aware Routing for Energy-Harvesting Wireless Sensor Networks
## 4 Dissection of CTP in EH-WSN
### Experiment T-II  
Experiment T-II involved six nodes; its initialized topology and some critical chronological snapshots are shown in Figure 4a. In T-II, links \(l_{XS}\) and \(l_{YS}\) were both set to be unreliable with the link  
Figure 3: Snapshots of the CTP in experiment T-I, during which node \(X\) is shut down at the 260 th second. The time point below each topology timestamps the current experiment snapshot. The ETX values listed are the route ETX (routing gradient) instead of the link ETX. dynamics similar to link \(l_{XS}\) in experiment T-I. We had expected that node \(A\) could find a new route to \(S\) through \(Y\), even when node \(X\) would be turned down at time point 260 s.  
[T-II: 16.955 s]: the first loop happens due to the invalid links \(l_{XS}\) and \(l_{AX}\). The route ETX values of nodes \(A\), \(X\), and \(Y\) are all increasing, which further leads to the continuous increases in ETX at nodes \(B\) and \(C\). [T-II: 17.253 s]: the first loop containing nodes \(A\), \(B\), and \(C\) is successfully released just 258 ms after its happening, which is thanks to link \(l_{AX}\) which turns into validity during that term. Nevertheless, another loop is formed with nodes \(A\), \(X\), and \(Y\), because both \(X\) and \(Y\) still do not have available links connecting with \(S\). The behavior of these two successive loops is like a raging tornado which moves from place to place. [T-II: 115.534 s]: the second loop is removed at this moment due to the recovery of link \(l_{XS}\). [T-II: 260 s]: node \(X\) is turned off, resulting in the loss of parent at nodes \(A\) and \(Y\). Node \(A\) will possibly choose \(B\) as its parent once more and \(Y\) will choose \(A\) as its parent with no alternative: a new loop passing through \(A\), \(B\), and \(C\) is coming soon. [T-II: 289.586 s]: until now, node \(Y\) has not made successful handshakes with \(S\) since \(X\) went away. Thus, \(Y\) finally chooses \(A\) as its new parent, without minding the loop that is happening to \(A\) at this very moment. Figure 4b plots the beacons broadcasted and received by nodes \(S\), \(A\), and \(Y\) during T-II. The distribution pattern of these beacons offers extra details as to the loops shown in Figure 4a. We can see in Figure 4b that at the very beginning of T-II, all the three nodes broadcast and receive beacons frequently, aimed at establishing valid forwarding paths as soon as possible. After the routing inconsistency is removed after T-II: 17.253 s, each node thinks there has been a stable route for itself and then increases the interval of its beacon timer. That is why less beaconing events can been seen between the time points T-II: 17.253 s and T-II: 260 s.  
Shortly after node \(X\) leaves the network at time point T-II: 260 s, \(A\) and \(Y\) both lose their next-hop and then launch the beacon broadcasting almost immediately, struggling to find out new available parent. Finally, \(A\) chooses \(B\) as its parent at time point T-II: 289.586 s, which gives rise to a loop that will never leave the network until T-II ends. Unfortunately, this loop attracts the route seeker \(Y\), making \(Y\) unhesitatingly become a child of \(A\), even though \(A\) continuously broadcasts beacons of speaking out its loop detection. Node \(Y\) persists in its choice, thinking that it has already found a steady route provided by \(A\). Consequently, \(Y\) does not reset (shorten) its beacon timer for parent update, which can be figured out, in Figure 4b, from the very small amount of the \"Y.broadcast\" events after time point T-II: 289.586 s. Another reason that \(Y\) abandons \(S\) as its parent comes from the behavior of \(S\). When \(S\) does not receive any packets, it will assume no traffics and then certainly no loops in the network.