Fuzzy-Based Adaptive Temperature Management for Hydroponic Systems: An IoT-Enabled Approach Considering Nutrient Solution Dynamics
Abstract:
This study proposes a fuzzy-based adaptive temperature management system for hydroponic cultivation in tropical climates. Unlike conventional fixed-setpoint controllers, the proposed Mamdani fuzzy system utilizes pH and electrical conductivity (EC) as contextual inputs to dynamically adjust temperature control strategies. The underlying hypothesis is that maintaining lower root-zone temperatures (RZTs) during suboptimal pH/EC conditions may increase dissolved oxygen availability, partially compensating for nutrient stress. The Internet of Things (IoT)-enabled system employs Long Range wireless protocol (LoRa) communication for long-range, low-power data transmission, with fuzzy inference executed at the gateway for offline resilience. A five-month field validation (April–August 2024) in Ho Chi Minh City demonstrated effective temperature regulation, maintaining solution temperature within the 18–28 °C operational target range for 88.7% of the trial period, with zero exceedance of the 35 °C critical threshold. The system maintained pH at 5.72 ± 0.32 (86.4% time in optimal range) and EC at 1.87 ± 0.28 mS/cm (81.3% time in optimal range). Retrospective simulation comparing the proposed controller against On/Off, proportional-integral (PI) baselines, and temperature-only FLC baselines, demonstrated a 15–16% reduction in chiller runtime while maintaining equivalent thermal safety. Operational crop assessment across three cultivation cycles indicated commercially viable lettuce production. A dedicated system engineering analysis addresses architecture trade-offs, reliability, scalability, and cost-effectiveness for practical deployment in tropical commercial operations.
1. Introduction
Global food security faces unprecedented challenges driven by population growth, climate change, and diminishing arable land resources. By 2050, food demand is projected to increase by 70%, while arable land and freshwater resources are declining significantly [1]. In this context, Controlled Environment Agriculture, particularly hydroponic cultivation, has emerged as a cornerstone of future food security strategies, offering water efficiency improvements of up to 90% compared to conventional farming and enabling year-round production independent of external climate conditions [2], [3].
However, the theoretical efficiency of hydroponics is often compromised by operational realities in non-temperate regions. The foundational literature and technical standards for hydroponics were largely developed in temperate zones (Europe and North America), where the primary environmental challenge is typically heating during cold periods [4]. In tropical and subtropical climates, such as Southeast Asia, the thermodynamic challenge is reversed: managing excess heat becomes the yield-limiting factor [5], [6].
High ambient temperatures permeate the nutrient solution, triggering a cascade of adverse physiological effects. The optimal root-zone temperature (RZT) for lettuce is established at 18 °C–22 °C [7]. When solution temperatures equilibrate with tropical ambient peaks of 30 °C–35 °C, two opposing physical and biological phenomena create a critical imbalance [8].
The first phenomenon is reduced oxygen solubility. According to Henry’s Law, oxygen solubility in water is inversely proportional to temperature. At 20 °C, oxygen saturation in freshwater approximates 9.1 mg/L; by 30 °C, this capacity drops to approximately 7.5 mg/L, and at 35 °C, it decreases further still [9], [10]. The second phenomenon is elevated metabolic demand. Root metabolic rates (and the pathogens that attack them) increase with temperature following the Q10 effect: for every 10 °C rise, respiration rates approximately double, thereby doubling oxygen demand [11].
This disparity creates what may be termed an “anoxia gap.” Roots require substantially more oxygen to sustain their accelerated metabolism at precisely the moment when the water cannot hold sufficient oxygen. The result is root hypoxia, leading to nutrient uptake cessation, toxic ethylene accumulation, root browning, and susceptibility to opportunistic pathogens such as Pythium aphanidermatum, which thrives at temperatures of 23 °C–27 °C [12], [13].
The core innovation of the proposed system is the recognition that temperature stress does not occur in isolation-it interacts synergistically with chemical stressors [14]. A plant growing in chemically perfect solution can tolerate higher temperatures than one already struggling with nutrient deficiency or osmotic shock. The system design leverages these interactions, necessitating examination of the physiology of the three control variables.
pH is the master variable governing nutrient solubility in hydroponic systems. For hydroponic lettuce, the widely accepted optimal pH range is 5.5–6.5 [15], [16]. Deviations beyond these boundaries in either direction trigger distinct biochemical disruptions.
Below the acidic threshold of 5.5, and particularly below pH 5.0, macronutrients such as nitrogen, potassium, and calcium remain soluble, but micronutrient solubility-particularly manganese and iron-can increase to toxic levels. Furthermore, excessive acidity can directly damage root membrane integrity, causing proton toxicity and inhibiting cation uptake [17]. Studies have demonstrated that roots grown at pH 5.0–5.5 show 41% reduction in zinc accumulation and 36% reduction in leaf area compared to optimal conditions [18].
Above the alkaline threshold of 6.5, and particularly as pH rises above 7.0, essential ions precipitate out of solution. Iron reacts with hydroxyl ions to form insoluble iron hydroxide, becoming unavailable to plants and causing interveinal chlorosis that halts photosynthesis. Phosphorus also reacts with calcium to form insoluble calcium phosphate, creating dual deficiencies that severely compromise plant development [19].
Electrical conductivity (EC) serves as a proxy measurement for total dissolved salt (nutrient) concentration in the solution [20]. For lettuce cultivation, target EC values typically fall within the optimal range of 1.2–2.0 mS/cm, a concentration that ensures sufficient diffusion gradient for nutrients to enter roots without overwhelming cellular uptake mechanisms [21].
Deviations from this optimal range in either direction create distinct physiological challenges. When EC drops below 1.0 mS/cm, the condition indicates nutrient starvation: plants become undernourished, growth rates slow considerably, and yield potential decreases proportionally with the severity of the deficiency.
Conversely, when EC exceeds 2.0–2.5 mS/cm, a hypertonic environment develops in the root zone. High salt concentrations reduce the water potential gradient, making it thermodynamically difficult for roots to absorb water—a condition termed physiological drought [22]. Under these circumstances, plants can exhibit wilting symptoms even while fully submerged in nutrient solution. Additionally, elevated EC can cause specific ion toxicity and tip burn, a calcium deficiency condition exacerbated by rapid growth rates and insufficient water transport capacity [23].
While the optimal RZT is established at 18 °C–22 °C, recent research indicates that suboptimal but non-lethal temperatures, such as 25 °C, can induce complex physiological effects [24], [25].
The relationship between temperature and plant development involves trade-offs between biomass accumulation and quality attributes. Studies have shown that while shoot dry weight maximizes at 25 °C, pigment content including anthocyanins and carotenoids often increases at 35 °C as a stress response [26]. Lettuce produces these antioxidants to protect cellular structures against thermal oxidation. However, for commercial lettuce production, biomass yield remains the primary economic driver, making lower temperature maintenance critical for profitability.
Elevated RZT also impairs nutrient acquisition mechanisms. RZT particularly inhibits the uptake of nitrate ($\mathrm{NO}_3{ }^{-}$) and potassium (K+), both essential for vegetative growth. Research on red leaf lettuce demonstrated that increasing RZT from 25 °C to 35 °C significantly reduced shoot fresh weight and altered pigment concentrations, with anthocyanin content decreasing by approximately 40% at elevated temperatures [6]. More recently, Hayashi et al. [27] demonstrated that raising RZT by 3 °C above air temperature enhanced nutrient uptake from roots to leaves and increased amino acid and total soluble protein concentrations, confirming that RZT regulation directly modulates both productivity and metabolite profiles in hydroponic lettuce. The reduction in nutrient uptake capacity at high RZT results in pronounced growth depression and quality deterioration. Conversely, maintaining RZT at 22 °C while air temperature remains high promotes accumulation of soluble proteins and amino acids in roots, providing the metabolic building blocks necessary to fuel continued growth [28].
Traditional control strategies, particularly proportional-integral-derivative (PID) controllers [29], face several limitations when applied to hydroponic systems. The first limitation is non-linearity-the relationship between cooling power and water temperature varies with: ambient humidity, plant size (root mass), and time of day, causing a PID controller tuned for morning conditions to oscillate wildly in afternoon heat [30], [31]. The second limitation involves interacting variables: changing one variable affects others, such that adding acid to adjust pH also alters EC, and PID controllers are typically SISO (Single-Input, Single-Output) and cannot easily account for these cross-coupling effects [32]. The third limitation is overshoot: PID controllers commonly overshoot targets before settling, and in hydroponics, temperature overshoot (too cold) wastes energy while undershoot (too hot) increases disease risk. Fuzzy logic has demonstrated significantly less overshoot in agricultural applications [33].
Fuzzy Logic Control (FLC) operates on the concept of “partial truth.” Instead of Boolean “Hot” (1) or “Not Hot” (0), a temperature of 26 °C might be defined as 0.7 Ideal and 0.3 Warm. This mimics human reasoning-an experienced grower doesn’t panic at a thermometer reading of 26.1 °C; they consider it “slightly warm but acceptable” [34].
The Mamdani fuzzy inference method was selected for this application due to its intuitive rule structure and proven effectiveness in agricultural control systems [35], [36]. Unlike Sugeno-type systems that use mathematical functions for outputs, Mamdani uses linguistic rules for both inputs and outputs, making it ideal for capturing agronomic heuristics-qualitative rules derived from plant physiology [37]. This linguistic transparency enabled the direct translation of qualitative agronomic knowledge—such as “if pH is low and EC is low, then cool aggressively”—into the controller’s rule base.
The deployment of Internet of Things (IoT) technology in agriculture has enabled significant advancements in precision farming [38], [39]. Among wireless communication technologies, Long Range wireless protocol (LoRa) has emerged as particularly suitable for agricultural applications due to its combination of long range (2–15 km line-of-sight), extremely low power consumption (deep sleep current $\sim$0.2 $\mu$A), and robust signal penetration through foliage and greenhouse structures [40], [41].
A comparative analysis of wireless protocols for agricultural IoT reveals LoRa’s advantages, as summarized in Table 1.
The sub-GHz frequency (433 MHz) penetrates dense foliage and greenhouse structures significantly better than the 2.4 GHz bands used by Wi-Fi and ZigBee [42].
| Feature | LoRa (SX1278) | Wi-Fi (ESP8266) | ZigBee | Bluetooth LE |
| Range | 2–15 km | $\sim$100 m | $\sim$10–100 m | $\sim$10–100 m |
| Power (Tx) | $\sim$120 mA (short bursts) | $\sim$170–300 mA | $\sim$30 mA | $\sim$15 mA |
| Deep sleep current | $\sim$0.2 $\mu$A | $\sim$10–20 $\mu$A | $\sim$1–3 $\mu$A | $\sim$1–3 $\mu$A |
| Interference resistance | High (CSS modulation) | Low (2.4 GHz congestion) | Low | Low |
This study presents four primary contributions. First, a context-aware fuzzy temperature controller is developed using a Mamdani-type fuzzy inference system with pH and EC states as contextual inputs to adaptively determine temperature management strategies. Second, an energy-efficient IoT architecture is implemented, integrating LoRa wireless communication for long-range, low-power data transmission with edge-computing capability at the gateway level. Third, a five-month field trial in extreme tropical conditions provided rigorous experimental validation, while a retrospective simulation quantified the controller’s energy savings—a 15–16% reduction in runtime compared to On/Off and proportional-integral (PI) baselines. Fourth, a system engineering analysis is presented, addressing architecture trade-offs, reliability, scalability, and cost-effectiveness to facilitate practical deployment in tropical commercial operations.
2. Methodology
The proposed smart hydroponic monitoring and control system follows a four-layer IoT architecture: (1) sensor/actuator layer for data acquisition and control actions, (2) communication layer utilizing LoRa technology, (3) gateway layer for protocol conversion, fuzzy inference execution, and cloud connectivity, and (4) application layer providing user interfaces [43], [44]. Figure 1 illustrates the overall system architecture.
A critical design decision is the placement of the fuzzy inference engine on the gateway rather than in the cloud. This achieves latency independence and offline resilience. If the farm’s internet connection fails, the gateway can still receive sensor data via LoRa and activate local actuators (chiller/pumps) to save the crop. The cloud serves only for monitoring and data logging, accessible through mobile applications, rather than being a critical component in the control loop [43], [44].

Each sensor node integrates four primary components. The pH measurement utilizes a glass electrode probe with 0–14 pH range and ±0.1 pH accuracy, maintaining the optimal range of 5.5–6.5 for lettuce cultivation [15]. EC is measured using a conductivity probe with 0–20 mS/cm range and ±2% accuracy, with EC values maintained within the optimal range of 1.0–2.0 mS/cm for lettuce [21]. Temperature sensing employs DS18B20 digital sensors with ±0.5 °C accuracy and -10 °C to +85 °C operating range; the selection of DS18B20 is critical for agricultural IoT as its digital 1-Wire communication ensures data integrity in electrically noisy greenhouse environments, unlike analog thermistors affected by voltage drop and noise over long wire runs [45]. The STM32F103C8T6 microcontroller (ARM Cortex-M3) provides processing headroom for local data processing and edge-side signal filtering before transmission [46].
Sensors transmitted data to the gateway every 5 minutes via LoRa. The fuzzy inference engine re-evaluated control strategy every 10 minutes, with chiller actuation commands issued immediately upon strategy changes. This sampling frequency was chosen to balance system responsiveness with energy conservation and equipment longevity, preventing excessive chiller cycling while maintaining adequate temporal resolution to detect and respond to rapid environmental changes during peak heat periods.
The communication between sensor nodes and the central gateway utilizes LoRa technology operating in the 433 MHz unlicensed frequency band, offering several key advantages for this application [40], [41]. First, large-area coverage enables a single gateway to serve entire hydroponic facilities spanning multiple hectares, eliminating the complex mesh of Wi-Fi repeaters that would increase failure points. Second, battery longevity is achieved through LoRa’s asynchronous transmission protocol, allowing the STM32 to sleep 99% of the time with sleep-mode consumption of approximately 0.75 $\mu$A, theoretically enabling multi-year operation on small lithium batteries. Third, superior signal penetration is provided by the 433 MHz frequency, which penetrates dense foliage and greenhouse structures (metal/glass) significantly better than 2.4 GHz frequencies used by Wi-Fi and ZigBee [42].
The LoRa transceiver modules (SX1276/SX1278) were configured with the following parameters for the deployment environment: Spreading Factor SF7, Bandwidth 125 kHz, Coding Rate 4/5, Transmit Power 17 dBm, and payload size of approximately 20 bytes per packet. Each sensor node transmits one telemetry packet every 5 minutes. The effective communication range in the deployment environment (semi-enclosed hydroponic facility with partial metal roofing) was measured at approximately 200 m. Network reliability metrics recorded during the trial period include: average packet loss rate $\sim$2%, mean end-to-end latency $\sim$100 ms, and gateway uptime >99%. These parameter choices struck a balance between data rate, transmission range, and power use, so that communication stayed reliable inside the $\sim$200 m operating radius while packet collisions stayed low and node batteries lasted longer.
The gateway serves as the central hub connecting the LoRa sensor network to cloud infrastructure while executing the fuzzy control algorithm locally. Figure 2 presents the gateway block diagram.

The gateway serves as the system’s intelligence hub, integrating dual communication interfaces: a LoRa receiver module for sensor data acquisition and an ESP32-based WiFi module for cloud connectivity. Central to its operation is the main processing unit, which coordinates data flow and executes the Mamdani fuzzy logic controller for real-time adaptive temperature management. The operational logic of the gateway is illustrated in Figure 3.

The cloud server provides centralized data storage and enables remote access to system status and historical data. A user-friendly mobile application allows operators to monitor real-time values, view historical trends, receive alerts, and adjust settings remotely [47].
The core innovation of this study lies in the specific structure of the fuzzy rules. Unlike most hydroponic fuzzy controllers that employ separate fuzzy blocks for pH, EC, and temperature control [48], [49], [50], this study integrates these parameters into a unified inference system. The controller determines temperature strategy based on the current pH and EC conditions, effectively asking: given the present chemical state of the nutrient solution, what temperature management approach will best support plant health? The resulting 9-rule matrix, derived from three pH states and three EC states, operationalizes the Compensatory Control Hypothesis.
The fuzzy inference system employs two input variables and one output variable, all utilizing triangular membership functions for fuzzification and defuzzification.
The first input variable, pH status, operates over a universe of discourse spanning 0–14. Three linguistic variables characterize the pH state: Low represents acidic conditions below 5.5, Medium corresponds to the optimal range of 5.5–6.5, and High indicates alkaline conditions exceeding 6.5.
The second input variable, EC status, covers a universe of discourse from 0 to 5 mS/cm. The linguistic variables are defined as Low for values below 1.0 mS/cm indicating nutrient deficiency, Medium for the optimal range of 1.0–2.0 mS/cm, and High for values exceeding 2.0 mS/cm representing potential osmotic stress conditions.
The output variable, temperature management strategy, spans a universe of discourse from 18 °C to 38 °C. Three linguistic variables define the control actions: Cool targets aggressive cooling to maintain 22–25 °C during chemical stress conditions; Ideal represents energy-efficient operation at 25–28 °C when chemical parameters are optimal; and Warm tolerates temperatures up to 32 °C when the system prioritizes preventing thermal damage over aggressive cooling.
Figure 4 illustrates the membership functions for all input and output variables.



The 9-rule matrix operationalizes the Compensatory Control Hypothesis, as presented in Table 2.
| Rule | pH | EC | Strategy | Scientific Rationale |
| R1 | Low | Low | Cool | Dual chemical stress. Aggressive cooling maximizes DO to support ATP generation for remaining nutrient uptake. |
| R2 | Low | Medium | Cool | pH stress compromises nutrient availability. High DO compensates by supporting root respiration. |
| R3 | Low | High | Ideal | Complex stress state. Moderate cooling balances DO support against energy expenditure. |
| R4 | Medium | Low | Ideal | Optimal pH but nutrient-starved. Standard operation with moderate temperature. |
| R5 | Medium | Medium | Ideal | Chemically optimal conditions. Accept 25–28 °C to conserve cooling energy. |
| R6 | Medium | High | Warm | Slight EC stress manageable. Allow temperatures up to 30 °C. |
| R7 | High | Low | Warm | Alkaline stress affects micronutrients but is generally less acute. Standard operation. |
| R8 | High | Medium | Warm | Moderate stress. Standard operation acceptable. |
| R9 | High | High | Warm | Severe chemical stress. Prevent lethal peaks ($>$35 °C) without excessive cooling, based on Energy-economic trade-off: when plants are severely compromised by osmotic stress (high EC) and nutrient precipitation (high pH), aggressive cooling may not improve survival; thus, prioritize damage prevention. |
Two rules warrant particular explanation due to their counterintuitive nature. Rule R5 represents the energy-saving strategy: the 25 °C–28 °C temperature range is technically above the strict physiological optimum of 20 °C; however, because the plant is not experiencing chemical stress under these conditions, it can tolerate this slightly elevated temperature. By accepting this higher setpoint, the system avoids the energy expenditure required to run chillers to achieve 20 °C, yielding substantial cooling load reduction in tropical climates where ambient temperatures routinely exceed 35 °C.
Rule R9 embodies the tolerance strategy for extreme conditions. When ambient temperature reaches 38 °C, maintaining a 22 °C solution temperature would require massive energy expenditure. Furthermore, if the plant is already osmotically compromised due to high EC, aggressive cooling may not fundamentally resolve the water uptake limitation. Under these circumstances, the system shifts to damage control mode, prioritizing prevention of lethal temperature peaks above 35 °C rather than expending energy to pursue a physiological optimum that remains unattainable given the combined stress state.
The Center of Gravity (Centroid) method is used for defuzzification, as expressed in Eq. (1):
where, $\mu_i$ represents the membership degree of each activated rule and Ti represents the corresponding temperature setpoint. The centroid method was selected due to its computational simplicity and smooth output characteristics, making it suitable for real-time embedded implementation on the gateway platform.
The nine-rule fuzzy rule-base (Table 2) was developed through a systematic three-stage process combining literature review, domain expert consultation, and empirical refinement.
Stage 1: Literature-based initialization. The initial membership function ranges and rule consequents were derived from established agronomic literature on lettuce root-zone requirements. The pH boundaries (Low $<$ 5.5, Medium 5.5–6.5, High $>$ 6.5) correspond to the well-documented optimal pH range for nutrient availability in hydroponic lettuce cultivation. The EC boundaries (Low $<$ 1.0, Medium 1.0–2.0, High $>$ 2.0 mS/cm) reflect the standard recommended conductivity range for leafy greens. The temperature output categories (Cool: 22–25°C, Ideal: 25–28 °C, Warm: 28–32 °C) were established based on research demonstrating the relationship between RZT, dissolved oxygen solubility, and nutrient uptake efficiency.
Stage 2: Expert elicitation. The initial rule consequents were reviewed and refined through consultation with agronomists experienced in tropical hydroponic lettuce production. Their input was particularly valuable for Rules R5 and R9. For R5 (Medium pH, Medium EC → Ideal), experts confirmed that when nutrient chemistry is optimal, plants tolerate moderate temperature elevation (25–28 °C) without measurable growth penalty, supporting the energy-saving strategy. For R9 (High pH, High EC → Warm), experts advised that under severe combined chemical stress, the marginal benefit of aggressive cooling diminishes because the primary growth limitation is chemical, not thermal.
Stage 3: Empirical tuning. During a two-week preliminary trial preceding the main experiment, the membership function overlap regions and output centroids were fine-tuned based on observed plant responses. The overlap width between adjacent membership functions was set to 0.5 pH units and 0.5 mS/cm to ensure smooth transitions without abrupt control switching, confirmed by the sensitivity analysis presented in Section 3.5.
The system was deployed for five months (April–August 2024) at a hydroponic facility in Ho Chi Minh City, Vietnam, coinciding with the hottest season and representing an extreme stress test for the control system.
Lettuce (Lactuca sativa) was selected as the test crop due to its temperature sensitivity and common use in hydroponic research [51]. The cultivation system employed a recirculating Nutrient Film Technique (NFT) with 200-liter reservoir capacity.
Environmental conditions during the trial period were extremely adverse for lettuce cultivation, with ambient temperatures ranging from 24 °C during nighttime to 38 °C during peak daytime hours, and relative humidity varying between 55% and 95%. At 38 °C ambient temperature, stomata close to conserve water, effectively halting photosynthesis. If roots simultaneously experience 38 °C, respiration rates increase dramatically, oxygen depletes rapidly, and plants essentially suffocate and starve simultaneously [52].
The deployed hydroponic system (Figure 5) comprised an NFT-based growing section with 6 channels, each 3 m in length, with plants spaced at 20 cm intervals, yielding a planting density of approximately 25 plants/m2. The nutrient solution reservoir (200 L capacity) was insulated with 3 cm EPS foam to reduce passive heat gain. The recirculating pump maintained a flow rate of 1.5 L/min per channel. Piping between the reservoir and NFT channels was 25 mm PVC with foam wrap insulation. Three cultivation cycles of butterhead lettuce were completed during the trial period, with approximately 80–100 plants per cycle.


Since the experimental system was decommissioned after the trial, physical side-by-side comparison with baseline controllers was not feasible. A retrospective simulation approach was employed using the measured environmental data as driving inputs, combined with a fitted thermal model, to simulate multiple control strategies under identical conditions.
A first-order lumped-parameter model represents the thermal dynamics of the nutrient solution reservoir, as expressed in Eq. (2):
where, Tliquid[k] is the nutrient solution temperature at time step k (°C); Tamb[k] is the ambient temperature at time step k (°C); $\alpha$ = 0.003314 °C/(min·°C) is the natural heat exchange coefficient; $\beta$ = 0.0066 °C/min is the chiller cooling rate; and u[k]$\in${0,1} is the chiller control signal. Parameters were optimized via Nelder–Mead minimization on a three-month training window (June–August 2024), achieving validation RMSE of 1.41 °C. The thermal time constant $\tau$ = 1/$\alpha$ $\approx$ 302 min (5.0 hours) confirms that the 5-min sampling and 10-min control intervals adequately capture system dynamics ($\tau/\Delta$tsample $\approx$ 60 $\gg$ Nyquist minimum).
Three baselines were implemented: (a) On/Off with 2 °C hysteresis deadband and 25 °C setpoint; (b) PI controller (Kp = 1.5, Ki = 0.02, Ziegler–Nichols tuned) with 25 °C setpoint; (c) Temperature-only FLC (ablation: same hysteresis/safety as proposed FLC, but fixed 25 °C setpoint without pH/EC context). All controllers were simulated over July 2024 using identical measured ambient temperature, pH, and EC profiles.
3. Results
Figure 6 presents ambient temperature and humidity data from July 2024 (peak hot season), revealing substantial diurnal variation characteristic of tropical climates.


The system successfully maintained nutrient solution temperature below the critical 35 °C threshold throughout the trial, as shown in Table 3.
The system achieved a mean solution temperature of 23.6 °C ± 3.3 °C, with recorded temperatures ranging from 16.8 °C to 34.9 °C. The solution temperature was maintained within the optimal 18–28 °C range for 88.7% of the trial period, with zero exceedance of the critical 35 °C threshold.
Parameter | Result |
Target | $<$35 °C (critical threshold) |
Mean Temperature | 23.6 ± 3.3 °C |
Temperature Range | 16.8–34.9 °C |
Maximum Recorded | 34.9 °C |
Time in operational range (18–28 °C) | 88.7% |
Threshold Exceedance ($>$35 °C) | 0% |
Chemical parameter stability was maintained throughout the cultivation period, as summarized in Table 4.
The pH stability is particularly noteworthy. Root rot (Pythium) typically causes rapid pH shifts as decaying roots release organic acids. The observed stability suggests roots remained healthy despite above-ideal temperatures, supporting the compensatory cooling rationale [13].
Parameter | Target | Achieved | Compliance |
pH | 5.5–6.5 | 5.72 ± 0.32 | 86.4% |
EC | 1.0–2.0 mS/cm | 1.87 ± 0.28 mS/cm | 81.3% |
The mobile application interface captured real-time monitoring data throughout the experimental period, as shown in Figure 7. The displayed trends demonstrate stable pH maintenance around 5.9–6.0 and EC values within 1.70–1.90 mS/cm, while solution temperature fluctuated between 18.8 °C and 34.7 °C, consistently remaining below the critical 35 °C threshold.


Figure 8 illustrates the fuzzy membership function activation and inference results during operation, demonstrating the controller’s responsive behavior under varying conditions.
The controller exhibited context-sensitive responses across different operational scenarios. When pH dropped to 5.2, corresponding to a Low membership value of 0.7, with EC at 1.5 mS/cm yielding a Medium membership of 0.8, the controller activated aggressive cooling to maintain solution temperature at 24 °C. During optimal conditions with pH at 6.0 and EC at 1.6 mS/cm, the controller permitted temperature to rise to 28 °C, conserving cooling energy. When EC increased to 1.85 mS/cm while pH remained within the optimal range, the controller maintained moderate temperature around 27 °C, balancing the emerging EC stress against energy efficiency.



Figure 9 presents the temperature response over a representative monitoring period, illustrating the adaptive nature of the control strategy.


Table 5 lays out the theoretical cooling savings from the adaptive approach relative to a fixed setpoint. However, this represents only the steady-state picture—Section 3.4 runs a full simulation that accounts for transient behavior and gives a more realistic number.
Control Strategy | Target Temperature | $\Delta$T from Ambient (38°C) | Relative Cooling Load |
Fixed setpoint | 22 °C (constant) | 16 °C | 100% (baseline) |
Adaptive (stressed) | 24 °C | 14 °C | 87.5% |
Adaptive (optimal) | 28 °C | 10 °C | 62.5% |
According to Newton’s Law of Cooling [53], heat transfer rate is proportional to temperature differential. By relaxing the setpoint to 28 °C during chemically optimal periods, the system reduces heat load by approximately 37.5% during those intervals compared to maintaining a constant 22 °C setpoint. When pH and EC conditions are optimal (Rule R5), the system permits solution temperature to rise to 28 °C, reducing the temperature differential from 16 °C (38 °C–22 °C) to 10 °C (38 °C–28 °C), thereby reducing instantaneous cooling load by 37.5%.
These calculations represent theoretical heat load reductions based on Newton’s Law of Cooling and assume constant chiller efficiency (coefficient of performance, COP). Actual cooling load reduction depend on chiller performance curves, ambient conditions, thermal losses from reservoir and piping, and system-specific factors. Direct electrical consumption measurements (kWh) were not recorded during this trial and represent a limitation for future quantification. The 37.5% reduction represents a first-order approximation of cooling load reduction potential during periods when the adaptive controller permits elevated temperatures. Real-world cooling load reduction would be lower due to: (1) chiller COP degradation at higher ambient temperatures, (2) parasitic loads from pumps and control systems, (3) thermal mass effects of the reservoir buffering temperature changes, and (4) the time-varying nature of cooling demand throughout the day. Comprehensive energy audits with electrical metering are recommended for future deployments to validate actual operational cost reductions.
Table 6 summarizes the comparative performance metrics from the retrospective simulation.
Controller | MAE (°C) | RMSE (°C) | Peak (°C) | Time $>$ 30 °C (%) | Time $>$ 35 °C (%) | ON-Time (%) | Cyc./d | kWh/d |
On/Off (sp = 25 °C) | 3.66 | 4.16 | 32.4 | 1.4 | 0.0 | 18.1 | 0.7 | 4.34 |
PI (sp = 25 °C) | 3.66 | 4.15 | 32.4 | 1.5 | 0.0 | 17.5 | 0.7 | 4.21 |
Context-aware FLC | 4.20 | 4.79 | 32.4 | 1.4 | 0.0 | 15.4 | 0.7 | 3.68 |
Temp-only FLC | 3.65 | 4.15 | 32.4 | 1.4 | 0.0 | 18.3 | 0.7 | 4.39 |
Figure 10 presents the retrospective controller comparison over a representative week (July 15–22, 2024).
All four controllers maintained solution temperature below 35 °C (peak: 32.4 °C). The context-aware FLC achieved a chiller ON-time ratio of 15.4%, compared to 18.1% (On/Off), 17.5% (PI), and 18.3% (Temp-only FLC). This represents an estimated 14.9% reduction in chiller runtime relative to On/Off control and 15.8% relative to the temperature-only FLC, directly demonstrating the value of pH/EC contextual inputs.
The context-aware FLC’s higher MAE (4.20 °C vs 3.65–3.66 °C) relative to its own adaptive setpoint reflects the intentional setpoint relaxation mechanism: when pH and EC indicate non-critical conditions, the controller raises the target temperature (to 26–30 °C), reducing chiller operation. This is the designed energy-saving mechanism, not a tracking deficiency.



Figure 11 presents the fuzzy controller sensitivity surface across the full pH–EC input space.
The sensitivity surface shows smooth, continuous transitions across the full pH–EC input space, with no abrupt discontinuities at membership boundaries. The setpoint ranges from 23 °C (dual stress: low pH, low EC) to 30 °C (high pH, high EC). The gradient is steepest along the pH axis in the low-pH region, reflecting the rule-base’s prioritization of cooling under acidic stress. The smooth output confirms robustness to sensor drift (±0.1 pH, ±0.2 mS/cm).

While the primary focus of this study was control system validation, crop performance was monitored through periodic observational assessment during harvest events. Three cultivation cycles of butterhead lettuce (Lactuca sativa var. capitata) were completed, with approximately 80–100 plants per cycle. The crop assessment was conducted as part of routine farm operations and does not constitute a controlled agronomic trial. Results should be interpreted as indicative operational outcomes. A summary of the observed crop parameters is presented in Table 7.
The observed bolting incidence ($\sim$3.2%) is consistent with reported heat stress disorder rates in lettuce cultivars under managed thermal conditions [54]. Photographic documentation of harvest events was not systematically archived during the trial. Visual observations during harvest confirmed predominantly healthy root systems (white, minimal browning) consistent with the reported root health scores.
Parameter | Unit | Observed Value | Assessment Method |
Fresh weight per plant | g/plant | ~178 ± 21 | Digital scale (±0.1 g), post-harvest |
Leaf number | leaves/plant | $\sim$17 ± 2 | Count of fully developed leaves |
Survival rate | % | $\sim$95.8 | Surviving/transplanted plants |
Bolting incidence | % | $\sim$3.2 | Plants with flowering stem |
Root health score | 1–5 scale | $\sim$4.3 ± 0.5 | Visual: 1 = severe browning; 5 = white/healthy |
A time-in-range analysis across the full five-month trial (49,670 data points) quantifies the system’s operational effectiveness, as illustrated in Table 8.
These compliance rates, combined with the observational crop data, provide indirect support for the system’s effectiveness in maintaining conditions conducive to commercial lettuce production.
Parameter | Operational Range | Time in Range (%) | Mean ± SD | Exceedance Events |
Tliquid | 18–28 °C | 88.7% | 23.6 ± 3.3 °C | 0 events $>$ 35 °C |
pH | 5.5–6.5 | 86.4% | 5.72 ± 0.32 | 2,901 events outside (242 h) |
EC | 1.0–2.0 mS/cm | 81.3% | 1.87 ± 0.28 mS/cm | 2,167 events outside (181 h) |
4. Discussion
The compensatory control hypothesis posits that adaptive cooling under chemical stress can enhance dissolved oxygen availability, partially compensating for impaired nutrient uptake. This rationale is grounded in Henry’s law: the temperature range maintained by the FLC (23–30 °C) corresponds to theoretical DO saturation of 7.5–8.4 mg/L, compared to 7.0–7.5 mg/L at 30–32 °C. However, DO was not directly measured during the trial, and the compensatory mechanism remains a plausible physiological rationale rather than a validated mechanism. Future studies should incorporate continuous DO monitoring.
The findings align with root-zone cooling studies from Singapore and Brazil. Singapore studies demonstrated that root-zone cooling to 20 °C enabled lettuce production under high tropical air temperatures (up to 40 °C), with significantly higher biomass than ambient RZT controls [55]. The 23.6 °C average in this study is comparable to root-zone cooling studies, but the adaptive nature offers an improvement: instead of a fixed 20 °C (potentially wasting energy at night), the fuzzy system fluctuates based on need. A retrospective baseline comparison shows that the context-aware FLC achieves an estimated 14.9–15.8% reduction in chiller runtime compared to conventional controllers, while maintaining equivalent thermal safety (peak 32.4 °C, 0% time $>$ 35 °C). The ablation study confirms that pH/EC context adds measurable value: the context-aware FLC reduced ON-time by 2.9 percentage points vs. the temperature-only FLC. The previously reported 37.5% theoretical cooling load reduction is hereby revised to an estimated 15–16% runtime reduction based on retrospective simulation. This estimate assumes constant chiller COP and should be validated with direct kWh measurements in future deployments.
The temperature range maintained by the system (predominantly 22–28 °C) falls below the thermal optimum for common root pathogens including Pythium spp. (30–35 °C). It is hypothesized that lower RZTs may contribute to reduced pathogen proliferation. However, no disease monitoring was conducted, and this hypothesis remains speculative pending controlled experiments with pathogen challenge tests.
The fuzzy inference engine’s output universe spans 22–32 °C. Rule R9 (High pH, High EC → Warm) produces setpoints in the 28–32 °C range. A hard safety override operates independently: if Tliquid exceeds 33 °C, the chiller is forced ON regardless of the fuzzy output. This two-layer structure (fuzzy for energy-optimal operation + deterministic safety for thermal protection) ensures that no plants are exposed to lethal temperatures under any chemical condition.
Several limitations of this study should be acknowledged. First, the baseline comparison was conducted retrospectively using a fitted first-order thermal model (RMSE 1.41 °C); physical side-by-side experiments on parallel systems would provide stronger causal evidence. Second, energy savings were estimated from simulated ON-time ratios assuming constant rated power and COP; direct kWh measurements should be incorporated in future deployments. Third, the compensatory hypothesis was motivated by Henry’s law but not validated by DO measurements. Fourth, per-plant crop measurements were not systematically recorded; reported values are operational estimates from representative sampling, and a dedicated agronomic trial with randomized block design is recommended. Fifth, the architecture supports local inference and incidental internet outages during the trial did not interrupt control; however, a formal disconnection test was not conducted. Sixth, results are limited to lettuce in a single NFT system in HCMC; generalization to other crops, methods, or climates requires additional validation.
5. System Engineering Perspective and Operational Value
This section addresses the system-level design decisions, trade-offs, and operational value of the proposed architecture for practical deployment in tropical commercial hydroponic operations.
The system was designed to operate in the specific context of small-to-medium scale hydroponic farms in tropical urban environments, where several engineering constraints shape the architectural decisions. Table 9 summarizes the primary design objectives and their associated constraints.
Design Objective | Constraint | Design Response |
Thermal safety | Ambient temperature 25–45 °C; solar radiation on exposed reservoirs | Two-layer control: fuzzy adaptive setpoint + hard safety override at 33 °C |
Energy efficiency | Chiller is dominant energy consumer ($\sim$60–80% of total power); electricity $\sim$0.08 USD/kWh | Context-aware setpoint relaxation; estimated 15% runtime reduction (Section 3.4) |
Network reliability | Unstable internet in peri-urban farm locations; potential power outages | LoRa local communication independent of internet; edge inference on gateway |
Low maintenance | Limited technical labour; farms operated by 1–2 workers with basic training | Autonomous control with alert-based intervention; sensor calibration schedule |
Affordability | Capital budget $<$500 USD for monitoring and control hardware (excluding chiller) | Low-cost components: ESP32, commodity sensors, single-channel LoRa gateway |
Scalability | Multi-tank facilities with 2–10 independent growing zones | Star-topology LoRa network with unique node addressing |
The system architecture reflects deliberate trade-offs between competing design priorities. Three key architectural decisions and their rationale are presented below.
First, regarding the communication protocol, WiFi offers high bandwidth but is fundamentally dependent on router infrastructure and internet connectivity, making it a single point of failure for critical control applications. ZigBee provides mesh networking but has limited range (10–30 m in practice) insufficient for farms with dispersed growing areas. LoRa was selected for its combination of long range (measured approximately 200 m in the deployment environment), ultra-low power consumption, and infrastructure independence. The trade-off is reduced bandwidth compared to WiFi (LoRa at SF7 achieves approximately 5.5 kbps), which restricts the system to low-frequency telemetry. This limitation is acceptable because the thermal time constant of the reservoir (approximately 5 hours) requires only infrequent data transmission (one packet per 5 minutes, approximately 20 bytes payload).
Second, regarding the inference location, cloud-based inference offers advantages in computational flexibility, centralized logging, and remote dashboard accessibility. However, it introduces a critical dependency on internet connectivity for the control loop. Given the unreliable internet conditions in peri-urban farm locations in Ho Chi Minh City, the fuzzy inference engine was implemented on the local gateway. This edge-computing approach ensures that the control loop operates continuously regardless of internet status. The trade-off is reduced computational capacity, which constrains the complexity of the inference algorithm. The Mamdani fuzzy inference engine with 9 rules and 3 variables was specifically designed to fit within the gateway processing constraints (execution time less than 50 ms per inference cycle). Cloud connectivity is maintained as a non-critical path for data logging, visualization, and mobile alerts.
Third, regarding the control architecture, while MPC could theoretically achieve superior optimal control by incorporating a predictive thermal model, it requires accurate system identification, real-time optimization, and significantly higher computational resources, all of which conflict with the design constraints of low cost, edge deployment, and minimal maintenance. Fuzzy logic was chosen for its interpretability (rules can be understood and modified by agronomists without control engineering expertise), computational simplicity (suitable for embedded deployment), and inherent robustness to model uncertainty.
Long-term operational reliability requires systematic attention to sensor accuracy degradation, communication failures, and component aging. The following reliability measures were implemented.
Regarding sensor calibration, pH sensors are subject to electrode drift and require regular calibration. Based on manufacturer specifications and observed drift rates during the trial, a two-point calibration (pH 4.0 and pH 7.0 buffer solutions) is performed every 14 days for pH sensors and every 30 days for EC sensors. Temperature sensors (DS18B20) exhibit minimal drift and are verified quarterly against a reference thermometer.
Regarding fault detection, the gateway implements basic fault detection for three failure modes: (1) sensor out-of-range, where readings outside physically plausible bounds trigger an alert and the last valid reading is held for up to 30 minutes; (2) stuck sensor, where identical readings for more than 6 consecutive samples (30 minutes) trigger a maintenance alert; (3) communication timeout, where if no packet is received from a sensor node for more than 3 expected intervals (15 minutes), the gateway generates a connectivity alert. During fault conditions, the controller defaults to a conservative fixed setpoint (23 °C) to ensure thermal safety while awaiting operator intervention.
Regarding single-node failure recovery, the star-topology LoRa architecture means that failure of one sensor node affects only the parameters measured by that node. If the pH sensor node fails, the fuzzy controller automatically falls back to a single-input (EC-only) reduced rule-base. Loss of the temperature sensor is treated as a critical failure requiring immediate operator response.
Each sensor node transmits one packet (20 bytes payload) every 5 minutes. With LoRa parameters of SF7 and BW 125 kHz, the time-on-air per packet is approximately 50 ms. For a single-channel gateway, the maximum number of nodes supported without significant packet collision risk is estimated at approximately 50 nodes, sufficient for a facility with up to 16 independent growing zones (3 sensors per zone). Each sensor node is assigned a unique 8-bit address within the LoRa network, supporting up to 255 nodes. The fuzzy inference engine runs independently for each zone, with zone-specific rule-base parameters that can be customized for different crop types or growing conditions. The fuzzy inference computation for one zone (9 rules, 3 inputs, centroid defuzzification) requires approximately 50 ms on the ESP32 gateway. For N zones, the total inference time scales linearly at 50N ms per control cycle. With a 10-minute control interval, the computational overhead remains negligible for up to 100 zones.
For the system to deliver practical value, operators must be able to interpret system outputs and take appropriate actions. Table 10 presents the operational alert hierarchy and recommended responses.
Priority | Condition | Trigger | Recommended Action | Response Time |
Critical | Tliquid $>$ 33 °C | Safety override activated; chiller forced ON | Verify chiller operation; check for failure | Immediate |
Critical | T sensor lost | No temperature reading for $>$ 15 min | Check sensor wiring; replace if faulty | $<$1 hour |
High | pH $<$ 5.0 or $>$ 7.0 | pH outside safe range for $>$ 30 min | Manual pH adjustment; check nutrient mix | $<$2 hours |
High | EC $>$ 2.5 mS/cm | EC exceeds osmotic stress threshold $>$ 30 min | Dilute nutrient solution | $<$2 hours |
Medium | Sensor drift | Stuck sensor (6 identical readings) | Recalibrate; clean electrode; replace | $<$24 hours |
Low | Internet offline | Cloud connection lost; local control continues | Check router when convenient | Non-urgent |
Low | Calibration due | Scheduled interval exceeded | Perform two-point calibration | $<$48 hours |
The priority hierarchy follows the principle of Temperature $>$ pH $>$ EC $>$ Connectivity, reflecting the relative severity of each condition on crop survival.
Routine maintenance comprises: daily visual inspection (5 min); weekly nutrient solution top-up (30 min); biweekly pH sensor calibration (15 min); monthly EC sensor calibration (15 min); quarterly temperature sensor verification (10 min). Total estimated labor: approximately 2–3 hours per week.
Table 11 presents the bill of materials (BOM) cost estimate for the monitoring and control system, excluding the chiller unit and NFT growing infrastructure.
| Component | Qty | Unit (USD) | Total (USD) | Notes |
| ESP32 MCU (sensor node) | 3 | 5.00 | 15.00 | 1 per sensor type |
| LoRa SX1276/SX1278 module | 4 | 4.00 | 16.00 | 3 nodes + 1 gateway |
| pH sensor (electrode + ADC) | 1 | 25.00 | 25.00 | Industrial-grade electrode |
| EC/TDS sensor module | 1 | 15.00 | 15.00 | Analog conductivity probe |
| DS18B20 temperature sensor | 2 | 3.00 | 6.00 | Solution + ambient |
| Gateway (ESP32 + relay) | 1 | 35.00 | 35.00 | Includes relay for chiller |
| Power supply, enclosures, wiring | 1 | 30.00 | 30.00 | IP65 enclosures |
| PCB fabrication and assembly | 1 | 20.00 | 20.00 | Custom sensor interface |
| Calibration solutions | 1 | 10.00 | 10.00 | $\sim$6 months supply |
| Total | $\sim$172.00 | Excluding chiller and NFT |
As shown in Section 3.4, the FLC reduces chiller ON-time by approximately 15% compared to On/Off control. Assuming a 1 kW chiller operating approximately 200 days per year, the estimated annual energy saving is approximately 130 kWh/year. At approximately 0.08 USD/kWh, the annual saving is approximately 10.4 USD from energy alone. However, the primary economic value lies in: (1) crop loss prevention, where a single temperature exceedance event represents approximately 15–25 USD in lost production; (2) labor reduction from automated monitoring; and (3) yield consistency from stable conditions. The estimated payback period is approximately 6–12 months. The economic advantage increases with ambient temperature severity; in tropical climates with prolonged periods above 35°C, the percentage-based runtime reduction translates to larger absolute energy savings.
Table 12 positions the proposed system relative to existing solutions reported in recent literature.
| Feature | This Work | WiFi-Based | Zigbee-Based | Cloud-Only | PID-Based |
| Communication | LoRa | WiFi | ZigBee mesh | WiFi/4G | Wired |
| Inference location | Edge (gateway) | Cloud | Coordinator | Cloud | Local PLC |
| Offline capable | Yes | No | Partial | No | Yes |
| Context-aware | Yes (pH, EC) | No (T only) | No | No | No (T only) |
| Adaptive setpoint | Yes (fuzzy) | Fixed | Fixed | ML-based | Fixed |
| Range | $>$200 m | $<$50 m | $<$100 m | Unlimited | N/A (wired) |
| BOM cost | $\sim$172 USD | $\sim$100–200 | $\sim$200–400 | $\sim$300–500 | $\sim$500–1000 |
| Scalability | Good (star) | Limited | Good (mesh) | Excellent | Poor (wired) |
The proposed system occupies a unique position by combining three features rarely integrated: (1) context-aware multi-parameter control incorporating pH and EC, (2) edge-based inference for offline resilience, and (3) long-range, low-power wireless communication. Unlike cloud-based ML approaches, the current rule-base is fixed and cannot adapt on its own–manual re-tuning is needed. Future work could look into online learning to adjust membership functions automatically as more data come in [56].
6. Conclusions
This study presented a novel fuzzy-based adaptive temperature management system for hydroponics integrated within an IoT framework. The key innovation lies in using pH and EC measurements as contextual inputs to determine temperature management strategies, recognizing the physiological relationships between dissolved oxygen availability, chemical stress, and nutrient uptake efficiency.
The findings demonstrate three significant outcomes. Regarding physiological balance, the system correctly recognizes that plant stress is cumulative; by using pH and EC as proxies for plant stress state, it allocates cooling resources intelligently and only when biologically necessary. In terms of technological resilience, the LoRa integration ensures the system functions not only in controlled laboratory environments but also in the sprawling, radio-noisy conditions of real-world agricultural operations. Concerning tropical adaptability, the technology provides a viable pathway to food security in tropical regions, demonstrating that temperate-climate crops can be successfully cultivated in harsh climates when the root zone is precisely managed.
Several directions for future research emerge from this work. The logical next step involves machine learning integration; while fuzzy logic relies on pre-established expert rules, a machine learning layer could learn the specific thermal responses of different lettuce cultivars over time, automatically adjusting membership functions for optimized performance. Additionally, computer vision integration to detect early signs of tip burn or bolting could add a visual feedback loop to the chemical and thermal inputs, creating a comprehensive digital twin of the hydroponic system.
Retrospective simulation comparing the proposed context-aware FLC against On/Off, PI, and temperature-only FLC baselines demonstrated a 14.9–15.8% reduction in estimated chiller runtime while maintaining identical thermal safety (peak 32.4 °C, 0% time above 35 °C). The ablation study confirmed that pH/EC contextual inputs provide measurable operational benefit beyond temperature-only control. Environmental compliance analysis across 49,670 data points showed 88.7% time-in-range for solution temperature, 86.4% for pH, and 81.3% for EC, supporting the system’s practical viability for tropical commercial operations. A system engineering analysis demonstrated an estimated BOM cost of approximately 172 USD with a projected payback period of 6–12 months. In summary, the integration of fuzzy intelligence with IoT infrastructure provides a scalable, energy-aware, and agronomically grounded solution for the pressing challenge of high-temperature hydroponic cultivation in tropical climates.
The data supporting our research results are available from the corresponding author upon request.
The authors declare no conflicts of interest.
| DO | Dissolved oxygen (mg/L) |
| EC | Electrical conductivity (mS/cm) |
| FLC | Fuzzy Logic Control |
| IoT | Internet of Things |
| LoRa | Long Range wireless protocol |
| NFT | Nutrient Film Technique |
| $Q_{10}$ | Temperature coefficient |
| pH | Power of hydrogen |
| PID | Proportional-integral-derivative |
| RZT | Root-zone temperature (°C) |
| $\mu$ | Membership degree in fuzzy logic |
| $\Delta \mathrm{T}$ | Temperature differential (°C) |
