A Fractional Order Proportional-Integral-Derivative Controller for Series Continuous Stirred Tank Reactor System

: For series continuous stirred tank reactor system (CSTR), it is a complex problem to finetune the fractional order proportional-integral-derivative controller (FOPID). To solve the problem, this paper presents a parameter tuning method based on intelligent optimization genetic algorithm (GA) and integral time absolute error (ITAE). Firstly, the series CSTR system was mathematically modelled by vectorized modules, and an FOPID control system was established. Meanwhile, the intelligent optimization GA was introduced under the ITAE rule, and the empirical PID control parameters were taken as the initial values for iteration, aiming to enhance the effect of the search for optimal solution. To verify its superiority, the FOPID controller optimized by GA was compared with intelligent optimization GA and empirical PID controller through simulation. The results show that the optimized FOPID system achieved much better control effect and stronger anti-interference performance than the contrastive methods.


INTRODUCTION
Proportional-integral-derivative controller (PID) is one of the most widely used process control strategies in industries like metallurgy, chemical industry, electric power, and machinery, thanks to its low requirement for system model, simple operation, high reliability, and strong robustness [1][2][3][4][5]. Fractional calculus is way more complex than integral calculus, which can identify commonly used systems. The design and implementation of fractional order PID is the core issue of the current research on fractional calculus. The combination between fractional order controller and integral order controller can enhance control flexibility by adding two parameters of integrator and derivator [6].
For a system, the optimal control is to identify the best control law under certain constraints, and optimize the value of the given performance index. There are multiple integral metrics to evaluate the performance of the control system, namely, integral error (IE), integral square error (ISE), integral time square error (ITSE), integral absolute error (IAE), and integral time absolute error (ITAE). Among them, the ITAE is a widely applied comprehensive index, reflecting the speed, stability, and accuracy of the control system [7]. The standard form of the optimal transfer function for the ITAE has been widely applied in engineering. Based on the ITAE design criteria [8], a compound controller called linear quadratic regulator (LQR) was designed, which achieved excellent result on missile control.
Continuous stirred tank reactor (CSTR) is one of the common equipment for polymerization in chemical production. Featured by low cost, strong heat exchangeability, and stable product quality, the CSTR boasts wide application and great research value in chemical industry [9,10]. The reactions in the CSTR system are strongly nonlinear. Therefore, CSTR system simulation has always been adopted to verify the effectiveness of nonlinear control methods. Hence, the study on the CSTR system has important theoretical significance and academic value [11]. Due to the strong nonlinearity, the system cannot be controlled accurately or robustly with controllers designed based on traditional theories [12,13].
To solve the problem, this paper combines the PID controller, which is immensely popular in the industrial field, with genetic algorithm (GA) to design a fractional order PID (FOPID) that stabilizes the CSTR system through ITAE minimization, and determines the control parameters [14]. Fig. 1 illustrates the structure of a three-tank CSTR system. Before entering nearby lakes, the wastewater flow is processed through the CSTR system. In the reactors, the hazardous chemical A is converted into the acceptable chemical B to the maximum possible degree. Simple firstorder reaction takes place under isothermal condition: k A B   . The concentration of A at the inlet of the first reactor, in the first reactor, in the second reactor, and in the third reactor is denoted as C A0 , C A1 , C A2 , and C A3 , respectively (kmol/m 3 ); the reactor rate constant is K (min −1 ); the mean residence time is τ (min).

Mathematical Model
According to the material balance and reaction kinetics, the following equations can be established for the three-tank CSTR system: Since the system is isothermal, the heat balance equation was not taken into account. The system can also be described by state equation: where,   ; , , the CSTR system can be described as the following state equation: The transfer function of the system can be expressed as: The discrete model of the system can be obtained as:

Open-loop Simulation
Our model was constructed with vectorized modules, because the initial conditions of C A1 , C A2 , and C A3 will be lost if the simulation is conducted with the transfer function, and the simulation with linear time invariant (LTI) or linear parameter varying (LPV) system modules is too complex.
In Simulink, many modules support vectorized input, i.e., several signals could be organized into one signal with the Mux module, in which each component represents an original signal. After passing through the integrator module, the compound signal can output a vectorized signal, in which each component is the integral of an original signal. Such a system model is simple, error-free, and easy to maintain [15].
Following this train of thoughts, the basic model of the CSTR system was constructed (Fig. 2). The open-loop simulation results are shown in Fig. 3. It can be seen that, at t = 0, the C A1 , C A2 , and C A3 were 0.4, 0.2, and 0.1 kmol/m 3 , respectively; after the step increase of the inlet concentration C A0 of 1.8 kmol/m 3 , the C A1 , C A2 , and C A3 values all gradually rose with time through the isothermal reaction in the CSTR system. The result did not meet the requirement of consuming component A in waste water stream to the maximum possible degree.

Closed-loop Simulation
Based on the open-loop simulation system, a feedback controller was added to form a closed-loop control system (Fig. 4). The feedback controller is a PI controller to regulate the concentration C A3 of A in the product leaving the third reactor. The concentration C A3 was kept near the preset value  Let C AD be the disturbance concentration, and C AM be the operation concentration changed by the controller. Then, the concentration C A0 of A at the inlet of the first reactor can be calculated as: With proportional and integral functions, the feedback controller adjusts C AM according to the difference between C A3 and 3 set A C : where, 0.8 is the bias correction value of the controller, i.e., the C AM value at t = 0. The difference between C A3 and 3 set A C can be expressed as: Defining d On this basis, a PID control system was established for wastewater treatment in the CSTR system (Fig. 5).

Figure 5 PID control of CSTR system
To simulate the dynamic behavior of the system, a step change for concentration disturbance was given C AD = 0.2 kmol/m 3 at time t = 0. The simulation results of the PID control with K p = 30, K i = 6, and K d = 0 (G C (s) = 30 + 6 / s) are presented in Fig. 6.

ITAE ALGORITHM FOR FOPID 3.1 FOPID
Optimal control aims to find the optimal control scheme from a class of acceptable control schemes, such that the system moves from the initial state to the target state, while achieving the optimal performance [16]. The ideal transmission function of the PID can be expressed as: Proposed by Prof. Podlubny, the FOPID generally adopts the format of PI λ D μ , and the transfer function of: where, λ and μ are integral order and differential order, respectively. Hence, when λ = δ = 1, the transfer function G c (s) FOPID = G c (s) PID. Therefore, the FOPID controller is a generalization of the integer order PID controller. With more tunable parameters, the generalization makes the controller more flexible and enables it to control several real-world processes more accurately.
In the actual FOPID, the steady-state error cannot be eliminated at λ < 1, for the integral link is approximated by a filter. Thus, the integrator was reconstructed as [17]: The Oustaloup method was employed approximate the calculus operators in the controller [18]: Step 1. Determine the range of approximate frequency band (ω b , ω h ) and approximate order N; Step 2. Compute the zero poles ' k  , k  and gain K by: Step 3. Derive the integer-order rational transfer function of fractional Laplace operator s α by: After approximating integer-order transfer function with fractional-order transfer function, the authors designed a fractional-order transfer function module through Simulink module encapsulation.

ITAE Optimization
Under certain conditions, the IE is the common objective function to minimize or maximize an index through a control task: where, t is time; e(t) is error. The optimization method (19) aims to reduce the influence of large initial error on the value of performance index, and to highlight the influence of recent response. It is a good control approach for servo systems [19]. The purpose is to obtain the optimal controller parameter K = (K p , K i , K d , λ, μ) to minimize the ITAE [20,21]: Note that the minimum ITAE (J ITAE ) does not mean that the overshoot δ% is minimized. In some cases, δ% does not meet the design requirements, although the adaptation value J is very small.

GA Optimization [21]
The GA was adopted to compute the ITAE. The algorithm is a parallel random search optimization strategy mimicking the genetic mechanism and biological evolution in nature [22]. Our optimization problem can be described with a mathematical programming model:

μ) T f(K) is the objective function;
R is the set of feasible solutions, i.e., the set of solutions satisfying the constraint K.
In the GA, decision variables K constitute the solution space of the problem. The optimal solution to the problem is searched for by traversing chromosomes K. Hence, the search space of the problem consists of all chromosomes K. Inspired by biological evolution, the GA searches for the optimal solution through genetic operations: genetic operators (selection operator, crossover operator, and mutation operator) are applied to the population to obtain a new generation of population.
The key steps of the GA are as follows: Step 1. Initialization: Set the counter of iterations to t = 9; configure the maximum number of iterations T; initialize the population P(0) withM random individuals.
Step 2. Individual evaluation: Calculate the fitness of each individual in group P(t).
Step 3. Selection: Apply the selection operator to the population.
Step 4. Crossover: Apply the crossover operator to the population.
Step 5. Mutation Apply the mutation operator to the population. Through all genetic operations, obtain the next-generation population P (t + 1).
Step 6. Termination If t ≤ T, then make t = t + 1, return to Step 2; If t > T, output the individual with the highest fitness as the optimal solution, and terminate the calculation.

EXPERIMENTAL ANALYSIS 4.1 Intelligent Algorithm Simulation
Before simulation, a step change for concentration disturbance was given C AD = 0.2 kmol/m 3 at time t = 0; the PID parameters were empirically configured as K p = 30, K i = 6, and K d = 0. Then, the Simulink model was constructed as shown in Fig. 7. The ITAE was set to min f(K) = 0.21226122.
The ITAE index was min f(K) = 0.1594933. Fig. 8 records the dynamic behavior of the system.
Then, the modules of FOPID were designed according to the approximation method of calculus operators inspired by Oustaloup method. Then, the FOPID-based CSTR ITAE optimization was simulated (Fig. 9).  It can be seen that the ITAE value varied with time. The time-varying property must be noted in actual simulation. Because the FOPID was simulated by Oustaloup method, the initial value of the μ cannot be taken as 1. Thus, this parameter was initialized as 0.9999 to prevent simulation error. Tab. 1 compares the indices between three control systems, namely, empirical PID, intelligent PID, and intelligent FOPID. For empirical PID, the values of K p , K i and K d must be given in advance, which adds to the difficulty in implementing the control system. Even if the values are given, the ITAE remains fixed, making it impossible to judge whether the system performance is optimal or not.
For intelligent PID, the values of K p , K i and K d need to be determined by an intelligent algorithm based on ITAE. When the GA was adopted for optimization, it took 56 iterations to converge to the optimal solution.
For intelligent FOPID, five adjustable parameters were added, including K p , K i , K d , λ and μ. The addition makes the controller design more flexible, and more efficient in handling real-world processes [23]. The additional degrees of freedom allow the controller to better adapt to dynamic changes [24]. When the GA was adopted for optimization, it took only 32 iterations to converge to the optimal solution, resulting in a relatively low ITAE. Fig. 11 compares the step responses of A concentrations obtained by the three control systems.

Analysis on Concentration Control Index
From Fig. 11, the peak, overshoot, adjustment time, and attenuation ratio of C A1 , C A2 , C A3 and C AM under each control system were extracted programmatically. The results are displayed in Tab. 2 to Tab. 5.
As shown in Tab. 2 to Tab. 5., within the allowable range of peak and overshoot, intelligent controls achieved a shorter adjustment time and a larger attenuation ratio than empirical control, and thus a much better control effect.
Under basically the same peak and overshoot, intelligent FOPID had a longer adjustment time and a larger attenuation ratio than intelligent PID for C A1 , C A2 and C AM , but the differences were within one order of magnitude. Thus, the two control systems realized comparable effects.
For the key control object C A3 , intelligent FOPID reduced the adjustment time by 3.55 min compared to intelligent PID, and increased the attenuation ratio by 0.34% compared to the latter. Hence, intelligent FOPID significantly improved the control effect from the level of intelligent PID.

White Noise Simulation
In the above simulations, a step change for concentration disturbance was given C AD = 0.2 kmol/m 3 at time t = 0. That is, the input C AD of the closed-loop system was kept constant at 0.2 kmol/m 3 . In practice, however, the value of C AD may oscillate about the set point. Hence, a white noise was added to the input end with the intensity of 0.0001. Then, the three control systems were applied again under the same parameters as above, with the simulation time of 40 min.  Compared with the simulation in 4.1, the addition of white noise activated the K d in the control system, which improves the dynamic features of the system by prewarning and suppressing any shift in the bias during the response [22]. The intelligent PID terminated the task after only one iteration. The results of this control system were: where, 100 is the filter coefficient. The ITAE value did not change through the simulation.
The intelligent FOPID completed the task in 58 iterations, with a lower ITAE: As shown in Fig. 12, the three control systems achieved stable performance, and controlled the C A3 value at system outlet excellently. From Fig. 12, the peak, overshoot, adjustment time, and attenuation ratio of C A3 under each control system were extracted. The results are displayed in Tab. 7. As shown in Tab. 7, GA did not achieve obvious optimization effects on the peak, overshoot, adjustment time and attenuation ratio during the optimization of PID ITAE, but converged to a suboptimal solution compared with the results in 4.1. By contrast, all these performance indices were significantly improved through FOPID. The FOPID clearly outshined intelligent PID in various indices, especially in anti-interference effect. Compared with the results in 4.1, the values of two additional adjustable parameters P d and μ were also greatly improved.

CONCLUSION
This paper designs a three-tank CSTR system for waste water treatment, and developed intelligent PID and intelligent FOPID based on ITEA optimization and GA. Simulink and MATLAB simulations were carried out to acquire the control parameters, step features, and response performance indices of empirical PID, intelligent PID, and intelligent FOPID. The comparison shows that intelligent FOPID clearly outperformed the contrastive methods, especially in anti-interference effect. The future research will verify if the proportional coefficient can be extended to the fractional order.