Next Article in Journal
Toward Sustainable Mobility: AI-Enabled Automated Refueling for Fuel Cell Electric Vehicles
Previous Article in Journal
Economic Analysis and Design of Sustainable Solar Electric Vehicle Carport at Applied Science Private University in Jordan
 
 
Correction published on 16 October 2024, see Energies 2024, 17(20), 5136.
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Multi-Timeframe Forecasting Using Deep Learning Models for Solar Energy Efficiency in Smart Agriculture

by
Saravanakumar Venkatesan
* and
Yongyun Cho
Department of Information and Communications Engineering, Sunchon National University, Suncheon-si 57922, Republic of Korea
*
Author to whom correspondence should be addressed.
Energies 2024, 17(17), 4322; https://doi.org/10.3390/en17174322
Submission received: 1 August 2024 / Revised: 20 August 2024 / Accepted: 27 August 2024 / Published: 29 August 2024 / Corrected: 16 October 2024
(This article belongs to the Section A2: Solar Energy and Photovoltaic Systems)

Abstract

:
Since the advent of smart agriculture, technological advancements in solar energy have significantly improved farming practices, resulting in a substantial revival of different crop yields. However, the smart agriculture industry is currently facing challenges posed by climate change. This involves multi-timeframe forecasts for greenhouse operators covering short-, medium-, and long-term intervals. Solar energy not only reduces our reliance on non-renewable electricity but also plays a pivotal role in addressing climate change by lowering carbon emissions. This study aims to find a method to support consistently optimal solar energy use regardless of changes in greenhouse conditions by predicting solar energy (kWh) usage on various time steps. In this paper, we conducted solar energy usage prediction experiments on time steps using traditional Tensorflow Keras models (TF Keras), including a linear model (LM), Convolutional Neural Network (CNN), stacked—Long Short Term Memory (LSTM), stacked-Gated recurrent unit (GRU), and stacked-Bidirectional—Long Short —Term Memory (Bi-LSTM), as well as Tensor-Flow-based models for solar energy usage data from a smart farm. The stacked-Bi-LSTM outperformed the other DL models with Root Mean Squared Error (RMSE) of 0.0048, a Mean Absolute Error (MAE) of 0.0431, and R-Squared ( R 2 ) of 0.9243 in short-term prediction (2-h intervals). For mid-term (2-day) and long-term (2-week) forecasting, the stacked Bi-LSTM model also exhibited superior performance compared to other deep learning models, with RMSE values of 0.0257 and 0.0382, MAE values of 0.1103 and 0.1490, and R 2 values of 0.5980 and 0.3974, respectively. The integration of multi-timeframe forecasting is expected to avoid conventional solar energy use forecasting, reduce the complexity of greenhouse energy management, and increase energy use efficiency compared to single-timeframe forecasting models.

Graphical Abstract

1. Introduction

The agricultural revolution has been actively developing in recent years with the emergence of fourth-industrial-revolution technologies such as next-generation communication technologies, big data, and artificial intelligence (AI). Smart greenhouses have emerged as a solution to many challenges in crop production owing to their ability to monitor changes in environmental variables [1]. Prediction services focus on the development and evaluation of multi-step time-series forecasting models, with a particular emphasis on deep learning (DL) techniques [2,3,4,5,6,7,8,9,10]. Recent research has focused on forecasting solar energy values per hour [11,12,13,14,15]. These prediction services primarily target accurate forecasting of solar energy values based on real-time conditions. These models are capable of making multi-step predictions and accommodating long-term forecasting requirements [16]. DL models are primarily used to extract valuable information from datasets, enhancing the ability to understand and make decisions regarding solar energy consumption in multifaceted contexts. Forecasting future values in a time series allows us to consider specific contextual variables and make informed decisions based on predictive models. In smart agricultural applications, the capacity to identify anomalies and activate sensors in response to solar energy fluctuations is realized through accurate predictions of forthcoming solar energy values. The analysis of energy forecasts plays a pivotal role in empowering farmers to optimize crop and resource management, thus reducing solar energy inefficiencies and mitigating yield losses [17].
Nowadays, many researchers are adopting AI and DL methods in their predictive research and applications in their agricultural fields. A study based on CNN and RNN for electric load prediction has shown that convolutional computations used by CNN and feed-forward neural networks are suitable for processing data including various environmental variables for electric load prediction compared to existing models [18]. Another study using the LSTM model to forecast the energy consumption of buildings has argued that the LSTM model is effective in processing continuous data and capturing long-term dependencies [19]. This novel approach predicted daily day-ahead energy consumption using forecasted weather data, thereby enabling more accurate and reliable energy consumption forecasts. A study for preventing gas hydrate formation in gas and oil production systems suggested that a DL-based Adaptive Residual Long Short-Term Memory (ARLSTM) model was appropriate for processing time-series data and could capture the dynamic behavior of a gas dataset in its internal time dimension [20]. The LSTM network is used to address classification model issues related to time-series data and TF-Keras-based algorithms, making it capable of forecasting future temperatures by learning from past temperature data [21]. Specifically, a model that incorporates time-based coding into recurring forecasting techniques for generating forecasts was introduced, and a conditional advertising network-based data augmentation model was included to enhance the forecasting capability of multi-output models [22]. A researcher analysis of these DL structures was performed to obtain predictions for horizon 12-ahead, and the accuracy was measured using the determination coefficient of the RMSE [23]. These services can be beneficial for various applications, including agriculture, solar energy management, and climate control, because temperature plays a crucial role. An accurate temperature forecast enables better decision-making, resource optimization, risk management, and overall improvement in operational efficiency [24,25,26,27,28].
This study uses DL techniques to analyze and forecast solar energy from greenhouse and environmental datasets. IoT technology facilitates the connection of devices to the internet, enabling automated operations and the integration of various remote sensors such as solar energy (kWh) and environmental variables. Recent studies have demonstrated the efficacy of IoT systems in improving the monitoring and management of energy and environmental aspects, facilitating real-time data collection and analysis as well as increasing precision rates [29,30,31,32]. The primary objective of precision agriculture is to enhance crop productivity and reduce solar energy waste using improved spatial management techniques. In this study, deep learning TF Keras time-series models are applied to predict solar energy. DL models have demonstrated the capability to generate accurate predictions, consistently achieving error metrics within the threshold range of 0 to 1 [33]. The challenge of forecasting continuous future data using a substantial amount of historical data involves tuning hyper-parameters for time-series forecasting. The most fundamental version of this challenge is to predict a multi-step time future. However, a more complex variation involves the prediction of multiple future time steps, which is of particular interest to those seeking predictions based on extensive historical data.
This study explores TF Keras DL techniques, specifically models, to assess their performance in making multi-step forecasts. These models particularly excel in predicting solar energy readings on a smart farm, especially for short-, mid-, and long-term intervals. DL models are employed with reduction algorithms for analysis. Smart farms collect and analyze data from sensors that continuously monitor environmental variables. By constantly measuring global temperatures and collecting data on these environmental variables, the TF Keras Application Programming Interface (API) can be employed to create statistical summaries, extract evolving patterns, and perform predictive analysis. The multi-step time-series stacked-Bi-LSTM has consistently outperformed other approaches. Its flexibility decreases when decision rules are well-defined. This study presents an LSTM deep learning neural network that indicates the model’s ability to capture complex solar energy dynamics in smart agriculture. However, overfitting is a significant concern in the development of models. Therefore, supplying the model with preprocessed data is essential. This highlights the capacity of the stacked-Bi-LSTM algorithm demonstrated in this study to forecast solar energy usage in smart greenhouses, offering valuable insights for practical applications. Furthermore, the predicted energy values align well with the actual values under various conditions, including both short- and long-term forecasting. The experimental results confirm that this model is proficient in multi-time-series forecasting with the best accuracy. Prediction results were compared with TF Keras LM and different methods (CNN, stacked-LSTM, and stacked-GRU models) to evaluate the performance of deep learning models. An error metric evaluation was conducted using the smallest RMSE and MAE values and the highest R-Square value, which indicated a higher prediction accuracy of the model [34,35]. These prediction services provide precise and dependable energy usage forecasts for diverse time sequences using advanced time-series forecasting models. As climate change intensifies, maintaining stable greenhouse temperatures has become increasingly critical and expensive for crop growth. Herein, an analysis of short- to long-term seasonal variations in external greenhouse temperatures and the maintenance of consistent internal temperatures tailored to different crop types and growth characteristics is proposed. The proposed model can support the development of solar-energy-related services, including greenhouse policies and cost-effective management plans for both short- and long-term solar energy regulation.
Short-term predictions (hours to days) optimize real-time solar energy systems. Mid-term predictions (days to weeks) aid in maintenance and crop planning. Long-term predictions (months and years) guide infrastructure and financial planning and contribute to environmental sustainability. This demonstrates the effectiveness of the Bi-LSTM model for short- and long-term predictions of greenhouse environmental parameters. The Adam optimizer facilitates the prediction of solar energy consumption by relying on recent greenhouse environmental data. This underscores the greater impact of short-term climate conditions on future trends in greenhouse climate change, highlighting the significance of real-time and near-future predictions for stable greenhouse management.
A novel approach to enhancing solar energy usage prediction in smart agriculture is by implementing multi-timeframe prediction. While solar energy technology has already improved farming practices and crop yields, smart farming is facing new challenges due to climate change. Current methods cannot provide reliable forecasts across different time intervals, which is crucial for optimal greenhouse energy management. Our work fills this gap by using advanced DL models to predict solar energy (kWh) usage across short-term (2-h), mid-term (2-day), and long-term (2-week) intervals.
Our work’s key best prediction model is the application of stacked-Bi-LSTM for multi-timeframe solar energy forecasting. Other deep learning models such as LM, CNN, stacked-LSTM, and stacked-GRU have been limited in providing accurate predictions across different timeframes. Our experiments showed that the stackedBi-LSTM model outperforms these other deep learning models, with RMSE of 0.0048, 0.0257, and 0.0382, MAE of 0.0431, 0.1103, and 0.1460, and R 2 of 0.9243, 0.5980, and 0.3974 for short-term, mid-term, and long-term predictions, respectively.
This consistent performance across multiple timeframes proves the model’s robustness and adaptability. By using multi-timeframe forecasting, our approach not only improves the accuracy and reliability of solar energy usage prediction but also simplifies greenhouse energy management. This simplification leads to more energy efficiency, addressing a major challenge in smart farming. Moreover, our method supports the broader goal of sustainable agriculture by optimizing the use of renewable solar energy, thus reducing non-renewable electricity and contributing to climate change mitigation. This interdisciplinary innovation can change the way energy management is performed on smart farms, opening up opportunities for future research in sustainable and efficient agricultural technologies.
The structure of the manuscript is as follows: Section 2 presents the Materials and Methods used in this research, outlining the experimental procedures and analytical techniques. Section 3 comprises the Results and Discussion, analyzing and interpreting the findings of the study concerning the extant literature. Lastly, Section 4 gives a Conclusion and summary analysis that highlights some of this research’s insights, including probable future work areas.

2. Materials and Methods

Data were collected from Naju City Agricultural Technology Center, South Korea. Table 1 shows data material and description in this study. We utilized DL and its time-series model analysis to examine the influence of environmental factors and solar energy on smart farms. The first step was to prepare the datasets, including training and testing sets. After data preprocessing, we used 124,141 datasets for analysis. Preprocessing is crucial for simplifying the generation of time-series data for deep learning applications. When receiving the input time-series data and specific keyword parameters, such as train size and valid size, the initialization function customizes its operation by creating appropriate sampling windows. These windows delineate the dataset into training 70% and test 30% based on their respective sizes. We handled missing values and selected specific features from the input data as needed. This method also supports cyclic feature generation using the standard method. This method can extract cyclic features such as the day, month, and year from the timestamp. If needed, the data can be normalized using either Min-Max scaling or standard scaling. This method provides preprocessed training, validation, and test sets. The time series spans from June 2021 to November 2023 and comprises a smart farm environmental dataset.
Table 2 displays the calculated descriptive statistics for all key variables, including the mean, median, standard deviation, and interquartile range (IQR). These statistics were computed to summarize the data’s central tendency, dispersion, and overall distribution, as follows:
kWh: The standard deviation is relatively high (7.86), while the average is low, meaning that data points are varied around the mean. The interquartile range (IQR) of 11.50 further indicates a wide range within the middle 50% of the data. F_DATA71: The standard deviation (17.26) is large, and this shows that there is much spread in the data. The IQR of 26.20 supports this, suggesting variability in the central part of the data. F_DATA72: This variable also has a relatively symmetric distribution since it has a mean of 22.76 and a median of 22.33; however, its standard deviation (4.83) and IQR (8.03) indicate less variability than F_DATA71. F_DATA74: With a low mean (10.57), median (8.60), and standard deviation at 10.12, this variable does show some degree of spreading out for its values, which are moderately widespread across different ranges on either side [of zero]. The IQR of 14.40 suggests some variability in the middle range of the data. F_DATA76: This variable has a high mean (1087.53) and median (1037.00) and a standard deviation at 781.26, which indicates that it has dispersed data points [mean value ± std]. The high IQR (1161.91) shows a large spread between the 25th and 75th percentiles, which means values in the middle range fluctuate considerably; this can indicate outlier observations or a wide distribution of scores. F_DATA78: This variable has a symmetric distribution, as the mean and median are very similar (15.94 and 15.93). The slightly larger standard deviation (10.02) hints a bit at the benchmark not having very tight distributions around the mean. An IQR of 16.32 hints that the data in the middle part have values that are more or less spread over a moderate range.

2.1. Analysis and Performance Correlation of Solar Energy and Environmental Data Evaluation

This dataset was collected from a study conducted in a paprika greenhouse. The dataset consists of observations gathered from a greenhouse environment and includes four distinct variables. The lists of paprika greenhouse solar energy and environmental factors, along with the processing steps shown in Figure 1, serve as inputs for the prediction models used in this study. The purpose of utilizing this dataset was to analyze and evaluate prediction models that can forecast and estimate certain outcomes and variables based on the given input factors. Time-series analysis focuses on solar energy usage based on internal and external environmental factors and daily recorded data for smart farming. Figure 2 illustrates the solar energy dataset, where additional features are derived from the time-series variables. These variables include data collected from June 2021 to November 2023. Solar-energy-intensive heating and cooling systems are essential for greenhouse cultivation, as they aim to create the ideal conditions for plant growth during crop growth days. A comparative analysis of solar energy and environmental variables in Figure 2 reveals a significant disparity, with energy usage consistently surpassing greenhouse levels throughout the year. In Figure 2b, inside temperature fluctuations during specific months are depicted, with energy levels exceeding 25 kWh in hotter seasons and dropping as low as 26 °C in summer periods. In July and August, outside temperatures often exceed 30 °C, potentially limiting the growth of certain crops cultivated outside. The temperature pattern in the greenhouse exhibited a strong time-dependent component. From May to September, the internal temperature of the smart farm remained consistently high. As shown in Figure 2f, in July and August, the greenhouse temperature increased early in the morning due to increased outside temperature; therefore, the humidity level increased significantly.
The air conditioning system operates every 20 min to maintain an internal temperature between 26 °C and 30 °C, even when solar energy, as shown in Figure 2a,b, ranges from 5 kWh to 15 kWh. However, despite these temperature control efforts, Figure 2d indicates that the humidity levels remain exceptionally high, peaking at 80–90% throughout South Korea in July and August. Furthermore, Figure 2e reveals that the average wind speeds are higher during the evening and night-time hours, with variations due to changing climate conditions. As shown in Figure 2c, the solar radiation heat power peaks from June to August, exceeding 1600 (W/m2), and the average daily solar radiation heat power during this period is 1000 (W/m2). This difference of 1500 (W/m2) represents approximately 35% of the maximum solar radiation heat power savings in July. Maintaining stable solar energy is crucial for aligning crop growth patterns, as the summer months result in significantly elevated electricity costs. The improper management of intense solar radiation can lead to heat stress and damage to crops. Elevated humidity levels during both the summer and winter months increase the risk of plant disease spread, posing a significant challenge for greenhouse cultivation. This analysis sets the stage for examining solar energy variations and seasonal shifts, as shown in Figure 3.
As shown in Figure 3, the daytime temperatures exhibited remarkable stability during autumn. From September to November, solar energy decreased from 17.5 kWh to 1.5 kWh, whereas Figure 2b shows the inside temperatures dropped from 23 °C to 10 °C. Inside temperatures remained consistently stable during this period, with night-time temperatures in the greenhouse experiencing an approximate 6 °C increase compared to outside temperatures. Moving into winter, specifically from December to January, the greenhouse maintained stable energy usage at 0–17 kWh, as shown in Figure 3. By contrast, outside temperatures on a typical winter day plummeted to −15 °C. Air temperatures fluctuated between 20 °C and −10 °C, yet the greenhouse humidity remained constant, consistently averaging between 40% and 60%. Spring brings about a shift in climate; the outside temperatures influenced by the year 2023 from March to May fluctuated from 0 kWh to 20 kWh. However, in July and August, the energy usage decreased from 0 to 15 kWh. Evenings witness rapid cooling of outside temperatures, reaching freezing levels at night.
By contrast, the greenhouse maintained temperature and humidity stability, averaging between 15 and 20 °C and 40 to 50%, respectively. As depicted in Figure 3, the climate performance exhibited seasonal variations, resulting in distinct solar energy. To evaluate the system’s 24-h performance under varying temperature conditions, hourly outside temperature data from the greenhouse were utilized. Figure 2 and Figure 3 present the projected outcomes, encompassing both inside and outside temperatures, energy differentials, and the corresponding system output across a complete 24-h day cycle for all seasons. The x-axis represents the time within this 24-h cycle.
An analysis of Figure 3 reveals consistent temperature distributions and internal humidity trends over multiple days. The greenhouse temperature began to increase at approximately 6:00 AM, coinciding with sunrise, driven by a significant surge in solar radiation. The peak temperature difference and theoretical output typically occurred around midday, between approximately 2:00 and 3:00 PM, which is attributable to the strong greenhouse effect that intensifies temperatures at the warmer end. This continuous temperature increase continues until midday. As the day progresses, the greenhouse solar energy warmer and cooler areas gradually cool and stabilize during the night.
The correlation matrix outlines the interrelationships among various variables that are likely associated with energy consumption (kWh) and weather information. The symmetric nature of the matrix, with diagonal values consistently set to 1, signifies the perfect correlation of each variable with itself. The correlation coefficients, ranging from −1 to 1, illuminate the magnitude and direction of linear associations between variable pairs. Positive values denote a positive correlation, indicating simultaneous movement in the same direction, whereas negative values indicate a negative correlation, suggesting movement in opposite directions. As can be observed from the heatmap in Figure 4, there are correlations between different weather-related variables and kWh. Moderately, kWh has a positive relationship with F_DATA72 (0.47), while it negatively correlates with F_DATA71 (−0.29) but has weak relationships with other variables such as F_DATA74, F_DATA76, and F_DATA78, ranging from −0.12 to 0.26. Notably, the two of them (F_DATA72 and F_DATA78) show a very strong positive correlation (0.87), which means that they are closely associated with each other. Overall, some weather factors have moderate relationships with electricity usage, while others have little effect as stand-alone characteristics, according to this heatmap.

2.2. TF Keras Linear Model

Linear models have a neural network with just a single Dense layer. A neural network can explain some key terms. The data put in (x) has one feature (multiple nodes or circles labelled), known as the Dense Layer: A single node or rectangle labelled (Dense or Linear), and what we obtain (Y) is a single number (the model’s prediction).
  • The following equation represents the output of a linear model:
Y = W x + b
  • Y is the output or prediction.
  • W is the weight vector or matrix.
  • x is the input vector.
  • b is the biases term.
  • The number of inputs is “n”.
An LM of a neural network with time series data will be learned using TensorFlow Keras to predict future time steps [36]. Figure 5, first, defines a sequential model. Use of a lambda layer inside the model pulls off the last time step from the input tensor. This reduces the input shape from [batch, time, features] to [batch, 1, features]. The next layer applied is a Dense layer whose weights are zeros, transforming the data to a shape [batch, 1, out_steps*features]. It delivers, according to the set prediction horizon, the desired number of output features. Consequently, a Reshape layer configures this output to the form [batch, out_steps, features], making it compatible with those dimensions in the label set. It is a structured methodology that provides the model with the capability to use the most recent data in predicting future values [37,38].

2.3. Convolutional Neural Networks

In CNN’s work on multi-step time-series regression, various approaches have been proposed for utilizing CNNs. The features are fused through multiple layers to facilitate the regression. In CNN’s work on multi-step time-series regression, alternative methodologies have been suggested. These included dividing single and multiple time sequences uniformly for individual feature learning, which achieved good regression performance in experiments [39]. However, this model has a notable limitation in that it cannot reveal correlations between different stochastic time series. To overcome this drawback, the algorithm is as follows: Instead of learning individually, we collectively trained on multiple time series to extract features. The CNN model differs from the multi-step model because it can be used as an input of any length. The convolutional layer was applied using a sliding window for the inputs [40].
The CNN model for multi-step time-series regression is as follows:
Lambda layer: ‘conv_with’ time steps rom input x and shape [batch_size, conv_width, features]
1D Convolutional layer: kernel of size conv_width and 256 filters and shape [batch_size, 1, 256].
Formula = Re L x , W + b ,
W = weight, b = biases
Dense layer: connected layer to reduce the dimensionality to the desired output size, ‘out_step * features’.
Formula = y = Z W d + b d ,
W d   w e i g h t s ,   b d   b i a s e s
Reshape layer: the output into the desired shape [batch_size, label_width, label_feature _number], where y = R e s h a p e y . The CNN model for a multi-step time series is as follows:
Y = R e s h a p e ( D e n s e ( Re L ( Cov 1 D ( X   [ ; ,  - conv _ width   ; ,   ; ] ) ) ) ) .
Figure 6 shows how the CNN class, built on TF Keras API and inheriting from Modeling Class, constructs a CNN model tailored to time-series data [41]. Input features are structured as [batch, time, features], with batch denoting sample size, time representing time steps, and features signifying input characteristics [42]. The model employs a sequential container to organize layers, starting with a lambda layer extracting the last conv_width time steps. A Conv1D layer follows, utilizing 256 filters and ReLU activation, and transforming the input to [batch, 1, conv_units]. Subsequently, a Dense layer reshapes output to [batch, 1, out_steps * features], with out_steps indicating predicted time steps. The initialization of the Dense layer with zeros precedes the Reshape layer, aligning the output to [batch, out_steps, features] for accurate predictions. This architecture implements CNN-based time-series forecasting within TensorFlow and offers a robust method for predicting future values.

2.4. Stacked LSTM

The initial segment delves into RNNs, emphasizing their suitability for managing continuous data in the context of smart farming, particularly concerning solar energy and temperature for plant growth in time-series forecasting [43]. This underscores the temporal dependence of the data, where both past and present data contribute to the RNN structure [44,45]. Figure 7 illustrates the subsequent section and introduces the stacked LSTM model crafted for sequence-to-sequence prediction using TF Keras API. This model, specifically designed for time-series forecasting tasks, organizes input features as [batch, time, features], where batch represents sample size, time signifies time steps, and features denote input characteristics [46]. Implemented within the stacked-LSTM class and inheriting from Modeling Class, the architecture consists of stacked-LSTM layers within a sequential container. The initial LSTM layer, comprising 10 units, captures temporal dependencies by returning sequences [47]. To prevent overfitting, a dropout layer with a 0.2 rate is applied, followed by another LSTM layer with 5 units and another dropout layer. The output is reshaped by a Dense layer into [batch, out_steps * features], with out_steps representing the number of output time steps to be predicted and label_feature_number indicating the features used for prediction. Initialized with zeros, this Dense layer is reshaped by a Reshape layer into [batch, out_steps, features] and aligned with the desired prediction format. This architecture captures temporal dependencies adeptly, enabling accurate predictions of future values based on input time-series data in a rigorous manner, as follows:
Stacked-LSTM: Input Sequence. H is a hidden state: H 1 first LSTM layer (first-time step):
H 1 = L S T M 1 X ,
Shape: [batch_Size, time_steps, 10]
Dropout layer: Dropout 20% of the LSTM output to prevent overfitting.
The   new   version   of   the   hidden   state : H = D r o p o u t ( H 1 , 0.2 ) ,
Second LSTM layer: Further processes the sequence, collapsing the time dimension.
Formula :   H 2 = L S T M 2 H 1 1 shape :   [ batch _ size ,   5 ] ,
Dropout layer: Dropout again to prevent overfitting. Formula: H 2 = D r o p o u t ( H 2 , 02 )
Dense layer: output into the final prediction.
y = H 2 . W d + b d   and   shape   [ batch _ size ,   out _ steps *   features ] ,
Reshape layer: the output into the desired format. Formula: Y = R e s h a p e   Y ,
Stacked-LSTM to multi-step time series is as follows:
Y = R e s h a p e ( D e n s e ( ( Dropout   ( LSTM 2   ( Dropout   ( LSTM 1 ( X ) ) ) ) ) ) )

2.5. Stacked-GRU

The stacked-GRU model is specifically designed for multi-step time-series forecasting, capitalizing on the inherent strengths of the GRU architecture and the strategic stacking of multiple GRU layers. This approach exhibits exceptional performance in capturing long-range dependencies and accurately predicting multiple future time steps [48,49,50]. Extensive experimentation and comparisons with existing methods underscore the superiority of the stacked GRU model in managing time-series data and architecture [51]. A notable feature of the GRU model compared with traditional neural networks is its remarkable ability to retain long-term information while significantly reducing the number of tuning parameters, rendering it a compelling choice for various complex tasks [52].
Figure 8 illustrates the implementation of the stacked-GRU class, inheriting from the Modeling Class, which offers a robust solution using TF Keras API. The GRU models excel in sequence-to-sequence prediction tasks, making them particularly suitable for time-series forecasting. Input features follow a structured format of [batch, time, features], with batch denoting sample size, time representing time steps, and features indicating input characteristics [53]. The model architecture, encapsulated within a sequential container, comprises multiple stacked-GRU layers. Initially, a GRU layer with 10 units efficiently captures temporal dependencies by returning sequences [54]. A dropout layer with a 0.2 rate is then introduced to mitigate overfitting. Another GRU layer with 5 units is added, followed by another dropout layer. A Dense layer reshapes the output into [batch, out_steps * features], where out_steps represents the number of output time steps to be predicted, and label_feature_number signifies the features used for prediction. This Dense layer is initialized with zeros; ultimately, a Reshape layer aligns the output with the desired prediction format, reshaping it into [batch, out_steps, features] [55]. This meticulously crafted architecture empowers the model to capture long-range dependencies and deliver accurate predictions of future values based on input time-series data in a rigorous manner, as follows:
  • Input sequence X with shape [ batch_size, time_steps, features].
  • [batch_size, time_steps, features].
  • The number of units in the first GRU layer is 10.
  • The number of units in the second GRU layer is 5.
  • The dropout rate is 20% (0.2).
  • The output is reshaped into a shape defined by label_width and label_feature_number.
First   GRU   layer :   H 1 = G R U 1 ( X )
Shape: [batch_size, time_steps, 10]
Dropout   after   first   GRU :   H 1 = D r o p o u t H 1 , 02 ,
Second   GRU   layer :   H 2 = G R U 2 H 1 1
Shape: [batch_size, 5],
Dropout   after   Second   GRU : H 2 = D r o p o u t ( H 2 , 02 ) ,
Dense   layer :   y = Z W d + b d ,
Reshape layer: Y = R e s h a p e   Y ,
Stacked-GRU to multi-step time series is as follows:
Y = R e s h a p e ( D e n s e ( ( Dropout   ( GRU 2   ( Dropout   ( GRU 1 ( X ) ) ) ) ) ) )

2.6. Stacked Bidirectional LSTM

The stacked-Bi-LSTM model, designed for sequence-to-sequence prediction, is derived from the Modeling Class within the Tensor Flow’s Keras API [56]. Employing a bidirectional LSTM architecture, this model is constructed using a model-building method. Dropout layers for regularization follow the bi-directional LSTM layers, whereas a Dense layer and Reshape layer are incorporated to streamline the output dimensionality and achieve the desired output format [57]. Parameters like the number of LSTM units, dropout rate, and layer architecture can be customized through class attributes, such as self.map dataset.label_width and self.label_feature_number. The constructed model was used for subsequent training and evaluation. A unique feature of the model is the binomial nature of LSTM layers, which enables it to capture information from past and future time steps [58,59], thus enhancing its understanding of temporal dependencies in the input sequences. The stacked-Bi-LSTM class, inheriting from the Modeling Class, implements a stacked bi-directional LSTM model using TF Keras API [60].
Figure 9 shows, structured as [batch, time, and features], the input features, consisting of batch representing the number of samples, time denoting the time steps, and features indicating input features [61]. In the model architecture, a sequential container houses multiple Bi-directional LSTM layers stacked on top of each other [62]. Configured with 10 units, each Bi-directional LSTM layer returns sequences to comprehensively capture the temporal dependencies. A dropout layer with a 0.2 rate follows each Bi-directional LSTM layer to prevent overfitting and enhance generalization. Finally, a Dense layer reshapes the output into [batch, out_steps * features], where out_steps denotes the number of output time steps to be predicted, and label_feature_number signifies the number of features used for prediction. This Dense layer is initialized with zeros, and a subsequent reshaping layer reshapes the output into [batch, out_steps, feature], aligning it with the desired output format for prediction [63,64].
This architecture equips the model to effectively learn and exploit temporal dependencies in input time-series data, thereby facilitating the accurate prediction of future values rigorously.
Stacked-Bi-LSTM: Input Sequence. Formula: H 1 = B i L S T M 1 ( X ) and Shape: [batch_Size,time_steps,20], 20 comes from 10 units in the forward direction and 10 units in the backward direction.
Dropout layer: Dropout 20% of the BiLSTM output to prevent overfitting. Formula: H = D r o p o u t ( H 1 , 0.2 ) .
Second Bi-LSTM layer: Units: 5 (in each direction, forward and backward), to further processes the sequence, collapsing the time dimension. Formula: H 2 = L S T M 2 H 1 1   and shape: [batch_size, 5].
Dropout layer: Dropout again to prevent overfitting. Formula: H 2 = D r o p o u t ( H 2 , 02 )
Dense layer: output into the final prediction. Formula :   y = H 2 . W d + b d and shape [batch_size, out_steps * features]
Reshape layer: the output into the desired format. Formula: Y = R e s h a p e   Y .
Stacked-Bi-LSTM to multi-step time series is as follows:
Y = R e s h a p e ( D e n s e ( ( Dropout   ( BiLSTM 2   ( Dropout   ( BiLSTM 1 ( X ) ) ) ) ) ) )

2.7. The Tunable Parameters

The proposed model highlights the significance of hyper-parameter tuning in training deep learning models, specifically linear models, CNNs, stacked-LSTM, GRU, and stacked-Bi-LSTM architectures. Hyper-parameters play a crucial role in shaping model performance and generalization capabilities [65]. In this study, we used manual hyper-parameter tuning to improve the performance of a deep learning model. This approach, though time-consuming, allowed us to make informed and precise adjustments to key training parameters. We systematically explored a range of hyper-parameters to optimize model performance. A range of hyper-parameters is systematically explored to enhance the model’s effectiveness. The sampling window (30), configured with a designated value, facilitates data segmentation into defined units, which is particularly relevant for processing time-series data. By setting Addcyclics to False, the model avoids incorporating cyclic features into the input data, preserving the intrinsic data structure. Enabling normalization through the normalize hyper-parameter with a Min-Max Scaler type ensures consistent data scaling. The definitions of the input and output features based on the time steps align with the architectural requirements of the model. Adopting a sequence stride of 1 ensures the generation of sequences with overlapping and consecutive windows, thereby enabling the effective capture of temporal patterns. The training process integrates essential hyper-parameters such as epochs (200), batch size (2**7), learning rate (0.0001), and early stopping patience (10) epochs to prevent stagnation [66,67,68,69,70,71,72,73]. The choice of the MSE as the loss function and the utilization of the MAE, RMSE, and R 2 as the evaluation metrics underscore the commitment of the model to accurate performance assessment. The emphasis on hyper-parameter tuning strategies, as depicted in Table 3, underscores their pivotal role in achieving the best model performance across diverse tasks, highlighting the integral role of hyper-parameter tuning in attaining optimal outcomes.

2.8. Scoring Metrics

Performance measures are particularly important to evaluate the accuracy and efficiency of time-series analyses used in deep learning models; RMSE, MAE, and R 2 are used to predict performance in this model. A prediction error is the estimation of lower RMSE and MAE values. A model with an R-squared value close to 1 suggests a strong fit to the data. This value always falls between 0 and 1 [74,75].
  R M S E = 1 n i = 1 n y i y i ^ 2
M A E = 1 n i = 1 n y i y i ^
R 2 = 1 i = 1 n y i y i ^ 2 i = 1 n y i y ¯ 2
The number of points is n; y i is the actual value, y i ^ is the predicted value. These performance measures use time series with DL models, allowing practitioners to make informed decisions regarding model selection and offering insights into the reliability of predictions [76].

2.9. Computational Requirements

DL algorithms in the Jupyter Notebook (6.4.12) were run using Python code. During training, network convergence was accelerated by using the Adam optimizer. The imported packages support deep learning and training models, TensorFlow and TensorFlow Addons; for handling and preprocessing data, Pandas and NumPy; and for visualizing results, Matplotlib and Seaborn. Scikit-learn was used for evaluating model performance and normalizing data. The following desktop system was used: with Intel(R) Core (TM) i7-6700 CPU @ 3.40 GHz processor, Windows 10 Education, 32 GB RAM and NVIDIA GeForce GTX 1060 3 GB.

3. Results and Discussions

The proposed multi-step time-series forecast models include a simple method created for these data. These models stand out as the only ones capable of forecasting the value of multiple features in a short time step, specifically within an hour, based on current conditions. In this study, utilizing hyper-parameters, the models forecast the solar energy (kWh) value for several days, covering short-, mid-, and long-term periods in the future. The hyper-parameter forecast results of the proposed LM, CNN, stacked-LSTM, stacked-Bi-LSTM, and stacked-GRU were compared with those of DL models utilizing error metrics, and the prediction performances were assessed. The calculated error metrics included RMSE, MAE, and   R 2 . Small error metric values demonstrate higher prediction accuracy. Except for the persistence approach, which only uses data from a previous timestamp as a forecast result, the average computing time for each prediction point was recorded for all the comparison methods. The proposed deep learning mode architecture, with a reasonable processing time, outperformed all other comparative forecasting algorithms on average and in most circumstances. The proposed framework had slightly higher metric values for the greenhouse. According to the prediction outcomes, the DL approaches are more suitable for describing solar energy data.
A Dense layer, utilizing the TF Keras library within the DL framework, is designed to modify the last axis of the input data, which typically consists of batch size, time steps, and features. In this context, the input shape is defined as a window of short-, mid-, and long-term steps, as represented by (128, 24, 6). After passing through the model layers, the output shape is transformed into various hourly step windows: (128, 2, 1), (128, 4, 1), (128, 6, 1), (128, 48, 1), (128, 96, 1), (128, 144, 1), (128, 336, 1), (128, 672, 1), and (128, 1008, 1). This layer is employed individually for each object within the volume and time series. The multi-step model, akin to the three periods provided, is executed over a 48-h (h) timeframe. The CNN model forecasted solar energy usage windows, exhibiting clearer predictions than the energy model most of the time. However, the stacked-LSTM model resembles a stacked-GRU because it incorporates multiple Dense layers between the input and output. Basic, linear, and dense samples are processed independently in each iteration, using several time steps as inputs to generate an output. The models create sets of 48-h inputs and short-, mid-, and long-term labels, employing a DL architecture, as depicted in Figures S1–S3. In addition, the recurrent layer accepts multiple time steps as inputs, facilitating the generation of LSTM windows for practice and evaluation. The stacked-Bi-LSTM serves as a window generator, introducing extra input time steps to align with the label and forecast length, as illustrated in Figures S1–S3. The forecasts in this section were based on the previous three periods. RNNs, particularly LSTM, are a suitable neural network type for time-series analysis. It sequentially processes time-series data and maintains an energy state from one step to the next. By default, the stacked-Bi-LSTM layer provides the final time result, thereby enabling time-based predictions. However, when the ‘return_sequences’ parameter is set to true, the layer outputs each input, which is beneficial when dealing with GRU layers and concurrent training on 144-time steps. This ‘return_sequences’ setting is illustrated in Figures S1–S3, where a time-series model is trained on up to 48 h of data.

3.1. Keras Architectures

The architecture shown in Figures S1–S3 encompasses the layers designed for LM. It initiates with an input layer handling the data shape (none, 48, 6), followed by two lambda layers preserving the input shape. Subsequently, the data were reshaped to (none, 1, 6) before traversing a Dense layer, resulting in (none, 1, 2). Finally, the data were reshaped to (none, 2, 1) to complete the process. The DL model architecture detailed in Figures S1–S3 in the Supplementary Material encompasses various tailored variants for precise sequence-to-label predictions. The model commenced with an input layer of dimensions (none, 48, and 6), representing the batch size, time steps, and features. It traverses a sequence of layers, including lambda, Conv1D, dense, and Reshape layers, with an input sequence length of 48 and a layer configuration of 6. Following this, three subsequent Dense layers are configured for short- to long-term predictions, succeeded by a Reshape layer. These configurations produce output shapes aligned with label compatibility ranging from (none, 2, 1) to (none, 1008, 1). For Figures S1–S3, where the input sequence length is 6, the configurations entail a layer set to 10 units, a Dense layer for short-, mid-, and long-term predictions, and reshaping to 1. These settings apply to both the LSTM and GRU models. Figures S1–S3 incorporate a bi-directional LSTM layer with 20 units, followed by dropout layers for regularization. Another bi-directional LSTM layer further reduces the output to 10 units, followed by additional dropout layers. Finally, a Dense layer with short- to long-term units yields an output shape suitable for accurate predictions within the given label format.

3.2. Short-, Mid-, and Long-Term Predictions

This research used five algorithms (Figures S4–S6) and concentrated on RMSE, MAE, and R-Square. Short-term and long-term hyper-parameter methods showed slower convergence. On the other hand, the algorithm in Figure 10a has better predictive performance with faster convergence rates. Stacked-Bi-LSTM and GRU algorithms are above others in terms of faster results and more precision. Figure 10 is a benchmark that demonstrates the efficiency to which stacked-Bi-LSTM is superior to LM, reducing the risk of local minimum traps while achieving quite high levels of accuracy at all times. Concerning fluctuations in solar energy forecasts, GRU outdoes linear models based on normal kernels, but CNN does so more effectively for optimization and prediction stability. Short term: Figure S4a–c demonstrates training and validation versus epochs implying hyper-parameter tuning, architectural adjustments, and regularization techniques for optimization purposes. One such approach, as illustrated by stacked-Bi-LSTM, is consistently good, although models like LM or CNN may need strategies to reduce bias towards overfitting. Mid-term: Different patterns are depicted by Figure S5a–c, with weaker convergence rates being indicated by algorithms a and b while Figure 10 shows improved convergence for the three time steps. Iteration efficiency improves while accuracy increases through the use of stacked-Bi-LSTM rather than any other methods like LM, LSTM, or GRU.
Long-term: The stacked-Bi-LSTM is shown to have higher predictive energy and more general applicability than LM and CNN models, with the former’s MAE values being larger, while the latter has problems of overfitting. The RMSE profiles in Figure S6a–c are not as good, except for Figure S6c, which shows its faster convergence. Higher R-squared values indicate the best accuracy, but this requires the longest computation time. Optimization methods are important to improve generalization capability and minimize overfitting. From all time steps, Table S1 implies that the most generalized form of stacked-Bi-LSTM has the lowest RMSE values at each step. Despite yielding higher mistakes, this model remains a powerful tool for capturing complex temporal dependencies with fast processing times and attaining competitive accuracy rates. Stacked-LSTM is recognized as a desirable foundation for load forecasting. Table 4 and Figure 11, Figure 12, Figure 13 and Figures S7–S9 exhibit similar trends of performance across hourly time steps, except that stacked-Bi-LSTM provides the smallest MAE values (0.0367, 0.0374, and 0.0431 for training, validation, and testing, respectively) while others like LM, stacked-GRU, and stacked-LSTM, as well as CNN, perform poorly in comparison to it. Yet, regression LM and CNN models were not successful at the first stages because of their complicated network structures, which made their training as well as inference quite lengthy since they had plenty of hidden layers involving dense connections.
For mid-term predictions (2 days), CNN offers the best balance of accuracy and efficiency, boasting a low RMAE of 0.0451, an MAE of 0.1565, and a higher R-Squared of 0.2874, as well as the shortest computation time of 198.26 s. Stacked-BiLSTM offers slightly better accuracy but at a significantly longer computation time of 1650.47 s. For long-term predictions (1 month, 11 days), CNN remains the most efficient, with a low RMAE of 0.0505, an MAE of 0.1736, a higher R-Squared of 0.1973, and the shortest computation time of 375.35 s. Stacked-Bi-LSTM has better accuracy (MAE of 0.2198) but requires more time (125.35 s), while LSTM and LM show lower accuracy and longer computation times.
The proposed model is intended to ease the development of solar-energy-related services such as policies and equilibrium plans on greenhouse solar energy. This will be achieved through forecasting short- to long-term solar energy usage for maintaining an internal greenhouse environment. This study considered multi-step time-series forecasting models, which involved fundamental methodologies as well as advanced TF Keras DL approaches like LM, stacked-LSTM, CNN, stacked-GRU, and stacked-Bi-LSTM. Error-metrics-based evaluation showed that DL models generally gave more accurate predictions, with the best performer being stacked-Bi-LSTM compared to LM, CNN, and GRU. To predict complex patterns and prevent overfitting, this model combined bi-directional LSTM units, which capture both forward and backward temporal dependencies with dropout regularization. Consequently, in greenhouse solar energy, forecasting the stack Bi-LSTM produced very high performance even at different prediction horizons. In smart greenhouses, DL time-series algorithms have exhibited significant potential in improving Short-Term Load Forecasting (STLFs) while they are also adaptable to time-series data. Also, the study developed a periodic coding technique aimed at enhancing the interpretability of the time-series model leading to improved prediction accuracy. For all models, hyper-parameter tuning was vital in achieving optimal performance. The LM model is easy to use, and that makes it a good starting point for evaluating more advanced techniques. The applicability of the stacked-Bi-LSTM model with improved accuracy and reduced computational requirements highlights the significance of high-quality data in reliable results on greenhouse energy optimization. It should be noted that some areas require future work, such as improvement of architecture of models, exploration of hybrid methods, and scalability and adaptability to new datasets and real-world applications.
The optimal timeframe for stable greenhouse temperature control through solar radiation prediction is over the short term, especially over two hours. This timeframe has the highest accuracy (RMSE = 0.0048, R 2 = 0.9243), which makes it suitable for immediate and precise climate control in greenhouses. Solar energy predictions favor spring and summer times more compared to other seasons. These periods offer higher and consistent solar radiation with longer daylight hours, as well as intense sunshine that enable dependable predictions to be made continuously. To obtain maximum efficiency from the use of solar energy in greenhouses, there should be seasonal conditions at their best combined with making short-term forecasts.
One big issue regarding the greenhouse’s internal temperature stability concerns predicting exactly how much solar energy will affect them over different periods, since external atmospheric conditions change often within twelve months. This becomes worse when we talk about variations by season—shorter daytime duration and weaker sunlight during autumn and winter result in higher unpredictability levels than any other time of year. Inaccurate forecasts of solar energy may impede proper crop growth, or low-level energy usage at times of poor climate control in a greenhouse setting may lead to poor yields. Thus, it becomes difficult to balance the need for accurate short-term adjustments with long-term predictions that are uncertain and at the same time accommodate solar availability seasonality. A complex approach is necessary to achieve constant greenhouse temperature under varying solar energy and seasonal changes. Precise real-time climate control can be achieved by using high-accuracy short-term forecasting models, especially with a 2-h prediction window. Seasonal calibration of these models enhances reliability during periods of higher solar predictability, like spring and summer. Also, incorporating hybrid energy systems that combine solar power with supplemental heating or cooling guarantees consistency in less predictable seasons such as autumn and winter. To support consistent inner temperatures and optimize year-round crop growth, real-time monitoring as well as automation systems alongside energy storage solutions should be applied.

4. Conclusions

This study aimed to propose an optimal smart farm solar energy use strategy by analyzing solar energy usage in time steps (short-, mid-, and long-term) considering seasonal external temperature and environmental fluctuations to provide consistent internal greenhouse temperature in line with crop type and growth attributes in smart farms. The proposed model can be used to develop solar-energy-related services, including greenhouse solar energy policies and solar energy balance schemes, as it can predict the cost of solar energy in time steps to maintain constantly optimized temperature for crop growth. Through evaluation of single- and multi-step time-series forecasting models, which include LM, CNN, stacked-LSTM, and stacked-GRU, stacked-Bi-LSTM outperformed others in solar energy usage forecasting in time steps. The stacked-Bi-LSTM architecture consistently demonstrated excellent performance and effectively captured intricate temporal patterns. As a result, the proposed model can be useful for supporting more sophisticated solar energy use predictions depending on the growing season of the user’s crop and effectively planning energy use balance policies in smart farms.
The performance of models is determined by speed and accuracy. In general, CNNs are faster and better for short-term predictions than LSTMs and BiLSTMs, which are suited for long-term forecasting, albeit at slower speeds. GRUs offer an intermediate solution with faster computation, though at times slightly lower accuracy compared to LSTMs. These are the best for balancing forecast horizon, efficiency, and accuracy while choosing the right model for time-series prediction tasks.
Data: The data in this study are related to solar energy and the environment. This indicates how it is related to climate changes and ecological changes without a greenhouse. Deep Learning Models: Using deep learning models to analyze data tells us how to accurately and deeply predict the problem of information. Through this, the data can be subtly understood.
Method: This study utilized deep learning models like stacked-Bi-LSTM for solar energy prediction. Though the stacked-Bi-LSTM model had strong results, this study is called into question because its exploration is partially limited by a dependency on particular models and methodologies. Evaluate the accuracy and efficiency of time-series analyses used in deep learning models, RMSE of 0.0048, MAE of 0.0431, and R 2 of 0.9243 are used to analyze model performance.
Scope: In this study, mainly focused on multi-timeframe forecasting for solar energy as well as the environmental parameters regarding the smart farm data.
Future work needs to overcome these hurdles with the integration of a diverse set of data and enriched model architectures and adopt hybrid module designs while testing the scalability and transferability to real environments.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/en17174322/s1, Figure S1: Short-term TF keras API architecture for DL models. (a) LM, (b) CNN, (c) Stacked Lstm, (d) Stacke GRU, and (e) Stacked-Bi-LSTM; Figure S2: Mid-term TF keras API architecture for DL models. (a) LM, (b) CNN, (c) Stacked Lstm, (d) Stacke GRU, and (e) Stacked-Bi-LSTM; Figure S3: Long-term TF keras API architecture for DL models. (a) LM, (b) CNN, (c) Stacked Lstm, (d) Stacke GRU, and (e) Stacked-Bi-LSTM; Figure S4: Short-term solar energy prediction deep learning models (a) 2 hours prediction (b) 4 hours prediction, (c) 6 hours prediction; Figure S5: Mid-term solar energy prediction deep learning models (a) 2 days prediction (b) 4 days prediction, (c) 6 days prediction; Figure S6: Long-term solar energy prediction deep learning models (a) 2-week prediction (b) 4-week prediction, (c) 1 month 11 days prediction; Figure S7: The Comparative analysis hyper-parameter sets the solar energy forecast results for LM, CNN, LSTM, GRU and Stacked-Bi-LSTM models, a test set covering hours 4 to 6 and utilizing diverse training datasets. (a) Short-term solar energy 4hours prediction and (b) Short-term solar energy 6hours prediction; Figure S8: The Comparative analysis hyper-parameter sets the solar energy forecast results for LM, CNN, LSTM, GRU and Stacked-Bi-LSTM models, a test set covering days 4 to 6 and utilizing diverse training datasets. (a) Medium-term solar energy 4 days prediction and (b) Medium-term solar energy 6 days prediction; Figure S9: The Comparative analysis hyper-parameter sets the solar energy forecast results for LM, CNN, LSTM, GRU and Stacked-Bi-LSTM models, a test set covering weeks 2, 4 and 1 month 11 days utilizing diverse training datasets. (a) Long-term solar energy 4-week prediction and (b) Long-term solar energy 1 month 11 days prediction; Table S1: Comparison among TF Keras Linear Model and deep learning models.

Author Contributions

S.V. performed data preprocessing, formula analysis, methodology, validation, and writing of the original manuscript. Y.C. contributed to the investigation, supervision, and editing of the manuscript, and supervised and endorsed the study. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no funding.

Data Availability Statement

The data presented in this study are available on request from the first and the corresponding author due to privacy.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

LMLinear Model
TF keras APITF keras API Application Programming interface
DLDeep Learning
CNNConvolutional Neural Networks
LSTMLong short-term memory
GRUGated recurrent unit
STLFsShort-Term Load Forecasting
Stacked-Bi-LSTMStacked Bidirectional LSTM
ARLSTMAdaptive Residual Long Short-Term Memory Network
COVIDA convolutional layer that operates on sequential data with one spatial dimension
ReLuRectified linear unit
AIArtificial intelligence
IoTInternet of Things
KWhKilowatt-hour
Hourh
GRUGate Recurrent Unit
°CCelsius
RMSERoot Mean Square Error
MAEMean absolute error.
(IQR)Interquartile range

References

  1. Saleem, R.M.; Bashir, R.N.; Faheem, M.; Haq, M.A.; Alhussen, A.; Alzamil, Z.S.; Khan, S. Internet of things based weekly crop pest prediction by using deep neural network. IEEE Access 2023, 11, 85900–85913. [Google Scholar] [CrossRef]
  2. Saha, S.; Haque, A.; Sidebottom, G. Analyzing the Impact of Outlier Data Points on Multi-Step Internet Traffic Prediction Using Deep Sequence Models. IEEE Trans. Netw. Serv. Manag. 2023, 20, 1345–1362. [Google Scholar] [CrossRef]
  3. Jamei, M.; Ali, M.; Jun, C.; Bateni, S.M.; Karbasi, M.; Farooque, A.A.; Yaseen, Z.M. Multi-step ahead hourly forecasting of air quality indices in Australia: Application of an optimal time-varying decomposition-based ensemble deep learning algorithm. Atmos. Pollut. Res. 2023, 14, 101752. [Google Scholar] [CrossRef]
  4. Tsilingeridis, O.; Moustaka, V.; Vakali, A. Design and development of a forecasting tool for the identification of new target markets by open time-series data and deep learning methods. Appl. Soft Comput. 2023, 132, 109843. [Google Scholar] [CrossRef]
  5. Xing, Z.; He, Y. Multi-modal multi-step wind power forecasting based on stacking deep learning model. Renew. Energy 2023, 215, 118991. [Google Scholar] [CrossRef]
  6. Dinh, T.N.; Thirunavukkarasu, G.S.; Seyedmahmoudian, M.; Mekhilef, S.; Stojcevski, A. Predicting Commercial Building Energy Consumption Using a Multivariate Multilayered Long-Short Term Memory Time-Series Model. Appl. Sci. 2023, 13, 7775. [Google Scholar] [CrossRef]
  7. Zhang, W.; Zhao, X.; Feng, X.; Liu, C.; Xiang, N.; Li, Z.; Lu, W. Predicting the Daily 10.7-cm Solar Radio Flux Using the Long Short-Term Memory Method. Universe 2022, 8, 30. [Google Scholar] [CrossRef]
  8. Stoean, C.; Zivkovic, M.; Bozovic, A.; Bacanin, N.; Strulak-Wójcikiewicz, R.; Antonijevic, M.; Stoean, R. Metaheuristic-Based Hyperparameter Tuning for Recurrent Deep Learning: Application to the Prediction of Solar Energy Generation. Axioms 2023, 12, 266. [Google Scholar] [CrossRef]
  9. Jailani, N.L.M.; Dhanasegaran, J.K.; Alkawsi, G.; Alkahtani, A.A.; Phing, C.C.; Baashar, Y.; Capretz, L.F.; Al-Shetwi, A.Q.; Tiong, S.K. Investigating the Power of LSTM-Based Models in Solar Energy Forecasting. Processes 2023, 11, 1382. [Google Scholar] [CrossRef]
  10. Elizabeth Michael, N.; Mishra, M.; Hasan, S.; Al-Durra, A. Short-Term Solar Power Predicting Model Based on Multi-Step CNN Stacked LSTM Technique. Energies 2022, 15, 2150. [Google Scholar] [CrossRef]
  11. Mora, E.; Cifuentes, J.; Maruland, G. Short-term forecasting of wind solar energy, A comparison of deep learning frameworks. Energies 2021, 4, 7943. [Google Scholar] [CrossRef]
  12. Ajagekar, A.; Mattson, N.S.; You, F. Energy-efficient AI-based Control of Semi-closed Greenhouses Leveraging Robust Optimization in Deep Reinforcement Learning. Adv. Appl. Sol. Energy 2023, 9, 100119. [Google Scholar] [CrossRef]
  13. Yu, W.; Nakisa, B.; Ali, E.; Loke, S.W.; Stevanovic, S.; Guo, Y. Sensor-based inside air temperature prediction using deep ensemble machine learning: An Australian urban environment case study. Urban Clim. 2023, 51, 101599. [Google Scholar] [CrossRef]
  14. Venkatesan, S.; Sathishkumar, V.E.; Park, J.; Shin, C.; Cho, Y. A Prediction of nutrition water for strawberry production using linear regression. Int. J. Adv. Smart Converg. 2020, 9, 132–140. [Google Scholar]
  15. Rehman Saba, T.; Kashif, M.; Fati, S.M.; Bahaj, S.A.; Chaudhry, H. A revisit of internet of things technologies for monitoring and control strategies in smart agriculture. Agronomy 2022, 12, 127. [Google Scholar] [CrossRef]
  16. Elmaz, F.; Eyckerman, R.; Casteels, W.; Latré, S.; Hellinckx, P. CNN-LSTM architecture for predictive inside temperature modeling. Build. Environ. 2021, 206, 108327. [Google Scholar] [CrossRef]
  17. Majeed, Y.; Khan, M.U.; Waseem, M.; Zahid, U.; Mahmood, F.; Majeed, F.; Sultan, M.; Raza, A. Renewable energy as an alternative source for energy management in agriculture. Energy Rep. 2023, 10, 344–359. [Google Scholar] [CrossRef]
  18. Eskandari, H.; Imani, M.; Moghaddam, M.P. Convolutional and recurrent neural network-based model for short-term load forecasting. Electr. Power Syst. Res. 2021, 195, 107173. [Google Scholar] [CrossRef]
  19. Faiq, M.; Tan, K.G.; Liew, C.P.; Hossain, F.; Tso, C.P.; Lim, L.L.; Wong, A.Y.K.; Shah, Z.M. Prediction of energy consumption in campus buildings using long short-term memory. Alex. Eng. J. 2023, 67, 65–76. [Google Scholar] [CrossRef]
  20. Lee, N.; Kim, H.; Jung, J.; Park, K.H.; Linga, P.; Seo, Y. Time series prediction of hydrate dynamics on flow assurance using PCA and Recurrent neural networks with iterative transfer learning. Chem. Eng. Sci. 2022, 263, 118111. [Google Scholar] [CrossRef]
  21. Zhang, W.Y.; Xie, J.F.; Wan, G.C.; Ton, M.S. Single-step and Multi-step Time Series Prediction for Urban Temperature Based on LSTM Model of TensorFlow. In Proceedings of the Photonics & Electromagnetics Research Symposium (PIERS), Hangzhou, China, 21–25 November 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1531–1535. [Google Scholar]
  22. Koesdwiady, A.; El Khatib, A.; Karray, F. Methods to improve multi-step time series prediction. In Proceedings of the IEEE in International Joint Conference on Neural Networks (IJCNN), Rio de Janeiro, Brazil, 8–13 July 2018; pp. 1–8. [Google Scholar]
  23. Manero, J.; Bejar, J.; Cortes, U. “Dust in the wind…”, Deep learning application to wind solar energy time series forecasting. Energies 2019, 12, 2385. [Google Scholar] [CrossRef]
  24. Cantillo-Luna, S.; Moreno-Chuquen, R.; Celeita, D.; Anders, G. Deep and Machine Learning Models to Forecast Photovoltaic Power Generation. Energies 2023, 16, 4097. [Google Scholar] [CrossRef]
  25. Javaid, M.; Haleem, A.; Singh, R.P.; Suman, R. Enhancing smart farming through the applications of Agriculture 4.0 technologies. Int. J. Intell. Netw. 2022, 3, 150–164. [Google Scholar] [CrossRef]
  26. Lee, S.; Lee, Y.S.; Son, Y. Forecasting daily temperatures with different time interval data using deep neural networks. Appl. Sci. 2020, 10, 1609. [Google Scholar] [CrossRef]
  27. Xiao, C.; Chen, N.; Hu, C.; Wang, K.; Xu, Z.; Cai, Y.; Xu, L.; Chen, Z.; Gong, J. A spatiotemporal deep learning model for sea surface temperature field prediction using time-series satellite data. Environ. Model. Softw. 2019, 120, 104502. [Google Scholar] [CrossRef]
  28. Yu, L.; Li, B.; Jiao, B. Research and Implementation of CNN based on Tensor Flow IOP Publishing, IOP Conference Series. Mater. Sci. Eng. 2019, 490, 042022. [Google Scholar]
  29. Rahaman, M.; Lin, C.-Y.; Pappachan, P.; Gupta, B.B.; Hsu, C.-H. Privacy-Centric AI and IoT Solutions for Smart Rural Farm Monitoring and Control. Sensors 2024, 24, 4157. [Google Scholar] [CrossRef] [PubMed]
  30. Terence, S.; Immaculate, J.; Raj, A.; Nadarajan, J. Systematic Review on Internet of Things in Smart Livestock Management Systems. Sustainability 2024, 16, 4073. [Google Scholar] [CrossRef]
  31. Luo, K.; Chen, Y.; Lin, R.; Liang, C.; Zhang, Q. A Portable Agriculture Environmental Sensor with a Photovoltaic Power Supply and Dynamic Active Sleep Scheme. Electronics 2024, 13, 2606. [Google Scholar] [CrossRef]
  32. Fuentes-Peñailillo, F.; Gutter, K.; Vega, R.; Silva, G.C. Transformative Technologies in Digital Agriculture: Leveraging Internet of Things, Remote Sensing, and Artificial Intelligence for Smart Crop Management. J. Sens. Actuator Netw. 2024, 13, 39. [Google Scholar] [CrossRef]
  33. Venkatesan, S.; Lim, J.; Ko, H.; Cho, Y. A machine learning based model for energy usage peak prediction in smart farms. Electronics 2022, 11, 218. [Google Scholar] [CrossRef]
  34. Venkatesan, S.; Sathishkumar, V.E.; Shin, C.; Kim, Y.; Cho, Y. A Forecasting Method Based on ARIMA Model for Best-Fitted Nutrition Water Supplement on Fruits. Int. J. Eng. Adv. Technol. (IJEAT) 2019, 9, 3167–3173. [Google Scholar] [CrossRef]
  35. Venkatesan, S.; Lim, J.; Shin, C.; Cho, Y. A Comparative Study on Machine Learning Models for Paprika Growth Prediction Model with Temperature Changes. J. Korean Inst. Commun. Inf. Sci. 2021, 46, 2393–2402. [Google Scholar] [CrossRef]
  36. Don’t Hesitate Multivariable Liner Regression +nn.Model. Available online: https://smj990203.tistory.com/12 (accessed on 2 March 2021).
  37. Jiao, S.; Gao, Y.; Feng, J.; Lei, T.; Yuan, X. Does deep learning always outperform simple linear regression in optical imaging? Opt. Express 2020, 28, 3717–3731. [Google Scholar] [CrossRef] [PubMed]
  38. Zou, Y.; Gong, X.; Miao, P.; Liu, Y. Using TensorFlow to Establish multivariable linear regression model to Predict Gestational Diabetes. In Proceedings of the IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), Chongqing, China, 12–14 June 2020; Volume 1, pp. 1695–1698. [Google Scholar]
  39. Zhao, B.; Lu, H.; Chen, S.; Liu, J.; Wu, D. Convolutional neural networks for time series classification. J. Syst. Eng. Electron. 2017, 28, 162–169. [Google Scholar] [CrossRef]
  40. Dudukcu, H.V.; Taskiran, M.; Taskiran, Z.G.C.; Yildirim, T. Temporal Convolutional Networks with RNN approach for chaotic time series prediction. Appl. Soft Comput. 2023, 133, 109945. [Google Scholar] [CrossRef]
  41. Rauf, N.A.A.; Zaid, A.M.; Saon, S.; Mahamad, A.K.; Bin Ahmadon, M.A.; Yamaguchi, S. Malaysian Food Recognition and Calories Estimation Using CNN with TensorFlow. In Proceedings of the 2023 IEEE 12th Global Conference on Consumer Electronics (GCCE), Nara, Japan, 10–13 October 2023; pp. 493–497. [Google Scholar]
  42. Chaganti, R.; Ravi, V.; Pham, T.D. A multi-view feature fusion approach for effective malware classification using Deep Learning. J. Inf. Secur. Appl. 2023, 72, 103402. [Google Scholar] [CrossRef]
  43. Kosan, M.A.; Karacan, H.; Urgen, B.A. Predicting personality traits with semantic structures and LSTM-based neural networks. Alex. Eng. J. 2020, 61, 8007–8025. [Google Scholar] [CrossRef]
  44. Farsi, M. Application of ensemble RNN deep neural network to the fall detection through IoT environment. Alex. Eng. J. 2021, 60, 199–211. [Google Scholar] [CrossRef]
  45. Choe, H.O.; Lee, M.-H. Artificial Intelligence-Based Fault Diagnosis and Prediction for Smart Farm Information and Communication Technology Equipment. Agriculture 2023, 13, 2124. [Google Scholar] [CrossRef]
  46. Wen, X.; Li, W. Time Series Prediction Based on LSTM-Attention-LSTM Model. IEEE Access 2023, 11, 48322–48331. [Google Scholar] [CrossRef]
  47. Fouladgar, N.; Främling, K. A novel LSTM for multivariate time series with massive missingness. Sensors 2020, 20, 2832. [Google Scholar] [CrossRef] [PubMed]
  48. Yang, C.L.; Yilma, A.A.; Sutrisno, H.; Woldegiorgis, B.H.; Nguyen, T.P.Q. LSTM-based framework with metaheuristic optimizer for manufacturing process monitoring. Alex. Eng. J. 2023, 83, 43–45. [Google Scholar] [CrossRef]
  49. Han, S.-H.; Mutahira, H.; Jang, H.-S. Prediction of Sensor Data in a Greenhouse for Cultivation of Paprika Plants Using a Stacking Ensemble for Smart Farms. Appl. Sci. 2023, 13, 10464. [Google Scholar] [CrossRef]
  50. Tao, S.; Li, B.; Ren, C.; Mao, B. Grain Temperature Prediction based on Gated Recurrent Unit Deep Fusion Model. Procedia Comput. Sci. 2022, 214, 763–770. [Google Scholar] [CrossRef]
  51. Azizi, N.; Yaghoubirad, M.; Farajollahi, M.; Ahmadi, A. Deep learning based long-term global solar irradiance and temperature forecasting using time series with multi-step multivariate output. Renew. Sol. Energy 2023, 206, 135–147. [Google Scholar] [CrossRef]
  52. Xie, H.; Zhang, L.; Lim, C.P. Evolving CNN-LSTM models for time series prediction using enhanced grey wolf optimizer. IEEE Access. 2020, 8, 161519–161541. [Google Scholar] [CrossRef]
  53. Zhang, Y.; Wu, R.; Dascalu, S.M.; Harris, F.C., Jr. A novel extreme adaptive GRU for multivariate time series forecasting. Sci. Rep. 2024, 14, 2991. [Google Scholar] [CrossRef] [PubMed]
  54. Ahmad, W.; Khan, H.U.; Iqbal, T.; Iqbal, S. Attention-Based Multi-Channel Gated Recurrent Neural Networks: A Novel Feature-Centric Approach for Aspect-Based Sentiment Classification. IEEE Access 2023, 11, 54408–54427. [Google Scholar] [CrossRef]
  55. Park, K.; Seong, Y.; Jung, Y.; Youn, I.; Choi, C.K. Development of water level prediction improvement method using multivariate time series data by GRU model. Water 2023, 15, 587. [Google Scholar] [CrossRef]
  56. Chahal, A.; Gulia, P.; Gill, N.S.; Priyadarshini, I. A Hybrid Univariate Traffic Congestion Prediction Model for IoT-Enabled Smart City. Information 2023, 14, 268. [Google Scholar] [CrossRef]
  57. Abu-Salih, B.; Alweshah, M.; Alazab, M.; Al-Okaily, M.; Alahmari, M.; Al-Habashneh, M.; Al-Sharaeh, S. Natural language inference model for customer advocacy detection in online customer engagement. Mach. Learn. 2023, 113, 1–27. [Google Scholar] [CrossRef]
  58. Eleftheriadis, P.; Leva, S.; Ogliari, E. Bayesian hyperparameter optimization of stacked bidirectional long short-term memory neural network for the state of charge estimation. Sustainable Energy. Grids Netw. 2023, 36, 101160. [Google Scholar]
  59. Rayan, A.; Alaerjan, A.S. An Improved Crow Search Optimization with Bi-LSTM Model for Identification and Classification of COVID-19 Infection from Chest X-Ray Images. Alex. Eng. J. 2023, 76, 787–798. [Google Scholar] [CrossRef]
  60. Ardeshiri, R.R.; Liu, M.; Ma, C. Multivariate stacked bidirectional long short term memory for lithium-ion battery health management. Reliab. Eng. Syst. Saf. 2022, 224, 108481. [Google Scholar] [CrossRef]
  61. Marapelli, B.; Carie, A.; Islam, S.M.N. RNN-CNN MODEL:A Bi-directional Long Short-Term Memory Deep Learning Network For Story Point Estimation. In Proceedings of the 5th International Conference on Innovative Technologies in Intelligent Systems and Industrial Applications (CITISIA), Sydney, Australia, 25–27 November 2020; pp. 1–7. [Google Scholar]
  62. Sutarna, N.; Tjahyadi, C.; Oktivasari, P.; Dwiyaniti, M.; Tohazen, T. Hyperparameter Tuning Impact on Deep Learning Bi-LSTM for Photovoltaic Power Forecasting. J. Robot. Control (JRC) 2024, 5, 677–693. [Google Scholar]
  63. Morales-García, J.b; Terroso-Sáenz, F.; Cecilia, J.M. A multi-model deep learning approach to address prediction imbalances in smart greenhouses. Comput. Electron. Agric. 2024, 216, 108537. [Google Scholar] [CrossRef]
  64. Song, J.; Peng, X.; Song, J.; Yang, Z.; Wang, B.; Che, J. MTTLA-DLW: Multi-task TCN-Bi-LSTM transfer learning approach with dynamic loss weights based on feature correlations of the training samples for short-term wind power prediction. Wind Energy 2024, 27, 733–744. [Google Scholar] [CrossRef]
  65. Sagheer, M. Kotb. Time series forecasting of petroleum production using deep LSTM recurrent networks. Neurocomputing 2019, 323, 203–213. [Google Scholar] [CrossRef]
  66. Uddin, M.J.; Li, Y.; Sattar, M.A.; Nasrin, Z.M.; Lu, C. Effects of learning rates and optimization algorithms on forecasting accuracy of hourly typhoon rainfall: Experiments with convolutional neural network. Earth Space Sci. 2022, 9, e2021EA002168. [Google Scholar] [CrossRef]
  67. Sibel Kervanci, I.; Akay, F. LSTM Hyperparameters optimization with Hparam parameters for Bitcoin Price Prediction. Sak. Univ. J. Comput. Inf. Sci. 2023, 6, 1–9. [Google Scholar] [CrossRef]
  68. Cheng, G.; Wang, X.; He, Y. Remaining useful life and state of health prediction for lithium batteries based on empirical mode decomposition and a long and short memory neural network. Sol. Energy 2021, 232, 121022. [Google Scholar] [CrossRef]
  69. Alibabaei, K.; Gaspar, P.D.; Lima, T.M. Crop yield estimation using deep learning based on climate big data and irrigation scheduling. Energies 2021, 14, 3004. [Google Scholar] [CrossRef]
  70. Hernandez Rodriguez, M.; Baca Ruiz, L.G.; Criado Ramon, D.; Pegalajar Jimenez, M.D.C. Artificial Intelligence-Based Prediction of Spanish Solar energy Pricing and Its Impact on Electric Consumption. Mach. Learn. Knowl. Extr. 2023, 5, 431–447. [Google Scholar] [CrossRef]
  71. Wakamori, K.; Mizuno, R.; Nakanishiand, G.; Mineno, H. Multimodal neural network with clustering-based drop for estimating plant water stress. Comput. Electron. Agric. 2020, 168, 105118. [Google Scholar] [CrossRef]
  72. Chowdhury, S.; Abdulrazak, L.F.; Mitu, S.A.; Ahmed, K.; Bui, F.M.; Smirani, L.K.; Chen, L. A highly sensitive multi-channel SPR-PCF based biosensor with deep learning prediction approach. Alex. Eng. J. 2023, 77, 189–203. [Google Scholar] [CrossRef]
  73. Sadon, A.N.; Ismail, S.; Jafri, N.S.; Shaharudin, S.M. Long Short-Term vs Gated Recurrent Unit Recurrent Neural Network For Google Stock Price Prediction. In Proceedings of the 2nd International Conference on Artificial Intelligence and Data Sciences (AiDAS), IPOH, Malaysia, 8–9 September 2021; pp. 1–5. [Google Scholar]
  74. Niu, Z.; Yang, H.; Zhou, L.; Taha, M.F.; He, Y.; Qiu, Z. Deep learning-based ranging error mitigation method for UWB localization system in greenhouse. Comput. Electron. Agric. 2023, 205, 107573. [Google Scholar] [CrossRef]
  75. Rahman, A.S.; Lee, M.; Venkatesan, S.; Lim, J.; Shin, C. A comparative study between linear regression and support vector regression model based on environmental factors of a smart bee farm. Korean Inst. Smart Media 2022, 11, 38–47. [Google Scholar] [CrossRef]
  76. Thipwangmek, N.; Suetrong, N.; Taparugssanagorn, A.; Tangparitkul, S.; Promsuk, N. Enhancing Short-Term Solar Photovoltaic Power Forecasting Using a Hybrid Deep Learning Approach. IEEE Access 2024, 12, 108928–108941. [Google Scholar] [CrossRef]
Figure 1. Greenhouse structure and key components.
Figure 1. Greenhouse structure and key components.
Energies 17 04322 g001
Figure 2. Average solar energy and environmental data for June 2021 to November 2023.
Figure 2. Average solar energy and environmental data for June 2021 to November 2023.
Energies 17 04322 g002
Figure 3. Seasonally average solar energy by hour of the day from June 2021 to Nov 2023 in the greenhouse.
Figure 3. Seasonally average solar energy by hour of the day from June 2021 to Nov 2023 in the greenhouse.
Energies 17 04322 g003
Figure 4. The correlation between solar energy and greenhouse variables.
Figure 4. The correlation between solar energy and greenhouse variables.
Energies 17 04322 g004
Figure 5. The architecture of LM for multivariate time-series analysis.
Figure 5. The architecture of LM for multivariate time-series analysis.
Energies 17 04322 g005
Figure 6. The architecture of a CNN model for multivariate time-series analysis.
Figure 6. The architecture of a CNN model for multivariate time-series analysis.
Energies 17 04322 g006
Figure 7. The architecture of a stacked-LSTM model for multivariate time-series analysis.
Figure 7. The architecture of a stacked-LSTM model for multivariate time-series analysis.
Energies 17 04322 g007
Figure 8. The architecture of a stacked-GRU model for multivariate time-series analysis.
Figure 8. The architecture of a stacked-GRU model for multivariate time-series analysis.
Energies 17 04322 g008
Figure 9. Stacked-Bi-LSTM model for multivariate time-series analysis.
Figure 9. Stacked-Bi-LSTM model for multivariate time-series analysis.
Energies 17 04322 g009
Figure 10. Solar energy prediction RMSE, MSE, and R-Square error sources in deep learning models: (a) Short-term, (b) Mid-term, and (c) Long-term.
Figure 10. Solar energy prediction RMSE, MSE, and R-Square error sources in deep learning models: (a) Short-term, (b) Mid-term, and (c) Long-term.
Energies 17 04322 g010
Figure 11. Comparative analysis of the solar energy forecast results for LM, CNN, LSTM, GRU, and stacked-Bi-LSTM models, a test set covering 2 h and utilizing diverse training datasets.
Figure 11. Comparative analysis of the solar energy forecast results for LM, CNN, LSTM, GRU, and stacked-Bi-LSTM models, a test set covering 2 h and utilizing diverse training datasets.
Energies 17 04322 g011
Figure 12. Comparative analysis of the solar energy forecast results for LM, CNN, LSTM, GRU, and stacked-Bi-LSTM models, a test set covering 2 days and utilizing diverse training datasets.
Figure 12. Comparative analysis of the solar energy forecast results for LM, CNN, LSTM, GRU, and stacked-Bi-LSTM models, a test set covering 2 days and utilizing diverse training datasets.
Energies 17 04322 g012
Figure 13. Comparative analysis of the solar energy forecast results for LM, CNN, LSTM, GRU, and stacked-Bi-LSTM models, a test set covering 2 weeks utilizing diverse training datasets.
Figure 13. Comparative analysis of the solar energy forecast results for LM, CNN, LSTM, GRU, and stacked-Bi-LSTM models, a test set covering 2 weeks utilizing diverse training datasets.
Energies 17 04322 g013
Table 1. Data material and description.
Table 1. Data material and description.
Data VariablesDescription
kWhSolar energy measured in kilowatt-hours (kWh)
F_DATA71Inside humidity measured as a percentage (%)
F_DATA72Inside temperature measured in degrees Celsius (°C)
F_DATA74Outside wind speed measured in meters per second (m/s)
F_DATA76Solar radiation measured in watts per square meter (W/m2)
F_DATA78Outside temperature measured in degrees Celsius (°C)
Table 2. Descriptive Statistics.
Table 2. Descriptive Statistics.
VariablesCountMeanMedianStdIQR
kWh124,141.06.2791542.107.85958111.50
F_DATA71124,141.070.22785970.6917.25899726.20
F_DATA72124,141.022.75693322.334.8354458.03
F_DATA74124,141.010.5701308.6010.11880614.40
F_DATA76124,141.01087.5307961037.00781.2687871161.91
F_DATA78124,141.015.93966415.9310.01767416.32
Table 3. Hyper-parameter Tuning Setting Values.
Table 3. Hyper-parameter Tuning Setting Values.
Hyper-ParameterParameter Setting
Sampling window30
AddcyclicsFalse
NormalizeTrue
Normalize typeMin-Max-Scaler
Number of inputs48 h previous time
Number of outputsShort-term (2 h, 4 h, 6 h), Mid-term (2 days, 4 days, 6 days), and Long-term (2 weeks, 4 weeks, 1-month 11 days)
Sequence stride1
Epochs200
Batch Size2**7
Learning Rate0.0001
Patience10
MetricsRMSE, MAE and R 2
Sampling window30
Table 4. Stacked-Bi-LSTM model prediction for various times.
Table 4. Stacked-Bi-LSTM model prediction for various times.
Best ModelVarious TimeRMSEMAE R 2 Sec
Stacked-Bi-LSTMShort-term-2 h0.00480.04310.92431022.61 s
Short-term-4 h0.00600.04550.90611443.28 s
Short-term-6 h0.00870.06030.86381223.62 s
Mid-term-2 days0.02570.11030.59801650.47 s
Mid-term-4 days0.03040.12600.52043297.33 s
Mid-term-6 days0.03270.13360.48481969.86 s
Long-term-2 week0.03820.14900.39741632.59 s
Long-term-4 week0.03930.15410.37171647.71 s
Long-term-1 month, 11-days0.06380.2198−0.0111125.35 s
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

Venkatesan, S.; Cho, Y. Multi-Timeframe Forecasting Using Deep Learning Models for Solar Energy Efficiency in Smart Agriculture. Energies 2024, 17, 4322. https://doi.org/10.3390/en17174322

AMA Style

Venkatesan S, Cho Y. Multi-Timeframe Forecasting Using Deep Learning Models for Solar Energy Efficiency in Smart Agriculture. Energies. 2024; 17(17):4322. https://doi.org/10.3390/en17174322

Chicago/Turabian Style

Venkatesan, Saravanakumar, and Yongyun Cho. 2024. "Multi-Timeframe Forecasting Using Deep Learning Models for Solar Energy Efficiency in Smart Agriculture" Energies 17, no. 17: 4322. https://doi.org/10.3390/en17174322

APA Style

Venkatesan, S., & Cho, Y. (2024). Multi-Timeframe Forecasting Using Deep Learning Models for Solar Energy Efficiency in Smart Agriculture. Energies, 17(17), 4322. https://doi.org/10.3390/en17174322

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop