Next Article in Journal
Strategies for Wine, Orange Processing and Olive Oil By-Product Valorisation Based on GIS Spatial Analysis
Previous Article in Journal
Web-Based Explainable AI System Integrating Color-Rule and Deep Models for Smart Durian Orchard Management
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimized Evolving Fuzzy Inference System for Humidity Forecasting in Greenhouse Under Extreme Weather Conditions

by
Sebastian-Camilo Vanegas-Ayala
1,*,
Julio Barón-Velandia
1 and
Daniel-David Leal-Lara
1,2
1
Systems Engineering Program, Faculty of Engineering, Universidad Distrital Francisco José de Caldas, Bogotá 111611, Colombia
2
Systems Engineering Program, Faculty of Engineering and Basic Sciences, Fundación Universitaria Los Libertadores, Bogotá 111221, Colombia
*
Author to whom correspondence should be addressed.
AgriEngineering 2026, 8(1), 24; https://doi.org/10.3390/agriengineering8010024
Submission received: 18 November 2025 / Revised: 6 January 2026 / Accepted: 8 January 2026 / Published: 9 January 2026

Abstract

Precision agriculture has increasingly adopted controlled agricultural microclimates, particularly smart greenhouses, as a strategy to enhance crop yields while maintaining environmental conditions within suitable ranges for each crop. Among the variables that govern the water balance in these systems, air humidity plays a critical role; therefore, accurate humidity forecasting is essential for implementing timely control actions that support productivity levels. However, greenhouse conditions are frequently perturbed by extreme weather events, which lead to nonlinear and non-stationary humidity dynamics. In this context, the aim of this study was to design an optimized evolving fuzzy inference system for humidity forecasting that can adapt to changing and unforeseen situations in agricultural microclimates. A prototyping-based methodology was followed, including phases of communication, quick planning, modeling and quick design, construction of the prototype, and deployment. A hybrid genetic algorithm was used to optimize the parameters of an evolving Mamdani-type fuzzy inference system, extended to handle missing values in online data streams. Thirty independent optimization runs were performed, and the best configuration achieved a mean squared error of 1.20 × 10−2 in humidity forecasting using one minute of data for three months. The resulting model showed high interpretability, with an average number of 1.35 rules, tolerance for missing values, imputing 2% of the data, and robustness to sudden changes in the data stream with a p-value of 0.01 for the Augmented Dickey–Fuller test at alpha = 0.05. In general, the optimized evolving fuzzy inference system obtained an effectiveness rate greater than 90% and demonstrated adaptability to extreme weather conditions, suggesting its applicability to other phenomena with similar characteristics.

1. Introduction

The global growth in food demand has required the development of sustainable crop production strategies that reduce the environmental impact [1]. Cultivation in controlled agricultural microclimates, particularly in smart greenhouses, has been considered an effective response to these challenges [2]. In such greenhouses, sensor–actuator systems are integrated to automatically regulate the internal environment, thus supporting expected crop yield levels while reducing resource use [3].
At the same time, cultivation environments have been increasingly affected by extreme weather events, including unexpected storms, heat waves, emerging pests, and intense and irregular rainfall. These phenomena require cultivation systems that can adapt effectively to rapid changes without compromising crop performance. In greenhouses, the internal microclimate is strongly influenced by these external disturbances, leading to complex and time-varying dynamics [4,5].
Greenhouse modeling efforts have focused mainly on both crop growth and the agricultural microclimate. Internal environmental parameters such as temperature, humidity, and light intensity have been simulated using tools including artificial neural networks and computational fluid dynamics. When these modeling approaches are combined with intelligent environments supported by the Internet of Things, it becomes possible to anticipate unexpected climatic events and to control greenhouse subsystems in order to preserve the conditions required for adequate yields [6,7,8].
Multiple control strategies have been implemented in greenhouse environments to keep performance indicators within acceptable limits. These strategies include algorithm-based control, environmental parameter control, and structural control and are primarily based on heating, ventilation, and cooling systems. Traditional proportional–integral–derivative (PID) controllers have often been considered inadequate to cope with the increasing complexity and performance requirements of modern greenhouses. As a result, increasing interest has been observed in predictive control schemes, which allow the future dynamic behavior of the system to be predicted while optimizing multiple constraints simultaneously [9,10].
Air humidity is one of the environmental factors that most strongly influence plant growth, as it is directly involved in photosynthetic processes. Prolonged exposure to excessively high relative humidity can suppress plant performance by restricting transpiration-driven cooling and mass-flow nutrient transport and by increasing leaf-wetness duration, thereby favoring pests and diseases. In addition, stomatal closure capacity can be impaired under sustained high relative humidity, so rapid wilting can be exhibited when conditions abruptly shift toward higher evaporative demand. In contrast, very low humidity increases transpiration rates, thus requiring greater water and mineral uptake and altering nutrient availability.
The modeling of relative humidity is initially addressed using mathematical techniques based on differential equations; however, many processes associated with the greenhouse climate are difficult to describe when the system structure and the relationships among variables become overly complex [11]. Consequently, computational modeling approaches are developed to reproduce the essential properties of mechanisms and interactions within the system; these approaches are required to be sufficiently specific to capture the dynamic and real behavior of the greenhouse while remaining sufficiently compact to enable straightforward adaptation across simulation phases [12].
Several solutions have been proposed for internal relative humidity forecasting, including multiple linear regression, ARIMA, feed-forward MLP networks, CNN, GRU, and RNN-LSTM [13,14,15]. Nevertheless, limitations are observed when expert linguistic information is required to be processed and combined with numerical data while simultaneously achieving high levels of accuracy and interpretability. In this context, fuzzy inference systems are highlighted, since complex nonlinear functions can be approximated using simple models and represented through locally linear, time-invariant models, thereby supporting both accuracy and interpretability [16,17].
Various approaches have been proposed for modeling internal relative humidity, ranging from mathematical models to artificial neural networks. In this context, fuzzy inference systems have been highlighted because they typically provide high precision while preserving interpretability, facilitating their integration into intuitive and robust control systems [18,19,20].
Extreme weather events have made humidity a particularly challenging variable to forecast in greenhouses. The underlying dynamics tend to be nonlinear and non-stationary, which demands modeling strategies that can adapt to such behavior without compromising predictive accuracy. Evolving fuzzy inference systems have recently emerged as a promising solution for modeling highly complex, nonlinear, online, and non-stationary processes in domains such as climate, economics, energy, health, manufacturing, and transportation. These systems can adapt their parameters and incrementally modify their internal structures as new data arrive, without requiring long retraining phases [21,22].
In this context, an internal relative humidity forecasting system was developed for a greenhouse, designed to adapt to the changes produced by extreme weather conditions. The system is based on an optimized, evolving fuzzy inference system that provides future humidity estimates with high levels of precision and interpretability. The remainder of this article is structured as follows. Section 2 describes the materials and methods used to develop the system. Section 3 presents the main results and the comparison with related work. Section 4 discusses the findings, and Section 5 summarizes the conclusions and describes future research directions.

2. Materials and Methods

2.1. Prototyping-Based Methodology

A prototyping-based methodology was followed to implement the proposed evolving fuzzy inference system (Figure 1). The process was divided into five main stages: communication, quick plan, modeling and quick design, prototype construction of prototype and deployment [23].
In the communication stage, the objectives of the system were defined. Accuracy and interpretability requirements were collected based on values reported in the literature, targeting a predictive accuracy exceeding 90% and a high level of interpretability through the use of a Mamdani-type fuzzy inference system. Furthermore, the humidity dataset to be used for construction, training and testing was specified. The dataset corresponded to measurements obtained in an intelligent greenhouse equipped with a sensor–actuator system dedicated to the cultivation of Stringless Blue Lake beans. The greenhouse allowed automatic control of microclimate variables such as temperature, humidity and irrigation [24].
Data collected from the sensors and actuators of a greenhouse environment with cultivation of stringless blue lake beans are used from [24]. The relative humidity variable ranges from 0 to 100, with a mean of 88.92 and a standard deviation of 13.45, and with minimum and maximum values of 14.20 and 99.90, respectively; moreover, a high likelihood of deviation from normality is observed.
Only the humidity variable is considered, because, although relationships with temperature, ground humidity (soil moisture), and carbon dioxide concentration have been reported in other studies [25], the correlations observed in the dataset are low under the Pearson method. Therefore, an approach based on its previous instants is adopted [26], using a window of three prior instants, selected such that the variation in the humidity values is not expected to cause significant crop damage. This selection is supported by the average absolute variation in the humidity variable, which is 0.2314 under normal conditions and increases to 1.4036 when ventilation and irrigation are active.
For the selection of the evolving fuzzy inference system, existing structures from the state of the art that meet the necessary considerations for forecasting internal relative humidity with high accuracy and interpretability are taken into account. In this context, the pursuit of higher accuracy for the model is not allowed to substantially reduce its interpretability; the fuzzy sets defined for each variable are required to preserve a high degree of interpretability for the user; and the rules of the fuzzy inference system must reflect the actual behavior of the phenomenon and be verified against the available data.
Compliance with the first two considerations is achieved by working with evolving fuzzy inference systems that are based on Mamdani-type inference systems, which, due to their intrinsic characteristics, ensure high levels of interpretability in both inputs and outputs. To satisfy the third consideration, the management of continuous data streams, which may contain missing values, is proposed.
Similarly, the use of optimization mechanisms to determine the global tuning parameters of an evolving fuzzy system considerably increases its accuracy and reduces the workload for the designer, since, in existing proposals, all of these parameters must be explicitly defined before the evolving system is implemented.
During the quick plan, each prototype iteration was designed by defining the parameters of the optimization procedure and the system creation process. A hybrid genetic algorithm (HGA) was adopted, which combined a standard genetic algorithm with an interior-point optimization method with the parameters described in Table 1.
The algorithm was used to search for the parameter space of an evolving fuzzy inference system, denoted eT2FIS [27], which is an evolving Mamdani-type, type-2 neural fuzzy system, from which an adaptation is developed into the simplified type-1 version proposed here, denoted eMamfis. Missing-value handling is incorporated by extracting its main characteristics into a novel system, called eMamfisMissing, which is applied to internal humidity in greenhouses.
The hybrid genetic algorithm is designed to tune the parameters of the eMamfis system using the following parameter vector, which includes minimum and maximum membership scores, the forgetting factor, and the thresholds for the removal of rules and the activation of the rules. In the same order, these values are assigned to the initial population of the algorithm, as shown in Table 1.
According to the minimum and maximum membership scores, it is determined whether the fuzzy set no longer represents the underlying behavior, either by adjusting its amplitude or center, or by creating a new Gaussian-type fuzzy set, since this type is the most frequently used in the literature for the internal humidity variable. Likewise, the forgetting factor and the thresholds for rule deletion and rule activation determine the validity of a rule and whether it should be removed, or, if no rule exists that reflects the observed behavior, whether a new rule should be created, respectively.
In the rapid modeling and design stage, the overall structure of the system was specified, focusing on the aspects most relevant to the construction of the prototype. A Mamdani-type structure was adopted as the base evolving fuzzy system in order to preserve interpretability called eMamfis. However, because missing values were expected to appear frequently in the natural data stream, the Mamdani structure was extended to handle missing values, resulting in a variant denoted eMamfisMissing with the parameters indicated in Table 2.
To handle missing values, the OSSEFS algorithm is adapted to support online learning with missing data [28]. For its operation, the data stream is divided into chunks of equal length; a chunk size is selected that captures the range of behavior of the variable over a given time period. For internal humidity in greenhouses, 1440 records are used, corresponding to minutes in one day. In addition, a template segment is defined that serves as the base learner for the algorithm and does not contain missing values; in this context, the replacement of the template is determined by the maximum number of allowed consecutive missing values in the eMamfisMissing system.
In the prototype construction stage, the evolving fuzzy system for humidity forecasting was implemented. Thirty prototypes were generated through independent executions of the hybrid genetic algorithm. For each run, the mean squared error and the root mean squared error were computed. The objective function of the genetic algorithm is defined to minimize the error between the actual value and the calculated value of the internal relative humidity, assembled using only the first segment of the template.
Based on this, the eMamfisMissing system is executed for the remaining segments, for which a 70/30 split of the data is performed. The system was evaluated using a 70–30% split of the available data for training and validation, respectively. Performance indicators included the average accuracy and an interpretability score in the range 1–3, defined according to the number of fuzzy structures that described variables with common linguistic terms and clearly defined semantics: average number of rules and fuzzy sets for the input and output variables of the system.
In the implementation, deployment, and feedback stage, the configuration that exhibited the best joint performance in terms of precision and interpretability was selected and deployed in a computational environment. If necessary, the system requirements could be refined, and a new iteration of the prototyping cycle could be executed to adjust or improve the evolving fuzzy prototype.

2.2. HGA eMamfisMissing System

The functioning of the optimized evolving fuzzy inference model eMamfisMissing comprises three components that ensure proper operation: the Mamdani-type evolving fuzzy inference system with missing-value handling, its linkage to the ensemble structure, and the optimization mechanism.
Starting from its internal elements, the Mamdani-type evolving fuzzy inference system first checks for the existence of an initial Mamdani base model. If such a model is not available, initialization is performed using the first input record and the first output record. A Gaussian membership function with an amplitude of 0.1345 is adopted, corresponding to the standardized deviation measure of the normalized relative humidity, and the center of each fuzzy set is assigned to the value of the corresponding variable in that record (for both input and output variables). Then a rule is established that links these fuzzy sets, with a certainty factor equal to one.
For each subsequent record, the system imputes the input values. If the number of missing values is lower than the maximum number of consecutive allowed missing values, the four most representative rules are selected, and, following a system-adjusted version of the strategy based on the most active rules, the missing values are assigned while taking the existing confidence values into account. If the number of missing values exceeds the maximum number of allowed consecutive missing values, the missing values are assigned the values from a previous pattern, according to their relative position within the corresponding data chunk.
The imputation process is described in the following pseudocode:
quantityRules ← LEN(fis.Rules)
module ← MOD(LEN(fis.Rules),4)
denominator ← SUM(certaintyFactors from 1 to quantityRules)
FOR each input index j from 1 to LEN(fis.Inputs) DO
   IF inputData(i, j) is NaN THEN
    numerator ← 0
    FOR k from 1 to module DO
         indexRule ← fis.Rules(k).Antecedent(j)
         centroidMFRule ← fis.Inputs(j).MembershipFunctions(indexRule).centroid
         numerator ← numerator + (centroidMFRule * certaintyFactors(k))
    END FOR
    inputData(i, j) ← numerator/denominator
   END IF
END FOR
For outputs with missing values, the imputation is performed by assigning the value obtained from the evaluation of the fuzzy system with the available inputs, since a different estimation procedure could corrupt the system. Inputs, outputs, and rules of the system are evaluated only when the maximum number of allowed consecutive missing values has not been exceeded, in order to avoid overfitting the system to imputed, non-real values.
The matching and membership scores for the input and output values with respect to the existing fuzzy sets for each variable are then evaluated. If the membership score does not exceed the allowed limits, three options are considered. In the first option, the amplitude of the fuzzy set with the highest coincidence is adjusted to better cover the incoming value. For this purpose, a learning rate is used, calculated as a mapping of the coincidence value between the data and the fuzzy set in the range 0.01–0.1, representing, respectively, controlled and more flexible changes, together with the current amplitude value.
In the second option, an adjustment of the center of the fuzzy set is performed with the highest coincidence with the incoming value. In the third option, a new fuzzy set with a Gaussian membership function centered on the data and with an amplitude of 0.1345 is created. In this case, the labels of each fuzzy set of the variable are updated to preserve the order of interpretability within the linguistic terms of the system (“Minimum”, “Very Low”, “Low”, “Medium”, “High”, “Very High”, “Maximum”).
For the rule base, an activation value is obtained for each rule. The strength of activation is examined using the input data (forward operation) and the expected or actual output data (backward operation). In this process, the combined activation is computed as the minimum between the forward and backward activations. The age component of each rule is then calculated as the product of its certainty factor and the forgetting factor. The certainty factor is updated as the maximum between the age component and the combined activation value, and the final rule activation is obtained as the product of the updated certainty factor and the combined activation.
According to the values obtained, if the maximum activation value among all rules is lower than the activation threshold, or if new membership functions have been created, a new rule is generated. This new rule links all input values with the corresponding output values and is assigned a certainty factor of one. Conversely, if the minimum activation value of any rule is lower than the deletion threshold, all rules with an activation value below that threshold are removed. It is then verified that no antecedent or consequent membership functions remain without any associated rules, and if such functions exist, they are deleted.
Finally, the data pattern for the next execution of the model is defined taking into account the maximum number of consecutive missing values allowed. If this value has not been exceeded, the data pattern corresponds to the input data with imputed values; otherwise, the pattern is kept from the previous iteration.
For the ensemble component of the evolving fuzzy inference model, the daily dataset is divided and, based on the chunk size, blocks of records are sent to the Mamdani-type evolving fuzzy inference system, thereby ensuring a workflow with uniform chunk lengths.
For the optimization component of the evolving fuzzy inference model, a hybrid algorithm is created by combining a genetic algorithm as a heuristic method and the interior-point algorithm as an exact method. A constraint is imposed such that the maximum membership score is always greater than the minimum membership score, and the objective function is defined to minimize the error between the actual value and the calculated relative humidity value, assembled using only a single template fragment that should not contain missing data.

3. Results

The external climate of the greenhouse environment exhibits a rainfall pattern that is influenced by trade winds and the Intertropical Convergence Zone (ITCZ). A dry season (June–September) is observed, with an average annual precipitation of 800 mm and an irregular distribution throughout the year. In the data set, 99957 records are present, with 2038 missing values for internal relative humidity, resulting in a total of 97,919 min with available information.
A non-stationarity analysis is performed on internal relative humidity, considering that a time series is stationary when its value does not depend on time, that is, when neither seasonality nor trend is exhibited, since their presence implies that the value is time dependent. The Augmented Dickey–Fuller test is applied, whose null hypothesis indicates the presence of a unit root and, therefore, non-stationarity. Using alpha = 0.05, a p-value of 0.01 is obtained; consequently, the null hypothesis that the time series is non-stationary cannot be rejected.
The evolving Mamdani-type fuzzy inference system comprised three input variables and one output variable, all normalized to the [0, 1] range. These variables were defined using normalized measurements of the internal relative humidity. The input labels were specified through three one-minute time shifts in current humidity, denoted hum-1, hum-2 and hum-3. This choice was made because the average absolute variation in the humidity variable in normal operation was moderate, while larger variations were observed when the ventilation and irrigation systems were active; therefore, these temporal displacements could capture a significant portion of the variability of the system.
For each of the thirty optimization runs, the mean squared error and the root mean squared error were calculated on the data chunks generated by the missing-value handling mechanism. The algorithm produced 78 chunks for training and 34 chunks for validation. For each configuration, the average root mean squared error, the number of rules, and the number of fuzzy sets for the input and output variables were also calculated, as described in Table 3. The configurations are ranked using a weighted average of the mean squared error (MSE) across the training and validation stages. For this purpose, the MSE is averaged within each chunk and then averaged across chunks for each stage. Finally, the mean MSE across all chunks is computed and reported in the last column, where both stages are considered.
Among all configurations, the twenty-eighth execution exhibited the smallest weighted average mean squared error, with a value of 1.20 × 10−2. This value corresponded to an effectiveness rate of 98.8%. The selected configuration was characterized by a minimum membership score of 0.4853, a maximum membership score of 0.4878, a forgetting factor of 0.8750, a rule deletion threshold of 0.5837 and a rule activation threshold of 0.2566. The rule certainty factors ranged between 0.7120 and 1.0000.
The forecast results for internal relative humidity (Figure 2) showed close agreement between the measured and predicted values, including time intervals where measurements were missing and values were inferred by the eMamfisMissing structure.
The fuzzy sets associated with each input variable were defined using Gaussian membership functions and distributed over the normalized domain in a way that captured low, very low, and medium humidity conditions described in Figure 3.
The output of the fuzzy inference system, described in Figure 4, representing the internal relative humidity, was described by three fuzzy sets labeled Very_Low, Low, and Medium.
The rule base obtained in the final configuration consisted of six Mamdani-type rules that combined the three input variables. The set of Mamdani-type rules governing the system in its final execution was:
  • If hum-1 is Low and hum-2 is Low and hum-3 is Low, then humidity is Low.
  • If hum-1 is Low and hum-2 is Low and hum-3 is Low, then humidity is Very_Low.
  • If hum-1 is Very_Low and hum-2 is Low and hum-3 is Low, then humidity is Very_Low.
  • If hum-1 is Very_Low and hum-2 is Very_Low and hum-3 is Low, then humidity is Very_Low.
  • If hum-1 is Medium and hum-2 is Medium and hum-3 is Medium, then humidity is Low.
  • If hum-1 is Very_Low and hum-2 is Medium and hum-3 is Medium, then humidity is Medium
The rule certainty factors are 0.7120, 0.7619, 0.8653, 0.7860, 0.8750 y 1.0000.
Figure 5 shows the error computed between the observed and forecast values, where the error is shown to fluctuate between −0.6 and 0.4. In addition, an MSE of 1.20 × 10−2 is obtained. Based on this value and using the effectiveness rate defined as:
E f f e c t i v e n e s s   =   100   ( 1     R M S E )
Equation (1) yields an effectiveness rate of 98.8%. Moreover, an advantage of the proposed model is that missing values in the data stream can be estimated; these correspond to the gaps in the error plot, where the original value is not available for comparison. Nevertheless, the error distribution is not altered, as the underlying behavior is preserved through the pattern segment and the rule-activation-based imputation method.
To assess the performance of the proposed system relative to other models in the literature, a comparison was carried out using the mean squared error values reported for fuzzy-logic-based humidity prediction models. The optimized evolving fuzzy system achieved a mean squared error of 1.20 × 10−2, which is competitive compared to the values reported for alternative fuzzy inference approaches, as summarized in Table 4.

4. Discussion

The results obtained in this study indicate that the proposed optimized evolving fuzzy inference system can provide accurate and interpretable humidity forecasts in greenhouse environments subject to extreme weather conditions. When the system is implemented for different users or application scenarios, the desired level of interpretability must be carefully evaluated. Although the configuration with the highest predictive accuracy was selected here, other iterations of the optimization process yielded higher interpretability scores with only slightly lower accuracy. Therefore, the final choice of configuration should align with user needs and expectations in terms of transparency and ease of understanding.
The developed model achieves an average MSE of 1.20 × 10−2. When compared with other evolving approaches, such as a hybrid mechanistic method that calibrates dynamic parameters across growing seasons using deep neural networks, for which an MSE of 4.81 × 10−3 is reported [31], it is observed that, although the latter is 59.9% more accurate, neither interpretability nor missing-value handling is provided. Likewise, in a comparative study of a transformer-based model (Autoformer), variants of two RNN models (LSTM and SegRNN), and a simple linear model (DLinear), a best MSE of 4.10 × 10−5 is reported [32]. However, that result is obtained over a three-hour time horizon, which differs substantially from the forecasting setting considered in the present work based on a three-month data stream. In addition, data preprocessing is applied to handle missing values and outliers, which may limit suitability for online learning.
Comparison with related fuzzy-logic-based models reported in the literature showed that the proposed system is competitive in terms of mean squared error, while offering additional advantages that are not simultaneously present in alternative approaches. These advantages include robustness to missing values, the ability to adapt the rule base when new patterns or behaviors emerge in the data, and the ability to operate on continuous data streams without sacrificing accuracy or computational efficiency. Such properties are particularly relevant in smart greenhouse environments, where sensor failures, communication delays, and abrupt changes in external conditions are common.
Although the developed model achieves an average MSE of 1.20 × 10−2, which is higher than other models, competitive performance is maintained within a range that enables subsequent control of the variables. In addition, the proposed approach is able to adapt to abrupt changes in the environment caused by external perturbations, which are often associated with extreme weather conditions. Furthermore, the best forecasting models identified in the literature using fuzzy inference systems are either combined with control techniques, as in [29], or do not include the full set of variables typically required in a conventional greenhouse environment, instead focusing on highly specific settings, as in [30]. Consequently, the proposed model is distinguished by considering the full complexity of the environment while at the same time allowing the integration of multiple input variables in future implementations, as in [25].
Because the inputs and outputs are normalized to [0, 1], the reported MSE values are expressed in normalized units; therefore, cross-study comparisons should be interpreted with caution unless the same scaling procedure and evaluation protocol are applied. Although the proposed model does not yield the lowest MSE reported in the literature, a distinct operating point is provided by integrating online adaptation, interpretability, and robustness to missing values within a single framework. In future work, benchmarking against appropriate baselines will be conducted under identical dataset splits, metrics, and input-variable configurations to enable an equivalent performance evaluation.
It is important to note that the evolution of the system results in an average variation of 1.35 rules per data chunk. It is observed that the system can be integrated with mechanisms for evaluating rule redundancy, eliminating rules that share the same antecedents and have lower certainty-factor values; likewise, cases in which it is only necessary to exclude a given antecedent during rule creation can be examined.
Furthermore, the use of a hybrid genetic algorithm to tune the parameters of the evolving fuzzy system allowed a wide region of the solution space to be explored and provided a systematic mechanism for balancing predictive performance and interpretability. The prototyping-based methodology facilitated the iterative refinement of the model and made it possible to incorporate new requirements or constraints as they emerged during system development.
For online learning, the developed model is able to receive online data ranging from one minute to one day of measurements for parameter adjustment. During operation, the model is computationally efficient in runtime, as the forecast humidity value and the parameter updates are obtained almost immediately. However, the estimation of its hyperparameters using the hybrid genetic algorithm depends on the processing resources of the computing equipment on which it is executed, and robust hardware is required; in the present case, approximately half a day of execution was required for each of the 30 configurations.

5. Conclusions

An evolving fuzzy inference system optimized for internal humidity forecasting in agricultural microclimates was developed and evaluated. The system was able to generate accurate forecasts while maintaining a high degree of interpretability. The best configuration achieved an effectiveness rate of 98.8% with a mean squared error of 1.20 × 10−2. The model incorporated mechanisms to handle missing values and demonstrated robustness against abrupt changes generated by extreme weather conditions.
These characteristics suggest that the proposed evolving fuzzy inference system can be considered a suitable tool for decision support and automatic control in smart greenhouse environments. Future work may include the integration of additional environmental variables, such as temperature and solar radiation, the extension of the model to multi-step-ahead forecasting horizons, and the evaluation of the system in different crops and greenhouse configurations.

Author Contributions

Conceptualization, S.-C.V.-A.; Methodology, S.-C.V.-A. and D.-D.L.-L.; Software, S.-C.V.-A.; Validation, S.-C.V.-A. and D.-D.L.-L.; Formal analysis, S.-C.V.-A.; Investigation, S.-C.V.-A.; Resources, S.-C.V.-A. and D.-D.L.-L.; Data curation, J.B.-V. and D.-D.L.-L.; writing—original draft preparation, S.-C.V.-A.; writing—review and editing, J.B.-V.; Visualization, J.B.-V. and D.-D.L.-L.; Supervision, J.B.-V.; Funding acquisition, J.B.-V. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original data presented in the study are openly available in the Zenodo repository at https://doi.org/10.5281/zenodo.12175649, accessed on 8 January 2025.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
EFSEvolving fuzzy system
FISFuzzy inference system
MSEMean squared error
RMSERoot mean squared error

References

  1. Niksaz, S.; Dalipi, F.; Mirijamdotter, A. A Systematic Literature Review on Socio-Ecological Value Scorecards for Advancing Sustainable Smart Agriculture. Discov. Sustain. 2025, 6, 838. [Google Scholar] [CrossRef]
  2. Benfenati, D.; Amalfitano, D.; Russo, C.; Tommasino, C.; Rinaldi, A.M. Data Centric Artificial Intelligence for Agrifood Domain: A Systematic Mapping Study. Comput. Electron. Agric. 2025, 239, 110847. [Google Scholar] [CrossRef]
  3. Soussi, A.; Zero, E.; Ouammi, A.; Zejli, D.; Zahmoun, S.; Sacile, R. Smart Greenhouse Farming: A Review towards near Zero Energy Consumption. Discov. Cities 2025, 2, 55. [Google Scholar] [CrossRef]
  4. Chimi, P.M.; Fobane, J.L.; Matick, J.H.; Mala, W.A. A Two-Decade Bibliometric Review of Climate Resilience in Agriculture Using the Dimensions Platform. Discov. Appl. Sci. 2025, 7, 273. [Google Scholar] [CrossRef]
  5. Okolie, C.C.; Danso-Abbeam, G.; Groupson-Paul, O.; Ogundeji, A.A. Climate-Smart Agriculture Amidst Climate Change to Enhance Agricultural Production: A Bibliometric Analysis. Land 2023, 12, 50. [Google Scholar] [CrossRef]
  6. Chalill, S.M.; Chowdhury, S.; Karthikeyan, R. Prediction of Key Crop Growth Parameters in a Commercial Greenhouse Using CFD Simulation and Experimental Verification in a Pilot Study. Agriculture 2021, 11, 658. [Google Scholar] [CrossRef]
  7. Yang, Y.; Gao, P.; Sun, Z.; Wang, H.; Lu, M.; Liu, Y.; Hu, J. Multistep Ahead Prediction of Temperature and Humidity in Solar Greenhouse Based on FAM-LSTM Model. Comput. Electron. Agric. 2023, 213, 108261. [Google Scholar] [CrossRef]
  8. Abou-Mehdi-Hassani, F.; Zaguia, A.; Ait Bouh, H.; Mkhida, A. Systematic Literature Review of Smart Greenhouse Monitoring. SN Comput. Sci. 2025, 6, 95. [Google Scholar] [CrossRef]
  9. Chen, S.; Liu, A.; Tang, F.; Hou, P.; Lu, Y.; Yuan, P. A Review of Environmental Control Strategies and Models for Modern Agricultural Greenhouses. Sensors 2025, 25, 1388. [Google Scholar] [CrossRef]
  10. Mahmood, F.; Govindan, R.; Bermak, A.; Yang, D.; Al-Ansari, T. Data-Driven Robust Model Predictive Control for Greenhouse Temperature Control and Energy Utilisation Assessment. Appl. Energy 2023, 343, 121190. [Google Scholar] [CrossRef]
  11. Salgado, P.A.; Perdicoúlis, T.-P.A. A Fuzzy Derivative Model Approach to Time-Series Prediction. IFAC-PapersOnLine 2022, 55, 498–503. [Google Scholar] [CrossRef]
  12. Faouzi, D.; Bibi-Triki, N.; Mohamed, B.; Abène, A. Optimization, Modeling and Simulation of Microclimate and Energy Management of the Greenhouse by Modeling the Associated Heating and Cooling Systems and Implemented by a Fuzzy Logic Controller Using Artificial Intelligence. Informatica 2017, 41, 317–331. [Google Scholar]
  13. Hamidane, H.; El Faiz, S.; Rkik, I.; El Khayat, M.; Guerbaoui, M.; Ed-Dhhak, A.; Lachhab, A. Application Analysis of ANFIS Strategy for Greenhouse Climate Parameters Prediction: Internal Temperature and Internal Relative Humidity Case of Study. E3S Web Conf. 2021, 297, 01041. [Google Scholar] [CrossRef]
  14. Ramdani, M.; Hamza, A.; Boughamsa, M. Multiscale Fuzzy Model-Based Short Term Predictive Control of Greenhouse Microclimate. In Proceedings of the 2015 IEEE International Conference on Industrial Informatics, INDIN 2015, Cambridge, UK, 22–24 July 2015; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2015; pp. 1348–1353. [Google Scholar]
  15. Kumar, L.; Prakash, O. Development of FE Modeling for Hybrid Greenhouse Dryer for Potato Chips Drying. J. Food Sci. 2023, 88, 1800–1815. [Google Scholar] [CrossRef]
  16. Gong, X.; Qiu, R.; Zhang, B.; Wang, S.; Ge, J.; Gao, S.; Yang, Z. Energy Budget for Tomato Plants Grown in a Greenhouse in Northern China. Agric. Water Manag. 2021, 255, 107039. [Google Scholar] [CrossRef]
  17. Hadidi, A.; Saba, D.; Sahli, Y. The Role of Artificial Neuron Networks in Intelligent Agriculture (Case Study: Greenhouse) BT—Artificial Intelligence for Sustainable Development: Theory, Practice and Future Applications; Hassanien, A.E., Bhatnagar, R., Darwish, A., Eds.; Springer International Publishing: Cham, Switzerland, 2021; pp. 45–67. ISBN 978-3-030-51920-9. [Google Scholar]
  18. Abidin, I.; Faridah, S.N.; Sapsal, M.T.; Samsuar, S.; Mubarak, H. Automation of Humidity in the Greenhouses for Plant Cultivation. BIO Web Conf. 2024, 96, 4004. [Google Scholar] [CrossRef]
  19. de Sá Ferreira, F.; Silva, J.F.; Netto, A.J.; Pessoa, E.G. Avanços na Automação Residencial Inteligente por Meio de Sistemas de Lógica Difusa. Rev. Sist. 2024, 14, 1209–1213. [Google Scholar] [CrossRef]
  20. Vanegas-Ayala, S.-C.; Barón, J.; Barón-Velandia, B.; Leal-Lara, D.-D. A Systematic Review of Greenhouse Humidity Prediction and Control Models Using Fuzzy Inference Systems. Adv. Hum.-Comput. Interact. 2022, 2022, 8483003. [Google Scholar] [CrossRef]
  21. Chen, X.; Liang, H.; Wu, G.; Feng, C.; Tao, T.; Ji, Y.; Ma, Q.; Tong, Y. Coupled Heat and Humidity Control System of Narrow-Trough Solar Collector and Solid Desiccant in Chinese Solar Greenhouse: Analysis of Optical/Thermal Characteristics and Experimental Study. Energy 2023, 273, 127198. [Google Scholar] [CrossRef]
  22. Vanegas-Ayala, S.-C.; Barón-Velandia, J.; Romero-Riaño, E. Systematic Review of Forecasting Models Using Evolving Fuzzy Systems. Computation 2024, 12, 159. [Google Scholar] [CrossRef]
  23. Pressman, R.S. Software Engineering: A Practitioner’s Approach; Novena; McGraw-Hill Education: Columbus, OH, USA, 2019; ISBN 978-0078022128. [Google Scholar]
  24. Vanegas-Ayala, S.-C.; Barón-Velandia, J.; Garcia-Chavez, O.-M.; Romero-Palencia, A.; Leal-Lara, D.-D. Experimental Data in a Greenhouse with and without Cultivation of Stringless Blue Lake Beans. Data 2024, 9, 105. [Google Scholar] [CrossRef]
  25. Vanegas-Ayala, S.-C.; Barón-Velandia, J.; Leal-Lara, D.-D. Predictive Model of Humidity in Greenhouses through Fuzzy Inference Systems Applying Optimization Methods. Adv. Fuzzy Syst. 2023, 2023, 4764919. [Google Scholar] [CrossRef]
  26. Velandia, J.B.; Quintana, J.S.C.; Ayala, S.C.V. Environment Humidity and Temperature Prediction in Agriculture Using Mamdani Inference Systems. Int. J. Electr. Comput. Eng. (IJECE) 2021, 11, 3502–3509. [Google Scholar] [CrossRef]
  27. Tung, S.W.; Quek, C.; Guan, C. ET2FIS: An Evolving Type-2 Neural Fuzzy Inference System. Inf. Sci. 2013, 220, 124–148. [Google Scholar] [CrossRef]
  28. Yan, L.; Zhao, T.; Xie, X.; Precup, R.-E. OSSEFS: An Online Semi-Supervised Ensemble Fuzzy System for Data Streams Learning with Missing Values. Expert. Syst. Appl. 2024, 255, 124695. [Google Scholar] [CrossRef]
  29. Hamza, A.; Ramdani, M. Non-PDC Interval Type-2 Fuzzy Model Predictive Microclimate Control of a Greenhouse. J. Control Autom. Electr. Syst. 2020, 31, 62–72. [Google Scholar] [CrossRef]
  30. Prakash, O.; Kumar, A.; Kaviti, A.K.; Kumar, P.V. Prediction of the Rate of Moisture Evaporation from Jaggery in Greenhouse Drying Using the Fuzzy Logic. Heat Transf. Res. 2015, 46, 923–935. [Google Scholar] [CrossRef]
  31. Liu, K.; Ji, T.; Li, M.; Yang, X.; Sun, J.; Liu, H.; Liu, R. Prediction of Greenhouse Temperature and Humidity across Growing Seasons: Hybridization of Process-Based Model and Deep Neural Networks. Inf. Process. Agric. 2025, in press. [Google Scholar] [CrossRef]
  32. Ahn, J.Y.; Kim, Y.; Park, H.; Park, S.H.; Suh, H.K. Evaluating Time-Series Prediction of Temperature, Relative Humidity, and CO2 in the Greenhouse with Transformer-Based and RNN-Based Models. Agronomy 2024, 14, 417. [Google Scholar] [CrossRef]
Figure 1. Methodology based on prototyping. Adapted from [23].
Figure 1. Methodology based on prototyping. Adapted from [23].
Agriengineering 08 00024 g001
Figure 2. Actual and predicted internal relative humidity values, including estimated values for intervals with missing observations.
Figure 2. Actual and predicted internal relative humidity values, including estimated values for intervals with missing observations.
Agriengineering 08 00024 g002
Figure 3. Input fuzzy sets: (a) one-minute time shift; (b) two-minute time shift; (c) three-minute time shift.
Figure 3. Input fuzzy sets: (a) one-minute time shift; (b) two-minute time shift; (c) three-minute time shift.
Agriengineering 08 00024 g003
Figure 4. Fuzzy output sets for internal relative humidity.
Figure 4. Fuzzy output sets for internal relative humidity.
Agriengineering 08 00024 g004
Figure 5. Actual and predicted internal relative humidity error values.
Figure 5. Actual and predicted internal relative humidity error values.
Agriengineering 08 00024 g005
Table 1. Parameters of the hybrid genetic algorithm.
Table 1. Parameters of the hybrid genetic algorithm.
ParameterValue
Population size50
Maximum number of iterations before the genetic algorithm stops500
The number of individuals in the current generation is guaranteed to survive to the next generation2
The fraction of the population in the next generation (excluding guaranteed survivors) created by the crossover function0.8
Initial population[0.7000, 1.0000, 0.9876, 0.5516, 0.2000]
Allowed average relative change in the best fitness value across the defined generations0.001
Maximum number of generations during which the average relative change in the best fitness value is allowed to be less than or equal to the tolerance value20
Maximum number of function evaluations in the interior-point algorithm3000
Maximum number of iterations before the interior-point algorithm stops30
Table 2. Parameters of the eMamfisMissing system.
Table 2. Parameters of the eMamfisMissing system.
ParameterTitle 2
Fuzzy AND operator methodMinimum of fuzzy input values
Fuzzy OR operator methodMaximum of fuzzy input values
Defuzzification method for computing crisp output valuesCentroid of the area under the output fuzzy set
Implication method for computing the consequent fuzzy setTruncation of the consequent membership function at the antecedent result value
Aggregation method for combining rule consequentsMaximum of subsequent fuzzy sets
Type of membership functions for inputs and outputsgaussmf
Maximum number of consecutive missing values allowed8
Table 3. Evaluation of EFS prototypes.
Table 3. Evaluation of EFS prototypes.
E78 Chunks34 Chunks M S E ¯
R M S E ¯ R u l e s ¯ m f h u m 1 ¯ m f h u m 2 ¯ m f h u m 3 ¯ m f h u m e d a d ¯ R M S E ¯ R e g l a s ¯ m f h u m 1 ¯ m f h u m 2 ¯ m f h u m 3 ¯ m f h u m e d a d ¯
17.84 × 10−21.31.21.21.21.26.27 × 10−22.31.51.51.41.31.95 × 10−2
23.07 × 10−11.01.01.01.01.01.14 × 10−11.01.01.01.01.01.45 × 10−1
32.97 × 10−11.01.01.01.01.01.10 × 10−11.01.01.01.01.01.35 × 10−1
46.69 × 10−21.21.11.11.11.26.58 × 10−22.01.31.41.31.31.69 × 10−2
58.57 × 10−21.31.11.11.21.15.30 × 10−22.81.31.62.11.21.85 × 10−2
63.07 × 10−11.01.01.01.01.01.18 × 10−11.01.01.01.01.01.49 × 10−1
78.57 × 10−21.21.11.11.11.15.79 × 10−22.21.41.41.41.32.12 × 10−2
86.78 × 10−21.21.11.11.11.15.99 × 10−21.81.31.21.31.31.54 × 10−2
97.41 × 10−21.41.21.21.21.26.16 × 10−22.21.41.51.41.31.83 × 10−2
102.48 × 10−11.11.11.11.01.01.08 × 10−11.01.01.01.01.01.08 × 10−1
118.21 × 10−21.71.21.21.11.58.71 × 10−21.61.01.01.61.13.20 × 10−2
127.03 × 10−21.31.11.21.21.26.00 × 10−21.81.31.31.31.31.59 × 10−2
131.86 × 10−11.01.01.01.01.07.45 × 10−21.11.01.01.01.16.09 × 10−2
142.03 × 10−11.01.01.01.01.09.86 × 10−21.01.01.01.01.07.71 × 10−2
152.95 × 10−11.11.11.01.11.01.11 × 10−11.41.11.11.11.01.35 × 10−1
166.53 × 10−21.31.11.11.11.25.35 × 10−21.91.41.41.41.31.30 × 10−2
171.53 × 10−11.11.01.01.01.06.91 × 10−21.61.11.11.31.14.50 × 10−2
186.69 × 10−21.21.11.11.11.26.58 × 10−22.01.31.41.31.31.69 × 10−2
196.78 × 10−21.21.11.11.11.15.99 × 10−21.81.31.21.31.31.54 × 10−2
208.86 × 10−21.11.01.11.11.14.62 × 10−21.61.21.31.21.31.79 × 10−2
216.92 × 10−21.31.21.21.21.25.88 × 10−22.31.41.51.41.31.58 × 10−2
222.01 × 10−11.01.01.01.01.06.48 × 10−21.41.01.11.11.26.23 × 10−2
236.54 × 10−21.31.11.11.21.25.79 × 10−22.51.41.42.01.31.46 × 10−2
242.96 × 10−11.01.01.01.01.01.10 × 10−11.01.01.01.01.01.35 × 10−1
251.75 × 10−11.01.01.01.01.01.03 × 10−11.11.11.01.01.16.99 × 10−2
267.01 × 10−21.31.21.21.21.25.60 × 10−22.21.41.51.41.31.47 × 10−2
271.00 × 10−11.11.11.11.11.18.39 × 10−21.41.11.11.11.23.28 × 10−2
286.56 × 10−21.21.11.11.11.25.06 × 10−21.71.31.31.31.31.20 × 10−2
293.07 × 10−11.01.01.01.01.01.14 × 10−11.01.01.01.01.01.44 × 10−1
308.86 × 10−21.11.01.11.11.14.62 × 10−21.61.21.31.21.31.79 × 10−2
Table 4. Comparison with other fuzzy inference systems.
Table 4. Comparison with other fuzzy inference systems.
Study/ModelMSE
HGA-eMamfisMissing (this work)1.204 × 10−2
[25]8.200 × 10−3
[13]4.014 × 10−3
[29]1.200 × 10−4
[30]1.254 × 10−4
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Vanegas-Ayala, S.-C.; Barón-Velandia, J.; Leal-Lara, D.-D. Optimized Evolving Fuzzy Inference System for Humidity Forecasting in Greenhouse Under Extreme Weather Conditions. AgriEngineering 2026, 8, 24. https://doi.org/10.3390/agriengineering8010024

AMA Style

Vanegas-Ayala S-C, Barón-Velandia J, Leal-Lara D-D. Optimized Evolving Fuzzy Inference System for Humidity Forecasting in Greenhouse Under Extreme Weather Conditions. AgriEngineering. 2026; 8(1):24. https://doi.org/10.3390/agriengineering8010024

Chicago/Turabian Style

Vanegas-Ayala, Sebastian-Camilo, Julio Barón-Velandia, and Daniel-David Leal-Lara. 2026. "Optimized Evolving Fuzzy Inference System for Humidity Forecasting in Greenhouse Under Extreme Weather Conditions" AgriEngineering 8, no. 1: 24. https://doi.org/10.3390/agriengineering8010024

APA Style

Vanegas-Ayala, S.-C., Barón-Velandia, J., & Leal-Lara, D.-D. (2026). Optimized Evolving Fuzzy Inference System for Humidity Forecasting in Greenhouse Under Extreme Weather Conditions. AgriEngineering, 8(1), 24. https://doi.org/10.3390/agriengineering8010024

Article Metrics

Back to TopTop