|
pp. 6415-6436
S&M4688 Research Paper https://doi.org/10.18494/SAM6535 Published: November 5, 2026 Internet of Things-based ESP32 Mamdani Fuzzy Rainfall-risk Alert System with MATLAB Validation and Multichannel Alert Evaluation [PDF] Rizky Rahmatullah and Hidetaka Nambo (Received July 18, 2026; Accepted September 14, 2026) Keywords: Internet of Things, ESP32, Mamdani fuzzy inference system, rainfall risk, WGAN-GP, MQTT
Rainfall-related risks can disrupt agricultural activities, while conventional threshold-based warning systems may produce abrupt decisions near predefined boundaries and inadequately represent uncertainty among weather variables. In this study, we developed an Internet of Things (IoT)-based rainfall-risk alert system using a Mamdani fuzzy inference system implemented on a low-cost ESP32 platform. Hourly rainfall, relative humidity, and hourly atmospheric pressure change were used to classify conditions into Safe, Warning, and Danger levels. A publicly available weather dataset recorded at 10 min intervals was aggregated into 8780 complete hourly samples. Because only 67 samples belonged to the Danger class, a conditional Wasserstein generative adversarial network with gradient penalty generated additional 6220 samples for rare-class and boundary-condition stress testing, producing a balanced dataset of 15000 samples. The ESP32 implementation reproduced the MATLAB reference without implementation-induced label differences across the evaluated datasets, indicating the consistent transfer of the Mamdani fuzzy model to a resource-constrained embedded platform. For the combined dataset, the defuzzified outputs produced a mean absolute error of 7.2458 × 10−5 and a root mean square error of 1.3630 × 10−4. A conventional threshold-based baseline achieved 69.987% agreement and a Macro-F1 score of 69.801%. The active buzzer, Message Queuing Telemetry Transport (MQTT), and Telegram channels achieved 100% success during controlled experiments. These findings confirm the implementation consistency and communication feasibility of the proposed prototype, although field-level predictive validity requires further evaluation.
Corresponding author: Rizky Rahmatullah![]() ![]() This work is licensed under a Creative Commons Attribution 4.0 International License. Cite this article Rizky Rahmatullah and Hidetaka Nambo, Internet of Things-based ESP32 Mamdani Fuzzy Rainfall-risk Alert System with MATLAB Validation and Multichannel Alert Evaluation, Sens. Mater., Vol. 38, No. 11, 2026, p. 6415-6436. |