# Routing with Renewable Energy Management in Wireless Sensor Networks
## 3 REBORN-Renewable Energy-Based Routing Algorithm
The maximum battery charge of the nodes at the beginning of each simulation was 1000 Joules. The resident load was depleting as the rounds were executed until the designed end of the simulation. When the simulation reached the time corresponding to 06:00 a.m., the energy harvesting mechanism from the solar panel was started, lasting until 06:00 p.m. This harvesting process was repeated in the following two days. Each node was equipped with a GPS device. Furthermore, the nodes were aware of the amount of energy residing in their batteries, just as if they were aware of the solar intensity to which they were subjected. The sensing area was \(132\times 132\) m\({}^{2}\), keeping the node density in \(0.03\,\mathrm{nodes}/\mathrm{m}^{2}\) and obeying a disturbed grid. Regarding the results, curves represent average values, while error bars represent confidence intervals for 95% of confidence from 33 different random seeds. The simulation parameters are based in [40] and shown in Table 4.

### Energy Consumption

Figure 8 shows the average energy consumption during the 3 days of simulation. As can be seen, the GAF-EH received the lowest score among all, since there is no type of management in sending packets with regard to energy expended. The results also show that the REBORN-BAT algorithm, which has the control based on the battery level, the energy saving is expressive in relation to the algorithm that does not have any control. On the other hand, the energy consumption observed in the execution of the REBORN-SI algorithm is lower than that observed in all others. This is due to the fact that the amount of packets sent during the night is the minimum possible due to the energy management controls. Furthermore, REBORN-SI is able to modify the intervals for sending packets according to the solar intensity, that is, the packets will be sent regularly only during the period of energy harvest. Finally, these results show that our REBORN-both algorithm was able to get the best of both cases, i.e., to send more data when energy is abundant and save energy in other cases. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Standard Value** \\ \hline Density & \(0.03\,\mathrm{nodes}/\mathrm{m}^{2}\) \\ \hline SNR Position & Center of the monitored area \\ \hline Monitored area & \(132\times 132\,\mathrm{m}^{2}\) \\ \hline Number of nodes & 529 nodes (disturbed grid) \\ \hline Communication range & 30 m \\ \hline GPS inaccuracy & 3 m \\ \hline Energy spent to send packets & 0.11385J \\ \hline Energy spent on receiving packets & 0.05973J \\ \hline Energy spent in idle mode & 0.01716J \\ \hline Energy spent in sleep mode & 0.00099J \\ \hline Initial residual energy of the nodes & 1000J \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Default simulation scenario. ### Impact of the Dead Nodes

As shown in Figure 9, it is possible to see that the GAF-EH algorithm results in a greater number of dead nodes (i.e., nodes without remaining energy), due to its absence of control when sending data to the sink node. At this point, two considerations are necessary. First is that the energy of the nodes next to the sink is depleted more quickly because of a large number of exchanged packets, as it is possible to observe in the shaded area of the mentioned figure. The second consideration is that during the diurnal cycle, the amount of energy expended is greater than the harvested energy. ### Delivery Rate

As shown in Figure 10, it is possible to observe that in the REBORN-SI algorithm, there are periods of inactivity perceived during the first two nights of simulation. This is due to the increase in the time interval between shipments, which in this sense occurs every 2 h, making it impossible to deliver packets to the sink during these periods of inactivity. Although REBORN-both has a greater number of dead nodes than REBORN-SI, we can see that the delivery rate has not been affected. In this sense, we observed the effectiveness of the controls implemented in our proposed algorithm.