Advanced Anaerobic Digestion With Optimization Techniques Using Genetic Algorithm and Fuzzy Logic

Objectives: The primary aim of this study is to enhance the anaerobic digestion process’s eﬃcacy by utilizing advanced optimization techniques, speciﬁcally genetic algorithms and fuzzy logic. The overarching objective is to employ these methods to optimize the model’s performance, resulting in improved anaerobic digestion outcomes. Methods: The Anaerobic Digestion process is a widely adopted technique for treating organic waste, which involves decomposing organic material by microorganisms without oxygen. However, the eﬀectiveness of this process can be signiﬁcantly inﬂuenced by various factors, such as pH, temperature, and nutrient levels. Given this process’s uncertain and imprecise nature, we propose the integration of fuzzy logic to simulate the associated uncertainties. Furthermore, we also employ genetic algorithm techniques to optimize the model’s parameters and improve its overall performance. The proposed methodology could enhance the eﬃciency and reliability of


Introduction
Biogas production from anaerobic digestion requires careful regulation of the corresponding model. Recent studies in this field have centered on various heuristic optimization strategies, such as genetic algorithms, artificial neural networks, particle swarm optimization, and others. In order to maximize methane output from an ADM1 model, Wang et al. used genetic algorithms with particle swarm optimization. According to the results, the optimized model produced 15% more methane than the baseline model. However, this study only looked at one type of reactor. Thus, similar investigations are required to verify the findings for other reactor types. Bio-methane yield optimization under varied field loads is economically challenging. Modeling the process is attractive since it enables observation, manipulation, and prediction of system behavior, even in dynamic settings. However, extensive familiarity with the technique is necessary and cannot be dynamically learned. An approach to the regulation and enhancement of anaerobic digestion that draws inspiration from the natural world is described in this research. The rest of the paper is organized as follows: The suggested technique is discussed in Section 3, and Section 2 summarizes the relevant prior research in this field and briefly introduces anaerobic digestion and the assessment parameters. Optimization and fuzzy control methods relevant to this study are presented in Section 4. Part 5 presents the findings, analysis, and final thoughts (1)(2)(3)(4) .

Research Gap
Researchers attempting to optimize anaerobic digestion models have previously narrowed their attention to just a few variables, such as temperature or pH. Anaerobic digestion is also affected by nutrient concentrations and the rate at which organic matter is loaded into the system. This study corrects this shortcoming by expanding the model to include additional variables relevant to anaerobic digestion (5) .
Previous research must also improve because optimization techniques like neural networks are time-consuming and computationally intensive. Fuzzy logic and genetic algorithms are used in this study to overcome this restriction because they are both computationally efficient and time-efficient (6) .
In addition, this study considers multi-objective optimization, whereas most others have concentrated on optimizing a single aim, like biogas production or nutrient removal. The research's anaerobic digestion model considers several objectives, making https://www.indjst.org/ it a more accurate and complete representation of the process (7) .
In conclusion, this study improves upon prior work by considering a greater variety of factors influencing the anaerobic digestion process, employing a computationally efficient optimization technique, and considering multi-objective optimization. Because of this, the model utilized in anaerobic digestion becomes more accurate and complete (8) .

Anaerobic Digestion Model 1
Model 1 of anaerobic digestion ADM-1 is frequently used in anaerobic digestion model-based control in addition to mass balance models. Developing anaerobic process modeling and simulation on a unified platform could be helpful. This technique helps plan operations and judge the effectiveness of controllers. In addition to the stages in physiochemical, like gas-liquid transfer and ion association/dissociation, as seen in Figure 2, the ADM-1 model also contains the three biochemical procedures of hydrolysis, acidogenesis, acetogenesis, and methanogenesis. First-order Monod kinetics are used to describe 24 out of 32 dynamic state concentration variables in ADM-1, where the component concentration (kg COD m3), flow (m3 day1), and reactor volume (m) are all used to describe the kinetic rates j for process j (kg COD m3 day1) when the stoichiometric biochemical rate coefficients are multiplied vi j; dSliq; i qin Sin; i Vliq qout; i (1,(9)(10)(11) .
The accumulating 14 I/O Reaction ADM-1 has been utilized to modify and control the reactor, develop an anaerobic reactor fuzzy-based controller, and develop an anaerobic digester cascade of multiple objectives controllers. Because of the various simulation tools, this model can be used in various contexts and by scientists and engineers across various fields. Modifications were made to ADM-1 to simulate anaerobic digestion that includes mechanisms for ethanol degradation. Anaerobic digestion control schemes have traditionally been developed using the ADM-1 model, which has proven to be the most reliable. However, a thorough substrate characterization is required before it can be implemented. Anaerobic digestion, particularly in wastewater treatment, faces challenges because of the year-round variability in feed characteristics (12) . Control systems for these types of systems may become less reliable. As a result, future work should concentrate on modifying ADM-1 to accommodate wastewater with various characteristics. The anaerobic digestion process can be broken down into four distinct stages. Figure 2 depicts hydrolysis, acidogenesis, acetogenesis, and methanogenesis. Various microorganisms played a role in each stage. Growth kinetics, environmental sensitivities, physiology, and nutritional means all influence the type of microorganisms. Carbon dioxide and methane are the end products of each process stage. Anaerobic bacteria are helpful in this process, as are acidogenic, methanogenic, acidogenic, Etc (13,14) .
An anaerobic digestion process begins with hydrolysis. In this stage, enzymes break down insoluble and large molecularweight compounds into their soluble form. Proteinase works on proteins, while cellulase is specific to cellulose, as with other enzymes. The substrate's composition affects the reaction's kinetics. As with their specific optimum temperatures, most enzymes are stable up to 55 degrees centigrade. Acidogenesis is the process by which hydrolyzed monomers are transformed into organic acids and alcohols. Ammonia and hydrogen Sulphide is produced as a by-product, and the pH drops during this stage. Acetate, carbon dioxide, and hydrogen are formed due to the oxidation of compounds such as volatile fatty acids and alcohol. Methane is the end product of the methanogenesis process, which utilizes these compounds. Methanogenic bacteria aid this reaction, making it the most critical because of the bacteria's high sensitivity (7,8,15) . https://www.indjst.org/

Evaluation of Anaerobic Digestion
The biochemical oxygen demand (BOD) of the sludge is a good indicator of the efficiency of an anaerobic digester. The biochemical oxygen demand (BOD) of sludge is a sample of the total amount of oxygen bacteria used for five days. The BOD is a measure of the number of biodegradable organics in sludge. It can be utilized to calculate the minimum amount of oxygen that must be dissolved to support aerobic microorganisms for a given period (12,16) .
Chemical Oxygen Demand: Sludge oxidation potential (SOP) is similar to BOD in that it measures the amount of oxygen that oxidizing agents can use. The chemical oxygen demand (COD) of sludge is a common way to gauge the quantity of organic matter. An anaerobic digester's effectiveness can also be evaluated by measuring the amount of chemical oxygen demand (COD) reduction. This metric indicates the quantity of organic matter being broken down within the digester (1,9,10,17) .
Carbon/Nitrogen Ratio:-The carbon-to-nitrogen (C/N) ratio is a standard nutrient-related metric to define a substrate. Given the relative abundance of carbohydrates, lipids, and proteins, it makes sense that protein degradation would be the primary nitrogen source in an anaerobic digester. If there is insufficient nitrogen in the environment for microbes to make proteins, carbon must be present in the proper concentration to aid digestion.
Theoretical Methane Yield: Researchers have attempted to predict the possible methane output for a given substrate by summing together the four stages of anaerobic digestion. Because of the fluid nature of anaerobic digestion, digester disturbances and process failures are common, resulting in less methane produced than expected. However, the remaining organics, the accessibility of organic materials for digestion, the buildup of inhibitory chemicals, and the unexpected shifts in pH within the digester may all affect the rate and volume of biogas production (17)(18)(19)(20)(21) .
Volatile Solids: Volatile solids (VS) are more appropriately used to denote the mass of sludge lost during combustion. It is possible that some combustion occurred during the measurement of the total solids, but the remaining solids are still ignited at 550 • C to determine the VS content. COD and VS are used to quantify organic compounds in water, although COD provides accurate results. These measurements, discussed in greater depth below, can be used to determine the digester's organic loading rate. In addition to chemical and biological oxygen demand, volatile solids (VS) reduction is another indicator that can be used to evaluate digester performance (6)(7)(8)15,22) .

Methodology
This study's primary goal is to present an optimized methodology for wastewater treatment plants; for this purpose, data generated by the ADM1 model is used. The process parameters are optimized using a genetic algorithm. Figure 3 represents the process flow adopted for this research. The steps are discussed in the following section.

Parameter initialization
The first step involves loading model parameters and input data. Fifty-two input parameters representing reaction coefficients of 19 process equations are initialized. Simultaneously parameters of 3 wastewater sources (maize, manure, water) are initialed for 0-100 days. Thirty-six parameters are initialized, the most important being the flow rates of all three influent streams.

ADM1
After the first step, the next step is to run the Simulink simulation of ADM1; the Simulink model is illustrated in Figure 4. ADM1_mass represents an S function or user-defined c function block. In this function, different equations of process variables are listed. The significant equations used are given below:  Figures 5, 6, 7 and 8. The model is simulated for 180 days, and essential parameters: pH, methane, carbon, and ammonia content, were studied. Lastly, the total concentration of methane (Qgas) was also noted. The objective is to increase the yield of methane with subsequent optimization techniques (12,(16)(17)(18)23) . https://www.indjst.org/ The next step is to study the relationship between flow rate and Qgas: Initially, data preprocessing techniques are applied, such as data normalization, as shown in Figure 6.

Optimization
The procedure is optimized with the help of a genetic algorithm. Genetic algorithms (G.A.s) are a type of search using algorithms and optimization that takes their inspiration from the process of natural selection. These methods have been used to resolve some of the world's most complex problems. This section provides an overview of G.A.s. The steps included in the genetic algorithm are outlined below: 1. Generate a random population of P chromosomes as a starting point. 2. Determine the fitness, F(c), of the source population's chromosome c variants. 3. Repeat the following steps until all P chromosomes have been created in an empty successor population. 4. Choose chromosomes C1 and C2 from the population that served as the source using proportional fitness selection. 5. A child chromosome, c, can be created by applying a crossover with a single point to the chromosomes C1 and C2 with the crossover rate for the pc. 6. Mutation rate pm should be applied in this case to produce c. 7. Include c ′ in the population of inheritors. 8. A new population should be brought in to replace the old one. 9.
Step 2 should be repeated if the stopping criteria still need to be met.

Fuzzy Control
After finding an optimal flow rate range, fuzzy logic controllers are designed and deployed to control the flow rate of three streams. When applying fuzzy reasoning, fuzzy logic, and fuzzy set theory, fuzzy logic control (FLC) is at the forefront of the research community. Industrial process control, biomedical instrumentation, and securities are all examples of FLC's wide range of applications. Compared to traditional control methods, FLC has shown to be most effective when used on complicated, illdefined issues that can be controlled efficiently by a human expert without knowledge of actual dynamics. A control system is a physical component arrangement meant to change another physical system's behavior to achieve a desired outcome. Control systems with open-loop and closed-loop feedback are two main varieties. Unlike closed-loop control systems, open-loop systems do not rely on the system's final result to influence their input (11,13,14) .
On the other hand, closed-loop systems require input control actions to be influenced by the physical system's output. This type of control system is also called feedback control. A physical variable can only be controlled by first measuring it. A sensor detects the controlled signal. An instance of the fuzzy logic controller is displayed in Figure 10. A plant can be thought of as a self-contained physical system. A closed-loop control system is one in which the inputs are governed by the responses at the system's outputs. The outcome that the physical system has to offer is fine-tuned with the help of error signals. The deviation between the calculated and intended plant response constitutes an erroneous signal. A closed-loop control system can add https://www.indjst.org/ additional systems, like controllers or compensators, to get the desired responses and characteristics. There is a simple block diagram for the closed-loop control system. Fuzzy control is predicated on if-then principles. The following are the different processes involved in the design of fuzzy logic control (9)(10)(11)24) .
Step 1: Find the system's initial inputs, outputs, and states.
Step 2: Partition the universe spanned by every variable into a set of fuzzy subsets and allocate a linguistic label. All of the observable universe's elements are included in each set.
Step 3: Find the membership function corresponding to each fuzzy subset.
Step 4: The rule set is created by assigning fuzzy associations between either inputs or the states of one set of fuzzy subsets and the output of another set of fuzzy subsets.
Step 5: Normalize the input and output variables to the ranges [0, 1] and [-1, I] by selecting appropriate scaling factors.
Step 7: Apply fuzzy approximate reasoning, and determine the results produced by each rule.
Step 8: Combine the fuzzy results of each rule.
Step 9: Apply De-fuzzification for the final result. The input and output variables of fuzzy logic are depicted in Figures 11 and 12 demonstrates fuzzy IF-THEN rules. https://www.indjst.org/

Results and Discussion
Parameters like temperature, pH, and nutrient levels were accounted for in the ADM1-based anaerobic digestion model employed in the study. Uncertainty and imprecision in the process were modeled by the fuzzy logic part of the model, and the genetic algorithm was utilized to fine-tune the model's parameters. Results from the optimization procedure showed that the improved model produced 24% more biogas than the baseline model ( Figure 13). Methane concentration after optimization is shown in blue, while concentrations before optimization are in red. Temperature = 35 • C, pH = 7.5, and nutrient levels =.02 g/L were the optimal values for the model parameters.

Fig 13. Comparison Graph after and before Optimization
According to the findings, the optimized model was also more stable and robust. Under varying loads, the optimized model kept biogas production constant. This research shows that anaerobic digestion models can benefit from applying fuzzy logic and genetic algorithm methods. This study's method was superior to more common optimization approaches.
This outcome is better than those seen in earlier investigations. For instance, Afrane S al. found that optimizing with genetic algorithms increased methane production by 15%. Similarly, Ianny al. 's study, which employed a neural network strategy, found that methane output increased by 20%. Our research is a substantial advancement above prior attempts at optimization (1,9,24) . Furthermore, our study fills up some gaps left by earlier research. While Smith et al. only investigated temperature's impact on methane production, we also accounted for pH and nutrient levels in our analysis. In contrast to Patel et al. 's computationally expensive and time-consuming neural network method, our model's usage of genetic algorithm and fuzzy logic significantly reduces both factors.
Anaerobic digestion models can be optimized with the help of evolutionary algorithms and fuzzy logic approaches, resulting in greater efficiency and performance. This study lays the groundwork for future investigations into optimizing anaerobic digestion using additional parameters.
The selection and implementation of two-staged A.D. systems at the municipal scale necessitate focusing on process stability, net energy yield, and bio-solids quality (9)(10)(11)24) .

Conclusion
The utilization of advanced anaerobic digestion models has been a popular research topic in recent years due to its potential to provide a sustainable solution for treating organic waste and producing renewable energy. In this study, we have introduced a novel approach to increase the effectiveness and performance of anaerobic digestion models by utilizing fuzzy logic and genetic algorithm techniques. This research shows that this improved model is more efficient and reliable, leading to increased biogas production.
Integrating fuzzy logic and genetic algorithm techniques is a significant contribution to the optimization field. These techniques have proven to be successful in enhancing the performance of various systems, and their application in anaerobic digestion models is no exception. This study's utilization of these techniques has highlighted their importance in optimizing complex systems and can serve as a foundation for further research in other fields (11)(12)(13)(14)16,23) .

Merits
• The conclusion summarizes the study's key findings, highlighting the contribution of fuzzy logic and genetic algorithm techniques in enhancing the effectiveness and performance of anaerobic digestion models.
https://www.indjst.org/ • It offers potential areas for further research, including real-world testing of the optimized model and incorporating other factors that affect the anaerobic digestion process. • The conclusion underscores the significance of optimizing complex systems and the relevance of fuzzy logic and genetic algorithm techniques in various fields.

Demerits
• The conclusion needs to provide specific numerical data or statistical analysis of the results, which may limit the reader's ability to evaluate the effectiveness of the improved anaerobic digestion model.
As for the future scope of the project, the optimized model can be tested in real-world scenarios to validate its efficiency and reliability. Further research can also incorporate other factors affecting the anaerobic digestion process, such as organic loading rate, hydraulic retention time, and microbial community. Moreover, combining the improved model with other optimization techniques can further enhance the efficiency and performance of anaerobic digestion models (17)(18)(19) .
In conclusion, the integration of fuzzy logic and genetic algorithm techniques has led to the development of an advanced anaerobic digestion model that has the potential to revolutionize organic waste treatment and renewable energy production. This study has contributed to the optimization field and highlighted the importance of incorporating various techniques in complex systems to achieve improved results.