Flatness-Based Model Predictive Constrained Optimal Control for Chemical Reactor

Flatness-Based Model Predictive Constrained Optimal Control for Chemical Reactor

Qasim Hamad* Safanah Raafat

Electrical Engineering Department, University of Babylon, Babil 00964, Iraq

Control and System Engineering Department, University of Technology, Baghdad 00964, Iraq

Corresponding Author Email: 
kasimalhussani@uobabylon.edu.iq
Page: 
1583-1592
|
DOI: 
https://doi.org/10.18280/jesa.570605
Received: 
8 September 2024
|
Revised: 
16 November 2024
|
Accepted: 
17 December 2024
|
Available online: 
31 December 2024
| Citation

© 2024 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

Managing nonlinear systems with constraints is a challenging task that demands rapid and accurate solutions to achieve optimal performance.  This paper proposes the utilization of Model Predictive Control (MPC) based on the Differential Flatness (DF) property of a nonlinear system, forming a Flatness-based Model Predictive Control (FMPC). The purpose is to control a nonlinear Continuous Stirred Tank Reactor (CSTR). The coupling between feedback MPC with feedforward linearization based on the flatness property would reduce the computational load of the proposed control design. The feedforward linearization role is to overcome the robustness issues of feedback linearization, which may be caused by model uncertainty. The suggested method investigates the achievements of optimal control performance that satisfies input constraints imposed on the nonlinear continuous stirred tank reactor. The technique of state-dependent constraint mapping has been employed to transform restrictions applied to the input variable, enabling them to be directly reflected on the flat input. This mapping process is dynamically carried out at each sampling instance across the entire control horizon of the Flatness-Based Model Predictive Control (FMPC) framework. Constraints and disturbance are easily incorporated into the control design, demonstrating the proposed approach's effectiveness. This formulation results in a convex optimization problem that can be solved using Quadratic Programming (QP) while preserving the system's nonlinear behavior. Trajectory tracking performance shows a 46.45% improvement in RMSE when using FMPC compared to Linear Model Predictive Control (LMPC).

Keywords: 

differential flatness, model predictive control, trajectory tracking control, constrained control, continuous stirred-tank reactor

1. Introduction

Controlling a system with nonlinear behavior to achieve optimal performance is the ultimate challenge in engineering and practical sciences. Those systems' unpredictable performance and inherent complexity usually rebel against traditional control methods. Understanding and applying optimal control in nonlinear systems is vital for maintaining the stringent limits of system performance and dependability. Solving the Hamilton-Jacobi-Bellmen (HJB) equation has many difficulties, especially with complicated, multi-variable systems. These challenges motivate the pursuit of additional solutions to acquire optimal control.

In the field of process control, a continuous stirred tank reactor CSTR, described extensively in a study [1], presents an operational challenge due to its nonlinearity, output multiplicity, and oscillation [2]. In addition, CSTR has a versatile dynamic representation that depends mainly on the operating conditions and unstable equilibrium points [3]. The effects of disturbances and interaction between process variables on CSTR results in changes in the nominal operation region. Classical linear control is incompetent in regulating and trajectory-tracking problems in process systems, particularly in CSTR [4]. Consequently, advanced control techniques are popular in addressing the challenges of CSTR complex behaviors. At the top of these advanced techniques are predictive control [5], nonlinear control [6], robust control [7, 8], or a blend of these techniques as in the study [9]. The global transformation technique is essential for altering the original nonlinear CSTR model, using a new set of variables and state feedback, to an equivalent linear model [10]. Feedback linearization in the study [11] with an extended state observer was applied to the nonlinear CSTR. A technique for tracking a desired temperature utilizing the differential flat CSTR and feedforward control was introduced [12].

Differential flatness is an important feature suitable for controlling and planning trajectories for nonlinear systems. A system is differentially flat if an algebraic expression exists from its state and inputs by defining a set of flat outputs and their time derivatives [13]. This property facilitates the transformation of a possibly nonlinear control problem into a linear one using feedforward linearization, simplifying the design of control strategies [14]. Recent studies emphasize the successful implementation of flatness control in various situations where other control strategies failed or failed to give the desired performance [15]. Underactuated mechanical systems were considered, and simple flatness conditions were derived for those types of systems. In a study [16], the control of gas-turbine electric power generation units was performed using differential flatness theory. The flexible mobile manipulator trajectory tracking problem was discussed [17], and the flatness property was combined with active disturbance rejection control for the complicated control problem. Other successful stories of combining deferential flatness with other control techniques that suit special performance requirements, such as optimality, can be found extensively in the literature. An optimal control action can be obtained by combining differential flatness and linear quadratic regulator LQR as in studies [18, 19], resulting in superior performance compared to using LQR. The main restriction on using LQR is its inability to handle constraints imposed on the system's inputs.

For systems with critical constraints, techniques like Model Predictive Control (MPC) are often preferred, as they explicitly incorporate these constraints into the control design. MPC is an important control technology with significant influence in practice and an expected 85% future impact in many categories of industrial applications. This highly impactful percentage placed model predictive control in an advanced position ahead of many other control technologies, such as robust, adaptive, and nonlinear control [20]. MPC has the highest current impact in different fields, such as industry [21], aerospace [22], and automotive [23].

The analysis of MPC and its design was introduced in a framework that provides a diverse toolkit to apply and future development of MPC formulation [24]. The receding horizon control, or MPC, is an advanced control and optimization-based method. Its working principle can be explained as solving online, optimal control problems in an open-loop manner repeatedly within a finite horizon. Feedback is implicitly generated by implementing the first part of the optimized manipulated variable trajectory; this procedure is repeated at each time step. MPC comes with many advantages: (i) constraints consideration of state and control variables; (ii) applicability on both SISO or MIMO systems; (iii) utilization of general performance criterion for optimization.

Meanwhile, the MPC property of repeatedly solving an optimization problem online requires high computational effort. Although the number of transistors in a microprocessor has increased significantly, which lifts some of the computational burdens, the clock speed is limited due to heat dissipation in the transistors [25]. Another factor that increases the computational load is related to advantage (i), as imposing the constraints will affect the optimization problem that needs to be solved online. For systems with nonlinear dynamics in their intended operation region, using NMPC is suitable for solving the nonlinear control problem [26]. Granting that NMPC is an influential tool for controlling nonlinear systems, it is not always the best choice due to the requirement of solving nonlinear programming problems, which adds computational complexity in real time.

To simplify this problem, many solutions have been introduced to design a linear MPC with quadratic programming (QP) to solve the online optimization problem. Researchers adopted many approaches, including full or partial state feedback linearization FBL, to linearize the nonlinear system and use it with MPC in applications [27, 28]. Implementing a nonlinear state observer is mandatory to gain knowledge of the system state using this approach. Another issue concerning this method is the introduction of additional feedback, which contradicts the MPC structure. In addition, constraints on the inputs and states represent an added challenge to any control system, which can be efficiently handled by incorporating these limitations in linear MPC.

This paper proposes a joint control approach that consists of a flat CSTR system and linear MPC to solve the constrained optimization problem. This innovative formulation allows us to restate the MPC problem and turn it into a linear one, simplifying the control problem. The approach is designed to improve performance and constraint handling through a flatness-based model predictive control FMPC strategy. This control policy effectively maintains system performance and dependability and is relatively inexpensive from a computational perspective. It considers the importance of respecting the constraints on the input and output of the plant, providing a practical and cost-effective solution.

Integrating feedback MPC with Feedforward DF leverages the strengths of both approaches to create a more robust and efficient control strategy for nonlinear systems. The benefits of joining these control techniques can be listed as:

  • The DF can reformulate the nonlinear control problem in a globally linearized flat space, allowing MPC to optimize over a simplified transformed system, which leads to faster convergence.
  • FMPC provides an improved control performance due to the initial optimal trajectory generated by DF and refined by MPC in real-time, which balances optimality and feasibility.
  • The integration of DF and MPC allows the controller to follow the desired trajectory and ensures compliance with system constraints. This enhances the robustness and uncertainty since the MPC adjusts accordingly in real time and adheres to constraints.

The rest of this article is structured as follows: Section 2 describes the CSTR dynamic model. Section 3 presents background knowledge on flatness and its feedforward linearization and a fundamental background on model predictive control. Section 4 presents the methodology. Section 5 presents the Simulation results. Section 6 concludes this article.

2. Continuous Stirred Tank Reactor

We consider a Continuous Stirred Tank Reactor CSTR, as shown in Figure 1, with first-order chemical reaction $A \rightarrow B$; the reaction is irreversible exothermic and occurs in a vessel with constant volume. The feed stream ($C_{A f}, \mathrm{~T}_f, \mathrm{~T}_c$) enters the reactor, the exit flow of the reactor ($C_A, T$) assuming the materials are in balance ($F_{\text {in }}=F_{\text {out }}$).

Figure 1. Schematics diagram of the CSTR

A cooling jacket envelops the reactor to remove the reaction heat using a cooling fluid circulating in the jacket. The goal of the reactor is to convert the inflow process concentration to an acceptable outflow chemical concentration. Figure 1 shows a schematic diagram of the CSTR under study. The model consists of two nonlinear differential equations that govern the dynamic progress of the concentration of reactant A and the reactor's temperature. The third equation represents the kinematic equilibrium relationship (Arrhenius equation) multiplied by the concentration. The states of the nonlinear model are $\left[C_A T\right]^T$, The inputs to the CSTR are $\left[C_{A f} T_f T_c\right]^T$, while the output is the reactor temperature $\left[C_A T\right]^T$.

The nonlinear model of the CSTR is derived from the principles of mass balance and energy conservation, assuming perfect mixing, neglected heat losses, and a constant reactor volume V.

$\dot{C}_A(\mathrm{t})=\frac{F}{V}\left(C_{A f}-C_A(t)\right)-K C_A(t)$       (1)

$\begin{array}{r}\dot{T}(t)=\frac{F}{V}\left(T_f-T(t)\right)+\frac{(-\Delta H)}{\rho C_p} K C_A(t) +\frac{U A}{V \rho C_p}\left(T_c-T(t)\right)\end{array}$          (2)

$K=k_0 e^{\frac{-E}{R T(t)}}$        (3)

Table 1 contains the nominal conditions which correspond to an unstable operating point. The measured output variable MO is the reactor temperature (T), and the unmeasured output is $C_A$, while the manipulated input variable MV is the jacket coolant temperature $T_c$, $T_f$ is measured disturbance MD and $C_{A f}$ is the unmeasured disturbance UD.

Table 1. Nominal operation values [29]

Parameter

Value

Description

F

100 L/min

Volumetric flow rate

V

100 L

Reactor volume

k0

7.2×1010 1/min

Pre-exponential factor

-ΔH

50000 J/mol

Heat of reaction per mole

E/R

8750 K

Activation energy per mole

Roh

1000 g/L

Density

Cp

0.239 J/g K

Heat capacity

UA

50000 J/min K

Heat transfer coefficient

TC

300 K

Colling Temperature

CA

0.5 mol/L

Concentration in the reactor

T

300 K

Reactor temperature

The reactor temperature open-loop response to a step change of $\pm$5 (K) in the cooling temperature is shown in Figure 2. The CSTR exhibits high nonlinearity, reactor temperature, and concentration fluctuation in the given operating region. The colling temperature change from its nominal value would make the reactor temperature and the concentration of the materials in the reactor either fluctuate or drop. A specific change in the cooling temperature values makes the concentration of any hazardous material in the reactor go higher than the desired value, which needs to be lowered.

The CSTR system is assumed to have manipulated input constraints with bound as $280 \leq T_c \leq 380$ . Meanwhile, no output constraints have been proposed for the reactor temperature T in this study.

The changes in the feed stream would make the outputs of the CSTR fluctuate and disturb the process, which required an efficient control strategy to keep the reactor operating efficiently. This strategy is necessary to track a prescribed reference trajectory, which grants the smooth operation of the reactor in a stable region with an optimal control policy.

Figure 2. Open-loop response with cooling temperature change

3. Theoretical Background

This section presents flatness with associated feedforward linearization and the fundamental design of MPC. Both techniques are used to design control algorithms separately and apply them to the nonlinear plants of CSTR. The procedure of combining the two control algorithms to form an FMPC strategy will be introduced as follows:

3.1 Differentially flat systems

Fliess et al. [30] introduced the concept known as the flatness of nonlinear systems. The important characteristic of flat systems is the existence of a finite set of variables called flat output or linearizing output. To give a brief background about differentially flat systems and their essential feature, we consider a nonlinear system presented by:

$\dot{x}(\mathrm{t})=f(x(t), u(t))$       (4)

$y(t)=h(x)$     (5)

with $x(t) \in R^n, u(t) \in R^m, y(t) \in R^m$ and $f, h$ are smooth functions in their domain. System (1) is said to be a differentially flat system if a flat output variable $\zeta$ exists and meets the following conditions:

Flat output $\zeta$ can be expressed as a function of the state:

$\zeta=\rho(x)$      (6)

The system state and input may be parametrized by the flat output and a finite number of its components and derivatives as a differential function.

$x=\psi_1\left(\zeta, \dot{\zeta}, \ldots, \zeta^{(n-1)}\right)$       (7)

$u=\psi_2\left(\zeta, \dot{\zeta}, \ldots, \zeta^{(n)}\right)$      (8)

where, $\psi_1$ and $\psi_2$ are smooth functions and  is the flat output required to describe the system. If the system complies with these requirements, the output of the actual system y is a function of the flat output $\zeta$ and finite number of its time derivatives:

$y=\psi_3\left(\zeta, \dot{\zeta}, \ldots, \zeta^{(n-\beta)}\right)$      (9)

where, $\beta$ is the relative degree. Using the flatness property represented by feedforward control law Eq. (8) and reference trajectory Eq. (7) in terms of the flat output and its derivative would provide the ability to obtain the variable of the original system's time function without integration. In general, the differentially flat system can be represented using Brunovsky or flat states:

$\boldsymbol{z}:=\left[\zeta_1, \dot{\zeta}_1, \ldots, \zeta_1^{\left(\beta_1-1\right)}, \ldots, \zeta_m, \ldots, \zeta_1^{\left(\beta_m-1\right)}\right]$         (10)

$\zeta_i^{\left(\beta_i\right)}=\alpha_i\left(\zeta_1, \dot{\zeta}_1, \ldots, \zeta_1^{(\beta-1)}, u, \dot{u}, \ldots, u^{\left(\beta_i\right)}\right):=v_i$        (11)

where, the highest derivative $\beta_i$of the flat output $\zeta$ considered as the new flat input $v$. For multi-input flat system:

$\mathbf{v}:=\left[v_1, v_1, \ldots, v_m\right]^T$      (12)

Note that, in Eq. (11), $\beta_i$ is related to the relative degree of the system, while the number of flat inputs $v_i$ depends on the number of selected flat outputs $\zeta_i$ that represent the nonlinear system. Standard form can be obtained from (10) and (12) as:

$\dot{\mathbf{z}}=A \boldsymbol{z}+B v$       (13)

$\mathbf{v}=\psi_4^{-1}\left(z, u, \dot{u}, \ldots, u^{(\beta)}\right)$        (14)

where, (13) can be termed as a linear flat model. The method of feedforward linearization allows trajectory generators or controllers, such as MPC in our proposal, to only consider the linear flat model with the condition of matching initials for both the desired output and the flat output. To this end, we can conclude the section with the following theorem:

Theorem 1: (14) Considering a desired trajectory in the flat output $\zeta_d$ and a desired flat input $v_d$, with initial condition $z(0)=z_d(0)$, applying the nominal feedforward control law

$u=\psi_2\left(z_d, v_d\right)$       (15)

to the flat system, Eq. (4), will result in an equivalent linear system in Brunovsky canonical form by change of coordinates.

Using Theorem 1 allows controllers, such as MPC in our proposed method, to consider a linearized flat model. The output of MPC can then be fed to the nonlinear system through the inverse transformation Eq. (15) to correct the nonlinear relationship in Eq. (4). Using the desired flat state and input, instead of the actual measured flat state, represents the main difference between feedforward and feedback linearization.

3.2 Model predictive control

Predictive control determines an optimal future sequence of the manipulated variable. This procedure aims to minimize a cost function concerning the controlled variable future behavior on a finite time interval called the prediction horizon. The method of receding horizon, which can be described as optimizing at each time instant and only executing the first value of the obtained manipulated variable sequence, is utilized. The future behavior of the systems can be predicted based on actual measurements of a system model. This model is in state space representation, and the MPC problem is formulated in discrete time. Offset-free tracking, in the presence of constant disturbances or mismatch in the plant model, can be achieved by the augmented state space model:

$\left[\begin{array}{c}x(k+1) \\ d_c(k+1)\end{array}\right]=\left[\begin{array}{cc}A & B_{a c} \\ 0 & I\end{array}\right]\left[\begin{array}{c}x(k) \\ d_c(k)\end{array}\right]+\left[\begin{array}{c}B \\ 0\end{array}\right] u(k)$                   (16)

$y(k)=\left[\begin{array}{ll}C & C_{d c}\end{array}\right]\left[x(k) \quad d_c(k)\right]^T$        (17)

where, $x \in \mathbb{R}^n$ is the state vector, $u \in \mathbb{R}$ is the input variable, $d_c \in \mathbb{R}$ the disturbance and $y \in \mathbb{R}$ is the output. $A, B, C$ are matrices with appropriate scales and are known. The matrices of the disturbances, namely; $B_{d c}$ and $C_{d c}$ are designed based on the knowledge of disturbance. Note that the system is assumed to be stable, controllable, and observable.

The nonlinear plant is assumed to have the following input constraints on $u$:

$u_{\min } \leq u \leq u_{\max }, \Delta u_{\min } \leq \Delta u \leq \Delta u_{\max }$        (18)

A cost function $J(k)$ is need to be minimized, formulated as quadratic form, must consider the future deviation of the controlled variable from its desired steady state:

$\begin{array}{r}J(k)=\sum_{i=1}^{H_p}\left(\hat{y}(k+i)-C x_{s s}(k)\right)^T Q(\hat{y}(k+i) \left.-C x_{s s}(k)\right)+(\widehat{u}(k+i-1) \left.-u_{s s}(k)\right)^T R\left(\widehat{u}-u_{s s}(k)\right)\end{array}$                (19)

where, $\hat{y}(+i)$ is the predicted output at the time $k+i$, evaluated by measurements at the time $k$, and $\widehat{u}(k+i)$ is the predicted input. $H_p$ is the prediction horizon length and $Q, R$ are design parameters, $x_{s s}, u_{s s}$ the steady-state values of the state and the input can be obtained from Eq. (16). A linear disturbance observer is necessary to estimate the constant disturbance value. This observation closes the control loop similarly to the internal model control structure. The difference between actual plant and internal model output and the measure for disturbance and plant model mismatch is used to shift the value of the controlled variable. If the constraint on the input variable is applied, then the inequality constraint is a condition for the minimization of the cost function:

$u_{\min }(k+i-1) \leq u(k+i-1) \leq u_{\max }(k+i-1)$        (20)

where, $u_{\min }, u_{\max }$ represent the input variable limitations. Setting the disturbance to zero, the problem of minimizing the cost function subjected to constraints can be reformulated as:

$\min _u J(k)=\frac{1}{2} \mathcal{U}(k)^T \mathcal{H} U(k)-\mathcal{G}^T U(k)$             (21)

Subject to: $\Omega \mathcal{U}(k) \leq \omega(k)$      (22)

where, $U(k) \in \mathbb{R}^{H_p \times 1}$ has the input sequence within the prediction horizon. $\mathcal{H}, \mathcal{G}$ are known matrices that are appropriately scaled, $\Omega, \omega(k)$, represent the constraints. The optimization problem, which is composed of Eq. (21) and Eq. (22) and constraints Eq. (20), is a standard quadratic programming (QP) problem.

4. Methodology

The proposed method is shown in Figure 3, and the coupling of MPC and flatness feedforward linearization represent the method's core. It uses a linear flat model Eq. (13) in a feedback loop with MPC to output a desired flat state $z_d$ and desired flat input $\mathrm{v}_d$ to feed the nonlinear CSTR system through the flatness inverse term. The flatness inverse term consists of a mapping stage between actual and flat states of the CSTR model and term Eq. (8).

Figure 3. Schematic of flatness-based model predictive control

4.1 Flat system formulation

The CSTR nonlinear system admits the property of flatness, which states that the nonlinear system is flat if there is a differential function of the states and input called flat output. This flat output can define the state and the input as differential functions of the flat output and a finite number of its time derivatives. For a CSTR system, the most common case is the one that considers the temperature $T(t)$ as the desired output to be controlled by the cooling temperature $T_c(t)$ which represents the manipulated variable.

The derivations of the flat system start by considering $\zeta$(t)=T as the flat output. Then, the first derivative of the flat output is:

$\dot{\zeta}=\alpha\left(T_f-\zeta\right)+\beta r(\zeta) C_A+\gamma(u-\zeta)$       (23)

The parameterization of the reactor variables and the input in terms of the flat output and finite number of time derivatives can be obtained according to Eqs. (7), (8) as:

$c_A=1 / \beta r(\zeta)\left\{\dot{\zeta}-\alpha\left(T_f-\zeta\right)-\gamma(u-\zeta)\right\}$      (24)

$T=\zeta$     (25)

$u=1 / \gamma\left\{\dot{\zeta}-\alpha\left(T_f-\zeta\right)-\beta r(\zeta)\right\}+\zeta$        (26)

$v=\dot{\zeta}$     (27)

At this point, the derivation of the control can be obtained since we can have an explicit term containing the control input $T_c$. Then, the flat system can be represented as a linear system in Brunovsky canonical form as in Eq. (13) and serves as a linear model in MPC after discretization:

$z_{k+1}=A z_k+B \mathrm{v}_k$      (28)

4.2 Constrained flat system

The existence of constraints on the differential flat system deteriorates the flatness feedforward control. When applying constraints, the system's output suffers from an overshoot in the reactor temperature, resulting in difficulties keeping the CSTR under the required specifications.

The preliminary results provided additional motivation to utilize differential flatness-based model predictive control FMPC strategy for constrained nonlinear systems. The idea is to map the actual constraints on input $u$ to constraints on the linearizing input $v$ resulted from flatness. This method required the discretization of the linear system obtained from flatness Eq. (13) to yield a discrete linear system subjected to time-varying input constraints.

The mapping strategy for constraints produces a constrained linearized system, which leads to a nonlinear control problem; however, designing a linear MPC is more straightforward than creating a nonlinear MPC that would be required for the original constrained nonlinear system.

4.3 Flatness-based model predictive control

The schematic diagram of FMPC is shown in Figure 3. Formulation of the linear system using flatness representation is completed by the introduction of Eq. (27). Next step would be restating the MPC optimization problem based on the introduced flat model to be solved by the quadratic cost function:

$\min _{v_k} \frac{1}{2} \sum_{k=1}^{H_p}\left(\zeta_k-\zeta_{k, r e f}\right)^T Q\left(\zeta_k-\zeta_{k, r e f}\right)+\sum_{k=0}^{H_p-1} v_k^T R v_k$               (29)

Subject to: $\mathrm{z}_{\mathrm{k}+1}=\mathrm{Az} \mathrm{z}_{\mathrm{k}}+\mathrm{Bv}_k$       (30)

This formulation of the cost function can be expressed as a quadratic program as presented in Eq. (21), with $\mathcal{H}=\left[z_1, \ldots, z_{H_p}, \mathrm{v}_0, \ldots, \mathrm{v}_{H_p-1}\right]^T$. This procedure will result in an optimal control input obtained from (26) and using the optimal flat state and input utilizing Eqs. (28) and (29).

4.4 Constraints mapping technique

Output constraints do not require transformation as they are straightforward for differential flatness control. However, input constraints need to be transferred to the new input $v$ that was generated by the flatness. We need to transform constraints Eq. (18) into constraints on a discretized model of a differentially flat system Eq. (13). Thus, the objective is to obtain constraints on the artificial input $v(t)$ that satisfy the inequality:

$\begin{aligned} & v_{\min }\left(k+H_c-1 \mid k\right) \leq v\left(k+H_c-1 \mid k\right)  \leq v_{\max }\left(k+H_c-1 \mid k\right)\end{aligned}$        (31)

where, $H_c$ is the control horizon of the LMPC controller, each bound of the inequality represents the value of the input evaluated at the current time instant $k$.

The constraints on $v_k$ within the range of the control horizon are state-dependent and cannot be enforced by the MPC algorithm presented earlier in the study; the reason for such restriction is that the assumption was made based on a constant bound on the control input. The case of nonlinear-variant constraints can be solved by MPC, which uses quadratic programming in the same manner as solving linear variant constraints. The challenge lies in the need for an affine transformation to address the problem of nonlinear constraints in real-time control applications.

Remark: To realize this transformation, three critical issues must be considered while implementing this transformation; these can be listed as:

  • The transformation must be performed at every sampling instant since the transformation is state-dependent.
  • The transformation has to be accomplished over the entire control horizon of the receding horizon controller.
  • The primary assumption is that the LMPC is only permitted to generate the desired trajectory that the plant and actuators can realize; by doing so, the constraints in Eq. (20) are respected.

The relative degree plays an essential role in connecting the permitted output trajectory and the flat input $v$ based on study [31]. The relative degree represents the number of time derivatives of the output function to have an expression for the input $u(t)$ explicitly according to the study [32].

The relationship between constraints on $u$ and the constraints $y$ can be established by using lie derivatives:

$y^\beta(t)=L_f^\beta h(x(t))=\psi_3(x(t), u(t))$        (32)

where, $L_f h$ is the derivative of $h$ along vector field $f$. Now replacing $u, y^\beta$ by their max-min values, as well as $x$ by its desired state from Eq. (7), limitation on $y^\beta$ is found:

$y_{\max , \min }^\beta=\psi_3\left(\Psi_1\left(\zeta_d, \dot{\zeta}_d, \cdots, \zeta_d^{\beta-1}\right), u_{\max , \min }\right)$         (33)

This leads to a state-dependent time-varying bound on $y^\beta$. 

Now, for MPC optimization problem Eq. (20) to be feasible within the bounds of $u$, Eq. (21) needs to be used to guarantee the generation of derivatives within the limits of Eq. (32).

The design of the state space in controllable canonical form for the prediction model in MPC will provide the necessary relation between $y^\beta$ desired and $v$ as:

$y_d^\beta(t)=v(t)-a_{\beta-1} z_\beta(t)-\ldots-a_0 z_1(t)$            (34)

where, $\beta$ is the relative degree and $-a_i, i=0, \cdots \beta-1$ are the coefficients of the last row of the controllability matrix. Eq. (33) can be rearranged and discretized and extend over the prediction horizon to yield:

$\begin{aligned} v(k+j)_{\max , \min }= & y_{\max , \min }^\beta(k+j)+a_{\beta-1} \zeta_\beta(k+j) +\ldots+a_0 \zeta_1(k+j)\end{aligned}$      (35)

5. Simulation Setup and Results

This section presents the simulation results of the FMPC, FFC, and LMPC controllers applied to the nonlinear CSTR system. To evaluate the performance of tracking a reference temperature trajectory using our proposed method and other control strategies. The second-order CSTR was employed with an unstable operating point and system parameters provided in Table 1. Eqs. (1)-(3) are used to simulate the dynamics of the CSTR. The manipulated input $u$ was constrained with bound constraints as $280 \leq T_c \leq 380$, no output constraints were imposed in this study. The comparison was made among three controllers, namely, linear model Predictive control LMPC, flatness feedforward control FFC, and compared against flatness-based model predictive control FMPC.

The description of each control method used in the simulation is as follows:

  • The LMPC schematic diagram is shown in Figure 4, using an augmented linear model as described in Eqs. (16) and (17). It was implemented with tuning parameters, $H_p$ = 10, $H_c$ = 2, MV weight rate = 0.1, OV weight = 1. Three inputs have been selected in the design of the LMPC internal model, $T_C$ = MV, $T_f$ = MD and $C_{A f}$ = UD. The augmented system was trimmed to obtain a linear model and used reactor temperature $T$ = MO and $C_A$ = UO. The closed-loop performance in terms of the prediction model and the feedback connection of the nonlinear plant with the controller was tuned to be stable.

Figure 4. Linear model predictive control schematic

Figure 5. Flatness feedforward control schematic

FFC was designed to track the trajectory of nonlinear CSTR, as shown in Figure 5. Using the flatness property, trajectory tracking is reduced to a problem of a linear system required to track a given trajectory. Imposing an asymptotic stable behavior to the flat output tracking error, designed based on linear time-invariant dynamics, is the most straightforward approach to deal with nonlinear system tracking problems. By giving a desired trajectory $\zeta^*(t)$ which is required to be tracked by the flat output $\zeta$ the error dynamics can be defined as:

  • $e(t)=\zeta-\zeta^*(t)$. The following linear feedback controller was used:

$v=\frac{d^\alpha}{d t^\alpha} \zeta^*(t)-\sum_{j=0}^{\alpha-1} \gamma_j \frac{d^{\alpha-j-1}}{d t^{\alpha-j-1}}\left(\zeta-\zeta^*(t)\right)$          (36)

The error evolved to stability by apparated choice of the coefficients of the linear feedback controller $\gamma_j$. The characteristic polynomial of the closed-loop system is Hurwitz, and the error signal was exponentially asymptotically stable to zero.

  • To implement FMPC optimal control strategy, we started by utilizing the nonlinear CSTR differential flatness property; we defined the flat output state $z$ Eqs. (24), (25) and input $v$ Eq. (27), then we rewrote the nonlinear model as a discrete linear flat model as in Eq. (28). An MPC formulation was used subjected to a discretized linear flat model, Sampling time = 0.05, prediction horizon =10, and control horizon = 2. The schematic of the proposed method is presented in Figure 3. FMPC, described in detail earlier, exhibited high performance in tracking the setpoint with less control efforts when compared to the other control techniques.

Three simulation scenarios were investigated to demonstrate the effectiveness of the proposed control strategy in testing the performance of FMPC. The performance of the three controllers is compared for the setpoint change of $\pm$25 K from its nominal value, Figure 6 and Figure 7 are for the positive setpoint change.

Figure 6. Positive setpoint change comparison for reactor temperature

Figure 7. Positive setpoint change comparison for cooling temperature

As shown in Figure 7, the three controllers had to follow a positive setpoint change of 25 K above their nominal value of 350 K. The same bound on the control input was applied to this case, and only the output of FMPC showed no overshoot in its response. Table 2 presents the numerical values of the transient response analyses obtained using the stepinfo command in MATLAB.

Table 2. Transient response characteristics for positive setpoint change

Parameters

LMPC

FFC

FMPC

Overshoot (%)

19.3

7.3

0

Rise Time (min)

0.13

0.46

0.74

Settling Time (min)

0.69

2.3

1.23

Table 3 compares the parameters of the performance indicator and quantifies the control performance. The ISE index rates the efficiency of the three controllers in holding on to the output variable near the reference. ITAE and ITSE indicate the oscillation in the error signal. RMSE represents the average magnitude of prediction errors.

Table 3. Performance indicators for positive setpoint change

Parameters

LMPC

FFC

FMPC

ISE

856.9

328.5

218.5

IAE

19.98

21.17

16.87

ITSE

277.7

207

70.85

ITAE

6.748

16.29

11.01

RMSE

15.5×10-4

9.8×10-3

8.3×10-4

The result showed a 46.45% improvement in FMPC compared to LMPC (RMSE).

Figures 8 and 9 show negative setpoint change simulation results, with the reference setpoint temperature dropping to 325 K from 350 K.

Figure 8. Negative setpoint change comparison for reactor temperature

Figure 9. Negative setpoint change comparison for cooling temperature

The FMPC has shown a response capable of regulating the temperature with less overshoot. FFC and FMPC have comparable transient response results, while LMPC has a sluggish response due to its inaccurate linearized model and poor constraints handling.

The performance of the three controllers shown in Figure 10 and Figure 11 are the results of closed-loop response for feed-temperature $T_f$ disturbance. The input feed temperature was increased by 45 K while keeping the other nominal values as in Table 1, and the input constraints were still applied. LMPC response was prolonged and showed significant control moves, while FFC and FMPC had comparable results with the advantage of faster response to FMPC.

Figure 10. Feed temperature disturbance comparison reactor temperature

Figure 11. Feed temperature disturbance comparison reactor temperature

Table 4. A comparison of the elapsed computational time

Parameters

LMPC

FFC

FMPC

ACT (ms)

0.24

0.25

0.17

MCT (ms)

1.16

10.8

5.11

The three controllers' simulations used a sampling time of 50 ms to measure the computation time of the controlled CSTR system. Table 4 includes the Average Computation Time (ACT) and Maximum Computation Time (MCT) of the LMPC, FFC, and FMPC controllers. The results show an enhanced average computation time of the FMPC compared to the other controllers. The real-time feasibility analysis showed that the average and worst-case computation times are well below the control loop sampling time with the advancement of FMPC, allowing implementation feasibility for more complicated systems. The results of Table 4 have been obtained based on a built-in timing function to capture the computation time of each of the applied control loops.

To conclude this section, FMPC demonstrates the ability to regulate the reactor's temperature setpoint while considering the constraints on the manipulated variable, and it shows good disturbance rejection. In addition, FMPC delivers the best results for both positive and negative setpoint changes and disturbance rejection, while LMPC produces the least favorable response.

6. Conclusions

An innovative control strategy for a constrained nonlinear CSTR process, incorporating the flatness property, has been developed and evaluated. This strategy features a unique combination of a FFC and LMPC. The FFC embeds the system's nonlinearity in the inverse term, resulting from flatness parameterization. LMPC, on the other hand, regulates the auxiliary input to the nonlinear inverse term, adding another layer of innovation to the strategy.

The control strategy's ability to map constraints on the original plant input into linear constraints on the FMPC input is a significant practical advantage. The disturbance model that the LMPC uses ensures offset-free performance, further enhancing the strategy's real-world applicability. The strategy's proven simplicity of computation and constraint handling make it a reliable and valuable tool for model-based linear predictive control, instilling confidence in its practicality.

The comparison between the optimization-based LMPC and the nonlinear control techniques represented by FFC is of significant value. This comparison provides valuable insights into the CSTR system and demonstrates the potential for excellent results when these techniques are combined.

In addition, the three controllers' maximum and average computational time were calculated in a real-time feasibility analysis. FMPC showed promising results in reducing the computational burdens of the optimization problem, which enhances the control systems' real-time implementation.

The simulation results for the examined CSTR system show the superiority of the proposed control strategy over the other compared control methods. The combination of FMPC provides an elegant and straightforward way to handle some critical issues concerning controlling highly nonlinear systems. Future work will compare the proposed control strategy with other techniques and will consider MIMO systems to prove further the effectiveness of the method used in this study.

  References

[1] Seborg, D.E., Edgar, T.F., Mellichamp, D.A., Doyle, F.J. (2011). Process Dynamics and Control. 3rd ed, Published by John Wiley & Sons, Inc.

[2] Suo, L., Ren, J., Zhao, Z., Zhai, C. (2020). Study on the nonlinear dynamics of the continuous stirred tank reactors. Processes, 8(11): 1436. https://doi.org/10.3390/pr8111436

[3] Wase, M.G., Gebrekirstos, R.F., Jin, G.G., So, G.B. (2023). Fuzzy gain scheduling of the fractional-order PID controller for a continuous stirred-tank reactor process. Processes, 11(12): 3275. https://doi.org/10.3390/pr11123275

[4] Prokop, R., Matušů, R., Vojtěšek, J. (2019). Robust control of continuous stirred tank reactor with jacket cooling. Chemical Engineering Transactions, 76: 787-792. https://doi.org/10.3303/CET1976132

[5] Wu, B., Liu, X., Yue, Y. (2020). A control-performance-based partitioning operating space approach in a heterogeneous multiple model. Processes, 8(2): 215. https://doi.org/10.3390/pr8020215

[6] Huang, X., Cao, H., Jia, B. (2023). Optimization of Levenberg Marquardt algorithm applied to nonlinear systems. Processes, 11(6): 1794. https://doi.org/10.3390/pr11061794

[7] Li, F., Cao, X., Zhou, C., Yang, C. (2021). Event-triggered asynchronous sliding mode control of CSTR based on Markov model. Journal of the Franklin Institute, 358(9): 4687-4704. https://doi.org/10.1016/j.jfranklin.2021.04.007

[8] Zerari, N., Chemachema, M. (2020). Robust adaptive neural network prescribed performance control for uncertain CSTR system with input nonlinearities and external disturbance. Neural Computing and Applications, 32(14): 10541-10554. https://doi.org/10.1007/s00521-019-04591-1

[9] Zhang S., Jia, R., Cao, Y., He, D., Yu, F. (2024). Stable predictive control of continuous stirred-tank reactors using deep learning. Information Sciences, 678: 120970. https://doi.org/10.1016/j.ins.2024.120970

[10] Williams, A.O. (2021). Performance and robustness of alternate nonlinear control system designs for a nonlinear isothermal CSTR. IFAC-PapersOnLine, 54(21): 127-132. https://doi.org/10.1016/j.ifacol.2021.12.022

[11] Medjebouri, A. (2023). Extended state observer based robust feedback linearization control applied to an industrial CSTR. Journal of Automation, Mobile Robotics and Intelligent Systems, 17(4): 68-78. https://doi.org/10.14313/jamris/4-2023/32

[12] Hamad, Q.M., Raafat, S.M. (2024). A flatness-based trajectory tracking control for chemical reactor. In 2024 21st International Multi-Conference on Systems, Signals & Devices (SSD), Erbil, Iraq, pp. 819-825. https://doi.org/10.1109/SSD61670.2024.10549742

[13] Fliess, M., Lévine, J., Martin, P., Rouchon, P. (1999). A lie-backlund approach to equivalence and flatness of nonlinear systems. IEEE Transactions on Automatic Control, 44(5): 922-937. https://doi.org/10.1109/9.763209

[14] Hagenmeyer, V., Delaleau, E. (2003). Exact feedforward linearization based on differential flatness. International Journal of Control, 76(6): 537-556. https://doi.org/10.1080/0020717031000089570

[15] Sa'id, W.K., Al-Samarraie, S.A., Mshari, M.H. (2020). Simple flatness condition for 2DOF underactuated mechanical systems with application to controller design. Mathematical Modelling of Engineering Problems, 7(1): 119-126. https://doi.org/10.18280/mmep.070115

[16] Rigatos, G., Zervos, N., Busawon, K., Siano, P., Abbaszadeh, M. (2020). Differential flatness theory-based approach to the control of gas-turbine electric power generation units. IET Control Theory & Applications, 14(2): 187-197. https://doi.org/10.1049/iet-cta.2018.5587

[17] Feliu-Talegon, D., Sira-Ramirez, H., Feliu-Batlle, V. (2023). Trajectory tracking problem for a flexible mobile manipulator: A flatness based approach combined with active disturbance rejection control. IFAC-PapersOnLine, 56(2): 6338-6343. https://doi.org/10.1016/j.ifacol.2023.10.813

[18] Diwakar, A.D., Manivannan, P.V. (2020). Differential flatness based LQR control of a magnetorheological damper in a quarter-car semi-active suspension system. International Journal of Mechanical Engineering and Robotics Research, 9(7): 998-1006. https://doi.org/10.18178/ijmerr.9.7.998-1006

[19] Rauniyar, S., Bhalla, S., Choi, D., Kim, D. (2023). EKF-SLAM for quadcopter using differential flatness-based LQR control. Electronics, 12(5): 1113. https://doi.org/10.3390/electronics12051113

[20] Samad, T., Bauer, M., Bortoff, S., Di Cairano, S., Fagiano, L., Odgaard, P.F., Sosseh, R. (2020). Industry engagement with control research: Perspective and messages. Annual Reviews in Control, 49: 1-14. https://doi.org/10.1016/j.arcontrol.2020.03.002

[21] Aissaoui, A., Khouidmi, H., Benzouaoui, A., Bessedik, B. (2021). Nonlinear predictive control method for maximizing wind energy extraction of variable speed wind turbines under turbulence. Journal Européen des Systèmes Automatisés, 54(5): 661-670. https://doi.org/10.18280/jesa.540501

[22] Sun, S., Romero, A., Foehn, P., Kaufmann, E., Scaramuzza, D. (2022). A comparative study of nonlinear MPC and differential-flatness-based control for quadrotor agile flight. IEEE Transactions on Robotics, 38(6): 3357-3373. https://doi.org/10.1109/TRO.2022.3177279

[23] Li, W., Zhang, J., Wang, F., Zhou, H. (2023). Model predictive control based on state space and risk augmentation for unmanned surface vessel trajectory tracking. Journal of Marine Science and Engineering, 11(12): 2283. https://doi.org/10.3390/jmse11122283

[24] Köhler, J., Müller, M.A., Allgöwer, F. (2024). Analysis and design of model predictive control frameworks for dynamic operation—An overview. Annual Reviews in Control, 57: 100929. https://doi.org/10.1016/j.arcontrol.2023.100929

[25] Schwenzer, M., Ay, M., Bergs, T., Abel, D. (2021). Review on model predictive control: An engineering perspective. The International Journal of Advanced Manufacturing Technology, 117(5): 1327-1349. https://doi.org/10.1007/s00170-021-07682-3

[26] Khather, S.I., Ibrahim, M.A., Abdullah, A.I. (2023). Review and performance analysis of nonlinear model predictive control—Current prospects, challenges and future directions. Journal Européen des Systèmes Automatisés, 56(4): 593-603. https://doi.org/10.18280/jesa.560409

[27] Naimi, A., Deng, J., Vajpayee, V., Becerra, V., Shimjith, S.R., Arul, A.J. (2022). Nonlinear model predictive control using feedback linearization for a pressurized water nuclear power plant. IEEE Access, 10: 16544-16555. https://doi.org/10.1109/ACCESS.2022.3149790

[28] Wang, J., Fader, M.T., Marshall, J.A. (2023). Learning-based model predictive control for improved mobile robot path following using Gaussian processes and feedback linearization. Journal of Field Robotics, 40(5): 1014-1033. https://doi.org/10.1002/rob.22165

[29] Kurtz, M.J., Henson, M.A. (1997). Input-output linearizing control of constrained nonlinear processes. Journal of Process Control, 7(1): 3-17. https://doi.org/10.1016/S0959-1524(96)00006-6

[30] Fliess, M., Lévine, J., Martin, P., Rouchon, P. (1995). Flatness and defect of non-linear systems: introductory theory and examples. International Journal of Control, 61(6): 1327-1361. https://doi.org/10.1080/00207179508921959

[31] Kandler, C., Ding, S.X., Koenings, T., Weinhold, N., Schultalbers, M. (2012). A differential flatness based model predictive control approach. In 2012 IEEE International Conference on Control Applications, Dubrovnik, Croatia, pp. 1411-1416. https://doi.org/10.1109/CCA.2012.6402435

[32] Khalil, H.K. (2002). Control of Nonlinear Systems. Prentice Hall, New York, NY, USA.