A TITO Control Strategy to Increase Productivity in Uncertain Exothermic Continuous Chemical Reactors

In this manuscript, a two-input two-output (TITO) control strategy for an exothermic continuous chemical reactor is presented. The control tasks of the continuous chemical reactor are related to temperature regulation by a standard proportional-integral (PI) controller. The selected set point increases reactor productivity due to the temperature effect and prevents potential thermal runaway, and the temperature increases until it reaches isothermal operating conditions. Then, an optimal controller is activated to increase the mass reactor productivity. The optimal control strategy is based on a Euler-Lagrange framework, in which the corresponding Lagrangian is based on the model equations of the reactor, and the optimal controller is coupled with an uncertainty estimator to infer the unknown terms required by the proposed controller. As a benchmark, a continuous stirred tank reactor (CSTR) with a Van de Vusse chemical reaction is considered as an application case study. Notably, the proposed methodology is generally applicable to any continuous stirred tank reactor. The results of numerical experiments verify the satisfactory performance of the proposed control strategy.


Introduction
The chemical reactor is widely regarded as the most important equipment in the transformation industry since it houses chemical reactions that produce highly valuable compounds or, conversely, degrade toxic pollutants. Given its significance, the design, optimization, and control of chemical reactors have been an important focus for process engineers. However, highly nonlinear behavior related to steady-state multiplicity, input multiplicity, instabilities, and sustained oscillation, among other factors, presents difficulties in the operation of these instruments [1][2][3]. Therefore, research on these topics remains challenging for scientists and engineers. In particular, the control of continuous chemical reactors has been studied for several years. One of the main control strategies for these devices is related to temperature regulation; this is an important issue because an appropriate temperature control strategy leads to the adequate yield of chemical products. Furthermore, the operation of an isotherm reactor is generally conditionally stable, and temperature regulation is essential for process security to prevent hot points during reactor operations [4]. Conventional proportional-integral-derivative (PID) controllers are widely used because of their simple structures and tuning methods. Although these devices are simple, they fail to perform well for nonlinear processes. The fundamental requirement for these controllers is the use of a tuning algorithm to maintain the desired levels of outputs. In general, PID controllers are locally robust to parametric uncertainty since their design is independent of the phenomenological model of the system, but they are strongly dependent on tuning [5,6].
A feedback linearization controller for an exothermic reactor with a single reaction is introduced in [7,8], but the corresponding design is based on the state-space model of the reactors, which can be a significant drawback. However, this can be avoided by employing observer-based uncertainty estimators, and stabilization by state feedback has been proven effective for a well-defined domain [9,10]. Another control technique applied to temperature regulation is input-output linearizing control, which aims to reduce the original nonlinear control problem to a linear control problem under a differential geometry framework, but technical difficulties may arise in constructing the required diffeomorphisms [11,12]. Various solutions have been proposed to overcome the robustness problem. In particular, an integral action has been added to the controller obtained from input-output linearization to develop generic control. However, the main drawback of this approach is the over-parameterization of the controller [13,14]. Thus, several control strategies have been presented in the open literature, including linear and nonlinear backstepping control, mass concentration regulation controllers, etc. [15][16][17][18].
The necessity of high process performance has led to efforts to improve the operation of reactors by optimizing operational trajectories, which include operation security, maximum productivity, and optimal cost, among others, leading to the tracking trajectory control problem, where optimal control designs have been successful. Model-based Hamiltonian techniques have been applied to nonlinear systems as optimal control approaches. In such cases, Hamiltonian equations must be developed, and then an adequate functional related to the objective function and corresponding restrictions must be applied to obtain an optimal controller for the required task. In this case, Pontryagin's principle is applied to determine the best possible control strategy under constraints for the state or input controls. Although Lagrangian-based optimal control approaches have been studied as well, they are mostly oriented to the control of mechanical systems [19].
Chemical processes frequently involve structured uncertainties and output disturbances. Some examples are variations in feed quality, uncertain initial and ambient conditions, and uncertainty in model parameters [20,21]. Failing to account for uncertainties in the optimal design may lead to a nonoptimal and potentially high-risk solution. Therefore, methodologies that compensate for uncertainty in chemical processes are essential for realizing a robust process [22][23][24][25][26].
To compensate for uncertainty, a probabilistic approach based on the polynomial chaos expansion (PCE) was proposed by [27]. PCE is used to calculate an approximation of the expected values and variances, such as the first two statistical moments of the objective function and nonlinear inequality constraints. A similar approach is presented in [28], which also used PCE to optimize biological networks under model parameter uncertainty. Additionally, in [29], a multi-model approach was applied to manage uncertainties for the optimization of semi-batch processes; in this method, multiple worst-case parameter scenarios are selected based on a heuristic approach, but the corresponding real-time implementation is complex due to the large algorithms and the control effort. Another approach that is increasing in popularity is the application of the unscented transformation (UT) for optimization under uncertainty. The UT is a method for the approximation of the statistical moments of nonlinearly transformed probability distributions in the context of nonlinear filtering [30]. For implementation purposes, the UT shares similarities with certain numerical integration techniques, such as cubature rules, which are well known in the numerical integration literature. Cubature rules are used to approximate multi-dimensional integrals and have been applied for optimization under uncertainty (see [31,32]). However, the above procedures can lead to complex control structures, often with high computing requirements. Heuristic optimization is another control approach, which does not usually involve assumptions about the problem to be optimized. The heuristic approach can search large spaces of candidate solutions to identify optimal or near-optimal solutions at a reasonable computational cost, but it is unable to guarantee either feasibility or optimization, and, in many cases, it does not indicate how close a certain feasible solution is to the optimum [33][34][35]. A wide range of direct search methods have been developed from heuristic optimization, such as genetic algorithms, evolutionary programming, differential evolution, genetic programming, evolutionary strategy, particle swarm optimization, and artificial bee colonies [36,37]; however, a theoretical analysis of convergence is not available, which is a major shortcoming [16,38]. A variety of approaches considering uncertainties in the optimization of chemical processes have been reported in the open literature [39,40].
Therefore, this work proposes a method to increase reactor productivity by employing standard temperature regulation with an appropriate set point via a PI controller. The proposed method increases reactor productivity via thermal effects until reaching an isothermal operating condition. After that, an optimal control law is applied in the Euler-Lagrange framework, in which the corresponding Lagrangian is based on the state equations of the reactor. This allows the construction of a controller for optimal reactor productivity as an objective function. However, this controller is based on the kinetic reaction rate, which is unavailable. To overcome this drawback, a reduced-order uncertainty estimator is coupled with the proposed optimal controller. The proposed method results in the satisfactory operating performance of the reactor and increases the corresponding productivity of the desired chemical product.

Mathematical Model of a Continuous Stirred Tank Reactor(CSTR)
In general, let us consider an exothermic CSTR model. According to mass and energy conservation principles, the reactor model represents the following system: where x 1 ∈ R n denotes the concentration vector of the chemical species; x 2 ∈ R is the reactor temperature; E ∈ R n×m denotes the stoichiometric matrix; R(x 1 , x 2 ) := R 1 (x 1 )R 2 (x 2 ) ∈ R n represents the vector of reaction rates, with R 1 (x 1 ) := diag(R 1,i (x 1 ) ∈ R m×m ) and R 2 (x 2 ) ∈ R m ; ∆H ∈ R m defines the vector of reaction enthalpies; the positive defined real scalar u c := F/V denotes the quotient between the inlet flow F and reactor volume V; γ represents the heat transfer coefficient; and u T is the coolant temperature (the manipulable control variable). The system (1)-(2) is a standard model that satisfies general conditions for the design of controllers for chemical reactors (see, for instance, the classical contribution by [41]).
As an application case study, let us consider the following chemical pathway from the Van de Vusse reaction [42]: This chemical reaction pathway contains series and parallel reactions. The above chemical reactions are considered elemental chemical reactions, that is, those that occur in a single stage, where the order of the reaction coincides with the corresponding stoichiometric coefficient of the chemical reaction, as is assumed for the Van de Vusse kinetic model [43].
From the above, a continuous stirred tank reactor mathematical model can be constructed via the mass conservation principle under the following assumptions: the reacting mixture is perfectly mixed to avoid temperature and concentration gradients; the reacting mixture volume remains constant; the inlet mass flow is equal to the outlet mass flow; and physical properties such as mixture density, heat capacity, transport coefficients, inlet concentration, and inlet temperature to the reactor are constant. In addition, the cooling jacket temperature is assumed to be the same as the temperature control input, and the mass input flow to the reactor is considered to be the same as the other control input.
Therefore, the mass and energy balance equations are as follows: • Mass balance equations: • Energy balance equation: In (5)-(9), k i and ∆H T are defined as The corresponding nomenclature and parameter values are included in Table 1 [44]. Concentration initial conditions Pre-exponential kinetic factors k 10 k 20 k 30 2.145 × 10 10 2.145 × 10 10 1.5072 × 10 8 Activation energies

PI Temperature Control
Most temperature controllers in industrial chemistry are classical PI controllers [41]. There are many reasons for this, including their proven operating performance and the fact that their operation is well understood by technicians, industrial operators, and maintenance personnel. Furthermore, the fact that a properly designed and well-tuned PID controller achieves control objectives makes it attractive for many applications. The general structure of PI controllers is defined by the following well-known equation: Studies on the design and analysis of PI controllers for the stabilization and regulation of CSTR reactors are abundant in the literature, which includes numerous successful applications [41,45,46].

Optimal Control Design
The general framework of optimal control designs relies on the calculus of variations, which is involved in the trajectory optimization problem, where a functional F ( (·)) : R q → R is a scalar, namely, the cost index, cost function, or performance index, which is minimizing or maximizing. The corresponding objective can be attained by solving the well-known Euler-Lagrange equation [47]: The term denotes the Lagrangian of the system under study.
In general, the cost functional F ( (·)) can be represented as follows: where Ω x f , t f is an algebraic term to be minimized (or maximized) in final conditions, subject to the following constraints: • The state equation:ẋ • The terminal constraints : • The initial conditions: In Equation (15), x ∈ R n is the state vector; f (x) : R n → R n is a nonlinear function, where f (x) ⊂ Σ ∈ C ∞ and Σ is a compact set; g(x) is a smooth and invertible bounded function; and u ∈ R m , with m ≤ n, is the exogenous control input.
Next, consider the following functional form: The problem is to minimize the functional (18); therefore, Here, the differential of the Lagrangian is Equation (20) is substituted into Equation (19): The first term in Equation (20) is represented by where u is defined as The second term in Equation (20) is integrated by parts: Next, let us consider the following nonlinear control affine dynamic system representation of Equation (15):ẋ From Equation (25), Therefore, the corresponding functional and the Lagrangian for the system (18) are defined as P(x,ẋ, u) ≡ p(x,ẋ, u) and Note that a useful characteristic of the Lagrangian in Equation (28) is the dependence on the state Equation (25).
Therefore, from Equation (28), Then, The optimum productivity P(x,ẋ, u) is then determined by the following restriction: From Equations (33) and (34), the following equality must hold: or equivalently, By solving Equation (36), In (37), f (x 0 ) = 0. According to the above, the control law (38) is realizable only if the nonlinear term f (x) is available. However, as is well known, nonlinear terms are challenging to model accurately and serve as a significant source of parametric and/or structured uncertainties [16,[36][37][38].
Therefore, an alternative form of the controller (38) must be considered to avoid this drawback.
If there are non-ideal conditions and uncertain terms, then the control approach in Equation (38) cannot be realized. Thus, a strategy must be proposed to compensate for the uncertain terms and obtain a realizable control design. For this purpose, an uncertainty observer-based controller is considered.

Uncertainty Estimator Design
Let us consider the system (25) where the nonlinear term f (x) is unknown, which is now viewed as a new unknown state variable. The extended dynamical system is defined asẋ coupled with a measured linear output, y = Cx.
In Equations (39) and (40), f (x) and g(x) are bounded unknown nonlinear terms. Let us assume that the state variable can be measured online, i.e., y = x. This is a typical assumption in chemical systems, where the mass concentrations can be regarded as the output measurements. Therefore, the following reduced-order observer is applied to estimate the unknown term f (x) [48,49] In (41),f is the estimated value of f , and λ is the observer gain. The corresponding output injection for this reduced-order observer is f , which is the unknown term to be estimated. To circumvent this issue, the nonlinear term f is obtained from Equation (39) as follows: By substituting (42) into Equation (41) and considering the above assumption of y = x, the following is obtained:˙f With a change in the variable, In consequence,η =˙f − λẏ (45) Finally, the reduced-order observer (41) can be expressed aṡ Note that the uncertainty estimator (46) contains only known variables and parameters, where k is the observer gain.
From Equation (44), the uncertain term can be estimated bŷ Finally, the designed optimal controller is An important characteristic of the Lagrangian in (28) is that its inclusion in the corresponding functional (Equation (27)) results in an analytic and explicit form of the corresponding controller, which avoids the high computational effort required to numerically calculate the controller system, which is a common issue in other optimization strategies.
Finally, the following closed-loop stability analysis is considered. The closed-loop stability of the reactor is evaluated via zero-dynamic analysis. Let us consider the following representation of Equation (39): where x C denotes controller state variables, and x D represents uncontrolled state variables. The dynamical system (49) is closed-loop stable for t > 0 if and only if (50)-(52) are fully satisfied.
This analysis is based on a Lyapunov framework, and the proof of this proposition is in [50].

Numerical Results and Discussion
The process in the application case study is described by the exothermic CSTR modeled by Equations (5)- (9), which were solved by employing the ordinary differential equation (ODE) 23s library from Matlab, v2020a, on a PC with an Intel i7 processor. The open-loop behavior of the reactor is based on the conditions in Table 1.
The proposed control strategy is as follows. The reactor operation is initiated together with the implementation of the temperature regulation via a standard PI controller. A temperature set point is selected to increase the chemical conversion of the corresponding compounds. The abovementioned process increases the reactor temperature, and the thermal effects increase the chemical conversion of reactant A. Because the reaction rate is related to temperature via the Arrhenius model, reactant A can react to generate chemical products B and D, in accordance with the kinetic pathway shown above. In fact, this presents an interesting selectivity problem that must be solved if an intermediate chemical product is desired. Once the temperature is stabilized, the reactor operates under isother-mal conditions, at which point, the optimal controller is activated, and the selected control input is the mass input flow. This controller acts to optimize the mass productivity of chemical compound B.
Upon initiation of the proposed closed-loop operation, the temperature of the reactor is regulated via the temperature of the cooling jacket, which is considered the manipulated variable u T , under a standard PI control structure. The controller gains are k p = 80 min −1 and k i = 35 min −1 , which are calculated by an identification process via a step disturbance in the temperature control input and the application of internal model control (IMC) tuning rules [51]. Figure 1 shows a generalized scheme of the closed-loop operation of an exothermic CSTR. As can be observed in Figure 2, the temperature response of the closed-loop reactor is increasingly close to the required set point (T sp = 185°C), maintaining a small offset of 2.3°C. Furthermore, when the reactor temperature is in the steady state (isothermal operation), at t = 0.1 min, the optimal controller is activated. This is a significant disturbance in the thermal behavior of the reactor, but the temperature PI controller is able to resist it with an acceptable margin and maintains a temperature of 187°C, again with a small offset of 2.5°C from the required set point. Thus, the PI controller is able to maintain the isothermal operation of the reactor, as illustrated in Figure 3, which shows that the temperature control input has a brief temperature decrease to 50°C but, almost immediately, it behaves as a first order-type response and reaches a steady state of 97°C. The temperature of the reactor is maintained within a small range around the required set point. When the optimal controller has been activated, an increase in the mass input flow is required to increase the concentration of chemical reactant A. Then, the temperature controller increases the temperature of the cooling jacket to 116°C, initiating the chemical pathway that forms product B, which is the desired product. This reaction pathway has a high activation energy (see Table 1), so sufficient energy must be maintained to continue generating product B. In this sense, the temperature controller facilitates the supply of the necessary energy to generate product B.  As previously mentioned, the objective is to optimize the productivity of the generation of chemical product B, which is an intermediate compound in the reaction network. Compound B is simultaneously a product and a reactant, so the optimal control must solve this chemical selectivity problem. As observed in Figure 4, after the operation is initiated, the concentration of the main reactant A is consumed from the initial condition via temperature effects (recall that compound A reacts in a parallel reaction). Then, the concentration of compound B increases due to temperature effects and reaches a steady-state value of C B = 0.4 mol/L, and when the optimal controller is activated, this concentration increases to C B = 0.48 mol/L. However, as can be seen below, the optimal controller increases the outlet mass flow and significantly increases the productivity. Furthermore, the dynamic behavior of the uncontrolled concentration is stable. Therefore, the results of numerical experiments show that the zero or inner dynamic of the reactor is stable and, as a consequence, the reactor is stabilizable.  Figure 5 shows the control effort of the optimal controller. The corresponding mass control input is adjusted to a nominal value (u c = 72.5 mol/L) when the process is operating under the temperature regulation regimen. When the optimal controller is activated at t = 0.1 min, the corresponding input flow drastically and rapidly increases to u c = 84 mol/L. This is an important characteristic of the behavior of the control input. Because of this substantial flow increase, the productivity of the reactor increases, as shown below (recall that the reactor productivity P is defined as P = u c C B ). As mentioned previously, the optimal controller requires online information about the reaction rate term of chemical compound B. To provide this information, an observerbased uncertainty estimator (see Equation (41)) is coupled with the control algorithm. Figure 6 shows the performance of the proposed observer, where the observer gain is λ = 500. The results of numerical experiments show that the controller has adequate performance, despite the significant disturbances related to the activation of the temperature and productivity controllers. Finally, as one of the main results, Figure 7 shows the productivity performance of compound B in the reactor. When the reactor operates in the open-loop regimen, the steadystate productivity is reached at P = 20 mol/L min, and when the proposed control strategy is applied, the productivity is increased to P = 27 mol/L min in the first step of control temperature operation. When the optimal controller is activated, the corresponding productivity of compound B is successfully increased to P = 38 mol/L min.   (52). After the startup of the reactor under the temperature closed-loop regimen, compounds B and C are unstable because their relative values are positive, but their corresponding relative stability values asymptotically approach zero, becoming stable state variables. Compounds A and D show dynamic trajectories that are close to zero, indicating that they are acting as stable state variables. When the optimal controller is activated, the reactor dynamics undergo a considerable disturbance, and all relative stability values become positive, with the exception of compound D, whose relative value is always close to zero. As observed in the figure, all the zero dynamics of the reactor asymptotically reach a stable operating condition. These results agree with the dynamic behavior of the uncontrolled concentrations shown in Figure 4. Relative stability values for uncontrolled concentrations (red-compound A; blue-compound B; green-compound C; black-compound D).

Conclusions
This work presents a two-input two-output (TITO) control strategy in which the control pairs are the reactor temperature/jacket temperature and productivity/input mass flow. At the first stage, the proposed closed-loop strategy aims to regulate the reactor temperature via a standard PI control law to increase the concentration of chemical compound B via a temperature increase until the reactor operation reaches isothermal conditions. Furthermore, an optimal controller designed by using the Euler-Lagrange approach is proposed. An important characteristic is that the Lagrangian is based on the model equation of the reactor, and when it is included in the corresponding functional, an analytic and explicit form of the corresponding controller can be obtained. This avoids the high computational effort required to numerically calculate the controller system, which is a common issue in other optimization strategies. The reactor productivity, which is the objective function, is optimized for compound B. The optimal controller design depends on online measurement of the reaction rate, which is unavailable. However, a reduced-order uncertainty observer is coupled with the controller to provide the required feedback term. The numerical results show the efficiency of the proposed TITO control methodology, and the temperature regulation regimen is confirmed to increase the productivity of the reactor by 40% in comparison with the open-loop operation. The increase in productivity after temperature regulation achieves optimal control is 32.15%, and the global productivity increase with the optimal control operation is 85.4% compared with the open-loop operation. To build on the theoretical results for the optimal controller design and the initial positive results of numerical experiments, future work will be oriented to real-time implementation to validate the performance of the proposed control strategy.