# Centralized Energy Prediction in Wireless Sensor Networks
## 6 Conclusions  
In this work, we proposed a centralized energy consumption prediction mechanism for WSN leveraged by SDN. Our hypothesis was that by moving the prediction processing overhead to the SDN controller we can improve the prediction accuracy and consequently the network performance. To test our hypothesis, we proposed an energy consumption model and implemented a prediction algorithm using Markov chain. Then, we evaluated the prediction and network performance when running the algorithm in every node and running it only in the SDN controller. Furthermore, to determine the real benefit, we compare the performance of both approaches with the case without prediction.  
Results showed that by moving the prediction algorithm processing overhead from every node to the SDN controller we improved the prediction accuracy, delivery rate and delay of control, data and energy packets. Moreover, we reduced the control packets overhead, however there is a significant increase in the energy packets traffic.  
Concerning the No-Prediction scheme, the Markov-PC scheme reduced the energy consumption, the control packets overhead and the energy packets delay. Furthermore, it improved the energy packets delivery rate. In the remaining metrics, excluding the energy packets overhead, the Markov-PC and the No-Predictions scheme obtained similar performance. These results show our centralized approach improves the prediction accuracy and network performance with less than 50% of predictions attempts correct. Therefore, there is room to improve the prediction accuracy and, thus, the network performance.  
Conceptualization, G.A.N.S. and C.B.M.; methodology, G.A.N.S. and C.B.M.; software, G.A.N.S.; validation, G.A.N.S. and C.B.M.; formal analysis, G.A.N.S.; investigation, G.A.N.S.; resources, C.B.M.; data curation, G.A.N.S.; writing--original draft preparation, G.A.N.S.; writing--review and editing, C.B.M.; visualization, G.A.N.S.; supervision, C.B.M.; project administration, C.B.M.; funding acquisition, G.A.N.S. and C.B.M. All authors have read and agreed to the published version of the manuscript.  
Figure 9: Processing overhead in seconds of No-Prediction and Markov chain schemes.  
**Funding:** This study was financed in part by the Coordenacao de Aperfeicoamento de Pessoal de Nivel Superior--Brasil (CAPES)--Finance Code 001. [PERSON] is supported by CNPq fellowship (Pq) #307304/2015-9. [PERSON] is supported by Universidad de Costa Rica.  
**Data Availability Statement:** The traces of the simulations we used for the performance analysis are available in the repository of Universidade de Sao Paulo in [[http://repositorio.uspdigital.usp.br/handle/item/303](http://repositorio.uspdigital.usp.br/handle/item/303)]([http://repositorio.uspdigital.usp.br/handle/item/303](http://repositorio.uspdigital.usp.br/handle/item/303)). The dataset's name is: _Data set of the paper: Centralized Energy Prediction in Wireless Sensor Networks Leveraged by Software-Defined Networking_.  
**Acknowledgments:** We would also like to thank Keysight Technologies for lending their N6705C power analyzer, and [PERSON] for the training to use this equipment.  
**Conflicts of Interest:** The authors declare no conflict of interest.