Integration of Artiﬁcial Intelligence into Biogas Plant Operation

: In the biogas plants, organic material is converted to biogas under anaerobic conditions through physical and biochemical processes. From supply of the raw material to the arrival of the products to customers, there are serial processes which should be sufﬁciently monitored for optimizing the efﬁciency of the whole process. In particular, the anaerobic digestion process, which consists of sequential complex biological reactions, requires improved monitoring to prevent inhibition. Conventional implemented methods at the biogas plants are not adequate for monitoring the operational parameters and ﬁnding the correlation between them. As Artiﬁcial Intelligence has been integrated in different areas of life, the integration of it into the biogas production process will be inevitable for the future of the biogas plant operation. This review paper ﬁrst examines the need for monitoring at the biogas plants with giving details about the process and process monitoring as well. In the following sections, the current situation of implementations of Artiﬁcial Intelligence in the biogas plant operation and in the similar industries will be represented. Moreover, considering that all the information gathered from literature and operational needs, an implementation model will be presented.


Introduction
The primary energy consumption of the world increased by 51,000 TWh between 2000 and 2019, from 122,000 TWh to 173,000 TWh. During this time, the highest increases were observed at the electricity supplied from oil, coal and natural gas [1]. Germany plans to have clean energy sources by 2038 with the strategy of replacing nuclear energy, coal and oil, which have the biggest contribution for energy production today. According to 'Climate Action Plan 2050 of Germany', 40% of greenhouse gas by 2020, 55% by 2030, 80-95% by 2050 should be reduced with base year of 1990 [2]. Renewable energy gained importance by means of innovation and incentives between the years 2006-2012, after 2012 the applications for patents decreased [3]. In addition, the number of publications were analysed using "renewable energy" keyword on the Scopus Website, which presented a decrease in the number of publications after 2018 [4].
In 2014, biogas shared 7.6% of total renewable energy production in Europe, which were used for electricity, heat and biofuel production [5]. The average growth rate of electricity produced from biogas dropped between the years 2016-2017 compared to growth between 2014 and 2016 [6]. According to the European Commission, the share of renewable energy in the total energy consumption should be 32% by 2030 [7].
Anaerobic digestion (AD) is a biochemical process conducted by various kinds of microorganisms to produce biogas from complex organic materials in anaerobic conditions. Several substrates are implemented in the process as substrate, such as animal excrements, agricultural residues, organic wastes from industries, organic fraction of municipal solid crements, agricultural residues, organic wastes from industries, organic fraction of municipal solid waste, food waste, sewage sludge and dedicated energy crops [8]. To supply a suitable environment for the microorganisms, adequate process monitoring is required [9].
Artificial Intelligence (AI), which briefly is the usage of data science to be able to create predictive and self-deciding systems and environments and provides efficient alternative for conventional methods, has made great progress in various areas in recent years [10][11][12]. As it is commonly used in other industries, artificial intelligence tools can be used for designing and optimizing complex AD process [13,14]. In addition, future biogas plants in Germany will be operated more flexibly than today regarding maintenance and production of biogas, which will require improved monitoring [15][16][17]. Integration of artificial intelligence into the monitoring can supply efficient predictive maintenance that brings flexibility to the process [18]. Demand-driven electricity feed into the electricity grid can be realized with flexible biogas plants instead of storing the produced energy [19,20].
This paper inspects the current situation of the implementation of artificial intelligence in biogas plant technologies with determining general process needs and possible areas for the integration of the future oriented technologies for optimizing the process.

Overview of the Process
Within the AD process, biomass is converted to biogas through complex biochemical serial reactions. The produced biogas is processed in the Combined Heat and Power (CHP) Plant unit to produce heat and electricity [21]. Generally, a biogas plant includes a storage area for biomass, pre-treatment, digester where the biochemical process is conducted, biogas processing units and digestate processing units (see Figure 1) [8,[21][22][23]. Four different criteria are determined to define process features in the anaerobic digestion, such as, Total Solids (TS) content of the digestate (dry digestion or wet digestion) type of feeding (continuous, semi-continuous or discontinuous), number of phases (single-stage or two-stage) and process temperature (psychrophilic, mesophilic and thermophilic) [24].
Energy crops, agricultural residues, bio and municipal solid waste, industrial waste and sewage are the mainly used substrates in Europe's biogas plants [25]. Several pretreatment technologies can be implemented to (1) obtain a faster AD process, (2) increase the biogas yield, (3) utilize available substrates, and prevent problems at the process. Generally, pre-treatment methods can be classified as represented in Table 1 [24]. Four different criteria are determined to define process features in the anaerobic digestion, such as, Total Solids (TS) content of the digestate (dry digestion or wet digestion), type of feeding (continuous, semi-continuous or discontinuous), number of phases (single-stage or two-stage) and process temperature (psychrophilic, mesophilic and thermophilic) [24].
Energy crops, agricultural residues, bio and municipal solid waste, industrial waste and sewage are the mainly used substrates in Europe's biogas plants [25]. Several pretreatment technologies can be implemented to (1) obtain a faster AD process, (2) increase the biogas yield, (3) utilize available substrates, and prevent problems at the process. Generally, pre-treatment methods can be classified as represented in Table 1 [24].

Stages of the AD Process
The AD process consists of four sequential stages; hydrolysis, acidogenesis, acetogenesis and methanogenesis as presented in Figure 2. The microorganisms taking part at each stage varies based on physiology, nutrition needs, growth kinetics and sensitivity to the environmental conditions. Carbohydrates, proteins and lipids are converted to CO 2 and CH 4 within four stages of the AD process, where facultative anaerobic bacteria, acidogenic bacteria, acetogenic bacteria and methanogenic bacteria are taking part [26,27].
Hydrolysis is the first stage of the AD process, where the conversion of insoluble materials and high molecular mass compounds into the soluble form through enzymatic reactions occurs. Specific enzymes take part in the conversion process of different kind of substrates, such as proteinase for proteins, cellulase for cellulose, lipase for fats etc. [28]. The composition of the substrate plays an important role at the kinetics of the reaction [27]. Although each enzyme has its own optimum temperature range, most of the enzymes are stable up to 55 • C [29,30]. The monomers produced in the hydrolysis stage are converted into organic acids and alcohols in the acidogenesis stage [27]. In that stage, decrease at the pH value and production of by products (ammonia and hydrogen sulfide) are observed [31]. In the third stage, products like Volatile Fatty Acids (VFA) and alcohol are oxidized into acetate, hydrogen and carbon dioxide to be used by methanogens for the generation of the final product, methane [26,27,32]. In the last phase, hydrogen and carbon dioxide are converted into methane by methanogenic microorganisms. That phase is most critical phase, due to the high sensitivity of the methanogenic bacteria [27,31].

Operational Parameters of the Biogas Plant
The efficiency of the AD process is dependent on various parameters, such as feedstock composition (FC), reactor design (RD), inhibitors and toxins (I and T), TS and Volatile Solids (VS) contents, Organic Loading Rate (OLR), Hydraulic Retention Time (HRT), Volatile Fatty Acids (VFA), pH and temperature (T) (see Figure 2).
Feedstock composition: Agricultural residues, energy crops, sewage sludge, biowaste and municipal solid waste and industrial food and beverage waste are mainly used substrates in the biogas plants in Europe [25,33]. Particle size, TS content and C/N ratio are significant parameters and has effect on process efficiency and design of the process [21,34]. The required ratio of macronutrients for survival of the microorganisms is C:N:P:S = 600:15:5:1 [35].
Reactor design: A biogas plant consists of storage and treatments, digestion unit, gas storage, pipework and armatures and gas transformation unit. The amount and composition of the substrate has direct effect on the design of the components in the process [36].
Inhibitors/toxins: Ammonia, sulfide, light metal ions (Na, K, Mg, Ca and Al), heavy metals (Cr, Fe, Co, Cu, Zn, Cd and Ni), organic compounds lead to destruction of the process at specific concentrations [37]. Accumulation of the mentioned inhibitors or toxins can cause a decrease in the biomethane production and eventually failure of the process [37]. Hydrolytic bacteria taking part in the hydrolysis stage can be inhibited by excess amounts of VFAs, LCFAs, partial pressure of hydrogen and humic acids [38][39][40]. In addition, acetogenesis and methanogenesis stages are mainly inhbited by the accumulation of VFAs, ammonia and LCFAs [41]. Total ammonia concentration (TAN) higher than 7 g NL −1 may cause the complete inhibition of the process [42]. A study conducted by Dasa et al. (2016) Processes 2021, 9, 85 4 of 18 showed that palmitic and oleic acid with the concentrations of 3.0 g L −1 and 4.5 g L −1 caused inhibition (>50%) in the thermophilic anaerobic digestion process [43]. Another study conducted by Palasti et al. (2009) reported that LCFAs concentrations excessing 1.0 g L −1 may cause inhibition of thermophilic anaerobic digestion process [44]. Nevertheless, the inhibition caused by LCFAs is not irreversible and can be recovered [44,45]. Ammonia inhibition in the anaerobic digestion process can be caused by ammonium ion (NH 4 + ) and free ammonia (NH 3 ) [46]. According to conducted studies, TAN concentration should be kept between 500 and 6000 mg NH 4 -N L −1 to supply optimum methane production as well as prevent the possible ammonia inhibition [47][48][49]. Another inhibition reason in the anaerobic digestion process is high concentrations of un-ionized H 2 S, that can inhibit lactose and acetate utilization in the process [50]. In addition to the mentioned organic compounds, light metals and heavy metals can have an inhibitory effect on the process with excess amounts. On the other hand, light and heavy metals are required for the metabolism of microorganims and for the enzymatic reactions [51,52]. A study conducted by Kumar et al. (2006) showed that there was improvement in biogas production after the addition of 2.5 mg L −1 heavy metals [53].
Total Solids (TS) and Volatile Solids (VS): TS content of the substrate determines the technologies implemented in the process, which are wet digestion and dry digestion [21]. Generally, in the wet digestion the feedstock contains 10-15% TS and it increases to 24-40% TS in the dry digestion [54]. VS is one of the most important parameters of the substrate, which is used for defining the specific biogas production capacity [21]. Similar biogas yields can be obtained from dry and wet digestion processes with suitable amount of substrate feeding [55].
Organic loading rate (OLR): OLR indicates the amount of volatile solids fed into the digester per unit working volume per unit time [21]. Increasing the OLR leads to an increase in the process efficiency [56]. OLR can be adjusted to recover inhibition caused by high ammonia concentrations [57,58].
Hydraulic retention time (HRT): HRT defines the duration time of the substrate in the system, which is calculated as dividing the reactor volume by daily substrate feeding volume [59]. Longer HRT enables enough time for effective degradation. On the other hand, with having short HRT, small working volumes are suitable to perform the process [32].
Volatile fatty acids (VFAs): VFAs are converted into acetate in AD process. Especially, they are significant indicators to determine the efficiency of the acetogenesis stage of AD [60,61]. VFAs concentration higher than 2 g L −1 leads to the inhibition in the hydrolysis of cellulose [62,63].
pH: Different microorganisms taking part in the process requires different pH values for their optimum performance. pH of 5.2 to 6.3 for the hydrolyzing and acid forming bacteria and 6.5-8.0 for acetogenic and methanogenic archaea are needed for optimum biogas production [24]. Generally, ammonia inhibition leads to the accumulation of VFAs, which can be detected via high pH values [64].
Temperature (T): Anerobic digestion process is classified under three categories dependent on the operation temperature: Psychrophilic (<25 • C), mesophilic (37-42 • C) and thermophilic (50-60 • C). Temperature has a direct effect on microbial dynamics and efficiency of the process [65][66][67]. In addition, the activity of the enzymes is affected by temperature. Most of the enzymes are stable in the mesophilic temperature range [68]. On the other hand, an increase in the temperature leads to an increase in the ammonia concentration. Therefore, thermophilic process is more sensitive to ammonia inhibition than mesophilic process [21,69].

Process Monitoring and Control
Process monitoring supplies overall ideas about the process, early detection of possible instabilities and enabling the successful start-up or re-start of the process [72,73].

Overview of the Biogas Plant Monitoring and Control
As was mentioned in a previous chapter, the AD process consists of serial stages, hydrolysis, acidogenesis, acetogenesis and methanogenesis. The stages of the process coexist, thus problems happening in a stage can affect the balance of the whole process. The time limiting step depends on the features of the substrate fed into the reactor [74,75]. Hydrolysis is accepted as a time limiting step for the complex organic substances, which cannot be easily hydrolyzed and leads to the accumulation of VFAs. On the other hand, the methanogenesis stage, that most important stage of the AD process, is the limiting step for easily degradable substrates [76][77][78].
One of the most focused topics in AD is online monitoring and control. The increase in the number of large-scale biogas plants also increases the demand for suitable monitoring and control of these systems [79]. Monitoring and control systems are applied differently depending on the applications. With online monitoring and control, process optimization is possible through maximizing the utilization of process capacity and minimizing the lost from process failure [80].
In order to be able to provide a sufficient level of energy with a sufficient stability and flexibility, system monitoring and control is required. In many cases, a strongly inhibited microorganism population or a total crash of the whole plant can have severe financial consequences for the biogas plant operators [81]. With process monitoring it is possible to get an overall picture of the biogas process, identify upcoming instabilities in anaerobic digesters before a crash happens, accompany a successful start-up or re-start of a plant [71,74].
Feeding frequency directly affects process performance and microbial communities. A comparative study was conducted by Svensson et al. (2018), which showed that daily feeding causes greater fluctuations in acetate concentration and pH compared to the ten times a day feeding [82]. Moreover, changing the feedstock composition causes variations in the microbiology of the process and their performances [83]. For that reason, the change of substrate mixtures should be performed carefully, which enables adaptation of the process to new conditions [72].

Process Monitoring and Control
Process monitoring supplies overall ideas about the process, early detection of possible instabilities and enabling the successful start-up or re-start of the process [72,73].

Overview of the Biogas Plant Monitoring and Control
As was mentioned in a previous chapter, the AD process consists of serial stages, hydrolysis, acidogenesis, acetogenesis and methanogenesis. The stages of the process coexist, thus problems happening in a stage can affect the balance of the whole process. The time limiting step depends on the features of the substrate fed into the reactor [74,75]. Hydrolysis is accepted as a time limiting step for the complex organic substances, which cannot be easily hydrolyzed and leads to the accumulation of VFAs. On the other hand, the methanogenesis stage, that most important stage of the AD process, is the limiting step for easily degradable substrates [76][77][78].
One of the most focused topics in AD is online monitoring and control. The increase in the number of large-scale biogas plants also increases the demand for suitable monitoring and control of these systems [79]. Monitoring and control systems are applied differently depending on the applications. With online monitoring and control, process optimization is possible through maximizing the utilization of process capacity and minimizing the lost from process failure [80].
In order to be able to provide a sufficient level of energy with a sufficient stability and flexibility, system monitoring and control is required. In many cases, a strongly inhibited microorganism population or a total crash of the whole plant can have severe financial consequences for the biogas plant operators [81]. With process monitoring it is possible to get an overall picture of the biogas process, identify upcoming instabilities in anaerobic digesters before a crash happens, accompany a successful start-up or re-start of a plant [71,74].
Feeding frequency directly affects process performance and microbial communities. A comparative study was conducted by Svensson et al. (2018), which showed that daily feeding causes greater fluctuations in acetate concentration and pH compared to the ten times a day feeding [82]. Moreover, changing the feedstock composition causes variations in the microbiology of the process and their performances [83]. For that reason, the change of substrate mixtures should be performed carefully, which enables adaptation of the process to new conditions [72].
Operation temperature of the digester affects the entire process by means of degradation rate, biogas yield and process stability [84]. Different kinds of microorganisms taking Processes 2021, 9, 85 6 of 18 part in the biogas production process have their specific optimum growing temperatures, for example most of the methanogenic species have their optimum at mesophilic temperatures [85]. Generally, more than ±3 • C per day under mesophilic conditions and more than ±1 • C under thermophilic conditions are to avoid within the AD process [32,69,[86][87][88].
To supply intensive contact between the microorganisms and the substrate, sufficient contact time is required, which can be supplied by suitable mixing strategy [84]. In addition, the creation of layers (floating layers and sedimentation) is prevented through adequate mixing [21,61].
There are various problems that can be faced within the operation of biogas plants, which can be classified as follows: Structural components Piping system Biogas utilization equipment Digestate disposal system AD process and biogas production Knowledge related problems Further non-technical problems e.g., lack of finance and political restrictions [81,89].
Moreover, with the increase in the number of biogas plants, the number of accidents happening at the biogas plants is increasing quite fast because of the safety problems. The observed accidents are mostly fire, leakage, poisoning, environmental and deflagration/ explosion [90]. To prevent the possible problems mentioned above, performing a sustainable process, enhancing the process efficiency and preventing emissions, process monitoring and control are required among all biogas plants [36,91]. The complexity of the biogas production process is challenging, but future oriented biogas plants requires a flexible, stable and low cost online process control [36]. The importance of efficient monitoring and control in AD processes is beyond any doubt, due to being able to have a stable process and optimize the production of biogas. A laboratory-based control strategy of biogas plants should be converted to a process analytical strategy that relies on representative sampling, advanced sensor technology and multivariate data analysis [36].

Currently Available Monitoring and Control Technologies
Lack of monitoring and control in the biogas plants can lead to process failure. Both instruments used in the plant and the process parameters should be controlled within the process [92]. Control of the feed material, biogas quality, temperature, pressure, pumps, mixers and digester covers is required and implemented for the continuity of the process [92][93][94]. In addition, visual controls can supply fast and cost efficient detection of the problems, which is mainly implemented via a single tag on a pipe or a mounted glass [92]. On the other hand, there are various automatic control strategies for the biogas plants dependant on the expected complexity.
On-off is a simple control strategy and suitable for valve and pump control. Nevertheless, it cannot supply fine control and it does not have direct effect process stability. PI (Proportional Integral)/PID (Proportional Integral Derivative) is a simple, robust and fine control strategy that does not require a model. The demerits of this strategy are its applicability with only linear systems and the strategy can be implemented for single input/ output systems. Adaptive control can be used for controlling non-linear/dynamic systems, that provide parameter estimation and anticipation of future disturbance. However, detailed information and complex mathematical calculations are required for the model, which can include uncertainties. Fuzzy logic can be implemented in multiple input/output and nonlinear systems, but highly relies on the expertise of the operator. Artificial neural network does not require a model or expertise. Training time and large information are required [95]. In general, monitoring strategies of AD process can be classified under three categories: Minimum, standard and advanced monitoring as in Figure 3 [71]. Process monitoring is required for determining the character of the process or for early indication of problems [96]. Monitoring of different operational parameters at the biogas plants can be performed as online, which defines real-time measurements of the parameters at the biogas plant or off-line monitoring through laboratory analysis. In addition to these two technologies, at-line monitoring can be implemented to analyze samples with sensors in the pipeline, which represents the real situation in the reactor as well [97].
information and complex mathematical calculations are required for the model, which can include uncertainties. ▪ Fuzzy logic can be implemented in multiple input/output and nonlinear systems, but highly relies on the expertise of the operator. ▪ Artificial neural network does not require a model or expertise. Training time and large information are required [95].
In general, monitoring strategies of AD process can be classified under three categories: Minimum, standard and advanced monitoring as in Figure 3 [71]. Process monitoring is required for determining the character of the process or for early indication of problems [96]. Monitoring of different operational parameters at the biogas plants can be performed as online, which defines real-time measurements of the parameters at the biogas plant or off-line monitoring through laboratory analysis. In addition to these two technologies, atline monitoring can be implemented to analyze samples with sensors in the pipeline, which represents the real situation in the reactor as well [97].

Future Prospective in Biogas Plant Monitoring
Despite common implementation of the biogas production technologies around the world, there is still a need to improve monitoring strategies for improving the efficiency [45,98,99]. Online monitoring is inevitable for future oriented biogas plants, but the parameters should be determined carefully. In the studies performed, it was found that pH is not an early instability detection parameter, relying on organic loads due to its instability [100,101]. In addition to the pH measurements, alkalinity measurements, which are essential for early detection of process instability, can be conducted via electrical conductivity measurements on real time basis [102,103]. Moreover, a Fourier Transform Infra-Red (FT-IR) spectrometer can be installed in the reactors to detect Chemical Oxygen Demand (COD), Total Organic Carbon (TOC), Volatile Fatty Acids (VFA), and Partial and Total Alkalinity (PA and TA) [104]. Ward et al. (2011) conducted a study in a pilot scale biogas plant to examine the feasibility of the measurements of Micro Gas Chromatography (µ -GC), Membrane Inlet Mass Spectroscopy (MIMS) in gas phase and with Near Infrared Spectroscopy (NIRS), pH in the liquid phase. The results showed that µ -GC is suitable to determine H2, CH4, H2S, N2 and O2 and MIMS can be used for determining CH4, CO2, H2S, reduced organic sulfur compounds and p-cresol. Moreover, NIRS can be used to estimate concentrations of acetate, propionate and VFAs [105]. A laboratory scale study showed that NIRS is suitable for the prediction of VFAs, propionic acid, Total Inorganic Carbon (TIC) and the ratio of VFA/TIC [106]. In addition, biogas composition can be determined by NIRS for different samples, which helps to design the operation biogas

Future Prospective in Biogas Plant Monitoring
Despite common implementation of the biogas production technologies around the world, there is still a need to improve monitoring strategies for improving the efficiency [45,98,99]. Online monitoring is inevitable for future oriented biogas plants, but the parameters should be determined carefully. In the studies performed, it was found that pH is not an early instability detection parameter, relying on organic loads due to its instability [100,101]. In addition to the pH measurements, alkalinity measurements, which are essential for early detection of process instability, can be conducted via electrical conductivity measurements on real time basis [102,103]. Moreover, a Fourier Transform Infra-Red (FT-IR) spectrometer can be installed in the reactors to detect Chemical Oxygen Demand (COD), Total Organic Carbon (TOC), Volatile Fatty Acids (VFA), and Partial and Total Alkalinity (PA and TA) [104]. Ward et al. (2011) conducted a study in a pilot scale biogas plant to examine the feasibility of the measurements of Micro Gas Chromatography (µ-GC), Membrane Inlet Mass Spectroscopy (MIMS) in gas phase and with Near Infrared Spectroscopy (NIRS), pH in the liquid phase. The results showed that µ-GC is suitable to determine H 2 , CH 4 , H 2 S, N 2 and O 2 and MIMS can be used for determining CH 4 , CO 2 , H 2 S, reduced organic sulfur compounds and p-cresol. Moreover, NIRS can be used to estimate concentrations of acetate, propionate and VFAs [105]. A laboratory scale study showed that NIRS is suitable for the prediction of VFAs, propionic acid, Total Inorganic Carbon (TIC) and the ratio of VFA/TIC [106]. In addition, biogas composition can be determined by NIRS for different samples, which helps to design the operation biogas plant in an efficient way [107]. The replacement of off-line monitoring with an online automated system is needed to ensure sufficient monitoring at the biogas plants, especially in the rural areas [108].

Biogas Plant Modelling
There is still a lack of knowledge about the AD process and its reactions to the changes in the operational parameters, such as feedstock and temperature. Sufficient monitoring alone cannot help to implement predictive operation at the biogas plants through improved forecasting. Hence, detailed modelling of AD process is required. All the developed models Processes 2021, 9, 85 8 of 18 over 50 years were examined by Salgado (2019) based on the time they developed and their complexity, and ADM1 was defined as the most complex model [109].
The first model for simulation of biogas plants was created by Andrews (1969), and most complex model is Anaerobic digestion model No 1 (ADM1), which performs a simulation of various substrates among all the models [109]. ADM1 created by Bastone et al. (2002) is the most widely used model in the past years [110]. The features of the models are summarized in Table 2. Table 2. Created models for biogas plants.

Model Description
1st Generation Andrews, (1969) This model shows that modelling of rate-limiting step gives information about whole process. Bacterial inhibition can be explained with acid accumulation [109].
Andrews and Graef, (1970) The dynamic simulation of enzymatic hydrolysis process is performed for complex organic compounds [109]. Hill & Barth, (1977) This model was created to present stability in the AD process of the animal waste. With including mass balances between volatile matter, volatile acids, soluble organics, two groups of bacteria, cations, nitrogen, and carbon dioxide, pH value was calculated [111].

Heyes & Hall, (1981)
A dynamic model was developed to present hydrogen inhibition of acetogenesis and pH inhibition of methanogenesis with using glucose as substrate [112].
Hill, (1983) The model was developed the simulate steady state methane productivity (qualitative and quantitively) in the AD process of animal waste [113].
Mosey, (1983) Four bacterial groups were defined in the model for producing biogas through AD of the glucose. In the model, acetogenesis is defined as limiting step [109].
2nd Generation Costello et al. (1991) Reactor process, physicochemical system and biological make-up were used in the system to create a mathematical model. In addition lactic acid accumulation, product and pH inhibition are included in the model [114].  The model was developed to simulate anaerobic degradation of complex organic materials with covering an enzymatic hydrolytic step, four bacterial steps and 12 chemical compounds [79]. Vavilin et al. (1996) A model was developed to simulate hydrolysis (rate-limiting) stage of AD. The model includes surface colonization of particles by hydrolytic bacteria and surface degradation [115].
Husain, (1998) VFA-based Monod functions were used to define the death rates of acidogens and methanogens [109].
3rd Generation Bernard et al. (2001) Mass balance model was developed to identify parameters in the acidogenesis and methanogenesis stages of the AD process. Electrochemical equilibria is used to include alkalinity in the model [116].

Siegrist et al. (2002)
Hydrolysis rate, acetotrophic methanogenesis and propionate degradation were specific focus of the mathematical model created, which simulated dynamic behavior of both mesophilic and thermophilic AD [117]. 46 reactions (for inhibition, rate-kinetics, pH, ammonia, volume, loading rate, and retention time) are performed in the model to predict biogas production from any substrate and at any operation condition with using Aspen Plus [120].

Arzate et al. (2015)
This model represents combination of Life Cycle Assessment (LCA) characterization and mathematical model of the process performance, which can supply decrease in the environmental impact of AD processes. To perform LCA and mathematical model, Simapro and ASPEN were used respectively [121].
Statistical Models Barampouti et al. (2005) The model was created to predict biogas production of UASB (Up flow Anaerobic Sludge Blanket) with examining 17 parameters from the two-year operation data of the potato wastewater treatment plant [122].

Nopharatana et al. (2007)
The model was created to simulate biological reactions in AD from Municipal Solid Waste (MSW) with considering it in two fractions; soluble and insoluble. Contois, Monod and Gompertz equations were implemented in the model [123].
Yusuf and Ify, (2011) The model was created to predict maximum and ultimate bigas yield and ultimate methane yield in co-digestion of cow dung and water hyacinth based on the first order kinetic model [124]. Syaichurrozi and Sumardino, (2013) Kinetic model for determining biogas production was developed with modifying equation of Gompertz. Effect of the COD/N ratio on the kinetic model was studied [125].

Brule et al. (2014)
The model was created to optimize BMP assays. It supplies quality control of the BMP assays, interpretation of reaction kinetics and estimation of methane yield [126].

Process Optimization through Implementation of Artificial Intelligence (Predictive Analytics)
Since it is possible to get time delay through offline monitoring, online monitoring is getting more attractive day by day. Continuous monitoring can be considered the main condition for process optimization and quality control, since it allows us tracking of real time data and gives us time analyze and react. That is why there have been several studies about online monitoring and its benefits on natural systems [127].
Analyzing and getting valuable outputs from a huge amount of gathered data could be possible with just mathematical and statistical methods. These analyses also allow for predictive maintenance and continuous process improvements, which gives not only flexibility in energy production but also a stable process [19,128].
Standardizing the requirements of process optimization is not possible in dynamic systems. Living organisms cannot be defined as stable systems which is why it is not possible to track them in conditional monitoring methods. A variety of characters and uncontrollable environment conditions bring indifferent demands on feeding and maintaining in AD. This dynamic behavior can be monitored and measured by modern methods and interpreted accurately [129].
There have already been some studies about statistical methods and AI in the area of living (biological) systems. In order to be able to take advantageous of predictive analytics, it is obligatory to get a sufficient amount of data to work with. Especially in dynamic conditions such as biogas plants, where there are not only internal parameters but also external parameters affecting the process, real time monitoring has enormous importance. Online monitoring comes with the requirement of parameter definition that shall be monitored, tracked and analyzed [99].
With gathered data it is possible to launch predictive analytics for process optimization, which also gives the opportunity to search possible optimization scenarios in natural sciences. Wahmkow has studied the usage of neural networks and fuzzy logic in his work. As an optimum solution to build a driver for biogas production, a combination of Neural Network, Fuzzy Logic and optimization was suggested. In the end it was claimed that with the usage of automated controller techniques, technical and ecological goals could be achieved. In this study it was anticipated that the proof of concept is missing. With the simulated model of the real reactor, it was aimed to have a tested controller for feeding on an industrial scale. It is claimed that it is possible to get flexible feeding and energy production [129]. In similar direction, Bhuiyan et al. (2019) [130] have studied the feasibility of having a sustainable and affordable way to produce renewable energy at any scale for all end level users in the world. In this model it was aimed to find a new method to produce clean energy with the help of modern technology like IOT and AI [129,131]. Moreover, Olabi et al. (2020) aimed at maximizing the methane production from wastepaper via the integration of AI to the monitoring [14].
Fuzzy logic-based modelling and modern optimization were proposed in this study. With the help of the fuzzy model, the increase the methane yield under some predefined circumstances was achieved.
As mentioned above, it is not possible to ignore the effect of external influences and various process disturbances on the optimization of agricultural and industrial biogas plants. Because of an insufficient level of real time monitoring, most of the biogas plants are operated manually, which brings the need for the development of new methods to increase the productivity. With this aim, advantages and usage of computational and AI such as Genetic Algorithms and Particle Swarm Optimization were studied by Wolf et al. (2009) to increase the productivity and to gain flexibility in these systems. Results show that an improvement of up to 20% in biogas production and substrate reduction can be achieved when compared to conventional manual operation [132].
Optimizing AD through existing recent artificial techniques has been the scope of also Ramachandran et al. (2019) work. He analyzed the advantages and disadvantages of the techniques and their application areas in biogas plants. The optimization of AD with its non-linear character due to the complexity and number of parameters that play an important role allows us to use AI to find out the optimum model for our problem statement, which is making biogas production more effectively to be able to compute with other renewable energy sources [110]. Another example of using AI on an industrial scale can be seen by work of Tumer and Edebali [133]. In this study, a wastewater treatment plant in Konya, Turkey was analyzed by using artificial neural network with different architectures with daily data obtained in four months. As a conclusion, maximum correlation coefficient was reached with Artificial Neural Network (ANN), which means that ANN could be used to make predictions in such a system for operating plants.
It is obvious that ANN are also becoming a powerful tool in the field of biogas production. In spite of the fact that biogas systems are very different, considering technological differences and differences of input substrates in areas such as municipal, agriculture, industry, water treatment plants etc., ANNs show a high degree of usability. The results of the summarized studies show high prediction accuracy and usefulness of the ANN which thereby become strong competition to conventional methods of measurement and data processing. Even more, the fusion of both methods and the complementary functioning of soft and hard computing brings many benefits beyond the capabilities of each individual method [134].
There have also been machine learning applications in the natural sciences, that also enable intelligent decision-making systems, and artificial and computational intelligence in the world of data science. Daily time series data in a wastewater treatment plant were used as input for developing a support vector machine model by Manu and Thalla (2017), and it was observed that is possible to define the relation between dependent and independent variables with help of machine learning algorithms [135,136].
Machine Learning models give different approaches to predictive analytics such as regression and classification models. As Wang and Long mentioned in their research in December 2019, recent developed algorithms such as ANN, support vector machine (SVM), random forest, logistic regression multiclass (GLMNET) have been used as both regression and classification models in their study to define sufficient parameters and use prediction about methane production in anaerobic digestion [137].
Last but not least there have been studies related to predictive maintenance with more modern algorithms and approaches. In 2019, different machine learning models such as logistic regression, support vector machine, random forest, extreme gradient boosting (XGBoost), and k-nearest neighbors regression were compared with a dataset provided by two major Chinese biogas plants on a daily basis. The aim of this study is developing a user interface with machine learning to be able to improve productivity in industrial scale. This approach can be also considered as a concrete and industrial usage of predictive analytics [138].
As can also be seen in the abovementioned studies, it is possible to get the benefit of predictive analytics and artificial intelligence in real life with the help of data science. It requires multi-functional disciplines from raw data to get insights of it, such as sensor technique, IoT, data warehousing, database and formatting, statistic, machine learning and control units like programmable logic controller; it can be grouped in three main categories: computer Science/IT, Math/Statistics and Domains/Business knowledge [129,[139][140][141][142].
Although there are tremendous developments in sensor technique, automation systems and data monitoring in system engineering and even usage of programmable logic controller for feeding in several industrial scales, it is still not possible to run a biogas plant automatically. Predictive analytics, data science, AI and Proportional Integral Derivative (PID), which allows closed-loop control methods could have already been applied in laboratory scales. In addition, there is still a need for an extended research for the industrial scale.

Discussion
It would be wrong to expect that the usage of predictive analytics or artificial intelligence represents a direct monetary value. These approaches should be seen as a tool for the continuous improvement and operational excellence through cost reduction via increased productivity and predictive maintenance in industry [143][144][145]. Real Time Optimization can be performed in three stages: (a) process modelling, (b) numerical optimization using the process model and (c) application of the model-based inputs into the plant [146,147]. To do so, the implementation of future oriented sensors and data collection technologies are required.
In order to have a clear road map, it has to be understood how internet of things helps in this process. The basis of the IoT (Internet of Things) is coming from Cyber-Physical Systems (CPS). These are objects, devices, buildings, production facilities, logistic components, etc., which are integrated through recording the environment via sensors, evaluating and storing the recorded data, communicating via Internet and/or influencing the physical world/environment via actuators in principal of embedded systems [139,144].
According to VDMA (Mechanical Engineering Industry Association Germany) Guidelines, a roadmap for digitalization processes has to include following steps:

Integration of sensors/actuators Communication/Connectivity
Functionalities for data storage and information exchange Monitoring Product related IT services Business models around the product [143].
In light of the guideline from VDMA, possible steps for implementing predictive analytics and artificial intelligence in AD could be shown as follows:
Moreover, demand-based and resource-based operation at the biogas plants can be performed with integration of AI into the operation. External parameters can be considered while planning the integration of AI into AD process; weather conditions, feedstock sources, demand for electricity, heat, biofuel and fertilizer (see Figure 4). An improved communication between resources supply and the product demand can supply efficient and flexible energy production. Instead of storing the ready consumption energy, it is sensible and efficient to store biogas at the plants to be processed into electricity in case of demand.
Demand-based biogas production can be achieved with the implementation of flexible feeding without the requirement for additional gas storage [148]. The weather conditions affect both heat losses through fermenter and storage conditions of the feedstock [86,149,150]. A continuous data transfer and data analysis can supply predictive operation of biogas plants with forecasting the efficiency of the process, dependent on the quality of substrate and heat demand based on the heat losses.
In order to determine demand precisely, continuous data transfer between market demand for electricity, heat, biofuel, fertilizer can be used for efficient, and demandbased operation of biogas plants. Moreover, with using satellite CHPs, a decrease in the investment cost can be achieved [151,152].
Due to the complexity of the biogas production system and flexibility in the production, improved monitoring at the biogas plants is required. In the figure below (Figure 4), an example biogas plant was represented with the parameters, which should be monitored and controlled in real time. Firstly, the quality and quantity of input material should be determined, which has a direct effect on biogas quality. In addition, flowrates in the pipelines between the components of the plant should be measured to create a mass transfer model of the biogas plant. In order to have reliable data about the operation of each single reactor, biogas content and amount should be determined for each reactor separately rather than conducting one measurement for whole biogas plant. The efficiency of physical and biochemical reactions in the reactors can be determined with analyzing the parameters, such as TS, VS, VFA, pH, pressure (p), NH 4 -N + , VOA/TIC and inhibitors and toxins. On-line monitoring of several parameters at the biogas plant in both substrate storages and in the reactors can be performed by NIRS [106,153,154].

Conclusions
Artificial Intelligence has been investigated and implemented in several processes. The positive effect of Artificial Intelligence to the bioprocess monitoring is not negligible. Integration of Artificial Intelligence into the biogas production process is possible with big data gathering. Improved sensor technologies are to supply sufficient data for finding the correlation between the parameters and creating the operational models, which are going to supply predictive and flexible operation of the biogas plants. Thus, possible failures will be hindered, and demand-/ resource-based production will be realized.
As mentioned before, there have been a lot of studies in both academical and industrial environments about process optimization in different areas through lean philosophy and Six Sigma for years. The proven benefit of these approaches brings us to the search for a better, more efficient and more modern way to achieve operational excellence. The common point of all these improvement perspectives is the data itself. For lean management, lean production, six sigma and all of the operational excellence tools, the collected data is needed and analyzed for better understanding of the process and relation between parameters [155].
Creating a decision-making and automated AD system in more tangible levels for the industry with the base of conventional improvement cultures and methodology such as lean philosophy is one of the main conditions for a higher contribution of biogas plants in renewable energy.

Conclusions
Artificial Intelligence has been investigated and implemented in several processes. The positive effect of Artificial Intelligence to the bioprocess monitoring is not negligible. Integration of Artificial Intelligence into the biogas production process is possible with big data gathering. Improved sensor technologies are to supply sufficient data for finding the correlation between the parameters and creating the operational models, which are going to supply predictive and flexible operation of the biogas plants. Thus, possible failures will be hindered, and demand-/ resource-based production will be realized.
As mentioned before, there have been a lot of studies in both academical and industrial environments about process optimization in different areas through lean philosophy and Six Sigma for years. The proven benefit of these approaches brings us to the search for a better, more efficient and more modern way to achieve operational excellence. The common point of all these improvement perspectives is the data itself. For lean management, lean production, six sigma and all of the operational excellence tools, the collected data is needed and analyzed for better understanding of the process and relation between parameters [155].
Creating a decision-making and automated AD system in more tangible levels for the industry with the base of conventional improvement cultures and methodology such as lean philosophy is one of the main conditions for a higher contribution of biogas plants in renewable energy.