Linear MPC lowers tracking error against PID in 26 of 30 cells of a simulated yeast fermenter but moves the flows far more
We corrected the balances of a published yeast fermenter model and compared PID control with MPC in ten scenarios.
Abstract
We compared proportional-integral-derivative (PID) control with an offset-free linear model predictive controller (MPC) on a published model of a continuous yeast fermenter. Ten scenarios shared limits and a 3-h measurement delay. The benchmark's variable-volume balances create ethanol and enthalpy whenever feed and outflow differ, so we first rewrote them in conservative form. Against the best PID variant for each scenario and loop, MPC gave a lower integral absolute error (IAE) in 26 of 30 scenario-loop cells. It did so in 20 of 21 cells at each of four ±20 % kinetic-mismatch corners. It moved the flows more in 27 of 30 cells, and in a seeded noise run its feed travel was 284 times the lowest PID value. At a reachable 25 °C setpoint it entered a limit cycle 0.10-0.17 °C above the target. As tuned here, MPC is not ready to replace the PID loops.
1. Introduction
Bioprocess plants control fermenters mostly with single-loop PID controllers, often tuned by internal model control (IMC) rules [1, 2]. MPC is the usual alternative for coupled, constrained processes [3]. Offset-free versions add disturbance states that remove steady-state offset under model error, if detectability holds and a feasible steady state exists [4, 5]. The price is a model, an estimator and more tuning [6].
Nagy [7] published a seven-state model of a continuous jacketed yeast fermenter, and its code is public [8]. The code uses the outflow as the dilution term, which is exact only when feed and outflow are equal. Kumar et al. [9] hold the two flows equal, and Valero and Bakosova [10] compared PID and MPC on one loop with constant flows. A volume loop moves the flows apart. We asked whether a linear offset-free MPC controls all three loops better than PID under the same disturbances, limits and tuning objective. It lowered the tracking error in most cases but moved the flows much more and cycled at a reachable target.
2. Methods
2.1 Model
All constants came from the benchmark code [8], and none was fitted. For a species that the feed does not contain, the balance on the inventory VC gives
dC/dt = r - (Fin/V) C,
so the dilution term contains the feed Fin, not the outflow. The plant and the MPC model use this conservative form, also for glucose and enthalpy. An 80-h open-loop run with unequal flows checked the closure of every inventory.
2.2 Control test
The outflow controls the volume, the jacket flow the temperature and the feed the ethanol concentration. Feed and outflow were limited to 100 L/h and the jacket flow to 80 L/h. S1 to S4 are feed load, inlet temperature and feed sugar disturbances. S5 and S6 raise the ethanol setpoint to 15 and 18 g/L, and S7 lowers the temperature setpoint from 29.6 to 25 °C. S2-F40 and S7-F40 limit the jacket flow to 40 L/h, and S4-noise adds seeded measurement noise.
PID-R is the author's earlier design [11], unchanged. PID-M applies the same rules to models identified on the conservative plant. Both also ran without feedforward in S3, S4 and S4-noise. The MPC uses the conservative model linearised at the nominal steady state, three integrating disturbances and a Kalman filter. Only three settings were selected on data, the PID-M ethanol time constant from eight values and two MPC weights from 81 pairs, all with one IAE objective on S1 and S5.
Each MPC result is compared with the best PID variant for the same scenario, loop and metric. A cell is one scenario and one loop, and this per-cell envelope is stricter than any single PID. Travel sums the absolute changes between logged flow commands and excludes the initial move at t = 0. A mismatch test changed two kinetic constants by ±20 % in the plant only. The rules were fixed before scoring, and independent re-runs checked the final results.
3. Results
3.1 The benchmark balances create ethanol and heat when the volume moves
Over the 80-h closure run, the benchmark form missed its inventories by up to 3.9 % for biomass and ethanol and 1.9 % for glucose (Figure 1). Its enthalpy error was 34 % with a 0 °C reference and 3.8 % with 0 K, so it depends on the arbitrary temperature zero. The conservative form closed every inventory to 1.03 × 10-12.
The correction also changed the PID-M tuning, reversed the verdicts on the S4-noise and S7 volume loops and revealed two MPC limit cycles.
3.2 MPC lowers the IAE in 26 of 30 cells
On the nominal plant, MPC had a lower IAE than the best PID variant in 26 of 30 scenario-loop cells (Figure 2a). Four cells went to PID. Two are in S7-F40, where the 25 °C target is unreachable because it needs 68.9 L/h of jacket flow. The others are the S7 ethanol IAE (+1.9 %) and the S4-noise volume IAE (+61.5 %). Under kinetic mismatch, MPC kept the lower IAE in 20 of 21 cells in every corner. S7 became unreachable in the two lower-production-rate corners. MPC cycled at S7 in the other two and at the reachable S6 target in the lower-rate ones.
3.3 The lower error costs actuator travel and continuous operation
MPC moved the flows more than the least-travel PID variant in 27 of 30 cells (Figure 2b). In the seeded S4-noise run, its feed command travelled 41,084 L/h, against 144.8 L/h for PID-R without feedforward (Figure 3d). The disturbance estimator, tuned on noise-free scenarios, followed the noise.
In S5 and S6, MPC also shut feed and outflow together for 3.6 and 9.4 h, so the fermenter ran as a batch.
3.4 MPC cycles at the reachable 25 °C target
S7 is reachable with a throughput of 36.5 L/h and a jacket flow of 68.9 L/h. PID-R and PID-M settled in 586 and 612 h. MPC never settled. Over the last 400 h its temperature cycled 0.10-0.17 °C above the setpoint, while the jacket flow swung between 33 and 80 L/h (Figure 3). At the S7 steady state, the plant's gains from jacket flow and throughput to temperature are 26 % and 10 % of those in the MPC model, which was linearised at the nominal point. The model thus overstates these gains by a factor of 4 to 10. This is consistent with model error as the cause, but the diagnostics do not separate it from the interaction of estimator and regulator.
4. Discussion
Against the per-cell PID envelope, MPC lowered the IAE by at least 70 % in 19 of 30 cells, and its IAE advantage held under mismatch. The costs may reflect the selected model, estimator and tuning objective. The objective has no actuator term, and the tuning runs had no noise. The disturbance model and estimator shape the closed-loop behaviour of offset-free MPC [5], and the move weight is the usual means of limiting actuator movement [12].
The PID baseline also needed corrections. The earlier design rests on an ethanol-to-feed gain of +1.795 g/L per L/h, while the model gives -0.191 to -0.202.
The benchmark form passes the usual checks because it is exact with equal flows, and a short run with unequal flows and a closure check detects the problem. Valero and Bakosova [10] found no strategy best on every criterion for one loop with constant flows. With three coupled loops, MPC lowered the IAE but moved the flows far more. Both studies support keeping PID as a baseline.
5. Limitations
All results come from simulation of one model, with no plant data. The model's step tests differ from the earlier report in 30 of 40 checks, and it was accepted on the steady state and closed-loop figures. The delay was imposed and the disturbance profiles were fitted to the report's figures, so the S2 checks are not independent. The closure test checks the algebra of the balances, not elemental or gas-phase completeness, and the equations of other published studies of this model were not checked.
The comparison itself has narrow bounds. The mismatch test varied only two kinetic constants at ±20 %, not heat transfer or the delay, and never with a simultaneous disturbance. The PID search covered eight values of one time constant against 81 MPC candidates, so a broader search might narrow the gap. Only one MPC design was tested, and no nonlinear MPC. No controller was tuned for noise, and the noise results come from one seeded run.
Some operating questions lie outside the study. Neither controller had rate limits or a minimum flow, and whether a plant would accept a throughput stop was not assessed. Travel is a wear proxy, and valve wear and production losses were not modelled. Reachability covers the branch with a living culture at throughputs of 5-100 L/h and excludes zero-flow steady states. The paper's solve times were wall-clock values on one shared processor core.
6. Conclusions
On the corrected Nagy fermenter, a linear offset-free MPC gave a lower IAE than the best PID variant in most cells. It paid with more actuator movement, a throughput stop and a limit cycle at a reachable target. As tuned here it should not replace the PID loops and first needs noise-aware tuning, a model valid over the operating range and a minimum-flow constraint. The original balances do not conserve mass or energy, so a closure test should precede any controller ranking on this model.
References
- Alford JS. Bioprocess control. Advances and challenges. Computers & Chemical Engineering 30, 1464-1475, 2006.
- Rivera DE, Morari M, Skogestad S. Internal model control. PID controller design. Industrial & Engineering Chemistry Process Design and Development 25, 252-265, 1986.
- Qin SJ, Badgwell TA. A survey of industrial model predictive control technology. Control Engineering Practice 11, 733-764, 2003.
- Muske KR, Badgwell TA. Disturbance modeling for offset-free linear model predictive control. Journal of Process Control 12, 617-632, 2002.
- Pannocchia G, Rawlings JB. Disturbance models for offset-free model-predictive control. AIChE Journal 49, 426-437, 2003.
- Forbes MG, Patwardhan RS, Hamadah H, Gopaluni RB. Model predictive control in industry. Challenges and opportunities. IFAC-PapersOnLine 48(8), 531-538, 2015.
- Nagy ZK. Model based control of a yeast fermentation bioreactor using optimally designed artificial neural networks. Chemical Engineering Journal 127, 95-109, 2007.
- Hedengren J. Yeast fermentation bioreactor for ethanol production. MATLAB Central File Exchange, submission 16317, with the model code sf_bioc.m by Z. K. Nagy, 2007.
- Kumar M, Prasad D, Giri BS, Singh RS. Temperature control of fermentation bioreactor for ethanol production using IMC-PID controller. Biotechnology Reports 22, e00319, 2019.
- Valero CE, Bakosova M. Classic methodologies in control of a yeast fermentation bioreactor. 23rd International Conference on Process Control, 200-205, 2021.
- Ho T. Characterization and control of a yeast fermentation reactor. Project report, University of California, Berkeley, undated.
- Garriga JL, Soroush M. Model predictive control tuning methods. A review. Industrial & Engineering Chemistry Research 49, 3505-3515, 2010.