You are on page 1of 8

Hybrid PSO - Bacterial Foraging Based Intelligent PI Controller Tuning for pH Process

G. Petchinathan, G. Saravanakumar, K. Valarmathi, and D. Devaraj


Kalasalingam Academy of Research and Education, Krishnankoil, Tamilnadu, India gpetchi@gmail.com

Abstract. The control of pH process is a difficult problem due to its inherent nonlinearity and time-varying characteristics. For the pH process, Proportional Integral (PI) control has been successfully used for many years. Tuning of the PI controller is necessary for the satisfactory operation of the system. This paper proposes a hybrid approach involving Bacterial Foraging Optimization (BFO) Algorithm and Particle Swarm Optimization (PSO) algorithm for determining the optimal proportional-Integral (PI) controller parameters for control of a pH Process. The BFO algorithm depends on random search directions which may lead to delay in reaching the global solution. The PSO may lead to possible entrapment in local minimum solutions. The proposed hybrid approach has stable convergence characteristic and good computational efficiency. Simulation results clearly illustrate that the proposed approach is very efficient in improving the step response characteristics such as, reducing the Mean Square Error (MSE), rise time and settling in control of a pH process. Keywords: pH Process, PI controller, PSO-BFO algorithm, Mean Square Error, Settling Time.

1 Introduction
Over the last 50 years, many ways have been developed to determine PI controller parameters for stable processes suitable for auto tuning and adaptive control [14]. Such tuning uses only a small amount of information about the systems dynamic behavior and often does not provide good tuning. Ant Colony Optimization (ACO) was introduced around 1991-1992 by M. Dorigo and colleagues as a novel natureinspired metaheuristic for the solution of hard combinatorial optimization problems [5]. Farooq et al [6] developed a bee inspired algorithm for routing in telecommunication network. Swarming strategies in bird flocking and fish schooling are used in the Particle Swarm Optimization (PSO) introduced by Eberhart and Kennedy and it is easy to implement and there are few parameters to adjust and this algorithm has been successfully applied in many areas [7]. A relatively newer evolutionary computation algorithm called Bacterial Foraging scheme has been proposed and introduced recently by K. M. Passino [8]. This algorithm inspired by the behavior of Escherichia Coli (E. Coli) bacteria normally lives inside the intestines where it helps the body to break down and digest the food. In this paper, the use of
S.C. Satapathy et al. (Eds.): Proceedings of the InConINDIA 2012, AISC 132, pp. 515522. Springer-Verlag Berlin Heidelberg 2012 springerlink.com

516

G. Petchinathan et al.

both PSO and E. coli based BFO algorithms for tuning of PI controller is investigated in control of pH process. A proposed approach that combines the above mentioned optimization algorithms.

2 pH Process Modeling
The pH is the measurement of the acidity or alkalinity of a solution. The pH process consists of neutralization of two monoprotic reagents of a weak acid and a strong base. The model of the pH neutralization process used in this work follows that proposed by McAvoy et al. [9], [10] and is shown in Fig. 1. Assumption of perfect mixing is general in the modeling of pH processes. Material balances in the reactor can be given by
V dxa = FaCa Fa + Fb X a dt dx b dt = Fb C b Fa + Fb X b

(1) (2)

Where Fa is the flow rate of the influent stream, Fb is the flow rate of the titrating stream, C a is the concentration of the influent stream, Cb is the concentration of the titrating stream, x a is the concentration of the acid solution, xb is the concentration of the basic solution and V is the volume of the mixture in the CSTR.
Fa,Ca Process Stream Fb,Cb Titration Stream

Effluent Stream Fa + Fb Xa, Xb

Fig. 1. pH neutralization Process

3 Particle Swarm Optimization (PSO)


The PSO method is a member of wide category of Swarm Intelligence methods for solving the optimization problems. It is a population based search algorithm where each individual is referred to as particle and represents a candidate solution [7], [11]. In PSO each particles strive to improve themselves by imitating traits from their successful peers. [12].Each particle has a position represented by a position-vector X ki where (i is the index of the particle), and a velocity represented by a velocity

Hybrid PSO - Bacterial Foraging Based Intelligent PI Controller Tuning for pH Process

517

i vector Vki . Each particle remembers its own best position PLbest The best position
i vector among the swarm then stored in a vector PGlobal . During the iteration time k, the update of the velocity from the previous velocity to the new velocity is determined by.
i i Vki+1 = Vki + C1 R1 ( PLbest X ki ) + C 2 R2 ( PGlobal X ki )

(3)

The new position is then determined by the sum of the previous position and the new velocity.
X ki +1 = X ki + Vki+1

(4)

A particle decides where to move next, considering its own experience, which is the memory of its best past position, and the experience of the most successful particle in the swarm.

4 Bacterial Foraging Optimization (BFO)


In foraging theory, it is assumed that the objective of the animals is to search for and obtain nutrients in such a fashion that the energy intake per unit time is maximized [12]. The foraging behavior of E. coli bacteria present in our intestines, which includes the methods of locating, handling and ingesting food, has been successfully mimicked to propose a new evolutionary optimization algorithm [8] ,[13]. This optimization procedure comprises of four basic steps: a) chemotaxis, b) swarming, c) reproduction and d) elimination and dispersal. The objective will be to try and implement a biased random walk for each bacterium where it will try to climb up the nutrient concentration and try and avoid noxious substances and will attempt to leave a neutral environment as soon as possible.

5 PSO Based Bacterial Foraging Optimization (PSO-BFO)


PSO based BFO combines both PSO and BFO algorithms [14]. This combination aims to make use of PSO ability to exchange social information and BFO ability in finding a new solution by elimination and dispersal. For initialization, the user selects S, Ns, Nc, Nre, Ned, Ped, C1, C2, R1, R2 and c(i), i= i 1, 2..S. Also initialize the position Pn , i = 1,2.......S . and velocity randomly initialized. Fig.2 shows the flow chart for PSO based BFO algorithm. Initially, j =k =ell=0 and Initialize parameters n, S, Ns, Nc, Nre, Ned, Ped, C1, C2, R1, R2 and c(i), i= 1, 2..S. and Delta as shown in table 2.

6 PI Controller Tuning by BFO, PSO and PSO-BFO


The controller tuning is actually required to reduce the Mean Square Error, overshoot and settling time in step response of the pH process. Hence by using the proportional and integral (PI) controllers above stated can be easily achieved.

518

G. Petchinathan et al.

START

Generation of Initial search if ell > Ned Termination

Elimination and Dispersal loop (ell)

Reproduction loop (k)

if k > Nre

Go to Next Elimination

Chemotaxis loop (j)

if j > Nc

Go to Next Reproduction

Evaluation of search point

if better cost New Delta by PSO

New Delta by PSO Tumble

Swim until low cost

Fig. 2. Flow chart for PSO based BFO Algorithm

pH set

PI
Controller

F
b

pH Process

pH

Fig. 3. Block Diagram of a pH process with PI controllers

Attempt has been made to achieve globally minimal Mean square error criteria in the step response of a pH process which is cascaded with PID controller by tuning the KP proportional gain and Ki integral gain values. In the transfer function of the controller stated as

G C (s) = K P + ( K i s )

(5)

Fig. 3 shows closed loop of pH process with PI controller. This section presents the details of the design of PI controller for the pH process. First the GA, BFO and PSO algorithms were applied to design the PI controller for a simulated pH process. Then proposed hybrid PSO based BFO algorithm was applied to design the PI controller for a simulated pH process. The implementation of this hybrid algorithm was written in MATLAB and executed on a PC with Pentium duo core processor. The pH process was simulated based on the Equations (1) and (2) using MATLAB simulink with the model parameters for the experimental system which is tabulated in Table.3. Fig.4 shows simulink diagram for step response of pH model with PI controller. Step signal is used as the input to the system.

Hybrid PSO - Bacterial Foraging Based Intelligent PI Controller Tuning for pH Process

519

Fig. 4. Simulink diagram for step response of pH process with PI controller

The GA, BFO, PSO and PSO-BFO algorithms are implemented to find the optimal parameters of the controller. The output of PI controller was used to control the pH process by manipulating the base flow (Fb) and acid flow (Fa) is kept constant. The objective function in control of pH process is to minimization of Mean square error (MSE). The performance of the GA, BFO, PSO and PSO-BFO algorithms are evaluated with constant values of initial parameters mentioned in the table 2.
Table 1. Comparision of different tuning methods

pH

Fa
0.192

Type
GA BFO PSO PSO - BFO GA BFO PSO PSO - BFO GA BFO PSO PSO - BFO GA BFO PSO PSO - BFO GA BFO PSO PSO - BFO GA BFO PSO PSO - BFO

Kp
9 8.8289 72.972 103.51 9.677 8.791 134.2 246.54 1.1624 5.411 5.6113 0.2996 1.129 2.97 1.7490 0.2743 12 4.225 267.93 38.37 12 6.002 50.5877 44.542

Ki
8 3.7389 11.525 4.3212 9.01 9.653 24.478 4.2437 11.764 1.38 53.329 1.9352 11.764 7.45 0.7217 2.0024 9 2.202 68.544 0.0573 8.5405 7.018 0.56357 0.1826

MSE
3.75e-2 4.30 e-3 2.36e-2 2.87e-3 4.51e-2 4.87 e-3 3.574e-2 1.996e-3 4.65e-2 1.714e-2 2.97e-2 2.536e-3 1.038e-2 2.26e-3 2.13e-3 1.95e-3 1.05e-1 2.53 e-1 8.09 e-2 7.316e-2 1.06e-1 2.615 e-1 9.354e-2 4.507e-2

5 0.288

0.192 7 0.288

0.192 11 0.288

520

G. Petchinathan et al. Table 2. Parameters value of each algorithms

Parameter

Symbol

No. of bacteria in the population Dimension of search space Maximum no. of swim length No. of Chemotatic steps No. of reproductive steps No. of elimination dispersal events Elimination dispersal probability Step size Cognitive factor Social acceleration factors Momentum/ Inertia Cross over probability Mutation probability

S n Ns Nc Nre Ned Ped C(i) C1 C2 w Pc Pm

PSO BFO 10 2 4 20 2

BFO

PSO

GA

50 2 4 50 2 2 0.25 0.05 ------

50 2 -50 ----1.2 0.12 0.9 ---

2 0.25 0.5 1.2 0.5 0.9 ---

10 --30 -------0.8 0.08

Table 3. Model parameters for the pH process

Parameter

Description

Value

V Fa Fb Ca Cb

Volume of the Continuous Stirred Tank Reactor Flow rate of the influent stream Flow rate of the titrating stream Concentration of the influent stream Concentration of the titrating stream

7.4l lit 0.24 l min-l 0-0.8 l min-1 0.2 g mol l-1 0.1 g mol 1-1

In order to examine the effectiveness of the proposed control scheme, simulations are carried out in different cases, e.g. in different set points of pH value (5, 7 and 11) and for different influent stream flow rate (Fa). For simulation Fa value is taken as 20 percent deviation from the value mention in the table 3(Fa=0.192 and 0.288). In this paper, the results of the proposed hybrid PSO BFO algorithm is compared with the results of a GA, BFO and PSO algorithms as shown in table1. Fig. 5, Fig.7 and Fig. 9 shows the step response of pH process with acid flow rate Fa=0.192 for set point of pH=5,7and 11 respectively. Fig. 6, Fig.8 and Fig. 10 shows the step response of pH process with acid flow rate Fa=0.288 for set point of pH=5,7and11 respectively. In all the cases of step response PSO-BFO results s lower value of MSE and settling time compared with other optimization methods. Overshoot in step response for all the cases are almost zero.

Hybrid PSO - Bacterial Foraging Based Intelligent PI Controller Tuning for pH Process

521

Fig. 5. Step response of pH process for a step input pH = 5 and Fa=0.192

Fig. 6. Step response of pH process for a step input pH = 5 and Fa=0.288

Fig. 7. Step response of pH process for a step input pH = 7 and Fa=0.192

Fig. 8. Step response of pH process for a step input pH = 7 and Fa=0.288

Fig. 9. Step response of pH process for a step input pH = 11 and Fa=0.192

Fig. 10. Step response of pH process for a step input pH = 11 and Fa=0.288

522

G. Petchinathan et al.

7 Conclusion
In this proposed work, the optimal parameters of the PI controller at each pH region are computed by using hybrid PSO based BFO algorithm. This algorithm combines PSO and BFO techniques to make use of exchange social information ability of PSO and elimination and dispersal ability of BFO in finding a new solution. From the simulation results (Fig. 5-10 and Table. 1) the PSO based BFO tuned PI controller has minimum MSE and settling time compared with BFO, PSO and GA.

References
1. ACPA, Special Issue on Advance in PID control. Asian Journal of Control 4(4) (2002) 2. Astrom, K.J., Hagglund, T.: The Future of PID Control. IFAC J. Control Engineering Practice 9, 11631175 (2001) 3. Xu, J.X., Liu, C., Hang, C.C.: Tuning of Fuzzy PI Controllers Based on Gain/Phase Margin Specifications and ITAE Index. ISA Transactions 35, 7991 (1996) 4. Zhung, M., Atherton, D.P.: Automatic Tuning of Optimum PID Controllers. IEE Proc. D, Control Theory and Applications 140(3), 216224 (1993) 5. Dorigo, Blum: Ant Colony Optimization Theory: A survey. TCS: Theoretical Computer Science 345 (2005) 6. Farooq, M.: From the Wisdom of the Hive to Intelligent Routing in Telecommunication Networks, February 01 (2006) 7. Kennedy, J., Eberhart, R.C.: Particle Swarm Optimization. In: Proc. of the IEEE Int. Conf. on Neural Networks, pp. 19421948. IEEE Service Center, Piscataway (1995) 8. Passino, K.M.: Biomimicry of Bacterial Foraging for Distributed Optimization and Control. IEEE Control Systems Magazine 22(3), 5267 (2002) 9. McAvoy, T.J., Hsu, E.: Dynamics of pH in controlled stirred tank reactor. Ind. Eng. Chem. Process Des. Dev. 68, 114120 (1972) 10. Valarmathi, K., Devaraj, D., Radhakrishnan, T.K.: Adaptive Enhanced Genetic Algorithm-Based Proportional Integral Controller Tuning for pH Process. Taylor and Francis-Instrumentation Science & Technology 35(6), 619635 (2007) 11. Eberhart, R.C.: Computational Intelligence: A Perspective. In: Evolutionary Programming, pp. 239245 (1996) 12. Panda, S., Padhy, N.P.: Comparison of Particle Swarm Optimization and Genetic Algorithm for TCSC-based Controller Design. Int. Journal of Computer Science and Engineering 1(1), 4149 (2007) 13. Kim, D.H., Cho, J.H.: Robust Tuning of PID Controller Using Bacterial-Foraging-Based Optimization. Journal of Advanced Computational Intelligence and Intelligent Informatics 9(6), 669676 (2005) 14. Korani, W.M.: Bacterial Foraging Oriented by Particle Swarm Optimization Strategy for PID Tuning. In: Proceedings of the GECCO Conference Companion on Genetic and Evolutionary Computation (2008) ISBN: 978-1-60558-131-6

You might also like