Second generation biorefineries transform agricultural wastes into biochemicals with higher added value, e.g. bioethanol, which is thought to become a primary component in liquid fuels . Extensive endeavours have been conducted to make the production process feasible on a large scale, and recently several commercial size biorefineries became operational: Beta Renewables (Italy, 2014), Abengoa Bioenergy (USA, 2014), POET-DSM (USA, 2014), GranBio (Brazil, 2014) , while others are under construction, e.g. the Måbjerg Energy Consortium in Denmark, soon to be commissioned.
This paper presents the findings of a 3 years PhD project that was run by Technical University of Denmark (DTU) in collaboration with the Danish energy company DONG Energy A/S. The company owns a large second generation biorefinery in Kalundborg, Denmark, also known as the Inbicon demonstration plant . The goal of the project was to utilize real-time data extracted from the large scale facility to formulate and validate first principle dynamic models of the plant. These models were then further utilized to derive model-based advanced tools for process optimization, control, diagnosis and monitoring.
The Inbicon biorefinery converts wheat straw into bioethanol utilizing steam, enzymes, and genetically modified yeast. The biomass is first pretreated in a steam pressurized and continuous thermal reactor where lignin is relocated, and hemicellulose partially hydrolyzed such that cellulose becomes more accessible to enzymes. The biorefinery is integrated with a nearby power plant following the IBUS principle for reducing steam costs . During the pretreatment, by-products are also created such as organic acids, furfural, and pseudo-lignin, which act as inhibitors in downstream processes. The pretreated fibers consist of cellulose and xylan, which are then liquefied in the enzymatic hydrolysis process with the help of enzymes. High glucose and xylose yields are thus obtained for co-fermentation. Ethanol is recovered in distillation columns followed by molecular sieves for achieving a high concentration ethanol. Lignin is separated in the first column and recovered as bio-pellets in an evaporation unit. The bio-pellets are then burnt in the nearby power plant for steam generation.
The first part of the study presents a large scale dynamic model of the plant, separated in modules for pretreatment, enzymatic hydrolysis, and fermentation. The pretreatment and enzymatic hydrolysis models have been validated and analyzed in  and  together with a comprehensive sensitivity and uncertainty analysis. The models embed mass and energy balances with a complex conversion route. Computational fluid dynamics is used to model transportation in large tanks capturing tank profiles, and delays due to plug flows. As an application, the dynamic models are used to construct real-time observers that act both as measurement filters and soft sensors for variables that are not measured, e.g. biomass composition in any point of the process, or viscosity change in the enzymatic hydrolysis tanks.
In the second part of the study, besides a basic control layer for flow rates and tank levels, an L1 adaptive control layer  is constructed for biomass pretreatment temperature  and pH in enzymatic hydrolysis . These controllers provide a better operation across multiple nominal points without the need of retuning. The basic control layer is characterized by a fast feedback reaction.
The next step is to build an optimization layer, which searches for optimal values regarding the pretreatment temperature, enzyme dosage, and yeast seed in fermentation. The biorefinery has to be treated in an integrated manner because there is interaction between pretreatment and the downstream processes. When biomass is pretreated, by-products are also created that act as inhibitors in enzymatic hydrolysis and fermentation. Economic cost functions are formulated to identify the best trade-offs between the refinery steps such that profit is maximized. Sensitivity and uncertainty analysis is also performed with Monte Carlo simulations and Latin Hypercube Sampling on feedstock composition and kinetic parameters following the methodology from [10, 11].
In the last step of the study, diagnosis methods are implemented to identify failures that can occur across the plant. Focus is placed on batch contamination with lactic acid bacteria in fermentation.
 R. Datta, M. a. Maher, C. Jones, and R. W. Brinker. “Ethanol-the primary renewable liquid fuel”. In: Journal of Chemical Technology and Biotechnology 86.4 (2011), pp. 473–480. DOI: 10.1002/jctb. 2580.
 R. C. Brown, T. Brown, S. Capareda, B. Dale, D. Edwards, V. Estes, C. Granda, M. Holtzapple, S. Lonkar, and C. E. Wyman. “SBE Supplement: Lignocellulosic Biofuels”. In: AIChE CEP (2015), pp. 33–64.
 J. Larsen, M. Ø. Haven, and L. Thirup. “Inbicon makes lignocellulosic ethanol a commercial reality”. In: Biomass and Bioenergy 46 (Nov. 2012), pp. 36–45. DOI: 10.1016/j.biombioe.2012.03.033.
 J. Larsen, M. Ø. Petersen, L. Thirup, H. W. Li, F. Krogh Iversen, M. Ø. Petersen, L. Thirup, H. W. Li, and F. K. Iversen. “The IBUS Process – Lignocellulosic Bioethanol Close to a Commercial Reality”. In: Chemical Engineering & Technology 31.5 (May 2008), pp. 765–772. DOI: 10.1002/ceat.200800048.
 R. M. Prunescu, M. Blanke, J. G. Jakobsen, and G. Sin. “Dynamic modeling and validation of a hydrothermal biomass pretreatment process - A demonstration scale study”. In: AIChE Journal (Under review).
 R. M. Prunescu and G. Sin. “Dynamic modeling and validation of a lignocellulosic enzymatic hydrolysis process - A demonstration scale study”. In: Bioresource Technology 150 (Dec. 2013), pp. 393–403. DOI: 10.1016/j.biortech.2013.10.029.
 N. Hovakimyan and C. Cao. L1 Adaptive Control Theory. SIAM, 2010.
 R. M. Prunescu, M. Blanke, and G. Sin. “Modelling and L1 Adaptive Control of Temperature in Biomass Pretreatment”. In: Annual Conference on Decision and Control. 2013.
 R. M. Prunescu, M. Blanke, and G. Sin. “Modelling and L1 adaptive control of pH in bioethanol enzymatic process”. In: Proceedings of the 2013 American Control Conference. 2013, pp. 2–9.
 G. Sin, K. V. Gernaey, M. B. Neumann, M. C. M. van Loosdrecht, and W. Gujer. “Global sensitivity analysis in wastewater treatment plant model applications: Prioritizing sources of uncertainty”. In: Water Research 45.2 (Jan. 2011), pp. 639–651. DOI: 10.1016/j.watres.2010.08.025.
 R. Morales-Rodriguez, A. S. Meyer, K. V. Gernaey, and G. Sin. “A framework for model-based optimization of bioprocesses under uncertainty: Lignocellulosic ethanol production case”. In: Computers & Chemical Engineering 42 (July 2012), pp. 115–129. DOI: 10.1016/j.compchemeng.2011.12.004.