AUTOMATIC TUNING OF PROPORTIONAL INTEGRAL DERIVATIVE (PID) CONTROLLER USING PARTICLE SWARM OPTIMIZATION (PSO) ALGORITHM S. J. Bassi 1, M. K. Mishra 2 and E. E. Oizegba 3 1 Deartent of Couter Engineering, University of Maidugur Borno State, Nigeria sjbassi74@yahoo.co.uk 2 Deartent of Couter Engineering, University of Maidugur Borno State, Nigeria ishrasoft1@gail.co 3 Electrical and Electronics Engineering Prograe, Abubakar Tafawa Balewa University, ABSTRACT P.M.B 0248, Bauch Bauchi State, Nigeria oizegbaee@yahoo.co.uk The roortional-integral-derivative (PID) controllers are the ost oular controllers used in industry because of their rearkable effectiveness, silicity of ileentation and broad alicability. However, anual tuning of these controllers is tie consuing, tedious and generally lead to oor erforance. This tuning which is alication secific also deteriorates with tie as a result of lant araeter changes. This aer resents an artificial intelligence (AI) ethod of article swar otiization (PSO) algorith for tuning the otial roortional-integral derivative (PID) controller araeters for industrial rocesses. This aroach has suerior features, including easy ileentation, stable convergence characteristic and good coutational efficiency over the conventional ethods. Ziegler- Nichols, tuning ethod was alied in the PID tuning and results were coared with the PSO-Based PID for otiu control. Siulation results are resented to show that the PSO-Based otiized PID controller is caable of roviding an iroved closed-loo erforance over the Ziegler- Nichols tuned PID controller Paraeters. Coared to the heuristic PID tuning ethod of Ziegler-Nichols, the roosed ethod was ore efficient in iroving the ste resonse characteristics such as, reducing the steady-states error; rise tie, settling tie and axiu overshoot in seed control of DC otor. KEYWORDS: PID Controller, Particle swar otiization algorith, Ziegler- Nichols ethod, Siulation DOI : 10.5121/ijaia.2011.2403 25
1.0 INTRODUCTION The PID controller is regarded as the workhorse of the rocess industry. Today, any industrial rocesses are controlled using roortional-integral-derivative (PID) controllers. The oularity of the PID controllers can be attributed to their good erforance in a wide range of oerating conditions, functional silicity, which allows Engineers to oerate the in a sile, straightforward anner and failiarity, with which it is erceived aongst researchers and ractitioners within the rocess control industries (Pillay and Govender, 2007). In site of its widesread use, one of its ain short-coings is that there is no efficient tuning ethod for this tye of controller (Åströ and Hägglund, 1995). Several ethods have been roosed for the tuning of PID controllers. Aong the conventional PID tuning ethods, the Ziegler Nichols ethod (Ogata, 1987) ay be the ost well known technique. For a wide range of ractical rocesses, this tuning aroach works quite well. However, soeties it does not rovide good tuning and tends to roduce a big overshoot. Therefore, this ethod usually needs retuning before alied to control industrial rocesses. To enhance the caabilities of traditional PID araeter tuning techniques, several intelligent aroaches have been suggested to irove the PID tuning, such as those using genetic algoriths (GA) (Mahony, et al, 2000; Wang and Tracht, 2003; Krishnakuar and Goldberg, 1992; Varsek, et al, 1993) and the article swar otiization (PSO) (Gaing, 2004; Solihin, et al 2011). With the advance of coutational ethods in the recent ties, otiization algoriths are often roosed to tune the control araeters in order to find an otial erforance (Gaing, 2004; Solihin, et al 2011). It has been asserted that ore than half of the industrial controllers in use today utilize PID or odified PID control schees (Ogata, 2005). This wide sread accetance of the PID controllers is largely attributed to their silicity and robust erforance in wide range of oerating conditions. One ajor roble faced in the deloyent of PID controllers is the roer tuning of gain values (Visiol 2001). Over the years, various heuristic techniques were roosed for tuning the PID controller. Aong the earliest ethods is the classical Ziegler-Nichols tuning rocedure, however, it is difficult to deterine otial or near otial araeters with this because ost industrial lants are often very colex having high order, tie delays and nonlinearities (Kwok et al., 1993, Gaing, 2004, and Krohling and Rey, 2001). This aer attets to develo an artificial intelligence(ai) autoatic PID tuning schee using PSO algorith that can autoatically acquire (or re-adat) the PID araeters during lant oeration in a routine way. The result is exected to show the effectiveness of the odern otiization such as PSO in control engineering alications. PSO algorith is a stochastic algorith based on rinciles of natural selection and search algorith. There, are any evidences of intelligence for the osed doains in anials, lants, and generally living systes. For exale, ants foraging, birds flocking, fish schooling, bacterial cheotaxis are soe of the well-known exales in category. 1.1 PID CONTROLLER TUNING METHODS The goal of tuning the PID controller is to deterine araeters that eet closed loo syste erforance secifications, and to irove the robust erforance of the control loo over a wide range of oerating conditions. Practically, it is often difficult to siultaneously achieve all 26
of these desirable qualities. For exale, if the PID controller is adjusted to rovide better transient resonse to set oint change, it usually results in a sluggish resonse when under disturbance conditions. On the other hand, if the control syste is ade robust to disturbance by choosing conservative values for the PID controller, it ay result in a slow closed loo resonse to a set oint change. A nuber of tuning techniques that take into consideration the nature of the dynaics resent within a rocess control loo have been roosed (see Ziegler and Nichols, 1942; Cohen and Coon, 1953; Åströ and Hägglund, 1984; De Paor and O Malley, 1989; Zhuang and Atherton, 1993; Venkatashankar and Chidabara, 1994; Poulin and Poerleau, 1996; Huang and Chen, 1996). All these ethods are based uon the dynaical behavior of the syste under either oen-loo or closed-loo conditions. 2.0 PROBLEM FORMULATION PID controller consists of Proortional, Integral and Derivative gains. The feedback control syste is illustrated in Fig. 1 where r, e, u, y are resectively the reference, error, controller outut and controlled variables. r(t) + - e(t) PID u DC y(t) controller Motor Figure 1: A coon feedback control syste The PID controller is described in equation (1) as: t de u( t) = K e( t) + K i e( t) dt + K d (1) dt 0 Where u t is the controller outut, e t is the error, and t is the saling instance. The factors k, k i and k d are the roortional, integral and derivatives gains (or araeters) resectively that are to be tuned. The DC otor odel is described in equation (2) as: 2 6.3223s + 18s + 12. 812 G c ( s) = (2) s Furtherore, erforance index is defined as a quantitative easure to deict the syste erforance of the designed PID controller. Using this technique an otiu syste can often be designed and a set of PID araeters in the syste can be adjusted to eet the required secification. For a PID- controlled syste, there are often four indices to deict the syste erforance: ISE, IAE, ITAE and ITSE. Therefore, for the PSO-based PID tuning, the ITAE erforance index given in equation (3) will be used as the objective function. In other word, the objective in the PSO-based otiization is to seek a set of PID araeters such that the feedback control syste has iniu erforance index. 27
3.0 TUNING OF PID CONTROLLER USING ZIEGLER NICHOLS METHOD The first ethod of Z-N tuning is based on the oen-loo ste resonse of the syste. The oenloo syste s S shaed resonse is characterized by the araeters, naely the rocess tie constant T and L. These araeters are used to deterine the controller s tuning araeters. The second ethod of Z-N tuning is closed-loo tuning ethod that requires the deterination of the ultiate gain and ultiate eriod. The ethod can be interreted as a technique of ositioning one oint on the Nyquist curve (Astro and Hagglund, 1995). This can be achieved by adjusting the controller gain (Ku) till the syste undergoes sustained oscillations (at the ultiate gain or critical gain), whilst aintaining the integral tie constant (Ti) at infinity and the derivative tie constant (Td) at zero. This aer uses the second ethod as shown in table 1. Table 1: Ziegler-Nichols oen-loo tuning rule ITAE= t e ( t ) dt 0 (3) Controller K P T I T D P PI PID L T 0 K T 3.33 L 0 0.9 L K T 2 L 1.2 0.5 L L K 4.0 OVERVIEW OF PARTICLE SWARM OPTIMIZATION (PSO) ALGORITHM PSO is otiization algorith based on evolutionary coutation technique. The basic PSO algorith is develoed fro research on swar such as fish schooling and bird flocking (Ou, & Lin,2006). After it was firstly introduced in 1995 (Kennedy & Eberhart, 1995), a odified PSO was then introduced in 1998 to irove the erforance of the original PSO algorith. A new araeter called inertia weight is added (Shi & Eberhart, 1998). This is a coonly used PSO 28
algorith where inertia weight is linearly decreasing during iteration in addition to another coon tye of PSO algorith which is reorted by Clerc (Eberhart, & Sh 2000). The later is the one used in this aer. In PSO, instead of using genetic oerators, individuals called as articles are evolved by cooeration and coetition aong theselves through generations. A article reresents a otential solution to a roble. Each article adjusts its flying according to its own flying exerience and its coanion flying exerience. Each article is treated as a oint in a D- diensional sace. The ith article is reresented as X I = ( X i!, X i2,..., X id ). The best revious osition (giving the iniu fitness value) of any article is recorded and reresented as P I = ( Pi!, Pi 2,..., PiD ), this is called best. The index of the best article aong all articles in the oulation is reresented by the sybol g, called as gbest. The velocity for the article is reresented as V I = ( Vi!, Vi2,..., ViD ). The articles are udated according to equations (4) and (5). v ( t+ 1) = w v ( t) + c rand() ( best 1 x ( t) + c 2 rand() ( gbest x ( t) ) (4) x = x + v (5) ( t+ 1) ( t) ( t+ 1) Where, c1 and c2 are two ositive constant. While rand () is rando function between 0 and 1, and n reresents iteration. Equation (4) is used to calculate article s new velocity according to its revious velocity and the distances of its current osition fro its own best exerience (osition) and the grou s best exerience. Then the article flies toward a new osition according to Equation (5). The erforance of each article is easured according to a re-defined fitness function (erforance index), which is related to the roble to be solved. Inertia weight, w is brought into the equation to balance between the global search and local search caability (Shi & Eberhart, 1998). It can be a ositive constant or even ositive linear or nonlinear function of tie. It has been also shown that PSO with different nuber of articles (swar size) has reasonably siilar erforance (Sh & Eberhart, 2001) 5.0 IMPLEMENTATION OF PSO-BASED PID TUNING Stochastic Algorith can be alied to the tuning of PID controller gains to ensure otial control erforance at noinal oerating conditions. PSO algorith is eloyed to tune PID gains/araeters (K, K Kd) using the odel in Equation (2). PSO algorith firstly roduces initial swar of articles in search sace reresented by atrix. Each article reresents a candidate solution for PID araeters where their values are set in the range of 0 to 100. For this 3-dientional roble, osition and velocity are reresented by atrices with diension of 3xSwar size. The swar size is the nuber of article where 100 are considered a lot enough. A good set of PID controller araeters can yield a good syste resonse and result in iniization of erforance index in Equation (3). 29
6.0 SIMULATION RESULTS Ileenting control design on any hysical syste involves soe lea of confidence. In this setting, we have atteted to design a controller for a dynaic odel of DC otor. A standard test odel as considered is taken for stability study of DC otor with PSO-PID tuning controller. The test odel in Fig. 1 shows the block diagra of the control syste. In the conventionally Z-N tuned PID controller, the lant resonse roduces high overshoot and long settling tie, but a better erforance obtained with the ileentation of PSO-based PID controller tuning. These are shown in Table 2. Furtherore, Fig. 2 shows the curve of the PID araeters during otiization to see the convergence of the erforance index otiized solution. The PID araeters are obtained for 100 iterations. Table 2: Otiized PID Paraeters Tuning Method K K i K d Z-N PID 30.318 39.42 12.812 PSO-PID 22.8070 2.0734 17.4628 (ITAE) 30
Figure 2: The araeters and the erforance index trajectory (PSO-PID) Coarative results for the PID controllers are given in Table 3 where the ste resonse erforance is evaluated based on the rise tie, settling tie and overshoot. The corresonding lot for the ste resonses are shown in Fig. 3. Finally, this result is only reliinary research. To further investigate the effectiveness of the roosed ethod, soe work ay be done such as: - Coarison of the PSO-PID with other artificial intelligence (AI) otiization techniques, like Genetic Algorith (GA). - Instead of PSO algorith, others otiizer such as Differential Otiization can be used. - Different objective functions other than ITAE erforance index that is already used. Figure 3: Coarison of the ste resonse for PID controllers 31
Table 3: Coarison of ZN-PID and PSO-PID for Brushless DC Motor METHOD Rise tie Settling Overshoot (%) P I D (s) tie (s) Z-N 0.307 3.44 28.1 30.3 39.4 12.8 PSO 0.418 3.17 17.4 22.8 2.1 17.5 7.0 CONCLUSION PID controllers are a widesread control solution due to their sile architecture, generally accetable control erforance and ease of use. Unlike other control otions, PID controllers do not require the user to have an extensive background in atheatics, control theory or electrical engineering to understand the. They are found in a wide variety of alications, and if roerly tuned will outerfor alost any other control otion. It is in tuning the controllers that the greatest gains in erforance ay be found. A wide variety of tuning ethods exist, although of the two discussed in this article, the PSO algorith ethod rovides the ost effective aroach to tuning a controller. It was shown, by coarison of their resonses that the PSO algorith has outerfored the Ziegler Nichols ethod in ters of the syste overshoot, settling tie and rise tie. Also the erforance index value obtained with the roosed PSO algorith is less than of the Ziegler- Nichols ethod. The erforance of the PSO algorith ethod of tuning a PID controller has been roved to be better than the heuristic Ziegler-Nichols ethod. Fro the results, the designed PID controller using PSO algorith shows suerior erforance over the traditional ethod of Ziegler-Nichols, in ters of the syste overshoot, settling tie and rise tie. However, the traditional ethod rovides us with the initial PID gain values for otial tuning. Therefore the benefit of using a odern artificial intelligence otiization aroach is observed as a coleent solution to irove the erforance of the PID controller designed by conventional ethod. Of course there are any techniques can be used as the otiization tools and PSO is one of the recent and efficient otiization tools. REFERENCES [1] A.Varsek, T. Urbacic and B. Filiic, 1993, Genetic Algoriths in Controller Design and Tuning, IEEE Trans. Sys. Man and Cyber, Vol. 23/5, 1330-1339. [2] Astro, K. J. and T., Hagglund, 1995, PID Controllers: Theory, Design and Tuning, ISA, Research Triangle, Par, NC. 32
[3] B.Nagaraj,S.Suba and B.Rariya: Tuning Algoriths for PID Controller Using Soft Couting Techniques; International Journal of Couter Science and Network Security(IJCSNS), VOL.8 No.4, Aril 2008. 278-281. [4] Clerc, M.,1999, The Swar and the queen: towards a deterinistic and adative article swar otiization. Proceedings of the Conference on Evolutionary Coutation,. 1951-1957. [5] Cohen G.H. and Coon G.A., Theoretical consideration of retarded control, Trans. ASME, Vol. 75,. 827-834, 1953 [6] Eberhart, R.C. and Sh Y.H., 2000, Coaring inertia weights and constriction factors in article swar otiization. Proc. The 2000 Congress on Evolutionary Coutation. Vol.1,. 84-88. [7] Engineering and Inforation Technology 2011 [8] Gaing, Z.L., 2004, A article swar otiization aroach for otiu design of PID controller in AVR syste. IEEE Transaction on Energy Conversion, Vol.19(2),.384-391. [9] Hugo, J. Alan, 2002, Process Controller Perforance Monitoring and Assessent, htt/www.controlartsinc.co/suort/articles/perforanceassessent.pdf. Accessed 31/6/10 [10] K Ogata, 1987, Modern Control Systes, University of Minnesota, Prentice Hall. [11] K Ogata, 2005, Modern Engineering (fifth edition), University of Minnesota, Prentice Hall. [12] K. Krishnakuar and D. E. Goldberg, 1992, Control Syste Otiization Using Genetic Algoriths, Journal of Guidance, Control and Dynaics, Vol. 15, No. 3,. 735-740. [13] Kennedy, J. and Eberhart, R.C., 1995, Particle swar otiization. Proc. IEEE International Conference on Neural Networks (Perth,Australia), IEEE Service Center, Piscataway, NJ,. IV: 1942-1948. [14] Krohling RA, Rey JP., 2001, Design of otial disturbance rejection PID controllers using genetic algorith. IEEE Trans Evol Cout;5:. 78 82. [15] Kwok,D.P.,T.P.Leung and F.Sheng, 1993, Genetic algorith for otial dynaic control of robot ars. Proceedings of the International Conference on Industrial Electronics,Control and Instruentation.15-19 Noveber,San Francisco,CA,. 380-385. [16] Mahud Iwan Solihin, Lee Fook Tack and Moey Lea Kean, Tuning of PID Controller Using Particle Swar Otiization (PSO), Proceeding of the International Conference on Advanced Science, [17] Mitsukura Y, Yaaoto T, Kaneda M., June 1999, A design of self-tuning PID controllers using a genetic algorith. In: Proc A Contr Conf, San Diego, CA,. 1361 5. [18] Nagaraj B, Subba S and Rariya B, 2005, Tuning Algorith for PID Using Soft-Couting Techniques. International Journal of Couter Science and Network Security, Vol 8, No 4 Aril,. 278 289. [19] Ou, C. and Lin, W., 2006, Coarison between PSO and GA for araeters otiization of PID controller. Proc. IEEE International Conference on Mechatronics and Autoation. Luoyang, China. 33
[20] Pillay N. and Govender P., 2007, A Particle Swar Otiization Aroach for Model Indeendent Tuning of PID Control Loo, IEEE Africon 2007, IEEE Catalog: 04CH37590C, ISBN: 0-7803-8606-X. [21] Q.Wang, P Sronck and R Tracht, 2003, An Overview of Genetic Algoriths Alied to Control Engineering Probles. Proceedings of the Second International Conference on Machine Learning and Cybernetics. [22] Qu Sun, Renhou Li and Ping and Zhang, 2003, Stable and Otial Adative Fuzzy Control of Colex Systes using Fuzzy Dynaic Model. Fuzzy Sets and Systes, No 133. 1 17. [23] Rasussen H., 2002, Autoatic Tuning of PID Regulator. htt://www.volgas.dk/nores/auto.df downloaded 30/6/10. [24] Sche Tor Steiner, 1994, Autoatic Tuning of PID Controllers Based on Transfer Function Estiation, Autoatica,.. 1983 1989. [25] Seng TL, Khalid MB, Yusof R., 1999, Tuning of a neuro-fuzzy controller by genetic algorith. IEEE Trans Syst Man Cybern B,29,. 226 36. [26] Sh Y.H. and Eberhart, R.C., 1998, A odified article swar otiizer. IEEE International Conference on Evolutionary Coutation, Anchorage, Alaska. [27] Sh Y.H. and Eberhart, R.C., 2001, Fuzzy Adative Particle Swar Otiization. Proc. Congress on Evolutionary Coutation. Seoul,Korea. [28] T. O.Mahony, C J Downing and K Fatla, 2000, Genetic Algorith for PID Paraeter Otiization: Miniizing Error Criteria, Process Control and Instruentation, University of Stracthclyde,. 148-153. [29] Visioli A., 2001, Tuning of PID controllers with fuzzy logic. Proc Inst Elect Eng Contr Theory Al, 148(1),. 1 8. [30] Zhong Jinghua,2006, PID Controller Tuning: A Short Tutorial, htt://saba.kntu.ac.ir/eecd/d/download/pidtutorial.df downloaded 1/7/2010 34