## 5 Conclusions  
Smart farms in South Korea are categorized into three generations, namely the first, second, and third generations. However, when examining the proportion of smart farms in South Korea in 2020, it is evident that most are first generation of smart farms, which are relatively low-tech. In this paper, a study was conducted on the prediction of environmental sensor data in the environment of first generation smart farms to facilitate the adoption of second generation smart farms. To do this, we first established a smart farm testbed and collected environmental sensor data from 20 June to 30 September. Following that, we conducted kernel density estimation analysis, data analysis, and correlation heatmap analysis based on the collected data. Subsequently, we utilized LSTM, BI-LSTM, and GRU as base models to construct a stacking ensemble model. To assess the performance of the proposed model based on the analyzed results, we utilized LSTM, BI-LSTM, and GRU as the existing models for predicting one of the sensor data variables, air temperature. As a result, the stacking ensemble model exhibited superior performance compared to the LSTM, BI-LSTM, and GRU models, with MSE 0.594, MAE 0.601, and an R-squared value of 0.958. However, several limitations were identified in this study. Data is collected and analyzed for a relatively short duration, approximately from June to September, spanning \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **MSE** & **MAE** & **R\({}^{2}\)** \\ \hline GRU & 0.720 & 0.639 & 0.950 \\ LSTM & 0.668 & 0.623 & 0.953 \\ BI-LSTM & 0.772 & 0.670 & 0.946 \\ Ensemble & 0.594 & 0.601 & 0.958 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance comparison for existing and proposed models. Figure 26: A prediction result of air temperature using GRU. Figure 25: A prediction result of air temperature using BI-LSTM. about three months, to create the prediction model of environmental sensor data in this study. South Korea has distinct seasons, including spring, summer, autumn, and winter, leading to significant variations in crop growth and environmental conditions. Consequently, the prediction model of environmental sensor data primarily trained on summer data may not adequately capture the variability in other seasons, potentially resulting in the prediction errors of environmental sensor data. Therefore, to enhance the reliability of both the data and the model, there is a need to collect and analyze a diverse and extensive dataset over an extended period, encompassing all seasons, including the four distinct seasons. Furthermore, within the smart farming environment of this study, data were collected from nine sensors, encompassing air temperature, humidity, CO\({}_{2}\), soil temperature, insolation, soil electrical conductivity (EC), drainage electrical conductivity (EC), and drainage pH. However, to ensure optimal crop growth, there are additional environmental variables that need to be predicted beyond nine sensor data, including wind speed, precipitation, stages of crop growth, and seasonal variations. Therefore, to enhance the prediction model of environmental sensor data, it is imperative to consider these diverse environmental factors. Lastly, this study was conducted within a smart farming environment, utilizing hydroponic methods for cultivating paprika inside a greenhouse. However, if there are changes in the cultivation environment or the type of crops being grown, there is a potential for reduced accuracy and performance of the prediction model of environmental sensor data. Therefore, to ensure its generalizability, it is crucial to validate and adjust the model's performance across a variety of cultivation environments and crop types. In summary, there is a need for long-term data collection and analysis that considers all seasons, as well as the inclusion of various environmental variables such as wind and precipitation, to improve the model's accuracy.