Development of a Machine Learning-Based Energy Prediction Model for Solar-Powered Offices

Development of a Machine Learning-Based Energy Prediction Model for Solar-Powered Offices

Authors

  • Adetoye ARIBISALA Department of Mechatronics Engineering, Federal University, Oye-Ekiti, Nigeria
  • Stephen T. OKE
  • Dauda I. ADEKUNLE
  • Dada A. OLUWASEGUN
  • Niyi OKESOLA

DOI:

https://doi.org/10.70118/ujet.2026.0302.41

Keywords:

Solar Photovoltaic, Machine Learning, Random Forest, Energy Forecasting, Smart Office

Abstract

Reliable energy forecasting has intensified. This paper presents the design and implementation of a machine learning-based solar power prediction system tailored for a 1.5 kVA solar-powered office environment. The primary objective is to accurately forecast photovoltaic (PV) energy production using real-time environmental data, thereby enhancing energy planning and reducing grid dependency. The system architecture integrates an ESP32 microcontroller with voltage and current sensors, along with a BME280 sensor for capturing temperature, humidity, and pressure. These sensor readings are transmitted to a cloud-based MySQL database via Wi-Fi and used to compute real-time power output. A Random Forest Regressor model is trained on the historical dataset comprising these features, with timestamp-derived inputs like hour of the day and day of the week. Model evaluation shows strong performance with an R² of 0.89, root mean square error (RMSE) of 23.91 W, and mean absolute error (MAE) of 18.27 W, indicating good predictive accuracy for short-term solar energy forecasting. The forecast results are displayed via a responsive web dashboard built with HTML, CSS, PHP, and JavaScript, offering live monitoring and daily prediction visibility to users. The system offers a practical and low-cost framework that bridges embedded hardware and AI-based forecasting for small-scale solar systems. This study validates the viability of using supervised learning with Internet of Things (IoT)-enabled sensor networks to support intelligent energy management in office settings. Future improvements may include model deployment on edge devices and automation of forecast scheduling for complete real-time autonomy.

Published

12-11-2026

How to Cite

ARIBISALA, A., Stephen T. OKE, Dauda I. ADEKUNLE, Dada A. OLUWASEGUN, & Niyi OKESOLA. (2026). Development of a Machine Learning-Based Energy Prediction Model for Solar-Powered Offices. UNIABUJA Journal of Engineering and Technology (UJET), 3(2), 507–523. https://doi.org/10.70118/ujet.2026.0302.41

Issue

Section

Articles

Similar Articles

<< < 1 2 3 4 5 6 7 8 9 > >> 

You may also start an advanced similarity search for this article.

Loading...