## 3 Results
### Dynamic Biogas Process Modeling
#### 3.4.1 White Box Biogas Process Models
Accordingly, studies use ADM1 to model and simulate complete biogas plants, including energy production. A model of a micro gas turbine with the dynamic behavior of an electricity conversion system inside MATLAB(r) Simulink, including the ADM1 modeling description presented in [83], was developed by the authors of [84]. An implementation of a transformation matrix, presented in [85], led to a less difficult description of the ADM1 input parameters to be able to revert to only eleven parameters as more common characteristics of the input substrate (such as ratios of volatile fatty acids, total organic carbon or organic phosphorus). Regarding AD production modeling, species-based mass balance equations describe an anaerobic reactor, including input and output mass flow rates as well as the ADM1 model as mass generation rate. A turbine, generator, inverter and electrical filter were modeled with the Toolbox \"Simscape\" implemented in the development environment of MATLAB(r) Simulink. Utilizing a biogas flow rate of 0.03 kg/s and a methane concentration of 48%, the model presents an electrical power production of 24 kW with manure as the feedstock input and demonstrates the functionality of micro gas turbines under biogas production conditions. The biogas system with an integration of the ADM1 simulated both the effect of different types of feedstock on the AD process and the AD process on the resulting gas conditions. Reference [86] presented the modeling approach DARIES (Dynamic Anaerobic Reactor and Integrated Energy System) in MATLAB(r) Simulink based on the ADM1 with an additional integration of temperature-dependent kinetics (Arrhenius equation). The biogas model includes a dynamic CHP to produce electrical energy and heat. Heat equations for heat transfer modeling inside the digester were implemented from literature. The simulation results were verified by the use of different real data sets of the database NYSERDA (New York State Energy Research and Development Authority) with hourly monitored performance data including fuel and power information. DARIES was able to verify experimental data with underprediction of the methane production rate by about 12%. In order to expand the effect of AD on a whole biogas plant and its peripheral technical aggregates, Reference [10] evaluated multiple dynamic component models of the common plant aggregates: Anaerobic digester with ADM1, CHP unit, digestate storage, feedstock input, pumps, heating systems, thermal and electrical energy sinks, and sources. The model was developed inside MATLAB(r) Simulink as a toolbox under the name \"BioOptim\". This method of modeling dynamic component models leads to an adaptable and scalable biogas plant system model, for example, by the multiple use of the anaerobic digester with the integrated ADM1 or CHPs with different sizes and efficiencies. The model approach created further investigations to optimize the control of biogas plants by using a nonlinear model predictive controller [87, 88, 89] in a validated simulation of a full-scale biogas plant model. The aim of this work was to produce an online control mechanism of the substrate input of a real biogas plant based only on the measurement of the pH value and total biogas production rate with its methane and CO\({}_{2}\) concentrations. The nonlinear model predictive controller allowed the definition of optimality criteria leading to an optimized operating mode of the plant in terms of cost/benefits, pH value or VOS/TAC value. The \"BioOptim\" toolbox is not integrated as an official MATLAB(r) Simulink toolbox. The model approach leads to the possibility of understanding the effect of AD processes under varying feedstock inputs on a whole biogas plant and, therefore, results in a state space model of the plant. The biogas model mentioned above [10] was successfully used in India to model the biogas potential of biowaste at an educational institute in order to verify experimental data [90].