Accepted Manuscript An integrated prediction and optimization model of biogas production system at a wastewater treatment facility Halil Akbas, Bilge Bilgen, Aykut Melih Turhan PII: DOI: Reference:
S0960-8524(15)01121-9 http://dx.doi.org/10.1016/j.biortech.2015.08.017 BITE 15368
To appear in:
Bioresource Technology
Received Date: Revised Date: Accepted Date:
19 June 2015 4 August 2015 8 August 2015
Please cite this article as: Akbas, H., Bilgen, B., Turhan, A.M., An integrated prediction and optimization model of biogas production system at a wastewater treatment facility, Bioresource Technology (2015), doi: http://dx.doi.org/ 10.1016/j.biortech.2015.08.017
This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
An integrated prediction and optimization model of biogas production system at a wastewater treatment facility Halil Akbasᵃ, Bilge Bilgenᵇ*, Aykut Melih Turhanᵃ ᵃDokuz Eylul University, The Graduate School Of Natural And Applied Sciences, Department of Industrial Engineering, Tinaztepe Campus, Buca, 35160 Izmir, Turkey ᵇDokuz Eylul University, Department of Industrial Engineering, Tinaztepe Campus, Buca, 35160 Izmir, Turkey
Abstract This study proposes an integrated prediction and optimization model by using multi-layer perceptron neural network and particle swarm optimization techniques. Three different objective functions are formulated. The first one is the maximization of methane percentage with single output. The second one is the maximization of biogas production with single output. The last one is the maximization of biogas quality and biogas production with two outputs. Methane percentage, carbon dioxide percentage, and other contents` percentage are used as the biogas quality criteria. Based on the formulated models and data from a wastewater treatment facility, optimal values of input variables and their corresponding maximum output values are found out for each model. It is expected that the application of the integrated prediction and optimization models increases the biogas production and biogas quality, and contributes to the quantity of electricity production at the wastewater treatment facility. Keywords: Biogas quality, Biogas production, Neural networks, Particle swarm optimization, Wastewater treatment facility *Corresponding author. Tel.: +90 232 3017615; Fax: +90 232 3017608. E-mail address:
[email protected].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
1. Introduction Biomass, wind, solar, and hydropower are renewable energy sources, which ensure the continuity of energy supply and more economical, more secure and cleaner energy usage. Therefore, these energy sources have an important role in energy policies of countries. As stated by Tauseef et al. (2013) biodegradable wastewater with the approximate volume of 1500 km /day was generated across the world and presumably more than 80% of it was not collected or treated. Domestic sewage can be stabilized by using anaerobic digesters, which are capable of treating wastewater and producing biogas as a clean energy source, at wastewater treatment facilities. Biogas is produced from anaerobic biodegradation of biomass, while oxygen is absent and anaerobic microorganisms are present inside anaerobic digesters (Tippayawong and Thanompongchart, 2010). If the anaerobic digester operates at suboptimal conditions, biogas quality deteriorates and biogas production quantity decreases in each production cycle of anaerobic digesters.
Data mining algorithms, adaptive neural fuzzy inference system (ANFIS) and artificial neural networks (ANN) have been successful in building prediction models of the biogas production process (Strik et al., 2005; Kusiak and Wei, 2011). Tay and Zhang (1999) used ANFIS to model biogas production in anaerobic digesters. The inputs included organic loading rate, hydraulic loading rate and alkalinity loading rate. Outputs involved volumetric methane production and total organic carbon concentration. Another ANFIS model was applied for modeling anaerobic digestion of primary sludge in a wastewater treatment plant by Çakmakçı (2007). The model satisfactorily predicted effluent volatile solid and biogas yield. Holubar et al. (2002) performed a study to predict gas production and composition in a decision support system to avoid unexpected sludge loads. Strik et al. (2005) effectively modelled the anaerobic digestion of surplus sludge by means of a hierarchical system of neural networks to control methane production in anaerobic digesters.
Optimization models of biogas production systems are studied by using evolutionary algorithms, e.g., genetic algorithm (GA), PSO algorithm, etc., in literature. Ward et al. (2008) discussed the optimization of environmental conditions within the digester, e.g., temperature, pH, buffering capacity and fatty acid concentrations. Wolf et al. (2008) aimed at the optimization of biogas plant operation. For this reason, they used GA and PSO models, which were integrated with a dynamical simulation model for anaerobic digestion. 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Wei and Kusiak (2012) developed both prediction and optimization models of biogas production in a wastewater treatment facility by using data mining algorithms and PSO algorithm. Their model involved the process temperature, total solids, volatile solids, and pH value as controllable variables. Fakharudin et al. (2013) used temperature, organic loading rate and hydraulic retention time as inputs. Their approach utilized ANN for output prediction. They used GA for the optimization of biogas production process at anaerobic reactors. Kusiak and Wei (2013) proposed a data driven approach to maximize the methane production at a wastewater treatment plant. This study revealed that methane production increased with the optimal values of the digester temperature and the volatile solids, which were controllable variables. Garcia-Gen et al. (2014) developed an optimization method to calculate feedings of anaerobic co-digestion processes. The method is based on linear programming aiming at maximizing methane production.
Prediction and optimization of a biogas production system are important in a wastewater treatment facility. Anaerobic digesters are difficult to keep under control because of complicated and non-linear relationships of the system variables. This situation causes that the biogas production system is run at sub-optimal working conditions at a wastewater treatment facility. The main objective of this study is to propose a framework for estimating the optimum levels of inputs, while outputs are at their maximum levels. The solution methodology involves the integration of ANN and particle swarm optimization (PSO) models. The prediction models are created by using multi-layer perceptron (MLP) neural network. Prediction accuracy of MLP neural network models is tested by statistical indicators. After the creation of MLP neural network, PSO starts with the proper parameters including the particles` starting positions and particle velocities. All of the current particle positions are sent to MLP neural network for the simulation of methane percentage (CH%) and biogas production to find out the global best values of these outputs. The first model is a single output model and it focuses on CH % of biogas. The second model is the other single output model and it deals with biogas production. The input variables in both models are selected by utilizing a dimensionality reduction algorithm. The third model has two outputs, which are biogas quality and biogas production. The objective function of the last model is a simplified mathematical representation of the MLP neural network results, which is the addition of normalized value of CH% to normalized value of biogas production. The input variables in the last model are chosen by depending on 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
operational experiences. All the related outputs in these models are separately tackled with combined MLP neural network and PSO models. There are two assumptions in the last model. The first assumption is that biogas quality means the maximization of CH % and the minimization of carbon dioxide percentage (CO %) and other contents` percentage. The
second assumption is that the minimization of CO % and other contents` percentage is the result of the maximization of CH%.
The maximization of biogas quality and quantity provides efficient and productive use of cogeneration unit and the combustion engines of sludge drying plant. In addition, this condition contributes to the quantity of electricity production at a wastewater treatment facility.
The main contribution of this study is that it stimulates the biogas usage for energy savings and efficiency at wastewater treatment facilities. To the best of authors’ knowledge, this is the first study of the modelling and optimization of biogas production system at a wastewater treatment facility in Turkey. Another distinguishing characteristic of this research is that the biogas production system and the biogas usage are genuinely approached in detail at a wastewater treatment facility in Turkey by utilizing three divergent prediction and optimization models. Additionally, this report is the first study in which the biogas quality is considered as the output of an optimization model. Furthermore, an integrated prediction and optimization model including two outputs is designed.
The remainder of this article is organized as follows. In the next section, the prediction and optimization models are introduced and applied at a wastewater treatment facility. Finally, section 3 states the conclusion and future research directions.
2. Methodology
2.1. The facility
The data of this study is provided by Antalya General Directorate of Water and Wastewater and is obtained from Hurma Wastewater Treatment Facility (HWTF) in Antalya, Turkey. HWTF receives municipal wastewater and storm water from sewerage system of the western part of Antalya metropolitan city. HWTF serves for the population of 1.400.000. 4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Wastewater arrives at the HWTF with the flow of 210,000 m /day to be discharged back into Mediterranean Sea after treatment. HWTF has modern technology treatment equipment and systems. HWTF includes preliminary treatment units, bio-phosphorus reactors, aeration tanks, primary clarifiers, sludge thickening units, sludge dewatering units, final clarifiers, sludge digesting units, sludge returning stations, blower and generator stations, odor control units with either chemical solutions or bio filters, sludge, biogas and chemical solutions storage tanks, flare system unit, desulphurization unit, sludge drying system unit, cogeneration unit, Supervisory Control and Data Acquisition (SCADA) system unit, disinfection and discharging units. The wastewater and sludge are carried between the HWTF units through underground pipelines, which are equipped with flow meters and valves.
Intermediate pumps move the influent wastewater from primary clarifiers to aeration tanks. There are two aeration tanks in the HWTF. After aeration, the wastewater enters eight cylindrical clarifiers in which microorganisms and other products can clump together and settle to the bottom along with the remaining suspended solids. Some of the settled sludge returns to the aeration tanks and this situation provides a continuous resource of microorganisms for activated sludge process. The remaining sludge is sent to anaerobic digesters to produce biogas. The treated wastewater from the eight final clarifiers is discharged into the Mediterranean Sea.
Anaerobic digesters are used for the stabilization of biological sludge. Sludge digestion process is carried out at anaerobic and mesophilic conditions. The mesophilic bacterium group includes fermentation, acid, and methane bacteria, which undertake the task of sludge digestion.
Under the required temperature around 35°C in the mesophilic reaction, the microorganisms residing in the reactor convert the organic wastes to biogas, which mainly consists of methane and carbon dioxide (Tay and Zhang, 1999). The generated biogas at HWTF is firstly stored in two biogas storage tanks with the volume of 2600 m each to meet demand. Then, it is used to power cogeneration unit. The heat generated in the gas combustion system is also used to control the temperature of the sludge, heat exchangers of both anaerobic digesters and sludge drying facility. The excess biogas can be combusted in
5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
the flare unit with the capacity of 2000 m /hour. The process diagram of biogas production system at HWTF is shown in Fig. 1. Fig. 1. Biogas production system at HWTF
Biogas content mostly includes CH gas with a typical range between 40% and 70%, and
its heating energy value is between 15 and 30 MJ/Nm (Tippayawong and Thanompongchart,
2010). Biogas is stored in biogas tanks. It is compressed by gas blowers and carried through
pipelines in order to feed the cogeneration unit and the combustion engines of sludge drying plant.
The produced biogas is a valuable energy source, which can be used instead of fossil fuels in various technical applications, for example, the production of heat energy and electrical energy, etc. These technical applications require biogas quality consistency (Kymalainen et al, 2012). Biogas quality is kept consistent by removing CO , H S and water vapour from biogas content at the desulphurization unit in the HWTF.
2.2. Data description The daily data of the HWTF`s biogas production system is provided by Antalya General Directorate of Water and Wastewater in Turkey. The averages of hourly observed values are used as the daily data in the prediction and optimization models.
A predictive model is established on the basis of historical input and output data. The processed data set includes 85 convenient data points and it is divided into three parts. The first data set has 68 data points and it is used to train and develop a prediction model with artificial neural network. The second data set contains 4 data points for model validation. The third data set includes 13 data points and it is used to check the prediction performance of the model. The optimization model uses the holistic data. 2.3. Variable selection The list of input variables, which are sludge loading rate (SLR), temperature (T), pH, total solid (TS), total volatile solid (TVS), volatile fatty acid (VFA), alkalinity (ALK), sludge
6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
retention time (SRT) and organic loading rate (OLR). and list of outputs with their range are presented in Table 1, and Table 2, respectively. Table 1 List of input variables
Table 1(ctnd.) List of input variables Table 2 List of outputs
The temperature influences the sludge digestion. Sludge digestion becomes faster, as the temperature goes up. In the natural environment, the optimum temperature for the growth of methane forming archaea is from 30°C to 36°C for mesophilic systems (Tabatabaei et al., 2011). At the HWTF, temperature is kept between the interval values given in Table 1 to have a stable biogas production. Some of the input variables are important as they affect each other. Alkalinity and pH are in relation with each other and they have an important role in assuring an appropriate environment for productive methanogenesis process. The alkalinity buffers the acidity derived from the acidogenesis process, so it helps to control pH at required values. Methane producing archaea or methanogens are influenced by pH and they can only survive on a very narrow range of pH, from 6.8 to 7.6 (Gerardi, 2003). Lansing et al. (2008) analyze twelve influent and effluent wastewater parameters to determine statistically significant trends. The objectives of this study were to determine the significant wastewater characteristics in the treatment process that should be monitored in the future; and the variability of water quality parameters and methane concentration between different digesters.
The retention of a consistent amount of active biomass in an anaerobic digester is known as granulation. These anaerobic granules hold several metabolic groups of microorganisms, which are necessary in the anaerobic degradation of complex organic compounds (Kusiak and Wei, 2012). Sludge retention time is another important variable of the biogas quality and biogas production models. By controlling sludge loading rate, total solids, total volatile solids, volatile fatty acid and organic loading rate, the biogas production can be adjusted as well.
The high dimensionality of a prediction model can be reduced by using the boosting tree algorithm (Breiman, 1996). Dimensionality reduction leads to the prediction accuracy of the model. The contribution of each predictor to the prediction accuracy on the training data set is 7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
controlled to understand the need for dimensionality reduction. This helps to refine the model for more consistent output prediction. Input variables and their corresponding notation are displayed in Table 3. Table 3 Notation for input variables
Fig. 2a shows the index of importance of each input variable of the methane percentage model. It is seen in Fig. 2a that T, pH, TS, VFA and ALK are considered as the inputs of prediction model of CH%. Since, these inputs have higher importance index values than
threshold values. CO % and the other contents` percentage of the biogas are not considered in prediction model calculations. Because, their total value will be calculated by deducting the daily and maximized percentage values of methane from 100% at the end of the analysis.
With this way of thinking, quality improvement target in biogas is also achieved. On the other hand, the model with two outputs takes nine variables as decision variables by depending on experiences at a wastewater treatment facility rather than using a variable selection algorithm. Fig. 2. Feature importance index of inputs, (a) methane percentage model (b) biogas production model
Similar analysis of feature importance is applied to the prediction model of biogas production model. Fig. 2b shows the index of importance of each input variable of biogas production model. The threshold value is arbitrarily chosen as 0.5 to determine the inputs of the model. When the importance index is lower than the threshold value of 0.5, then the related input variable will degrade the performance of the models. Therefore, the dimensionality of the input variables is reduced to improve the model performance. Regarding to Table 3 and Fig. 2b, the importance of variables SLR, T, pH and SRT are larger than the threshold value of 0.5. The rest of the input variables are not considered as the inputs of the model, since their importance index values are below the threshold value of 0.5.
2.4. Prediction model MLP neural network has been commonly used in solving linear and nonlinear problems at various research areas in recent years (Zhang et al., 2012; Kusiak and Wei, 2013; Nikpey et al., 2014, Thorin et al., 2012). The flow chart of MLP neural network with back propagation training algorithm is presented in Fig. 3a. The neurons are represented with circles. Neurons 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
have interconnections with different weight coefficients. In each neuron of hidden layer and output layer, a specific activation function is assigned to accept input from the previous layer and calculate output for the next layer. A back propagation neural network decides whether the error between target output value and actual output value is acceptable or not (Kusiak, 2000). Fig. 3a. The flow chart of MLP neural network with back propagation training algorithm
Table 4 MLP neural network models
Data sets 1, 2 and 3 are used for MLP neural network training, validation and testing as mentioned earlier. Levenberg Marquardt (LM) algorithm (Hagan and Menhaj, 1994) is run as the training algorithm, while mean square error (MSE) is the error function. The number of neurons in hidden layer and output layer is randomly chosen between 5 and 30. Tangent, purelin, and logarithmic sigmoid functions are tried as the hidden activation and the output activation functions. The number of hidden layers is chosen as 1. Each MLP neural network model stated in Table 5 is experimented 50 times to find the ANN with the best prediction performance. Methane percentage model has 5 inputs, 20 neurons in the hidden layer and a single output. Biogas production model includes 4 inputs, 15 neurons in the hidden layer and a single output. Finally biogas quality and biogas production model contains 9 inputs, 30 neurons in the hidden layer and 2 outputs in a single model. The illustrations of MLP neural network models are as shown in Figs. 3b, 3c and 3d. Fig. 3b. MLP neural network illustration of methane percentage model Fig. 3c. MLP neural network illustration of biogas production model Fig. 3d. MLP neural network illustration of biogas quality and biogas production model
The holistic data set, which includes training, validation and checking data of observed values of CH %, biogas production (m /day), and CO % and other contents` percentage, has been put into a diagram along with the corresponding values predicted by the MLP neural network as can be seen in Figs. 4a, 4b, 4c and 4d. The black lines show the predicted values and the blue lines indicate the observed values. It is seen in these figures that some of the observed values are accurately predicted, while a number of predicted values are either larger or smaller than observed values. Validation and test data are available from 68th day to 85th day. The flow of the predicted and observed values is close to each other in this period. 9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Predicted values of CH % at methane percentage model, biogas production at biogas
production model and CH % and biogas production at biogas quality and biogas production
model are especially accurate for validation and test periods of models. However, some of the peak values of observed data are not covered by the predicted values of outputs. Fig.4a. Methane percentage model predicted and observed CH % Fig. 4b. Biogas production model predicted and observed biogas production (m3/Day) Fig.4c. Biogas quality and biogas production model predicted and observed CH % Fig. 4d. Biogas quality and biogas production model predicted and observed biogas production (m3/Day)
Prediction accuracy for each MLP neural network model is estimated by using statistical indicators. Mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE) and regression coefficient (R ) are calculated for observed outputs and predicted outputs by using equations in Eqs. (1) - (4) hereunder and are presented in Table 5.
MAE
MSE
(1)
(2)
= ∑ │y y │
= ∑ │y y │
RMSE = ∑ │y y │
(3)
R
(4)
=1-
∑" ! #$
! ∑" #$ %
where &' is the predicted output value, &' is the observed output value, &( are the mean of observed output values and n is the number of total instances in the data set respectively. Table 5 Prediction accuracy of MLP neural network models
The proposed prediction models are implemented in Matlab R2013b version. The experiments have been conducted using a notebook with 2.40 GHz Intel (R) Core™ processor and 8.00 GB RAM. Regarding to the prediction accuracy results of the models stated in Table 5, the MSE of biogas production in both models are large numbers. It is because that small differences between the observed and the predicted output values will cause a large squared error. However, the regression coefficient between the observed and predicted output values of biogas production model is 0.89038. The regression coefficient between observed and predicted biogas production values of the biogas quality and production model is 0.9135. Therefore, the prediction models of biogas production are accurate. The calculated values of 10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
MAE, MSE, and RMSE are quite small for both prediction models of CH %. Prediction accuracy of the CH% at methane percentage model with single output is slightly better than prediction accuracy of CH % at the biogas quality and quantity model with two outputs.
Furthermore, regression coefficient between the observed and predicted CH % output value of methane percentage model is 0.91814. On the other hand, the regression coefficient between the observed and predicted CH % output value of biogas quality and production model is 0.9135. The prediction results are precise for both prediction models of CH%. Regression
coefficients are quite high in all of the prediction models as can be seen in Figs. 5a, 5b, 5c and 5d. Fig. 5a. Regression coefficient of CH4 % for CH4 % model with single output Fig. 5b. Regression coefficient of biogas production (m3/Day) for biogas production model with single output Fig. 5c. Biogas quality and biogas production model with two outputs: regression coefficients of CH %
Fig. 5d. Biogas quality and biogas production model with two outputs: regression coefficients of biogas production (m /Day)
2.5. Optimization model
The idea of PSO comes from biology where a swarm ensures harmony for itself in order to attain a desired result (Zäpfel et al., 2010). A swarm of particles is arbitrarily arranged in the search space. The value of the objective function is estimated for every particle. Each particle is aware of its existing value of the objective function, its locally best solution, globally best solution of the swarm and its particular velocity. Therefore, the whole swarm moves in the direction of the globally best value under consideration of the current velocity. The particles are progressively in search for different positions and another locally or globally best solution. A particle ) in PSO is defined by its position vector *' . The dimension of the vector equals to the number of features in the problem. The position of particle`s best solution and velocity are supposed to be +' and ,' in order. Firstly, particle positions and velocities are arbitrarily assigned. Then, they are improved with iterations. As defined by Ali et al. (2012), the formulas of the velocity and position of particles are presented in Eqs. (5) and (6): ,'- . / ∗ ,'- 1 2 ∗ 3 ∗ +'- *'- 1 2 ∗ 3 ∗ +4- *'-
(5)
*'- . *'- 1 ,'-
(6)
11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
where 5 . 1,2, … , :; ) . 1,2, … , < : is the number of dimensions, < is the size of the population, / is the inertia weight, +'-
is the best individual particle position, +4- is the global best position for all particles, 2 and
2 are two positive constants, 3 and 3 are two random values in the range of [0 1] (Ali et al., 2012).
The aim of the optimization model in this study is to find out the optimal values of biogas production system`s inputs and their corresponding maximum CH % and biogas production values. The optimization model leads to utilizing the biogas production system at maximum output levels.
There are three different objective functions and optimization models in this study. Each model aims at maximizing the objective function. The first objective function in Eq. (7) subject to the constraints of inputs of * , * , * , *= and *? is for CH%, while the second
objective function in Eq. (8) subject to the constraints of inputs of * , * , * and *@ is for
biogas production. The third objective function in Eq. (9) subject to the constraints of inputs of * , * , * , * , *A , *= , *? , *@ and *B is for the biogas quality and biogas production model. This objective function is calculated by adding the objective function of biogas quality to the objective function of biogas production in the same optimization model with nine inputs. CO %, and other contents` percentage criterion of biogas quality is not put in any objective
functions. When the maximization of CH% is already calculated in optimization models, the
minimization of CO % and other contents` percentage is also found out by subtracting
maximum value of CH % from 100%.
The observed input and output values of all maximization models are normalized to the values from 0 to 1. The maximization models and their constraints are formulated in Eqs. (7), (8) and (9) as following expressions: a) Objective function 1 for the maximization of CH% is that; max.& = C* , * , * , *= , *? )
(7)
subject to 35 D * D 36; 6.6 D * D 7.3; 22046 D * D 31951 4 D *= D 167; 2310 D *? D 3966
12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
b) Objective function 2 for the maximization of biogas production is that; max.& = C* , * , * , *@ )
(8)
subject to 232 D * D 576; 35 D * D 36; 6.6 D * D 7.3; 18 D *@ D 22 c) Objective function 3 for the maximization of biogas quality and biogas production is that; max. (& 1 & )
(9)
& = C* , * , * , * , *A , *= , *? , *@ , *B )
& = C* , * , * , * , *A , *= , *? , *@ , *B )
subject to 232 D * D 576; 35 D * D 36; 6,6 D * D 7.3;
22046 D * D 31951; 15376 D *A D 20938; 4 D *= D 167; 2310 D *? D 3966; 18 D *@ D 22; 0.55 D *B D 2.34
When the MLP neural network is validated, the best weights and biases are saved. Then, PSO model begins with the particles` initial positions and initial velocities. The simulation of MLP neural network is used to integrate the MLP neural network with PSO model. After the PSO model starts, particle positions are sent to MLP neural network to calculate the corresponding values of CH% and biogas production. The objective function of the biogas quality and biogas production model is represented by the addition of normalized MLP neural network results of CH% and biogas production. After the initialization phase of the integrated MLP neural network, PSO model is completed and new results from the objective function are compared with the existing results obtained in the initialization phase in order to capture the best result. Overall loop is run until termination criterion is met. Finally, global best fitness result is reported.
Each input is optimized subject to the interval between its minimum and maximum observed values in the data set. The minimum and maximum observed values of the inputs of the biogas production system were presented in Tables 1 and 2. The relative characteristics of influential inputs of biogas production system are briefly explained in section 2.3. Temperature, pH and sludge retention time are dealt as more important variables of biogas production system. By depending on the experiences at the wastewater treatment facility, these influential variables are optimized subject to more stringent intervals to improve the
13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
biogas quality and biogas production quantity. By considering all of the optimization models, the constraints are tightened to the range of 35 to 36 for temperature, 6.6 to 7.3 for pH and 18 to 22 for sludge retention time respectively.
The optimization model`s dimension and swarm size are set to 5 and the maximum velocity is taken as 0.09 for the methane percentage model. The same parameters of optimization model of biogas production are 4 for dimension and swarm size and 0.09 for maximum velocity, whereas those parameter values of biogas quality and biogas production model are 9 for dimension, 10 for swarm size and 0.09 for the maximum velocity. The inertia parameter is 1.2 for all of the optimization models. The maximum number of iterations is set to 1000 for the optimization models. The flow chart of PSO is presented in Fig. 6. The steps in the flow chart of PSO are repeated till the termination criterion is met.
The proposed optimization models are implemented in Matlab R2013b version. The experiments have been conducted using a notebook with 2.40 GHz Intel (R) Core™ processor and 8.00 GB RAM. The results of three optimization models are indicated in Tables 6a, 6b and 6c. It is recommended that the optimal input values of models determined by PSO algorithm are put into the SCADA system at the HWTF in order to test the output values. Then, it is expected that the biogas quality and biogas production are maximized at the biogas production system of the HWTF. The increases and decreases in objective values of CH%, CO % and other contents` percentage and biogas production for each optimization model with respect to the observed average output values are also shown in Tables 6a, 6b, and 6c. Fig. 6. Flow chart of PSO algorithm
Table 6a Optimization results of methane percentage model Table 6b Optimization results of biogas production model Table 6c Optimization results of biogas quality and biogas production model
3. Conclusion
14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Three MLP neural networks are used in the design of intelligent systems to optimize the biogas production system at a wastewater treatment facility. MLP neural network and PSO model are connected to each other for calculating maximum output values. All of these optimal system designs can provide consistent control of the biogas production system and they are eligible for the application at HWTF to test their performances. The improvement of biogas quality and quantity in each cycle of biogas production system contributes to energy savings and efficiency at the cogeneration unit and sludge drying plant in a wastewater treatment facility.
Acknowledgements The data of this study is provided by Antalya General Directorate of Water and Wastewater, so the authors are thankful to both Antalya General Directorate of Water and Wastewater and Municipality of Antalya Metropolitan City. Additional thanks are presented by the authors to the board of directors of Antalya General Directorate of Water and Wastewater for giving permission for using required data in this research.
References 1. Ali, H., Shahzad, W., Khan, F., 2012. Energy-efficient clustering in mobile ad-hoc networks using multi-objective particle swarm optimization. Appl. Soft Comput., 12,1913-1928. 2. Breiman, L., 1996. Bagging predictors. Mach. Learn., 24,123-140. 3. Çakmakçı, M., 2007. Adaptive neuro-fuzzy modelling of anaerobic digestion of primary sedimentation sludge. Bioprocess Biosyst. Eng., 30, 349–357. 4. Fakharudin, A.S., Sulaiman, M.N., Salihon, J, Zainol, N., 2013. Implementing artificial neural networks and genetic algorithms to solve modeling and optimization of biogas production. In: Proceedings of the 4th Int. Conf. on Computing and Inform., Sarawak, pp. 121-126. 5. García-Gen, S., Rodríguez, J., Lema, J.M., 2014. Optimisation of substrate blends in anaerobic co-digestion using adaptive linear programming, Bioresour. Technol. 173, 159–167. 6. Gerardi, M.H., 2003. The microbiology of anaerobic digesters, 1st ed., John Wiley & Sons, New Jersey, US. 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
7. Hagan, M.T., Menhaj, M.B., 1994. Training feedforward networks with the Marquardt algorithm. IEEE Trans. on Neural Netw., 5(6), 989-993. 8. Holubar, P., Zani, L., Hager, M., Froschl, W., Zorana, R., Braun, R., 2002. Advanced controlling of anaerobic digestion by means of hierarchical neural networks. Water Res., 36, 2582-2588. 9. Kusiak, A., 2000. Computational intelligence in design and manufacturing, 1st ed., John Wiley & Sons, New York, US. 10. Kusiak, A., Wei, X., 2011. Prediction of methane production in wastewater treatment facility: A data-mining approach. Ann. of Op. Res., 216, 71-81. 11. Kusiak, A., Wei, X., 2012. A data-driven model for maximization of methane production in a wastewater treatment plant. Water Sci. & Technol., 65(6), 1116-1122. 12. Kusiak, A., Wei, X., 2013 Optimization of the activated sludge process. J. of Energy Eng., 139, 12-17. 13. Kymalainen, M., Lahde, K., Arnold, M., Kurola, J.M., Romantshuck, M., Kautola, M., 2012. Biogasification of biowaste and sewage sludge – measurement of biogas quality. J. of Environ. Manag., 95,122-127. 14. Lansing, S., Botero, R., Martin, J.F., 2008. Waste treatment and biogas quality in smallscale agricultural digesters, Bioresour. Technol. 99, 5881–5890. 15. Nikpey, H., Assadi, M., Breuhaus, P., Mørkved, P.T., 2014. Experimental evaluation and ANN modeling of a recuperative micro gas turbine burning mixtures of natural gas and biogas. Appl. Energy, 117, 30-41. 16. Strik, D., Domnanovich, A.M., Zani, L., Braun, R., Holubar, P., 2005. Prediction of trace compounds in biogas from anaerobic digestion using the MATLAB neural network toolbox. Environ. Model. & Softw., 20, 803-810. 17. Tabatabaei, M., Sulaiman, A., Nikbakht, A.M., Yusof, N., Najafpour, G., 2011. Influential parameters on biomethane generation in anaerobic wastewater treatment plants, In: Manzanera, M. (Editor), Altern. Fuel, InTech, Croatia, pp. 227-262. 18. Tauseef, S.M., Abbasi, T., Abbasi, S.A., 2013. Energy recovery from wastewaters with high-rate anaerobic digesters. Renew. and Sustain. Energy Rev., 19, 704-741.
16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
19. Tay, J.H., Zhang, X., 1999. Neural fuzzy modeling of anaerobic biological wastewater treatment systems. J. of Environ. Eng., 125, 1149-1159. 20. Thorin, E., Lindmark, J., Nordlander, E., Odlare, M., Dahlquist, E., Kastensson, J., 2012. Performance optimization of the Växtkraft biogas production plant. Appl. Energy, 97, 503-508. 21. Tippayawong, N., Thanompongchart, P., 2010. Biogas quality upgrade by simultaneous removal of CO2 and H2S in a packed column reactor. Energy, 35, 4531-4535. 22. Ward, A.J., Hobbs, P.J., Holliman, P.J., Jones, D.L., 2008. Optimisation of the anaerobic digestion of agricultural resources. Bioresour. Technol., 99, 7928–7940. 23. Wei, X., Kusiak, A., 2012. Optimization of biogas production process in a wastewater treatment plant. Proc. of the Ind. and Syst. Eng. Res. Conf.; Iowa. 24. Wolf, C., McLoone, S., Bongards, M., 2008. Biogas plant optimization using genetic algorithms and particle swarm optimization. In: 16th IET Ir. Signals and Syst. Conf., Galway, pp. 244-249. 25. Zäpfel, G, Braune, R, Bögl, M., 2010. Metaheuristic search concepts: A tutorial with applications to production and logistics. Springer-Verlag, Berl. Heidelb. 26. Zhang, Z., Zeng, Y., Kusiak, A., 2012. Minimizing pump energy in a wastewater processing plant. Energy, 47, 505-514.
17
Table 1 List of input variables SLR (m3/day)
INPUT VARIABLES
Min 232
Max 576
T (°C) Min 34.38
TS (mg/lt)
pH
Max 37.35
Min 6.6
Max 7.3
Min 22046
TVS (mg/lt)
Max 31951
Min 15376
Max 20938
Table 1 (ctnd.) List of input variables
INPUT VARIABLES
VFA (mg/ lt) Min Max 4.0 167
ALK (mg/lt) Min 2310
Max 3966
SRT (Day) Min 15.6
Max 38.7
OLR (kg/ .day) Min 0.55
Max 2.34
Table 2 List of outputs CH4 % OUTPUTS
Min 61.38
Max 67
CO2 % and other contents` percentage Min Max 33
38.62
Biogas Production (m3/Day) Min 1080
Max 3475
Table 3 Notation for input variables Input No
Input Name
1 2 3 4
SLR T pH TS
5
TVS
Variable
Input No
Input Name
6 7 8 9
VFA ALK SRT OLR
Variable
Table 4 MLP neural network models MLP Network Pattern
Training Algorithm
Error Function
Hidden Layer Activation Function
Output Layer Activation Function
Percentage Model
5-20-1
LM
MSE
Tansig
Tansig
Biogas Production Model
4-15-1
LM
MSE
Tansig
Tansig
Biogas Quality And Biogas Production Model
9-30-2
LM
MSE
Tansig
Tansig
Model Name
Table 5 Prediction accuracy of MLP neural network models Model Name
Output
MAE
MSE
RMSE
Percentage Model
CH %
0.5524
0.4618
0.6796
0.91814
Biogas Production Model
Biogas Production (m /Day)
105.4026
21196
145.5876
0.89038
CH %
0.5938
0.6113
0.7819
0.90887
Biogas Production (m /Day)
207.8454
84991
291.5319
0.9135
Biogas Quality And Biogas Production Model
Table 6a Optimization results of methane percentage model Methane Percentage Model
Optimal Input Values
T (°C)
pH
TS (mg/lt)
VFA (mg/lt)
ALK (mg/lt)
35.4
6.86
31751
8.78
2754
Maximum Percentage Value: 66.5 % (Minimum CO2 % and Other Contents` percentage = 33.5 %)
Elapsed Time: 21.85 seconds Increase in the % regarding to the average observed data: 4.3 % Decrease in the % and other contents` percentage regarding to the average observed data: 7.6 %
Table 6b Optimization results of biogas production model Biogas Production Model
Optimal Input Values
SLR (m3/day)
T (°C)
pH
403.79
35
6.85
SRT (Day)
18.3
Maximum Biogas Production Value: 3459 (m /Day)
Elapsed Time: 19.95 seconds Increase in the biogas production regarding to the average observed data: 71 %
2
Table 6c Optimization results of biogas quality and biogas production model Biogas Quality And Biogas Production Model
Input Name
Optimal Input Values Input Name Optimal Input Values
SLR (m3/day)
T (°C)
pH
TS (mg/lt)
371.5
35.8
6.87
22090
VFA (mg/lt)
ALK (mg/lt)
SRT (Day)
OLR (kg/.day)
17.04
3934
18.05
2.02
TVS (mg/lt)
18361
Maximum Percentage Value: 66.8 % (Minimum CO2 % and Other Contents` percentage = 33.2 %) Maximum Biogas Production Value: 3322 (m /Day)
Elapsed Time: 46.30 seconds Increase in the % regarding to the average observed data: 4.8 % Increase in the biogas production regarding to the average observed data: 64 % Decrease in the % and other contents` percentage regarding to the average observed data: 8.5 %
3
Biogas Biogas
Anaerobic Digester
Sludge From FInal Clarifiers Sludge From Preliminary Treatment
Excess Biogas
Biogas Tank Biogas
Sludge Blending Tank
Heat Exchanger
Flare Desulphurisation System Unit
Electricity
Dried Sludge Elevator
AC
Heat Heat
Cogeneration Unit
Sludge Drying Facility
Fig. 1. Biogas production system at HWTF
Fig. 2. Feature importance index of inputs, (a) methane percentage model (b) biogas production model
Start
bias
bias
Is prediction accuracy satisfied?
Database
Σʃ
Data Preprocessing
Data Normalization
NO
Σʃ
Σʃ
Input Data
Target Outputs
YES
Validate ANN model
Σʃ
The Creation of Training, Validation and Testing Data Sets
Σʃ
End Estimated Error Flow
Input Layer
Hidden Layer The Correction Of Random Weights
Output Layer The Correction Of Random Weights
Fig. 3a. The flow chart of MLP neural network with back propagation training algorithm
Fig. 3b. MLP neural network illustration of methane percentage model Fig. 3c. MLP neural network illustration of biogas production model Fig. 3d. MLP neural network illustration of biogas quality and biogas production model
Fig. 4a. Methane percentage model predicted and observed
%
Fig. 4b. Biogas production model predicted and observed biogas production (m3/Day)
Fig.4c. Biogas quality and biogas production model predicted and observed
%
Fig. 4d. Biogas quality and biogas production model predicted and observed biogas production (m3/Day)
Fig. 5a. Regression coefficient of CH4 % for methane percentage model with single output
Fig. 5b. Regression coefficient of biogas production (m3/Day) for biogas production model with single output
Fig. 5c. Biogas quality and biogas production model with two outputs: regression coefficients of
%
Fig. 5d. Biogas quality and biogas production model with two outputs: regression coefficients of biogas production (
/Day)
Fig. 6. Flow chart of PSO algorithm
Highlights Consistency and optimal control of biogas production system are provided. Biogas quality criterion is described and used as a PSO model output. Neural network simulation provides the integration of MLP neural network and PSO. The best particle positions in PSO model are used to determine maximized outputs.