Optimum Setting of Controller Using Soft Computing Techniques for a Chemical System

: Problem statement: The aim of this study is to present an intelligent tuning technique for PID controller that are simple and still result in good closed loop behavior. The idea is to start with a tuned conventional PID controller, replace it with an equivalent intelligent controllers like Fuzzy, ANN, Genetic and PSO techniques implies fine tuned nonlinear PID controller which is most suitable for nonlinear process like Continuous stirred tank reactor. The performance of various optimization techniques and intelligent techniques are compared. Approach: In this study we present soft computing techniques to design and tune the PID controller. The objective wss tominimise the steady state error and to obtain the optimum response. Results: The comparisons amoung the Conventional PID, Fuzzy Sliding PID, Simulated Anneling PID and PSO tuned PID controllers PSO PID implies better result for the nonlinear chemical process. Conclusion: With the nonlinear model of CSTR process the PSO tuned PID controller implies the optimum response for both setpoint and load variations.


INTRODUCTION
Chemical reactors are ones of the most important plants in chemical industry. Their operation, however, is corrupted with various uncertainties. Some of them arise from varying or not exactly known parameters, as e.g. reaction rate constants, heat transfer coefficients. In other cases, operating points of reactors vary or reactor dynamics is affected by various changes of parameters or even instability of closed loop control systems. Application of robust control approach can be one of ways overcoming all these problems. The main difficulty in tuning of control is due to the disturbances and parameter uncertainties. The fuzzy modeling or fuzzy identification, first explored systematically has found numerous practical applications in control, prediction and inference (Nahas et al., 1992;Devadhas and Kumar, 2010). The principle of sliding mode control is introduced into classical model free fuzzy logic control which provides proper guidance to design a fuzzy controller for system stability. The combination of the two control principles, called Fuzzy Sliding Mode Control, provides an alternative to design a robust controller (Morari and Zafiriou, 1989) for nonlinear systems with uncertainty (Devadhas and Pushpakumar, 2010;Stephanopoulos and Han, 1996). Hence in this study, both sufficient and necessary reaching conditions of fuzzy sliding mode PID controller is in CSTR process Most of optimization problems such as Tabu search, simulated annealing and recently-introduced Particle Swarm Optimization (PSO) are considered as realistic and powerful solution to obtain optimization problems. Simulated annealing (Chen and Peng, 1999) is a generic met heuristic probabilistic for the global optimization problem. It is often used when the search space is discrete. For certain problems, simulated annealing may be more effective to find an acceptably good solution in a fixed amount of time. Each step of the SA algorithm replaces the current solution by a random nearby solution, chosen with a probability that depends on the difference between the corresponding function values and on a global parameter T (called the temperature), that is gradually decreased during the process (Chen and Peng, 2006). Recently, Eberhart and Kennedy and Eberhart (1995) suggested a Particle Swarm Optimization (PSO) based on the analogy of swarm of bird and school of fish. The PSO mimics the behavior of individuals in a swarm to maximize the survival of the species. The algorithm, which is based on a metaphor of social interaction, searches a space by adjusting the trajectories of moving points in a multidimensional space. The individual particles are drawn stochastically towards the position of present velocity, their own previous best performance and the best previous performance of their neighbors (Clerc and Kennedy, 2002). The main advantages of the PSO algorithm are summarized as: simple concept, easy implementation, robustness to control parameters and computational efficiency when compared with mathematical algorithm and other heuristic optimization techniques.
The main contribution of this study is to find the nonlinear model of the chemical process and the soft computing techniques like PSO and SA methodologies has been employed to control the nonlinear process. Finaly a fuzzy sliding mode PI controller have been proposed to control the process Process description: Chemical reactions in a reactor (Stephanopoulos and Han, 1996) are either exothermic (release energy) or endothermic (require energy input) and therefore require that energy either be removed or added to the reactor for a constant temperature to be maintained. Figure 1 shows the schematic of the CSTR process. In the CSTR process model under discussion, an irreversible exothermic reaction takes place. The heat of the reaction is removed by a coolant medium that flows through a jacket around the reactor. A fluid stream A is fed to the reactor. A catalyst is placed inside the reactor.

Fig1: CSTR process
The fluid inside the reactor is perfectly mixed and sent out through the exit valve. The jacket surrounding the reactor also has feed and exit streams. The jacket is assumed to be perfectly mixed and at a lower temperature than the reactor.

Mathematical modeling:
The component balance (Seborg, 1994) for the reactor can be given as: Now be used in the general model differential equation as: Using Eq. 3 and 4 can be linear zed: This can be written as: ( ) Rearranging terms in Eq.5 and introducing the Laplace operator results in: CA (K1 F / ( cs 1)) (K2 CAin /( cs 1)) (K3 T / ( cs 1)) The second equation (energy balance) of the reactor model can be rewritten as: This (8) can be rewritten as: Rearranging terms in Eq.9 and introducing the Laplace transform operator results in: T (K4 F / ( Ts 1)) (K5 Tin / ( Ts 1)) (K6 CA / ( Ts 1)) With: Substitution of the steady state values in the time constant and process gains of Eq. 11.
Results in: The response of the change in reactor outlet concentration C A to a change in reactor throughput F can now be obtained by combining Eqs. 6 and 10 while setting changes in C Ain and T in to zero: [ ] CA (K1 F / ( cs 1)) (K3 / ( cs 1)) (K4 / ( Ts 1)) (K6 CA / ( Ts 1)) This equation can be rearranged to: Then, the response of the change in reactor outlet temperature T to a change in reactor throughput F can now be obtained by combining Eq. 6 and 10 while setting changes in C Ain and T in to zero: T (K4 F / ( Ts 1)) (K6 / ( Ts 1)) [(K1 F / ( cs 1)) (K3 T / ( cs 1))] This Eq. (15) can be rearranged to Eq. 16: After substituting values for the time constants and gains in Eq. 7-13 and 14, can be written as: (120.02s 0.262) CA / F /(s^2 0.0049s 3.921e 6) ( 20.86s 0.0456) T / F /(s^2 0.0049s 3.921e 6) PID controller: The PID controller (Astrom and Hagglund, 2001;Shinskey, 1996) is also called as three mode controller. In industrial practice, it is commonly known as proportional-plus-reset-plus-rate controller. The combination of proportional, integral and derivative mode is one of the most powerful but complex controller operations. This system can be used for virtually any process condition. The equations of proportional mode, integral mode and derivative mode are combined to have analytic expression for PID mode: This mode eliminates the offset of the proportional mode and still provides fast response. The three adjustment parameter here is proportional gain, integral time and derivative time.The transfer function of PID controller is in Eq.17. PID controller is the most complex of the conventional control mode combination. The PID controller can result in better control than (Clerc and Kennedy, 2002) the one or two controller. In practice, control advantage can be difficult to achieve because of the difficulty of selecting the proper tuning parameters

SA-based tuning for PI controller in CSTR process:
Simulated Annealing (SA) is motivated by an analogy to annealing in solids. Numerous researchers have demonstrated that SA is very effective in many optimization problems. However, the long execution time of SA has been the major drawback in practice. The algorithm Metropolis et al. (1953) simulated the cooling of material in a heat bath. This process is known as annealing. Metropolis's algorithm simulated the material as a system of particles. The algorithm simulates the cooling process by gradually lowering the temperature of the system until it converges to a steady frozen state. Moita et al. (2006) the idea of the Metropolis algorithm is applied to optimisation problems. This idea is used in simulated annealing to search for feasible solutions and converge to an optimal solution. This study gives a strategy based on simulated annealing for the optimal tuning of a PI controller to deal with time-varying delay for a pH process. The main goal is to minimize the delay time, peak time, settling time, rise time and peak overshoot. The proposed strategy is compared with other classic tuning algorithms. The simulation is carried out in MATLAB and the simulation results are explained.
PSO tuning for PI controller in chemical process: Kennedy and Eberhart (1995) developed PSO algorithm based on the behavior of individuals (i.e., particles or agents) of a swarm. It has been noticed that members within a group seem to share information among them, a fact that leads to increased efficiency of the group (Ciuprina et al., 2002). The PSO algorithm searches in parallel using a group of individuals similar to other AI-based heuristic optimization techniques (Kennedy et al., 2001). An individual in a swarm approaches to the optimum or a quasi optimum through its present velocity, previous experience and the experience of its neighbors.
In a physical n-dimensional search space, the position and velocity of i-individual are represented as the vectors X i = (x i1 …….x in ) and V i = (v i1 …….v in ), respectively, in the PSO algorithm. Pbest i = (x i1 pbest …….x in pbest ) and Gbest = (x i1 Gbest …….x in Gbest ) respectively, be the best position of individual and its neighbors' best position so far. Using the information, the updated velocity of individual is modified under the following equation in the PSO algorithm Eq. 18:  (19) is illustrated in Fig. 5.
The process of the PSO algorithm can be summarized as follows: • Step: Initialization of a group at random while satisfying constraints • Step: Velocity and Position updates while satisfying constraints • Step: Update of Pbest and Gbest • Step: Go to Step 2 until stopping criteria is satisfied In the subsequent sections, the detailed implementation strategies of the PSO are described.

Initialization:
In the initialization process, a set of individuals is created at random. In this study, the structure of tuning PI controller for a pH process is composed of a set of elements (i.e., generation outputs). Therefore, individual i's position at iteration 0 can be represented as the vector (X i 0 = (P i1 0 …….P in 0 )) where n is the number of generators. The velocity of individual i (V i 0 = (v i1 0 …….v in 0 )) corresponds to the generation update quantity covering all generators. The elements of position and velocity have the same dimension. The following strategy (20) is used in creating the initial velocity Eq. 20: where, Σ is a small positive real number. The velocity of element j of individual i is generated at random within the boundary. The developed initialization scheme always guarantees to produce individuals satisfying the constraints while maintaining the concept of PSO algorithm. The initial Pbest i of individual i is set as the initial position of individual i and the initial Gbest is determined as the position of an individual with minimum payoff.
where, TC i the object function evaluated at the position of individual i. Additionally, Gbest at iteration k+1 is set as the best evaluated position among Pbest i k+1 .

Stopping criteria:
The PSO is terminated if the iteration approaches to the predefined maximum iteration. Thus the tuning of PSO algorithm for obtaining the optimal design of a CSTR process has been carried out using the above mentioned five steps. The key advantage of PSO is its computational efficiency and less parameter required to be adjusted in order to get the optimum result compared to related techniques. The proposed approach utilizes the global exploration capabilities of PSO to search for the optimal solution. The simulation results obtained by this method are described .
Sliding mode control: Sliding Mode Control (SMC) is a type of robust control design that plays an important role in the class of Variable Structure Control Systems (VSCS).A control strategy can stabilize by driving their states into a predefined sliding manifold. Once the sliding surface has been reached, the system response is insensitive to parameter uncertainties and disturbances. There are multiple incentives to improve this method, which suffers from a few shortcomings. One is the state dependency and another is the discontinuous nature of the control a win the sliding mode, which is known as chattering. Unlike mechanical systems, whose states are usually ubiquitous, recognizing all states of a chemical process is sometimes impossible and measuring the known ones is often too expensive. It seems that integrating this control algorithm and any intelligent control method (as a special case for a modelindependent control method) can result in a method that does not suffer from the afore mentioned disadvantages. One of the approaches to achieve this goal combines SMC with Fuzzy Logic Control (FLC) to develop an alternative named Fuzzy Sliding Mode Control (FSMC), (Chen and Chang, 1998)which is more efficient because of the following advantages.
It is independent of the mathematical model of the system, due to the qualitative reasoning provided by fuzzy logic. Utilizing the sliding mode concepts, one can easily create the fuzzy rule-base, which guarantees the stability and robustness of the closed-loop system.
The standard nonlinear benchmarks used by the process control research community have been used to study the performance of the proposed method for both Single Input Single Output (SISO) and MIMO nonlinear processes. The SISO benchmark consists of concentration control in the isothermal Continuous Stirred Tank Reactor (CSTR) in which a van de Vusse reaction with non-minimum phase behavior takes place. This problem has been used by various researchers including (Mudi et al., 2008;Chang, et al, 2002;Hahn and Edgar, 2001;Edward and Spurgeon, 1998) to evaluate the performance of nonlinear control methods. The benchmark used to address MIMO systems is the concentration and temperature control of a nonisothermal van de Vusse reactor which has also been used to assess performance of nonlinear control methods (Guay et al., 2005).
The main disadvantage of the SMC method is its dependence on system model. On the other hand, even if the system model is known, in order to implement SMC and have all the states be stabilized and controlled (Li and Shieh, 2000). However, these conditions are not met for most chemical processes. In order to overcome this problem, one can use the concept of SMC and FLC. This approach has been used in various engineering applications.

MATERIALS AND METHODS
To tune the PID controller for a CSTR process we have adopted different soft computing techniques like Fuzzy,SA,PSO and sliding mode adaptive techniques.MATLAB SIMULINK is used for simulation and FUZZY GUI is also utlised. The linearisation is carried out using Taylor's Series in the relevant areas.ISE and SSE are the performance indices used for optimisation.

RESULTS AND DISCUSSION
Fuzzy sliding mode control simulation: The tuning of a CSTR process is carried out by FSMC. The block diagram of Fuzzy sliding mode controller is shown in Fig.6.Here sliding mode control for obtaining the optimal tuning of the CSTR process is simulated. It is found that the development of sliding mode fuzzy logic makes the tuning of controller for CSTR process is efficient. The fuzzy sliding mode control is used to eliminate the chattering problem (Fink and Singh, 1998)and more suitable for the tuning of this non-linear process.  Fig. 7. Their corresponding output membership function is shown in Fig. 8 .The performance of the algorithm has been analyzed through computer simulation.
The development of FSMC makes the process more efficient by completely eliminating the overshoot. For the disturbance and setpoint changes shown in Fig.  9. The output response using sliding mode fuzzy logic PI control is shown in Fig. 10. The simulation results are given in Table 1. It is seen from the table that that FSMC tuned PI controller gives the better performance than conventional PI controller. The peak overshoot and chattering are completely eliminated by this method. Here SA-based PI parameter tuning for obtaining the optimal design of the CSTR process is simulated. The block diagram of SA tuning of PI controller is shown in Fig. 11. The performance of the algorithm has been analyzed in CSTR process through computer simulation. Optimal PI settings are computed by means of optimization based on the algorithm. Response of Simulated Annealing tuned PI Control for the process in shown in Fig. 12. It is seen that SA tuned PI controller is better than FLC tuned controller in various aspects like delay time, peak time, settling time, rise time and peak overshoot. The results are obtained with the following control parameters:  Fig.13. Here PSO-based PI parameter tuning for obtaining the optimal design of the CSTR process is simulated. The performance of the algorithm has been analyzed in CSTR process through computer simulation. The results are obtained with the following control parameters: Number of populations = 50 Number of variables = 2 Number of iterations = 10 Initial weight W min = 0.5 Final weight W max = 1.0 Weight factors C 1, C 2 = 1.0 Using PSO tuning the controller parameters obtained after simulation are K p = 1.1430 and K i = 1.1465. Response of PSO tuned PI Control for CSTR process in shown in Fig. 14.

CONCLUSION
We have described the tuning of controller using soft computing techniques FSMC, PSO and SA. We have developed the FSMC based PI controller. The chattering phenomena is eliminated by the induced intelligence. Results show that the performance obtained by this method is better and hence the overshoot is completely eliminated. Again this study presents another two methods tuning methods like SA and PSO, which has been tested through extensive simulation. Computer simulation was done in MATLAB. Results show that the performance factor peak overshoot is completely eliminated in FSMC and settling time is more than other methods. Further the PSO method gives better improvement in settling time with small percentage of overshoot. The SA method is inferior to PSO method. The obtained results are compared and tabulated in Table 1.
The investigation in this study reveals that PSObased tuning method is better in steady state portion and however the fuzzy tuned sliding mode PI controller implies better transient response and it,s robust nature than other methods compared here is identified as suitable controller for CSTR