Real-time economic optimization for a fermentation process using Model Predictive Control

Similar documents
BEYOND THE CONSTRUCTION OF OPTIMAL SWITCHING SURFACES FOR AUTONOMOUS HYBRID SYSTEMS. Mauro Boccadoro Magnus Egerstedt Paolo Valigi Yorai Wardi

Single Shooting and ESDIRK Methods for adjoint-based optimization of an oil reservoir

Switching Time Optimization in Discretized Hybrid Dynamical Systems

A new approach to explicit MPC using self-optimizing control

Math 342 Partial Differential Equations «Viktor Grigoryan

Calculus of Variations

A simplified macroscopic urban traffic network model for model-based predictive control

Table of Common Derivatives By David Abraham

Introduction to the Vlasov-Poisson system

Unit vectors with non-negative inner products

Predictive Control of a Laboratory Time Delay Process Experiment

inflow outflow Part I. Regular tasks for MAE598/494 Task 1

Adaptive Predictive Control with Controllers of Restricted Structure

Optimization of a point-mass walking model using direct collocation and sequential quadratic programming

Exponential Tracking Control of Nonlinear Systems with Actuator Nonlinearity

Adjoint Transient Sensitivity Analysis in Circuit Simulation

Control of a PEM Fuel Cell Based on a Distributed Model

Least-Squares Regression on Sparse Spaces

Euler equations for multiple integrals

Schrödinger s equation.

Lectures - Week 10 Introduction to Ordinary Differential Equations (ODES) First Order Linear ODEs

Minimum-time constrained velocity planning

Harmonic Modelling of Thyristor Bridges using a Simplified Time Domain Method

Adaptive Gain-Scheduled H Control of Linear Parameter-Varying Systems with Time-Delayed Elements

An inductance lookup table application for analysis of reluctance stepper motor model

Criteria for Global Stability of Coupled Systems with Application to Robust Output Feedback Design for Active Surge Control

ON THE OPTIMALITY SYSTEM FOR A 1 D EULER FLOW PROBLEM

Math Notes on differentials, the Chain Rule, gradients, directional derivative, and normal vectors

ELEC3114 Control Systems 1

Time and Frequency Domain Optimization with Shift, Convolution and Smoothness in Factor Analysis Type Decompositions

A Trust-region-based Sequential Quadratic Programming Algorithm

19 Eigenvalues, Eigenvectors, Ordinary Differential Equations, and Control

APPROXIMATE SOLUTION FOR TRANSIENT HEAT TRANSFER IN STATIC TURBULENT HE II. B. Baudouy. CEA/Saclay, DSM/DAPNIA/STCM Gif-sur-Yvette Cedex, France

Path-By-Path Output Regulation of Switched Systems With a Receding Horizon of Modal Knowledge

NOTES ON EULER-BOOLE SUMMATION (1) f (l 1) (n) f (l 1) (m) + ( 1)k 1 k! B k (y) f (k) (y) dy,

'HVLJQ &RQVLGHUDWLRQ LQ 0DWHULDO 6HOHFWLRQ 'HVLJQ 6HQVLWLYLW\,1752'8&7,21

θ x = f ( x,t) could be written as

Integrated Data Reconciliation with Generic Model Control for the Steel Pickling Process

Chapter 6: Energy-Momentum Tensors

Assignment 1. g i (x 1,..., x n ) dx i = 0. i=1

Entanglement is not very useful for estimating multiple phases

The effect of nonvertical shear on turbulence in a stably stratified medium

Construction of the Electronic Radial Wave Functions and Probability Distributions of Hydrogen-like Systems

On Characterizing the Delay-Performance of Wireless Scheduling Algorithms

A SIMPLE ENGINEERING MODEL FOR SPRINKLER SPRAY INTERACTION WITH FIRE PRODUCTS

12.11 Laplace s Equation in Cylindrical and

A Novel Decoupled Iterative Method for Deep-Submicron MOSFET RF Circuit Simulation

Optimal Control of Spatially Distributed Systems

Chapter 2 Lagrangian Modeling

Total Energy Shaping of a Class of Underactuated Port-Hamiltonian Systems using a New Set of Closed-Loop Potential Shape Variables*

SYNCHRONOUS SEQUENTIAL CIRCUITS

Lecture 6: Control of Three-Phase Inverters

Lie symmetry and Mei conservation law of continuum system

LATTICE-BASED D-OPTIMUM DESIGN FOR FOURIER REGRESSION

The Principle of Least Action

Calculus and optimization

A Note on Exact Solutions to Linear Differential Equations by the Matrix Exponential

IPA Derivatives for Make-to-Stock Production-Inventory Systems With Backorders Under the (R,r) Policy

Time-Optimal Motion Control of Piezoelectric Actuator: STM Application

Problems Governed by PDE. Shlomo Ta'asan. Carnegie Mellon University. and. Abstract

Chapter 2 Governing Equations

Separation Principle for a Class of Nonlinear Feedback Systems Augmented with Observers

ECE 422 Power System Operations & Planning 7 Transient Stability

Lecture 2 Lagrangian formulation of classical mechanics Mechanics

Linear First-Order Equations

Placement and tuning of resonance dampers on footbridges

TMA 4195 Matematisk modellering Exam Tuesday December 16, :00 13:00 Problems and solution with additional comments

6 General properties of an autonomous system of two first order ODE

Closed and Open Loop Optimal Control of Buffer and Energy of a Wireless Device

A. Incorrect! The letter t does not appear in the expression of the given integral

Advanced Partial Differential Equations with Applications

Situation awareness of power system based on static voltage security region

Predictive control of synchronous generator: a multiciterial optimization approach

THE VAN KAMPEN EXPANSION FOR LINKED DUFFING LINEAR OSCILLATORS EXCITED BY COLORED NOISE

Oil Reservoir Production Optimization using Optimal Control

Accelerating interior point methods with GPUs for smart grid systems

Computing Exact Confidence Coefficients of Simultaneous Confidence Intervals for Multinomial Proportions and their Functions

Balancing Expected and Worst-Case Utility in Contracting Models with Asymmetric Information and Pooling

The Exact Form and General Integrating Factors

Benchmarking of optimization methods for topology optimization problems

Multi-agent Systems Reaching Optimal Consensus with Time-varying Communication Graphs

IERCU. Institute of Economic Research, Chuo University 50th Anniversary Special Issues. Discussion Paper No.210

A Review of Multiple Try MCMC algorithms for Signal Processing

A Novel Unknown-Input Estimator for Disturbance Estimation and Compensation

Optimization of Geometries by Energy Minimization

Some New Thoughts on the Multipoint Method for Reactor Physics Applications. Sandra Dulla, Piero Ravetto, Paolo Saracco,

Introduction to variational calculus: Lecture notes 1

Examining Geometric Integration for Propagating Orbit Trajectories with Non-Conservative Forcing

Sparse Reconstruction of Systems of Ordinary Differential Equations

Thermal conductivity of graded composites: Numerical simulations and an effective medium approximation

Outline. Vehicle Propulsion Systems Lecture 6. Hybrid Electrical Vehicles Serial. Hybrid Electrical Vehicles Parallel

Optimal Control of Spatially Distributed Systems

Number of wireless sensors needed to detect a wildfire

Implicit Differentiation

Two Dimensional Numerical Simulator for Modeling NDC Region in SNDC Devices

Regularized extremal bounds analysis (REBA): An approach to quantifying uncertainty in nonlinear geophysical inverse problems

Perturbation Analysis and Optimization of Stochastic Flow Networks

arxiv:hep-th/ v1 3 Feb 1993

Hyperbolic Moment Equations Using Quadrature-Based Projection Methods

An M/G/1 Retrial Queue with Priority, Balking and Feedback Customers

Transcription:

Downloae from orbit.tu.k on: Nov 5, 218 Real-time economic optimization for a fermentation process using Moel Preictive Control Petersen, Lars Norbert; Jørgensen, John Bagterp Publishe in: Proceeings of European Control Conference (ECC) 214 Link to article, DOI: 1.119/ECC.214.686227 Publication ate: 214 Document Version Peer reviewe version Link back to DTU Orbit Citation (APA): Petersen, L. N., & Jørgensen, J. B. (214). Real-time economic optimization for a fermentation process using Moel Preictive Control. In Proceeings of European Control Conference (ECC) 214 (pp. 1831-1836). IEEE. DOI: 1.119/ECC.214.686227 General rights Copyright an moral rights for the publications mae accessible in the public portal are retaine by the authors an/or other copyright owners an it is a conition of accessing publications that users recognise an abie by the legal requirements associate with these rights. Users may ownloa an print one copy of any publication from the public portal for the purpose of private stuy or research. You may not further istribute the material or use it for any profit-making activity or commercial gain You may freely istribute the URL ientifying the publication in the public portal If you believe that this ocument breaches copyright please contact us proviing etails, an we will remove access to the work immeiately an investigate your claim.

Real-time economic optimization for a fermentation process using Moel Preictive Control Lars Norbert Petersen 1 an John Bagterp Jørgensen 2 Abstract Fermentation is a wiely use process in prouction of many foos, beverages, an pharmaceuticals. The main goal of the control system is to maximize profit of the fermentation process, an thus this is also the main goal of this paper. We present a simple ynamic moel for a fermentation process an emonstrate its usefulness in economic optimization. The moel is formulate as an inex-1 ifferential algebraic equation (DAE), which guarantees conservation of mass an energy in iscrete form. The optimization is base on recent avances within Economic Nonlinear Moel Preictive Control (E-NMPC), an also utilizes the inex-1 DAE moel. The E-NMPC uses the single-shooting metho an the ajoint metho for computation of the optimization graients. The process constraints are relaxe to soft-constraints on the outputs. Finally we erive the analytical solution to the economic optimization problem an compare it with the numerically etermine solution. Fig. 1. Fs Cs,in V Cx Cs Fw Simple sketch of the fermentation process. F I. INTRODUCTION Maximizing profit has been an will always be the primary purpose of optimal process operation. Within conventional process control, the economic optimization consierations of a plant are usually inirectly aresse or aresse in a separate real-time optimization (RTO) layer that performs a steay-state economic optimization of the process variables [1]. Recent avances have focuse on optimizing the higherlevel objectives, such as economics, irectly in the process control layer. Moel Preictive Control (MPC) has for long time been the preferre framework in both inustry an acaemia because of its flexibility, performance an ability to hanle constraints on the inputs as well as the states [2]. Many researchers have also propose nonlinear MPC which hanles nonlinear systems an constraints. Much research has, therefore, been focuse on extening the MPC framework to also hanle optimization of process economics. The iea of optimizing economics irectly has been reporte in many works [1], [3] [5]. Research has also been performe on stability theory, showing that limit cycles may arise because these are economically favourable [6]. The use of fermentation in inustry is wiely use, an the ability to control a fermentation process at its optimal state is of consierable interest to many fermentation inustries. Optimal control reuces the prouction costs an increases yiel while maintaining proper quality of the prouct. Optimal open-loop time profiles of the fee rates are well 1 L. N. Petersen is with the Department of Applie Mathematics an Computer Science, Technical University of Denmark, DK-28 Kgs. Lyngby, Denmark an GEA Process Engineering A/S, Søborg, Denmark lnpe@tu.k 2 J. B. Jørgensen is with the Department of Applie Mathematics an Computer Science, Technical University of Denmark, DK-28 Kgs. Lyngby, Denmark jbjo@tu.k known an use, but these solutions epen heavily upon uncertainties in the initial conitions an system parameters which can lea to large errors an thereby profit loss [7], [8]. Therefore, it is avantageous to evelop a close-loop optimization scheme which attenuates uncertainties an is inepenent of the initial conitions [8]. In this work we aress the issue of optimizing the economics irectly in the controller. We present a simple fermenter example to emonstrate our results an show the applicability of E-NMPC in a tutorial fashion. The example is simple enough for us to erive the exact solution to the control problem, an thus compare the achieve performance of the iscrete nonlinear controller with the analytical solution. We aim at eveloping an economic nonlinear MPC which optimizes the close loop performance with respect to an economic objective function for a nonlinear system. We compute the graients of the optimization problem using the single-shooting metho to reuce the computational loa. The controller hanles both input an (soft) output constraints. The esign of the MPC is base on receing horizon control. It is easy to implement an can also easily be use for control of other nonlinear processes to maximize the profit of operation. We introuce a fermentation moel that is base on engineering first principles. It escribes the fermentation process as illustrate in Figure 1. The moel is partly taken from [9] an escribes the fermentation of single cell proteins using Methylococcus Capsulatus. The moel is simplifie in orer to only rener the funamental properties of fermentation. The moel escribes the hol-up, the biomass concentration an the substrate concentration in a well stirre tank, as a

function of water- an substrate-inlets. The paper is organize as follows: In Section II we set-up the control problem incluing iscretization an erivation of the graients of the optimization problem, in Section III we present the fermentation moel. Section IV contains the erivation of the analytical solution to the control problem. In Section V we present simulation stuies to show the benefit of optimizing the fermenter operation compare to the analytical solution. Conclusions are given in Section VI. II. OPTIMIZATION OF DYNAMICAL SYSTEMS In this paper, we consier systems of ifferential equations in the form t g(x(t)) = f(x(t), u(t), (t)) t [t, t f [ (1) where x(t ) = x. The form is natural for a large number of systems in process engineering, petroleum engineering, electrical engineering an mechanical engineering. This system representation is also natural for moelling fermenter ynamics. The state function g(x(t)) typically represents mass, energy an momentum an x(t) represents the states. The ifferential equation may also be represente as the inex-1 ifferential equations t h(t) = f(x(t), u(t), (t)) x(t ) = x (2a) h(t) = g(x(t)) h(t ) = g(x ) (2b) There are no numerical ifference in these two representations. Assuming g/t is non-singular, we can rewrite an get t x(t) = ( ) 1 g x (x(t)) f(x(t), u(t), (t)) x(t ) = x which is not numerically equivalent to (2). In particular, the representation in (3) oes not guarantee conservation of g(x(t)), e.g. mass energy an momentum when solve numerically. We will therefore use the representation in (2) when solving the initial value problem of the fermenter moel. The objective function of our optimization is given in Bolza form φ = (3) t l(x(t), u(t), (t))t + l(x(t f )) (4) where l(x(t), u(t), (t)) is the stage cost an l(x(t)) is the en cost. In orer to optimize the profit of operation, the cost function must represent the cost (or profit) of operating the system in the perio [t, t f ] The manipulate variables an states are restricte by the constraints c(x(t), u(t)) t [t, t f [ (5a) c(x(t f )) (5b) where c(x(t), u(t)) are the stage constraints an c(x(t f )) is the en constraint. The optimal trajectory for the manipulate variables, u(t), an the states, x(t), are obtaine by solution of the continuous-time constraine optimal control problem in Bolza form min [x(t),u(t)] t f t φ = t l(x(t), u(t), (t))t + l(x(t f )) (6a) s. t. x(t ) = x (6b) t g(x(t)) = f(x(t), u(t), (t)), t [t, t f [ A. Discretization c(x(t), u(t)), t [t, t f [ c(x(t f )), (6c) (6) (6e) The continous-time constraine optimal control problem is infinite-imensional. To solve it numerically it must be approximate by a finite-imensional optimal control problem. The manipulate variables are mae finite-imensional by approximating the input profile by a piecewise constant profile u(t) = u k t k t < t k+1 k K (7) with this iscretization, the ynamics may be represente as t g(x(t)) = f(x(t), u k, k ), t k t t k+1 (8) for K =, 1,..., N 1 where x(t k ) = x k. The numerical solution to (8) can be etermine by using a simple Forwar Euler metho. We write it in the resiual form R k (x k, x k+1, u k, k ) = g(x k+1 ) g(x k ) t k f(x k, u k, k ) = The iscretization of u(t) implies the objective function N 1 k= L k (x k, u k, k ) + L N (x N ) (9) where we also use Forwar Euler for iscretization an get L k (x k, u k, k ) = t k l(x k, u k, k ) (1) L N (x N ) = l(x(t f )) (11) The path constraints are relaxe to point constraints C k (x k, u k ) = c k (x(t k ), u(t k )) (12) C N (x N ) = c(x(t f )) (13) Consequently, the continuous time constraine optimal control problem in (6) is approximate by the following iscrete time constraine optimal control problem min {x k } N k=,{u k} N 1 k= φ = N 1 k= L k (x k, u k, k ) + L N (x N ) (14a) s. t. x = x (14b) R k (x k, x k+1, u k, k ) =, k K C k (x k, u k ), k K C N (x N ), (14c) (14) (14e)

B. Single-Shooting Optimization The iscrete-time finite-imensional optimal control problem may be solve using single-shooting (control vector parametrization) [1], multiple shooting [11], [12], or the simultaneous metho [13]. In these methos, a sequential quaratic programming (SQP) algorithm is typically use for the optimization. Graient computation is straightforwar in the simultaneous metho, while either forwar sensitivity computation or the ajoint metho [14] is use by the singleshooting an the multiple-shooting methos. We solve the optimization problem in (14) by the singleshooting metho (also calle vector parametrization, CVP). In this metho the system ynamics (14c) are use to eliminate the state variables an express the objective an constraint function as function of the manipulate variables an initial state only. Given the manipulate inputs, {u k } N 1 k=, the initial value, x, an the requirement, that the system ynamics are observable, the objective function may be expresse as Ψ =Ψ({u k } N 1 k= ; x ) = {φ = N 1 k= L k(x k, u k, k ) + l N (x N ) : x = x, R k (x k, x k+1, u k, k ) =, k K} Similarly, the constraint functions may be parametrize χ k =χ k ({u j } k j=; x ) = { C k (x k, u k ) : x = x, R j (x j, x j+1, u j, j ) =, j K} χ N =χ k ({u j } N 1 j= ; x ) = { C N (x N ) : x = x, R j (x j, x j+1, u j, j ) =, j K} (15) (16) (17) Using (15)-(17), the iscrete time constraint optimal control problem may be expresse as min Ψ({u k } N 1 {u k } N 1 k= ; x ) (18a) k= s. t. χ k ({u j } k j=; x ), k K (18b) χ N ({u j } N 1 j= ; x ) (18c) where K =, 1,..., N 1. It is a nonlinear optimization problem which is solve by using sequential quaratic programming (SQP). In each iteration a convex quaratic problem is solve for which evaluation of Ψ, Ψ, χ k, χ N an χ k, χ N of the nonlinear problem has to be etermine. Ψ an χ are compute irectly from (15) an (16) while Ψ an χ is compute using the ajoint metho. The system states in the optimization problem are epenent on the manipulate variables, in such a way that past changes have an influence on all the subsequent states. This means that the graients have to be etermine in each iteration. The ajoint metho is an efficient metho for computation of these graients. The algorithm for the ajoint metho is presente in Algorithm 1 an 2. Algorithm 1 Ajoint metho for uk Ψ({u k } N 1 k= ; x ) Solve for λ N in xn R N 1 λ N = xn L N for k = N 1 to 1 o Compute uk Ψ = uk L k uk R k λ k+1 Solve for λ k in xk R k 1 λ k = xk L k xk R k λ k+1 en for Compute u Ψ = u L u R λ 1 Algorithm 2 Ajoint metho for uk χ(u k ; x ) N 1 j= Solve for λ N in xn R N 1 λ N = xn C N for k = N 1 to 1 o Compute uk χ = uk C k uk R k λ k+1 Solve for λ k in xk R k 1 λ k = xk C k xk R k λ k+1 en for Compute u χ = u C u R λ 1 As we use the Forwar Euler metho the erivatives simply become xk R k = xk g(x k ) T s xk f(x k, u k, k ) (19) xk R k 1 = xk g(x k ) (2) uk R k = T s uk f(x k, u k, k ) (21) an the erivatives for the cost function become xk L k = T s xk l k (22) uk L k = T s uk l k (23) To solve the problem, we use Matlab s fmincon with an SQP algorithm. A local optimum is reporte if the KKT conitions are satisfie with relative an absolute tolerance of 1 9. A non-optimal solution is returne if the relative cost function or step size changes less than 1 9. The sample time of the NMPC is T s =.2 hours. C. Soft Constraints When both inputs an states are subject to constraints, the solution may become infeasible. For example when isturbances, which cannot be rejecte within the given constraints, hits the system. A metho for ealing with infeasibility is to introuce so-calle soft-constraints. The constraints are softene by using slack variables with the l 2 l 1 penalty function φ s = N 1 k= ( 1 2 st k S w s k + s k iag(s w ) ) (24) with s an (14) are relaxe to C k (x k, u k ) s k. The optimizer will then fin a solution which minimises the original cost function (14) while keeping the constraint

TABLE I KINETIC PARAMETERS Symbol Value Unit γ S 1.777 kg substrate/kg biomass µ max.37 1/hr K S.21 kg/m 3 K I.38 kg/m 3 violations as small as possible. The constraints can also be hanle without the nee for slack variables as shown in [12]. III. FERMENTATION MODEL A mathematical moel is neee for the optimal control an economic analysis of the fermentation process. The aim of this stuy is to provie a moel of the Methylococcus Capsulatus fermentation process. The process is sketche in Figure 1 It is a moel with variable volume, substrate an biomass hol-up that are governe by Halane growth kinetics. The moel is eliberately kept simple to illustrate key principles of fermenter operation. A. Constitutive Relations The biomass growth is limite by substrate. The overall reaction mechanism is γ S S X (25) The cell growth moel is governe by the Halane expression. The reaction rate can be written as follows where the specific growth rate is r = µc X (26) µ = µ max C S K S + C S + C 2 S /K I (27) Consequently, the growth of biomass is only limite by the substrate concentration. The prouction rates of biomass an substrate are R X = r, R S = γ s r (28) The parameters belonging to the growth of Methylococcus Capsulatus are shown in table I. B. Conservation equations A mass balance for the hol-up in the fermenter is governe, assuming constant an ientical ensity of all fee streams an the fermenter content. The mass balances for the biomass an the substrate are also governe an gives t (ρv ) = ρf s + ρf w ρf t (V C X) = F C X + R X V t (V C S) = F s C S,in F C S + R S V (29a) (29b) (29c) with V (t ) = V, C X (t ) = C X, an C S (t ) = C S,. The state functions in the moel are the total mass, m = ρv, the mass of biomass, m X = V C X, an the mass of substrate, m S = V C S. The state variables of the moel are the volume, V, the biomass concentration, C X, an the substrate concentration, C S. The manipulate variables are the water inlet flow rate, F w, the substrate inlet flow rate, F s, an the outlet flow rate, F. When the fermenter is operate in fe batch moe, the outlet flow rate is zero, i.e. F =. C. Objective function - Profit The profit of operating the fermenter is given as the value of the prouce biomass minus the cost of the use substrate. This profit, in the perio [t,t f ], may be expresse as φ p = t (p X R X V p S F S C S,in )t (3) The price of biomass an substrate is 3$ an $ respectively. Often we neglect the price of the substrate, as p X p S. The en cost, l(x(t f )), is equal to zero. Optimal operation of the fermenter seeks to maximize the profit, φ p, by manipulating the fermenter inputs within the operation constraints. D. Constraints The fermentation process is subject to operation restrictions. The manipulate variables are restricte by input constraints F s 3 (31) F w 3 (32) F 6 (33) The outputs, the volume an the concentrations, are restricte by the output constraints V 6 (34) C X.2 (35) These are relaxe in the computations as shown in (24). The en constraint, c(x(t f )), is equal to zero. IV. ANALYTICAL SOLUTION In this section, we evelop an analytical solution to the operation of the fermenter escribe in section III. As the fermenter is initially almost empty, we start up in fe batch moe, an when the tank is fille, it is operate in continuous moe. We consier operation of the fermenter in a perio [t t f ] where t an t f is a large number i.e. t f. In the perio [t t N ] the fermenter is operate in fe batch moe an operate in continuous moe when fille in the perio [t N t f ]. The profit of such an operation is, when neglecting the cost of substrate (p X p S ) for simplicity, t tn φ p = p X R X (t)v (t)t + p X R X (t)v (t)t (36) t N

In orer to maximize the prouction an profit, R X (t) an V (t) must be maximize in both perios. From sec. III-A we have R X = r = µ(c S)C X (37) Thus, the maximal prouction of biomass is obtaine when the biomass an substrate concentrations are kept constant at their optimal values C X = C X,max t [t, t f ] (38) C S = max µ(c S ) = K I K s t [t, t f ] (39) In this case the prouction rates, R X an R S, become constant values which attain their maximal values at R X = r, R S = γ s r (4) such that the total profit of the biomass prouction (36) can be expresse as φ p = p X R X(V max V ) + p X R XV max (t f t N ) (41) A. Fe batch operation In orer to etermine the optimal trajectory for the manipulate inputs we set up the moel equations, utilizing that the biomass an substrate concentrations are now constant. F = in fe batch moe an the ensity ρ is constant, which reuces the moel to V (t) = F s (t) + F w (t) V (t ) = V (42a) V (t)c X = R X V (t) C X (t ) = C X (42b) V (t)c S = F s C S,in + R S V (t) C S (t ) = C S (42c) Substitution of (42a) in (42b) an (42c) yiels [ ] [ ] [ ] CX CX Fs (t) R CS C = X V (t) (43) S,in F w (t) Solving for [ F s (t) [ ] Fs (t) = F w (t) C S F w (t) ] T we get [ C S R X C S,in C X R X (C S C S,in) C S,in C X R S C S,in R S + R S C S,in ] V (t) (44) As we have restricte F w to be greater than zero we require R X(C S C S,in ) R SC X (45) C S,in C S + γ s C X (46) As the volume in the fermenter is given by the simple ifferential equation in (29a), we can now construct the trajectory of the states an the inputs in fe batch operation. The equation becomes t V = F s + F w = R X V (t) V (t ) = V (47) C X Leaing to the state evolution ( ) R V (t) = V exp X CX t (48) an the time, t N, where the fermenter is fille, V (t N ) = V max ( Vmax ) t N = C X RX log (49) V Consequently, the optimal operation of the inputs are given by substituting (48) into (44) an the switch to continuous operation is given in (49). B. Continuous operation During continuous operation, the prouction is optimize by letting the state assume its optimal values V (t) = V = V max t [t N, t f ] (5) C X(t) = C X = C X,max t [t N, t f ] (51) C S(t) = C S = K I K s t [t N, t f ] (52) Solving for [ F s (t) F w (t) F (t) ] T in (29) utilizing the above we get the optimal input trajectory Fs C S (t) R X C S,in C R S Fw(t) X C S,in = R X (C S C S,in) F C S,in C + R X S C S,in V (53) (t) R X C X As the volume, biomass an substrate concentration in the fermenter are measure, we can now construct the optimal inputs for continuous operation. V. RESULTS We illustrate the applicability of the E-NMPC by consiering a combine simulation, in which the fermenter is starte in fe batch moe an then goes into continuous moe when it is full. The analytical solution an simulate states, inputs an the value of the objective function to the fermenter are shown in Figure 2, 3 an 4 respectively. A. Fe batch operation The fermenter is starte in fe batch moe. We, first of all, notice that the controller is able to control the system to the optimal state when comparing with the analytical solution. Furthermore, the volume of the fermenter increases exponentially. The NMPC uses a simple Forwar Euler metho with constant step size for state preiction, an we, therefore, see a small offset arise in the substrate an biomass concentrations while the volume increases. A reuce sample time will ecrease the eviation from the analytical solution. On the other han, the eviation o not lea to a significant loss of profit. The violations of the constraints are small an by any practical means o not pose a problem. B. Continuous operation Continuous moe is reache when prouction is continue after the fermenter is fille. Again we note that the correct optimal solution is foun compare to the analytical solution. The before mentione small offset in the substrate an biomass concentrations have vanishe ue to the constant hol-up. Only small numerical errors on the NMPC solution arise. These errors are ue to the Forwar Euler metho, but are also negligible.

Volumen [m 3 ] 6 4 V ENMPC 2 V analyt V max Difference [$] 2 cost ENMPC cost analyt 1.5 1.5 Conc. of biomass [kg/m 3 ] 1.1 1.5 C x,enmpc C x,analyt 1 C x,max Object fcn value [$] 4 3 2 cost ENMPC 1 cost analyt Conc. of substrate [kg/m 3 ] 8.93 8.92 8.91 C s,enmpc C s,analyt Time [hr] Fig. 2. States of the fermenter. The controller fills the tank an then opens the outlet valve, i.e. starts up in fe batch moe an then continue in continuous moe. The concentrations are kept at almost optimal values uring the compete operation. Substrate inlet flow [kg/hr] Water inlet flow [kg/hr] Prouct outlet flow [kg/hr] 8 6 4 F s,enmpc 2 F s,analyt 6 4 F 2 w,enmpc F w,analyt 15 1 5 F ENMPC F analyt Time [hr] Fig. 3. Inputs to the fermenter. In fe batch moe the flow of water an substrate increases exponentially in orer to stabilize the biomass an substrate concentrations. The flows stabilize when the fermenter is fille. VI. CONCLUSION In this paper, we have erive an emonstrate an economically optimizing nonlinear moel preictive controller (NMPC) for a fermentation process. The performance of the controller is by any practical means eeme ientical to the analytical solution. Only minor economic loss was observe ue to the Forwar Euler state integration metho. A moel for the fermentation process of single cell proteins, using Methylococcus Capsulatus, was state an use irectly in the control algorithm. The process was stuie uner feeback control using the propose controller in a reseeing Fig. 4. Objective function of the fermenter compare to the analytical solution. As seen the losses of running an E-NMPC are very small compare to the analytical solution. horizon setup. The performance of the close-loop system was stuie in fe batch an continuous operation. We have presente a through escription of the NMPC algorithm an a fermentation example, which can be use in a tutorial fashion. REFERENCES [1] J. B. Rawlings, C. N. Bates, an D. Angeli, Funamentals of economic moel preictive control, Proceeings of the IEEE Conference on Decision an Control, pp. 3851 3861, 212. [2] M. L. Darby, M. Harmse, an M. Nikolaou, MPC: Current practice an challenges, IFAC Proceeings Volumes, vol. 7, no. 1, pp. 86 98, 29. [3] R. Amrit, Optimizing process economics in moel preictive control, Ph.D. issertation, University of WisconsinMaison, September 211. [4] R. Halvgaar, N. K. Poulsen, H. Masen, an J. B. Jørgensen, Economic Moel Preictive Control for Builing Climate Control in a Smart Gri. IEEE, 212. [5] T. G. Hovgaar, L. F. Larsen, an J. B. Jørgensen, Flexible an cost efficient power consumption using economic mpc, Proceeings of the 5th IEEE Conference on Decision an Control an European Control Conference, pp. 848 854, 211. [6] D. Angeli, R. Amrit, an J. B. Rawlings, Receing horizon cost optimization for overly constraine nonlinear plants, Proceeings of the IEEE Conference on Decision an Control, pp. 7972 7977, 29. [7] J. M. Moak an H. C. Lim, Feeback optimization of fe-batch fermentation, Biotechnology an Bioengineering, vol. 3, no. 4, pp. 528 54, 1987. [8] B. Srinivasan, D. Bonvin, E. Visser, an S. Palanki, Dynamic optimization of batch processes: II. Role of measurements in hanling uncertainty, Computers & Chemical Engineering, vol. 27, pp. 27 44, 23. [9] D. F. Olsen, J. B. Jørgensen, J. Villasen, an S. B. Jørgensen, Moeling an simulation of single cell protein prouction, vol. 11, no. 1, pp. 52 57, 21. [1] M. Schlegel, K. Stockmann, T. Biner, an W. Marquart, Dynamic optimization using aaptive control vector parameterization, Computers & Chemical Engineering, vol. 29, no. 8, pp. 1731 1751, 25. [11] H. G. Bock an K. J. Plitt, A multiple shooting algorithm for irect solution of optimal control problems, 9th IFAC Worl Congress Buapest. Pergamon Press, pp. 242 247, 1984. [12] A. Capolei an J. B. Jørgensen, Solution of constraine optimal control problems using multiple shooting an esirk methos, Control Conference (ACC), 212, pp. 295 3, 212. [13] L. T. Biegler, Solution of ynamic optimization problems by successive quaratic programming an orthogonal collocation, Computers & Chemical Engineering, vol. 8, no. 3, pp. 243 248, 1984. [14] J. B. Jørgensen, Ajoint sensitivity results for preictive control, statean parameter-estimation with nonlinear moels, European Control Conference 27, pp. 3649 3656, 27.