Predictive Control of a Chemical Reactor using Multiple Linear Models Jozef Vargan ∗,∗∗∗∗ Wachira Daosud ∗∗ Mehmet Arıcı ∗,∗∗∗ Abderrazak Latifi ∗∗∗∗ Miroslav Fikar ∗ ∗Faculty of Chemical and Food Technology, Slovak University of Technology in Bratislava, Bratislava 81237, Slovakia,
[email protected] ∗∗ Department of Chemical Engineering, Faculty of Engineering, Burapha University, Chonburi 20131, Thailand, wachir[email protected] ∗∗∗ Department of Electrical and Electronics Engineering, Gaziantep Islam Science and Technology University, 27310, Gaziantep, Turkey, [email protected]du.tr ∗∗∗∗ Universit´e de Lorraine, CNRS, LRGP, F-54000, Nancy, France,
[email protected] Abstract: Industrial processes often exhibit complex nonlinear dynamics. Controlling such processes can be computationally intensive, making it advantageous to replace these nonlinear models with a series of linear models defined at various operating points. This approach reduces the computational burden while sufficiently preserving the system’s nonlinear dynamics. To enhance the robustness of this control strategy, we focus on designing a multimodel predictive controller (mMPC). The MPC cost function considers weighted model formulation and includes state constraints from all linear models. The approach is applied to control an industrial chemical reactor model and compared with multiple-model adaptive control (mMAC) implementing weighted state constraints. As a base for comparison, a nonlinear model predictive controller (nMPC), and a linear MPC that switches to the best model (sMPC) according to predefined state regions. The results demonstrate greater robustness and reduced constraint violations of the proposed method. Keywords: Multi-model predictive controller, Controller constraints and structure, Robust controller synthesis 1. INTRODUCTION Nowadays, Model Predictive Control (MPC), based on optimal control of complex systems with multiple input and output variables, is a frequently used advanced industrial control technology (Lee, 2011; Schwenzer et al., 2021). Many processes are characterized by nonlinear dynamics between inputs and outputs, often based on a series of differential equations, leading to the application of nonlinear MPC (nMPC). These are characterized by their high accuracy in controlling dynamical systems across a variety of operating conditions, but a significant drawback of nMPCs is their computational burden associated with nonlinear model predictions. Linear MPCs integrate a structurally less complex (linear) model that provides a less time-consuming solution, but is only applicable to ⋆This research was funded by the European Union under Horizon Europe Grant Agreement number 101079342 (Fostering Opportunities Towards Slovak Excellence in Advanced Control for Smart Industries). We also acknowledge the contribution of the Slovak Research and Development Agency under the project APVV-210019 and EU RePower project VAIA 09I01-03-V04-00024. Mehmet Arıcı acknowledges support from The Scientific and Technological Research Council of Turkey TUBITAK no. 1059B192300919. control in the close vicinity of the operating point in which it is constructed. Therefore, the motivation is to construct a multi-model predictive controller (mMPC), based on the integration of multiple linear system models at different operating points, providing efficient control of nonlinear process dynamics at reduced computational complexity. For multi-model implementation in the structure of a predictive controller, one of three main principles is currently utilized (Du and Johansen, 2015), including (1) approximation of the nonlinear model by weighting multiple linear models output predictions, (2) application of a min-max mechanism on model bank, or (3) design of a series of local MPCs at individual operating points for subsequent application to a global MPC based on a switching or weighting mechanism. Several authors (Kumar and Patwardhan, 2002; Aufderheide and Bequette, 2003; Garc´ıa et al., 2012) have addressed the problem of approximating the dynamics of a nonlinear model by a series of linear models defined at particular operating points across a specified range of control. The prediction from each model is weighted into the final value used in the MPC, following a Bayesian likelihood or prediction error approach between the measurement and the model output. This strategy
is denoted as multiple-model adaptive control (mMAC) strategy by Kuure-Kinsey and Bequette (2010); Rastegarpour et al. (2024) and significantly improves robustness of the controller. Multi-linear model predictive control (ML-MPC) is a multi-model control approach based on scaling control inputs of local predictive controllers to a global MPC defined for each linear model at different operating points of the system (Zribi et al., 2016; Ahmadi and Haeri, 2018). The global control input is obtained by (I) weighting mechanism – assigning weights to the local control inputs or (II) switching mechanism – the weights are binary values {0,1}obtained by selection criteria for a particular control input (Gavgani et al., 2024). Gap metric is a well-studied ML-MPC approach based on selecting a series of linear models that effectively describe the system’s nonlinearity over the specified range of operating points (Gal´an et al., 2003). The criterion for model selection is the distance between the dynamical systems or their parameters. The application of the switching gap metric for a continuous stirred tank reactor control was addressed by Park et al. (2021), where using single local MPC, the offset-free tracking of the global MPC was achieved. Gavgani et al. (2024) by implementing a delay in a soft switching gap metric mechanism showed an improvement in control quality for systems with fast dynamics over previously existing soft switching gap mechanisms. The stability of the system at any set-point of the selected local MPC was guaranteed in both papers. Weighting gap matrix was considered by Du and Johansen (2017) to identify the nonlinearity of the system. 1/δ gap-based weighting method was favoured over 1 −δmethod, as studied in Du and Johansen (2015), and in Prasad and Rao (2019). This work investigates the design of a robust multi-model predictive controller, where the structure of the optimization problem includes consistent state bounds for the predictions of all linear models. A weighting mechanism based on model prediction error is adopted for calculation of the weighted states used in the cost function. The proposed controller is applied to control a nonlinear chemical reactor model with one input and two states. The proposed mMPC is compared with mMAC with state constraints for the weighted predicted state only. For illustration of the best attainable performance we also consider a nonlinear MPC and sMPC with the perfect knowledge of the actual operating region. 2. STUDIED PROCESS In this section, we focus on the description of the dynamics and properties of the studied process and discuss the design of its multiple linear models. 2.1 Process Description We consider the following model of the non-isothermal continuous-stirred tank reactor (CSTR) with a complex dynamics (Nikravesh et al., 2000). An irreversible reaction (A →B) takes place in the CSTR: dcA dt=q V(cA,f −cA)−k0cAexp −E RT ,(1) Fig. 1. Steady-state map of concentration cs Aand coolant flow rate qs c. dT dt=q V(Tf−T) + (−∆H)k0cA ρcp exp −E RT +ρccp,c ρcpVqc1−exp −hA qcρcp,c (Tc,f −T),(2) where cAdenotes the effluent concentration, cA,f the feed concentration, qthe feed flow rate, qcthe coolant flow rate, Tthe effluent temperature, Tfthe feed temperature, Tc,f the coolant inlet temperature, respectively. We assume for simplicity that the process state xn= (cA, T)⊺can be measured. If not, a state observer could be designed. We consider the concentration cAas the controlled variable and the coolant flow rate as the manipulated variable u=qc. The parameter values in (1) and (2) are displayed in Table 1. The model exhibits multiple steady states for the same operating conditions. This is shown in Fig. 1, which depicts the steady-state map of CSTR, as the dependence of the concentration cs Aon the coolant flow rate qs c. Multiple steady-state regions are observed, but from the point of view of industrial application, favourable operating conditions are located in the lower steady-state region leading to the bifurcation point, since the required effluent concentration is minimal in this region. Furthermore, the CSTR model is non-linear, as can be shown in the step responses in Fig. 2, where significant oscillations and nonsymmetric behavior can be observed. Table 1. CSTR model parameters. Variable Unit Value qL·s−11.67 cA,f mol ·L−11.00 TfK 0.35 ×103 Tc,f K 0.35 ×103 VL 0.10 ×103 hA cal ·s−1·K−11.17 ×104 k0s−11.20 ×109 E/R K 9.95 ×103 −∆Hcal ·mol−10.20 ×106 ρ, ρckg ·L−11.00 ×103 cp, cp,c cal ·g−1·K−11.00
Fig. 2. CSTR step responses. Table 2. Steady-state values of CSTR system variables in several operating points. m cs A,m Ts mqs c∆qs c 1 0.0593 447.4718 1.5511 -10% 2 0.0703 443.8281 1.6373 -5% 3 0.0836 440.1554 1.7235 0% 4 0.0999 436.3830 1.8097 +5% 5 0.1204 432.3923 1.8958 +10% 2.2 Multiple Linear Process Models We selected M= 5 different operating points (marked as red stars in Fig. 1), in which 5 linear state models are constructed. The steady-state values xs m= (cs A,m, Ts m)⊺ of concentration cs A,m, temperature Ts m(m= 1, . . . , M) and coolant flow rate qs care shown in Table 2. Point 3 represents the nominal operating point, while other points are calculated for the ±5% and ±10% change in the steady-state coolant flow rate ∆qs c. The nonlinear model is linearized in each of the steady states xs mbased on the first-order Taylor series approximation. This yields ˙ ˜xm=˜ Am˜ xm+˜ Bm˜um(3) where the deviation state and control are defined as ˜ xm= xn−xs m, ˜um=qc−qs c,m. These models are discretized with the sampling time Ts= 5 s and their state and input variables shifted to absolute values using xm=˜ xm+xs m, u= ˜um+qs c,m yielding piecewise affine models xm(k+ 1) = Amxm(k) + Bmu(k) + bm,(4) where xm(k)=(cA,m(k), Tm(k))⊺,u(k)=qc(k) and bm= (I−A)xs m−Bqs c,m. 3. MULTI-MODEL PREDICTIVE CONTROLLER The multiple-model of the process will be applied for prediction of future states in MPC. Each of the models is valid to a different degree and its application in MPC would lead to steady-state offsets. To compensate that, constant state disturbance concept (Tatjewski, 2017) will be applied. This disturbance is calculated for each model based on the current value of measured states and estimated value of the respective model state dm(k) = xn(k)−(Amxm(k−1)+Bmu(k−1)+bm). (5) The future state predictions can then be determined as xm(k+i) = Amxm(k+i−1) + Bmu(k+i−1) +bm+dm(k), i = 1, . . . , Np,(6) where Npis the length of the prediction horizon. The state disturbance dm(k) is also used in determination of the importance of each of the individual models in predictions. In general, we do not choose a single model for prediction, but a weighted one: the smaller absolute value of the disturbance, the more important prediction of the model. A linear combination of individual disturbance components C⊺dm(k), C⊺= (c1, c2)⊺will be used to determine the weights, to scale the importance of individual state variables. Therefore, the weight wm(k) of the m-th model is calculated as wm(k) = 1 M−1 1−|C⊺dm(k)| PM i=1 |C⊺di(k)|!,(7) so that all weights are positive, the sum of all weights is equal to 1 and the weight of a more important model is larger. This weight is assumed constant over the whole prediction horizon Npbut it is recalculated in each sampling period. The prediction of the weighted model state xw(k+i) is then calculated as xw(k+i) = M X j=1 wj(k)xj(k+i).(8) The proposed multimodel MPC formulation includes standard quadratic cost function with output Npand control Nchorizons, penalizing tracking error of the weighted model concentration and future control increments, with equality constraints, input constraints, and state constraints with slack variables on all process models. min qc(k),ε Np X i=1 e(k+i)⊺Qxe(k+i)+Qϵϵ(i) + Nc−1 X i=0 Qu∆q2 c(k+i),(9) s.t. (6),(8), e(k+i) = xr(k+i)−xw(k+i) (10) xmin −ϵ(i)≤xm(k+i)≤xmax +ϵ(i),(11) qc,min ≤qc(k+i−1) ≤qc,max,(12) 0≤ϵ(i),(13) m= 1, . . . , M, i = 1,...,Np, where xr(k+i) denotes the future reference, qc(k) = (qc(k),...,qc(k+Nc−1))⊺,ε= (ϵ⊺(1),...,ϵ⊺(Np))⊺are the vectors of the optimized future manipulated variables and nonnegative slack variables for state constraints, Qx, Qu, and Qϵare the penalizations on output, control increment and slack variables. There are lower/upper hard constraints on the manipulated variable (qc,min, qc,max) and lower/upper soft state constraints (xmin,xmax). 3.1 Other MPC Approaches We will compare the proposed mMPC control to a number of existing approaches. In all of them, MPC formulation
includes the objective function (9), control input constraints (12) and slack constraints (13). The optimal performance can be obtained if the full nonlinear model (1) and (2) serves for state predictions xn(k+i). The nMPC formulation defines the control error (10) and state constraints (11) using the nonlinear state predictions xn e(k+i) = xr(k+i)−xn(k+i),(14) xmin −ϵ(i)≤xn(k+i)≤xmax +ϵ(i).(15) We note that the slack variables would be needed only in case of some unknown disturbances as the considered model is the same as the process. The optimal approach employing a family of linear/affine models is to use MPC with piecewise affine hybrid system modelling (Bemporad et al., 2000; Borrelli et al., 2005). An approximation can be to select the model sthat is the nearest to one of the Moperating points and use it for all predictions in the actual sampling time s= arg min i=1...M |C⊺(x(k)−xs i)|(16) The sMPC formulation defines the control error (10) and state constraints (11) using the linear state predictions xs=xwfrom (8) for the weight ws= 1 and other weights equal to zero e(k+i) = xr(k+i)−xs(k+i),(17) xmin −ϵ(i)≤xs(k+i)≤xmax +ϵ(i).(18) Finally, the mMAC approach (Kuure-Kinsey and Bequette, 2010) uses the weighted model predictions (8). Although a family of linear models is considered, this is again a single model approach. The mMAC formulation defines the control error (10) and state constraints (11) using the weighted state predictions xw e(k+i) = xr(k+i)−xw(k+i),(19) xmin −ϵ(i)≤xw(k+i)≤xmax +ϵ(i).(20) We note that the original mMAC formulation in Aufderheide and Bequette (2003) includes a more sophisticated procedure to calculate the current weights (7). We have modified it to be comparable with our proposed scheme – there is only a minimal difference in performance of both methods using either weighting. As can be seen in the state constraint formulation (11), states from all models xm(k+i) of the proposed multimodel predictive controller must satisfy the same set of constraints (xmin,xmax). This is different to sMPC or mMAC strategies, where only single model and a single set of state constraints are assumed. 4. SIMULATION RESULTS AND DISCUSSION The simulation parameters were set as follows. The simulation starts in the operating point 4 (Table 2) and the reference values will be in the region of operating points 4 and 5 where the process exhibits oscillatory behavior. We will study scenario with cAbeing the controlled variable. Therefore, the weights and constraints for the temperature Twill be inactive: C⊺= (1,0), Qx= diag(1,0), Qϵ= diag(0.5,0), T∈(300,600). MPC parameters are Ts= 5 s, Np= 10, Nc= 3, cA∈(0.09,0.14), qc∈(1.72,2.00), Qu= 0.05. Table 3. Performance indicators of compared MPC methods. Controller J¯ε(%) t(s) nMPC 0.0132 (100%) 0.00 0.92 sMPC 0.0137 (104%) 0.20 0.05 mMAC 0.0351 (266%) 5.03 0.05 mMPC 0.0137 (104%) 0.05 0.05 To investigate fully the effect of the state constraints on the performance of the controllers, these were set tight and the same as the applied minimum/maximum reference values. For simulating the model equations (1) and (2), the solver ode15s in MATLAB environment is used, with default solver settings and the relative tolerance set to 1 ×10−5. To solve the nMPC problem for the future control inputs qc(k), the fmincon function is used, with sequential quadratic programming algorithm and 3000 maximum iterations applied. For other approaches, YALMIP (L¨ofberg, 2004) is used to construct quadratic programming problem. We present the results in Fig. 3, where mMPC is compared with mMAC. The sMPC results are very similar to mMPC. Fig. 3a shows the evaluation of the controlled variable cAand Fig. 3b shows the evaluation of the manipulated variable qc. The behaviour of the two predictive controllers is identical from the initial moment until the first change of setpoint which occurs after 5 min. As there are no active state constraints, the both methods coincide. The first setpoint change activates the minimum state constraint and requires that the state trajectory does not overshoot. mMAC shows a slightly faster response and more aggressive control action. The second setpoint change occurs after next 3 min, while the maximum state constraint is activated and again no overshoot is required. mMAC becomes almost critically damped and slack variable constraints on states are active several times as there are significant constraint violations. The mMPC oscillation is considerably more damped compared to mMAC, while only negligible state constraint violations are detected. To quantify the comparison, three performance indicators are introduced: •J– the value of the closed-loop objective function defined over the number of sampling instants in the simulation interval N J= N X i=1 e(i)⊺Qxe(i)+Qϵϵ(i)+Qu∆q2 c(i),(21) •¯ε– the mean relative constraint violation (in per cent), computed as ¯ε=100 PN i=1 max(0, cA,min −cA(i), cA(i)−cA,max) N(cA,max −cA,min), (22) •t– the mean computation time of the MPC optimization problem (in minutes) at one sampling time i, obtained for 10 simulation runs. Table 3 shows the numerical value for the investigated methods. The first two rows serve as a comparison for the best attainable performance. Nonlinear MPC (nMPC) attains the lowest value of the closed-loop cost function
(a) Controlled variable. (b) Manipulated variable. Fig. 3. Control of the chemical reactor using mMPC and mMAC approaches. and the perfect knowledge of the model results in no constraint violations. Linear MPC with the best selected model (sMPC) performs only slightly worse (104 %) but the constraint violations are the second worst of all methods. It seems that the linearization is valid only in the close neighborhood of the nominal operating points and the model fails to predict the constraints accurately. We note that sMPC would be difficult to implement in real conditions as the presence of disturbances and unmodelled dynamics would deteriorate its ability to identify the active model and worsen the overall performance. The worst performance in both closed-loop function (266 %) and constraint violations can be observed with mMAC. The single weighted model cannot predict accurately the state constraints which results in a number of significant constraint violations and oscillations in manipulated variable. The proposed multimodel MPC (mMPC) is only slightly worse than nMPC both in closed-loop cost (104 %) and performs favorably in percentage of constraint violations. Comparison of the computational times confirms that the nonlinear MPC formulation is significantly more demanding than other methods using quadratic programming formulations. Their values are identically around 0.05 second, even in the case of mMAC, where significant constraint violations are observed. For mMPC, there is no observable increase in the mean computation time, even when considering the state constraints of all linear models in the structure of the controller. The reason for the significantly higher value of the objective function and partially the value of mean computation time for mMAC compared to mMPC is the presence of more significant constraint violations, as evidenced by the higher value of ¯ϵ. An explanation for the significant decrease in constraint violations and the damped oscillations of concentration for mMPC compared to mMAC is the implementation of the state constraints for all state-space models in contrast with the weighted state constraint for mMAC. The comparison of both constraints definition approaches is depicted in Fig. 4, describing the evolution of the minimum and maximum predicted concentration values from all state-space models (yellow area) and from the weighted model (blue area) at each discrete time point k. While mMAC method is only aware of the predictions in the blue area in Fig. 4a, the original models used for the weighted model cover significantly larger yellow area. Hence, it can happen frequently that the constraints will be violated. On the other hand, it explains the improved behaviour of mMAC during the second setpoint change at 8 min. The controller is not aware that some models would violate the constraint and acts significantly faster than mMPC. The proposed mMPC operates with the prediction values indicated by the yellow area in Fig 4b, which if satisfying the constraints, the weighted predictions (blue area, showed for information only) principally would automatically do as well. The increased number of models used for prediction of future states results in a smaller probability of constraint violations and in a more cautious control. This increases the robustness of the proposed controller and reduces the closed-loop cost function. 5. CONCLUSIONS This paper discusses a novel robust multi-model predictive controller (mMPC) design and its application to a chemical reactor control simulation. The non-linear continuous stirred-tank reactor model is approximated by a series of state-space models at different operational points, thus reducing the computational complexity while maintaining the required accuracy of process dynamics prediction under different operating conditions. The implementation of multiple models in MPC structure is based on weighting/selecting the predicted states of the statespace models into a final (weighted/selected) state, where the novelty in our approach is the constraining of the predicted states from all models versus the constraining of the weighted/selected state employed in the literature. Both approaches of multi-model controllers are compared with a nonlinear MPC considering a real model of the manipulated process. The proposed mMPC was characterized by higher robustness, less aggressiveness of the control input, and a reduction of the value of the objective function with the same computational complexity as the solution presented in the literature.
(a) Predictions of mMAC controller. (b) Predictions of mMPC controller. Fig. 4. Comparison of the minimum/maximum state predictions in mMAC and mMPC. In the further studies of multi-model controllers, a focus on the control of MIMO systems is essential. An enhanced weighting approach for multiple inputs and outputs should be considered, including the study of the combinatorial explosion of operating conditions. Another area of interest is the analysis of the robust stability of the proposed multimodel controllers. REFERENCES Ahmadi, M. and Haeri, M. (2018). Multimodel control of nonlinear systems: An improved gap metric and stability margin-based method. Journal of Dynamic Systems, Measurement and Control, Transactions of the ASME, 140(8). Aufderheide, B. and Bequette, B. (2003). Extension of dynamic matrix control to multiple models. Computers & Chemical Engineering, 27, 1079–1096. Bemporad, A., Ferrari-Trecate, G., and Morari, M. (2000). Observability and controllability of piecewise affine and hybrid systems. IEEE Transactions on Automatic Control, 45(10), 1864–1876. doi:10.1109/TAC.2000.880987. Borrelli, F., Baoti´c, M., Bemporad, A., and Morari, M. (2005). Dynamic programming for constrained optimal control of discrete-time linear hybrid systems. Automatica, 41(10), 1709–1721. Du, J. and Johansen, T.A. (2015). Integrated multilinear model predictive control of nonlinear systems based on gap metric. Industrial & Engineering Chemistry Research, 54(22), 6002–6011. Du, J. and Johansen, T.A. (2017). Control-relevant nonlinearity measure and integrated multi-model control. Journal of Process Control, 57, 127–139. Gal´an, O., Romagnoli, J., Palazo˘glu, A., and Arkun, Y. (2003). Gap metric concept and implications for multilinear model-based controller design. Industrial & Engineering Chemistry Research, 42(10), 2189–2197. Garc´ıa, M.R., Vilas, C., Santos, L.O., and Alonso, A.A. (2012). A robust multi-model predictive controller for distributed parameter systems. Journal of Process Control, 22(1), 60–71. Gavgani, B.M., Farnam, A., Vanbecelaere, F., Kooning, J.D.M.D., Stockman, K., and Crevecoeur, G. (2024). Soft switching multiple model predictive control with overlapping cross-over time strategy in an industrial high speed pick and place application. Control Engineering Practice, 144, 105813. Kumar, K.K. and Patwardhan, S.C. (2002). Nonlinear predictive control of systems exhibiting input multiplicities using the multimodel approach. Industrial & Engineering Chemistry Research, 41(13), 3186–3198. Kuure-Kinsey, M. and Bequette, B.W. (2010). Multiple model predictive control strategy for disturbance rejection. Industrial & Engineering Chemistry Research, 49(17), 7983–7989. Lee, J. (2011). Model predictive control: Review of the three decades of development. International Journal of Control, Automation and Systems, 9, 415–424. L¨ofberg, J. (2004). Yalmip : A toolbox for modeling and optimization in matlab. In In Proceedings of the CACSD Conference. Taipei, Taiwan. Nikravesh, M., Farell, A., and Stanford, T. (2000). Control of nonisothermal CSTR with time varying parameters via dynamic neural network control DNNC. Chemical Engineering Journal, 76(1), 1–16. Park, B.J., Kim, Y., and Lee, J.M. (2021). Design of switching multilinear model predictive control using gap metric. Computers & Chemical Engineering, 150, 107317. Prasad, G.M. and Rao, A.S. (2019). Evaluation of gapmetric based multi-model control schemes for nonlinear systems: An experimental study. ISA Transactions, 94, 246–254. Rastegarpour, S., Feyzmahdavian, H.R., and Isaksson, A.J. (2024). Enhancing reinforcement learning robustness via integrated multiple-model adaptive control. In 12th IFAC International Symposium on Advanced Control of Chemical Processes, 362–368. Toronto, Canada. Schwenzer, M., Ay, M., Bergs, T., and Abel, D. (2021). Review on model predictive control: an engineering perspective. The International Journal of Advanced Manufacturing Technology, 117(5), 1327–1349. Tatjewski, P. (2017). Offset-free nonlinear model predictive control with state-space process models. Archives of Control Sciences, 27(4). Zribi, A., Chtourou, M., and Djemal, M. (2016). A systematic determination approach of model’s base using gap metric for nonlinear systems. Journal of Dynamic Systems, Measurement, and Control, 138(3), 031008.