Introduction

A lot of research has been done about the amount of CO2 emitted from soil to the atmosphere in agricultural production. In all of these studies, the parameters affecting the CO2 level were determined. The effects of factors such as organic matter content (Yu et al. 2020), microbial activity (Pramanik and Phukan 2020), soil tillage system (Luesma et al. 2020), fertilization amount and organic or inorganic nature of the fertilizer used (Rahman et al. 2020), soil moisture content (Zhang et al. 2020), soil temperature (Gao et al. 2020), aggregation condition of the soil (Dong et al. 2020), were examined on the amount of CO2 emitted into the atmosphere.

Most of the research that modeling the amount of CO2 emitted from the soil to the atmosphere has been done under field conditions. The number of studies conducted on modeling the amount of CO2 emitted from the soil to the atmosphere in greenhouses is quite limited. In addition, in most of these studies, rather than CO2, the concentration of other pollutant gases such as CH4, NO2 and NOx released from the soil into the atmosphere was taken into account. Altıkat et al. (2019) stated that CO2 dispersion increased in parallel with the increase in temperature and humidity content in their researches in which they examined the effects of soil type and soil temperature and humidity content on the amount of CO2 emitted from the soil to the atmosphere. Also, it has been determined that CO2 emission in normal soils is higher than saline soils. In the research, it was concluded that the manure wrapped on the soil surface causes more CO2 emission than the manure left on the lower layers of the soil, and CO2 emission increases due to the increase in the fertilizer norm.

ANN is an effective method to be used in the interpretation of parameters that do not have a linear relationship. ANN has been used in the modeling of atmospheric greenhouse gas concentrations, global warming, and other ecological issues frequently. Numerous studies have been conducted to model air quality and greenhouse gas emissions such as; the ANN was used the traffic and concentrations of pollutants (Viotti et al. 2002), dispersion of NO2 (Nagendra and Khare 2006), modeling of the surface ozone concentration (Barcenas et al. 2005), net ecosystem exchange (He et al. 2006), CO2 flux (Melesse and Hanley 2005). Also, ANN was used modeling forest ecosystems, vegetation, and soil change projections by researchers. Wang and Guan (2007) were used ANN for estimating forest biomass-based upon remote sensing, and Ito et al. (2008) predicted soil NNP using an ANN model.

Greenhouses are systems designed for production outside the natural growing seasons of plants, where the temperature, humidity, and ventilation needs are met by using various control systems (Choab et al. 2019). In recent years, changes in climates as a result of global warming have been attracting the attention of both governments and scientists, and there has been a significant increase in the number of researches conducted in this area (Liu et al. 2010). The increase of greenhouse gases such as CH4, NO2, and CO2 in the atmosphere is one of the most important factors causing the increase of global warming (Pratibha et al. 2016). The adoption of technology-based production after the industrial revolution resulted in an increase of 700 µmol mol−1 of CO2 in the atmosphere each year, and this situation caused in a 38% increase in atmospheric CO2 compared to the pre-industrial period, and the temperature increased 0.6 °C over the past 100 years. (Lei et al. 2007). Over the years, they have been done a lot of research to observe these changes in climate. Besides, the various modeling techniques have been used to air quality interpret, model and predict of air quality (Choi et al. 2013; Garcia Nieto and Alvarez Anton 2014; Ishida et al. 2020; Lv et al. 2019; Schmidt et al. 2018; Zhang et al. 2019). However, most of the models did not produce positive results because the greenhouse gases in the atmosphere have been varying due to many factors, and there has been nonlinear relationship between them. Jung et al. (2020) modeled the temperature change with an accuracy rate of 96%, humidity change of 80%, and CO2 change of 81% in their studies using the time series analysis method of deep neural networks to model the climate conditions within the greenhouse.

The purpose of this research is to model the amount of CO2 emitted from the soil to the atmosphere in agricultural production under greenhouse conditions with artificial neural networks and deep artificial neural networks and to determine the effect levels by conducting sensitivity analysis of the parameters affecting CO2 emission. Besides, the effectiveness of deep neural networks and artificial neural networks methods will be investigated in modeling studies.

Materials and methods

Experiment area

The experiments were carried out in greenhouses in the Agricultural Application and Research Center of Iğdır University. As experiment material, tomato, pepper, and cucumber plants were used, and seedlings were planted in April 2019. The drip irrigation method was used to distribute soil moisture homogeneously. In this method, drip irrigation pipes are placed in the root area of the plants. The plan of the experiment is given in Fig. 1.

Fig. 1
figure 1

Design of the experiment

To determine the level of CO2 emitted from the soil to the atmosphere, the ACE brand CO2 measuring device, which can measure according to the closed-loop method, was used (Fig. 2). The device runs on a 13 V battery and has sensors that can measure the changes in temperature and humidity under the ground. There is also a photosynthetically active radiation (PAR) sensor on the device. During the time from the start of the experiment to the conclusion, temperature, humidity, and PAR measurements CO2 measurements were made simultaneously, and data on the device were recorded in the logger.

Fig. 2
figure 2

CO2 and O2 measurement instrument

In the research, an undersoil oxygen measuring device was used to determine the change in soil oxygen capacity. The device consists of an oxygen sensor, battery, and data logger (Fig. 2). CO2 and O2 devices were placed between the rows of plants, and measurements were taken between 10:00 and 12:00 during the period until harvest. Oxygen measurements were made simultaneously with CO2 measurements.

In this research, 426 data (6 parameters × 71 observation) were used for CO2 flux prediction model. Soil temperature and moisture, photosynthetic active radiation, CO2 and O2 measurements were recorded at 30-min intervals with soil CO2 exchange system and ICT oxygen measurement instrument.

Multiple Linear Regression (MLR), artificial neural networks (ANN) and deep learning neural networks (DLNN) methods were used to estimate the amount of CO2 flux from the soil to the atmosphere. In the models, soil temperature, soil moisture, PAR, plant type, and O2 level in soil were considered as input parameters; while CO2 emitted from the soil to the atmosphere is considered as the output parameter.

The modeling with multiple linear regression

The MLR method was given in Eq. 1. In the equation, Y is model’s predicted value, X is contaminant concentration, ai, i:0…n, is coefficient of regression.

$$ Y = a_{0} + a_{1} x_{1} + a_{2} x_{2} + \cdots + a_{n} x_{n} $$
(1)

Artificial neural network (ANN) and deep learning neural network (DLNN)

In the ANN model, Levenberg–Marquardt was used as a learning function, and Linear functions were used as transfer functions. To determine the number of neurons in the ANN model, ANN network architecture has been tried in different neuron numbers, and the number of neurons that gave the minimum error was determined. As a result of the trials, it was decided to use ANN network architecture with neuron number of 8. ANN network architecture used in the research is given in Fig. 3.

Fig. 3
figure 3

ANN architecture

Two hidden layers were used in the method of deep artificial neural networks. Levenberg–Marquardt was used as a learning function and Logarithmic-Symmetric sigmoid functions were used as transfer functions. To determine the number of neurons in the layers, the network was tested in different numbers of neurons, and models were made with the number of neurons that give the lowest MAE value (Table 1). Accordingly, in the DLNN method, the number of neurons in the 1st and 2nd layers was determined as 14 and 10, respectively. The architecture of the network used in the DLNN method is given in Fig. 4.

Table 1 MAE changes with different neuron numbers in DLNNs
Fig. 4
figure 4

DLNN architecture

In the research, 70% of the data were used as the training set, 15% as the test set, and 15% as the verification set in both ANN and DLNN methods. The learning ability of the networks was decided by looking at the R values at the end of the training and verification of the network performances. As a result of the training of networks, it is concluded that the training and verification set is trained if the R values of the networks are close to 1. The MATLAB software was used in DLNN structures (R2019a). The MATLAB program is the most used software for modeling atmospheric pollution levels (Hagan et al. 1996).

Sensitivity analyses

In both methods, sensitivity analyses were performed on the models to determine the effect levels of input values on the CO2 rate emitted from soil to the atmosphere (Aleboyeh et al. 2008). The following equality is used in determining the sensitivity tests (Eq. 2).

$$ I_{j} = \frac{{\mathop \sum \nolimits_{m = 1}^{Nh} \left( {\left( {\left| {W_{jm}^{ih} } \right|/\mathop \sum \nolimits_{k = 1}^{Ni} \left| {W_{km}^{ih} } \right|} \right) \times \left| {W_{mn}^{ho} } \right|} \right)}}{{\mathop \sum \nolimits_{k = 1}^{Ni} \left\{ {\mathop \sum \nolimits_{m = 1}^{Nh} \left( {\left| {W_{km}^{ih} } \right|/\mathop \sum \nolimits_{k = 1}^{Ni} \left| {W_{km}^{ih} } \right|} \right) \times \left| {W_{mn}^{ho} } \right|} \right\}}} $$
(2)

In the equation, Ij is the percentage of the relative importance of the jth input variable on the neurons, and Wih and Who are the matrices of weights between input-hidden layer and hidden-output layer, respectively, N is the total number of neurons in the corresponding layer, respectively, and subscripts ‘k’, ‘m’ and ‘n’ are indices referring to the neurons in input, hidden and output layers, respectively.

Determining efficiency levels of the models

R2 and MAE values were used to determine the accuracy of the models in both models (Eqs. 3, 4). The fact that R2 value is close to 1 and MAE value to zero is accepted as an indicator that the model is correct.

$$ R^{2} = 1 - \left( {\frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {Y_{pi} - Y_{di} } \right)^{2} }}{{\mathop \sum \nolimits_{i = 1}^{n} \left( {Y_{di} - \bar{Y}} \right)^{2} }}} \right) $$
(3)
$$ {\text{MAE}} = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \left| {Y_{pi} - Y_{di} } \right| $$
(4)

In these equations; where, n is the number of observations, Ypi is the predicted value for observation i, Ydi is the real value from observation i, and \( \bar{Y} \) is the average of the real value.

Results and discussion

Result of multiple linear regression

In the research firstly, multiple linear regression models were used to estimate the CO2 flux. For this purpose, plant type (Pt), photosynthetically active radiation (PAR), soil temperature (St), soil moisture content (Sm), and soil O2 content (O2) were used as input parameters for prediction of CO2 flux. Table 2 illustrates the statistical results of the MLR. Examining Table 2, it can be seen that R2 and P values are 0.9563 and 0.0000, respectively. The equation of the MLR model was given in Eq. 5. In addition, regression analyses of the MLR model and predicted—measurement values were given in Fig. 5a and b, respectively.

$$ {\text{CO}}_{2} \,{\text{flux}} = 20.77 + 0.482x_{1} + 0.00195 x_{2} - 0.2373x_{3} - 0.27904x_{4} - 0.6662x_{5} $$
(5)

In this equation; x1: Pt, x2: PAR, x3: St, x4: Sm, x5: O2.

Table 2 The statistical results for MLR analysis
Fig. 5
figure 5

Regression analyses of the models (a) and measurement-predicted CO2 values (b)

The results of artificial neural network (ANN) and deep learning neural network (DLNN)

In the research, statistical analyses of CO2 models with artificial neural networks and deep artificial neural networks are given in Table 3. As can be seen from Table 2, the deep neural network model has lower MAE and higher R2 value than the artificial neural network model. In the DLNN method, CO2 fluxed from the soil to the atmosphere is modeled at an accuracy level of 98.29%, while this value is 95.56% in the artificial neural network model.

Table 3 Results of statistical analyses of ANN and DLNN

Network performances of the models are given in Fig. 6. When Fig. 6 is examined, it is seen that the R values of the training and verification process are above 0.95 in both models. According to these values, it can be concluded that both models do not memorize and the network structures created in both models are learned. In the research, the CO2 emissions estimated and observed with the regression coefficients of both models are given in Fig. 7.

Fig. 6
figure 6

Training (a) and test results (b) of the models

Fig. 7
figure 7

Regression analyses of the models (a) and observed-predicted CO2 values (b)

Results of sensitivity analyses

The results of sensitivity analysis were given in Table 4, and also Fig. 8 illustrates relative importance values for ANN and DLNN. In both models, it was determined that the most effective parameter on the amount of CO2 emitted from the soil to the atmosphere is photosynthetically active radiation. The effect of photosynthetically active radiation on CO2 emission was determined as 23.7% in the ANN method and 26.4% in the DLNN method.

Table 4 The weights for DLNN and ANN
Fig. 8
figure 8

Sensitivity analyses of the models

In the research, CO2 emitted from the soil to the atmosphere was modeled at a high accuracy level in both models. However, the accuracy rate in models created with deep neural networks was determined to be higher than artificial neural networks. The most important reasons for this are the number of hidden layers and the neurons used in deep artificial neural networks compared to artificial neural networks. In many studies, it has been emphasized that models using deep artificial neural networks have higher accuracy rates compared to other models.

Many studies are indicating that photosynthetically active radiation is effective in the amount of CO2 emitted from the soil to the atmosphere. Vaczi (2019) and Altikat et al. (2018) stated in their studies that there is a directly proportional relationship between CO2 emission and PAR. In studies to examine the relationship between soil temperature and CO2 emitted into the atmosphere, it is emphasized that there is an increase in the rate of CO2 emitted from the soil to the atmosphere depending on the temperature increase (Matthews et al. 2009; Eby et al. 2009). In hot environments such as greenhouses, the amount of CO2 emitted from the soil to the atmosphere is more precisely affected by soil temperature (Wang et al. 2008) and soil moisture content (Sainju et al. 2010) than other factors.

Conclusion

In the study, soil temperature and humidity, soil oxygen capacity, photosynthetically active radiation, and plant type variables were used as input values in modeling the CO2 level emitted from the soil to the atmosphere, and relative importance levels of these variables for CO2 emission were determined in both models. Sensitivity analysis results showed a similar trend in both models. In the study, it was determined that the effect of photosynthetically active radiation level on CO2 emission is proportionally higher than other variables. Photosynthetically active radiation is a variable that directly affects both soil temperature and soil moisture content. Subsoil moisture and temperature changes directly affect the microbial activities and by helping the organic matter decay rapidly in the soil, it helps to increase the micro and macro organism capacity of the soil and to transform the nutrients into the formation that plant roots can take. As a result, it can be said that the amount of CO2 emitted from the soil to the atmosphere can be modeled at high accuracy in vegetative production under greenhouse conditions, and it will be more effective to use deep artificial neural networks in such studies.