# PDTR: Probabilistic and Deterministic Tree-based Routing for Wireless Sensor Networks
## 6 Simulation Results
### Performance Comparison of the Proposed PDTR to the State-of-the-Art Routing Protocols
On the other hand, the updating of PDTR does not need much energy, unlike in PRPs, due to the fact that the update of PDTR happens only when any node loses 20% of its energy. Hence, better performance in terms of energy consumption (see Figures 8 and 9). Figure 8 shows the simulation results of sending, in each t = 0.1 s, one packet from one random node towards the sink for a period of 480 s; the number of nodes is assumed fixed \(N=100\), while the communication range R varies, such that: R = \(\{50,60,70,80,90,\text{and }100\ m\}\). Figure 9 shows the simulation results of sending, in each t = 0.1 s, one packet from one random node towards the sink for a period of 300 s; the communication range is assumed fixed \(R=80\) m, while the number of nodes \(N\) varies, \(N=\{100,120,140,160,180,200\}\). Figure 10 shows the simulation results after the round when the first node is declared dead of sending, in each t = 0.1 s, one packet from one random node towards the sink; the number of nodes \(N\) is assumed to be fixed \(N=100\), while the communication range \(R\) varies, \(R=\{50,60,70,80,90,\) and 100 m\(\}\). Figure 11 shows the simulation results after the round when the first node is declared dead of sending, in each t = 0.1 s, one packet from one random source node towards the sink, the communication range is assumed to be fixed \(R=80\) m, while the number of nodes N varies, \(N=\{100,120,140,160,180,200\}\). Figure 8: Impact of varying communication range on total energy consumption. Figure 10: Impact of varying the communication range on the network lifetime. Figure 12 shows the simulation results after the round when the first node is declared dead of sending in each round 50 packets (1 packet/1 s) from each source node among the randomly selected source nodes \(SN\), such that: \(SN=\{5,10,20,50,100\}\). Figure 13 shows the simulation results after the round when the first node is declared dead of sending in each round (second) an NP packet (1 packet/1 s) from each source node among five randomly selected source nodes, such that NP varies from 50 to 250. The simulation results prove that our proposed algorithm PDTR provides better performance than DRP, DAPR, and DHA in terms of energy consumption and lifetime. Figure 11: Impact of varying the number of nodes on the network lifetime. Figure 12: Impact of varying the number of sources nodes on the network lifetime. Figure 13: Impact of varying the number of packets on the network lifetime. From Figure 8, we can conclude that the relation between the communication range and the energy consumption is a decreasing relation--larger communication range leads to less energy consumption. This can be explained by the fact that extending the communication range will reduce the number of hops needed to transmit packets towards the sink. From Figure 9, we can conclude that the relation between the number of nodes and the energy consumption is an increasing relation. This can be explained by the fact that a larger network size means a longer paths length, thus higher path expected energy cost. From Figure 10, we can conclude that there is an increasing relation between the lifetime and the communication range; this can be concluded from the conclusion obtained from Figure 8. Larger communication range leads to lower energy consumption, and hence longer lifetime. From Figure 11, we can conclude that there is an increasing relationship between the lifetime and the network size. Despite the conclusion obtained from Figure 8, the larger network size leads to higher energy consumption. PDTR prolongs the lifetime when increasing the size of the network size, due to the fact that more nodes mean more possible forwarder candidates in a probabilistic strategy, thus providing a longer lifetime. From Figure 12, we can conclude that there is a decreasing relationship between the lifetime and the number of source nodes.