Adaptive Neural Control and Modeling for Continuous Stirred Tank Reactor with Delays and Full State Constraints

In this paper, an adaptive neural network control method is described to stabilize a continuous stirred tank reactor (CSTR) subject to unknown time-varying delays and full state constraints. .e unknown time delay and state constraints problem of the concentration in the reactor seriously affect the input-output ratio and stability of the entire system. .erefore, the design difficulty of this control scheme is how to debar the effect of time delay in CSTR systems. To deal with time-varying delays, Lyapunov–Krasovskii functionals (LKFs) are utilized in the adaptive controller design. .e convergence of the tracking error to a small compact set without violating the constraints can be identified by the time-varying logarithm barrier Lyapunov function (LBLF). Finally, the simulation results on CSTR are shown to reveal the validity of the developed control strategy.


Introduction
To eliminate the effect of nonlinearities and uncertainties appearing in nonlinear systems, the fuzzy logic systems (FLSs) and neural networks (NNs) [1,2] are useful tools, which avoid the requirement that nonlinearities must be known or can be linearly parameterized. erefore, adaptive neural or fuzzy control methods are usually applied for the nonlinear single-input-single-output (SISO) systems in [3][4][5][6][7][8] and multi-input-multi-output (MIMO) systems in [9][10][11][12]. In recent years, more and more scholars have paid attention to the practical field. By employing neural networks or fuzzy logic systems, many stable control strategies for CSTR (a common chemical engineering reactor, usually with multiple reactors connected to each other for material conversion) have been caused widespread concern in [13][14][15][16][17][18][19] currently. A robust adaptive control method for the nonlinear CSTR system was proposed to ensure that the entire system remains stable in [20]. A novel controller design method was reported in [21] for a CSTR system. In practical CSTR systems, the concentration or temperature must be considered and controlled within certain limits to ensure the stability and safety of the system [22]. Hence, it is meaningful to consider the constraint problem in CSTRs. It is noteworthy that these above methods neglect the constraint limitations of operating spaces and safety specifications on system states.
Constraints could be seen everywhere in practical systems, for instance, car suspension [23,24], motor servo systems [25,26], mobile manipulators [27], and chemical systems [28]; the violation of constraints is a main source of reducing control quality and even causing instability. Logarithm barrier Lyapunov functions were first proposed for constant output constraints in [29] to ensure that system output stays within the prescribed barrier functions. Afterwards, several constraint control methods, such as Logarithm-BLFs, Tangent-BLFs, and Integral-BLFs, were presented for output constraint in [30] and full state constraints in [31][32][33][34]. In recent years, novel state-dependent nonlinear-transformation-based state-constrained control schemes have been developed, see, for example, [31,32]. e new solution that completely removes the feasibility conditions for virtual controllers is first proposed in [31] by constructing a nonlinear state-dependent function. Besides, the authors in [32] propose a unified barrier function upon the constrained states, with which the original constrained nonlinear system is transformed into an equivalent "nonconstrained" system. From a practical point of view, comparing with constant constraint, the time-varying constraint is more general. Hence, based on time-varying BLFs, some novel adaptive constraint controllers were designed, such as nonlinear strict-feedback systems and robotic manipulator with time-varying output constraint in [35,36] and active suspension systems and nonlinear input saturated systems with time-varying state constraints in [37]. However, a major obstacle was that these control methods were proposed for delay-free systems. e time-delay control problem always attracts the attention of the researchers. Some relative strategies were developed for the treatment of several categories of nonlinear time delayed systems. Some new impulsive delay control methods were proposed for nonlinear impulsive delay differential systems in [38][39][40], and in order to achieve the system stability, the change rates of states and impulses were imposed. Employing appropriate LKFs, the robust adaptive backstepping control strategies in [41][42][43] were reported for nonlinear strict-feedback systems to debar time delays. Afterwards, based on [41][42][43], some adaptive NN and fuzzy controllers in [44][45][46][47] were further constructed to debar the effect of unknown time-varying delays appearing in several classes of nonlinear systems. In practical application, it must take times to transfer materials from one reactor to the next in the CSTR system, which creates time delay. In [48,49], two adaptive state feedback controllers were designed for the CSTR system with unknown time delays.
According to the above discussion, this study develops an adaptive NN control strategy for CSTRs with both timevarying delays and full time-varying state constraints. As the best of our knowledge, there are only few results solving the stability problem of such CSTRs in the existing literatures. e primary contributions are as follows: (1) Under the adaptive control framework, the problem of time-varying delays and time-varying full state constraints is considered for CSTRs simultaneously, which is more in line with the needs of engineering systems. By using the time-varying barrier Lyapunov functions, all the states never violate the prescribed time-varying ranges. Finally, the construct integrity of the closed-loop nonlinear system is obtained by Lyapunov theory and the effectiveness of the proposed control scheme is proved by giving the simulation results. e paper is divided into the following parts. Certain preliminaries are assumed during Section 2.
en, the adaptive NN control and stability analysis which are designed by backstepping technique are recommended during Section 3. Section 4 demonstrates certain experimental results. In Section 5, the conclusion is presented.

Preliminaries and Problem Formulation
We discuss the CSTR systems with two reactors A and B, as shown in Figure 1 [45]: where R i denotes the recycle flow rate, θ i is the reactor residence time, η i stands for the reaction constant, F is the feed rate, D i is the reactor volume, H i is the nonlinear function representing the complex behavior of the systems, ξ i is nonlinear function for describing the system uncertainties and external disturbances, C i denotes the reactor i concentration, and τ i denotes time-varying delay, i � A, B. e control objective is to develop an adaptive neural controller to ensure that the concentrations C A and C B of the producing reactors A and B never overstep the correspondent barrier functions, and the boundedness of all signals in the CSTR systems are obtained.

Remark 1.
Comparing with the CSRT systems with only constant time delays in [44,45], the considered systems in this paper with unknown time-varying delays are more important and general. In addition, to improve the control performance and system stability, full time-varying state constraints' problem is also considered in the design process. Hence, the developed control approach is more responsive to actual engineering needs.
When ξ A � 0 and ξ B � 0, the entire CSTR system achieves dynamic equilibrium; assume We can get that the equilibrium points C * A and C * B satisfy 2 Complexity can be regarded as the constraints of the concentrations C A and C B ; we can further have For brevity, thus, (3) can be rewritten as Complexity where x i , i � 1, 2, are the state variables, u ∈ R and y(t) are control input and output, respectively, and h i (·) are known and unknown smooth nonlinear functions, respectively, and is the continuous function, and τ i (t) is the unknown time-varying time delay satisfying τ i (t) ≤ τ max and _ τ i (t) ≤ τ ≤ 1, with τ and τ max being two known constants. Here, A continuous function f(z) can be approximated by the radial basis function neural networks (RBFNN) as where W � [W 1 , W 2 , . . . , W k ] T ∈ R k denote the adjustable weight vector, k expresses the number of neuron, and I(z) � [I 1 (z), I 2 (z), . . . , I k (z)] T signify the basis function vector. ere is a smooth vector function f(z) ∈ R and ideal weights W * ; hence, the smooth function f(z) can be approximated by the RBFNN as follows: We choose W * as follows: in which the error ϑ(z) fulfills |ϑ(z)| ≤ ε within ε > 0. During the thesis, undermentioned Gaussian basis function I i (z) will be employed: where ι i � [ι i1 , ι i2 , . . . , ι iq ] T depicts the center of the receptive field and w i represents the width of the Gaussian function within, i � 1, 2, . . . , k.
Assumption 3 (see [32]). ere exist a positive function Y 0 (t): R + ⟶ R + and the constants Y i > 0, i � 1, 2, so that the desired trajectory y d and its time derivatives satisfy Remark 2. Assumption 1 shows that the function and the jth time derivative less than or equal to positive constants. Assumptions 1-3 are used to prove the stability of the system; all the signals in the closed-loop system are bounded.

The Controller Design and Stability Analysis
An adaptive NN control approach will be investigated in this section. It is used to solve the control problem of time delays and state constraints. e time variable t is omitted except for delay terms to improve the readability of this paper.
Step 1: define the error z 1 � x 1 and a compact set Ω z � |z i | < k b i , i � 1, 2 with k b i , i � 1, 2, are known positive constants, and we have Consider the time-varying BLF candidate: where Γ 1 is a positive constant matrix satisfying Γ 1 � Γ −1 1 > 0, W 1 � W 1 − W * 1 represents the estimate error, and W 1 is the estimation weight of the optimal weight W * 1 . We define Combining (13) and (14), one can obtain Based on (12) and (15), we obtain Using Young's inequality, one has 4 Complexity where c � 1 − d.
According to (20)- (22), (19) becomes By employing Young's inequality, we can obtain Based on (24) and (25), (23) can be written as Step 2 : since z 2 � x 2 − α 1 , its time derivative is given as follows: where e BLF candidate is given as where Γ 2 � Γ −1 2 > 0 is a constant matrix and W 2 � W 2 − W * 2 denotes the estimate error with W 2 being the estimation weight of W * 2 . Based on (27), differentiating V D2 , one obtains By using Young's inequality, it has e unknown function G 2 (Z 2 ) is concluded as where H 2 � z 2 q 2 2 (z 2 )/2 with q 2 (·) being a continuous and smooth function.
By using the NNs, the continuous unknown function G 2 (Z 2 ) is approximated as 6 Complexity where Z 2 � [x 1 , x 2 , W T 1 ] T , I 2 (Z 2 ) ∈ R indicates the Gaussian basis function, and ϑ 2 (Z 2 ) indicates inherent approximation error of the NNs satisfying |ϑ 2 (Z 2 )| ≤ ϑ 2 with ϑ 2 being a positive constant. e virtual controller and the adaptive law are given as where k 2 , c 2 , and σ 2 are the positive constants. By using Young's inequality, it has Along with (31)- (37), we obtain In Step 1, we can obtain Hence, (38) becomes Based on Assumption 1 in [45], the delay term in (40) becomes where q i and ψ ijl represent positive definite and sufficiently smooth known functions with q i (x) � x 2 q i (x) and ψ mjl (x) � x 2 ψ mjl (x) with q i (x) and ψ mjl (x) being continuous and smooth functions. Noting the term σ i W T i W i , the following inequality can be obtained: us, (40) can be rewritten as Choose the Lyapunov function candidate as in which, LKF V L is considered as e time derivative of V L is given as Complexity 7 Noting τ i ≤ τ max , according to (43) and (46), the time derivative of V can be obtained as where So, _ V further becomes With the help of Lemma 1, we have en, (49) is further shown as According to (13), (29), (44), and (45), one has Based on (51) and (52), the following inequality holds: Theorem 1. Consider the CSTR systems (1); if Assumptions 1-3 hold, the proposed virtual controller (21), the actual controller (35), and the adaptation laws (22) and (36) are utilized to ensure the boundedness of closed-loop system 8 Complexity signals, and all the system states remain within the corresponding constraint set.
Proof. According to (53), one can obtain From (13), we can get that every term is positive, so, the following term satisfies From (56) and (57), the error signal is bounded: where e adaptation laws can be obtained: en, according to Assumptions 1-3, it is known that Due to the definition of α 1 , meanwhile, the boundedness of y d , k b 1 (t), _ k b 1 (t), and x 1 ; it is easy to obtain α 1 is bounded and x 2 � z 2 + α 1 is bounded. From the definition in (35), it can be obtained that the controller u is bounded by the same way. erefore, all the signals in the closed-loop system are bounded. e proof completes. □ Remark 3. CSTRs' system is a complex and nonlinear system. It has time-varying delayed states. is paper adopts the mechanism modeling method; according to the kinetic equation, by conservation of mass and conservation of energy, the nonlinear model equation is derived. e Lyapunov-Krasovskii functional is used to eliminate these continuous functions with the delayed state in this paper so that the CSTRs system with the delayed state is stable.
In the case of cascade reaction between two reaction reactors, there will be time delays in the transfer of substances in the reactor, which has a strong delay characteristic. At the same time, the CSTR system is nonlinear. In the reaction process, the reactant concentration and other parameters are easy to fluctuate with time-varying, and the temperature in the chemical reaction system must be controlled within a certain safety limit since its data are constrained. erefore, the time delay and state constraints of the CSTR system should be considered when designing the controller.

Simulation Example
In this part, the simulation example is shown to demonstrate the effectiveness of the presented method for CSTR systems (1) with both time-varying full state constraints and timevarying delays.

Conclusion
e time delays and constraints are often occurring in the chemical reactor system, which also are main limitation factors of system performance severely. is paper has studied the tracking problem of the continuous stirred tank reactor containing the time-varying delays and full state constraints simultaneously. By constructing appropriate LKFs and LBLF, the effects of unknown time-varying delays were eliminated and the time-varying full states are never violated. By employing the proposed control method, we can make the conclusion that the tracking error can converge into a small set of zero and ensure all the signals in the system are bounded. e simulation results are proved to the rationality and effectiveness of the scheme. e future research directions should focus on the intergral BLF-based finite-time adaptive control for a CSTR system.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.