Optimal Tuning of PID Controllers Using Artificial Bee ... - IEEE Xplore

49 downloads 0 Views 107KB Size Report
Algorithm. Mahdi Abachizadeh, Mohammad Reza Haeri Yazdi and Aghil Yousefi-Koma. School of Mechanical Engineering. University of Tehran. Tehran, Iran.
2010 IEEE/ASME International Conference on Advanced Intelligent Mechatronics Montréal, Canada, July 6-9, 2010

Optimal Tuning of PID Controllers Using Artificial Bee Colony Algorithm Mahdi Abachizadeh, Mohammad Reza Haeri Yazdi and Aghil Yousefi-Koma School of Mechanical Engineering University of Tehran Tehran, Iran [email protected], [email protected], [email protected] Evolutionary programming (EP) algorithm was employed by Chang and Yan [8] who compared their method for a fourth order system with delay with many other tuning approaches. Similarly, Bagis [9] used modified genetic algorithm to find the optimum PID parameters and compared the results with fuzzy and classic methods. Bee-based algorithms are novel methods in engineering optimization and there are few works in the field of control and electrical engineering. In this paper, Artificial Bee Colony (ABC) algorithm is employed to optimize simulation benchmarks presented in [8-9]. Comprehensive evaluations reported in these two papers by means of several methods make it possible to assess the efficiency of this algorithm.

Abstract— In this paper, an efficient method based on Artificial Bee Colony (ABC) metaheuristic is implemented for tuning PID controllers. Considering performance indices presented in the literature, benchmark plants of different orders and time delays are controlled by PID controllers with optimum gains. Results clearly demonstrate that the employed method has outperformed other techniques such as fuzzy modeling and genetic algorithm resulting in designs with minimum error, overshoot and settling time. Keywords - pid tuning; Artificial Bee Colony algorithm; error minimization

I.

INTRODUCTION

II.

In the presence of modern controllers, proportionalintegral-derivative (PID) controllers are still widely used in many industrial processes. This is mainly because PID controllers are simple in architecture and are easily tuned. In addition, they have shown robust, reliable, efficient and costeffective performance for most applications. To implement these controllers, three parameters which are the proportional, integral and derivative gains should be tuned to provide stable response as well as minimum error while tracking the input. The tuning methods of Ziegler-Nichols (Z-N) [1] and Cohen-Coon (C-C) [2] are two classic approaches which have been used for years especially when no or little information about the plant under control is provided. They grant stable and robust systems but the gains are never guaranteed for being optimal. Also, the conventional tuning methods sometimes fail to achieve satisfactory performance when the plants are nonlinear, of high order or have time delay. Hence, other approaches have been introduced to enhance the preliminary tuning obtained by classic ones. Fuzzy techniques besides optimization approaches and neural networks as well as hybrid methods are the main tools which have been proposed in the last two decades. Ghoshal Optimized PID gains using Particle swarm optimization in a fuzzy environment [3]. Also, Zhao et al. proposed a fuzzy rule-based scheme for gain scheduling of PID controllers [4]. Visioli presented another study using fuzzy logic based set-point weighting [5]. Using neural networks, Wu et al. tuned PID controllers by means of fuzzy parameters [6]. GA based multi-objective PID control of a linear brushless DC motor was performed by Lin et al. [7].

978-1-4244-8030-2/10/$26.00 ©2010 IEEE

OVERVIEW OF PID CONTROLLERS

A PID controller is a combination of a proportional, an integral and a derivative controller, integrating the main features of all three. Fig. 1 demonstrates a simplified block diagram of a plant controlled by a PID. The output of a PID controller, which is the processed error signal, can be presented as: t



u (t )

³

K p e(t )  K i e(t )dt  K d 0

d e(t )    dt

where Kp, Ki and Kd are the proportional, integral and derivative gains, respectively. r(t)

+

e(t)

-

PID Controller

u(t)

Plant

y(t)

Figure 1. A plant controlled by a PID controller

In general, the objective of PID controllers like any other controller is to provide stability as well as reference tracking and disturbance rejection, which are all design criteria related to steady domain of response. Different indices have been suggested to evaluate the performance of a controller based on the above objectives. The most common ones are the integrated absolute error (IAE), integrated squared error (ISE), integrated time squared error (ITSE), and integrated

379

time absolute error (ITAE). These indices are normally calculated under step testing input in the time domain as:

features of most bee algorithms [12]. Teodorovic has also proposed Bee Colony Optimization (BCO) metaheuristic and applied it to transportation problems [13]. For optimization in continuous domains, Yang developed f f a method called Virtual Bee Algorithm (VBA) which was IAE r (t )  y (t ) dt e(t ) dt applied to optimize benchmark functions with maximum dimension of two [14]. The Bees Algorithm (BA) by Pham 0 0 f et al. is a promising technique similar to ABC, originally introduced in 2005 [15]. It was later applied to various ISE e 2 (t )dt problems such as machine jobs scheduling, tuning fuzzy 0    logic controllers for a robot gymnast [16], data clustering,  f and multi-objective optimization of engineering problems. ITSE te 2 (t )dt Artificial Bee Colony (ABC) algorithm, the method 0 employed in this paper, was presented by Karaboga in 2005 f to optimize numeric benchmark functions [17]. It was then ITAE t e(t ) dt extended by Karaboga and Basturk and showed to outperform other recognized heuristic methods such as GA 0 [18] as well as DE, PSO and EA [19]. In addition, it has been Obviously as they all represent the concept of error; successfully applied on constrained optimization problems, minimization of these indices is desired. neural networks [20], and for designing IIR filters [21]. For the transient domain of response, maximum B. Algorithm Description overshoot (OS), settling time (ts) and rise time (tr) are normally considered significant where the benefit of faster Similar to other nature-based algorithms, ABC models systems, necessitates minimum possible values for them. honey bees but not necessarily precisely. In this model, the For tuning PID controllers that is finding the optimum honey bees are categorized as employed, onlooker and scout. gains for the best performance, one or a weighted An employed bee is a forager associated with a certain food combination of these criteria is employed. While weights and source which she is currently exploiting. She memorizes the number of indices are diversely reported in the literature, it is quality of the food source and then after returning to the generally accepted that time weighted indices are more hive, shares it with other bees waiting there via a peculiar appropriate as the errors occurring later in the transient communication called waggle dance. response are penalized heavily. In this paper, selection of any An onlooker bee is an unemployed bee at the hive which of these criteria has been constrained by benchmark tries to find a new food source using the information problems, though ITSE index is calculated and reported provided by employed bees. A scout, ignoring the other’s independently to make comparisons more sensible. information, searches around the hive randomly. In nature, the recruitment of unemployed bees happens in III. ARTIFICIAL BEE COLONY (ABC) METHOD a nearly similar way. In addition, when the quality of a food source is below a certain level, it will be abandoned to make A. Introduction the bees explore for new food sources. Natural behavior of bees and their collective activities in In ABC, the solution candidates are modeled as food their hives has been fascinating researchers for centuries. sources and their corresponding objective functions as the Recently, the studies focused on swarm intelligence followed quality (nectar amount) of the food source. For the first step, by developing swarm optimization methods have the artificial employed bees are randomly scattered in the unbelievably extended our knowledge about animal societies search domain producing SN initial solutions. Here, SN especially insect colonies. Ants, termites, wasps and bees are represents the number of employed or onlooker bees which the most important social insects inspiring efficient problemare considered equal until the end of algorithm. It is notable solving algorithms [10, 11]. that any of these solutions xi (i=1, 2…, SN) is a DSeveral algorithms have been proposed based on the dimensional vector representing D design variables foraging behavior of bees and unlike other metaheuristics constructing the objective function. where there is a unique original paper on which other After this initialization, the main loop of the algorithm improvement are based; in bee methods, these versions have described hereafter is repeated for a predetermined number been independently proposed and developed. of cycles or until a termination criterion is satisfied. Regarding combinatorial optimization, the works of First, all employed bees attempt to find new solutions in Tereshko are leading. He and his colleagues modeled robots the neighbor of the solution (food source) they memorized at as bees having limited intelligence individually, but their the previous cycle. If the quality (the amount of objective cooperative behavior makes real robotic tasks possible. They function) is higher at this new solution, then she forgets the also introduced significant task allocation in bee-based former and memorizes the new one. In ABC, a particular models including employed and unemployed bees. mechanism is devised for this purpose which only allows one Regarding food sources, the modes of recruitment to and of the dimensions of the current solution being subjected to abandonment from is established, which are the main modification:

³

³

³

³

³

380



vij

xij  Iij ( xij  x kj ) 

 

pi

fit i



SN

¦ fit

SIMULATION RESULTS

A. Test Problems 1 and 2 The two processes mentioned below are taken from [9] which are of different orders of 3 and 4, respectively.

where j  ^1,2,, D` and k  ^1,2,, SN ` are randomly chosen indices. It should be noted that k z i . The parameter I is also a random number in the domain [-1, 1]. After that, the onlooker bees should select the solution around which they explore for new food sources. This is performed probabilistically i.e. a mechanism like roulette wheel is employed using the fitness (the related objective function or a similar concept) of all current solutions. With the help of a uniform random number generator, the solutions for further exploration can be easily determined:



IV.

G1 ( s)

 G2 ( s )

4.228 ( s  0.5)(s 2  1.64s  8.456)    27 ( s  1)(s  3) 3

The objective function for minimization is defined as the weighted sum of integrated squared error (ISE), response overshoot (OS) in percent, and the 5 percent settling time (ts)   for the step input as follows [9]:

n



n 1

Noticeably, some onlooker bees might be directed to search around identical solutions. When the solutions are selected, producing new candidate solutions around them is done the same way employed bees perform using (3). Additionally, updating food sources is done with the same greedy process by comparing the new solutions produced by onlookers and the corresponding current solutions. It is notable that different approaches have been proposed for assigning fitness to solutions especially when minimization is to be done with an originally maximizing algorithm such as ABC or when negative values of objective function is engaged. Karaboga [22] has utilized a familiar form described below which is adopted in this paper as well.

f

10( ISE )  3(t s )  (OS )   

In [9], a population size of 20 and a maximum generation of 100 are used for the genetic algorithm. Therefore, hive population of 20 (10 of each employed and onlooker) bees and maximum iteration of 100 is considered. The search domain for PID gains which are the design variables here is [0.1, 5]. To implement the algorithm, D=3 is assigned to represent three design variables Kp, Ki and Kd as PID gains. The indices employed in (8) are computed based on a modelbased response analysis of the processes using MATLAB®. The results obtained by ABC and the other available methods in the literature are summarized in Table I. In addition, the step response of both systems G1 and G2 using PID controllers tuned by Z-N [9], MGA [9] and ABC are demonstrated in Fig 2. Clearly, ABC has outperformed the ­ 1 best available solutions obtained by MGA and for both fi t 0 °1  f fiti ®     processes G1 and G2, an improvement of about 13% is i achieved. In addition, it is noticeable that the optimal gains °1  f fi  0 i obtained by ABC are not in the neighborhood of the ones ¯ reported by MGA. This proves that ABC has been well equipped not to trap in local optima though the optimization where f i is the objective function of solution xi . problem is not constrained and the problem space is convex. If a solution can not be improved by employed or The additional ITSE index reported here also highlights the onlooker bees after certain iterations called limit, then the performance of ABC against other methods. Furthermore, solution is abandoned and the bee becomes a scout. In that having a look on the amounts of ISE, OS and ts, it is case, the scout bee searches randomly for a new solution observed that except for the case of overshoot in G2, ABC within the search space. It should be reminded that at each has reduced them independently which is of importance from cycle, only one artificial bee is allowed to become scout and the designing point of view. To complete the analysis on perform the search as follows: tuned PID controllers, it is necessary to discuss amplitude of control signals. The obtained results confirm that the orders j j j j xi xmin  M ( xmax  x min )     of amplitude of signals are limited and quite the same. As no further information about the physical aspects of the controlled processes is available, it is not possible to evaluate where M is a random number in domain [0, 1]. Obviously, any boundaries for the maximum allowable amplitude of variables of all dimensions are replaced with new randomlycontrol signals in any of test problems. Finally, it is notable generated values. that the step response of G2 tuned by ABC exhibits an undershoot of about 42%. Although undershoot is generally considered a minor parameter, it might be important in a certain plant. Anyway, the problem formulation does not include undershoot in this paper.

381

TABLE I.

OPTIMIZED PID GAINS AND CORESSPONDING PERFORMANCE INDICES FOR PROCESSES G1 AND G2

Process

Index

Z-N [9] 2.19 2.126 0.565 0.231 0.526 5.45 17 38.61 3.072 2.272 1.038 0.331 0.628 3.722 32.8 50.246

Kp Ki Kd ITSE

G1

ISE ts (±5%) OS (%) f Kp Ki Kd ITSE

G2

ISE ts (±5%) OS (%) f

Kitamori [4] 2.357 1.429 0.976 0.219 0.596 2.3 10.9 23.760

Fuzzy [4] 0.533 5.01 6.1 26.46 0.537 2.632 1.9 15.166

MGA [9] 1.637 0.965 0.388 0.344 0.664 2.89 3.4 18.71 1.772 1.061 0.773 0.283 0.68 1.65 0.16 11.91

ABC 2.766 1.263 2.415 0.266 0.399 3.45 1.938 16.28 2.141 1.248 1.145 0.202 0.574 1.34 0.599 10.36

The sign “-“ indicates that the results are not reported in the literature 1.4

1.4 Z-N MGA ABC

1.2

1

1

0.8

0.8

0.6

0.6

0.4

0.4

0.2

0.2

0

0

2

4

6

8

10

12

14

Z-N MGA ABC

1.2

0

16

0

2

4

6

8

10

12

14

16

Figure 2. Step response of processes G1 (left) and G2 (right) having PID controllers tuned by Z-N, MGA and ABC

population of 20 are considered. The search space is also assigned [0, 5] for all three gains. In Table II, the results obtained by ABC are presented versus those obtained by evolutionary programming (EP) and GA (the bests so far) and some other approaches including Ziegler-Nichols (Z-N), fuzzy gain scheduling (FGS), fuzzy set-point weighting (FSW), incremental fuzzy 0.1s expert (IFE) as well as two further techniques; a fuzzy based e    method called SSP and a method based on optimizing setG3 ( s )  (1  s )(1  0.5s )(1  0.25s )(1  0.125s ) point weights called Fix b. ABC has been able to improve the results noticeably. While all the other error indices of Unlike the previous problems, the tuning progression is IAE are above 1, ABC has found the optimum with the defined single-objective with only IAE being the objective function equal to 0.74 which is a 30% decrease performance index. For conformity, the optimization settings with respect to the best available solution. are taken from [8]. Hence, maximum 120 iterations with hive The EP optimum gains and performance criteria reported in [8] and the ones obtained by ABC are comprehensively B. Test Problem 3 The other test problem is a process taken from [8] being of more complex nature due to its time delay which makes it more intricate for the optimization procedure to find the optimum.

382

presented in Table 3. In addition, the step response of the system with PID controllers tuned by both is illustrated in Fig. 3. It is clearly shown that not only the IAE index is improved but also all the other significant indices of ITSE, ISE, overshoot and settling time have been improved as well TABLE II. Tuning Method IAE Index TABLE III.

which confirms the efficiency of the employed method against other tuning approaches. Finally, the convergence history of IAE as the objective function is illustrated in Fig. 4. It is clear that only 17 out of 100 iterations has been sufficient to find the optimum indicating that the algorithm is as fast as it is efficient.

MINIMUM IAE INDEX OBTAINED BY DIFFERENT APPROACHES FOR PROCESS G3

Z-N

FGS

FSW

SSP

Fix b

IFE

EP

GA

ABC

1.59

1.31

1.30

1.29

1.25

1.22

1.06

1.05

0.74

OPTIMIZED GAINS AND PEROFORMANCE INDICES FOR PROCESS G3 OBTAINED BY EP AND ABC

Method

Kp

Ki

Kd

IAE

ISE

ITSE

ts (±5%)

OS (%)

EP [8]

3.19 2.75

1.03 1.64

1.51 1.65

1064 0.744

0.530 0.491

0.244 0.148

4.72 2.53

12.13 9.44

ABC

1.2

1.2 1.15

1 1.1 1.05

EP ABC

0.8

IAE

1 0.6

0.95 0.9

0.4 0.85 0.8 0.2 0.75 0 0

2

4

6

8

10

12

0.7

14

Figure 3. Step response of process G3 with PID tuned by EP and ABC

REFERENCES

[2] [3]

30

40

50 60 Iterataion

70

80

90

100

Z. Y. Zhao, M. Tumizoka, and S. Isaka, “Fuzzuy gain scheduling of PID controllers,” IEEE Trans. Syst. Man. Cybern., vol. 23, no. 5, pp. 1392-1398, 1993. [5] A. Visioli, “Fuzzy logic based set-point weighting for PID controllers,” IEEE Trans. Syst. Man. Cybern. A., vol. 29, no. 6, pp. 587-592, 1999. [6] C. J. Wu, G. Y. Liu, M. Y. Cheng, and T. L. Lee, “A neuralnetwork-based method for fuzzy parameter tuning of PID controllers,” J. Chinese Ins. Eng., vol. 25, no. 3, pp. 265-276, 2002. [7] C. Lin, H. Jan, and N. Shieh, “ GA-based multiobjective PID control for a linear brushless motor,” IEEE/ASME Trans. Mech., vol. 8, pp. 56-65, 2003. [8] W. D. Chang and J. J. Yan, “Optimum setting of PID controllers based on using evolutionary programming algorithm,” J. Chinese Ins. Eng., vol. 27, no. 3, pp. 439-442, 2004. [9] A. Bagis, “Determination of the PID controller parameters by modified genetic algorithm for improved peformance,” J. Inform. Sci. Tech., vol. 23, pp. 1469-1480, 2007. [10] E. Bonabeau, M. Dorigo, and G. Theraulaz, Swarm Intelligence: From Natural to Artificial Systems, New York: Oxford university Press, 1999. [11] M. Dorigo and T. Stutzle, Ant Colony Optimization, MIT, Cambridge, 2004. [12] V. Tereshko and A. Leongarov, “Collective decision-making in honey bee foraging dynamics,” Comput. Inform. Syst. J., vol. 9, no. 3, 2005.

CONCLUSIONS

Artificial Bee Colony (ABC) algorithm was employed to tune PID controllers for plants of high order and with time delay. The method optimized PID gains as design variables in both single- and multi-objective approaches. The objective functions taken from literature were important performance indices of ITSE, ISE and IAE as well as overshoot and settling time. Results clearly expressed that the utilized method has been successful in comparison to genetic algorithm, evolutionary programming (EP), fuzzy rule-based approaches and some other techniques; and can be considered as a powerful tuning scheme for controllers.

[1]

20

Figure 4. Convergence history of ABC algorithm during tuning process G3

[4]

V.

10

J. G. Ziegler and N. B. Nichols, “Optimum setting for Automatic Controllers,” ASME Trans., vol. 64, pp. 759-768, 1942. G. H. Cohen and G. A. Coon, “Theoretical investigation of retarded control,” ASME Trans., vol. 75, pp. 827-834, 1953. S. P. Ghoshal, “Optimization of PID gains by particle swarm optimizations in fuzzy based automatic generation control,” Electr. Pow. Syst. Res., vol. 72, pp.203-212, 2004.

383

[13]

[14] [15]

[16]

[17]

[18]

D. Teodorovic, “Transport modelling by multi-agent systems: a swarm intelligence approach,” Transport. Plan. Tech., vol. 26. no. 4, 289-312, 2003. X. S. Yang, “Engineering optimization via nature-based virtual bee algorithm,” LNCS, vol. 3562, pp. 317-323, 2005. D. T. Pham, A. Ghanbarzadeh, E. Koc, S. Otri, S. Rahim, and M. Zaidi, “the bees algorithm,” Technical report, Manufacturing Engineering Centre, Cardiff University, UK, 2005. D. T. Pham, A. Haj Darwish, E. E. Eldukhri, S. Otri, “Using bees algorithm to tune a fuzzy logic controller for a robot gymnast,” Proc. IPROMS 2007. D. Karaboga, “An idea based on honey bee swarm for numerical optimization,” Technical report, Erciyes University, Turkey, 2005.

[19]

[20]

[21] [22]

384

B. Basturk, D. Karaboga, “An artificial bee colony (ABC) algorithm for numeric function optimization,” IEEE Symp. Swarm Intelligence, May 2006, Indianapolis, IN, USA. B. Basturk, D. Karaboga, “On the performance of artificial bee colony (ABC) algorithm,” Appl. Soft Comput., vol. 8, pp. 687-697, 2008. D. Karaboga, B. Basturk, “Artificial bee colony algorithm on training artificial training networks, signal processing and communication applications,” IEEE (SIU 2007), June 2007, doi: 10.1109/SIU.2007.4298679. N. Karaboga, “A new design method based on artificial bee colony algorithm for digital IIR filters,” J. Franklin Inst., in press. Psudo-code available at artifical bee colony algorithm homepage: http://mf.erciyes.edu.tr/abc/pub/PsuedoCode.pdf