Neural network quantification for solar radiation prediction: An approach for low power devices
DOI:
https://doi.org/10.15649/2346030X.4107Keywords:
quantized neural network, solar radiation prediction, microcontrollerAbstract
Accurate solar radiation prediction leverages various machine learning techniques, with artificial neural networks (ANN) being the most common and precise due to their ability to detect and learn relationships between meteorological variables and solar radiation. Traditionally, training and deploying these models require high-capacity computers. However, the proliferation of low-power smart devices, such as embedded systems and mobile devices, necessitates exploring methodologies for implementing ANN on systems with limited computational resources. This paper proposes a quantized neural network model for solar radiation prediction, considering the hardware limitations of low-power devices like the Raspberry Pi RP2040 microcontroller. The methodology involves five stages: hardware and software selection, neural network development and quantization, microcontroller implementation, model validation, and result analysis. Experimental design allows detailed performance evaluation of quantized neural networks, demonstrating that the TensorFlow Lite Quantized Aware model is suitable for solar radiation prediction. Metrics such as root mean square error (RMSE) of 44.24 and R² of 0.96 indicate that the selected quantized model differs from the original non-quantized model by less than 0.5% in RMSE and 0.04% in R². The study concludes that implementing quantized ANN models on microcontrollers is a technically and economically viable solution for solar radiation prediction. Quantization enables complex predictive models to run on low-cost, energy-efficient devices, thereby democratizing advanced prediction technologies for critical applications like solar energy generation.
References
P.-E. Novac, G. Boukli Hacene, A. Pegatoquet, B. Miramond, and V. Gripon, “Quantization and Deployment of Deep Neural Networks on Microcontrollers,” Sensors, vol. 21, no. 9, p. 2984, Apr. 2021, doi: 10.3390/s21092984.
A. Aljanad, N. M. L. Tan, V. G. Agelidis, and H. Shareef, “Neural Network Approach for Global Solar Irradiance Prediction at Extremely Short-Time-Intervals Using Particle Swarm Optimization Algorithm,” Energies (Basel), vol. 14, no. 4, p. 1213, Feb. 2021, doi: 10.3390/en14041213.
W. I. Hameed et al., “Prediction of Solar Irradiance Based on Artificial Neural Networks,” Inventions, vol. 4, no. 3, p. 45, Aug. 2019, doi: 10.3390/inventions4030045.
Q. Huang and S. Wei, “Improved quantile convolutional neural network with two-stage training for daily-ahead probabilistic forecasting of photovoltaic power,” Energy Convers Manag, vol. 220, p. 113085, Sep. 2020, doi: 10.1016/j.enconman.2020.113085.
M. M. Lotfinejad, R. Hafezi, M. Khanali, S. S. Hosseini, M. Mehrpooya, and S. Shamshirband, “A Comparative Assessment of Predicting Daily Solar Radiation Using Bat Neural Network (BNN), Generalized Regression Neural Network (GRNN), and Neuro-Fuzzy (NF) System: A Case Study,” Energies (Basel), vol. 11, no. 5, p. 1188, May 2018, doi: 10.3390/en11051188.
S. Islam, J. Deng, S. Zhou, C. Pan, C. Ding, and M. Xie, “Enabling Fast Deep Learning on Tiny Energy-Harvesting IoT Devices,” in 2022 Design, Automation & Test in Europe Conference & Exhibition (DATE), IEEE, Mar. 2022, pp. 921–926. doi: 10.23919/DATE54114.2022.9774756.
X. Wei, H. Chen, W. Liu, and Y. Xie, “Mixed-Precision Quantization for CNN-Based Remote Sensing Scene Classification,” IEEE Geoscience and Remote Sensing Letters, vol. 18, no. 10, pp. 1721–1725, Oct. 2021, doi: 10.1109/LGRS.2020.3007575.
I. N. Kosovic, T. Mastelic, and D. Ivankovic, “Using Artificial Intelligence on environmental data from Internet of Things for estimating solar radiation: Comprehensive analysis,” J Clean Prod, vol. 266, p. 121489, Sep. 2020, doi: 10.1016/j.jclepro.2020.121489.
Y. Nahshan et al., “Loss aware post-training quantization,” Mach Learn, vol. 110, no. 11–12, pp. 3245–3262, Dec. 2021, doi: 10.1007/s10994-021-06053-z.
I. L. Orasan, C. Seiculescu, and C. D. Caleanu, “Benchmarking TensorFlow Lite Quantization Algorithms for Deep Neural Networks,” in 2022 IEEE 16th International Symposium on Applied Computational Intelligence and Informatics (SACI), IEEE, May 2022, pp. 000221–000226. doi: 10.1109/SACI55618.2022.9919465.
J. E. Gutierrez-Lopera, J. A. Toloza-Rangel, Á. J. Soto-Vergel, O. A. López-Bustamante, and D. Guevara-Ibarra, “Sistema integrado de monitoreo inalámbrico de variables agroambientales en un cultivo de tomate para la generación de mapas de intensidad,” Revista UIS Ingenierías, vol. 20, no. 2, Feb. 2021, doi: 10.18273/revuin.v20n2-2021014.
R. David et al., “TensorFlow Lite Micro: Embedded Machine Learning for TinyML Systems,” in Proceedings of Machine Learning and Systems, A. Smola, A. Dimakis, and I. Stoica, Eds., 2021, pp. 800–811. [Online]. Available: https://proceedings.mlsys.org/paper_files/paper/2021/file/6c44dc73014d66ba49b28d483a8f8b0d-Paper.pdf.
A. Paszke et al., “PyTorch: An Imperative Style, High-Performance Deep Learning Library,” in Advances in Neural Information Processing Systems, H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, Eds., Curran Associates, Inc., 2019. [Online]. Available: https://proceedings.neurips.cc/paper_files/paper/2019/file/bdbca288fee7f92f2bfa9f7012727740-Paper.pdf.
R.-Y. Ju, T.-Y. Lin, J.-H. Jian, and J.-S. Chiang, “Efficient convolutional neural networks on Raspberry Pi for image classification,” J Real Time Image Process, vol. 20, no. 2, p. 21, Apr. 2023, doi: 10.1007/s11554-023-01271-1.
S. S. Saha, S. S. Sandha, and M. Srivastava, “Machine Learning for Microcontroller-Class Hardware: A Review,” IEEE Sens J, vol. 22, no. 22, pp. 21362–21390, Nov. 2022, doi: 10.1109/JSEN.2022.3210773.
M. Rusci, M. Fariselli, A. Capotondi, and L. Benini, “Leveraging Automated Mixed-Low-Precision Quantization for Tiny Edge Microcontrollers,” 2020, pp. 296–308. doi: 10.1007/978-3-030-66770-2_22.
I. Hubara, Y. Nahshan, Y. Hanani, R. Banner, and D. Soudry, “Accurate Post Training Quantization With Small Calibration Sets,” in Proceedings of the 38th International Conference on Machine Learning, M. Meila and T. Zhang, Eds., in Proceedings of Machine Learning Research, vol. 139. PMLR, Sep. 2021, pp. 4466–4475. [Online]. Available: https://proceedings.mlr.press/v139/hubara21a.html.
S. Ghamari et al., “Quantization-Guided Training for Compact TinyML Models,” Mar. 2021.
Y. Abadade, A. Temouden, H. Bamoumen, N. Benamar, Y. Chtouki, and A. S. Hafid, “A Comprehensive Survey on TinyML,” IEEE Access, vol. 11, pp. 96892–96922, 2023, doi: 10.1109/ACCESS.2023.3294111.
P. Warden and D. Situnayake, Tinyml: Machine learning with tensorflow lite on arduino and ultra-low-power microcontrollers. O’Reilly Media, 2019.
T. O. Hodson, “Root-mean-square error (RMSE) or mean absolute error (MAE): when to use them or not,” Geosci Model Dev, vol. 15, no. 14, pp. 5481–5487, Jul. 2022, doi: 10.5194/gmd-15-5481-2022.
Downloads
Published
How to Cite
Issue
Section
Altmetrics
Downloads
License
Copyright (c) 2025 AiBi Journal of Research, Administration and Engineering
This work is licensed under a Creative Commons Attribution 4.0 International License.
The journal offers open access under a Creative Commons Attibution License
This work is under license Creative Commons Attribution (CC BY 4.0).