Next Article in Journal
A Bioclimatic Design Approach to the Energy Efficiency of Farm Wineries: Formulation and Application in a Study Area
Previous Article in Journal
Fluorescence Spectroscopy and a Convolutional Neural Network for High-Accuracy Japanese Green Tea Origin Identification
Previous Article in Special Issue
Ghost-Attention-YOLOv8: Enhancing Rice Leaf Disease Detection with Lightweight Feature Extraction and Advanced Attention Mechanisms
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Greenhouse Environment Sentinel with Hybrid LSTM-SVM for Proactive Climate Management

by
Yi-Chih Tung
1,
Nasyah Wulandari Syahputri
1,* and
I. Gusti Nyoman Anton Surya Diputra
2
1
Department of Electronic Engineering, Ming Chi University of Technology, New Taipei 243303, Taiwan
2
Department of Biomedical Engineering and Medical Devices, Ming Chi University of Technology, New Taipei 243303, Taiwan
*
Author to whom correspondence should be addressed.
AgriEngineering 2025, 7(4), 96; https://doi.org/10.3390/agriengineering7040096
Submission received: 5 February 2025 / Revised: 25 March 2025 / Accepted: 25 March 2025 / Published: 1 April 2025
(This article belongs to the Special Issue Application of Artificial Neural Network in Agriculture)

Abstract

:
This research presents a hybrid approach of Long Short-Term Memory (LSTM) and Support Vector Machine (SVM) model for greenhouse environmental monitoring, integrating machine learning and Internet of Things (IoT)-based sensing to enhance climate prediction and classification. Unlike traditional single-method approaches, this dual-model system provides a comprehensive framework for real-time climate control, optimizing temperature and humidity forecasting while enabling accurate weather classification. The LSTM model excels in capturing sequential patterns, achieving superior temperature prediction performance with a Root-Mean-Square Error (RMSE) of 0.0766, Mean Absolute Error (MAE) of 0.0454, and coefficient of determination (R2) of 0.8825. For humidity forecasting, our comparative analysis revealed that the Simple Recurrent Neural Network (RNN) demonstrates the best accuracy (RMSE: 5.3034, MAE: 3.8041, R2: 0.8187), an unexpected finding that highlights the importance of parameter-specific model selection. Simultaneously, the SVM model classifies environmental states with an accuracy of 0.63, surpassing traditional classifiers such as Logistic Regression and K Nearest Neighbors (KNN). To enhance real-time data collection and transmission, the ESP NOW wireless protocol is integrated, ensuring low latency and reliable communication between greenhouse sensors. The proposed hybrid LSTM-SVM system, combined with IoT technology, represents a significant advancement in proactive greenhouse management, offering a scalable and sustainable solution for optimizing plant growth, resource allocation, and climate adaptation.

1. Introduction

Greenhouse farming enables year-round cultivation by protecting crops from extreme weather and pests [1]. However, maintaining optimal conditions for plant growth requires precise and real-time monitoring of key environmental parameters, such as temperature, humidity, and light intensity [2]. Conventional monitoring methods are often inefficient, susceptible to human error, and time-intensive, making them less adaptable to modern agricultural needs [3]. The adoption of smart greenhouse technologies, driven by advancements in the Internet of Things (IoT) and Artificial Intelligence (AI), offers a more efficient alternative through automating monitoring and control processes [4,5]. These systems utilize high-precision sensors to capture real-time environmental data, which are analyzed to enable accurate decision making and predictive adjustments, ensuring consistent optimal conditions for plant growth [6]. By optimizing resource allocation, minimizing operational expenses, and maximizing crop productivity, these technological innovations significantly improve agricultural efficiency [7,8,9]. Moreover, their ability to reduce resource waste and promote precision farming aligns with the principles of sustainable agriculture, positioning them as a crucial innovation for addressing global food security challenges in an environmentally responsible manner [10]. Weather conditions profoundly impact agricultural productivity by affecting three primary factors: the accumulation of growing temperatures, the duration of cultivation periods, and the distribution of precipitation [11,12]. Growing temperatures, often quantified as Growing Degree Days (GDDs), are essential for crop development, as each plant species requires a specific heat threshold to advance through its growth stages [13]. Similarly, the length of cultivation periods determines the timing of critical agricultural activities such as planting and harvesting, where deviations from optimal periods can disrupt crop yields [14]. Precipitation, in terms of both quantity and timing, is equally vital for maintaining adequate crop hydration and facilitating nutrient uptake [15]. Irregular precipitation patterns, such as extended droughts or excessive rainfall, can lead to water stress, nutrient imbalances, or soil degradation caused by erosion [16]. These interconnected challenges highlight the importance of accurate weather monitoring and advanced risk management strategies to enhance agricultural practices [17]. Utilizing advanced technologies to address weather-related risks can support the development of sustainable and resilient crop production systems, thereby ensuring food security amidst climate variability [18,19].
Despite significant advances in greenhouse monitoring technologies, existing approaches face critical limitations that reduce their effectiveness. Traditional single-model systems often struggle with the multifaceted nature of greenhouse environments. Predictive models like neural networks may excel at forecasting specific environmental parameters but lack robust classification capabilities needed for decision support [20]. Conversely, classification-focused models provide actionable insights but cannot effectively predict future conditions. Furthermore, current systems frequently experience practical implementation challenges, including data transmission delays, integration difficulties between prediction and control systems, and the inability to adapt to the varying temporal patterns of different environmental parameters [21]. These limitations result in suboptimal growing conditions, resource inefficiency, and reduced agricultural productivity. The greenhouse management field requires a robust approach that combines complementary modeling techniques optimized for different parameters with efficient communication protocols to overcome these persistent challenges.
Deep learning enhances simulations, control systems, and predictive models, improving accuracy across industries [22]. DL allows systems to process and interpret large datasets, identifying complex patterns and relationships that were previously challenging to detect [23]. By extracting valuable insights from complex data, DL enables industries to create more efficient, adaptive, and intelligent solutions [24]. Its applications extend across multiple domains, including real-time decision making in automation and robotics, as well as highly precise forecasting in critical domains such as agriculture, healthcare, and climate science [25]. This transformative capability underscores the potential of DL to drive innovation and enhance performance across diverse sectors, addressing complex challenges with unparalleled accuracy and efficiency [26]. Machine learning (ML) and hybrid ML–DL approaches enhance weather forecasting by efficiently analyzing large, multidimensional datasets [27]. These advanced techniques excel at detecting intricate patterns and relationships within data that traditional statistical models often fail to capture, leading to marked improvements in forecasting accuracy and reliability [28]. In agriculture, precise weather forecasts empower farmers to make informed, evidence-based choices regarding planting schedules, water management, pest control, and resource allocation [29]. By minimizing weather-related uncertainties, these methods improve crop yield, quality, and sustainability [30]. Through the optimized use of water, energy, and other essential resources, ML and ML–DL methods contribute to environmentally friendly agriculture while enhancing resilience to climate challenges [31]. Deep learning (DL) and machine learning (ML) are widely implemented in weather classification systems to accurately identify atmospheric conditions, such as cloud cover, precipitation patterns, and solar radiation [32,33]. These advanced models process complex environmental datasets, offering in-depth insights into weather dynamics with remarkable accuracy [34]. The enhanced reliability of these systems benefits multiple sectors [35]. Specifically, in greenhouse management, these technologies deliver essential data to optimize key processes such as climate control, irrigation scheduling, and energy usage [36]. These insights help greenhouse operators enhance crop growth, optimize resources, and reduce costs, promoting sustainable agriculture [37]. Long Short-Term Memory (LSTM) models are particularly adept at detecting and learning long-term dependencies and are thus most suitable for time-series forecasting tasks, such as predicting environmental conditions in greenhouses [38]. When integrated with the Support Vector Machine (SVM) model, which classifies data by identifying optimal hyperplanes, this hybrid approach significantly enhances prediction accuracy and reliability. In intelligent greenhouse management, this combination proves highly beneficial, enabling real-time tracking and regulation of critical environmental factors like temperature, humidity, and light levels [39,40,41]. The synergy between LSTM’s forecasting capabilities and SVM’s classification precision supports efficient resource utilization, maximized crop yields, and optimized operations, fostering sustainable and data-driven advancements in agriculture [42,43].
Long Short-Term Memory models are proficient at discovering and learning long-term dependencies, making them particularly well-suited for time-series forecasting, as in predicting greenhouse environmental conditions [44]. When paired with the Support Vector Machine (SVM) model, which optimally classifies data by determining decision boundaries, this hybrid method significantly improves prediction accuracy and reliability [45]. In smart greenhouse operations, this combination enables real-time monitoring and automated regulation of essential environmental variables, including temperature, humidity, and light intensity [46]. By leveraging the complementary strengths of both models, greenhouse systems can achieve improved resource efficiency, increased crop yields, and streamlined operations, fostering sustainable and data-driven agricultural practices [47,48]. The incorporation of ESP-NOW technology into intelligent greenhouse systems enables seamless and highly reliable real-time data exchange by facilitating seamless and reliable real-time data exchange [49]. This low-power, wireless communication protocol allows sensors and devices to transmit essential environmental data enables sensors and devices to transmit vital environmental data, including temperature, humidity, and light intensity, with minimal latency and high reliability [50,51,52]. By ensuring uninterrupted and efficient communication between system components, ESP-NOW technology supports the precise monitoring and control of greenhouse conditions. This optimization improves resource use, such as water and energy, and enhances sustainability in greenhouse operations.
Based on research conducted by [53], the use of the LSTM-SVM hybrid model combined with Empirical Mode Decomposition (EMD) has been proven effective in improving the accuracy of temperature predictions. This model shows good adaptability to various datasets and outperforms traditional single prediction models with the following results: for the maximum temperature in Washington, RMSE 0.197, MAE 0.159, and MAPE 0.284%, and for the minimum temperature in Washington, RMSE 0.218, MAE 0.173, and MAPE 0.524%. In Los Angeles, the maximum temperature obtained an RMSE of 0.215, MAE of 0.163, and MAPE of 0.221%, while the minimum temperature obtained an RMSE of 0.154, MAE of 0.118, and MAPE of 0.206%.
This research addresses critical gaps in greenhouse environmental management through a dual-modeling approach that integrates specialized predictive models for environmental parameters with robust classification systems. Our comprehensive framework uses the LSTM network for temperature and humidity prediction and the SVM for weather classification, all facilitated by the ESP-NOW wireless communication protocol. This combination provides a more comprehensive understanding of greenhouse conditions, with LSTM designed to predict sequential data for temperature and humidity and the SVM providing effective classification for climate states, thus enabling informed decision making.

2. Materials and Methods

Greenhouses provide a controlled and optimized environment for plant cultivation by regulating key factors such as temperature, humidity, light intensity, soil moisture, carbon dioxide levels, and wind speed. These variables are crucial for plant growth, as they directly influence physiological processes and overall crop productivity. By maintaining optimal conditions, greenhouses establish a stable and protective setting that promotes healthier plant development, higher yields, and enhanced crop quality. Additionally, they mitigate risks associated with external environmental variability, such as extreme weather events, thereby ensuring consistent and reliable agricultural output [54]. Intelligent greenhouse systems establish optimal ecological conditions to support plant growth across a wide range of climate scenarios. These systems maintain optimal temperature, humidity, and light, ensuring crop growth despite weather fluctuations. This advanced regulation not only improves plant health and maximizes productivity but also extends the growing season, enabling continuous and consistent crop production throughout the year. Such systems contribute to sustainable agriculture by optimizing resource use and reducing dependency on favorable external climatic conditions [55]. Smart greenhouses provide a cutting-edge approach to boosting agricultural productivity in confined spaces while reducing reliance on harmful chemicals. Leveraging IoT (Internet of Things) technology, these systems facilitate the constant monitoring and precise regulation of critical environmental conditions, such as temperature, humidity, and light intensity. This live, evidence-based approach ensures the continuous optimization of growing conditions, leading to higher crop yields and superior quality. The integration of IoT technology enhances resource efficiency by minimizing waste—water, energy, and fertilizers—while promoting sustainable farming practices. Smart greenhouses represent a breakthrough innovation in modern agriculture, effectively addressing the dual challenges of food security and environmental sustainability.
The cumulative effects of these temperature-induced stresses highlight the urgent need for implementing effective temperature management strategies within agricultural systems. The development of temperature-resistant crop varieties, the adoption of precision agriculture techniques, and the optimization of irrigation and soil management practices are essential for mitigating the adverse effects of heat stress. These measures are not only critical for sustaining crop yields but also for preserving crop quality throughout the supply chain, minimizing post-harvest losses and strengthening food security amid growing climate variability [56].
Across diverse fields of study and practice, classification serves as an indispensable tool for organizing and categorizing knowledge, revealing hidden insights, and driving innovation. It is fundamental to the development of databases, information retrieval systems, and knowledge graphs, where structured categorization is crucial for efficiently storing, managing, and retrieving relevant information. Furthermore, classification facilitates the identification of trends, the detection of outliers, and the prediction of future outcomes, which are key to advancing research, technology, and real-world applications. In essence, classification not only supports structuring and understanding data but also plays a pivotal role in fostering innovation, solving complex problems, and enabling progress across a wide range of disciplines. It is, therefore, an essential component of both foundational research and the development of advanced technological applications [57].
Due to its cost-effectiveness, reliability, and ease of use, the DHT11, which stands for Digital Humidity and Temperature sensor, has become a widely adopted choice for applications that require accurate and reliable environmental monitoring. Its durability and long-term operational stability make it a dependable tool in systems where maintaining precise temperature and humidity levels is essential for ensuring optimal performance and achieving desired outcomes [58].
Long Short-Term Memory (LSTM) neural networks are an advanced type of Recurrent Neural Network (RNN) designed to effectively process and analyze chronological or time-series data [59]. Unlike traditional RNNs, LSTMs feature a specialized architecture with memory cells and gating mechanisms, enabling them to identify and retain long-term patterns and relationships within data over extended periods. This unique structure makes LSTMs highly suitable for tasks that require recognizing patterns across various time intervals, such as speech recognition, natural language processing (NLP), financial forecasting, and other applications where temporal context is critical. By addressing the vanishing gradient issue commonly found in standard RNNs, LSTMs provide a more robust and accurate framework for modeling complex time-dependent data, making them a preferred choice for sequential data tasks [60]. Long Short-Term Memory cognitive cells, integrated with specialized compression mechanisms known as “gates”, have transformed the conventional framework of RNNs by replacing traditional hidden layer nodes. These gates, which refer to the input gate, forget gate, and output gate, enable the network to selectively manage information by determining what to retain, discard, or pass forward from previous states. The selective memory capability enables LSTMs to focus on relevant information while filtering out irrelevant details, effectively mitigating the vanishing gradient problem that hinders standard RNN performance. By capturing prolonged relationships in time-series data, LSTMs have greatly improved the efficiency, accuracy, and adaptability of RNNs. This innovation makes LSTMs particularly well-suited for tasks requiring an understanding of complex temporal patterns, such as voice recognition, text processing, and temporal prediction, where context and long-term relationships are essential [61]. To prepare the data for the LSTM model, preprocessing steps are applied to ensure quality and reliability. The data are first normalized using min–max scaling, transforming the values into a range between 0 and 1 to improve the efficiency of the LSTM model. The normalization formula is given in Equation (1).
x n o r m = x x m i n x m a x x m i n
The Support Vector Machine (SVM) algorithm is based on statistical learning theory, providing a strong mathematical foundation for identifying and predicting patterns in data. The SVM operates through identifying an ideal hyperplane that separates data points into distinct categories while maximizing separation, ensuring strong generalization to unseen data. By leveraging kernel functions, the SVM is able to effectively handle both linear and non-linear classification issues, making it a versatile algorithm suitable for a variety of applications. Its grounding in statistical principles allows the SVM to minimize classification errors while reducing the likelihood of overfitting, making it particularly effective for complex tasks like image recognition, text categorization, and bioinformatics. This blend of theoretical rigor and practical adaptability makes the SVM a dependable and robust tool in the field of machine learning [62]. The SVM algorithm is grounded in statistical learning theory, providing a strong mathematical framework for analyzing and predicting patterns within data. The SVM is built by finding the optimal hyperplane that separates these data points into classes and maximizes the margin between them, ensuring strong generalization capabilities. Using the kernel functions, the SVM is able to efficiently address both linear and non-linear classification challenges, making it a highly adaptable algorithm with broad applications. Its foundation in statistical principles enables the SVM to reduce classification errors and minimize the risk of overfitting, making it particularly well suited for complex tasks such as image analysis, text categorization, and bioinformatics. Support Vector Machines are widely recognized for their ability to create a clear margin of separation between classes, as illustrated in Figure 1. This combination of theoretical robustness and practical versatility establishes the SVM as a reliable and powerful instrument in the field of machine learning [63]. The different colors in the figure represent different classes.
On the left, the margin separating the two classes is narrow, meaning the hyperplane is positioned closer to the nearest data points from each category, known as support vectors. A smaller margin increases the likelihood of misclassification and reduces the model’s ability to generalize to new data, as the decision boundary becomes more sensitive to variations within the training data. On the right, in contrast, the margin between the two classes is wider, indicating that the hyperplane is positioned farther away from the support vectors. This wider margin ensures a more reliable and robust separation between the classes, reducing the risk of overfitting and improving the model’s ability to adapt effectively to unseen data [64].
Developed by Espressif (Shanghai, China), ESP-NOW is a WiFi-based wireless communication protocol designed for fast and energy-efficient data transfer. It allows ESP32 and ESP8266 (manufactured by Espressif Systems, Shanghai, China) devices to interact directly with one another without relying on a traditional WiFi network or router, making it an ideal choice for low-power and real-time communication needs. The protocol supports message sizes of up to 250 bytes and requires the MAC addresses of communicating devices to be known in advance, ensuring secure and reliable data exchange. With its low latency and minimal power consumption, ESP-NOW is particularly well-suited for applications such as IoT networks, sensor data transmission, and remote-control systems, where efficiency, speed, and reliability are critical. This versatile and lightweight protocol provides developers with a powerful tool for designing highly optimized and responsive wireless communication systems [62].
The Smart Greenhouse Monitoring process is an innovative technological system designed to track, analyze, and predict temperature and humidity conditions both inside and outside a greenhouse. It leverages the integration of DHT11 sensors and ESP32 microcontrollers, which work in tandem to efficiently collect and process environmental data. The DHT11 sensors provide accurate and real-time measurements of temperature and humidity, while the ESP32 microcontrollers manage data acquisition, preprocessing, and communication within the system.
What sets this system apart is its seamless integration of advanced machine learning algorithms, such as LSTM and the SVM, to enhance data analysis and optimize decision-making processes:
  • LSTM: As a specialized form of Recurrent Neural Network, LSTM is utilized for time-series forecasting. It detects long-term patterns in the collected data, allowing for highly precise predictions of future conditions like temperature and humidity. This enables proactive adjustments to ensure that the greenhouse environment remains ideal for plant growth [64].
  • SVM: The Support Vector Machine algorithm is applied for climate classification, categorizing environmental conditions into predefined labels such as “optimal”, “suboptimal”, or “critical”. By identifying complex relationships within the input data, the SVM enables data-driven decision making to maintain or modify greenhouse conditions as needed [65].
By enabling low-latency and energy-efficient data transfer via ESP-NOW, ESP32 microcontrollers improve system communication in IoT networks. This ensures seamless connectivity and real-time monitoring across multiple devices. By integrating advanced hardware and artificial intelligence, this system delivers comprehensive capabilities for data collection, management, and analysis. Its ability to provide accurate predictions and reliable climate classifications optimizes greenhouse operations, ensuring ideal growing conditions. The implementation of advanced agricultural technologies is often represented through comprehensive models that highlight their functionality and benefits. As illustrated in Figure 2, this system leads to improved crop yield and quality, sustainable practices achieved through optimized resource consumption (including water and energy efficiency), and enhanced decision making powered by real-time insights and predictive analytics.
The Smart Greenhouse Monitoring process represents a vital solution for modern agriculture, combining cutting-edge technology with sustainable practices to meet the growing demands of food production while preserving environmental resources. This process, as depicted in Figure 3, integrates real-time data and automation to optimize greenhouse conditions and resource use.

Machine Learning Models’ Efficacy

The effectiveness of machine learning models is assessed using four key statistical error metrics, each offering distinct insights into how well the model performs. As shown in Equation (2), Mean Absolute Error (MAE) calculates the arithmetic mean of the absolute differences between predicted and actual values, measuring the average magnitude of prediction errors. The MAE offers a straightforward and intuitive error metric, as it ignores the direction of errors, making it simple to understand. As seen in Equation (3), Root-Mean-Square Error (RMSE) is calculated by taking the square root of the mean of the squared differences between expected and observed values [66]. By squaring the errors, the RMSE assigns greater weight to larger deviations, making it particularly responsive to outliers. It is especially useful for assessing the impact of significant errors on overall model effectiveness. Mean Absolute Percentage Error (MAPE) measures accuracy by calculating the average percentage error, which is the absolute difference between expected and observed values divided by the actual values. This metric is scale-independent, allowing for error comparisons across datasets with varying ranges, thus providing a broader perspective on model performance. As seen in Equation (4), the Correlation Coefficient (R) quantifies the strength and direction of the linear relationship between predicted and observed values [64]. Its value spans from −1 (representing a perfect negative correlation) to +1 (representing a perfect positive correlation). A value near +1 indicates a strong positive correlation and high model accuracy.
Collectively, these metrics offer a comprehensive evaluation of the predictive accuracy of a model, highlighting its strengths, weaknesses, and areas for potential improvement. They provide a systematic framework for assessing both the magnitude of errors and the quality of the relationship between predictions and the observed outcomes.
M A E = 1 N i = 1 N ( p i o ( i ) )
M S E = 1 N i = 1 N ( p i o i ) 2
R = i = 1 N ( p i p ¯ ) ( o i o ¯ ) i = 1 N ( p i p ¯ ) 2 i = 1 N ( o i o ¯ ) 2
The confusion matrix is a fundamental tool for evaluating the effectiveness of a categorization model, providing a detailed breakdown of prediction outcomes. It includes four main components: true positive (TP), true negative (TN), false positive (FP), and false negative (FN) [67]. True positives refer to instances where the model accurately detects positive cases, and true negatives correspond to correctly classified negative instances. False positives occur when negative cases are mistakenly predicted as positive, and false negatives arise when positive cases are incorrectly categorized as negative. These components form the basis for calculating several key performance metrics.
Precision measures the proportion of correctly identified positive cases among all predicted positive instances (TP/(TP + FP)), indicating how reliable the model is in detecting positive outcomes. Recall, also known as sensitivity, assesses the model’s ability to correctly identify actual positive cases (TP/(TP + FN)), reflecting its effectiveness in capturing true positives. To find a balance between precision and recall, the F1-score is used, which calculates their harmonic mean. This metric is particularly valuable in situations where there is an imbalance between precision and recall. Accuracy evaluates the overall performance of the model by calculating the proportion of correct predictions, both positive and negative, relative to the overall count of instances ((TP + TN)/(TP + TN + FP + FN)).
These metrics collectively offer a thorough evaluation of the classification system’s effectiveness, providing deeper insights into its strengths and areas for improvement. By analyzing these metrics, practitioners can identify weaknesses and implement necessary adjustments to enhance model performance, particularly in scenarios where specific errors, such as false positives or false negatives, carry significant implications.
P r e c i s i o n = T P T P + F P
R e c a l l = T P T P + F N
F 1 - s c o r e = 2   ×   P r e c i s i o n   R e c a l l P r e c i s i o n + R e c a l l
A c c u r a c y = T P + T N T P + T N + F P + F N

3. Results

This section presents a comprehensive comparative analysis of the performance of multiple machine learning models, using the confusion matrix as a key evaluation tool. The comparison focuses on the LSTM model alongside three other neural network architectures: the 1D CNN, the GRU, and the RNN. In addition to these quantitative metrics, confusion matrices are employed to visualize and assess the classification effectiveness of each model. These matrices provide a detailed breakdown of the models’ ability to accurately classify and differentiate between various categories, offering key insights into classification accuracy and the distribution of errors. By integrating quantitative regression metrics (R2, MAE, and RMSE) with classification insights derived from the confusion matrix, this dual evaluation method establishes a robust framework for comparing model performance. This integrated approach allows a thorough assessment of each model’s pros and cons, offering valuable insights into their capability to both predict and classify greenhouse conditions. Such an in-depth analysis helps identify the most suitable model for optimizing greenhouse management and ensuring accurate environmental monitoring. Table 1. below illustrates the comparison of machine learning model performance in predicting temperature using data gathered from online sources.
The comparative analysis presented in Table 1 highlights the superior performance of the LSTM model in forecasting temperature, outperforming all other machine learning models evaluated in this research. The LSTM model, configured with optimal parameters (two layers, 100 neurons per layer, and the Adam optimizer), delivers the best results, with the lowest RMSE at 0.0766 and MAE at 0.0454, indicating minimal prediction errors. Additionally, its R2 value of 0.8825 is the highest among the models, demonstrating that LSTM explains 88.25% of the variation in the temperature data. These results establish LSTM as the most accurate and reliable model in this analysis.
Table 1 provides a comparison of machine learning model performance in predicting temperature. In contrast, the 1D CNN demonstrates the weakest performance, with an RMSE of 1.9673, MAE of 1.3102, and R2 of 0.6613, indicating significant prediction errors and a limited ability to capture data variability. The Simple Recurrent Neural Network (Simple RNN), although outperforming the 1D CNN, still falls short compared to LSTM, with an RMSE of 1.3430, MAE of 0.8999, and R2 of 0.8422. Similarly, the GRU model shows modest improvements over the Simple RNN, achieving an RMSE of 1.2895, MAE of 0.8771, and R2 of 0.8545, but it still does not match the accuracy or variance-explaining capability of LSTM.
Figure 4 illustrates the performance of the machine learning models in predicting temperature. The superior performance of LSTM can be attributed to its advanced architecture, specifically designed to manage long-term dependencies in sequential data. In contrast, the 1D CNN is proficient in extracting spatial features but struggles to capture temporal patterns, while both the Simple RNN and GRU face limitations in retaining information over extended time periods. LSTM’s ability to effectively process and retain information across long time horizons gives it a distinct advantage in temperature prediction tasks. This feature is especially crucial in temperature forecasting, where recognizing sequential dependencies is vital for precise forecasts. The findings of this research consistently demonstrate the LSTM model’s ability to outperform other models, establishing it as the most effective tool for precise and reliable temperature forecasting. These results emphasize the importance of using models like LSTM, which are optimized for time-series data, to achieve superior performance in applications requiring accurate and dependable forecasting. For further insights, refer to Table 2, which presents the performance of the machine learning models in predicting humidity using data gathered from online sources.
The analysis presented in Table 2 highlights the outstanding performance of the Simple RNN model in moisture level prediction, demonstrating the best balance between accuracy and explanatory power among all models assessed in this study. The Simple RNN achieves an RMSE of 5.3034 and MAE of 3.8041, which, while not the lowest error metrics, are reasonably competitive. Most importantly, its R² value of 0.8187, the highest among all models, indicates that it explains 81.87% of the variance in the moisture data. These results highlight the model’s effectiveness in identifying the core trends and variability in the data, making it the most appropriate model for this task when considering the overall performance balance.
Table 2 presents the performance of the machine learning models in predicting humidity using data gathered from online sources. In contrast, the 1D CNN model produces an RMSE of 6.7389, MAE of 4.8910, and R2 of 0.7073, which reflects its limited capacity to capture temporal dependencies and data variability in moisture prediction. While the GRU model yields competitive results with an RMSE of 5.4522, MAE of 3.7505, and R² of 0.8084, its performance remains slightly behind the Simple RNN in terms of variance explanation, suggesting that the Simple RNN is better suited for moisture prediction when explanatory power is prioritized.
Interestingly, the LSTM model, configured with optimal parameters (one layer, 50 neurons, and the RMSprop optimizer), demonstrates significantly lower RMSE (0.1520) and MAE (0.1106) values compared to other models, indicating superior accuracy in point predictions. However, its notably lower R² value of 0.5638 raises concerns about its consistency and reliability in explaining data variability. This finding is particularly significant, as it suggests that, despite LSTM’s exceptional precision in individual predictions, it captures only about 56% of the overall variance in humidity data, considerably less than the Simple RNN (81.87%) and GRU (80.84%). This peculiar combination of low error metrics but moderate explanatory power suggests that the LSTM model may be overfitting to certain patterns in the training data while missing broader trends or relationships. This highlights the significance of choosing model architectures that are tailored to the unique features of the dataset and the specific task at hand and emphasizes that lower error metrics alone may not always indicate the best model for time-series forecasting applications.
In addition to regression analysis, this study also evaluates the SVM model alongside other popular classification algorithms. This evaluation incorporates four key metrics: accuracy, which evaluates the percentage of correct forecasts; precision, which calculates the ratio of true positives to total forecasted positives; recall, which evaluates the model’s ability to identify actual positive cases; and F1-score, which balances precision and recall by providing their harmonic mean. By using these metrics, the analysis provides a detailed evaluation of the classification models’ effectiveness, highlighting their strengths and weaknesses in different predictive scenarios.
Figure 5 illustrates the performance of the machine learning models in predicting humidity using datasets acquired from websites. This dual evaluation, which integrates both regression and classification analysis, provides a thorough understanding of the models’ capabilities. The findings not only confirm the Simple RNN’s superior performance in moisture prediction but also emphasize the need to choose evaluation metrics and model architectures that are specifically suited to the dataset and the specific task. These insights are critical for advancing the development and application of machine learning models in predictive analytics and classification tasks, ensuring that the selected models align with the unique requirements of each application. Table 3 illustrates the confusion matrix for the SVM model, providing insights into its classification performance.
Table 3 presents the performance metrics of various classification models, including accuracy, precision, recall, and F1-score. The evaluation results indicate that the SVM and Gradient Boosting models outperform all other models tested, scoring the highest accuracy of 0.63. The SVM model, specifically configured as an SVM with an RBF kernel (C = 100, gamma = 1), shows consistent effectiveness among all metrics, with precision, recall, and F1-score all at 0.63, highlighting its reliability and balanced predictive capability. Similarly, the Gradient Boosting model matches the SVM’s performance, attaining identical scores of 0.63 for accuracy, precision, recall, and F1-score, further proving its robustness and effectiveness in predictive tasks. These findings establish both models as the most accurate and dependable choices for this application.
Slightly trailing behind the top models, the neural network delivers competitive results, with an accuracy and recall of 0.62, a precision of 0.64, and an F1-score of 0.62. While demonstrating strong predictive potential, it falls just short of the SVM and Gradient Boosting models. The Random Forest and K-Nearest Neighbors (KNN) models follow, each achieving stable yet less competitive scores of 0.60 for accuracy, precision, recall, and F1-score. Though these models perform decently, they are outpaced by the top performers, highlighting their relative limitations in this context.
The Logistic Regression model ranks somewhat lower, with an accuracy of 0.59, precision and recall of 0.60, and F1-score of 0.59. While its performance is acceptable, it lacks the consistency and predictive reliability of the SVM and Gradient Boosting models, making it a less optimal choice for this task. At the bottom of the ranking, the Linear Discriminant Analysis (LDA) model reports the lowest metrics, with an accuracy of 0.54, precision of 0.50, recall of 0.54, and an F1-score of 0.51. These results indicate significant challenges for LDA in producing reliable predictions, indicating its unsuitability for this particular task.
This comprehensive evaluation underscored in Figure 6 underscores the superiority of the SVM and Gradient Boosting models, which excel in both accuracy and consistency across all metrics, positioning them as the most effective models for this task. The findings also emphasize the importance of selecting models that are well aligned with the dataset’s specific characteristics and the nature of the problem. While models like neural networks and Random Forest demonstrate competitive performance, they fall just behind the leading models, whereas others like LDA struggle to produce reliable predictions. These insights provide valuable guidance for choosing the most suitable machine learning models, facilitating better decision making and enhanced predictive performance in similar tasks.

4. Discussion

4.1. Comparative Performance of Machine Learning Models

Our research findings demonstrate significant performance variations among machine learning models for greenhouse environmental monitoring and classification. The LSTM model’s superior performance in temperature prediction (RMSE 0.0766, MAE 0.0454, R2 0.8825) confirms its effectiveness for temporal data with complex dependencies. Figure 7 visually demonstrates this exceptional performance, showing the LSTM model (configured with optimal parameters: two layers, 100 neurons per layer, and the Adam optimizer) closely tracking actual temperature measurements across a 24 h period sampled at 10 min intervals. The predicted temperature line (red) follows the actual temperature (blue) with remarkable precision through various fluctuations, including sharp temperature changes, confirming the model’s ability to capture both gradual trends and sudden shifts in greenhouse temperature patterns.
While this aligns with paper [54], our research substantially extends their work by applying these techniques specifically to controlled greenhouse environments rather than urban settings, eliminating the need for Empirical Mode Decomposition, and implementing a comprehensive classification framework alongside prediction models. Furthermore, our LSTM implementation achieved better accuracy than their reported results (RMSE 0.154–0.218), demonstrating the effectiveness of our optimization approach.

4.2. Parameter-Specific Model Performance

Interestingly, our comparative analysis revealed unexpected results for humidity forecasting. While LSTM excelled at temperature prediction as proposed in our methodology, it performed poorly for humidity forecasting (RMSE 0.1520, MAE 0.1106, R2 0.5638) compared to other models. Figure 8 shows our LSTM implementation for humidity prediction (configured with one layer, 50 neurons, and the RMSprop optimizer) over the same 24 h period. While the model generally follows the humidity pattern and captures major trend directions, it exhibits more noticeable deviations from the actual values at humidity extremes and during rapid fluctuations.
Unexpectedly, the Simple RNN demonstrated superior performance for humidity prediction (RMSE 5.3034, MAE 3.8041, R2 0.8187), followed closely by the GRU model (RMSE 5.4522, MAE 3.7505, R2 0.8084). This contradicts our original hypothesis that LSTM would excel at both parameters. The 1D CNN showed the weakest overall performance for humidity prediction despite a reasonable R2 value of 0.7073, with the highest error metrics (RMSE 6.7389, MAE 4.8910).
These findings suggest that humidity patterns in greenhouse environments may exhibit different temporal characteristics from temperature data, with potentially different sequential patterns that RNN architecture captures more effectively. This discovery highlights the importance of parameter-specific model selection in environmental monitoring systems rather than applying a uniform approach across all variables.

4.3. Classification Performance

For classification tasks, our SVM implementation with the RBF kernel (C = 100, gamma = 1) achieved balanced performance metrics (accuracy, precision, recall, and F1-score) at 0.63, outperforming other classifiers including Logistic Regression, LDA, and KNN. This moderate accuracy reflects the inherent complexity of greenhouse environmental classification, where subtle parameter changes can significantly impact growing conditions.

4.4. Advancements over Existing Solutions

Existing greenhouse monitoring solutions primarily rely on single-model approaches or traditional statistical methods, which often lack the comprehensive capabilities of our hybrid system. The integration of the ESP-NOW wireless protocol with our machine learning models represents a significant technical advancement, enabling rapid data transmission with minimal power consumption and addressing practical implementation challenges that previous research has often overlooked. By combining optimized predictive models with efficient communication protocols, our system provides both the analytical capability and operational efficiency needed for effective greenhouse management.
Several limitations exist in this research despite our comprehensive approach. Model performance may vary depending on greenhouse configurations, crop types, and seasonal conditions, potentially requiring parameter adjustments for optimal results. High-quality data collection remains essential, as sensor accuracy and placement significantly impact prediction quality. Additionally, the computational requirements for implementing multiple machine learning models may present challenges for smaller agricultural operations without adequate technical infrastructure. Future research should explore more resource-efficient implementations, automated parameter optimization, and adaptive models that can better accommodate changing greenhouse conditions throughout growing seasons. The visual comparison between our temperature and humidity prediction models (Figure 1 and Figure 2) further emphasizes the need for parameter-specific optimization approaches, as different environmental variables clearly require different model architectures and configurations to achieve optimal forecasting performance.

5. Conclusions

The results from our research demonstrate the effectiveness of specialized machine learning models for greenhouse environmental monitoring applications. The LSTM model exhibited exceptional performance in temperature prediction with an RMSE of 0.0766, MAE of 0.0454, and R2 value of 0.8825, confirming its capacity to capture the complex temporal patterns inherent in greenhouse temperature fluctuations. Our investigation revealed a particularly valuable insight regarding humidity prediction, where the Simple RNN model unexpectedly outperformed the more complex LSTM architecture, achieving an RMSE of 5.3034, MAE of 3.8041, and R2 value of 0.8187. This finding challenges the common assumption that more sophisticated models invariably yield superior results and underscores the importance of parameter-specific model selection in greenhouse monitoring systems. Different environmental variables clearly benefit from tailored architectural approaches rather than a one-size-fits-all solution. For classification tasks, our evaluation identified the SVM model with the RBF kernel as the most effective environmental classifier, achieving balanced performance metrics with an accuracy of 0.63. Though modest, this performance establishes a reliable foundation for environmental condition classification within our system architecture.
The integration of these optimized models with ESP-NOW wireless communication technology creates a functional greenhouse monitoring system capable of both accurate environmental prediction and reliable climate classification. This hybrid approach represents a meaningful advancement in greenhouse management technology, providing operators with effective tools for optimizing resource usage and enhancing crop yield.
Our work contributes to the advancement of precision agriculture by demonstrating how specialized artificial intelligence models, when combined with efficient communication protocols, can create practical solutions that enhance operational efficiency while promoting sustainable farming practices. The system establishes a replicable framework for modern agricultural management that improves both productivity and environmental sustainability. Building on these findings, future research should explore more resource-efficient implementations, automated parameter optimization techniques, and adaptive models that can better accommodate the changing conditions typically experienced throughout growing seasons. These advancements would further enhance the system’s practical utility in real-world greenhouse environments, moving the industry closer to truly intelligent and autonomous environmental management systems.

Author Contributions

Conceptualization, Y.-C.T.; methodology, Y.-C.T. and N.W.S.; software, I.G.N.A.S.D. and N.W.S.; validation, I.G.N.A.S.D. and N.W.S.; formal analysis, I.G.N.A.S.D. and N.W.S.; investigation, Y.-C.T.; resources, Y.-C.T. and N.W.S.; data curation, I.G.N.A.S.D. and N.W.S.; writing—original draft preparation, N.W.S.; writing—review and editing, Y.-C.T. and I.G.N.A.S.D.; visualization, I.G.N.A.S.D. and N.W.S.; supervision, Y.-C.T.; project administration, Y.-C.T.; funding acquisition, Y.-C.T. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the MCUT under contract VK013-1500-113 and the National Science and Technology Council in Taiwan under contract NSTC 113-2637-E-131-004.

Data Availability Statement

The datasets provided by Ming Chi University of Technology are not publicly available due to ethical and privacy restrictions.

Acknowledgments

The authors would like to thank the Ming Chi University of Technology and the National Science and Technology Council, Taiwan for their technical support.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SVMSupport Vector Machine
LDALinear Discriminant Analysis
KNNK-Nearest Neighbors
RBFRadial Basis Function
LSTMLong Short-Term Memory
RMSERoot-Mean-Square Error
MAEMean Absolute Error
Coefficient of Determination
AIArtificial Intelligence
IoTInternet of Things
CEAControlled Environment Agriculture
DLDeep Learning
GDDGrowing Degree Day
MLMachine Learning
NLPNatural Language Processing
TPTrue Positive
TNTrue Negative
FPFalse Positive
FNFalse Negative
1D CNN1D Convolutional Neural Network
GRUGated Recurrent Unit
Simple RNNSimple Recurrent Neural Network

References

  1. Patel, V.K.; Singh, L.P.; Sharma, D.; Singh, K.; Sudan, S.; Koul, V.K. Trends in Greenhouse Production Technology with Special Reference to Protected Cultivation of Horticultural Crops. Int. J. Multidiscip. Res. 2024, 6, 1–2. [Google Scholar] [CrossRef]
  2. Battikh, A.; Zaid, R.; Tayeh, A.; Kittana, A.; Jallad, J.; Alsadi, S.; Foqha, T.; Alahdal, D.; Kanan, M. Greenhouse Automation using ESP32: A Comprehensive Study on Monitoring and Controlling Environmental Parameters for Optimal Plant Growth. In Proceedings of the 2023 2nd International Engineering Conference on Electrical, Energy, and Artificial Intelligence (EICEEAI), Zarqa, Jordan, 27–28 December 2023; pp. 1–6. [Google Scholar] [CrossRef]
  3. Abdullah, N.; Durani, N.A.B.; Bin Shari, M.F.; Siong, K.S.; Hau, V.K.W.; Siong, W.N.; Ahmad, I.K.A. Towards Smart Agriculture Monitoring Using Fuzzy Systems. IEEE Access 2021, 9, 4097–4111. [Google Scholar] [CrossRef]
  4. Shamshiri, R.R.; Hameed, I.A.; Thorp, K.R.; Balasundram, S.K.; Shafian, S.; Fatemieh, M.; Sultan, M.; Mahns, B.; Samiei, S. Greenhouse Automation Using Wireless Sensors and IoT Instruments Integrated with Artificial Intelligence; IntechOpen: London, UK, 2021. [Google Scholar] [CrossRef]
  5. Bersani, C.; Ruggiero, C.; Sacile, R.; Soussi, A.; Zero, E. Internet of Things Approaches for Monitoring and Control of Smart Greenhouses in Industry 4.0. Energies 2022, 15, 3834. [Google Scholar] [CrossRef]
  6. Nassar, J.M.; Khan, S.M.; Villalva, D.R.; Nour, M.M.; Almuslem, A.S.; Hussain, M.M. Compliant plant wearables for localized microclimate and plant growth monitoring. npj Flex. Electron. 2018, 2, 24. [Google Scholar] [CrossRef]
  7. Huang, W.; Wang, X. The Impact of Technological Innovations on Agricultural Productivity and Environmental Sustainability in China. Sustainability 2024, 16, 8480. [Google Scholar] [CrossRef]
  8. Pathak, S.K. Strategic Management of Eco-Innovation and Emerging Technologies for Sustainability in Agro-Based Industries. Int. J. Multidiscip. Res. 2024, 6, 5. [Google Scholar] [CrossRef]
  9. Yao, S.; Wu, G. Research on the Efficiency of Green Agricultural Science and Technology Innovation Resource Allocation Based on a Three-Stage DEA Model—A Case Study of Anhui Province, China. Int. J. Environ. Res. Public Health 2022, 19, 13683. [Google Scholar] [CrossRef]
  10. Shanto, S.S.; Rahman, M.; Oasik, J.M.; Hossain, H. Smart Greenhouse Monitoring System Using Blynk IoT App. J. Eng. Res. Rep. 2023, 25, 94–107. [Google Scholar] [CrossRef]
  11. Liang, X.-Z.; Wu, Y.; Chambers, R.G.; Schmoldt, D.L.; Gao, W.; Liu, C.; Liu, Y.-A.; Sun, C.; Kennedy, J.A. Determining climate effects on US total agricultural productivity. Proc. Natl. Acad. Sci. USA 2017, 114, E2285–E2292. [Google Scholar] [CrossRef]
  12. Njuki, E.; Bravo-Ureta, B.E.; O’donnell, C.J. A new look at the decomposition of agricultural productivity growth incorporating weather effects. PLoS ONE 2018, 13, e0192432. [Google Scholar] [CrossRef]
  13. Anandhi, A. Growing degree days—Ecosystem indicator for changing diurnal temperatures and their impact on corn growth stages in Kansas. Ecol. Indic. 2016, 61, 149–158. [Google Scholar] [CrossRef]
  14. Parent, B.; Leclere, M.; Lacube, S.; Semenov, M.A.; Welcker, C.; Martre, P.; Tardieu, F. Maize yields over Europe may increase in spite of climate change, with an appropriate use of the genetic variability of flowering time. Proc. Natl. Acad. Sci. USA 2018, 115, 10642–10647. [Google Scholar] [CrossRef] [PubMed]
  15. Li, Y.; Guan, K.; Schnitkey, G.D.; DeLucia, E.; Peng, B. Excessive rainfall leads to maize yield loss of a comparable magnitude to extreme drought in the United States. Glob. Chang. Biol. 2019, 25, 2325–2337. [Google Scholar] [CrossRef]
  16. Campos, M.N.; Sevilla, P.M.; Montoya, J.M.; Cárdenas, O.L.; Torres, M.L.d.G.; García, L.A.S. Rainfall Potential and Consequences on Structural Soil Degradation of the Most Important Agricultural Region of Mexico. Atmosphere 2024, 15, 581. [Google Scholar] [CrossRef]
  17. Benami, E.; Jin, Z.; Carter, M.R.; Ghosh, A.; Hijmans, R.J.; Hobbs, A.; Kenduiywo, B.; Lobell, D.B. Uniting remote sensing, crop modelling and economics for agricultural risk management. Nat. Rev. Earth Environ. 2021, 2, 140–159. [Google Scholar] [CrossRef]
  18. Dobhal, S.; Kumar, R.; Bhardwaj, A.K.; Chavan, S.B.; Uthappa, A.R.; Kumar, M.; Singh, A.; Jinger, D.; Rawat, P.; Handa, A.; et al. Global assessment of production benefits and risk reduction in agroforestry during extreme weather events under climate change scenarios. Front. For. Glob. Chang. 2024, 7, 1379741. [Google Scholar] [CrossRef]
  19. Semeraro, T.; Scarano, A.; Leggieri, A.; Calisi, A.; De Caroli, M. Impact of Climate Change on Agroecosystems and Potential Adaptation Strategies. Land 2023, 12, 1117. [Google Scholar] [CrossRef]
  20. Monjezi, P.H.; Taki, M.; Mehdizadeh, S.A.; Rohani, A.; Ahamed, S. Prediction of Greenhouse Indoor Air Temperature Using Artificial Intelligence (AI) Combined with Sensitivity Analysis. Horticulturae 2023, 9, 853. [Google Scholar] [CrossRef]
  21. Maraveas, C. Incorporating Artificial Intelligence Technology in Smart Greenhouses: Current State of the Art. Appl. Sci. 2023, 13, 14. [Google Scholar] [CrossRef]
  22. Chukwunweike, J.N.; Eze, C.C.; Abubakar, I.; Izekor, L.O.; Adeniran, A.A. Integrating deep learning, MATLAB, and advanced CAD for predictive root cause analysis in PLC systems: A multi-tool approach to enhancing industrial automation and reliability. World J. Adv. Res. Rev. 2024, 23, 2538–3557. [Google Scholar] [CrossRef]
  23. Haut, J.M.; Paoletti, M.E.; Moreno-Alvarez, S.; Plaza, J.; Rico-Gallego, J.-A.; Plaza, A. Distributed Deep Learning for Remote Sensing Data Interpretation. Proc. IEEE 2021, 109, 1320–1349. [Google Scholar] [CrossRef]
  24. Yan, P.; Abdulkadir, A.; Luley, P.-P.; Rosenthal, M.; Schatte, G.A.; Grewe, B.F.; Stadelmann, T. A Comprehensive Survey of Deep Transfer Learning for Anomaly Detection in Industrial Time Series: Methods, Applications, and Directions. IEEE Access 2023, 12, 3768–3789. [Google Scholar] [CrossRef]
  25. Baseca, C.C.; Sendra, S.; Lloret, J.; Tomas, J. A Smart Decision System for Digital Farming. Agronomy 2019, 9, 216. [Google Scholar] [CrossRef]
  26. Abdelghany, E.S.; Farghaly, M.B.; Almalki, M.M.; Sarhan, H.H.; Essa, M.E.-S.M. Machine Learning and IoT Trends for Intelligent Prediction of Aircraft Wing Anti-Icing System Temperature. Aerospace 2023, 10, 676. [Google Scholar] [CrossRef]
  27. Patil, A.A.; Kulkarni, K. A Hybrid Machine Learning - Numerical Weather Prediction Approach for Rainfall Prediction. In Proceedings of the 2023 IEEE India Geoscience and Remote Sensing Symposium (InGARSS), Bangalore, India, 10–13 December 2023; pp. 1–4. [Google Scholar] [CrossRef]
  28. Dudek, G. Short-Term Load Forecasting Using Neural Networks with Pattern Similarity-Based Error Weights. Energies 2021, 14, 3224. [Google Scholar] [CrossRef]
  29. Mimenbayeva, A.; Issakova, G.; Tanykpayeva, B.; Tursumbayeva, A.; Suleimenova, R.; Tulkibaev, A. Applying Machine Learning for Analysis and Forecasting of Agricultural Crop Yields. Sci. J. Astana IT Univ. 2024, 17, 28–42. [Google Scholar] [CrossRef]
  30. Yang, J.; Yu, M.; Liu, Q.; Li, Y.; Duffy, D.Q.; Yang, C. A high spatiotemporal resolution framework for urban temperature prediction using IoT data. Comput. Geosci. 2022, 159, 104991. [Google Scholar] [CrossRef]
  31. Ladi, T.; Jabalameli, S.; Sharifi, A. Applications of machine learning and deep learning methods for climate change mitigation and adaptation. Environ. Plan. B Urban Anal. City Sci. 2022, 49, 1314–1330. [Google Scholar] [CrossRef]
  32. Dalal, S.; Seth, B.; Radulescu, M.; Cilan, T.F.; Serbanescu, L. Optimized Deep Learning with Learning without Forgetting (LwF) for Weather Classification for Sustainable Transportation and Traffic Safety. Sustainability 2023, 15, 6070. [Google Scholar] [CrossRef]
  33. Schultz, M.G.; Betancourt, C.; Gong, B.; Kleinert, F.; Langguth, M.; Leufen, L.H.; Mozaffari, A.; Stadtler, S. Can deep learning beat numerical weather prediction? Philos. Trans. R. Soc. A Math. Phys. Eng. Sci. 2021, 379, 20200097. [Google Scholar] [CrossRef]
  34. Wu, Y.; Xue, W. Data-Driven Weather Forecasting and Climate Modeling from the Perspective of Development. Atmosphere 2024, 15, 689. [Google Scholar] [CrossRef]
  35. Augustin, J. Industry-Specific Applications of Site Reliability Engineering. Int. J. Res. Appl. Sci. Eng. Technol. 2024, 12, 1366–1371. [Google Scholar] [CrossRef]
  36. Sharma, A.; Ismail, Z.S. Weather Classification Model Performance: Using CNN, Keras-Tensor Flow. ITM Web Conf. 2022, 42, 01006. [Google Scholar] [CrossRef]
  37. Debdas, S.; Pandey, S.; Gupta, S.; Dash, R.K.; Patnaik, M.C.; Singh, A.A. Optimizing Resource Efficiency in Smart Greenhouses Through IoT. In Proceedings of the 2024 5th International Conference for Emerging Technology (INCET), Belgaum, India, 24–26 May 2024; pp. 1–7. [Google Scholar] [CrossRef]
  38. Huang, S.; Liu, Q.; Wu, Y.; Chen, M.; Yin, H.; Zhao, J. Edible Mushroom Greenhouse Environment Prediction Model Based on Attention CNN-LSTM. Agronomy 2024, 14, 473. [Google Scholar] [CrossRef]
  39. García-Vázquez, F.; Ponce-González, J.R.; Guerrero-Osuna, H.A.; Carrasco-Navarro, R.; Luque-Vega, L.F.; Mata-Romero, M.E.; Martínez-Blanco, M.d.R.; Castañeda-Miranda, C.L.; Díaz-Flórez, G. Prediction of Internal Temperature in Greenhouses Using the Supervised Learning Techniques: Linear and Support Vector Regressions. Appl. Sci. 2023, 13, 8531. [Google Scholar] [CrossRef]
  40. Mohammadpour, R.; Shaharuddin, S.; Chang, C.K.; Zakaria, N.A.; Ab Ghani, A.; Chan, N.W. Prediction of water quality index in constructed wetlands using support vector machine. Environ. Sci. Pollut. Res. 2015, 22, 6208–6219. [Google Scholar] [CrossRef]
  41. Goyal, V.; Yadav, A.; Mukherjee, R. Performance Evaluation of Machine Learning and Deep Learning Models for Temperature Prediction in Poultry Farming. In Proceedings of the 2022 10th International Conference on Emerging Trends in Engineering and Technology—Signal and Information Processing (ICETET-SIP-22), Nagpur, India, 29–30 April 2022; pp. 1–6. [Google Scholar] [CrossRef]
  42. Purwandari, K.; Cenggoro, T.W.; Sigalingging, J.W.C.; Pardamean, B. Twitter-based classification for integrated source data of weather observations. IAES Int. J. Artif. Intell. 2023, 12, 271–283. [Google Scholar] [CrossRef]
  43. Tian, H.; Wang, P.; Tansey, K.; Zhang, J.; Zhang, S.; Li, H. An LSTM neural network for improving wheat yield estimates by integrating remote sensing data and meteorological data in the Guanzhong Plain, PR China. Agric. For. Meteorol. 2021, 310, 108629. [Google Scholar] [CrossRef]
  44. Esparza-Gómez, J.M.; Luque-Vega, L.F.; Guerrero-Osuna, H.A.; Carrasco-Navarro, R.; García-Vázquez, F.; Mata-Romero, M.E.; Olvera-Olvera, C.A.; Carlos-Mancilla, M.A.; Solís-Sánchez, L.O. Long Short-Term Memory Recurrent Neural Network and Extreme Gradient Boosting Algorithms Applied in a Greenhouse’s Internal Temperature Prediction. Appl. Sci. 2023, 13, 12341. [Google Scholar] [CrossRef]
  45. Pepper, N.; Crespo, L.; Montomoli, F. Adaptive Learning for Reliability Analysis using Support Vector Machines. Reliab. Eng. Syst. Saf. 2022, 226, 108635. [Google Scholar] [CrossRef]
  46. Aryanto, I.K.A.A.; Maneetham, D.; Crisnapati, P.N. IoT-enhanced infant incubator monitoring system with 1D-CNN temperature prediction model. Indones. J. Electr. Eng. Comput. Sci. 2024, 34, 900–912. [Google Scholar] [CrossRef]
  47. Paguay, J.A.C.; Brito, G.A.H.; Rojas, D.L.H.; Calva, J.J.C. Secure home automation system based on ESP-NOW mesh network, MQTT and Home Assistant platform. IEEE Lat. Am. Trans. 2023, 21, 829–838. [Google Scholar] [CrossRef]
  48. Guo, Y.; Zhao, H.; Zhang, S.; Wang, Y.; Chow, D. Modeling and optimization of environment in agricultural greenhouses for improving cleaner and sustainable crop production. J. Clean. Prod. 2020, 285, 124843. [Google Scholar] [CrossRef]
  49. Venkat, B.B.S.; Lalasa, B.; Reddy Tharun, V.; Vadrevu, S.; Chellamani, G.K. Smart Agro-Industrial Monitoring System Using Multi-Sensors and ESP-NOW Protocol. In Proceedings of the 2023 International Conference on Wireless Communications Signal Processing and Networking (WiSPNET), Chennai, India, 29–31 March 2023; pp. 01–05. [Google Scholar] [CrossRef]
  50. Zhang, B. Low Power Consumption Monitoring Method of Agricultural Greenhouse Environment Based on Wireless Sensor Network. INMATEH Agric. Eng. 2022, 68, 435–447. [Google Scholar] [CrossRef]
  51. Hung, C.-W.; Zhuang, Y.-D.; Lee, C.-H.; Wang, C.-C.; Yang, H.-H. Transmission Power Control in Wireless Sensor Networks Using Fuzzy Adaptive Data Rate. Sensors 2022, 22, 9963. [Google Scholar] [CrossRef]
  52. Belkadi, A.; Mezghani, D.; Mami, A. Design and Implementation of Flc Applied to a Smart Greenhouse. Eng. Agricola 2020, 40, 777–790. [Google Scholar] [CrossRef]
  53. Peng, W.; Ni, Q. A Hybrid SVM-LSTM Temperature Prediction Model Based on Empirical Mode Decomposition and Residual Prediction. In Proceedings of the 2020 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Toronto, ON, Canada, 11–14 October 2020; pp. 1616–1621. [Google Scholar]
  54. Soheli, S.J.; Jahan, N.; Hossain, B.; Adhikary, A.; Khan, A.R.; Wahiduzzaman, M. Smart Greenhouse Monitoring System Using Internet of Things and Artificial Intelligence. Wirel. Pers. Commun. 2022, 124, 3603–3634. [Google Scholar] [CrossRef]
  55. Sree, M.S.; Rajeswari, V.R.; Prathima, T.; Latha, P.; Sudhakar, P. Influence of Agroclimatic Indices on Morphological and Growth Attributes of Maize (Zea mays L.). Int. J. Curr. Microbiol. Appl. Sci. 2018, 7, 2582–2590. [Google Scholar] [CrossRef]
  56. Šafranj, J.; Katić, M.; Zivlak, J. Classification in scientific and technical writing. In Proceedings of the 10th International Symposium on Graphic Engineering and Design, Novi Sad, Serbia, 12–14 November 2020; pp. 469–474. [Google Scholar] [CrossRef]
  57. Stavropoulos, G.; Violos, J.; Tsanakas, S.; Leivadeas, A. Enabling Artificial Intelligent Virtual Sensors in an IoT Environment. Sensors 2023, 23, 1328. [Google Scholar] [CrossRef]
  58. Sarker, I.H. Machine Learning: Algorithms, Real-World Applications and Research Directions. SN Comput. Sci. 2021, 2, 160. [Google Scholar] [CrossRef]
  59. Sarker, I.H.; Kayes, A.S.M.; Watters, P. Effectiveness analysis of machine learning classification models for predicting personalized context-aware smartphone usage. J. Big Data 2019, 6, 57. [Google Scholar] [CrossRef]
  60. Huang, C.; Li, Y. A Short-Term Prediction Method for PV Power Generation Based on SVM Weather Classification and PSO-BP Neural Network. In Proceedings of the 2023 IEEE 2nd International Power Electronics and Application Symposium (PEAS), Guangzhou, China, 10–13 November 2023; pp. 2544–2549. [Google Scholar] [CrossRef]
  61. Muawanah, S.; Muzayanah, U.; Pandin, M.G.R.; Alam, M.D.S.; Trisnaningtyas, J.P.N. Stress and Coping Strategies of Madrasah’s Teachers on Applying Distance Learning During COVID-19 Pandemic in Indonesia. Qubahan Acad. J. 2023, 3, 206–218. [Google Scholar] [CrossRef]
  62. Nižetić, S.; Šolić, P.; González-de-Artaza, D.L.-d.I.; Patrono, L. Internet of Things (IoT): Opportunities, issues and challenges towards a smart and sustainable future. J. Clean. Prod. 2020, 274, 122877. [Google Scholar] [CrossRef]
  63. Tung, Y.-C.; Lien, Y.-H.; Liu, L.-W.; David Honesty B., M.; Devi, P.K. IOT-Smart Monitoring of Pet Housing. In Proceedings of the 2024 International Conference on Wireless Communications Signal Processing and Networking (WiSPNET), Chennai, India, 21–23 March 2024; pp. 1–6. [Google Scholar]
  64. Ozbek, A.; Ünal, Ş.; Bilgili, M. Daily average relative humidity forecasting with LSTM neural network and ANFIS approaches. Theor. Appl. Clim. 2022, 150, 697–714. [Google Scholar] [CrossRef]
  65. Ibrahim, Y.; Muhammad, A.I.; Rabiu, A.M. Optimized SVM—Based Network Anomaly Detection with Genetic Algorithm and Recursive Feature Elimination. In Proceedings of the 2023 2nd International Conference on Multidisciplinary Engineering and Applied Science (ICMEAS), Abuja, Nigeria, 1–3 November 2023; pp. 1–5. [Google Scholar] [CrossRef]
  66. Robeson, S.M.; Willmott, C.J. Decomposition of the mean absolute error (MAE) into systematic and unsystematic components. PLoS ONE 2023, 18, e0279774. [Google Scholar] [CrossRef]
  67. Hasnain, M.; Pasha, M.F.; Ghani, I.; Imran, M.; Alzahrani, M.Y.; Budiarto, R. Evaluating Trust Prediction and Confusion Matrix Measures for Web Services Ranking. IEEE Access 2020, 8, 90847–90861. [Google Scholar] [CrossRef]
Figure 1. Margin and support vectors.
Figure 1. Margin and support vectors.
Agriengineering 07 00096 g001
Figure 2. Smart greenhouse model.
Figure 2. Smart greenhouse model.
Agriengineering 07 00096 g002
Figure 3. The monitoring process of a smart greenhouse.
Figure 3. The monitoring process of a smart greenhouse.
Agriengineering 07 00096 g003
Figure 4. Machine learning models’ performance in predicting temperature using datasets acquired from websites.
Figure 4. Machine learning models’ performance in predicting temperature using datasets acquired from websites.
Agriengineering 07 00096 g004
Figure 5. Machine learning models’ performance in predicting humidity using datasets acquired from websites.
Figure 5. Machine learning models’ performance in predicting humidity using datasets acquired from websites.
Agriengineering 07 00096 g005
Figure 6. Performance metrics of various classification models.
Figure 6. Performance metrics of various classification models.
Agriengineering 07 00096 g006
Figure 7. Comparison of actual vs. predicted temperature values using LSTM model.
Figure 7. Comparison of actual vs. predicted temperature values using LSTM model.
Agriengineering 07 00096 g007
Figure 8. Comparison of actual vs. predicted humidity values using LSTM model.
Figure 8. Comparison of actual vs. predicted humidity values using LSTM model.
Agriengineering 07 00096 g008
Table 1. Comparison of machine learning model performance in predicting temperature using data gathered from online sources.
Table 1. Comparison of machine learning model performance in predicting temperature using data gathered from online sources.
ModelRoot-Mean-Square ErrorMean Absolute ErrorCoefficient of Determination
Long Short-Term Memory0.076580740511410.0453613921999930.88251054286956
1D Convolutional Neural Network1.9673165325018991.3101662570990400.661335370556097
Simple Recurrent Neural Network1.3430304519769660.8999315095179280.842168720381621
Gated Recurrent Unit1.2895344168742270.8771331750073470.854491878874283
Table 2. Machine learning models performance in predicting humidity using data gathered from online sources.
Table 2. Machine learning models performance in predicting humidity using data gathered from online sources.
ModelRoot-Mean-Square ErrorMean Absolute ErrorCoefficient of Determination
Long Short-Term Memory0.152019739151000.110633343458170.5637690424919
1D Convolutional Neural Network6.738879238888664.891000421197560.70725943806178
Simple Recurrent Neural Network5.303378850340243.804067594511010.81869371504223
Gated Recurrent Unit5.452240959498793.750486116151550.80837258702500
Table 3. Performance metrics of various classification models.
Table 3. Performance metrics of various classification models.
ModelAccuracyPrecisionRecallF1-Score
Support Vector Machine0.630.640.630.63
Logistic Regression0.590.600.590.59
Linear Discriminant Analysis0.540.500.540.51
K-Nearest Neighbors0.600.600.600.60
Random Forest0.600.600.600.60
Gradient Boosting0.630.630.630.63
Neural Network0.620.640.620.62
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

Tung, Y.-C.; Syahputri, N.W.; Diputra, I.G.N.A.S. Greenhouse Environment Sentinel with Hybrid LSTM-SVM for Proactive Climate Management. AgriEngineering 2025, 7, 96. https://doi.org/10.3390/agriengineering7040096

AMA Style

Tung Y-C, Syahputri NW, Diputra IGNAS. Greenhouse Environment Sentinel with Hybrid LSTM-SVM for Proactive Climate Management. AgriEngineering. 2025; 7(4):96. https://doi.org/10.3390/agriengineering7040096

Chicago/Turabian Style

Tung, Yi-Chih, Nasyah Wulandari Syahputri, and I. Gusti Nyoman Anton Surya Diputra. 2025. "Greenhouse Environment Sentinel with Hybrid LSTM-SVM for Proactive Climate Management" AgriEngineering 7, no. 4: 96. https://doi.org/10.3390/agriengineering7040096

APA Style

Tung, Y.-C., Syahputri, N. W., & Diputra, I. G. N. A. S. (2025). Greenhouse Environment Sentinel with Hybrid LSTM-SVM for Proactive Climate Management. AgriEngineering, 7(4), 96. https://doi.org/10.3390/agriengineering7040096

Article Metrics

Back to TopTop