Metabolic Reaction Network-Based Model Predictive Control of Bioprocesses

: Bioprocesses are increasingly used for the production of high added value products. Microorganisms are used in bioprocesses to mediate or catalyze the necessary reactions. This makes bioprocesses highly nonlinear and the governing mechanisms are complex. These complex governing mechanisms can be modeled by a metabolic network that comprises all interactions within the cells of the microbial population present in the bioprocess. The current state of the art in bioprocess control is model predictive control based on the use of macroscopic models, solely accounting for substrate, biomass, and product mass balances. These macroscopic models do not account for the underlying mechanisms governing the observed process behavior. Consequently, opportunities are missed to fully exploit the available process knowledge to operate the process in a more sustainable manner. In this article, a procedure is presented for metabolic network-based model predictive control. This procedure uses a combined moving horizon-model predictive control strategy to monitor the ﬂux state and optimize the bioprocess under study. A CSTR bioreactor model has been combined with a small-scale metabolic network to illustrate the performance of the presented procedure.


Introduction
Biochemical processes have gained attention in the past decades in producing high added value products. Microorganisms play an important role in biochemical processes as these mediate or catalyze the reactions that are required to produce the products of interest. The mechanisms governing such biochemical processes are often complicated as a large number of reactions within the microbial cells and interactions between the microbial cells and the reactor medium take place. To summarize and model the mechanisms governing biochemical processes, metabolic network models have become an important tool. Metabolic networks comprise all interactions within the cell and between cell and environment by modeling the metabolites (i.e., the chemical compounds produced, consumed, and interacted with by the microorganisms) as the nodes and the reactions or fluxes between these different chemical compounds as the edges of a network. Mathematically, this network can be summarized in a stoichiometric matrix S in which an element S ij corresponds with the stoichiometric coefficient of the i-th metabolite in the j-th reaction or flux [1,2]. Genome-scale metabolic network model reconstructions are the result of intensive genomic studies involving numerous experiments. Hence, the result of such a study is a highly complex metabolic network with often a myriad of reactions and metabolites. Using genome-scale metabolic networks in an online control setting is to date infeasible as these models typically contain over 100 metabolites and reactions and hence a high number of differential states. Therefore, the current state of the art in model-based bioprocess optimization relies on macroscopic mass balance models. This is one of the main reasons the current state of the art in model-based bioprocess optimization and control relies on macroscopic mass balance models, often only including biomass, substrate, and product mass balances. Macroscopic mass balance models make abstraction of the underlying mechanisms governing the studied bioprocess and therefore miss opportunities in achieving a better process monitoring and control. As there is no need to account for irrelevant parts of the metabolism for the process under study, genomescale metabolic networks can be reduced to low complexity metabolic network models. The complexity of the metabolic network that should be used for a studied bioprocess depends on the level of detail required and the amount of experimental data or information available to identify the network. Hence, low-or medium-complexity metabolic networks can be used to account for the relevant intracellular mechanisms governing the bioprocess under study. Results from literature, e.g., [3], indicate that including such metabolic network models in bioprocess optimization results in an improved process performance compared with the use of an unstructured macroscopic bioprocess model. In addition, the intracellular fluxes can be estimated rather accurately from extracellular measurements using a low-or medium-complexity metabolic network as in e.g., [4][5][6][7][8], enabling an enhanced bioprocess monitoring by monitoring the flux state, hence the metabolic state of the microorganisms in the biochemical process.
The current state of the art in model-based bioprocess control is model predictive control (MPC) in which a process model is used to solve an open-loop dynamic optimization problem over a time interval, called the prediction horizon to optimize the future of a process. The optimal control inputs are computed until a new measurement becomes available. In biochemical processes, not all states can be measured and the states need to be estimated from the available measurements. For linear systems a Kalman filter can be used to retrieve an optimal state estimate [9]. For nonlinear systems extended Kalman filter [10] or the unscented Kalman filter [11] can be used. Alternatively, moving horizon estimation (MHE) can be used which solves a constrained optimization problem based on a set of measurements obtained at previous time points and also moves this estimation horizon when a new measurement is obtained [12][13][14]. MHE is quite similar to MPC in the sense that in both approaches a dynamic optimization problem is solved online and at every sampling instance the employed horizon is shifted. MHE looks at the past to estimate the states, while MPC looks at the future to compute controls.
In this article, a strategy is presented for online flux estimation and bioprocess control using low complexity metabolic network models. As indicated previously, one of the typical problems in online bioprocess control is the limited number of experimental measurements that are available. Therefore, a dynamic metabolic flux analysis (DMFA) model structure is combined with three kinetic models to estimate the intracellular fluxes: a constant, a linear, and a nonlinear model. The state estimation is performed based on MHE, while MPC is used for the bioprocess control. The presented strategy is applied to a continuous stirred tank (bio)reactor (CSTR) case study which uses a a low-complexity metabolic network.
The remainder of this article is structured as follows. Firstly, the Methods section consists of the description of the used model structure for metabolic reaction networkbased modeling and the used kinetic model structures, followed by the introduction of the combined MHE/MPC strategy. Next, the case study is presented together with the results obtained after implementing the presented procedure. Finally, the main conclusions of this contribution are summarized.

Metabolic Reaction Network-Based Modeling
For a full overview of metabolic reaction network theory, the reader is referred to [1]. Here, only the final dynamic metabolic flux analysis model structure, which is used for the simulation and control parts of this work, is given [15]: with c ext being the (m ext × 1) vector of concentrations of extracellular metabolites (mol/L), c bio the scalar biomass concentration (gDW/L), S ext the m ext rows of the stoichiometric matrix which correspond to the extracellular metabolites, and s T bio the row of the stoichiometric matrix which corresponds to the biomass pseudo-metabolite. It is assumed that the production of biomass can be described by a pseudo-reaction/metabolic flux (a so-called biomass flux) as illustrated in [15]. This biomass concentration is used in Equations (1) and (2) to match dimensions of the RHS and the LHS as the (free) fluxes are expressed per gDW biomass and the metabolite concentrations are expressed in mol/L. u is the (d × 1) vector of free fluxes (mol/gDW/h), and K is a suitable basis for the intracellular part of the stoichiometric matrix S int . As the fluxes are parameterized as a function of the basis and the free fluxes v = K * u, the choice of the basis is an important one as this determines the definition of the free fluxes and the complexity of the flux profiles and the number of parameters to be estimated. The authors of [15] demonstrated that three options exist to select a basis: (i) a fixed rational basis, (ii) a fixed orthonormal basis, or (iii) an optimal orthonormal basis. In this case, a fixed rational basis based on fluxes 1, 4, and 5 has been chosen. This matrix is of dimension (n × d), where n is the total number of fluxes in the network. The number of free fluxes d is equal to n − rank(S int ). This formulation stems from the pseudo steady state that is assumed at the intracellular level, with respect to the extracellular dynamics.
This model is only fully defined when all free fluxes are expressed as a function of the concentrations and possibly environmental conditions like temperature and pH: with Φ being the parameter vector specific to the model structure which is used. As the fluxes are defined as specific fluxes, i.e., on a per-biomass basis, they do not depend on the biomass concentration anymore. Furthermore, in this contribution, only the dependence on the extracellular metabolite concentrations is considered.

Moving Horizon Estimation (MHE)
Moving horizon estimation (MHE) estimates states and parameters at a point in time t i+H e from the measurements at this time point and the measurements at the previous H e time points. Hence, an estimation horizon of H e + 1 measurements is used for the state and parameter estimation. Once a new sample is taken at t H e + 1, the estimation horizon moves one time step, meaning that the measurements at t H e + 1 are used for the state and parameter estimation while the measurements related to the first point of the previous horizon (i.e., t i ) is discarded [12][13][14]. This is also illustrated in Figure 1.  Concretely, a dynamic combined state and parameter estimation problem (in essence, a dynamic optimization problem) is solved over a time interval [t i , t i+H e ]. In this article, the MHE formulation of [7] is used. This formulation is presented below for completeness. For more details on this formulation, the interested reader is referred to [7].
subject to:ẋ with x(t) = c ext (t) c bio (t) being the state vector comprising both extracellular metabolites and biomass at t,û the estimated free fluxes, p the flux parameters, q bio = [0 . . . 0 1] a row vector selecting the partition of the extracellular stoichiometric S e = S ext s bio corresponding with biomass, X in ∈ R4 × 2 the matrix of concentrations at the bioreactor inlet for the different metabolites, and r ∈ R 2×1 the vector of control variables manipulating the feed composition sent to the reactor and D the dilution rate. In addition, the process noise on the states and parameters is denoted by ω x (t) and ω p (t), respectively. Algebraic states z(t) have been added for the description of the irreversible fluxes as denoted in Equation (9).
Note that x c H e , i.e., the combined state and parameter vector at t i+H e and the process noise estimates w i , . . . , w i+H e −1 are the optimization variables for the MHE problem described in Equations (4)- (11). Note that the arrival cost parametersx c i andP i are updated via an unscented Kalman filter [16].

Unscented Kalman Filter (UKF)
The unscented Kalman filter (UKF) is an extension of the unscented transformation to the Kalman filter. The unscented transform is a way to calculate the mean and variance of the nonlinear transformation of a random variable that follows a symmetric unimodal distribution. In this article, the states and parameters are the nonlinear transformation of the random variable (i.e., the initial conditions of the states and parameters). In UKF, the sigma points, a fixed number of deterministically chosen sampling points from the distribution of the random variable and are then propagated through the nonlinear function. The mean and covariance of this propagation are subsequently approximated. For the implementation of the UKF in this work, the sigma points are chosen based on recommendations from [11]. Different strategies can be used to select these sigma points and recently a comparative study has been presented in [17].

Model Predictive Control (MPC)
Model predictive control (MPC) solves an open-loop dynamic optimization problem over a time interval t k , t k+H p , with H p as the prediction horizon to optimize the future of a process. The novel obtained measurements and state and parameter estimates at t k are used as initial conditions for the open-loop dynamic optimization problem that is solved at every iteration. This principle is illustrated in Figure 2: based on the state estimate or measurement at t k a dynamic optimization problem is solved over the time interval t k , t k+H p (a). The solution is applied to the process until a new measurement at t k+1 is obtained and then a new dynamic optimization problem is solved over t k+1 , t k+H p +1 (b).  MPC has become a widespread control strategy and numerous successful applications to industrial problems have been reported, e.g., [18,19]. MPC typically refers to linear MPC in which a quadratic objective function is minimized using a linear process model and subject to linear constraints. In the last decades, nonlinear MPC (NMPC) approaches using nonlinear process models, constraints, and objective functions have become more popular.
In this article the following (N)MPC formulation for t ∈ t k , t k+H p is used, based on [20]: subject to:ẋ withx(t k ) being the measured or estimated state values at t i , c(x, r, p, τ), constraint functions on the systemare not comprised by the previous constraints, τ is the time used in solving the dynamic optimization problems in the NMPC routine, and x and r the states and controls computed by solving the dynamic optimization problem on the interval t k , t k + H p . Note that for the other symbols the same notation is used as in the MHE problem (Equations (4)- (11)). As MPC requires that the entire state vector is known, the states and parameters estimates at t k are denoted byx k andp k .

Combined MHE/MPC Strategy
In this article, a strategy combining MHE and MPC is used for the model-based predictive control of bioprocesses exploiting metabolic network information. The movinghorizon strategy used in this work is thus different from regular implementations because of the black-box nature of the flux models which are used. The proposed strategy is outlined in Figure 3.
The algorithm starts with taking a sample and use an unscented Kalman filter (UKF) to estimate the combined state and parameter vector and the combined state and parameter variance-covariance matrix. Subsequently, it is checked whether a sufficient number of measurements is available to perform MHE, i.e., H e + 1 measurements need to be available or equivalently: t k ≥ t H e . If t k < t H e , the state and parameter estimates from UKF are used for the MPC step. Otherwise, the state and parameter estimates from the MHE procedure are used for the MPC step. The control action computed during the MPC step is then applied to the process until the next sample is obtained. Once the end time t f is reached, the algorithm is stopped.
This combined MHE-MPC strategy has been implemented in the Pomodoro toolkit [21], which is available at https://cit.kuleuven.be/biotec/software/pomodoro (accessed on 11 October 2021). Pomodoro is a toolkit that can be used for solving dynamic (multiobjective) optimization problems and for model-based control and estimation. Pomodoro uses CasADi [22] as a symbolic framework for the problem formulation and derivative computation. Orthogonal collocation is used as default to discretize the dynamic optimization problems. A piecewise constant discretization is used for the controls and cubic Lagrange polynomials with collocation points at the Radau roots are used for the states [

Results and Discussion
The proposed combined MHE-MPC strategy for metabolic network model-based predictive bioprocess control has been implemented on a CSTR bioreactor using a lowcomplexity metabolic network. The general setup for the implementation of this case study is shown in Figure 4. Two different models are used: (i) the simulation model, which gives the process dynamics, and to which output noise is added to get the process measurements, and (ii) the estimation/control model, which is an approximation since the process model is not known. It is important to note that only the flux kinetics are assumed to be unknown in the estimation/control model. The metabolic reaction network in the estimation/control model is for this case study the same as the one used in the simulation model. Additionally, the general model structure, i.e., the transport terms, etc., are the same for both the simulation and the estimation/control model.
2. Add noise to the outputs.
• Assump<on on flux kine<c model structure.

Case Study Description
The bioprocess in this case study is a continuous bioreactor with two substrates and two products. The composition of the medium that is fed to the bioreactor is controlled, but the flow rate of this feed is always kept constant, as well as the flow rate of the spent medium that is removed from the bioreactor. Since both these flow rates are equal, the volume of the bioreactor is kept constant. Mathematically, the dynamic model consists of (i) the reaction term as defined in Equations (21) and (22), and (ii) transport terms because of the supply of substrate to the reactor and removal of medium from the reactor. The resulting model is the following: with F as the flow rate (L/h) in and out of the bioreactor and V the volume (L) of the bioreactor, making D = F V the dilution rate (1/h). In this article, the dilution rate is fixed to 0.1 h −1 . The (3 × 3) substrate composition matrix C in is made up of three columns that express the composition of each of the three feed mixtures, and the (3 × 1) control vector w contains the weights of these feeds in the final mixture which is sent to the bioreactor. To make sure the total flow rate to the bioreactor is equal to the outgoing flow rate, these controls should always sum to one: This way, there are only two independent controls in the system. The numerical values for the model parameters are given in Table 1.
The metabolic reaction network, simulation model, and the estimation/control model are briefly discussed below.

Model Parameter
Numerical Value The metabolic reaction network that is used in the case study is shown in Figure 5 on the left, along with the corresponding S int , S e , I irr , and the selected null basis K (note that K is depicted in Figure 5

Simulation Flux Model
For the simulation of the measurements, these were chosen as flux 1, 4 and 5. Measurements were simulated by choosing reference profiles for these three fluxes, and simulating the states using the dynamic system.
This simulation flux model is used to generate measurements over a time range of 140 h, measuring A ext , E ext , F ext . Additive, independent, Gaussian measurement noise was added to the output of the simulation model with 0.01 as standard deviation. The initial conditions were set to x 0 = [0.5760, 3.5527, 2.4976, 0.8736] . The process noise was also considered to be of the same type but with a standard deviation of 0.001. The standard deviations to be used in the arrival cost parametersP 0 is taken equal to the measurement variance for the states and set to 1.0 for the parameters. Different sampling frequencies are studied and the same holds for the prediction and estimation horizons H p and H e , which are chosen to be equal in this article. This is not necessarily the case in practice.

Estimation/Control Flux Model
Three different kinetic flux model structures are studied as estimation/control flux model, a constant, a linear, and a non-linear model.
The constant model considers the fluxes to be constant: with p u ∈ R d×1 , thus three parameters to be identified. In the linear model, the fluxes are just a linear function of the extracellular concentrations: with C as the (d × m ext ) matrix of parameters that define the linear relationship between fluxes and metabolite concentrations. This results in nine parameters to be identified. The non-linear kinetics model that is used in this work is the general biological reaction kinetics model of [25]. This model can describe both positive and negative effects of components on reaction rates, and uses only one parameter per component to describe both effects, and one maximum rate parameter per flux, i.e., (m ext + 1) × d parameters: In these equations, u max is the (d × 1) vector of maximum rate parameters, and D is the (d × m ext ) matrix of modulation parameters. If these parameters are positive, they describe a positive activation/saturation effect of the concentrations on the fluxes, if they are negative, an inhibition effect is represented. Hence, 12 parameters need to be identified i.e., 4 parameters per free flux.

Numerical Results
Initially, the CSTR bioreactor is studied over a period of 140 h with a sampling rate of 1 h, resulting in 140 simulation intervals. During the first 10 h, a constant ratio of 50% A ext and E ext is fed to the CSTR reactor. A horizon length of 4 h has been selected for both the estimation horizon as the prediction horizon (i.e., H = H e = H p = 4 h, corresponding to 20 intervals). This means that after 4 h, the first MPC control action is applied to the process. Moreover, the set point x SP for the MPC is defined as follows: In Figure 6 the simulated state profiles are depicted together with the estimates obtained when using the estimation/control model. The full lines indicate the simulations while the markers indicate the estimates. For all different models the proposed strategy results in accurate state estimates. This complies with the results presented in [7]. For an extensive discussion focusing only on state estimation the interested reader is referred to [7]. Recall that the arrival cost matrices are computed with an unscented Kalman filter in this article, contrary to the arrival cost computation in [7]. In [7] the arrival cost is approximated by a quadratic cost and linearizing the nonlinear functions to obtain a linear least squares problem that can be solved analytically and results in an analytical expression for the arrival cost [14]. A notable difference can be observed when comparing the state profiles for the different flux models. The cause for this difference can be twofold: (i) the linear and Haag models are more similar to the true flux model than the constant flux model hence resulting in more similar flux profiles, and (ii) the control profiles for the true, linear, and nonlinear flux models are more similar, compared with the constant flux model. This is investigated in more depth below.

MPC Tracking Performance
In Figure 7 the extracellular metabolite concentration profiles (i.e., the state profiles) are depicted for the different methods, together with the set point that is used for the different concentrations during the MPC procedure. For the extracellular metabolites that are consumed, i.e., A ext and E ext , the set points are better tracked by the true flux model and the constant flux model than by the linear and Haag models. The extracellular metabolites that are excreted (or produced) by the cells are better approximated with the true, linear, and Haag flux models. These observations are made from Figure 7. In order to quantify the difference in tracking performance between the MPC control strategies obtained with the different flux models, the unscaled absolute values of the absolute tracking errors for each state are depicted in Table 2  For completeness, the control profiles are depicted in Figure 8. The control profiles computed with the constant flux model are flatter than the control profiles computed with the other flux models. The difference between these control profiles confirms the tracking performance discussed above.

Influence of Horizon Length Same Horizon and Estimation Horizon
Firstly, the influence of the horizon length on the tracking performance is studied by selecting the same horizon for estimation and prediction (control): H = H e = H p . Four different horizons have been simulated, assuming that a sample is taken every hour: H = 2 h, H = 4 h, H = 12 h, H = 24 h. The absolute values of the absolute tracking error for all states are depicted in Figure 9.
Globally, it can be observed that the MPC control performance obtained with the true flux model and the linear flux model are more similar for a small horizon length, i.e., H = 1 h. However, no clear global trends can be observed for the increase of the horizon length. As both the estimation and prediction horizon have been modified, it is difficult to interpret these graphs. Therefore the effect of only changing the prediction horizon or solely changing the estimation horizon is addressed in the next paragraphs.

Influence of Only Changing the Prediction Horizon
In this paragraph the estimation horizon is set to H e = 4 h and the prediction horizon has been varied as in the previous paragraph. Four different horizons have been simulated, assuming that a sample is taken every hour: H p = 2 h, H p = 4 h (4 h), H p = 12 h, H p = 24 h. In Figure 10, the absolute values of the absolute tracking error are displayed.
T r u e C o n s ta n t L in e a r H a a g  Increasing the prediction horizon results in a slight reduction of the tracking error of all states using the true flux model. For the other flux models, such clear observations cannot be made.

Influence of Only Changing the Estimation Horizon
Contrary to the previous paragraph, the estimation horizon is varied and the prediction horizon is kept constant at 4 h. Following estimation horizons have been studied for a sampling rate of 1 h: H e = 2 h, H e = 4h (4 h), H e = 12 h, H e = 24 h. In Figure 11, the absolute values of the absolute tracking error are displayed.
The estimation horizon has a small effect on the MPC tracking performance, except for the linear flux model, in which the estimation horizon of 24 h clearly results in a higher on the MPC tracking error for all extracellular metabolites except F ext .

Influence of Sampling Frequency
The influence of the sampling frequency on the tracking performance has been studied for an estimation and horizon length of 4 h (H = H e = H p = 4 h). Four sampling frequency scenarios have been studied: 12 min, 30 min, 1 h, and 2 h. The MPC tracking error divided by the number of sampling points has been depicted in Figure 12.
It is expected that a higher sampling frequency will result in better tracking. This corresponds with lower sampling times dt. In Figure 12

Conclusions
One of the current limitations in online bioprocess control is the use of macroscopic models (that only account for substrate, biomass, and product mass balances), as the available process knowledge on the relevant underlying intracellular mechanisms is not fully exploited and as such opportunities are missed towards an optimal bioprocess operation. In this article, a procedure for metabolic network-based model predictive control has been presented, by combining online flux estimation and bioprocess control using metabolic network models. This procedure firstly uses moving horizon estimation (MHE) to estimate the states and fluxes from the available measurements and subsequently solves a model predictive control (MPC) problem to determine the optimal control strategy for the studied bioprocess. To illustrate the performance of this procedure, a case study combining a CSTR bioreactor model with a metabolic network model has been implemented. Three different model structures (a constant, a linear, and a nonlinear model) have been compared, clearly indicating that the linear flux model outperforms the nonlinear Haag flux model and the constant flux model. The true model is, as expected, outperforming the other models. In addition, the influence of the horizon lengths and sampling frequency on the MPC tracking performance has been studied. While an increase of the prediction horizon length was expected to reduce the tracking error, such observation could only be made for the true model. An increase in sampling frequency (or reduction in sampling time) was expected to reduce the tracking error, but this observation could only be made for the true model and for the linear model.
In future work, the presented procedure will be applied to the online control of bioprocesses involving large-scale metabolic networks. In addition, uncertainty will be accounted for during the MPC routine. Furthermore, the presented metabolic network-based model predictive control procedure can also be combined with high-throughput biological datasets [26,27] and advanced metabolomics techniques as e.g., low-frequency NMR, to improve the metabolic model predictions and process monitoring capabilities [8,27]. One of the current limitations of metabolic network models and methods as metabolic flux analysis is the inherent pseudo-steady state assumption. This assumption is not always valid, certainly not at timescales of multiple scales due to shifting from exponential growth phase to stationary phase. The authors of [28] proposed a hybrid modeling approach, combining machine learning with metabolic network modeling which provided accurate predictions for amino acid consumption rates in Chinese Hamster Ovary Cells. Such hybrid models could also be used in the proposed metabolic network-based MPC procedure.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

CSTR
Continuous stirred tank reactor DMFA Dynamic metabolic flux analysis MFA Metabolic flux analysis MHE Moving horizon estimation MPC Model predictive control