This work presents the real-world deployment of an Adaptive Neuro-Fuzzy Inference System (ANFIS) for intelligent energy control in resource-constrained IoT devices. The proposed system employs a first-order Takagi–Sugeno fuzzy model with three Gaussian membership functions per input: ambient temperature, light intensity, and battery voltage. The model was trained offline using augmented environmental datasets and subsequently translated into optimized embedded C code for execution on an ESP32 microcontroller. The controller dynamically adjusts the node’s deep sleep duration according to environmental conditions, enabling adaptive behavior based solely on local environmental conditions without requiring external connectivity. A 10-day field deployment compared the ANFIS controller with conventional fixed and rule-based strategies. Results show that the ANFIS-based strategy reduced energy consumption by 31.1% relative to the fixed approach while maintaining accurate adaptation to environmental conditions (RMSE = 9.6 s). The inference process required less than 2.5 ms and used under 30 KB of RAM, confirming the feasibility of real-time fuzzy inference on resource-constrained embedded platforms.
Teso-Fz-Betoño et al. (Sat,) studied this question.