Random Forest Regression for Energy Consumption Prediction on Raspberry Pi Edge Computing
Abstract
Efficient energy management in smart homes is critical for cost reduction and sustainability, yet conventional cloud-based monitoring systems often face challenges related to network latency, bandwidth consumption, and data privacy. This study proposes an Edge Computing architecture to predict electrical energy consumption locally using a Raspberry Pi, thereby eliminating the dependency on continuous cloud processing. The system integrates a PZEM-004T sensor to acquire real-time voltage, current, and power data, while the core intelligence is built upon the Random Forest Regression (RFR) algorithm trained and deployed directly on the Raspberry Pi to forecast short-term energy load based on historical usage patterns and Internet of Things (IoT). Experimental results demonstrate that the proposed edge system achieves high prediction accuracy with an R2 score of 0.94 and a Mean Absolute Percentage Error (MAPE) of 4.25%, and a Root Mean Square Error (RMSE) of 12.80 Watts using a model configuration of 100 estimators, confirming that Raspberry Pi based edge computing is a viable, low latency, and privacy preserving solution for intelligent energy management
Fields of Study & Subjects
Smart Grid Energy Management
IoT and Edge/Fog Computing
Green IT and Sustainability
Publication details
- Journal / source
- Jurnal Sistem Cerdas
- Publisher
- Asosiasi Prakarsa Indonesia Cerdas (APIC)
- Volume
- 9
- Issue
- 1
- Pages
- 144–155
- Publication date
- 18 May 2026