# Prediction of Biogas Yield from Codigestion of Lignocellulosic Biomass Using Adaptive Neuro-Fuzzy Inference System (ANFIS) Model

Authors: Moses Oluwatobi Fajobi; Olumuyiwa Ajani Lasode; Adekunle Akanni Adeleke; Peter Pelumi Ikubanni; Ayokunle Olubusayo Balogun; Prabhu Paramasivam
Journal: Journal of Engineering
 (2023)

---

## Abstract

One of the major challenges confronting researchers is how to predict biogas yield because it is a herculean task since research in the field of modeling and optimization of biogas yield is still limited, especially with the adaptive neuro-fuzzy inference system (ANFIS). This study used ANFIS to model and predict biogas yield from anaerobic codigestion of cow dung, mango pulp, andChromolaena odorata. Asides from the controls, 13 experiments using various agglomerates of the selected substrates were carried out. Cumulatively (for 40 days), the agglomerate that comprised 50% cow dung, 25% mango pulp, and 25% Chromolaena odorata produced the highest volume of biogas, 4750 m3/kg, while the one with 50% cow dung, 12.5% mango pulp, and 37.5% Chromolaena odorata produced the lowest volume of biogas, 630 m3/kg. The data articulated for modeling were those of the optimum biogas yield. Data implemented for modeling comprised two inputs (temperature in Kelvin and pressure in kN/m2) and one output (biogas yield). The Gaussian membership function (Gauss-mf) was implemented for the fuzzification of input variables, while the hybrid algorithm was selected for the learning and mapping of the input-output dataset. The developed ANFIS architecture was simulated at varied membership functions, MFs, and epoch numbers to determine the minimum root mean square error, RMSE, and maximum R-squared R2 values. The one that fulfilled the conditions was considered to be the optimized model. The minimum RMSE and maximum R2 values recorded for the developed model are 14.37 and 0.99784, respectively. The implication is that the model was able to efficiently predict not less than 99.78% of the experimental data. These results prove that the ANFIS model is a reliable tool for modeling data and predicting biogas yield in the biomass anaerobic digestion process. Therefore, the use of the developed ANFIS model is recommended for biogas producers and other allies for predicting biogas yield adequately.


---

## Body

## 1. Introduction

In recent times, the energy crisis has ravaged the world at large with perceived consequences on mankind and the environment. The place of energy applications in the developmental course of any nation cannot be overemphasized because it is highly fundamental to nation-building and sustainability. The prominent energy sources are fossil fuels such as petroleum, diesel, kerosene, and liquefied natural gas, among others [1]. The application of fossil fuels is accompanied by various environmental pollution, such as the greenhouse gas effect, depletion of the ozone layer, ecological challenges, and climate disturbance, among others [2, 3]. It is in this connection that the need arises for other origins of alternative energy, which is capable of engineering sustainable development [4]. Biomass is categorized as organic or inorganic based on its compositions, most of which have been constituting a nuisance in the environment due to inappropriate waste disposal methods. With the use of pertinent energy conversion and recovery approaches such as pyrolysis, torrefaction, and anaerobic digestion, full energy optimization is realistic, especially biogas. Thus, energy retrieval from biomass without affecting the environment is recommended [5–8]. Biogas is characterized by colourless as well as flammable with a significant percentage of methane content (Table 1), which makes it a good substitute for conventional energy [9]. Anaerobic digestion is an energy recovery approach specifically used to convert biomass to biogas in an air-tight environment through a four-stage process that includes hydrolysis, acidogenesis, acetogenesis, and methanogenesis [10–13].Table 1
Constituents of biogas [9].
Biogas componentChemical formulaComposition (%)MethaneCH454.9 to 75Carbon dioxideCO234.9 to 45NitrogenN20 to 1HydrogenH20 to 1Hydrogen sulphideH2S1 to 2OxygenO2Insignificant amountsCarbon monoxideCOInsignificant amounts[19].One of the new major challenges confronting researchers is how to predict biogas yield because it is an extremely difficult task since research in the field of modeling and optimization of biogas yield is still limited [11, 14]. Among other numerous conventional machine learning software which had previously been applied to predict biogas yield are the artificial neural network (ANN), genetic algorithm (GA), adaptive neuro-fuzzy inference system (ANFIS), and logistic methods. Dibaba et al. [15] used the ANN to model some anaerobic parameters and biogas yield. It was reported that the output tracked the targets consistently. This was confirmed by the R2 values recorded for the chemical oxygen demand (COD) removal (0.9063), the total suspended solids (TSS) (0.9152), volatile fatty acid (VFA) (0.9557), and biogas yield (0.9152). Wang et al. [16] used machine learning for the prediction of biogas generation from organic biomass when codigested anaerobically. The multilayer perceptron (MLP) model was compared with the Tree-based Pipeline Optimization Tool (TPOT) model. TPOT (R2 = 0.72) outperformed the MLP (R2 = 0.56). About 10% root mean square error (RMSE) was recorded for the TPOT; however, 14% RMSE was recorded for the MLP test dataset. Dinneya-Onuoha and Oyoh [8] reported that the modified Gompertz model had a superior performance in biogas yield prediction with a 0.9949 R2 value. Conversely, the logistic growth model had a much lower R2 value of 0.9920 when used for the prediction of biogas yield. Because the model considered the interactions of the core factors that aid biogas generation, it is proposed to be a highly useful tool for the optimization of the anaerobic digestion process. Further refinements, however, are still essentially required for monitoring input and output parameters frequently. Fajobi et al. [17] reported that among the prominent input parameters that influence biogas yield (output) are temperature and pressure because they are crucial to the effective anaerobic digestion process. Because as the temperature increases the methanogens react within the confinement of the digester and the rate of biogas production is increased thus inducing pressure [3]. In this connection, advanced models that consider the understanding of complex anaerobic digestion systems and kinetics are necessary. Fuzzy and neural models had been previously applied in the process of monitoring and predicting biogas yield in anaerobic digestion [18]. ANFIS is a system that is leveraged on the first-order Sugeno fuzzy model. It implements either a backpropagation algorithm solely or the use of a hybrid learning algorithm in a situation whereby the neural-network adaptive potentials, as well as fuzzy logic qualitative nature, are found matched together [19]. ANFIS has also found diverse applications, especially in anaerobic digestion and biogas production [18–22], geomatics engineering [23, 24], civil engineering [25], biomedical sciences [26], and power engineering [27]. Thus ANFIS has demonstrated superior performance in the prediction and approximation of the nonlinear relationship between multi-input and output.Heydari et al. [19] developed ANN and ANFIS models for the prediction of the biogas produced from spearmint essential oil wastewater treatment in an upflow anaerobic sludge blanket digester. The statistics of the ANN model were R2-square, 0.956, RMSE, 2651 mL/d, and a relative RMSE of 0.234%. At the same time, the statistics of the ANFIS model were R2-square, 0.975, RMSE, 3516 mL/d, and relative RMSE of 0.316%. These showed that the two artificial intelligence-based models were excellent tools for estimating biogas yield. Ikpe et al. [18] reported that the use of the ANFIS network for estimating and predicting biogas yield in anaerobic digestion systems is still scanty and requires further practical applications. Unlike other conventional models, the construction of ANFIS models is easier and requires less stress because the rules are implemented based on the data trend. Also, new datasets and seasonal changes are adaptable for the training of ANFIS models [22, 28]. Therefore, it facilitates flexible usability for the user so that the model can be modified and updated as and when due [22]. Given the human need for optimum energy recovery, quantitative and qualitative fuel, economic value, and resource administering, further research in machine learning for predicting biogas yield becomes highly essential. The novelty of this study is based on the conception that several biogas yields have been previously predicted with the use of machine learning; however, biogas yield from the codigestion of cow dung, mango pulp, and Chromolaena odorata using the ANFIS model is yet to be carried out. The combination of several biomass to form an agglomerate for anaerobic digestion has been reported to be sound and proactive, not for complementary purposes alone but also for enhanced biogas yield. This is because of the various inherent properties of biomass that are desirable for anaerobic digestion. If one property is lacking in one biomass, it is provided by the other [29]. This formed the rationale behind the choice and blending of cow dung, mango pulp, and Chromolaena odorata. Aside from that, green leaves (such as Chromolaena odorata), when blended with other lignocellulosic biomass, enhanced biogas production [17]. Also, at the moment, no ANFIS graphical user interface (ANFIS-GUI) has been developed for the selected biomass. Therefore, the objective of this study was to develop and evaluate the ANFIS-based model and ANFIS-GUI for predicting the biogas yield of cow dung, mango pulp, and Chromolaena odorata.


## 2. Methodology

### 2.1. Materials

The raw materials which served as biomass codigested in this study were cow dung (50%), waste mango pulp (25%), andChromolaena odorata (25%), all obtained from Ogbomoso, Nigeria (8° 8′ 31.78ʺ N, 4° 1′ 42.69ʺ E). The biomass had previously been characterized through proximate, ultimate, and compositional analyses. The results of the analyses were reported by Fajobi et al. [17]. Each biomass (formulates) (Table 2) was pounded in a mortar with the aid of a pestle until a soggy mass is reached. The slurry was prepared such that the ratio of the biomass to water was 1 : 2 by weight and was stirred continuously to ensure homogeneity and proper bacteria activities on the organic matter [30]. The slurry was later screened through a sieve of 1 mm pore to remove the fibres and other foreign materials. Then, each resulting slurry was ingested into the digesters and hermetically sealed for proper anaerobic digestion under mesophilic conditions (Table 2). So, other temperature ranges (thermophilic and psychrophilic) were not considered in this study. A total of 40 days’ hydraulic retention time (HRT) was observed while daily temperature and pressure were recorded for determining the biogas yield using equations (1)–(3) according to Ogunkunle et al. [31]:(1)R=R0Mx% Composition,(2)RMixture=RCO2+RCH4,(3)V=RMixturexTDigesterPe,where R = specific gas constant of a gas, measured in J/kgK; Ro = universal gas constant, measured in J/kgK; M = molecular mass of peculiar gas; RMixture = sum of specific gas constants of CH4 and CO2 content of the produced biogas; Pe = digester daily pressure, measured in kN/m2; TDigester = digester daily temperature, measured in Kelvin; and V = specific volume of the daily biogas produced, measured in m3/kg.Table 2
Experimental biomass formulates.
S/NDigester (code name)Cow dung (kg)Mango pulp (kg)Chromolaena odorata leaves (kg)Biomass weight (kg)Water quantity (kg)Working volume (kg)1A8——816242B—8—816243C——8816244D413816245E422816246F431816247G44—816248H341816249I2428162410J1438162411K—448162412L1348162413M2248162414N3148162415O4—481624


### 2.2. Anaerobic Digestion of Biomass

A total volume of 0.074 m3 digester was designed and fabricated with the use of locally sourced materials. The digester was designed to suit the condition of an anaerobic digestion process (complete absence of oxygen). After loading the digester with the prepared slurry, the daily temperature (in Kelvin) was taken using the digital temperature data logger (model: 877 with a type K thermocouple), and the pressure (measured in kN/m2) using the digital pressure gauge (model no: model CPG500 with a measuring range from 0.1 to +150 kN/m2) between the hours of 1300 and 1400 on each day of the HRT. Biogas analyzer (model no: 920 Series Continuous Biogas Analyzer) was used to analyze the constituents of the biogas samples. The gathered data were then presented in a Microsoft Excel spreadsheet, 2016 version, and consequently exported to MATLAB (Matrix Laboratory, Software R2018 version) interface where it was modeled using the ANFIS tool.


### 2.3. Theoretical Background of Adaptive Neuro-Fuzzy Inference System (ANFIS)

The ANFIS network was constructed to achieve the desired nonlinear mapping of experimental data made up of several input-output pairs of the target system. A data learning algorithm was carried out for parameter adjustments and to improve the network performance. This study also used a unique dataset for the verification of the developed model’s generalization strength. The ANFIS structure has five layers with two inputs,x and y, as shown in Figure 1. The ANFIS is a black-box model that only supports the mapping of multiple inputs and a single output. The square nodes in Figure 1 are also acknowledged as adaptive nodes, which implies that they can be learned as well as adjusted to suit the data trend. However, the circle nodes, referred to as fixed nodes, imply that the parameters are fixed. Generally, two fuzzy if-then rules commonly adopted for the ANFIS are shown in equations (4)–(10) [32]:(4)Rule1:ifxisA1andyisB1,thenf1=p1x+q1x+r1,(5)Rule2:ifxisA2andyisB2,thenf2=p2x+q2x+r2,where A and B stand as value ranges defined by the user. The interpretations of the layers presented in Figure 1 are explained from subsection 2.3.1– 2.3.5. The interpretations of the layers presented in Figure 1 go thus:Figure 1
Equivalent ANFIS structure. (adapted from [22, 32, 33]).


#### 2.3.1. Layer 1

It is a square node provided with a node function:(6)OiL=μAix.Assumingx and y are the values of two typical inputs supplied at the two input nodes. The node subsequently transformed the supplied values to the membership functions such as Tri-mf (triangular mf), Trap-mf (trapezoidal mf), Gbell-mf (generalized-bell-shaped mf), Gauss-mf (Gaussian mf), Gauss2-mf (Gaussian2 mf), Pi-mf (pi-shaped mf), Dsig-mf (D-sigmoidal mf), and Psig-mf (P-sigmoidal mf). OiL represents the membership function of Ai, while x is the input parameter supplied to the node. Ai is the linguistic label connected with the node function.


#### 2.3.2. Layer 2

This is where the incoming signal is multiplied before the product is sent out. Here, individual node output serves as the firing strength of a rule whereWi represents the membership function of Ai.(7)Wi=μAixxμAiy,i=1,2.


#### 2.3.3. Layer 3

(1) Circle Node. This is the circle node where the ratio of the i-th rule’s firing strength to the sum of all rules’ firing strengths is being calculated:(8)wi′=wiw1+w2,i=1,2.


#### 2.3.4. Layer 4

This is a square node with a peculiar node function:(9)Oi4=wi′fi,=wi′pix+qix+ri,where p, q, and r are the parameter sets for consequent, linear, and parameters, respectively.


#### 2.3.5. Layer 5

(1) Circle Node. The addition of all incoming signals is being carried out here, and the resulting value represents the overall output.(10)Oi5=Overall output,=∑iwi′f,=∑iwifi∑iwi.Concisely, layer 1 computes the membership grades, layer 2 combines the membership grades to form the firing strengths, layer 3 normalizes the firing strengths, layer 4 generates the contribution from each rule, and layer 5 produces the final output.


### 2.4. Modeling, Optimization, and Development of ANFIS for Predicting the Biogas Yield

Data implemented in the development of the ANFIS model were those recovered from codigestion of cow dung (50%), waste mango pulp (cherry species) (25%), andChromolaena odorata (locally known as Ewe Akintola) (25%) of Ogbomoso origin (8°8′ 31.78ʺN, 4°1′42.69ʺE), in South-western Nigeria. The network architecture for this study was built to have a premise and consequent parameters. A hybrid learning algorithm was selected for the building and training of the ANFIS model using the MATLAB R2018 interface. The gathered experimental data were categorized into two parts. 70% of the experimental data was used to train the ANFIS model, while the remaining 30% was used for process testing and validation of the system [22]. To enhance the reliability of the model via data categorization, a MATLAB programming code was written to automatically, randomly categorize, and partition the data into training and testing as well as validation datasets such that the former was odd-indexed data points and the latter even-indexed data points, respectively. For this purpose, the collected daily digester’s temperature (measured in kelvin) and pressure (measured in kN/m2) values were induced as the input variables while biogas yield (measured in m3/kg) was the predicted output. The membership function in the ANFIS is a function that brings back the membership degree of how a crisp (defined) value is mapped to an input space known as the universe of discourse. To determine the best fit ANFIS model, a total number of eight membership functions was used in the ANFIS structure training, with each input having seven numbers of membership functions, i.e., input 1 (temperature) and input 2 (pressure) having 7 and 7 numbers of membership functions, respectively. The following are the various membership functions (MFs) that were investigated before the optimized one was adopted considering the highest R2, RMSE, and MAE values, namely; Tri-mf (triangular mf), Trap-mf (trapezoidal mf), Gbell-mf (Generalized-bell-shaped mf), Gauss-mf (Gaussian MF), Gauss2-mf (Gaussian2 mf), Pi-mf (pi-shaped mf), Dsig-mf (D-sigmoidal mf), and Psig-mf (P-sigmoidal mf). Grid partition was used to generate the ANFIS structure using 40 epochs. The training of the ANFIS structure was then actuated for model generation using the combinations of each membership function type and number, and the corresponding RMSE and MAE values were. A high number of membership functions performs adequately for the training of the model (overfitting). However, having a fewer number of membership functions may result in unsatisfactory convergence (underfitting) [34]. Therefore, to overcome these, this study used a trial and error method to determine the appropriate number of membership functions and epochs [35]. The epochs, membership functions, and numbers were adjusted systematically to overcome the overfitting and underfitting of the model. The selected membership functions are peculiar to ANFIS because they serve as the thinking faculty of the system, such that the reasoning of each of them differs [36]. Therefore, the motivation to investigate the choice membership functions was to determine the optimized ANFIS model when evaluated by the coefficient of determination, R2 value, RMSE, and mean absolute error (MAE) because the lower the RSME and MAE, the higher and superior the model’s predictions become [19]. Each type and number of the membership functions were simulated over the ANFIS architecture to arrive at the best ANFIS model. Each membership function is characterized by a shape that serves as each point in a specified input partition. For instance, Talpur et al. [37] stated that Gauss-mf with a curve utilizes only two parameters to optimize after the model’s training such that c is used for locating the centre and σ was used to determine the width of the curve as expressed mathematically by equation (11). The highest R2 value, least RMSE, and MAE indicated the optimized ANFIS model which was eventually used for the biogas yield predictions. Equation (12) was used to determine the training RMSE [22], and the R2 value obtained for matching the experimental and predicted data was determined using equation (13) [33]. MAE was determined using equation (14) [34]. The computation flow chart used in this study for ANFIS model development is shown in Figure 2.(11)gaussianx,c,σ=e−1/2x−c/σ2,(12)the RMSE=1n∑i=1nai−pi2,where ai represents the experimental value at instance i, pi implies the predicted value at instance i, and n implies the number of training data points.(13)R2=1−∑i=1nP∗−P2∑i=1nPi∗2,where P∗ depicts the target value, and P depicts the model’s predicted value.(14)MAE=1n∑i=1nai−pi,where ai represents the experimental value at instance i, pi implies the predicted value at instance i, while n implies the number of training data points.Figure 2
Computation flow chart implemented for ANFIS model development [38].


### 2.5. Graphical User Interface for Predicting Biogas Yield

The graphical user interface development environment (GUIDE) tool embedded in MATLAB was used to develop the graphical user interface (GUI) for this study. This was used to lay out the interface of the developed biogas yield predictor GUI. The following features of GUIDE were used accordingly: static text box was selected for all the noneditable texts on the interface, such as the caption (biogas yield predictor), temperature (kelvin), and pressure (kN/m2) and biogas yield (m3/kg). An edit text box was used to present the unit for inputting the values of temperature and pressure (two yellow colour boxes). A static text box was selected for displaying the biogas yield (in the green box). Pushbutton was used to engineer the evaluation of the ANFIS model based on the input values. Therefore, once clicked, the corresponding biogas yield will be displayed in the yellow static text box. The GUI was adapted such that it is easy to navigate and determine the corresponding biogas yield on its interface. It was also developed such that it requires little or no technical know-how for its operation. Hence, domestic/commercial individuals who are or are not in the area of renewable energy studies, such as biogas production, can use it effectively for predicting the biogas yield.


## 2.1. Materials

The raw materials which served as biomass codigested in this study were cow dung (50%), waste mango pulp (25%), andChromolaena odorata (25%), all obtained from Ogbomoso, Nigeria (8° 8′ 31.78ʺ N, 4° 1′ 42.69ʺ E). The biomass had previously been characterized through proximate, ultimate, and compositional analyses. The results of the analyses were reported by Fajobi et al. [17]. Each biomass (formulates) (Table 2) was pounded in a mortar with the aid of a pestle until a soggy mass is reached. The slurry was prepared such that the ratio of the biomass to water was 1 : 2 by weight and was stirred continuously to ensure homogeneity and proper bacteria activities on the organic matter [30]. The slurry was later screened through a sieve of 1 mm pore to remove the fibres and other foreign materials. Then, each resulting slurry was ingested into the digesters and hermetically sealed for proper anaerobic digestion under mesophilic conditions (Table 2). So, other temperature ranges (thermophilic and psychrophilic) were not considered in this study. A total of 40 days’ hydraulic retention time (HRT) was observed while daily temperature and pressure were recorded for determining the biogas yield using equations (1)–(3) according to Ogunkunle et al. [31]:(1)R=R0Mx% Composition,(2)RMixture=RCO2+RCH4,(3)V=RMixturexTDigesterPe,where R = specific gas constant of a gas, measured in J/kgK; Ro = universal gas constant, measured in J/kgK; M = molecular mass of peculiar gas; RMixture = sum of specific gas constants of CH4 and CO2 content of the produced biogas; Pe = digester daily pressure, measured in kN/m2; TDigester = digester daily temperature, measured in Kelvin; and V = specific volume of the daily biogas produced, measured in m3/kg.Table 2
Experimental biomass formulates.
S/NDigester (code name)Cow dung (kg)Mango pulp (kg)Chromolaena odorata leaves (kg)Biomass weight (kg)Water quantity (kg)Working volume (kg)1A8——816242B—8—816243C——8816244D413816245E422816246F431816247G44—816248H341816249I2428162410J1438162411K—448162412L1348162413M2248162414N3148162415O4—481624


## 2.2. Anaerobic Digestion of Biomass

A total volume of 0.074 m3 digester was designed and fabricated with the use of locally sourced materials. The digester was designed to suit the condition of an anaerobic digestion process (complete absence of oxygen). After loading the digester with the prepared slurry, the daily temperature (in Kelvin) was taken using the digital temperature data logger (model: 877 with a type K thermocouple), and the pressure (measured in kN/m2) using the digital pressure gauge (model no: model CPG500 with a measuring range from 0.1 to +150 kN/m2) between the hours of 1300 and 1400 on each day of the HRT. Biogas analyzer (model no: 920 Series Continuous Biogas Analyzer) was used to analyze the constituents of the biogas samples. The gathered data were then presented in a Microsoft Excel spreadsheet, 2016 version, and consequently exported to MATLAB (Matrix Laboratory, Software R2018 version) interface where it was modeled using the ANFIS tool.


## 2.3. Theoretical Background of Adaptive Neuro-Fuzzy Inference System (ANFIS)

The ANFIS network was constructed to achieve the desired nonlinear mapping of experimental data made up of several input-output pairs of the target system. A data learning algorithm was carried out for parameter adjustments and to improve the network performance. This study also used a unique dataset for the verification of the developed model’s generalization strength. The ANFIS structure has five layers with two inputs,x and y, as shown in Figure 1. The ANFIS is a black-box model that only supports the mapping of multiple inputs and a single output. The square nodes in Figure 1 are also acknowledged as adaptive nodes, which implies that they can be learned as well as adjusted to suit the data trend. However, the circle nodes, referred to as fixed nodes, imply that the parameters are fixed. Generally, two fuzzy if-then rules commonly adopted for the ANFIS are shown in equations (4)–(10) [32]:(4)Rule1:ifxisA1andyisB1,thenf1=p1x+q1x+r1,(5)Rule2:ifxisA2andyisB2,thenf2=p2x+q2x+r2,where A and B stand as value ranges defined by the user. The interpretations of the layers presented in Figure 1 are explained from subsection 2.3.1– 2.3.5. The interpretations of the layers presented in Figure 1 go thus:Figure 1
Equivalent ANFIS structure. (adapted from [22, 32, 33]).


### 2.3.1. Layer 1

It is a square node provided with a node function:(6)OiL=μAix.Assumingx and y are the values of two typical inputs supplied at the two input nodes. The node subsequently transformed the supplied values to the membership functions such as Tri-mf (triangular mf), Trap-mf (trapezoidal mf), Gbell-mf (generalized-bell-shaped mf), Gauss-mf (Gaussian mf), Gauss2-mf (Gaussian2 mf), Pi-mf (pi-shaped mf), Dsig-mf (D-sigmoidal mf), and Psig-mf (P-sigmoidal mf). OiL represents the membership function of Ai, while x is the input parameter supplied to the node. Ai is the linguistic label connected with the node function.


### 2.3.2. Layer 2

This is where the incoming signal is multiplied before the product is sent out. Here, individual node output serves as the firing strength of a rule whereWi represents the membership function of Ai.(7)Wi=μAixxμAiy,i=1,2.


### 2.3.3. Layer 3

(1) Circle Node. This is the circle node where the ratio of the i-th rule’s firing strength to the sum of all rules’ firing strengths is being calculated:(8)wi′=wiw1+w2,i=1,2.


### 2.3.4. Layer 4

This is a square node with a peculiar node function:(9)Oi4=wi′fi,=wi′pix+qix+ri,where p, q, and r are the parameter sets for consequent, linear, and parameters, respectively.


### 2.3.5. Layer 5

(1) Circle Node. The addition of all incoming signals is being carried out here, and the resulting value represents the overall output.(10)Oi5=Overall output,=∑iwi′f,=∑iwifi∑iwi.Concisely, layer 1 computes the membership grades, layer 2 combines the membership grades to form the firing strengths, layer 3 normalizes the firing strengths, layer 4 generates the contribution from each rule, and layer 5 produces the final output.


## 2.3.1. Layer 1

It is a square node provided with a node function:(6)OiL=μAix.Assumingx and y are the values of two typical inputs supplied at the two input nodes. The node subsequently transformed the supplied values to the membership functions such as Tri-mf (triangular mf), Trap-mf (trapezoidal mf), Gbell-mf (generalized-bell-shaped mf), Gauss-mf (Gaussian mf), Gauss2-mf (Gaussian2 mf), Pi-mf (pi-shaped mf), Dsig-mf (D-sigmoidal mf), and Psig-mf (P-sigmoidal mf). OiL represents the membership function of Ai, while x is the input parameter supplied to the node. Ai is the linguistic label connected with the node function.


## 2.3.2. Layer 2

This is where the incoming signal is multiplied before the product is sent out. Here, individual node output serves as the firing strength of a rule whereWi represents the membership function of Ai.(7)Wi=μAixxμAiy,i=1,2.


## 2.3.3. Layer 3

(1) Circle Node. This is the circle node where the ratio of the i-th rule’s firing strength to the sum of all rules’ firing strengths is being calculated:(8)wi′=wiw1+w2,i=1,2.


## 2.3.4. Layer 4

This is a square node with a peculiar node function:(9)Oi4=wi′fi,=wi′pix+qix+ri,where p, q, and r are the parameter sets for consequent, linear, and parameters, respectively.


## 2.3.5. Layer 5

(1) Circle Node. The addition of all incoming signals is being carried out here, and the resulting value represents the overall output.(10)Oi5=Overall output,=∑iwi′f,=∑iwifi∑iwi.Concisely, layer 1 computes the membership grades, layer 2 combines the membership grades to form the firing strengths, layer 3 normalizes the firing strengths, layer 4 generates the contribution from each rule, and layer 5 produces the final output.


## 2.4. Modeling, Optimization, and Development of ANFIS for Predicting the Biogas Yield

Data implemented in the development of the ANFIS model were those recovered from codigestion of cow dung (50%), waste mango pulp (cherry species) (25%), andChromolaena odorata (locally known as Ewe Akintola) (25%) of Ogbomoso origin (8°8′ 31.78ʺN, 4°1′42.69ʺE), in South-western Nigeria. The network architecture for this study was built to have a premise and consequent parameters. A hybrid learning algorithm was selected for the building and training of the ANFIS model using the MATLAB R2018 interface. The gathered experimental data were categorized into two parts. 70% of the experimental data was used to train the ANFIS model, while the remaining 30% was used for process testing and validation of the system [22]. To enhance the reliability of the model via data categorization, a MATLAB programming code was written to automatically, randomly categorize, and partition the data into training and testing as well as validation datasets such that the former was odd-indexed data points and the latter even-indexed data points, respectively. For this purpose, the collected daily digester’s temperature (measured in kelvin) and pressure (measured in kN/m2) values were induced as the input variables while biogas yield (measured in m3/kg) was the predicted output. The membership function in the ANFIS is a function that brings back the membership degree of how a crisp (defined) value is mapped to an input space known as the universe of discourse. To determine the best fit ANFIS model, a total number of eight membership functions was used in the ANFIS structure training, with each input having seven numbers of membership functions, i.e., input 1 (temperature) and input 2 (pressure) having 7 and 7 numbers of membership functions, respectively. The following are the various membership functions (MFs) that were investigated before the optimized one was adopted considering the highest R2, RMSE, and MAE values, namely; Tri-mf (triangular mf), Trap-mf (trapezoidal mf), Gbell-mf (Generalized-bell-shaped mf), Gauss-mf (Gaussian MF), Gauss2-mf (Gaussian2 mf), Pi-mf (pi-shaped mf), Dsig-mf (D-sigmoidal mf), and Psig-mf (P-sigmoidal mf). Grid partition was used to generate the ANFIS structure using 40 epochs. The training of the ANFIS structure was then actuated for model generation using the combinations of each membership function type and number, and the corresponding RMSE and MAE values were. A high number of membership functions performs adequately for the training of the model (overfitting). However, having a fewer number of membership functions may result in unsatisfactory convergence (underfitting) [34]. Therefore, to overcome these, this study used a trial and error method to determine the appropriate number of membership functions and epochs [35]. The epochs, membership functions, and numbers were adjusted systematically to overcome the overfitting and underfitting of the model. The selected membership functions are peculiar to ANFIS because they serve as the thinking faculty of the system, such that the reasoning of each of them differs [36]. Therefore, the motivation to investigate the choice membership functions was to determine the optimized ANFIS model when evaluated by the coefficient of determination, R2 value, RMSE, and mean absolute error (MAE) because the lower the RSME and MAE, the higher and superior the model’s predictions become [19]. Each type and number of the membership functions were simulated over the ANFIS architecture to arrive at the best ANFIS model. Each membership function is characterized by a shape that serves as each point in a specified input partition. For instance, Talpur et al. [37] stated that Gauss-mf with a curve utilizes only two parameters to optimize after the model’s training such that c is used for locating the centre and σ was used to determine the width of the curve as expressed mathematically by equation (11). The highest R2 value, least RMSE, and MAE indicated the optimized ANFIS model which was eventually used for the biogas yield predictions. Equation (12) was used to determine the training RMSE [22], and the R2 value obtained for matching the experimental and predicted data was determined using equation (13) [33]. MAE was determined using equation (14) [34]. The computation flow chart used in this study for ANFIS model development is shown in Figure 2.(11)gaussianx,c,σ=e−1/2x−c/σ2,(12)the RMSE=1n∑i=1nai−pi2,where ai represents the experimental value at instance i, pi implies the predicted value at instance i, and n implies the number of training data points.(13)R2=1−∑i=1nP∗−P2∑i=1nPi∗2,where P∗ depicts the target value, and P depicts the model’s predicted value.(14)MAE=1n∑i=1nai−pi,where ai represents the experimental value at instance i, pi implies the predicted value at instance i, while n implies the number of training data points.Figure 2
Computation flow chart implemented for ANFIS model development [38].


## 2.5. Graphical User Interface for Predicting Biogas Yield

The graphical user interface development environment (GUIDE) tool embedded in MATLAB was used to develop the graphical user interface (GUI) for this study. This was used to lay out the interface of the developed biogas yield predictor GUI. The following features of GUIDE were used accordingly: static text box was selected for all the noneditable texts on the interface, such as the caption (biogas yield predictor), temperature (kelvin), and pressure (kN/m2) and biogas yield (m3/kg). An edit text box was used to present the unit for inputting the values of temperature and pressure (two yellow colour boxes). A static text box was selected for displaying the biogas yield (in the green box). Pushbutton was used to engineer the evaluation of the ANFIS model based on the input values. Therefore, once clicked, the corresponding biogas yield will be displayed in the yellow static text box. The GUI was adapted such that it is easy to navigate and determine the corresponding biogas yield on its interface. It was also developed such that it requires little or no technical know-how for its operation. Hence, domestic/commercial individuals who are or are not in the area of renewable energy studies, such as biogas production, can use it effectively for predicting the biogas yield.


## 3. Results and Discussion

### 3.1. Biomass and Biogas Characterizations

The results for the proximate, ultimate, and compositional analyses are presented in Table3. The results are revelations of the suitability of the selected materials for anaerobic codigestion. Each exhibited the acceptable range of characteristics desired of typical biomass [17]. Therefore, they were considered appropriate, and consequently, their data were articulated for ANFIS modeling.Table 3
Biomass characterization.
BiomassCow dungMango pulpChromolaena odorataProximate analysis (%)Volatile matter (wet basis)5.026.877.79Volatile matter (dry basis)60.7562.7871.49Moisture content (wet basis)85.8285.7783.11Moisture content (dry basis)10.9811.359.89Ash content (wet basis)1.911.141.88Ash content (dry basis)5.603.855.12Fixed carbon (wet basis)7.256.227.22Fixed carbon (dry basis)22.6722.0213.50VM/FC0.691.101.07Calorific values (MJ/kg)Calorific value14.3713.7716.16Ultimate analysis (%)Carbon (C)43.0839.9841.69Hydrogen (H)7.876.749.86Nitrogen (N)1.531.341.51Sulphur (S)0.460.120.25Oxygen (O)47.0651.8246.69C/N ratio (no unit)28.1629.8427.61H/C (no unit)0.190.170.24O/C (no unit)1.091.291.12Compositional analysis (%)Hemicellulose10.767.4711.37Lignin6.330.220.90Cellulose12.033.715.15%NDF41.6947.9049.80%ADF29.1940.7032.78∗Values represent the average value for respective analyses (Source: [17]).Figure3 shows the biogas yields of the respective anaerobic codigestion of cow dung, mango pulp, and Chromolaena odorata. Cumulatively, formulate E (cow dung, 50%, mango pulp, 25%, and Chromolaena odorata, 25%) produced the highest volume of biogas, 4750 m3/kg, while formulate D (cow dung, 50%, mango pulp, 12.5%, and Chromolaena odorata, 37.5%) produced the lowest volume of biogas, 630 m3/kg. At the same time, other formulates produced biogas intermediately. Also, Table 4 compares the biogas yield of current and previous studies, and it showed that various biomass is/are viable feedstock for anaerobic sole or codigestion. Generally, the results showed that the combination of various lignocellulose biomass is a formidable and rich feedstock for anaerobic processes targeted at a high yield of biogas. Especially where the blends are adequate and proportionate. The results obtained from the analyses conducted on the various biogas samples of the experiments carried out and their calorific values are presented. It specifically presents the compositions of the biogas in terms of methane (CH4), carbon dioxide (CO2), hydrogen sulphide (H2S), nitrogen (N2), oxygen (O2), and their water (H2O) contents. A total number of 15 experiments (with code names; A, B, C, D, E, F, G, H, I, J, K, L, M, N, and O) was set up with cells A, B, and C being the control. Noteworthy is the fact that measurements for all the analyses were made thrice, with the averages taken as the true values. Table 5 shows the results of the analyses conducted on the biogas samples. It was observed that sample O had the lowest percentage oxygen content of 0.59%. This effect was obvious in the corresponding methane content obtained for the same sample, O, which stood at 66%. The percentage oxygen content present in all the biogas samples ranged between 0.59 and 0.91%, i.e., approximately all biogas samples had <1% of oxygen, respectively. These results align with those obtained in the literature for similar lignocellulose biomass used in this study [31, 51]. Furthermore, the percentage methane contents obtained for samples I and K were also relatively as high as those of O. These results may be due to the biomass formations that were fed into the digesters, which were a combination of three biomass for digester I (cow dung 25%, mango pulp 50%, and Chromolaena odorata leave 25%) and two biomass forK (50% each of mango pulp and Chromolaena odorata). The literature has it that combining two or more biomass as feedstock for anaerobic digestion promises to yield biogas within a short while and with richness in the methane content [52]. Therefore, the methane contents of 61.81 and 61.57% obtained from samples I and K, respectively, within the retention time could be attributed to balanced C/N among the biomass because they complement themselves in terms of carbon and nitrogen contents which is suitable for any adequate anaerobic digestion process. Asides from the process parameters which influenced biogas yield, the intermittent changes in feedstock characteristics achieved by agitations are worthy of note because it enhances the removal of scum on the surfaces of the slurries, aids the breakdown of organic matter, and improves nutrient balance in the mixtures. Also, the synergetic effects among the codigested biomass were suggested to be contributory factors. Despite all, the results obtained could still clearly indicate the significant effect of the mixing ratio on the methane yield. Generally, all the samples analyzed gave reliable results in terms of biogas constituents because none of them had methane content that was below 51%. This makes each biogas sample suitable for combustion resulting in very good calorific values. It is reported that for any biogas to combust effectively, it must have at least methane content ranging between 45 and 55% [12, 30]. Meanwhile, none of the ones obtained for this study was less than the limit set by the previous studies, with the methane content of many of the samples exceeding the higher set limit. However, it could be necessary to undertake a purification process to separate other constituents in the form of impurities from the biogas and to have biogas purer in the methane content.Figure 3
Cumulative (40 days) biogas production for each of the digesters [38].Table 4
Comparison of methane yield of previous and present study.
BiomassPretreatmentMethane yieldReferenceCow dungUntreated6.50 LZulkifi et al. [39]Cow dungScreening (enzymatic hydrolysis process)6.91 LZulkifi et al. [39]Plantain peelsNR<30 mLMakinde and Odokuma [40]Plantain peels and cow dungNR>30 mLMakinde and Odokuma [40]Yam peelsNR<35 mLMakinde and Odokuma [40]Yam peels and cow dungNR>35 mLMakinde and Odokuma [40]Shorea wood waste and cow dungSoaking and filtration1999 mL against 822 mL (individual digestion)Amirta et al. [41]Grass and cow dungUntreated179.59 mLCH4/g VSaddedPrapinagsorn et al. [42]Silage and cow dungUntreated208.11 mLCH4/g VSaddedPrapinagsorn et al. [42]Grass and cow dungAlkaline plus enzyme treatment333.63 mLCH4/g VSaddedPrapinagsorn et al. [42]Silage and cow dungAlkaline plus enzyme treatment301.38 mLCH4/g VSaddedPrapinagsorn et al. [42]Cow dungNR1301.7INCH4kg−1FMOgunkunle et al. [31]Cow dung and jatropha cakeNR2656.0INCH4kg−1FMOgunkunle et al. [31]Cow dungNR0.31 mL·kgAsante-Sackey et al. [43]Cow dung and miscanthus fuscusNR0.46 mL·kgAsante-Sackey et al. [43]Sawdust waste, cow dung, and water hyacinthNR8–9%CH4 incrementMadu and Onwuamaeze [44]Cow dungUntreated0.63–5.84 L/weekKargwal et al. [45]Cow dung and pawpaw strawPawpaw soaked0.73–5.87 L/weekKargwal et al. [45]Cow manureNR439 mL/gVSaddedWei et al. [46]Maize strawNR198.33 mL/gVSaddedWei et al. [46]Cow manure and maize strawNR613.8 mL/gVSaddedWei et al. [46]Cow manure, maize straw, and sewage sludgeNR8052.0 mL/gVSaddedWei et al. [46]OrganicsUntreated53%Vrabie [47]PetrochemicalsUntreated56%Vrabie [47]PaperUntreated51%Vrabie [47]WoodUntreated52%Vrabie [47]LeatherUntreated34%Vrabie [47]Cotton and woolUntreated65%Vrabie [47]Acacia leaf wasteUntreated49.0 ± 5.3%Hirunsupachote et al. [48]Acacia leaf wasteAlkaline pretreatment199.6 ± 9.0%Hirunsupachote et al. [48]Sewage sludge and organic fraction of municipal solid wasteUntreated61%Ferrentino et al. [49]Water hyacinth (Eichhornia crassipes)Untreated213.92 mL g−1 VSKeche et al. [50]Cow dungUntreated62.52%Present study [38]Mango pulpUntreated51.81%Present study [38]Chromolaena odorataUntreated52.79%Present study [38]Cow dung and mango pulpUntreated52.89%Present study [38]Cow dung andChromolaena odorataUntreated66.85%Present study [38]Mango pulp andChromolaena odorataUntreated61.57%Present study [38]NR: not reported (a compilation of the [38]).Table 5
Constituents’ analyses of biogas samples [38].
Digesters (samples)CH4 (%)CO2 (%)H2S (%)N2 (%)O2 (%)H2O (%)A62.5227.931.120.400.681.34B51.8125.731.310.680.761.52C52.7926.681.100.490.781.51D51.9625.981.290.470.801.53E51.8925.951.250.620.841.49F54.1926.911.150.570.731.36G52.8926.511.340.650.851.59H52.6026.371.270.490.791.61I61.8129.171.110.390.651.32J52.0726.191.180.590.881.57K61.5728.941.130.410.671.29L52.8226.481.210.530.711.43M51.6725.521.360.720.911.63N52.7126.411.240.550.811.45O66.8528.961.090.350.591.27[18].


### 3.2. Adaptive Neuro-Fuzzy Modeling of Biogas Production from Cow Dung, Mango Pulp, andChromolaena Odorata

The scatter plot of the training and checking data after importing is presented in Figure4. The two prominent parameters (temperature and pressure) reported by previous studies were also confirmed in this study to strongly influence biogas production [45, 51]. Figure 4 presents the positions of each data point relative to the other in the ANFIS network. It revealed that the training data matched those of the checking data within the context.Figure 4
Scatter diagram of both the training and checking data.


### 3.3. Optimization of Membership Functions and Generation of ANFIS Structure

Table6 shows that Tri-mf, Trap-mf, Gbell-mf, Gauss-mf, Gauss2-mf, Pi-mf, Dsig-mf, and Psig-mf has RMSE values of 117.55, 173.77, 186.09, 14.37, 169.22, 52.63, 41.72, and 47.12, respectively. And MAE values 6.8213, 9.0987, 12.2345, 2.3123, 7.9057, 5.8726, 4.2914, and 4.7612, respectively. These depict that Gauss-mf has the least RSME (14.72) and MAE (4.2914) values. Consequently, the ANFIS structure for modeling and predictions was built using the Gauss-mf membership function because the ANFIS model, when developed with the minimal RMSE and MAE, i.e., ANFIS-Gauss-mf, gives actual prediction [53]. The plot of training and checking errors against the epoch number is shown in Figure 5. Training plot is in blue ink, while the checking plot is in brown ink. The optimized training RMSE is located in the small rectangle showing the coordinate (epoch number, 40, RMSE, 14.37) of the exact point where ANFIS training stopped. Points after this imply that the data pattern is no more training the structure but it is memorizing the data.Table 6
Optimization of ANFIS models.
Data pointTypes of ANFIS modelsNo. of mfEpochTrainingR2 valueTraining RMSETraining MAE160ANFIS-Tri-mf7, 7400.6451117.556.8213160ANFIS-Trap-mf7, 7400.3719173.779.0987160ANFIS-Gbell-mf7, 7400.2837186.0912.2345160ANFIS-Gauss-mf7, 7400.997814.372.3123160ANFIS-Gauss2-mf7, 7400.4819169.227.9057160ANFIS-Pi-mf7, 7400.745252.635.8726160ANFIS-Dsig-mf7, 7400.845141.724.2914160ANFIS-Psig-mf7, 7400.810747.124.7612Figure 5
Error curves for training (blue) and checking errors (brown).Plots of inputs’ initial and optimized Gauss-mf membership function for temperature (SupplementaryA) and pressure (Supplementary B) are attached as supplementary materials. Before and after optimization, smooth curves are observable in the Gaussian membership function (Gauss-mf). Compared with before optimization, slight shifts in the curves were observed in each case. These are indications of changes in the positions of the membership functions in terms of the degree of freedom relative to the dataset of pressure and temperature. This suggested the absolute judgement about the individual value of the dataset. Therefore, the ANFIS model predominantly utilized the pressure and temperature degradation signals for estimating the biogas yield. The ANFIS-Gauss-mf model structure that was developed with the use of the earlier optimized Gaussian membership function is represented in Figure 6. It was then used to model and predict the biogas yield. Evidently, from Figure 6, the input variables (temperature and pressure), membership function, rules, output membership function, and output (biogas yield) are in synergy with neurons. The observed neuron relationship is regarded as substantial, highly robust, and guarded against discrepancies. The structure has an excellent ability to learn the kinematics of the data used for the model development [53]. Artificial intelligence (AI) models, on the other hand, are a set of flexible structural interconnectivity in-between layers and nodes which are linked together to execute the desired function [54].Figure 6
Generated ANFIS model structure for prediction.


### 3.4. The Effectiveness of the ANFIS Model

The effectiveness of the developed ANFIS model for adequate predictions is demonstrated in Figures7 and 8. Figure 7 shows a parity plot (regression analysis) where the ANFIS predicted data (vertical axis) and experimental data (horizontal axis) are designated on the x-axis and y-axis, respectively. Also, Figure 7 reveals that ANFIS prediction has an R2 value of 0.99784. R2 is a statistical index that is used in the regression model for the determination of the proportion of variance in factors (temperature and pressure) that can be accounted for by the output variable (biogas yield). It could also be inferred that the R2 value depicts the level (the goodness of fit) to which the data fit the regression model. Fajobi et al. [55] reported that in statistics, the smaller RMSE metrics are an indication of the model’s correctness, implying that it is better. However, a high R2 value revealed the level of conformity degree amongst the experimental and the predicted data. It implies that 99.8% of the dependent (biogas yield) variable was accurately predicted by the independent variables, i.e., temperature and pressure. Figure 7 further substantiates this fact through the plot of qualitative prediction efficiency (plot of training data versus that of ANFIS output) of the ANFIS model. Two scenarios were presented therein: the first is the representation of typical accurate prediction, and the second are those that are almost accurately predicted. Affirmatively, all these proved the efficacy of the developed ANFIS model [36]. Two important measures often applied to establish the difference between the model predicted and the real data are the RMSE and MAE. They are also used to give a general overview of deviations as well as error distributions [52, 56]. The values of RMSE and MAE observable in Table 6 for the Gauss-mf are considered relatively small enough compared to others. They are sufficient to demonstrate that the error distributions for the ANFIS model are negligible. When the ANFIS model showed small error distributions, it is an indication of how reliable the projected data are. Furthermore, the developed ANFIS model was compared with other conventional models found in the previous studies to validate the developed model (Table 7). Observably, the developed ANFIS model was to a great extent effective, and it predicted biogas yield more efficiently compared to other models because it is just a few of the list in Table 7 has an R2 value greater than that of the ANFIS model (R2 = 0.9978). Also, the variability observed in the R2 values could be attributed to the type of model, the methodology embraced, and the nature of the historical data that was modeled.Figure 7
Effectiveness of the ANFIS prediction (parity plot).Figure 8
Effectiveness of the ANFIS prediction (qualitative plot).Table 7
Comparison of developed ANFIS and previous models found in the literature.
Model typeInputOutputValidation (R2 value)ReferenceANFISDelivery speed, break draft, and distance between the back and middle rollsBreaking strength0.4800Fallahpour and Moghassem [57]Gene expression programming (GEP) modelsDelivery speed, break draft, and distance between the back and middle rollsBreaking strength0.8700Fallahpour and Moghassem [57]Multilayered feed-forward neural networkMass amount of pineapple peel, pH of the inlet, COD of the inlet, volatile fatty acids (VFA) of the inlet, and volatile solids (VS) of the inletVS of the outlet, the volume of biogas, and the methane fraction of biogas0.9942Jaroenpoj et al. [58]ANFISpH, temperature, time, yeast extraction concentration, and K2HPO4Polygalacturonase activity0.9780Uzuner and Cekmecelioglu [59]ANNpH, temperature, time, yeast extraction concentration, and K2HPO4Polygalacturonase activity1.0000Uzuner and Cekmecelioglu [59]ANFISCherry tomatoes, storage temperature, and storage timePhysicochemical and microbiological parameters>0.86Tao et al. [60]ANFISSolar radiation, relative humidity, total dissolved solids of the feed, total dissolved solids of the brine, and feed flow rateSolar still productivity0.9900Mashaly and Alazba [61]ANFISVelocity distribution and CFD iteration timeTemperature0.9990Babanezhad et al. [62]ANNCutting speed, feed rate, and depth of cutMetal removal rate and tool wear0.9210Sada and Ikpeseni [63]ANFISCutting speed, feed rate, and depth of cutMetal removal rate; tool wear0.7300Sada and Ikpeseni [63]Bayesian-ANFISClass record and exam performanceStudent performance0.7990Makolo and Olapojoye [64]ANFISTemperature and pressureBiogas yield0.9978Present study [38]Mapping of input(s) to output, termed the fuzzy logic aspect of ANFIS modeling, requires essential rules, and the expected number of rules is expressed asKd. The number of input membership functions is denoted by K, while the number of independent data input factors is denoted by d [36]. In this study, seven (7) numbers of membership functions were appropriated for each of the two inputs (meaning 72 for this study). Therefore, utilizing a 7 by 7 matrix resulted in a total of 49 rules generated by the ANFIS model. The set of rules is being triggered to make predictions upon the creation of the ANFIS structure. By this, other data points that are beyond the scope of those experimentally obtained can be predicted accordingly. The trend observed is in proximity to that of the experimental data. The graphical user interface adapted to ease the projection of biogas yield upon supply of temperature in kelvin and pressure in kN/m2 is presented in Figure 9.Figure 9
Graphical user interface, GUI for biogas yield prediction.


## 3.1. Biomass and Biogas Characterizations

The results for the proximate, ultimate, and compositional analyses are presented in Table3. The results are revelations of the suitability of the selected materials for anaerobic codigestion. Each exhibited the acceptable range of characteristics desired of typical biomass [17]. Therefore, they were considered appropriate, and consequently, their data were articulated for ANFIS modeling.Table 3
Biomass characterization.
BiomassCow dungMango pulpChromolaena odorataProximate analysis (%)Volatile matter (wet basis)5.026.877.79Volatile matter (dry basis)60.7562.7871.49Moisture content (wet basis)85.8285.7783.11Moisture content (dry basis)10.9811.359.89Ash content (wet basis)1.911.141.88Ash content (dry basis)5.603.855.12Fixed carbon (wet basis)7.256.227.22Fixed carbon (dry basis)22.6722.0213.50VM/FC0.691.101.07Calorific values (MJ/kg)Calorific value14.3713.7716.16Ultimate analysis (%)Carbon (C)43.0839.9841.69Hydrogen (H)7.876.749.86Nitrogen (N)1.531.341.51Sulphur (S)0.460.120.25Oxygen (O)47.0651.8246.69C/N ratio (no unit)28.1629.8427.61H/C (no unit)0.190.170.24O/C (no unit)1.091.291.12Compositional analysis (%)Hemicellulose10.767.4711.37Lignin6.330.220.90Cellulose12.033.715.15%NDF41.6947.9049.80%ADF29.1940.7032.78∗Values represent the average value for respective analyses (Source: [17]).Figure3 shows the biogas yields of the respective anaerobic codigestion of cow dung, mango pulp, and Chromolaena odorata. Cumulatively, formulate E (cow dung, 50%, mango pulp, 25%, and Chromolaena odorata, 25%) produced the highest volume of biogas, 4750 m3/kg, while formulate D (cow dung, 50%, mango pulp, 12.5%, and Chromolaena odorata, 37.5%) produced the lowest volume of biogas, 630 m3/kg. At the same time, other formulates produced biogas intermediately. Also, Table 4 compares the biogas yield of current and previous studies, and it showed that various biomass is/are viable feedstock for anaerobic sole or codigestion. Generally, the results showed that the combination of various lignocellulose biomass is a formidable and rich feedstock for anaerobic processes targeted at a high yield of biogas. Especially where the blends are adequate and proportionate. The results obtained from the analyses conducted on the various biogas samples of the experiments carried out and their calorific values are presented. It specifically presents the compositions of the biogas in terms of methane (CH4), carbon dioxide (CO2), hydrogen sulphide (H2S), nitrogen (N2), oxygen (O2), and their water (H2O) contents. A total number of 15 experiments (with code names; A, B, C, D, E, F, G, H, I, J, K, L, M, N, and O) was set up with cells A, B, and C being the control. Noteworthy is the fact that measurements for all the analyses were made thrice, with the averages taken as the true values. Table 5 shows the results of the analyses conducted on the biogas samples. It was observed that sample O had the lowest percentage oxygen content of 0.59%. This effect was obvious in the corresponding methane content obtained for the same sample, O, which stood at 66%. The percentage oxygen content present in all the biogas samples ranged between 0.59 and 0.91%, i.e., approximately all biogas samples had <1% of oxygen, respectively. These results align with those obtained in the literature for similar lignocellulose biomass used in this study [31, 51]. Furthermore, the percentage methane contents obtained for samples I and K were also relatively as high as those of O. These results may be due to the biomass formations that were fed into the digesters, which were a combination of three biomass for digester I (cow dung 25%, mango pulp 50%, and Chromolaena odorata leave 25%) and two biomass forK (50% each of mango pulp and Chromolaena odorata). The literature has it that combining two or more biomass as feedstock for anaerobic digestion promises to yield biogas within a short while and with richness in the methane content [52]. Therefore, the methane contents of 61.81 and 61.57% obtained from samples I and K, respectively, within the retention time could be attributed to balanced C/N among the biomass because they complement themselves in terms of carbon and nitrogen contents which is suitable for any adequate anaerobic digestion process. Asides from the process parameters which influenced biogas yield, the intermittent changes in feedstock characteristics achieved by agitations are worthy of note because it enhances the removal of scum on the surfaces of the slurries, aids the breakdown of organic matter, and improves nutrient balance in the mixtures. Also, the synergetic effects among the codigested biomass were suggested to be contributory factors. Despite all, the results obtained could still clearly indicate the significant effect of the mixing ratio on the methane yield. Generally, all the samples analyzed gave reliable results in terms of biogas constituents because none of them had methane content that was below 51%. This makes each biogas sample suitable for combustion resulting in very good calorific values. It is reported that for any biogas to combust effectively, it must have at least methane content ranging between 45 and 55% [12, 30]. Meanwhile, none of the ones obtained for this study was less than the limit set by the previous studies, with the methane content of many of the samples exceeding the higher set limit. However, it could be necessary to undertake a purification process to separate other constituents in the form of impurities from the biogas and to have biogas purer in the methane content.Figure 3
Cumulative (40 days) biogas production for each of the digesters [38].Table 4
Comparison of methane yield of previous and present study.
BiomassPretreatmentMethane yieldReferenceCow dungUntreated6.50 LZulkifi et al. [39]Cow dungScreening (enzymatic hydrolysis process)6.91 LZulkifi et al. [39]Plantain peelsNR<30 mLMakinde and Odokuma [40]Plantain peels and cow dungNR>30 mLMakinde and Odokuma [40]Yam peelsNR<35 mLMakinde and Odokuma [40]Yam peels and cow dungNR>35 mLMakinde and Odokuma [40]Shorea wood waste and cow dungSoaking and filtration1999 mL against 822 mL (individual digestion)Amirta et al. [41]Grass and cow dungUntreated179.59 mLCH4/g VSaddedPrapinagsorn et al. [42]Silage and cow dungUntreated208.11 mLCH4/g VSaddedPrapinagsorn et al. [42]Grass and cow dungAlkaline plus enzyme treatment333.63 mLCH4/g VSaddedPrapinagsorn et al. [42]Silage and cow dungAlkaline plus enzyme treatment301.38 mLCH4/g VSaddedPrapinagsorn et al. [42]Cow dungNR1301.7INCH4kg−1FMOgunkunle et al. [31]Cow dung and jatropha cakeNR2656.0INCH4kg−1FMOgunkunle et al. [31]Cow dungNR0.31 mL·kgAsante-Sackey et al. [43]Cow dung and miscanthus fuscusNR0.46 mL·kgAsante-Sackey et al. [43]Sawdust waste, cow dung, and water hyacinthNR8–9%CH4 incrementMadu and Onwuamaeze [44]Cow dungUntreated0.63–5.84 L/weekKargwal et al. [45]Cow dung and pawpaw strawPawpaw soaked0.73–5.87 L/weekKargwal et al. [45]Cow manureNR439 mL/gVSaddedWei et al. [46]Maize strawNR198.33 mL/gVSaddedWei et al. [46]Cow manure and maize strawNR613.8 mL/gVSaddedWei et al. [46]Cow manure, maize straw, and sewage sludgeNR8052.0 mL/gVSaddedWei et al. [46]OrganicsUntreated53%Vrabie [47]PetrochemicalsUntreated56%Vrabie [47]PaperUntreated51%Vrabie [47]WoodUntreated52%Vrabie [47]LeatherUntreated34%Vrabie [47]Cotton and woolUntreated65%Vrabie [47]Acacia leaf wasteUntreated49.0 ± 5.3%Hirunsupachote et al. [48]Acacia leaf wasteAlkaline pretreatment199.6 ± 9.0%Hirunsupachote et al. [48]Sewage sludge and organic fraction of municipal solid wasteUntreated61%Ferrentino et al. [49]Water hyacinth (Eichhornia crassipes)Untreated213.92 mL g−1 VSKeche et al. [50]Cow dungUntreated62.52%Present study [38]Mango pulpUntreated51.81%Present study [38]Chromolaena odorataUntreated52.79%Present study [38]Cow dung and mango pulpUntreated52.89%Present study [38]Cow dung andChromolaena odorataUntreated66.85%Present study [38]Mango pulp andChromolaena odorataUntreated61.57%Present study [38]NR: not reported (a compilation of the [38]).Table 5
Constituents’ analyses of biogas samples [38].
Digesters (samples)CH4 (%)CO2 (%)H2S (%)N2 (%)O2 (%)H2O (%)A62.5227.931.120.400.681.34B51.8125.731.310.680.761.52C52.7926.681.100.490.781.51D51.9625.981.290.470.801.53E51.8925.951.250.620.841.49F54.1926.911.150.570.731.36G52.8926.511.340.650.851.59H52.6026.371.270.490.791.61I61.8129.171.110.390.651.32J52.0726.191.180.590.881.57K61.5728.941.130.410.671.29L52.8226.481.210.530.711.43M51.6725.521.360.720.911.63N52.7126.411.240.550.811.45O66.8528.961.090.350.591.27[18].


## 3.2. Adaptive Neuro-Fuzzy Modeling of Biogas Production from Cow Dung, Mango Pulp, andChromolaena Odorata

The scatter plot of the training and checking data after importing is presented in Figure4. The two prominent parameters (temperature and pressure) reported by previous studies were also confirmed in this study to strongly influence biogas production [45, 51]. Figure 4 presents the positions of each data point relative to the other in the ANFIS network. It revealed that the training data matched those of the checking data within the context.Figure 4
Scatter diagram of both the training and checking data.


## 3.3. Optimization of Membership Functions and Generation of ANFIS Structure

Table6 shows that Tri-mf, Trap-mf, Gbell-mf, Gauss-mf, Gauss2-mf, Pi-mf, Dsig-mf, and Psig-mf has RMSE values of 117.55, 173.77, 186.09, 14.37, 169.22, 52.63, 41.72, and 47.12, respectively. And MAE values 6.8213, 9.0987, 12.2345, 2.3123, 7.9057, 5.8726, 4.2914, and 4.7612, respectively. These depict that Gauss-mf has the least RSME (14.72) and MAE (4.2914) values. Consequently, the ANFIS structure for modeling and predictions was built using the Gauss-mf membership function because the ANFIS model, when developed with the minimal RMSE and MAE, i.e., ANFIS-Gauss-mf, gives actual prediction [53]. The plot of training and checking errors against the epoch number is shown in Figure 5. Training plot is in blue ink, while the checking plot is in brown ink. The optimized training RMSE is located in the small rectangle showing the coordinate (epoch number, 40, RMSE, 14.37) of the exact point where ANFIS training stopped. Points after this imply that the data pattern is no more training the structure but it is memorizing the data.Table 6
Optimization of ANFIS models.
Data pointTypes of ANFIS modelsNo. of mfEpochTrainingR2 valueTraining RMSETraining MAE160ANFIS-Tri-mf7, 7400.6451117.556.8213160ANFIS-Trap-mf7, 7400.3719173.779.0987160ANFIS-Gbell-mf7, 7400.2837186.0912.2345160ANFIS-Gauss-mf7, 7400.997814.372.3123160ANFIS-Gauss2-mf7, 7400.4819169.227.9057160ANFIS-Pi-mf7, 7400.745252.635.8726160ANFIS-Dsig-mf7, 7400.845141.724.2914160ANFIS-Psig-mf7, 7400.810747.124.7612Figure 5
Error curves for training (blue) and checking errors (brown).Plots of inputs’ initial and optimized Gauss-mf membership function for temperature (SupplementaryA) and pressure (Supplementary B) are attached as supplementary materials. Before and after optimization, smooth curves are observable in the Gaussian membership function (Gauss-mf). Compared with before optimization, slight shifts in the curves were observed in each case. These are indications of changes in the positions of the membership functions in terms of the degree of freedom relative to the dataset of pressure and temperature. This suggested the absolute judgement about the individual value of the dataset. Therefore, the ANFIS model predominantly utilized the pressure and temperature degradation signals for estimating the biogas yield. The ANFIS-Gauss-mf model structure that was developed with the use of the earlier optimized Gaussian membership function is represented in Figure 6. It was then used to model and predict the biogas yield. Evidently, from Figure 6, the input variables (temperature and pressure), membership function, rules, output membership function, and output (biogas yield) are in synergy with neurons. The observed neuron relationship is regarded as substantial, highly robust, and guarded against discrepancies. The structure has an excellent ability to learn the kinematics of the data used for the model development [53]. Artificial intelligence (AI) models, on the other hand, are a set of flexible structural interconnectivity in-between layers and nodes which are linked together to execute the desired function [54].Figure 6
Generated ANFIS model structure for prediction.


## 3.4. The Effectiveness of the ANFIS Model

The effectiveness of the developed ANFIS model for adequate predictions is demonstrated in Figures7 and 8. Figure 7 shows a parity plot (regression analysis) where the ANFIS predicted data (vertical axis) and experimental data (horizontal axis) are designated on the x-axis and y-axis, respectively. Also, Figure 7 reveals that ANFIS prediction has an R2 value of 0.99784. R2 is a statistical index that is used in the regression model for the determination of the proportion of variance in factors (temperature and pressure) that can be accounted for by the output variable (biogas yield). It could also be inferred that the R2 value depicts the level (the goodness of fit) to which the data fit the regression model. Fajobi et al. [55] reported that in statistics, the smaller RMSE metrics are an indication of the model’s correctness, implying that it is better. However, a high R2 value revealed the level of conformity degree amongst the experimental and the predicted data. It implies that 99.8% of the dependent (biogas yield) variable was accurately predicted by the independent variables, i.e., temperature and pressure. Figure 7 further substantiates this fact through the plot of qualitative prediction efficiency (plot of training data versus that of ANFIS output) of the ANFIS model. Two scenarios were presented therein: the first is the representation of typical accurate prediction, and the second are those that are almost accurately predicted. Affirmatively, all these proved the efficacy of the developed ANFIS model [36]. Two important measures often applied to establish the difference between the model predicted and the real data are the RMSE and MAE. They are also used to give a general overview of deviations as well as error distributions [52, 56]. The values of RMSE and MAE observable in Table 6 for the Gauss-mf are considered relatively small enough compared to others. They are sufficient to demonstrate that the error distributions for the ANFIS model are negligible. When the ANFIS model showed small error distributions, it is an indication of how reliable the projected data are. Furthermore, the developed ANFIS model was compared with other conventional models found in the previous studies to validate the developed model (Table 7). Observably, the developed ANFIS model was to a great extent effective, and it predicted biogas yield more efficiently compared to other models because it is just a few of the list in Table 7 has an R2 value greater than that of the ANFIS model (R2 = 0.9978). Also, the variability observed in the R2 values could be attributed to the type of model, the methodology embraced, and the nature of the historical data that was modeled.Figure 7
Effectiveness of the ANFIS prediction (parity plot).Figure 8
Effectiveness of the ANFIS prediction (qualitative plot).Table 7
Comparison of developed ANFIS and previous models found in the literature.
Model typeInputOutputValidation (R2 value)ReferenceANFISDelivery speed, break draft, and distance between the back and middle rollsBreaking strength0.4800Fallahpour and Moghassem [57]Gene expression programming (GEP) modelsDelivery speed, break draft, and distance between the back and middle rollsBreaking strength0.8700Fallahpour and Moghassem [57]Multilayered feed-forward neural networkMass amount of pineapple peel, pH of the inlet, COD of the inlet, volatile fatty acids (VFA) of the inlet, and volatile solids (VS) of the inletVS of the outlet, the volume of biogas, and the methane fraction of biogas0.9942Jaroenpoj et al. [58]ANFISpH, temperature, time, yeast extraction concentration, and K2HPO4Polygalacturonase activity0.9780Uzuner and Cekmecelioglu [59]ANNpH, temperature, time, yeast extraction concentration, and K2HPO4Polygalacturonase activity1.0000Uzuner and Cekmecelioglu [59]ANFISCherry tomatoes, storage temperature, and storage timePhysicochemical and microbiological parameters>0.86Tao et al. [60]ANFISSolar radiation, relative humidity, total dissolved solids of the feed, total dissolved solids of the brine, and feed flow rateSolar still productivity0.9900Mashaly and Alazba [61]ANFISVelocity distribution and CFD iteration timeTemperature0.9990Babanezhad et al. [62]ANNCutting speed, feed rate, and depth of cutMetal removal rate and tool wear0.9210Sada and Ikpeseni [63]ANFISCutting speed, feed rate, and depth of cutMetal removal rate; tool wear0.7300Sada and Ikpeseni [63]Bayesian-ANFISClass record and exam performanceStudent performance0.7990Makolo and Olapojoye [64]ANFISTemperature and pressureBiogas yield0.9978Present study [38]Mapping of input(s) to output, termed the fuzzy logic aspect of ANFIS modeling, requires essential rules, and the expected number of rules is expressed asKd. The number of input membership functions is denoted by K, while the number of independent data input factors is denoted by d [36]. In this study, seven (7) numbers of membership functions were appropriated for each of the two inputs (meaning 72 for this study). Therefore, utilizing a 7 by 7 matrix resulted in a total of 49 rules generated by the ANFIS model. The set of rules is being triggered to make predictions upon the creation of the ANFIS structure. By this, other data points that are beyond the scope of those experimentally obtained can be predicted accordingly. The trend observed is in proximity to that of the experimental data. The graphical user interface adapted to ease the projection of biogas yield upon supply of temperature in kelvin and pressure in kN/m2 is presented in Figure 9.Figure 9
Graphical user interface, GUI for biogas yield prediction.


## 4. Conclusions and Recommendations

This study has developed an ANFIS model for efficient and accurate prediction of biogas yield from cow dung codigested with mango pulp andChromolaena odorata. Data collated from the anaerobic digestion of the selected biomass were modeled on the ANFIS. The results showed that the R2, RMSE, and MAE values of the optimized ANFIS model are 0.99784, 14.37, and 2.3123, respectively. Furthermore, considering the effectiveness metrics of all the membership functions investigated, the Gaussian membership function is observed to have a good matching ability compared to the other membership functions. Compared to other conventional models, the ANFIS model had superior accuracy. However, the nature of the data and model development approach are considered factors that influenced the results. The GUI developed will aid the use of the ANFIS model by biogas producers. Therefore, this study recommends the use of the developed ANFIS model for the prediction of biogas yield. Biogas producers and allied will find, in this model, an adequate working tool for the optimization of biogas yield.



---

*Source: 9335814-2023-02-06.xml*