Regression-PID: Bare-Metal Predictive Temperature Control via Multiple Linear Regression on an ESP32-Based IoT Egg Incubator

Zainal Arifin, Siti Rokhmah, Tino Feri Efendi

Abstract


Abstract - The success of egg hatching depends on the stability of the incubation temperature within a highly strict tolerance (±0.3°C). Conventional PID controllers in egg incubators are reactive, correcting temperature only after an error is detected, which makes them prone to overshoot during warm-up. This study proposes Regression-PID — a PID controller augmented with a Multiple Linear Regression (MLR) predictive model deployed as bare-metal arithmetic in ESP32 firmware, without any machine learning framework. Trained offline using Ordinary Least Squares on historical temperature and duty cycle data, the optimal window W = 5 yields 11 coefficients (R² = 0.7634, RMSE = 0.1512°C) stored in 44 bytes of flash. The 30-second-ahead temperature prediction drives the proportional and derivative terms; the integral term uses actual temperature to guarantee steady-state error elimination. A comparative experiment was performed on an ESP32-based IoT egg incubator with real-time MQTT telemetry to a cloud backend. Regression-PID reduces overshoot by 68.1% (0.44 vs. 1.38°C), ISE by 89.7% (0.71 vs. 6.92 °C²·s), IAE by 74.6%, and steady-state standard deviation by 73.9% (0.014 vs. 0.053°C); both modes maintained the ±0.3°C tolerance band 100% of the time. Computational overhead is only +12.17 µs per cycle (0.0012% of the 1-second period) with deterministic latency. Performance differences are confirmed by Mann-Whitney U (p = 0.0009, r = 0.777) and Wilcoxon Signed-Rank (p < 0.0001). These results demonstrate that linear regression is sufficient for predictive thermal control in quasi-linear systems, with minimal complexity and no compromise to real-time feasibility.

Full Text:

PDF

References


BPS, “Populasi Unggas Menurut Provinsi dan Jenis Unggas (ekor).” Diakses: 25 Juni 2026. [Daring]. Tersedia pada: https://www.bps.go.id/id/statistics-table/3/Y2tKeVZYUk1UMDVNV1ROcGFXOW1kblZzZUZrMFp6MDkjMw==/populasi-unggas-menurut-provinsi-dan-jenis-unggas--ekor---2023.html?year=2023

S. YALCIN, S. Özkan, dan T. Shah, “Incubation Temperature and Lighting: Effect on Embryonic Development, Post-Hatch Growth, and Adaptive Response,” Front. Physiol., vol. 13, no. May, hal. 1–16, Mei 2022, doi: 10.3389/fphys.2022.899977.

E. Iraqi, A. A. Hady, N. Elsayed, H. Khalil, A. El-Saadany, dan K. El-Sabrout, “Effect of thermal manipulation on embryonic development, hatching process, and chick quality under heat-stress conditions,” Poult. Sci., vol. 103, no. 1, hal. 103257, Jan 2024, doi: 10.1016/j.psj.2023.103257.

F. Peprah, S. Gyamfi, M. Amo-Boateng, E. Buadi, dan M. Obeng, “Design and construction of smart solar powered egg incubator based on GSM/IoT,” Sci. African, vol. 17, hal. e01326, 2022, doi: 10.1016/j.sciaf.2022.e01326.

F. A. Septian et al., “Simulasi Pengendalian Suhu pada Inkubator Penetasan Telur Ayam Menggunakan Arduino Berbasis PID,” JITET (Jurnal Inform. dan Tek. Elektro Ter., vol. 13, no. 3, hal. 238, Jul 2025, doi: 10.23960/jitet.v13i3.6741.

M. C. A. Prabowo, I. Sayekti, S. Astuti, S. T. Nursaputro, dan S. Supriyati, “Development of an IoT-Based Egg Incubator with PID Control System and Web Application,” JOIV Int. J. Informatics Vis., vol. 8, no. 1, hal. 465, Mar 2024, doi: 10.62527/joiv.8.1.2044.

G. Pandey, B. Pokhrel, S. Budhathoki, dan S. K. Mandal, “IoT based PID Control Egg Incubator,” Int. J. Educ. Pract. Eng., vol. 2, no. 3, hal. 36–44, Jun 2025, doi: 10.70504/ijepe.v2i3.14313.

W. K. Simangunsong, C. T. H. Manurung, dan I. K. L. N. Suciningtyas, “Rancang Bangun Alat Penetas Telur dengan Sistem Pengendali Suhu dan Kelembapan Menggunakan Metode Fuzzy dan Monitoring Berbasis IoT,” J. Integr., vol. 17, no. 1, hal. 70–79, 2025, doi: 10.30871/ji.v17i1.9478.

R. C. Maaño, R. A. Maaño, P. J. De Castro, E. P. Chavez, S. C. De Castro, dan C. D. Maligalig, “SmartHatch: An Internet of Things–Based Temperature and Humidity Monitoring System for Poultry Egg Incubation and Hatchability,” in 2023 11th International Conference on Information and Communication Technology (ICoICT), IEEE, Agu 2023, hal. 178–183. doi: 10.1109/ICoICT58202.2023.10262810.

K. Il Ko dan M. H. Lee, “MQTT-Based Architecture for Real-Time Data Collection and Anomaly Detection in Smart Livestock Housing,” Sensors, vol. 25, no. 23, 2025, doi: 10.3390/s25237186.

M. Has, D. Kreković, M. Kušek, dan I. Podnar Žarko, “Efficient Data Management in Agricultural IoT: Compression, Security, and MQTT Protocol Analysis,” Sensors, vol. 24, no. 11, 2024, doi: 10.3390/s24113517.

J. C. Almachi, R. Vicente, E. Bone, J. Montenegro, E. Cando, dan S. Reina, “Implementation of a Neural Network for Adaptive PID Tuning in a High-Temperature Thermal System,” Energies, vol. 18, no. 12, hal. 3113, 2025, doi: 10.3390/en18123113.

J. Xie, L. Simpson, J. Asprion, dan R. Scattolini, “A Learning-based Model Predictive Control Scheme with Application to Temperature Control Units *,” in 2024 IEEE Conference on Control Technology and Applications (CCTA), IEEE, Agu 2024, hal. 675–680. doi: 10.1109/CCTA60707.2024.10666571.

R. David et al., “TensorFlow Lite Micro: Embedded Machine Learning on TinyML Systems,” 2021, doi: 10.48550/arXiv.2010.08678.

A. Sensirion, “Datasheet SHT3x-DIS Humidity and Temperature Sensor,” 2022. [Daring]. Tersedia pada: www.sensirion.com

L. Capogrosso, F. Cunico, D. S. Cheng, F. Fummi, dan M. Cristani, “A Machine Learning-Oriented Survey on Tiny Machine Learning,” IEEE Access, vol. 12, hal. 23406–23426, 2024, doi: 10.1109/ACCESS.2024.3365349.

S. Skogestad, “Simple analytic rules for model reduction and PID controller tuning,” Model. Identif. Control A Nor. Res. Bull., vol. 25, no. 2, hal. 85–120, 2004, doi: 10.4173/mic.2004.2.2.

H. Kopetz, “The Real-Time Environment,” in Real-Time Systems: Design Principles for Distributed Embedded Applications, Cham: Springer International Publishing, 2011, hal. 1–28. doi: 10.1007/978-1-4419-8237-7_1.

Z. Patonai, R. Kicsiny, dan G. Géczi, “Multiple linear regression based model for the indoor temperature of mobile containers,” Heliyon, vol. 8, no. 12, 2022, doi: 10.1016/j.heliyon.2022.e12098.




DOI: https://doi.org/10.29040/ijcis.v7i2.281

Article Metrics

Abstract view : 43 times
PDF - 22 times

Refbacks

  • There are currently no refbacks.


toto slot

situs toto

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License
slot88
slot88
slot88
slot777
slot gacor
slot dana
slot gacor 777
slot qris
slot qris
slot thailand
slot gacor
slot88