To increase the accuracy as well as effectiveness of predicting the level of CO2 in mushroom cultivating greenhouses, two optimized prediction models of long and short term memory neural networks (VMD-SSA-LSTM and VMD-DBO-LSTM) are proposed.
To start with, time series data on greenhouse CO2 concentrations were decomposed to get intrinsic mode function (IMF) at various time scales. The sparrow search algorithm (SSA) or dung beetle optimization Algorithm (DBO) is then used to optimize the amount of hidden layer neurons, discover the best learning rate, find the optimal iteration times, and improve prediction accuracy. Finally, the SSA or DBO optimized LSTM network is applied to represent the dynamic time of the multi-variable feature series, resulting in CO2 concentration predictions. The model for forecasting presented in this research was used to forecast CO2 concentrations in an experimental greenhouse at Yunnan Normal University. A comparison experiment between the LSTM, EMD-LSTM and VMD-LSTM models is carried out, indicating that the VMD-SSA-LSTM and VMD-DBO-LSTM models outperform the others in terms of prediction accuracy, while VMD-DBO-LSTM model is faster in calculation. The results were compared to actual data, revealing mean absolute errors, mean absolute percentage errors, root-mean-square errors and R2 of the model optimized by SSA are 2.3488 ppm, 0.4593%, and 2.9958 ppm on sunny days, and 6.6212 ppm, 1.1721%, and 8.2909 ppm on cloudy days, respectively.
The results of the model optimized by DBO are 2.6365 ppm, 0.5140%, 3.3014 ppm and 0.9919 on sunny days, and 5.1328 ppm, 0.8990%, 6.8016 ppm and 0.9942 on cloudy days, respectively.
Yao, H., Wang, Y., Ma, X. et al. Prediction of CO2 concentration in mushroom greenhouse via optimized long and short term memory algorithm. Sci Rep 15, 33726 (2025). https://doi.org/10.1038/s41598-025-86394-0
Source: Nature Magazine