# Centralized Energy Prediction in Wireless Sensor Networks
## 5 Experiments and Results
### Prediction Mechanisms Performance Evaluation
#### 5.2.1 Results Analysis  
Figure 4 depicts the percentage of valid predictions and Figure 4 depicts the average prediction error metric. The Markov-PC scheme obtained the highest percentage of valid predictions and the lowest prediction error, which means it is the most effective to reduce energy packets updates. Moreover, we observed that the topology size has more impact on the Markov-PC scheme than on the Markov-Node scheme. In terms of percentage of valid predictions, the average results in the Markov-scheme decrease 8.68%, from 16 nodes to 81 nodes, while for the Markov-Node scheme the decrease is 1.76%. Figure 5 depicts the average energy consumption including the scenario without prediction. Comparing both Markov chain schemes with the No-Prediction scheme, the Markov-PC scheme reduces the average energy consumption of the networks with sizes from 16 to 49 nodes, whereas the Markov-Node scheme increases the average energy consumption for all sizes. This means that the Markov-Node scheme energy consumption trade-off is not positive: it spends more energy than the amount it is able to save. On the other hand, the Markov-PC scheme, the one with the better prediction performance, saves approximately 1% of energy consumption in the topologies between 16 and 49 nodes but increases this metric 1% for 64 nodes and 5% for 81 nodes. If we go back to the percentage of valid predictions in Figure 4 and compare those results with the energy consumption results for Markov-PC scheme, we can say that it is necessary over 40% of valid predictions to save energy. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Sensing** & **Processing** & **LPM1** & **Transmitting** & **Receiving** \\ \hline Sensing & 0 & 0 & 0 & 0 & 0 \\ \hline Processing & 75.6 & 0 & 1.35 & 5.94 & 0 \\ \hline LPM1 & 75.6 & 1.35 & 0 & 0 & 7.38 \\ \hline Transmitting & 0 & 10.8 & 0 & 0 & 0 \\ \hline Receiving & 0 & 21.6 & 0 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Transitions’ energy consumption (\(\mu\)J). Figure 4: Markov chain prediction accuracy: (**a**) shows the percentage of valid predictions (\(<\)5%) for the case running on the sensor node and running on the SDN controller and (**b**) shows the average prediction error for these two cases as well. Figure 5(a,b) depicts the control and energy packets overhead, respectively. Regarding control packets overhead, the results show similar values for all the schemes in topologies from 16 to 36 nodes. This means that the prediction schemes implementation do not increase the control overhead for small networks. Moreover, we observed that the Markov-PC reduces the control overhead in around 3% and 9% for 49, 64, and 81 nodes. On the other hand, the Markov-Node scheme increases the control overhead between 4.9% and 5.4% for topologies with 64 and 81 nodes. This increase is related to the control packets delivery rate, which is analyzed further below. Then, the results in Figure 5(b) show that the Markov-Node scheme reduces the energy packets traffic while the Markov-PC scheme increases it. Even though the Markov-PC scheme has a lower prediction error and a higher percentage of valid predictions than the Markov-Node scheme, the increase is because in the Markov-PC scheme the controller replies every energy information update with the energy consumption prediction result, but in the Markov-Node scheme this is not necessary. This means that using the Markov-PC we need 50% or more valid predictions to at least equal the No-Prediction scheme. On the other hand, around 27% of valid predictions (Figure 3(a)) in the Markov-Node scheme are enough to reduce up to 25% of the energy packets traffic. Figure 6(a,b) depicts the control and energy packets overhead, respectively. Regarding control packets overhead, the results show similar values for all the schemes in topologies from 16 to 36 nodes. This means that the prediction schemes implementation do not increase the control overhead for small networks.