# Energy-Efficient LoRa Routing for Smart Grids
## 4 Results and Discussion
### Performance Analysis  
Performance matrices such as the energy value, energy consumption, number of operating nodes, number of dead nodes, and the node lifetime were calculated for the proposed algorithm and tested with the existing LEACH, DEEC, and SEP protocols. The energy value gives the information about the remaining energy in the node after transmitting the data for specific runs. From Table 4, it can be noted that, as the number of runs increased, the energy value of the proposed method decreased. This indicates an increase in dead nodes and a decrease in operating nodes. Compared to the existing methods, the energy value retained by the proposed method was higher than the existing methods for the same number of runs, as shown in Figure 8. For instance, the protocol was implemented for 500 runs. The proposed Cum_LEACH method had an energy value of 28.25 J, whereas the energy value of LEACH was 8.39 J; the energy value of DEEC was 27.24 J; the energy value of the SEP was 15.43 J. This indicates that the proposed Cum_LEACH retained a higher energy value compared to the existing methods. The energy consumption analysis for the proposed and existing methods is presented in Table 5. The energy consumed by the proposed Cum_LEACH method was the least at 500 runs. Even after 5000 runs, the total energy of the nodes was not totally consumed, whereas for the other methods, the energy was fully consumed. Thus, from the analysis, it can be inferred that when the Cum_LEACH protocol was used in conjunction with LoRa nodes, the energy consumption was less when compared to other protocols. The number of operating nodes for the different number of runs is shown in Figure 9. The time until the first sensor's energy runs out is known as the network lifetime. The results showed that the number of active nodes after 500 runs was 100 with the proposed Cum_LEACH protocol, but in the cases of LEACH, DEEC, and the SEP, the number of active nodes was 50, 82, and 99, respectively. After 1000 runs, the number of active nodes was 99, 10, 26, and 89 for the Cum_LEACH, LEACH, DEEC, and SEP protocols, respectively. Similarly, after 2500 runs, the proposed system had some active nodes, but the other systems had no active nodes, as shown in Table 6. It was also observed that the lifetime of the proposed system was extended up to 5000 runs, whereas the existing protocols' network lifetime was 2390, 1536, and 2046 runs (for LEACH, DEEC, and the SEP, respectively). Compared with the existing models, the proposed method Cum_LEACH had a higher number of operating nodes. From Figure 10, it is observed that the number of dead nodes identified when the Cum_LEACH protocol was used for CH selection was much less when compared to the other standard protocols. With the Cum_LEACH protocol, the first node died after 850 runs, whereas for LEACH, DEEC, and the SEP, the first node died within 150, 335, and 504 runs, respectively. Similarly, after 2500 runs, for the existing protocols, all the nodes were dead, but the proposed system still had some active nodes. Therefore, this shows that, for each \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**No. of Rounds** & **Cum\_LEACH** & **LEACH** & **SEP** & **DEEC** \\ \hline First node dies & 853 & 150 & 504 & 335 \\ Last node dies & 5000 & 2390 & 2046 & 1536 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Iteration after which the first and last dead node were observed. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**No. of Rounds** & **Cum\_LEACH** & **LEACH** & **SEP** & **DEEC** \\ \hline
1 & 49.95 & 49.93 & 49.96 & 49.90 \\
500 & 28.52 & 8.39 & 27.24 & 15.43 \\
1000 & 10.86 & 1.08 & 9.53 & 1.92 \\
1500 & 0.48 & 0.49 & 0.08 & 0.04 \\
2000 & 0.46 & 0.21 & 0.10 & 0.00 \\
2500 & 0.44 & 0.00 & 0.00 & 0.00 \\
5000 & 0.33 & 0.00 & 0.00 & 0.00 \\ \hlinerun, the number of dead nodes in the SG when tested with the proposed protocol was much less compared to the number of dead nodes using the other protocols.