Jurnal ELTIKOM : Jurnal Teknik Elektro, Teknologi Informasi dan Komputer
Vol. 9 No. 2 (2025)

K-Nearest Neighbor Algorithm for Intelligent Monitoring and Control System Integration in Renewable Energy Applications

Junus, Mochammad (Unknown)
Fa‘izah, Laily Nur (Unknown)
Noor, Mohd (Unknown)
Putra, Indra Lukmana (Unknown)



Article Info

Publish Date
22 Dec 2025

Abstract

A real-time biogas monitoring and control system was developed by integrating the K-Nearest Neighbor (KNN) algorithm into an IoT-based framework for methane pressure prediction and automated control. The system uses an ESP32 microcontroller connected to temperature, gas, and pressure sensors (DHT22, MQ-4, MPX5700) to continuously collect data, with cloud connectivity provided through Firebase and Blynk platforms. The predictive model operates within a live feedback loop, allowing immediate actuation based on forecasted methane conditions. With an optimal parameter of k=4, the KNN model achieved 93.33% accuracy, supported by a mean absolute error (MAE) of 0.18 and a root mean square error (RMSE) of 0.21. A comparative evaluation with Random Forest and Gradient Boosting algorithms showed that, although these models yielded slightly higher accuracy, KNN provided superior computational effi-ciency for embedded deployment. The system maintained stable operation during tests involving sensor anomalies, network interruptions, and data noise. However, redundancy mechanisms and improved vali-dation strategies are recommended to enhance robustness. The findings demonstrate that methane pro-duction can be effectively predicted using temperature and pressure data, with further accuracy im-provements possible through additional process variables such as pH and fermentation age.

Copyrights © 2025






Journal Info

Abbrev

eltikom

Publisher

Subject

Aerospace Engineering Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering Engineering

Description

We are the Editor of Jurnal ELTIKOM, invites Mr. / Ms Lecturer, researcher and practitioner to be able to publish your paper on topics covering Electrical Engineering, Electronics Engineering, Telecommunications Engineering, Computer Engineering, Information ...