Resumo:
The growing global focus on energy efficiency drives the need for innovative solutions that
combine sustainability, economy, and technology. In this context, smart meters play an
essential role by enabling real-time monitoring of energy consumption, promoting transparency
for both providers and consumers. This work presents the development of a realtime
predictive analysis system for smart meters, utilizing embedded Machine Learning
(TinyML) on the ESP32 microcontroller. The system is designed to operate in environments
with limited connectivity, performing local data processing and reducing reliance
on cloud infrastructure.
The prototype uses real data collected from a refrigerator over 31 days, with continuous 24-
hour measurements. Three models were tested and two implemented: XGBoost regressor
for consumption forecasting, and One-Class SVM and Autoencoder for anomaly detection.
The models were optimized for embedded execution: the One-Class SVM and XGBoost
were converted to C++ using the micromlgen library, while the Autoencoder was adapted
for TensorFlow Lite (TFLite) with pruning techniques to reduce its size and computational
consumption.
The results showed that the One-Class SVM achieved higher accuracy in anomaly detection,
while the Autoencoder presented lower inference time and memory usage, making
it an efficient solution for embedded devices. The XGBoost demonstrated a Mean Absolute
Error (MAE) of 0.27 in consumption forecasting, indicating good performance in
the accuracy of its predictions. These results highlight the viability of applying TinyML
in energy monitoring systems, contributing to the efficient management of distribution
networks, fraud detection, and the promotion of more sustainable behaviors among users.