CHEMICAL ENGINEERING TRANSACTIONS VOL. 45, 2015 A publication of The Italian Association of Chemical Engineering www.aidic.it/cet Guest Editors: Petar Sabev Varbanov, Jiří Jaromír Klemeš, Sharifah Rafidah Wan Alwi, Jun Yow Yong, Xia Liu Copyright © 2015, AIDIC Servizi S.r.l., ISBN 978-88-95608-36-5; ISSN 2283-9216 DOI: 10.3303/CET1545217 Please cite this article as: Mohd N., Aziz N., 2015, Control of bioethanol fermentation process: narx-based mpc (narx-mpc) versus linear-based mpc (lmpc), Chemical Engineering Transactions, 45, 1297-1302 DOI:10.3303/CET1545217 1297 Control of Bioethanol Fermentation Process: NARX-Based MPC (NARX-MPC) versus Linear-Based MPC (LMPC) Noraini Mohd, Norashid Aziz* School of Chemical Engineering, Engineering Campus, Universiti Sains Malaysia, Seri Ampangan, 14300, Nibong Tebal, Seberang Perai Selatan, Penang, Malaysia chnaziz@usm.my Driven by the perspective of fossil fuels depletion, the concerns about energy security and global warming, the promotion of biofuels as energy for transportation in the world has become a popular trending. Bioethanol is one of a potential biofuel with a high octane number and has replaced lead as an octane enhancer in petrol. In bioethanol fermentation, the process possesses complex dynamics caused by the microorganisms involved in the process as well as the variation in the biomass composition with the operating conditions. In this work, a nonlinear model known as the Nonlinear Autoregressive with Exogenous input (NARX) model was developed and embedded with a nonlinear programming (NLP) optimizer in the Model Predictive Control (MPC) strategy (NARX-MPC) to control the fermentation process. Then, the performance of the NARX-MPC was evaluated and compared with the Linear model based MPC (LMPC) in set point tracking, disturbance rejections and robustness tests. From all tests carried out, NARX-MPC has shown better performances as compared to LMPC. 1. Introduction The last 10 to 15 years show significant amount of efforts has been carried out by technology suppliers in improving the usability of their MPC products (Darby and Nikolaou, 2012). Beginning in 1996, the MPC has gained a lot of attention among researchers to control the fermentation process. Overall, the results of the proposed MPC by these researchers demonstrate desirable control characteristics which are very good in tracking set point, have small overshoot values and are good in disturbance rejection. MPC refers to a control algorithm that explicitly incorporates a process model to predict the future response of the controlled plant and take appropriate action through optimization. While the model may be linear or nonlinear. Quarterman et al., (2014) have implemented the model-based control simulation in fermentations process for genes coding, for enhancing bioethanol production and maintaining acceptable overall growth rate in oxygen-limited conditions. Meanwhile in the model development, researchers have mainly focused on Nonlinear ARX (NARX) models such as in the works of Hong et al. (1996) and later Efe et al. (2007), and the Neural Network model (Meleiro et al., 2009). The implementation of the NARX model is found to be easier where the model parameters can be verified using the information matrix, and provides a great presentation for real process analysis, modeling and prediction due to its strength in accommodating the dynamic, complex (Harris and Yu, 2007) and nonlinear nature of the actual process applications (Mu et al., 2005). In this work the NARX-MPC is developed to control the process. NARX model identification for this particular process can be found in the previous works done by Mohd and Aziz (2013). Its performances were then tested and compared with the Linear model based MPC (LMPC). 2. Industrial Continuous Extractive Bioethanol Fermentation Process The scheme shown in Figure 1 consists of four interconnected units i.e. the bioreactor which is the fermenter, the centrifuge for the separation of biomass and fermentation broth, a biomass treatment tank and a vacuum flash tank unit to separate the bioethanol-water mixture. In bioethanol fermentation process, high temperature could accelerate the inhibition effect of the substrate and the bioethanol on cell activities, 1298 thereby lowering both cell and bioethanol yields. From literature reviews, there is no work has been reported where temperature has been chosen as a control variable. The effect of temperature on the process cannot be ignored, and it is essential to control both product concentration and temperature in order give the optimum control strategy for the bioethanol fermentation process. Therefore the controller is designed to control product concentration, P and temperature outlet from fermenter, T. Figure 1: Scheme of industrial extractive continuous bioethanol fermentation process (Meleiro et al., 2009) Where, Fo, To and So are initial feed flowrate (m 3 /h), biomass concentration (kg/m 3 ) and substrate concentration (kg/m 3 ). F is Flowrate (m 3 /h), Sin, Xin, Pin and Tin are substrate concentration (kg/m 3 ), biomass concentration (kg/m 3 ), product concentration (kg/m 3 ) and temperature inlet to fermenter (°C). Fr, Sr, Xr and Pr are flowrate (m 3 /h), substrate concentration (kg/m 3 ), biomass concentration (kg/m 3 ), product concentration (kg/m 3 ), and temperature of outlet from yeast treatment tank (°C). FLR, SLR, XLR, PLR and TLR are flowrate (m 3 /h), substrate concentration (kg/m 3 ), biomass concentration (kg/m3), product concentration (kg/m 3 ), and temperature of outlet from flash tank (°C). Meanwhile, S, X, P, and T are substrate concentration (kg/m 3 ), biomass concentration (kg/m 3 ), product concentration (kg/m 3 ), and temperature outlet of fermenter (°C). Fe, and Xe are feed flowrate (m 3 /h) and biomass concentration into flash tank (light component) (kg/m 3 ). Fw and Tw are water feed flowrate (m3/h) and water temperature (°C). Fc and Xc are feed flowrate (m 3 /h) and biomass concentration into yeast treatment tank (heavy component) (kg/m 3 ). Finally, Fv is vapour flowrate (m 3 /h) and Pv is vapour product concentration (kg/m 3 ). 2.1 Development of nonlinear and linear models 2.1.1. First principle model validation The simulated first principle models for validation were carried out for five runs with temperature 28 °C, 31 °C, 34 °C, 37 °C, 40 °C produced by using kinetics data and operating conditions that were comparable to the experiment carried out by Atala et al. (2001). Temperatures between 28 °C to 30 °C are proposed for various fermentation processes (Karapatsia, 2014). Figure 2 shows the simulated dynamic response versus the experimental data taken from Atala et al. (2001). The R 2 value for product concentration, substrate concentration and biomass concentration are 0.99, 0.95 and 0.98. From Figure 2, it can be observed that the model is acceptable and comparable with the profile reported by Atala et al. (2001). (a) (b) (c) Figure 2: Dynamic profiles of bioethanol fermentation process for (a) product, (b) substrate and (c) biomass at nominal conditions 1299 2.1.2. Identification of linear empirical models Two linear models i.e ARX model and State space (SS) model were developed. Figure 3 shows the model residuals plots for the ARX model and the SS model with 99 % of confidence limits. In Figure 3(a), the fluctuation of the ARX and the SS models outside the confidence interval can be observed in which it is insignificant. From the autocorrelation plot in Figure 3(a), it is observed that the ARX model produced a high peak in the middle which indicates a strong correlation where it is defined that the past and the future of the ARX model are strongly related, or correlated. The SS model shows smaller size of the peak in the middle which indicates that the past and the future of SS model are weakly correlated. As seen in Figure 3(b), both the ARX model and the SS model residuals fall within the confidence interval which signifies that the output y(t)that is originates from the input u(t) for both models are properly described. The SS model is chosen to represent the model in LMPC development. (a) (b) Figure 3: (a) Autocorrelation of residual, (b) Cross correlation, for ARX model (red line) and State Space model (blue line) 2.1.3. Identification of nonlinear (NARX) empirical model The input-output data consisted of 1,200 samples generated from VFPM was used for the estimation of a NARX model. The NARX model order and delay [na, nb, nk]; [2, 3, 2], were used and the nonlinear function implemented was wavenet, which represented the nonlinearity estimator. The results for the first identification for the NARX model is shown as a model residuals output plot in Figure 4. (a) (b) Figure 4: (a) Autocorrelation of residual, (b) Cross correlation, for NARX model In Figure 4(a), the big fluctuation of the NARX model outside the confidence interval is insignificant while the strong correlation in the middle (high peak) indicates that the model residual is strongly uncorrelated. Figure 4(b) shows the cross-correlation of the residuals for the NARX model which show that the residuals fall within the confidence interval. This signifies that the output y(t) that originates from the input u(t) are properly described by the model. As a conclusion the NARX data adequately represents the extractive continuous bioethanol fermentation process. In the next section, NARX model will be represent the model in NMPC development. 3. Controllers Development 3.1 Tuning of MPC parameters Tuning an MPC is accomplished based on offline simulation and the actual performance of the online controller. The objective functions of the MPC online optimization used are listed in Eq(1) to Eq(4): [ | ] [ | ] ) )) (1) [ | ] [ | ] ) )) (2) [ | ] [ | ] ∑ [ | ] ) ∑ [ | ] (3) 1300 [ | ] [ | ] ∑ [ | ] ) ∑ [ | ] (4) Where P is the product concentration and T is temperature. P and M are the process output prediction and the manipulated process input horizons, with P ≥ M and they are adjustable as well as and the weighting matrices Q and R. [ | ] and [ | ] are the set of future process input values. In this work, the tuning test begins with M=1 and P=15. The R has been set in diagonal form as R = eye (2)*2 while Q = 2 × 2 matrix. Eq(5) to Eq(8) represented the process constraints. 28 °C < T < 39 °C (5) 80 < So< 280 kg/m 3 (6) 0.2 < R < 0.5 (7) 0.2 < r < 0.6 (8) As shown in Table 1, set 2, 4 and 6 show a smaller value of SSE when compared to the remaining set. Set 2 with tuning setting: M = 2 and P = 20, produced the best CV1 and CV2 profiles with SSE of 5.9701 and 1.2338. Moreover, set 2 has the smallest M among the three sets which signify that less aggressive control action is produced. Based on this observation, set 2 is chosen as the optimum tuning parameter for the MPC. Table 1: SSE values for product concentration and fermenter temperature control for various MPC setting Weighting Matrix, R Set Control Horizon, M Prediction Horizon, P SSE for Product concentration SSE for Temperature [ ] 1 2 15 10.2401 2.2061 2 2 20 5.9701 1.2338 3 3 15 10.2069 4.0922 4 3 20 5.8641 1.3064 5 4 15 10.6892 5.3589 6 4 20 5.7892 1.3493 4. Controllers Performance 4.1 Set point changes: NARX-MPC versus LMPC Figures 5 and 6 show the results for the set point changes of the NARX-MPC and the LMPC controllers. As can be seen in Figures 5(a) and 5(c), the NARX-MPC drives the process output to its desired set point with a faster response than the LMPC. In Figures 5(b) and 5(d), both the manipulated variables (MV) changes for the NARX-MPC and the LMPC show small variation within the constraints limits. The MSE value calculated for LMPC for control variable 1 (CV1) and control variable 2 (CV2) are 0.6582 and 0.3219, which is higher than the NARX-MPC which are 0.6414 and 0.3204. (a) (b) (c) (d) Figure 5: Response of NARX-MPC and SS-MPC for set point change. (a) Product Concentration, CV1; (b) Feed flow rate, MV ; (c) Temperature, CV2; (d) cooling water flow rate, MV2 4.2 Disturbance rejection and robustness tests: NARX-MPC versus LPMC Two tests were introduced at the 50 th h simulation time (after reaching steady state). Test 1 was -20 % disturbance of feed substrate concentration, So, while test 2 was +20 % disturbance of the feed 1301 temperature, To. In test 1 (Figures 6(a) and 6(c)), the NARX-MPC was able to reject the disturbance with a faster response time (CV1: 2.4 h and CV2: 6.0 h) as compared to LMPC (CV1: 35.4 h and CV2: 34 h). It was also observed that the MV profiles for both the NARX-MPC and the LMPC were within the constraints allowed. The MSE values calculated for the NARX-MPC were 0.6467 and 0.3316 for CV1 and CV2, while the values for the LMPC were 0.6901 and 0.3395 for CV1 and CV2. The ability of the NARX-MPC controller to reject the disturbance was due to the NARX dynamic model approach where the network outputs are fed back to inputs. Therefore, the model was able to correct any changes that occurred in the system so that the system maintains its optimal condition. As compared to the linear model, the NARX model can adaptively adjust its structure to capture the process dynamics hence was able to reject the disturbance faster than the linear model based controller. Based on these observations and discussion, it can be concluded that the NARX-MPC was a better controller than the LMPC in rejecting the disturbance. (a) (b) (c) (d) Figure 6: Response of NARX-MPC and LMPC for disturbance rejection test 1. (a) Product Concentration CV1; (b) Feed flow rate, MV1; (c) Fermenter temperature, CV2; (d) Cooling water flow rate, MV2 For further tests on the NARX-MPC and the LMPC, both controllers were evaluated with two robustness tests. Both tests represented the real operation of an industrial process which would involve more than one input variable change at one time. The tests were: a. Test 1: A 30 % increase for the heat of reaction, from 217 kJ/kg and 281.5 kJ/kg for 1 h. This test is represented the variation in the operating conditions due to behavior of the process. b. Test 2: Reducing the heat transfer coefficient from 908 kJ/h.m 2 to 682 kJ/h.m 2 , for 1 h which was a 25 % decrease of load change. Figures 7(a) and 7(b) show the responses of the NARX-MPC and the LMPC to the robustness test. The figures show that even though both the controllers seemed to be able to cope with the test, the ability to settle varied. The LMPC settled at a value of 41.7 kg/m 3 which was 95.8 % of the set point for CV1 and 28.2 °C which was 97.1 % of the set point for CV2.The NARX-MPC successfully settled back to the original point i.e. 40 kg/m 3 (CV1) and 29 °C (CV2). In terms of the controller response time, the NARX-MPC produced a faster response in both CVs if compared to the LMPC. However, the latter was unable to cope with the robustness test. This was because the system constraints in the MPC caused the nonlinearity behaviour to dominate the process. The NARX model is able to solve the problems of loss input excitation and the prediction overdo. Explicit time delay determinations and uphold against ill-conditioning can be incorporated in the structure selection and parameter estimation scheme to allow for successful control implementation (Sagantanis and Karim, 1999). 5. Conclusions In this work, the NARX-MPC controller for the Industrial Extractive Continuous Bioethanol Fermentation process has been developed and compared to LMPC. For the set point tracking, both the NARX-MPC and the LMPC performed equally well with only small differences in the MSE values. In the disturbance rejection tests, the NARX-MPC was able to reject the disturbance at a faster response time with a smaller error as compared to the LMPC. In the robustness test, the NARX-MPC successfully settled back to the 1302 original product concentration and fermenter temperature set point i.e. 40 kg/m 3 and 29 °C, but the LMPC only settled at 95.8 % and 97.1 % of the product concentration and fermenter temperature set point. Overall, the NARX-MPC has showed better performance if compared to LMPC in controlling the bioethanol fermentation process. (a) (b) Figure 7: Response of NARX-MPC and SS-MPC for robustness test. (a) Product Concentration, CV1, (b) Fermenter temperature, CV2 Acknowledgements The financial support from Universiti Sains Malaysia through Research University (RU) Grant is greatly acknowledged. References Ashoori A., Moshiri B., Khaki-Sedigh A., Bakhtiari M. R., 2009, Optimal control of a nonlinear fed-batch fermentation process using model predictive approach, Journal of Process Control, 19, 1162-1173. Darby M.L., Nikolaou M., 2012, MPC: Current practice and challenges, Journal of Control Engineering Practice, 20, 328-342. Efe M.O., 2007, MIMO variable structure controller design for a bioreactor benchmark process, ISA Transactions, 46, 459–469. Harris T.J., Yu W., 2007, Controller assessment for a class of nonlinear system, Journal of Process Control, 17, 607-619. Henson M.A., 1998, Nonlinear model predictive control: Current status and future direction, Journal of Computers and Chemical Engineering, 23(2) 187-202. Hong T., Zhang J., Morris A.J., Martin E.B., Karim M.N., 1996, Neural Based Predictive Control of a Multivariable Microalgae Fermentation, Systems, Man, and Cybernetics, 1, 345-350. Karapatsia, A., Penloglou, G., Pappas, I., Kipparissides, C., 2014, Bioethanol Production via the Fermentation of Phalaris, Chemical Engineering Transaction, 37, 289–294. Meleiro L.A.C., Von Zuben F.J., 2009, Constructive learning neural network applied to identification and control of a fuel-ethanol fermentation process, Engineering Applications of Artificial Intelligence, 22(2), 201-215. Mohd N., Aziz N., 2013, NARX based MPC for continuous bioethanol fermentation process, 6 th International Conference on Process Systems Engineering (PSE Asia), Kuala Lumpur, 2013, 922-929. Mu J., Rees D., Liu G.P., 2005, Advanced controller design for aircraft gas turbine engines, Control Engineering Practice, 13, 1001–1015. Pieragostini C., Aguirre P., Mussati M.C., 2014, Life cycle assessment of corn-based ethanol production in Argentina, The Science of the Total Environment, 472, 212–25. Quarterman J., Kim S.R., Kim P.J., Jin Y.S., 2014, Enhanced hexose fermentation by Saccharomyces cerevisiae through integration of stoichiometric modeling and genetic screening, Journal of Biotechnology, 194C, 48–57. Sargantanis I.G., Karim M.N., 1999, Variable Structure NARX Models: Application to Dissolved-Oxygen Bioprocess, Journal of Bioengineering, Food and Natural Products, 45(9), 2034-2045. Silva F.L.H., Rodrigues M.I., Maugeri F., 1999, Dynamic modeling, simulation and optimization of an extractive continuous alcoholic fermentation Journal of Chem. Tech. Biotechnology, 74, 176-182. Wang L., Young P.C., 2005, Model Predictive Control design using non-minimal state space model, Journal of Control, 80, 1690 – 1697. Wee C.W., Song H.S., Lee J.H., Ramkrishna D., 2010, Hybrid cybernetic model-based simulation of continuous production lignocellulosic ethanol: Rejecting abruptly changing feed conditions, Journal of Control Engineering Practice, 18, 177–189.