Abstract
Abstract
In this study, two influential parameters were selected, pH and composting temperature, to monitor the composting process, and thus a pH prediction model and composting-temperature prediction model were constructed. We used artificial neural network-based multilayer perceptron (ANN-based MLP) to develop two prediction models. To compare the efficiency achieved using ANNs, traditional multiple-linear regression (MLR) was selected as a benchmark. Subsequently, we presented a composting flowchart to simulate real-time composting processes. Test data were collected from 13 experiments that were conducted in an open-air facility. We measured eight attributes: days being composted, pH, composting temperature, moisture content, food waste, mature compost, sawdust, and soil. Comparison of performance of 1- with 3-day-ahead prediction models revealed that the 1-day-ahead forecasts yielded superior values in terms of relative mean absolute error, relative root mean squared error, coefficient of correlation, and coefficient of efficiency than did the 2- and 3-day-ahead forecasts in both the ANN and MLR models. In predicting the maturity of food wastes, absolute time errors of degree of degradation were 0.67 and 1.22 days, respectively, when ANN and MLR models were used in 1-day-ahead prediction, which demonstrates that prediction was more accurate using ANN than using MLR. Thus, ANN-based prediction models can be regarded as being reliable, and proposed composting real-time forecast models can be effectively used in monitoring composting processes.
Introduction
C
In Taiwan, the government successfully launched a national-wide household food wastes recycling program in 2006, and more than 2,500 metric tons are collected daily. The food wastes typically comprise uneaten food and food preparation leftovers from residences, commercial establishments such as restaurants, institutional sources such as school cafeterias, and industrial sources such as factory lunchrooms (Zhang et al., 2007). Contents of food wastes include grains, fruits, vegetables, rice, noodles, breads, seafood, fish and meat, etc. Thus, the organic contents and the nutrients are of value to be recycled and composted (Zhang et al., 2007; Lin, 2008). Similar demands are also obvious in the major cities of the developing Asian countries, such as India, Korea, Hong Kong, Vietnam, Thailand, and China (Seo et al., 2004; Kumar et al., 2010; Lin et al., 2011, 2012).
Composting is a natural process by which microorganisms decompose organic matter into simple nutrients. Two types of composting systems are widely applied, in-vessel systems and windrow systems (Déportes et al., 1995; Huang et al. 2005; Liang et al., 2006; Maliki and Lai, 2011; Lin et al., 2012; Chen et al., 2014). Traditional windrow composting is favored by farmers for use in routine work, because this method requires low capital investment and as only limited intensive knowledge and skills are necessary to operate windrow systems; however, during waste turnover, malodorous gas may be generated and emitted when using the system. Compared with windrows, in-vessel systems require less space and they enable mixtures to be handled more uniformly and gas emissions and polluting leachates to be manipulated more effectively; however, the initial costs involved in using in-vessel systems are high (Cekmecelioglu et al., 2005).
Conversion of organic waste into compost is affected by numerous parameters that influence composting rate, the generation of malodorous gas, and the compost production cost. The operational compost parameters used to monitor the composting process include temperature, moisture content, pH, electrical conductivity, C/N, NH3, and total coliforms (Diaz et al., 1993; Polprasert, 1996; Rantala et al., 1999; Ekinci et al., 2006; Xi et al., 2007; Lin, 2008). Liang et al. (2003) reported that a key environmental variable in composting efficiency is temperature, which not only affects microbial metabolism potently but also strongly influences microbial population dynamics (e.g., composition and density) (Namkoong and Hwang, 1997; Joshua et al., 1998). In the case of pH, the values typically increase from 4.5–5.0 in starting materials to 8.0–8.1 in the end product (Cekmecelioglu et al., 2005). During composting, adequate moisture content must be maintained to enhance microbial metabolism, and water should be added when the compost moisture content decreases (Lin, 2008). Moreover, as indicated in McCartney and Tingley (1998) and Liang et al. (2003), the moisture content of a composting blend is a critical environmental variable because it serves as a medium that transports dissolved nutrients that are required for the metabolic and physiological activities of microorganisms. Although many fundamental studies have been implemented to understand composting processes, modeling is warranted to optimize the efficiency and cost in engineering aspects.
Mathematical models of the composting process have appeared in the literature since 1976 (Mason, 2006). Mathematical models (e.g., Bach et al., 1987; Nakasaki et al., 1987; Kaiser, 1996; Stombaugh and Nokes, 1996) of the composting process have been based on the solution of heat and mass balances in time, and in a limited number of cases, spatially. Modelers have typically looked at the composting system on a macroscale, in which the focus of analytical attention has been on the reactor as a whole; however, several authors have approached the problem by starting from a microbiological point of view (Kaiser, 1996; Stombaugh and Nokes, 1996; Seki, 2000). Mason (2006) provided a comprehensive review regarding historic composting process models, structure, kinetic foundations, simulation abilities, and validation performance. The stated variables of primary interest in composting are temperature (e.g., Kaiser, 1996; Stombaugh and Nokes, 1996; Seki, 2000), moisture content (e.g., Kishimoto et al., 1987; Nakasaki et al., 1987; Ndegwa et al., 2000), oxygen concentration (e.g., Finger et al., 1976; Mohee et al., 1998), and pH (e.g., Sundberg et al., 2004; Cekmecelioglu et al., 2005).
This study sought to develop a methodology to simulate a real-time forecast process for use in composting. Since the renaissance of artificial neural networks (ANNs) in the late 1980s (caused by the introduction of the backpropagation training algorithm for feedforward ANNs, such as multilayer perceptron [MLP] neural networks), ANNs have recently emerged as widely used tools that have been reported to serve as efficient computing models that can be employed to solve challenging problems (Wei, 2013). Recently, ANNs have been applied in the air and waste management fields (e.g., Zhang et al., 2009; Boniecki et al., 2012; Chang and Lin, 2013). In this work, the ANN-based MLP neural networks were employed to develop the prediction model for the influential operational compost parameters, and to simulate real-time composting operations, which have not been reported for monitoring composting process using food waste as feedstocks. Moreover, to compare the efficiency of the ANN-based model featuring MLP, traditional multiple-linear regression (MLR) was selected as a benchmark. This article reports successful construction of a reliable prediction model that can simulate the maturing process and therefore benefit by (1) improving compost product quality and (2) reducing operational and maintenance costs.
Experiments and Data
Physical experiment method
Food wastes adopted in this research contained leftovers from fruit and vegetable markets and the kitchen and dining wastes generated at residences and schools with the carbon/nitrogen (C/N) ratio ranging between 30 and 40. Sawdust was obtained from a local wood processing company with the C/N ratio of 58. Mature compost was obtained from previous composting products with the C/N ratio at about 20.
Table 1 lists the 13 experiments performed for model simulation. All compost piles of 100 kg comprised food wastes, mature compost, saw dust, and soil. In these experiments, saw dust was used to adjust the moisture content of the initial composting mixture. Moreover, mature compost was added to enrich the microbial population and, thus, to hasten the development of the thermophilic fermentation stage (Lin, 2008; Lin et al., 2012). In other words, mature compost can be used as biofilter media to absorb and decompose odorous exhaust gas from the composting process. To enrich the model input–output patterns, the specific mixing ratios were derived randomly in these experiments, and the percentages of these four components were in the following range: 20–70%, 0–15%, 5–30%, and 5–30%. In some of the cases (Experiment Nos. 1–6, and 11), local soil was mixed into the initial composting materials, as organic-waste recycling by means of composting over landfills is one of the alternatives to manage waste in Taiwan because it is simple to apply and cost effective.
After mixing thoroughly, the various initial composting mixtures were composted in piles and rotated once daily. Moisture content, pH, and temperature were monitored daily before rotating compost piles. When the compost moisture content fell below 40% during the composting process, water was added to ensure 40–50% moisture content for maintaining an adequate environment to enhance microbial fermentation. As suggested by Liang et al. (2003), 50% moisture content in the composting process is necessary for obtaining adequate microbial activities. In addition, the moisture content (%, w/w) was monitored by the National Institute of Environmental Accreditation (NIEA) standard method R203.01T, whereas pH was monitored by that of NIEA R208.03C. Temperature was measured with a TES 1310 K-type digital thermometer that was equipped with a 1.2-m probe (±0.1°C sensitivity) (Lin et al., 2012). All measurements were done on samples collected at the center inside the compost piles. All compost studies were conducted in an open-air facility on the campus of the National Kaohsiung Marine University, Taiwan.
Composting data process
During the composting process, the experimental parameters that influence composting were measured. We defined two types of parameters, operational parameters and parameters of initial composting mixtures. The operational parameters measured at time t were the days being composted, denoted Rt (day), the pH value, pH
t
, the composting temperature, Tt (°C), and the moisture content, Wct (%). The parameters of the initial composting mixtures were food waste, denoted Rft (%), mature compost, Rmt (%), sawdust, Rdt (%), and soil, Rst (%). Table 2 lists these eight attributes (i.e., the dataset {
Model Analysis
The following analysis was performed using the cross-validation subsampling approach. The entire dataset was partitioned into 13 subsets (i.e., 13 experiments). During each run, one of the experiments was chosen for testing and the remaining experiments were used for training. From these 13 experiments, a total of 414 and 4,968 daily tuples were used as the testing and training datasets, respectively.
ANN model construction
As shown in Fig. 1, the pH and compost-temperature prediction models are based on the measured attributes. The input layer can be used to receive information on eight attributes that are measured during composting periods. Here, the 1- to 3-day-ahead forecasts obtained using ANN-based models are formulated as follows:
where ANNpH(·) and ANNT(·) are the ANN-based models that are used to predict pH and compost temperature, respectively, which are hereafter referred to as ANN-pH and ANN-T models.

Architecture of three-layer MLP neural network. MLP, multilayer perceptron.
Algorithm
ANNs are created to simulate the nervous system and brain activity. An ANN-based MLP network was used to formulate the proposed algorithm. MLP neural networks are widely employed, because they are simple, flexible, and easy to use. MLP networks most often consist of an input layer, one or more nonlinear hidden layers, and a linear output layer. Figure 1 presents a schematic of a typical MLP network featuring three layers: an input layer, a hidden layer, and an output layer. Mathematically, a three-layer MLP comprising n1 input nodes, n2 hidden nodes, and n3 output nodes can be expressed as (Wei and Hsu, 2008)
where p is the index of input nodes, q is the index of hidden nodes, r is the index of output nodes, xp is the input node of the input layer,
The MLP network is a feedforward neural network that is trained using the most widely employed backpropagation algorithm. The inputs to a perceptron are weighted, summed over the inputs, translated, and passed through an activation function. The commonly used activity function includes linear, sigmoidal, and hyperbolic tangents. Bishop (1995) has comprehensively described feedforward neural networks and multilayer perceptrons. As the training progresses, by using the backpropagation algorithm, the weights are updated systematically and the network output is compared with the target output. The numbers of hidden layers and neurons in each layer are not constant and must be optimized. In the MLP network, the output is generated by passing signals from the input through the hidden layer to the output layer.
Model construction
Calibration of weights in the ANN-pH and ANN-T models is described. The ANN training was performed in the MATLAB environment. To train an MLP network, a three-layer feedforward network was created. The input layer featured eight neurons, the output layer had one neuron, and the number of nodes in the hidden layer was chosen using sensitivity analysis. The Levenberg–Marquardt training function was used to update the weight and bias values, because this training was performed until the error reached a minimum and remained stable. The training was stopped when the maximum of 1,000 iterations was reached. The learning rate and momentum were set to 0.1 and 0.9, respectively. A low learning rate ensures a continuous descent on the error surface, and a high momentum accelerates the training process; the values selected here are typically used in ANN training (Kim, 2008). Moreover, the tan-sigmoidal and linear activity functions were applied in the hidden and output layers, respectively. The hyperbolic tangent function was selected as the activation function for use in the hidden layer, because this function provides greater accuracy than do other sigmoidal functions (Maier and Dandy, 1998). The performance was assessed using the criterion of mean squared error (MSE):
Where
Before cross-validating a model, the suitable neurons in the hidden layer should be determined. To simplify the process, the entire dataset was partitioned into two subsets: The training subset included the first 10 experiments (Nos. 1–10), and the validating subset contained the remaining experiments (Nos. 11–13). During the training processes, the weights gradually converge to values in which input vectors produce output values as close as possible to the target output. The number of nodes in the hidden layer was chosen by analyzing sensitivity in the interval (1, 10). Table 3 lists the number of neurons in the hidden layer that were optimal for each prediction model.
ANN, artificial neural network.
MLR model construction
To allow models to be compared, the attributes selected for the MLR models were the same as those used in the ANN-based models. Thus, the MLR models can be expressed as follows:
where MLRpH(·) and MLRT(·) are the MLR models used to predict pH and T, respectively (MLR-pH and MLR-T models).
Algorithm
Regression analysis is a technique that is extensively used in predictive modeling, because regression model parameters can be interpreted readily and used easily. However, the major limitation of the simple linear regression technique (i.e., ordinary least-squares regression) is that it allows relationships to be ascertained but does not establish underlying causal mechanisms (Wei, 2012). The linear regression model is used to estimate the best-fitting linear equation that can predict the output field based on the input fields. The regression equation represents a straight line or plane that minimizes the squared differences between predicted and obtained output values. The general form of MLR in matrix notation is as follows (Blaker, 2000):
where
Model construction
In this study, we used a stepwise regression method and specified selection criteria based on the statistical probability (p-value) associated with each field. The criteria and stepwise estimation were used to add and remove fields. The p-value used was 0.05 (Genell et al., 2010).
Model performance
After constructing and running the ANN and MLR models, results were obtained. To completely assess model performances, the criteria of relative mean absolute error (RMAE), relative root mean squared error (RRMSE), coefficient of correlation (CC), and coefficient of efficiency (COE) were used:
Where
The scatter plots of the observed versus predicted pH and T are shown in Figs. 2 and 3 together with the outcomes of the 1- to 3-day-ahead predictions derived using the ANN and MLR models; the figures also present the CC values. In both figures, the left and right sides are used for the ANN and MLR models, respectively. The results in Figs. 2a−c and 3a−c show that the slopes calculated are greater in the case of the ANN models than in the case of the MLR models, indicating that the estimates obtained using the ANN models were closer to the observed results than the estimates obtained using the MLR models. Moreover, the CC values calculated for all three forecasts were higher in the case of the ANN models than in the case of the MLR models.

Scatter plots of observed versus predicted values obtained using

Scatter plots of observed versus predicted values obtained using the
Figures 4 and 5 show the results of the 1-day-ahead forecast in each experiment obtained using the ANN and MLR models. In the case of pH, Fig. 4a shows that RMAE values were 0.024–0.062 in the ANN model and 0.025–0.064 in the MLR model, and Fig. 4b shows that RRMSE values were 0.028–0.074 in the ANN model and 0.038–0.083 in the MLR model. The average RMAE and RRMSE values of the two models were 0.037 and 0.049, and 0.04 and 0.056, respectively (Table 4). Similarly, in the case of temperature, the average RMAE and RRMSE values of the ANN and MLR models were 0.049 and 0.064, and 0.055 and 0.073, respectively (Table 5). These results demonstrate that the predictions obtained using the ANN models were more accurate than those obtained using the MLR models. This might be because neural networks perform favorably in applications when the functional form is nonlinear (Curram and Mingers, 1994).


ANN, artificial neural network; COE, coefficient of efficiency; MLR, multiple linear regression; RMAE, relative mean absolute error; RRMSE, relative root mean squared error.
Tables 4 and 5 list the average skill scores of the 1- to 3-day-ahead pH forecast results obtained using the ANN and MLR models in terms of RMAE, RRMSE, and COE. The results obtained using the ANN-pH and MLR-pH models showed that with both models, the RMAE, RRMSE, and COE values were superior in the Δt = 1 forecasts than in the Δt = 2 and 3 forecasts. Furthermore, similar results were obtained in the temperature predictions. Thus prediction accuracy was high when the number of days was low.
Simulation and Comparison
Simulation process
As mentioned, two influential operational compost parameters were selected, pH and composting temperature, and thus two prediction models were constructed. To demonstrate the use of the two vital parameters, both temperature and pH were used to monitor the composting process. To simulate the real-time process, Fig. 6 illustrates the architecture of the real-time composting flowchart. The unit of computation interval is 1 day. A series of repetitive daily calculation steps are as follows:
Step 1: Start at time t = t0; Step 2: Receive eight parameters, denoted as dataset { Step 3: Run the pH prediction model and the T prediction model by using the dataset { Step 4: Predict pH values of the L-d-ahead forecasts Step 5: Check whether Step 6: Acquire compost product at time tfinal derived from model prediction; Step 7: Check whether t > dmax (where dmax is defined as maximal experimental days, set to 70 days). If yes, then the experiment is a failure, so go to Step 8; otherwise, repeat Steps 2–6; Step 8: Stop at time t = tfinal.

Architecture of composting real-time forecast process.
The criteria used for judging compost products are noted in Step 5; both temperature and pH were used to monitor the composting process and to evaluate the final mature product because of two reasons. According to the recommendations of Lin (2008), empirically, the composting process reached maturity and was ended at temperatures between 20 and 40°C in the experimental environment. Therefore, we assumed that 40°C could be used to stop modeling the composting process. Second, as mentioned in the preceding section, compost pH typically increases from 4.5–5.0 initially to 8.0–8.1 in the end product (Sundberg et al., 2004; Cekmecelioglu et al., 2005). Thus, we assumed that pH 8.0 will stop the composting process. In the following sections, we sequentially describe the models used for predicting pH and temperature.
Simulation results
To evaluate the effectiveness of the presented methodology regarding the real-time forecast process of composting, two experiments (Nos. 1 and 12) were selected for simulation. The variations between the observed values and the predicted values obtained using the ANN- and MLR-based models of pH and temperature are plotted in Figs. 7 and 8.

Simulations of composting real-time forecast model in Experiment No. 1:

Simulations of composting real-time forecast process in Experiment No. 12:
Experiment No. 1
Variation of compost pH is shown in Fig. 7a−c. The observed records (Fig. 7a) show that the pH at t = 1 is 4.30 and that the pH reaches 8.31 on the 21st day before gradually decreasing to a steady value <8.0 on the 30th day. In the case of the ANN-pH and MLR-pH forecasts in Δt = 1, the pH values peak and then decrease slightly to a steady value <8.0 on the 30th and 29th days, respectively.
The variation of compost temperature is shown in Fig. 7d−f. The observed temperature records (Fig. 7d) show that T at t = 1 is 51.5°C and that fermentation temperature between 50 and 60°C is maintained from the start to the 13th day. Afterward, T increases rapidly, peaks at 72.4°C on the 18th day, and then gradually decreases to a steady value <40°C on the 31st day. In the case of the ANN-T and MLR-T forecasts in Δt = 1, the temperatures reach maximal values around 70°C and then decrease to T < 40°C on the 31st and 30th days, respectively.
Based on the proposed composting real-time forecast process (Fig. 6), we examined the conditions related to degree of degradation (i.e., “if (
Experiment No. 12
Figure 8 presents the variations of compost pH and temperature. The observed records show that pH and T at t = 1 are 4.55 and 46.30°C, respectively (Fig. 8a, d), after which they rise rapidly and peak at 8.31 and 72.6°C on the 11th and 8th days, respectively, and then gradually decrease to steady values <8.0 and <40°C on the 26th and 18th days, respectively. Therefore, the mature product can be obtained on the 26th day.
Using the ANN and MLR model forecasts in Δt = 1, the variations of compost pH and temperature show that under the mature composing conditions, the compost product is predicted on the 25th and 24th days, respectively (Fig. 8a, d). Moreover, in the case of Δt = 2, the mature product is predicted on the 25th day by using the ANN-based model and on the 27th day by using the MLR-based model; with Δt = 3, the mature compost product is predicted on the 23rd and 21st days by using the ANN- and MLR-based models, respectively.
All experiments
To assess the performance level of the composting real-time prediction based on all experiments, the absolute time error of degree of degradation (ETdd) was defined and used to compute the average time of the absolute errors:
Where
Figure 9 illustrates the prediction performance levels of the ANN and MLR models in terms of the ETdd measurements obtained using all experiments. In 1-day-ahead prediction, the ETdd values are 0.67 and 1.22 days for the ANN and MLR models, respectively; these values calculated for the ANN model are also lower than those for the MLR model in 2- and 3-day-ahead predictions. Thus, the ANN model demonstrated accurate prediction ability. Comparison of the ETdd values of the three lead times (Fig. 9) shows that the highest ETdd values occur in 3-day-ahead predictions, which indicates that the uncertainty in predicting the time required for compost to mature increases with increasing lead times.

Average error rates of ANN- and MLR-based composting real-time forecast models.
Conclusions
Physical and chemical parameters affect the fermentation process. The information regarding these predicted parameters during the composting process can be referenced for design and operation of future composting plants. The findings of this study contribute toward the development of an effective and reliable prediction model for use in monitoring composting processes.
This work presents ANN- and MLR-based real-time composting forecast models that are developed to predict the influential operational compost parameters and to further simulate the time of the composting process. We conducted 13 experiments in an open-air facility on the campus of the National Kaohsiung Marine University, Taiwan. The composting mixtures comprised food waste, mature compost, sawdust, and soil, and both temperature and pH were measured to monitor the composting process and to evaluate the final product's maturity. Here, the prediction results are compared by using CC, RMAE, RRMSE, and COE values, and the results include the 1- to 3-day-ahead forecasts obtained using the two models. The pH and temperature predictions obtained using the ANN models have CC values of 0.979 and 0.956 in 1-day-ahead forecasts and greater slopes than the predictions obtained using the MLR models, which have CC values of 0.972 and 0.941. Similar results are obtained for 2- and 3-day-ahead forecasts. Thus, the ANN-model estimates are closer to the observed results than the estimates obtained using the MLR model. In terms of performance RMAE, RRMSE, and COE values, the results show that the pH and temperature predictions obtained using the ANN model are more accurate than those obtained using the MLR model in 1- to 3-day-ahead forecasts. In using ANN and MLR models to predict the maturity of food waste composts, the absolute time errors of degree of degradation are 0.67 and 1.22 days, respectively, in 1-day-ahead prediction, again indicating that prediction using ANN is more accurate than that using MLR.
The aforementioned results indicate that the methodology of the real-time composting forecast process developed in this study can be effectively used to predict composting time. Finally, the study's limitations and our suggestions for future studies are, for example, that the proposed methodology can be applied only in windrow systems; thus, complex in-vessel systems such as the negative-pressure aeration system could be studied in the future. Moreover, we used pH and temperature as indicators during the composting process. However, these indicators of maturity should be used carefully, because a stabilized temperature does not always indicate stabilized compost. This might suggest that the biological process slowed down, possibly because of a lack of moisture. Regarding the mixing ratios of the original compost, the materials are confined to percentage ranges. When a statistical data-driven model (such as ANN) is compelled by data, the model accuracy might decrease when the mixing ratio distinctly differs from the percentage ranges.
Footnotes
Acknowledgments
Support for this study under Grant No. MOST103-2111-M-464-001 provided by the Ministry of Science and Technology, Taiwan is greatly appreciated. The authors also acknowledge the constructive comments of the reviewers.
Author Disclosure Statement
No competing financial interests exist
