Zong Woo Geem Recent Advances in Harmony Search Algorithm
Studies in Computational Intelligence, Volume 270 Editor-in-Chief Prof. Janusz Kacprzyk Systems Research Institute Polish Academy of Sciences ul. Newelska 6 01-447 Warsaw Poland E-mail:
[email protected] Further volumes of this series can be found on our homepage: springer.com Vol. 249. Wesam Ashour Barbakh, Ying Wu, and Colin Fyfe Non-Standard Parameter Adaptation for Exploratory Data Analysis, 2009 ISBN 978-3-642-04004-7 Vol. 250. Raymond Chiong and Sandeep Dhakal (Eds.) Natural Intelligence for Scheduling, Planning and Packing Problems, 2009 ISBN 978-3-642-04038-2 Vol. 251. Zbigniew W. Ras and William Ribarsky (Eds.) Advances in Information and Intelligent Systems, 2009 ISBN 978-3-642-04140-2 Vol. 252. Ngoc Thanh Nguyen and Edward Szczerbicki (Eds.) Intelligent Systems for Knowledge Management, 2009 ISBN 978-3-642-04169-3 Vol. 253. Roger Lee and Naohiro Ishii (Eds.) Software Engineering Research, Management and Applications 2009, 2009 ISBN 978-3-642-05440-2 Vol. 254. Kyandoghere Kyamakya, Wolfgang A. Halang, Herwig Unger, Jean Chamberlain Chedjou, Nikolai F. Rulkov, and Zhong Li (Eds.) Recent Advances in Nonlinear Dynamics and Synchronization, 2009 ISBN 978-3-642-04226-3 Vol. 255. Catarina Silva and Bernardete Ribeiro Inductive Inference for Large Scale Text Classification, 2009 ISBN 978-3-642-04532-5 Vol. 256. Patricia Melin, Janusz Kacprzyk, and Witold Pedrycz (Eds.) Bio-inspired Hybrid Intelligent Systems for Image Analysis and Pattern Recognition, 2009 ISBN 978-3-642-04515-8 Vol. 257. Oscar Castillo, Witold Pedrycz, and Janusz Kacprzyk (Eds.) Evolutionary Design of Intelligent Systems in Modeling, Simulation and Control, 2009 ISBN 978-3-642-04513-4 Vol. 258. Leonardo Franco, David A. Elizondo, and Jos´e M. Jerez (Eds.) Constructive Neural Networks, 2009 ISBN 978-3-642-04511-0 Vol. 259. Kasthurirangan Gopalakrishnan, Halil Ceylan, and Nii O. Attoh-Okine (Eds.) Intelligent and Soft Computing in Infrastructure Systems Engineering, 2009 ISBN 978-3-642-04585-1
Vol. 260. Edward Szczerbicki and Ngoc Thanh Nguyen (Eds.) Smart Information and Knowledge Management, 2009 ISBN 978-3-642-04583-7 Vol. 261. Nadia Nedjah, Leandro dos Santos Coelho, and Luiza de Macedo de Mourelle (Eds.) Multi-Objective Swarm Intelligent Systems, 2009 ISBN 978-3-642-05164-7 Vol. 262. Jacek Koronacki, Zbigniew W. Ras, Slawomir T. Wierzchon, and Janusz Kacprzyk (Eds.) Advances in Machine Learning I, 2009 ISBN 978-3-642-05176-0 Vol. 263. Jacek Koronacki, Zbigniew W. Ras, Slawomir T. Wierzchon, and Janusz Kacprzyk (Eds.) Advances in Machine Learning II, 2009 ISBN 978-3-642-05178-4 Vol. 264. Olivier Sigaud and Jan Peters (Eds.) From Motor Learning to Interaction Learning in Robots, 2009 ISBN 978-3-642-05180-7 Vol. 265. Zbigniew W. Ras and Li-Shiang Tsay (Eds.) Advances in Intelligent Information Systems, 2009 ISBN 978-3-642-05182-1 Vol. 266. Akitoshi Hanazawa, Tsutom Miki, and Keiichi Horio (Eds.) Brain-Inspired Information Technology, 2009 ISBN 978-3-642-04024-5 Vol. 267. Ivan Zelinka, Sergej Celikovsk´y, Hendrik Richter, and Guanrong Chen (Eds.) Evolutionary Algorithms and Chaotic Systems, 2010 ISBN 978-3-642-10706-1 Vol. 268. Johann M.Ph. Schumann and Yan Liu (Eds.) Applications of Neural Networks in High Assurance Systems, 2010 ISBN 978-3-642-10689-7 Vol. 269. Francisco Fern´andez de de Vega and Erick Cant´u-Paz (Eds.) Parallel and Distributed Computational Intelligence, 2010 ISBN 978-3-642-10674-3 Vol. 270. Zong Woo Geem Recent Advances in Harmony Search Algorithm, 2010 ISBN 978-3-642-04316-1
Zong Woo Geem
Recent Advances in Harmony Search Algorithm
123
Dr. Zong Woo Geem iGlobal University 7700 Little River Tpke. #600 Annandale, Virginia 22003 USA E-mail:
[email protected] ISBN 978-3-642-04316-1
e-ISBN 978-3-642-04317-8
DOI 10.1007/978-3-642-04317-8 Studies in Computational Intelligence
ISSN 1860-949X
Library of Congress Control Number: 2009943375 c 2010 Springer-Verlag Berlin Heidelberg
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typeset & Cover Design: Scientific Publishing Services Pvt. Ltd., Chennai, India. Printed in acid-free paper 987654321 springer.com
Preface
Nowadays, music-inspired phenomenon-mimicking harmony search algorithm is fast growing with many applications. One of key success factors of the algorithm is the employment of a novel stochastic derivative which can be used even for discrete variables. Instead of traditional calculus-based gradient, the algorithm utilizes musician’s experience as a derivative in searching for an optimal solution. This can be a new paradigm and main reason in the successes of various applications. The goal of this book is to introduce major advances of the harmony search algorithm in recent years. The book contains 14 chapters with the following subjects: State-of-the-art in the harmony search algorithm structure by Geem; robotics (robot terrain and manipulator trajectory) by Xu, Gao, Wang, Xue, Tangpattanakul, Meesomboon, and Artrit; visual tracking by Fourie, Mills, and Green; web text data mining by Forsati and Mahdavi; power flow planning by Panigrahi, Pandi, Das, and Abraham; fuzzy control system by Coelho and Bernert; hybridization (with Taguchi method or SQP method) by Yildiz, Öztürk, and Fesanghary; groundwater management by Ayvaz; irrigation by Cisty; logistics by Bo, Huang, Ip, and Wang; timetabling by Al-Betar, Khader, and Liao; and bioinformatics (RNA structure prediction) by Mohsen, Khader, and Ramachandram. This book collects the above-mentioned theory and applications, which are dispersed in various technical publications, so that readers can have a good grasp of current status of the harmony search algorithm and foster new breakthroughs in their fields using the algorithm. Finally, I, as an editor and musician, would like to share the joy of the publication with all the people who like both music and computational optimization.
Zong Woo Geem Editor
Contents
State-of-the-Art in the Structure of Harmony Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zong Woo Geem
1
Harmony Search Optimization Algorithm: Application to a Reconfigurable Mobile Robot Prototype . . . . . . . . . . . . . . . . . . . . . He Xu, X.Z. Gao, Tong Wang, Kai Xue
11
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Panwadee Tangpattanakul, Anupap Meesomboon, Pramin Artrit
23
Visual Tracking Using Harmony Search . . . . . . . . . . . . . . . . . . . . . . Jaco Fourie, Steven Mills, Richard Green
37
Web Text Mining Using Harmony Search . . . . . . . . . . . . . . . . . . . . Rana Forsati, Mehrdad Mahdavi
51
Population Variance Harmony Search Algorithm to Solve Optimal Power Flow with Non-Smooth Cost Function . . . . . . . B.K. Panigrahi, V. Ravikumar Pandi, Swagatam Das, Ajith Abraham A Harmony Search Approach Using Exponential Probability Distribution Applied to Fuzzy Logic Control Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Leandro dos Santos Coelho, Diego L. de A. Bernert Hybrid Taguchi-Harmony Search Approach for Shape Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ¨ urk Ali Rıza Yildiz, Ferruh Ozt¨
65
77
89
VIII
Contents
An Introduction to the Hybrid HS-SQP Method and Its Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mohammad Fesanghary
99
Solution of Groundwater Management Problems Using Harmony Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 M. Tamer Ayvaz Application of the Harmony Search Optimization in Irrigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Milan Cisty The Application of Harmony Search in Fourth-Party Logistics Routing Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Guihua Bo, Min Huang, W.H. Ip, Xingwei Wang A Harmony Search with Multi-pitch Adjusting Rate for the University Course Timetabling . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Mohammed Azmi Al-Betar, Ahamad Tajudin Khader, Iman Yi Liao An Optimization Algorithm Based on Harmony Search for RNA Secondary Structure Prediction . . . . . . . . . . . . . . . . . . . . . . . . 163 Abdulqader M. Mohsen, Ahamad Tajudin Khader, Dhanesh Ramachandram Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
State-of-the-Art in the Structure of Harmony Search Algorithm Zong Woo Geem
*
Abstract. The harmony search algorithm has been so far applied to various optimization problems. Also, the algorithm structure has been customized on a caseby-case basis by tweaking the basic structure. The objective of this chapter is to introduce the state-of-the-art structure of the basic harmony search algorithm.
1 Introduction For optimization, people have traditionally used calculus-based algorithms that give gradient information in order to find the right direction to the optimal solution. However, if variables are discrete instead of continuous, they cannot have derivatives. To overcome this situation, the harmony search (HS) algorithm has used a novel stochastic derivative [1] which utilizes the experiences of musicians in Jazz improvisation and can be applicable to discrete variables. Instead of the inclination information of an objective function, the stochastic derivative of HS gives a probability to be selected for each value of a decision variable. For example, if the decision variable x1 has three candidate values {1, 2, 3}, the partial stochastic derivative of the objective function with respect to x1 at each discrete value gives the selection probability for each value like 20% for 1; 30% for 2; and 50% for 3. While cumulative probability becomes unity (100%), the probability for each value is updated iteration by iteration. Desirably the value, which is included in the optimal solution vector, has higher chance to be chosen as the iterations progress. With this stochastic derivative information, the HS algorithm has been applied to various science and engineering optimization problems that include [2, 3]: Real-world applications • Music composition • Sudoku puzzle • Timetabling • Tour planning • Logistics Zong Woo Geem Environmental Planning and Management Program, Johns Hopkins University, Baltimore, Maryland, USA E-mail:
[email protected] Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 1–10. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
2
Z.W. Geem
Computer science problems • Web page clustering • Text summarization • Internet routing • Visual tracking • Robotics Electrical engineering problems • Energy system dispatch • Photo-electronic detection • Power system design • Multi-level inverter optimization • Cell phone network Civil engineering problems • Structural design • Water network design • Dam scheduling • Flood model calibration • Groundwater management • Soil stability analysis • Ecological conservation • Vehicle routing Mechanical engineering problems • Heat exchanger design • Satellite heat pipe design • Offshore structure mooring Bio & medical applications • RNA structure prediction • Hearing aids • Medical physics In addition to the above-mentioned various applications, the HS algorithm also has various algorithm structures that can be applicable to so many different problems. Thus, this chapter arranges the basic structure of the HS algorithm so that users can easily customize the algorithm for their own optimization problems.
2 Basic Structure of Harmony Search Algorithm The HS algorithm was originally inspired by the improvisation process of Jazz musicians. Figure 1 shows the analogy between improvisation and optimization: Each musician corresponds to each decision variable; musical instrument’s pitch range corresponds to decision variable’s value range; musical harmony at certain
State-of-the-Art in the Structure of Harmony Search Algorithm
3
time corresponds to solution vector at certain iteration; and audience’s aesthetics corresponds to objective function. Just like musical harmony is improved time after time, solution vector is improved iteration by iteration.
Fig. 1 Analogy between Improvisation and Optimization
This section introduces each step of the HS algorithm in detail, including 1) problem formulation, 2) algorithm parameter setting, 3) random tuning for memory initialization, 4) harmony improvisation (random selection, memory consideration, and pitch adjustment), 5) memory update, 6) performing termination, and 7) cadenza.
2.1 Problem Formulation The HS algorithm was devised for solving optimization problems. Thus, in order to apply HS, problems should be formulated in the optimization environment, having objective function and constraints: Optimize (minimize or maximize) f (x)
(1)
hi (x) = 0;
i = 1, … , p ;
(2)
g i (x) ≥ 0;
i = 1, … , q .
(3)
xi ∈ X i = {xi (1),… , xi (k ), … , xi ( K i )} or x iL ≤ xi ≤ xiU
(4)
Subject to
4
Z.W. Geem
The HS algorithm searches entire solution area in order to find the optimal solution vector x = ( x1 , … , x n ) , which optimizes (minimizes or maximizes) the objective function as in Equation 1. If the problem has equality and/or inequality conditions, these can be considered as constraints in Equations 2 and 3. If the decision variable has discrete values, the set of candidate values for the variable becomes xi ∈ X i = {xi (1),… , xi (k ), … , xi ( K i )} ; and if the decision variable has continuous values, the set of candidate values for the variable becomes xiL ≤ xi ≤ xiU . The HS algorithm basically considers the objective function only. However, if a solution vector generated violates any of the constraints, 1) the algorithm abandons the vector or 2) considers it by adding certain amount of penalty to the objective function value. Also, HS can be applied to multi-objective problems by conjugating with Pareto set.
2.2 Algorithm Parameter Setting Once the problem formulation is ready, algorithm parameters should be set with certain values. HS contains algorithm parameters including harmony memory size (HMS), harmony memory considering rate (HMCR), pitch adjusting rate (PAR), maximum improvisation (MI), and fret width (FW). HMS is the number of solution vectors simultaneously handled in the algorithm; HMCR is the rate (0 ≤ HMCR ≤ 1) where HS picks one value randomly from musician’s memory. Thus, (1-HMCR) is the rate where HS picks one value randomly from total value range; PAR (0 ≤ RAR ≤ 1) is the rate where HS tweaks the value which was originally picked from memory. Thus, (1-PAR) is the rate where HS keeps the original value obtained from memory; MI is the number of iterations. HS improvises one harmony (= vector) each iteration; and FW is arbitrary length only for continuous variable, which was formerly called as bandwidth (BW). For more information of the term, a fret is the metallic ridge on the neck of a string instrument (such as guitar), which divides the neck into fixed segments (see Figure 2), and each fret represents one semitone. In the context of the HS algorithm, frets mean arbitrary points which divide the total value range into fixed segments, and fret width (FW) is the length between two neighboring frets. Uniform FW is normally used in HS. Originally fixed parameter values were used. However, some researchers have proposed changeable parameter values. Mahdavi et al. [4] suggested that PAR increase linearly and FW decrease exponentially with iterations:
PAR( I ) = PARmin + (PARmax − PARmin ) × ⎡ ⎛ FWmin FW ( I ) = FWmax exp ⎢ln⎜⎜ ⎣⎢ ⎝ FWmax
⎞ I ⎤ ⎟ ⎟ MI ⎥ ⎠ ⎦⎥
I MI
(5)
(6)
State-of-the-Art in the Structure of Harmony Search Algorithm
5
Fig. 2 Frets on the Neck of a Guitar
Mukhopadhyay et al. [5] suggested that FW be the standard deviation of the current population when HMCR is close to 1. FW ( I ) = σ (x i ) = var(x i )
(7)
Geem [6] tabulated fixed parameter values, such as number of variables, HMS, HMCR, PAR, and MI, after surveying various literatures. FW normally ranges from 1% to 10% of total value range. Furthermore, some researchers have proposed adaptive parameter theories that enable HS to automatically have best parameter values at each iteration [3, 7].
2.3 Random Tuning for Memory Initialization After problem is formulated and the parameter values were set properly, random tuning process is performed. In an orchestra concert, after oboe plays the note A (usually A440), other instruments randomly play any pitches out of playable ranges. Likewise, the HS algorithm initially improvises many random harmonies. The number of random harmonies should be at least HMS. However, the number can be more than HMS, such as twice or three times as many as HMS [8]. Then, top-HMS harmonies are selected as starting vectors. Musician’s harmony memory (HM) can be considered as a matrix:
⎡ x1 ⎢ 12 ⎢ x HM = ⎢ 1 # ⎢ HMS ⎢⎣ x1
x12
"
x1n
x 22
"
x n2
"
"
"
x 2HMS
" x nHMS
f ( x1 ) ⎤ ⎥ f (x 2 ) ⎥ ⎥ # ⎥ f (x HMS )⎥⎦
(8)
6
Z.W. Geem
Previously, the objective function values were sorted ( f (x1 ) ≤ f (x 2 ) ≤ … ≤ f (x HMS ) ) in HM, but current structure does not require it any more.
2.4 Harmony Improvization In Jazz improvisation, a musician plays a note by randomly selecting it from total playable range (see Figure 3), from musician’s memory (see Figure 4), or by tweaking the note obtained from musician’s memory (see Figure 5). Likewise, the HS algorithm improvises a value by choosing it from total value range or from HM, or tweaking the value which was originally chosen from HM.
Fig. 3 Total Playable Range of a Music Instrument
Fig. 4 Set of Good Notes in Musician’s Memory
Fig. 5 Tweaking the Note Chosen from Musician’s Memory
Random Selection: When HS determines the value xiNew for the new harmony x New = ( x1New , … , x nNew ) , it randomly picks any value from total value range ( {xi (1), … , xi ( K i )} or xiL ≤ xi ≤ xiU ) with probability of (1-HMCR). Random selection is also used for previous memory initialization.
State-of-the-Art in the Structure of Harmony Search Algorithm
7
Memory Consideration: When HS determines the value xiNew , it randomly picks any value xij from HM = {x1i , …, xiHMS } with probability of HMCR. The index j can be calculated using uniform distribution U (0,1) : j ← int(U (0,1) ⋅ HMS ) + 1
(9)
However, we may use different distributions. For example, if we use [U (0,1)]2 , HS chooses lower j more. If the objective function values are sorted by j , HS will behave similar to particle swarm algorithm. Pitch Adjustment: After the value xiNew is randomly picked from HM in the above memory consideration process, it can be further adjusted into neighbouring values by adding certain amount to the value, with probability of PAR. For discrete variable, if xi (k ) = xiNew , the pitch-adjusted value becomes xi (k + m) where m ∈ {−1, 1} normally; and for continuous variable, the pitch-adjusted value becomes xiNew + ∆ where ∆ = U (0,1) ⋅ FW (i ) normally. The above-mentioned three basic operations (random selection, memory consideration and pitch adjustment) can be expressed as follows:
xiNew
⎧⎧ xi ∈ {xi (1),..., xi (k ),..., xi ( K i )} ⎪⎨ xi ∈ [ xiLower , xiUpper ] ⎪⎩ ⎪ ← ⎨ xi ∈ HM = {xi1 , xi2 , ..., xiHMS } ⎪ ⎧ xi (k + m) if xi (k ) ∈ HM ⎪ ⎨ ⎪⎩ ⎩ xi + ∆ if xi ∈ HM
w.p.
(1 − HMCR )
w.p. HMCR ⋅ (1 − PAR) w.p.
(10)
HMCR ⋅ PAR
Especially for discrete variables, the HS algorithm has the following stochastic partial derivative which consists of three terms such as random selection, memory consideration and pitch adjustment [1]: n( xi (k )) n(x i ( k − m ) ) ∂f 1 = HMCR (1 − PAR) + (1 − HMCR ) + HMCR PAR Ki ∂xi HMS HMS
(11) Also, the HS algorithm can consider the relationship among decision variables using ensemble consideration just as there exists stronger relationship among specific musicians (see Figure 6). The value xiNew can be determined based on x New j if the two has the strongest relationship [9]: xiNew ← fn( x New ) j
where
{[
]}
max Corr (x i , x j ) 2 i≠ j
(12)
8
Z.W. Geem
∝ Fig. 6 Relationship between Specific Musicians
If the newly improvised harmony x New violates any constraint, HS abandons it or still keeps it by adding penalty to the objective function value just like musicians sometimes still accept rule-violated harmony (see Figure 7).
Fig. 7 Rule-Violated Harmony (Parallel Fifth)
2.5 Memory Update If the new harmony x New is better, in terms of objective function value, than the worst harmony in HM, the new harmony is included in HM and the worst harmony is excluded from HM: x New ∈ HM
∧
xWorst ∉ HM
(13)
State-of-the-Art in the Structure of Harmony Search Algorithm
9
However, for the diversity of harmonies in HM, other harmonies (in terms of least-similarity) can be considered. Also, maximum number of identical harmonies in HM can be considered in order to prevent premature HM. If the new harmony x New is the best one when compared with every harmony in HM, the new harmony can consider an additional process named accidentaling. In music, an accidental is a note whose pitch is not a member of a scale and the accidental sign raises (#) or lowers (b) the following note from its normal pitch as shown in Figure 8. Likewise, HS can further pitch-adjust every note of the new harmony if it is the ever-best harmony, which may find an even better solution:
⎧ x (k ± m) for discrete var. xiNew ← ⎨ i , i = 1, … , n ⎩ xi ± ∆ for continuous var.
(14)
Fig. 8 Accidental for the Note Sol
2.6 Performing Termination If HS satisfies termination criteria (for example, reaching MI), the computation is terminated. Otherwise, HS improvises another new harmony again.
2.7 Cadenza Cadenza is a musical passage occurring at the end of a movement. In the context of the HS algorithm, cadenza can be referred to a process occurring at the end of the HS computing. In this process, HS returns the best harmony ever found and stored in HM.
3 Conclusions This chapter arranged the up-to-date structure of the HS algorithm. Those, who are interested in applying the algorithm to their own optimization problems, may customize the structure into their problems. The HS algorithm is still growing. The author hopes other researchers to suggest new ideas to make better shape of the algorithm structure.
10
Z.W. Geem
References 1. Geem, Z.W.: Novel derivative of harmony search algorithm for discrete design variables. Applied Mathematics and Computation 199, 223–230 (2008) 2. Geem, Z.W.: Music-inspired harmony search algorithm: theory and applications. Springer, Berlin (2009) 3. Geem, Z.W.: Harmony search algorithms for structural design optimization. Springer, Berlin (2009) 4. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved harmony search algorithm for solving optimization problems. Applied Mathematics and Computation 188, 1567– 1579 (2007) 5. Mukhopadhyay, A., Roy, A., Das, S., Das, S., Abraham, A.: Population-variance and explorative power of harmony search: an analysis. In: Proceedings of 3rd IEEE International Conference on Digital Information Management (ICDIM 2008), pp. 13–16 (2008) 6. Geem, Z.W.: Optimal cost design of water distribution networks using harmony search. Engineering Optimization 38, 259–280 (2006) 7. Wang, C.M., Huang, Y.F.: Self-adaptive harmony search algorithm for optimization. Expert Systems with Applications (2009), doi:10.1016/j.eswa.2009.09.008 8. Degertekin, S.: Optimum design of steel frames using harmony search algorithm. Structural and Multidisciplinary Optimization 36, 393–401 (2008) 9. Geem, Z.W.: Improved harmony search from ensemble of music players. In: Gabrys, B., Howlett, R.J., Jain, L.C. (eds.) KES 2006. LNCS (LNAI), vol. 4251, pp. 86–93. Springer, Heidelberg (2006)
Harmony Search Optimization Algorithm: Application to a Reconfigurable Mobile Robot Prototype He Xu , X.Z. Gao , Tong Wang , and Kai Xue 1
2
3
Abstract. The terrain of the mobile robot provides the only and powerful thrust. Therefore, the optimal prototype design with respect to the terrain is important for the robot in the sandlot or soft soiled environments. In this chapter, a Harmony Search Multi-Objective Optimization (HSMOO) with constraints is proposed to the design of a reconfigurable mobile robot with respect to the terramechanics, and the optimal configuration prototype is then obtained. The actual condition shows that in the process of mobile robot design and manufacture, the HSMOO is effective to the issue of the mobile robot reconfiguration.
1 Introduction One of the most important requirements for the mission-oriented mobile robot is to be adaptive to different missions, such as various payloads, terrains, and stability margins. Reconfiguration is a necessary solution for the mobile robot to handle these difficulties. In the past decades, there are several representative resolutions. The Sojourner that was landed in Mars used the rocker-bogie locomotion with deploy and stow state [1], the mini rover Go-For had an active wheel-legged locomotion with reconfigurable postures [2-3], the Nano Rover utilized posable-truct chassis with different prototypes toward different terrains and mission conditions [4], and the Nomad made by the CMU maneuvered with diversified prototypes by the transformed chassis [5]. The rover SMC had the parent and daughter rovers [6]. A retractable chassis had the ability of changing He Xu and Kai Xue College of Mechanics and Electrics Engineering, Harbin Engineering University, Harbin 150001, China E-mail:
[email protected],
[email protected] X.Z. Gao Department of Electrical Engineering, Helsinki University of Technology, Otakaari 5A, FIN-02150 Espoo, Finland E-mail:
[email protected] Tong Wang College of Information and Communication, Harbin Engineering University, Harbin 150001, China E-mail:
[email protected] Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 11–22. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
12
H. Xu et al.
the chassis length [7]. The in-wheel propulsion of a desert-traversing vehicle was studied with respect to the terrain [8], and a novel wheel with an unexpectedly large steering resistance was developed for simulating the features of camera feet [9]. A reconfigurable wheeled mobile robot was also developed with alternative sizes and different trafficability metrics to adapt to uneven terrain [10]. However, its parameters were not optimized. This paper is organized as follows. Details of the reconfigurable prototypes of the mobile robot are introduced in Section 2. The mass modeling of the robot is presented in Section 3. The stability model of the reconfigurable mobile robot is rendered in Section 4. The wheel resistance based on the terramechanics is investigated in Section 5. An emerging optimization method, namely Harmony Search (HS), is presented in Section 6. The optimal design of the reconfigurable prototype based on HSMOO with constraints is discussed in Section 7. Finally, some remarks and conclusions are drawn in Section 8.
2 Mission-Oriented Mobile Robot and Desired Prototypes The factors involved in the design process and characters of the aforementioned robot are shown in Fig. 1. Since there are too many factors, a synthesis and tradeoff design is needed in terms of the robot’s trafficability, stability, maneuver ability, etc. The wheels of the robot can be adjusted around two pivots of the wheel arms, and this structure makes the wheels generate the caster and camber similar to the ones in an automobile, and the aligning force is generated to guarantee the straight motion ability of the wheels. The robot’s wheelbase, wheel stance, clearance, caster, camber, longitudinal stability margin, and latitudinal stability margins are all adjustable, due to the T
reconfigurable variables: x = ⎡⎣l , h, α f , β f , α b , βb , d w , bw ⎤⎦ , where this component
consists of the adjustable rocker length l, the rocker height h, the front wheel caster & camber α f , β f , the rear wheel caster & camber α b , β b , and the wheel diameter & width d w , bw .
3 Mass Model of Reconfigurable Mobile Robot The mass distribution of a mobile robot is the most important factor to ensure lower cost, high trafficability, etc. The scopes of the parameters of the wheel have been determined by using the ANSYS in terms of the structure strength and stability, as illustrated in Fig. 2. From the Pro-E model of the wheel, the mass of our robot is:
m = 4(mw + mar + mst ) + mbox ,
(1)
where mw is the mass of the wheel, mar is the rocker mass, mst is the mass of the steering mechanism, and mbox is the mass of the robot body.
Harmony Search Optimization Algorithm
13
Fig. 1 Diagram of mission analysis, conceptual design, modeling, optimization, and manufacture of a reconfigurable mobile robot prototype
14
H. Xu et al.
Fig. 2 Wheel stress distribution
4 Model of Stability of Reconfigurable Mobile Robot The isometric view of the prototype of the mobile robot with coordinates is shown in Fig. 3.
Fig. 3 Robot prototype in 3-D coordinates
Harmony Search Optimization Algorithm
15
Coordinate ( X 1 − Y1 − Z1 ) denotes the front right wheel, axis X 1 , Y1 and Z1 are along the longitudinal, transverse, and latitudinal respectively. Similarly, ( X 2 − Y2 − Z 2 ), ( X 3 − Y3 − Z 3 ), and ( X 4 − Y4 − Z 4 ) represent the coordinates for front left wheel, rear right wheel, and rear left wheel, respectively. The meanings of these symbols are depicted in the above figures. More relevant details are given in literature [11]. From Fig.2 and Fig.3, we have calculation for the margin of robot stability.
4.1 Longitudinal Stability Margin The following condition is assumed to be satisfied: (L/2Hcog) > µlg, and (W/2Hcog) > µlt, where µlg and µlt represent the longitudinal and later attachment coefficients, respectively. L is the equivalent wheelbase. Hcog is the height of the robot gravity centre. The longitudinal stability margin of the robot is:
⎛ ⎜ ⎝
φlg = min ⎜ arctan
Lf H cog
, arctan
Lb H cog
⎞ ⎟⎟ , ⎠
(2)
where L f is the longitudinal front equivalent supporting length of the robot, Lb is the longitudinal rear equivalent supporting length of the robot, and H cog is the height of the center of gravity of the robot respectively.
4.2 Lateral Stability Margin The lateral crosswise stability margin is given as follows:
φlt = arctan(0.5
Weg H cog
).
(3)
5 Wheel Resistance Based on Terramechanics For our optimal design of the robot prototype, the motion of the mobile robot can be analyzed with the robot of rigid wheels rolling into the inclined soft terrain. The static stability is then determined for the worst case where a maximum acceleration vector is added as the transformation to the dynamic circumstance. Assume that the weight of the robot is supported by the two rear wheels, i.e., a 1/2 model of robot is used with the threshold of stability. This threshold is considered as the point, where the center of gravity of the machine crosses above the rear wheels’ point of contact. Fig.4 shows the relations of the inertia force, motion resistances, and mobile robot motion, etc.
16
H. Xu et al.
Fig. 4 Analysis of resistances of robot on sandy slope in 1/2 model
When robot climbs a sandy slope, the torque due to resistive forces is: Tdrw = ( Fa + Rc + Rb + Rr + Rg )
dw 2
(4)
where Fa denotes the inertia force; Rc denotes the soil compaction resistance; Rb denotes the bulldozing resistance; Rr denotes the rolling resistance; Rg denotes the gravitational resistance; and dw is the diameter of the rigid wheel.
6 Harmony Search (HS) Method The Harmony Search (HS) method is an emerging meta-heuristic optimization algorithm, which is inspired by the underlying principles of the musicians’ improvisation of the harmony [12]. When the musicians compose harmony, they usually try various possible combinations of the musical pitches stored in their memory. Such an efficient search for a perfect state of harmony is analogous to the procedure for finding the optimal solutions to engineering problems. Table 1 presents the comparison between the harmony improvisation and optimization. Fig.5 shows analogy and flowchart of the basic HS method.
Harmony Search Optimization Algorithm
17
Fig. 5 Analogy and flowchart of basic HS method Table 1 Comparison between harmony improvisation and optimization Comparison factors
Harmony improvisation
Optimization Objective function
Targets
Aesthetic standard
Best states
Fantastic harmony
Global optimum
Components
Pitches of instruments
Values of variables
Process units
Each practice
Each iteration
18
H. Xu et al.
● Step 1. Initialize the HS Memory (HM). The HM consists of a number of randomly generated solutions to the optimization problems to be solved. For an n-dimension problem, an HM with a size of N can be represented as follows:
⎡ x11 , x12 ,", xn1 ⎤ ⎥ ⎢ 2 2 x1 , x 2 ,", x n2 ⎥ ⎢ HM = , ⎥ ⎢# ⎥ ⎢ N N N ⎣⎢ x1 , x2 ,", x n ⎦⎥
(5)
where [x1i , x2i ,", xni ] ( i = 1,2, " , N ) is a candidate solution. Note that the HM stores the past search experiences, and plays an important role in the optimization performance of the HS method. ● Step 2. Improvise a new solution [x1′, x2′ ,", xn′ ] from the HM. Each component of this solution, x′j , is obtained based on the Harmony Memory Considering
Rate (HMCR). The HMCR is defined as the probability of selecting a component from the HM, and (1-HMCR) is, therefore, the probability of generating it randomly. If x′j comes from the HM, it is chosen from the j th dimension of a random HM member, and it can be further mutated depending on the Pitching Adjust Rate (PAR). The PAR determines the probability of a candidate from the HM to be mutated. The improvisation of [x1′, x′2 ,", xn′ ] is similar to the production of offspring in the Genetic Algorithms (GA) with the mutation and crossover operations. However, the GA usually create new chromosomes using only one (mutation) or two (crossover) existing ones, while the generation of new solutions in the HS method makes full use of all the HM members. ● Step 3. Update the HM. The new solution from Step 2 is evaluated. If it yields a better fitness than that of the worst member in the HM, it will replace that one. Otherwise, it is eliminated. ● Step 4. Repeat Step 2 to Step 3 until a termination criterion is met.
Similar to the GA, the HS method is a random search technique. It does not need any prior domain knowledge beforehand, such as the gradient information of the objective functions. Nevertheless, different from those population-based approaches, it utilizes only a single search memory to evolve. Hence, the HS method imposes few mathematical requirements, and has the distinguishing advantage of computation simplicity. On the other hand, it occupies some inherent drawbacks, e.g., weak local search ability. Mahdavi et al. propose a modified HS method by using an adaptive PAR to enhance its optimization accuracy as well as speed up the convergence [13]. To summarize, the features of multi-candidate consideration and correlation among the variables contribute to the flexibility of
Harmony Search Optimization Algorithm
19
the HS method, thus making it well suited for the constrained and multi-objective optimal design problems [14]. During the recent years, it has been successfully applied in the areas of function optimization, mechanical structure design, and pipe network optimization.
7 Optimal Design of Reconfigurable Prototype of Mobile Robot The Multi-Objective Optimization (MOO) of the reconfigurable mobile robot means, under certain constraints such as clearance, obtaining the optimal reconfiguration variables α f , α b , β f , β b , l , h , d w , and bw in order to minimize the objective function F(x) , which can be formulated as
⎧⎪ min max F(x)={ f1 , f 2 , f 3 } x f , ⎨ ⎪⎩s.t. G(x) ≤ 0; l b ≤ x ≤ U b
(6)
T
where x = ⎡⎣l , h, α f , β f , α b , βb , d w , bw ⎤⎦ is the optimal variable vector, l b , U b are the vectors with the variable scope, and G( x) gives the constraints of the linear equalities and inequalities. To put it into more details, the first objective f1 concerns the stability of our mobile robot, which is the first factor to ensure the trafficability. From (2) and (3), there is: f1 = w1 / φlg + w2 / φlt ,
(7)
where w1 and w2 are two given weights. We have w1 ≥ 0, w2 ≥ 0, w1 + w2 = 1 . The second objective f 2 concerns the resistance torque of the rear propulsive wheel to ensure the traction of the mobile robot. From (4), there is: f 2 = Tdrw .
(8)
The third objective f 3 concerns the mass of the robot. From (2), there is: f3 = m .
(9)
Obviously, this is a typical MOO problem, and the ranges of the design variables are as follows: 0.52 ≤ l ≤ 0.658; − 0.103 ≤ h ≤ 0.036; − 12 ≤ α f ≤ 20; −12 ≤ β f ≤ 28; − 28 ≤ α b ≤ 12; − 12 ≤ β b ≤ 28;
0.076 ≤ d w ≤ 0.3; 0.04 ≤ bw ≤ 0.2;
The constraints due to the stability are θ − φlg ≤ 0 , and the constraints due to the clearance must ensure H c 0 − H c ≤ 0 .
20
H. Xu et al.
The parameters of the terramechanics are given in Table 2. Table 2 Parameters of Terramechanics Item (Unit) Exponent of soil deformation n Cohesion of soil c (kPa) Angle of internal friction of the soil φ (°)
Value 1.0 3.0 40
Velocity (m/s) cohesive coefficient k (kN/mn+1) c Frictional module of soil deformation kφ
10 850
Coefficient of rolling resistance f r (°)
0.05
We employ the HSMOO with constraints method to deal with the above Multi Objective Optimization design of the configuration of the mobile robot. More precisely, two separate HMs are used in the HS method: one is for the evolution of the harmony members, and the other is considered as an external repository storing the Pareto optimal solutions that have been found. The Pareto optimality is used as the ranking criterion for sorting the members in the first HM. If a new solution candidate is better than the worst HM member, it will be replaced with this new solution. At each iteration step, all the non-Pareto-dominated HM members in the first HM are migrated to the second HM. In the simulations, a total of five Pareto optimal solutions can be obtained in our HS method as given in Table 3. Table 3 Optimal configurations of mobile robot prototype obtained by HS method Item
l
h
αf
βf
αb
βb
dw
bw
f1
f2
f3
1 0.5856 -0.0931 -9.1216 26.4915 -23.5787 11.3027 0.0995 0.1819 53.5208 11.1125 35.18 2 0.5678 -0.0962 -11.4766 1.1594 -15.2913 17.0498 0.2054 0.0798 46.9499 18.4725 35.18 3 0.5339 -0.0903 -11.5635 3.1792 -13.6655 3.6762 0.2035 0.0542 45.8246 19.8231 35.18 4 0.5519 -0.0676 10.1818 14.8644 3.8979
5.2018 0.0880 0.1601 56.1625 10.9106 35.18
5 0.5392 -0.0748 -5.6409 12.1517 -17.1125 -4.0474 0.0794 0.1595 58.4153 10.5465 35.18
Note that the optimal f 3 is always 35.1800. The approximated Pareto front of this MOO problem is illustrated in Fig. 6. Compared with the conventional Minimum-Maximum method, the HS-based approach can provide us with multiple Pareto optimal solutions as in Table 3. Therefore, an appropriate compromise needs to be made when choosing the best prototype. As an example, the optimal solution is F(xopt) = {46.2810°, 17.5091Nm, 35.1800kg}. Apparently, we can get the optimal x : l = 0.52m , h = −0.103m , α f = −12D , β f = −12D ,
α b = −28D , βb = −12D , d w = 0.2m , and bw = 0.1m .
Harmony Search Optimization Algorithm
21
20
Sandlot Resistance Torque f2 (N.m)
19 18 17 16 15 14 13 12 11 10 45
50
55
60
Stability f1 (degree)
Fig. 6 Pareto optima of mobile robot configuration acquired by HSMOO
8 Summary and Conclusions In this chapter, the design synthesis frame work of a reconfigurable mobile robot traversing over the sandlot or sandy terrain is firstly presented in terms of the mission requirements, terramechanics and the performance of mobile robot. Then the quantitative model of the robot stability, robot mass and wheel resistance torque was built with respect to Pro-E model, terramechanics and the robot performance constraints such as the stability and clearance. A HS-based MOO technique is next employed to obtain the optimal reconfigurable robot prototype. The result showed that optimal prototype by HSMOO is effective.
Acknowledgements The authors would like to thank all the collaborators in this joint research project. This work was supported by the National Science Foundation of China under Grant 60775060, the Foundation Research Fund of Harbin Engineering University under Grant HEUFT07027, Natural Science Foundation of the Heilongjiang Province of China under Grant F200801, and Specialized Research Fund for the Doctoral Program of Higher Education under Grant 200802171053. X. Z. Gao’s work was also funded by the Academy of Finland under Grant 214144.
References 1. Apostolopoulos, D.: Systematic configuration of robotic locomotion. Technical Report CMU-RI-TR-96-30, The Robotics Institute, Carnegie Mellon University, Pittsburgh, PA (1996)
22
H. Xu et al.
2. Jet Propulsion Laboratory. Mars Pathfinder. News Online (1998), http://mars.jpl.nasa.gov/MPF/index1.html (accessed 8 April 1998) 3. Jet Propulsion Laboratory. Mars Exploration Program. News Online (2000), http://mpfwww.jpl.nasa.gov/ (accessed November 2000) 4. Sreenivasan, S.V., Wilcox, B.H.: Stability and traction control of an actively actuated micro- rover. Journal of Robotic Systems 11, 487–502 (1994) 5. Kubota, T., Kuroda, Y., Kunii, Y.: Micro planetary rover Micro5. In: 5th International Symposium on Artificial Intelligence, Robotics and Automation in Space (ISAIRAS 1999), Noordwijk, Netherlands, June 1-3 (1999) 6. Shigeo, H.: Super-mechano-colony and SMC rover with detachable wheel units. In: COE Workshop 1999, Tokyo, Japan, August 20-24 (1999) 7. Apostolopoulos, D.: Analytical configuration of wheeled robotic locomotion. Technical Report CMU-RI-TR-01-08, The Robotics Institute, Carnegie Mellon University, Pittsburgh, PA (2001) 8. Zhuang, J.D.: Biomimetics wheel simulating a camera feet. In: Zhuang, J.D. (ed.) dvanced Technology of Tire. Beijing Machine Industry Press, Beijing (2001) 9. Chen, Z.: Research of a compound walking wheel having retractile laminas with application to lunar rover. Master thesis, Jilin University (2007) 10. Fu, Y., Xu, H., Ma, Y.: A navigation robot with reconfigurable chassis and bionic wheel. In: IEEE International Conference on Robotics and Biomimetics (ROBIO 2004), Shenyang, China, August 22-25 (2004) 11. Xu, H., Tan, D.W., Zhang, Z.Y.: Optimization of mobile robot based on projection method and harmony search. In: IEEE International Conference on Robotics and Biomimetics (ROBIO 2004), Bangkok, Thailand, February 21-26 (2008) 12. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001) 13. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved harmony search algorithm for solving optimization problems. Applied Mathematics and Computation 188, 1567– 1579 (2007) 14. Gao, X.Z., Wang, X., Ovaska, S.J.: Harmony search methods for multi-modal and constrained optimization. In: Geem, Z.W. (ed.) Music-Inspired Harmony Search Algorithms. Springer, Berlin (2009)
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms Panwadee Tangpattanakul, Anupap Meesomboon, and Pramin Artrit
1
Abstract. This research proposes a method of obtaining an optimal trajectory of robot manipulator by using Harmony Search (HS). Despite the fact that the Sequential Quadratic Programming (SQP) is popular as a solving method for optimum trajectory problems, SQP needs a suitable initial value. The HS algorithm does however not require such process of setting initial value. Two results are compared using minimum traveling time as the objective function since time is the vital key for productivity particularly in the industrial sector. The state variables of 6-DOFs robot arm are simulated and the kinematics constraints are also considered. The results show that HS obtains the better solution than SQP method with the unsuitable initial value. Moreover, the hybrid HS and SQP method, Hybrid Harmony Search Algorithm (HHSA) is effective and acceptable for solving the optimal trajectory problem without its initial value finding process. Therefore, the important role of HS is that it can be applied to assist SQP to converge to the global optimum.
1 Introduction In a robot manipulator application, a trajectory refers to a time history of position, velocity, and acceleration for each robot’s joint. At the present, many researches are developing algorithms for obtaining the optimal trajectory planning. Their works are different in three aspects: I) the objective function of the optimization problem, II) the trajectory form, and III) the optimization technique. The first aspect considers the objective function of the optimization problem consisting of: traveling-time [1], energy [2], and jerk minimization. The latest objective function requires for smoothing trajectory and reducing damage on actuators [3]. The second one is the trajectory forming in which certain points must be achieved. Thus, the trajectory is an interpolated function whose polynomial [4] or spline functions are commonly used. However, the polynomial function may occur the Runge’s phenomenon if the number of specified points is large because the high order polynomial leads to obtain the oscillation and overshoot. Hence, the spline function is chosen because it can avoid the Runge’s phenomenon. The last Panwadee Tangpattanakul, Anupap Meesomboon, and Pramin Artrit Department of Electrical Engineering, Faculty of Engineering, Khon Kaen University, Khon Kaen, Thailand E-mail:
[email protected], {anupap,pramin}@kku.ac.th Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 23–36. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
24
P. Tangpattanakul, A. Meesomboon, and P. Artrit
aspect is the optimization technique for solving the constrained optimization problem. There are many precedent researches developing in this problem: the DOT (Design Optimization Tool) program that combines the Lagrange Multiplier method, Golden Section, and Polynomial One-Dimension Search method [5]; Genetic Algorithm (GA) and Simulated Annealing (SA) [4]; Sequential Weight Increasing Factor Technique (SWIFT) and GA [6]; and Sequential Quadratic Programming (SQP) [7-9] are used for solving the optimization technique. In Chettibi’s work [7] suggests that SQP may obtain the local minimum. To converge the global minimum, changing initial value is thus needed. The SQP method and initial value finding algorithm are used in Gasparetto and Zonotto’s works [8-9]. The jerk minimization is applied when the objective function of the optimization problem and the traveling time are fixed. Their results show a major drawback of SQP technique as it only obtains a global minimum if the suitable initial value is set.
Fig. 1 The 6-DOFs robot manipulator
The Harmony Search (HS) and Hybrid Harmony Search Algorithm with SQP (HHSA) which do not require the initial value are employed for solving the optimization problem of the minimum time trajectory in this work. The minimumtime simulations of the 6-DOFs robot manipulator trajectory are illustrated, as seen in Fig. 1. The kinematics constraints (each joint velocity, acceleration, and jerk limitations) are also considered. Two types of spline functions, a cubic spline and a 5th degree B-spline, are employed to cover various trajectory forms. The cubic spline is used for a simple trajectory which has continuity in position, velocity, and acceleration while the 5th degree B-spline is a more complex trajectory where jerk pattern smoothness is also considered. The HS algorithm has the advantage that it does not require the suitable initial value and it is a global optimum search algorithm [10]. However, SQP method has the exactness and speed for converging to the local optimum. The SQP and HS results are presented and they show their advantages. Hence, the HHSA is a good alterative to be chosen to apply in this area because it has the strengths of both HS algorithm and SQP method.
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms
25
This work is organized as follows. In Section 2, the research methodologies are explained. They consist of the formulation of spline trajectory, the constrained optimization problem and constraints. Section 3 describes the Harmony Search Algorithm in term of the optimization process. In Section 4, the simulation model of 6-DOFs robot arm minimum time trajectory is our test system. The results between the best solutions which are obtained by SQP and HS are compared and the hybrid method is also applied to this simulation. Finally, the work is concluded in Section 5.
2 Research Methodologies 2.1 Formulation of the Trajectory Clamped with Splines The cubic spline and the 5th degree B-spline are employed to the robot joint trajectories forms. They clamp a set of specified robot joint position values qj,i, where j and i represent a joint and a knot sequences, respectively. The knot is a set of position points that one joint moves from the initial position (knot 1) to the terminal position (knot n) and the joint arrives its series of knot at the time t1, t2,…, ti,…, tn, respectively. n is the number of via-points from the initial to the terminal. The joint position is also called a joint vector. Let hi (= ti+1 - ti) be the interval time [ti, ti+1]. In this section, the cubic spline and the 5th degree B-spline formulations are shown. • Cubic spline formulation The cubic spline is a piecewise 3rd degree polynomial function. The velocities and accelerations of the initial and terminal conditions (v1, vn, a1, and an) are specified to be zero. These conditions cause two equations of the cubic spline algorithm becoming zero and the path pattern cannot be solved. Therefore, two extra knots (position values at time t2 and tn-1) are added and their position values are not specified. Let Qj,i(ti) be the cubic polynomial for the j-th joint in the interval time [ti, ti+1]. The second derivative of Qj,i(t) is a linear interpolation, as seen in Fig. 2.
(t ) Q (t ) Q j ,i i+1
(t ) Q j ,i i
ti
t i +1
t
hi Fig. 2 Second derivative of cubic spline on time interval [ti, ti+1]
26
P. Tangpattanakul, A. Meesomboon, and P. Artrit
The second derivative of cubic spline can be written as [9]:
(t ) = ti +1 − t Q (t ) + t − ti Q (t ) ; i = 1, … , n − 1. Q j ,i j ,i i j ,i i +1 hi hi
(1)
Integrating equation (1) for the given points Qj,i(ti) = qj,i and Qj,i(ti+1) = qj,i+1, the following interpolation functions are obtained:
(t ) (t ) Q Q 2 2 Q j ,i (t ) = − j ,i i (ti +1 − t ) + j ,i i+1 (t − ti ) 2hi 2hi (t ) ⎤ ⎡ q (t )⎤ ⎡q hQ hQ + ⎢ j ,i+1 − i j ,i i+1 ⎥ − ⎢ i , j − i j ,i i ⎥ 6 6 ⎥⎦ ⎢⎣ hi ⎥⎦ ⎢⎣ hi
(2)
and
Q j ,i (t ) =
(t ) Q j ,i i 6hi
(ti+1 − t )3 +
(t ) Q j ,i i +1 6hi
(t − ti )3
(t ) ⎤ ⎡q hQ + ⎢ j ,i+1 − i j ,i i+1 ⎥ (t − ti ) 6 ⎢⎣ hi ⎥⎦ (t )⎤ ⎡q hQ + ⎢ i , j − i j ,i i ⎥ (ti+1 − t ) 6 ⎦⎥ ⎣⎢ hi
(3)
Using the continuity conditions on velocities and accelerations, a system of n-2 (t ), i = 2, 3, … , n − 1 is obtained linear equations solving for n-2 unknowns Q j ,i i as [5];
[
]
(t ) Q (t ) " Q (t ) AQ j ,2 2 j ,3 3 j , n −1 n −1
T
=B
(4)
In (4), the matrix A is non-singular matrix and entries of the matrix B are changed for each joint. Then, the extra knots position values can obtain from 2
q j , 2 = q j ,1 + h1v1 +
2
h1 h a1 + 1 Q j , 2 (t 2 ) 3 6 2
q j ,n−1 = q j ,n − hn −1vn +
(5)
2
hn−1 h (t ) . an + n−1 Q j ,n −1 n −1 3 6
(6)
Each joint of cubic spline trajectories and their derivatives are illustrated in Fig. 3-8.
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms
27
Fig. 3 Cubic spline trajectory of joint 1
Fig. 4 Cubic spline trajectory of joint 2
Fig. 5 Cubic spline trajectory of joint 3
Fig. 6 Cubic spline trajectory of joint 4
Fig. 7 Cubic spline trajectory of joint 5
Fig. 8 Cubic spline trajectory of joint 6
Where
and
are position patterns (deg), are velocity patterns (deg/s), are acceleration patterns (deg/s2), are jerk patterns (deg/s3).
• 5th degree B-spline formulation The 5th degree B-spline is an interpolated function which is between the specified knots or via-points. The velocities, accelerations, and jerks of the initial and terminal conditions are specified to be zero. Therefore, two extra knots (position values at time t2 and tn-1) are added and their position values are not
28
P. Tangpattanakul, A. Meesomboon, and P. Artrit
specified similar to the cubic spline trajectory. Let Ni,p(t) be the pth degree base or blending function and CPQi, CPVi, CPAi, and CPJi are the control points of displacement, velocity, acceleration and jerk, respectively, which are weight coefficients. From the B-spline property, the nodes Uq1, Uq2,…, Uqm+1 are added for B-spline calculation and m = n+p+1. Where m+1, n+1, p are number of nodes, control points and degree of B-spline, respectively. The 5th degree B-spline trajectory is formulated as; n+1
q(t ) = ∑ CPQi N i , p (t )
(7)
i =1
where p = 5 and
ti + p+1 − t t − ti N i , p−1 (t ) + N i +1, p−1 (t ) ti + p − ti ti + p +1 − ti +1
N i , p (t ) =
⎧ 1 ; ti ≤ t ≤ ti+1 N i ,0 (t ) = ⎨ ⎩0 ; elsewhere. The 4th degree function of velocity is obtained as; n
v(t ) = ∑ CPVi N i , p−1 (t )
(8)
i =1
where
CPVi =
p (CPQi +1 − CPQi ) Uqi+ p +1 − Uqi +1
i = 1, 2, … , n. The acceleration function is obtained as; n−1
a (t ) = ∑ CPAi N i , p−2 (t )
(9)
i =1
CPAi =
where
p −1 (CPVi+1 − CPVi ) Uvi+ p − Uvi+1
i = 1, 2,…, n − 1. And the jerk function is obtained as; n −2
j (t ) = ∑ CPJ i N i , p −3 (t )
(10)
i =1
where
CPJi =
p−2 (CPAi+1 − CPAi ) Uai+ p−1 − Uai+1
i = 1, 2,…, n − 2. Where Uq, Uv, and Ua are position, velocity, and acceleration’s nodes as seen in Fig. 9.
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms
29
Fig. 9 Example of a node sequence where the number of specified knots is 4
The CPVi, CPAi, and CPJi can be derived from CPQi. Therefore, the CPQi values can be obtained from the equations of the specified velocities, accelerations and jerks of the initial and the terminal conditions and the specified position at via-points in Table 1. A system of n+1 linear equations solving for n+1 unknowns CPQi , i = 1, 2, …, n + 1 is obtained. These linear equations are;
CPV1 = vinitial = 0, CPVn = v final = 0 CPA1 = ainitial = 0, CPAn = a final = 0
(11)
CPJ1 = jinitial = 0, CPJ n = j final = 0 and n +1
∑ N (τ ) ⋅ CPQ k =1
p ,k
i
j ,k
= VPR j ,i
(12)
where i = 1, 2, …, vp , vp is the number of specified knots in each joint. VPRj,i is the defined displacement value in j-th joint and i-th knot. Each joint of 5th degree B-spline trajectories and their derivatives are illustrated in Fig. 10-15. Note that jerk pattern in 5th degree B-spline trajectory is smoother than cubic spline.
Fig. 10 5th degree B-spline trajectory of joint 1
Fig. 11 5th degree B-spline trajectory of joint 2
30
P. Tangpattanakul, A. Meesomboon, and P. Artrit
Fig. 12 5th degree B-spline trajectory of joint 3
Fig. 13 5th degree B-spline trajectory of joint 4
Fig. 14 5th degree B-spline trajectory of joint 5
Fig. 15 5th degree B-spline trajectory of joint 6
Where
are position patterns (deg), are velocity patterns (deg/s), are acceleration patterns (deg/s2), are jerk patterns (deg/s3).
and
2.2 Constrained Optimization Problem The important consideration to increase the productivity is traveling time of robot manipulator. Therefore, the minimization of traveling time is here the investigated objective function. It leads to trajectories with large value of the kinematics quantities (velocities, accelerations and jerks). They cause to oscillate and overshoot which is difficult to control the position tracking. Moreover, the actuator can be damaged by sudden motion. Thus, the velocities, accelerations, and jerks constraints must also be considered in the optimization process. Hence, the objective function and constraints for finding the optimal trajectory planning problem can be formulated as: n −1
min ∑ hi i =1
subject to q j (t ) ≤ VC j , q j (t ) ≤ AC j , qj (t ) ≤ JC j ; j = 1, 2,…, N
(13)
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms
31
where VCj, ACj, and JCj are the velocity, acceleration, and jerk constraints for j-th joint, respectively. N is the number of robot joints. The interval times hi between via-points are computed by the constrained optimization problem (13).
2.3 Constraints Formulation of Spline • Constraint formulation of cubic spline The velocity constraints of the optimization problem are formulated as the maximum absolute value of velocities at the extreme points ti or ti+1 or ti* where * Q * j ,i = Q j ,i ti = 0 in each interval [9]. The velocity constraints become:
( )
{
}
max Q j ,i (t i ) , Q j ,i (t i +1 ) , Q * j ,i ≤ VC j ; j = 1, 2,… , N ; and i = 1, 2, …, n − 1.
(14)
The acceleration constraints are formulated from the acceleration linear function and the maximum absolute value exists at ti or ti+1. The acceleration constraints are
{
}
, … , Q ≤ AC ; j = 1, 2, … , N . max Q j ,1 j ,n j
(15)
The jerk constraints are formulated from the rate of change of acceleration.
Q j , i +1 − Q j , i hi
≤ JC j ;
j = 1, 2,… , N ; and i = 1, 2,… , n − 1.
(16)
The equations (14) to (16) are the constraints of the optimization problem in equation (13). • Constraints formulation of 5th degree B-spline th rd nd The velocity, acceleration and jerk functions are 4 , 3 and 2 degree polynomial, respectively. Their constraints cannot be determined for some points like cubic spline. Hence, sampling of some points from their functions is applied in the simulation. In this work, sampling rate is set to 0.01 sec/sample.
3 Harmony Search Algorithm Harmony Search (HS) is a heuristic optimization algorithm [10]. It has been shown that HS outperforms various optimization methods in many optimization problems [11]. HS mimics the improvisation of music players for searching the better harmony. The HS flowchart is shown in Fig. 16. The Harmony Search (HS) algorithm has been developed by combining features of others heuristic optimization methods. It preserves the history of past vectors similar to Tabu Search (TS) and ability to vary the adaptation rate as Simulated Annealing (SA). Furthermore, HS manages several vectors simultaneously in the
32
P. Tangpattanakul, A. Meesomboon, and P. Artrit
process similarly to the Genetic Algorithm (GA). However, the major difference between GA and HS is that HS makes a new vector from all existing vectors and can independently consider each component variable in a vector, while GA utilizes only two of the existing vectors and keep the structure of gene.
Fig. 16 Harmony Search flowchart
4 Simulation Results The simulation results of cubic spline and 5th degree B-spline trajectories compare two techniques, SQP and HS since SQP becomes more increasingly used in the area of robot trajectory path planning [8-9]. The knot positions (via-points) and kinematics constraints of the joints of 6-DOFs robot manipulator system are shown in Table 1 and 2, respectively.
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms
33
Table 1 Knot positions of each robot manipulator joint Joint
Point1 (deg)
Point2 (deg)
Point3 (deg)
Point4 (deg)
Point5 (deg)
Point6 (deg)
1
-10
2
20
Extra knot
60
20 120
Extra knot
55
50
35
3
15
100
-10
30
4
150
100
40
10
5
30
110
90
70
6
120
60
100
25
Table 2 Kinematics constraints of each robot manipulator joint Joint
Velocity (deg/s)
Acceleration 2 (deg/s )
Jerk 3 (deg/s )
1
100
60
60
2
95
60
66
3
100
75
85
4
150
70
70
5
130
90
75
6
110
80
70
• Cubic spline simulation results For the SQP method, the Gasparetto and Zanotto’s initial value finding algorithm is employed for the minimum traveling time trajectory planning. Since the SQP method requires the suitable initial value for solving the optimization problem. The initial vector is H0 = [0.6820 0.6820 1.7651 0.7179 0.7179]. The SQP simulation results (objective function value) when the number of digits is varied are shown in Table 3. Table 3 The SQP simulation results of cubic spline Digit’s number of initial values
Initial values vector (H0)
[1
0
[0.7
1 2 3 4
[0.6820
8.5310
0.7 1.8 0.7 0.7]
8.5726
0.68 1.77 0.72 0.72]
8.5310
0.682 1.765 0.718 0.718]
8.5310
0.6820 1.7651 0.7179 0.7179]
8.5310
[0.68 [0.682
1 2 1 1]
Minimum value of the objective function (sec)
34
P. Tangpattanakul, A. Meesomboon, and P. Artrit
For the HS method which does not need the initial value, the simulation results are shown in Table 4. Table 4 The HS simulation results of cubic spline Number of iterations
Minimum value of the objective function (sec)
10,000 50,000 100,000 200,000
8.5718 8.5607 8.5586 8.5577
The cubic spline simulation results show that HS obtains the better solution than SQP with the unsuitable initial value. Moreover, it can eliminate the initial value finding process [12]. • 5th degree B-spline simulation results For the SQP method, the initial vector is taken from Gasparetto and Zonotto’s algorithm which is H0 = [1.4138 1.4138 3.6594 1.4883 1.4883]. The SQP simulation obtains 8.4935 sec for the minimum traveling time, when the initial value is set suitably. For the HS method, the simulation results are shown in Table 5. Table 5 The HS simulation results of 5th degree B-spline Number of iterations
Minimum value of the objective function (sec)
10,000 50,000 100,000 200,000
10.2646 9.0735 8.5976 8.5709
The 5th degree B-spline simulation results show that SQP method with the proper initial value obtains the better solution. Since the SQP and the HS have different advantages, the hybrid method as Hybrid Harmony Search Algorithm (HHSA) is implemented to take the advantages of both techniques. The HHSA is hybridizing the Harmony Search (HS) algorithm with the Sequential Quadratic Programming (SQP) [13]. The HS can find near global optimum while the SQP is used to speed up local search and has the precision to find the local solution. Thus, the HHSA is an effective method for searching the exact global optimum. The HHSA has procedures which base on the HS. In each iteration, after it obtains the new vector, the SQP method is inserted on this step. The new vector is set to be the initial value for SQP method. Then the SQP solution is compared with the worst objective function value in HM. After that, it follows the HS procedures. In
Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms
35
last iteration, the best vector in HM is set to be the initial solution of SQP method. In this final step the SQP solution is the result of the optimization problem. The HHSA simulation results for cubic spline and 5th degree B-spline are shown in Table 6. Table 6 The HHSA simulation results after 10 iterations Trajectory forms
Minimum value of the objective function (sec)
Cubic spline 5th degree B-spline
8.5310 8.4935
The results of three optimization techniques are compared for cubic spline and 5th degree B-spline trajectories. The simulation results show that if the SQP initial value is not set properly, the SQP obtains the worse solution than the HS. However, the HHSA provides the better. Moreover, HHSA obtains the best solution without the initial value finding process where as SQP method requires. The results show that HS and HHSA are efficient enough to solve the optimal trajectory problem. It yields the best solution that gives the minimum time trajectory and satisfies the kinematics limitation constraints of the optimization problem.
5 Conclusions The trajectory planning of a 6-DOFs robot manipulator is set as our problem for finding the minimum time trajectory using HS. The cubic spline and 5th degree Bspline are employed to be the trajectory forms because they represent various types of work. The objective function is the minimum traveling time with kinematics constraints (velocity, acceleration, and jerk limitations). Three optimization techniques (HS, SQP, and HHSA) are compared. The results show that if the initial value for SQP method is not set properly, HS obtains the better solution than SQP. The HHSA results are as good as the SQP with the suitable initial value. The HHSA operates together with HS and SQP advantages. Moreover, HS and HHSA can eliminate the initial value finding process and they can reduce the error that may occur by the unsuitable initial value setting. Therefore, an important conclusion to address is that a heuristic algorithm like HS is simple and can be applied together with a conventional optimization algorithm like SQP in order to find a global optimum.
References 1. Piazzi, A., Visioli, A.: A global optimization approach to trajectory planning for industrial robots. In: Proceedings of the 1997 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 1997s), Grenoble, France, September 7-11 (1997) 2. Spangelo, I., Egeland, O.: Generation of energy-optimal trajectories for an autonomous underwater vehicle. In: Proceedings of the 1992 IEEE International Conference on Robotics and Automation, Nice, France, May 12-14 (1992)
36
P. Tangpattanakul, A. Meesomboon, and P. Artrit
3. Piazzi, A., Visioli, A.: Global minimum-jerk trajectory planning of robot manipulators. IEEE Transactions on Industrial Electronics 47, 140–149 (2000) 4. Garg, D.P., Kumar, M.: Optimization techniques applied to multiple manipulators for path planning and torque minimization. Enginnering Applications of Artificial Intelligence 15, 241–252 (2002) 5. Saramago, S.F.P., Steffen Jr., V.: Optimization of the trajectory planning of robot manipulators taking into account the dynamics of the system. Mechanism and Machine Theory 33, 883–894 (1998) 6. Zhu, X., Wang, H., Zhao, M.: Using nonlinear constrained optimization methods to solve manipulators path planning with hybrid genetic algorithms. In: Proceedings of IEEE International Conference on Robotics and Biomimetics (ROBIO), Shatin, Hong Kong, 29 June-3 July (2005) 7. Chettibi, T., Lehtihet, H.E., Haddad, M., et al.: Minimum cost trajectory planning for industrial robots. European Journal of Mechnics A/Solids 23, 703–715 (2004) 8. Gasparetto, A., Zanotto, V.: A new method for smooth trajectory planning of robot manipulators. Mechanism and Machine Theory 42, 455–471 (2007) 9. Gasparetto, A., Zanotto, V.: A technique for time-jerk optimal planning of robot trajectories. Robotics and Computer-Integrated Manufacturing 24, 415–426 (2008) 10. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001) 11. Lee, K.S., Geem, Z.W.: A new meta-heuristic algorithm for continuous engineering optimization: harmony search theory and practice. Computer Methods in Applied Mechanics and Engineering 194, 3902–3933 (2005) 12. Tangpattanakul, P., Artrit, P.: Minimum-Time Trajectory of Robot Manipulator Using Harmony Search Algorithm. In: 6th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTICON 2009), Chonburi, Thailand, May 6-9 (2009) 13. Fesanghary, M., Mahdavi, M., Minary-Jolandan, M., et al.: Hybridizing harmony search algorithm with sequential quadratic programming for engineering optimization problems. Computer Methods in Applied Mechanics and Engineering 197, 3080–3091 (2008)
Visual Tracking Using Harmony Search Jaco Fourie , Steven Mills, and Richard Green 1
Abstract. In this chapter we present a novel method for tracking an arbitrary target through a video sequence using the Harmony Search algorithm called the Harmony Filter. The Harmony Filter models the target using a color histogram and compares potential matches in each video frame using the Bhattacharyya coefficient. Matches are found using the Improved Harmony Search (IHS) algorithm. Experimental results show that the Harmony Filter can robustly track targets in challenging environments while still maintaining real-time performance. We compare the runtime and accuracy performance of the Harmony Filter with other popular methods used in visual tracking including the particle filter and the Kalman Filter. We show that the Harmony filter performs better in both speed and accuracy than similar systems based on the particle filter and the Unscented Kalman Filter (UKF).
1 Introduction A visual tracking system is one that can correctly and robustly identify an arbitrary target’s location across the frames of a video sequence. In general, the target moves from frame to frame and is found at a different position in every frame. The target can also change its appearance between frames due to being obscured by other objects, motion blurring, rotation, and various other effects often encountered in video sequences. This is a challenging problem since it is difficult to predict where the target will appear in the next frame and since targets can only be approximately identified due to their changing appearance. An example of a visual tracking system tracking the trajectory of a ball is shown in Figure 1. One of the most popular methods used to design visual tracking systems is the Kalman Filter [1, 2]. The Kalman Filter is a statistical recursive filter that can estimate the state of a linear system from noisy measurements. When the problem cannot be accurately modeled as a linear system, as is often the case in visual tracking, the Kalman Filter can be adapted by using nonlinear approximations. Two examples of adapted Kalman Filters used successfully in visual tracking are the Extended Kalman Filter (EKF) and the Unscented Kalman Filter (UKF) [3]. Jaco Fourie, Steven Mills, and Richard Green Computer Science and Software Engineering, University of Canterbury, Christchurch, New Zealand E-mail:
[email protected] Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 37–50. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
38
J. Fourie, S. Mills, and R. Green
Fig. 1 An example of a tracking system tracking the trajectory of a ball. The white circles indicate the position of the ball through a series of frames [10].
However, the Kalman Filter models the position of the target and the noise in the system as a Gaussian distribution. This is often an inaccurate assumption and causes the tracking system to lose the target in challenging environments. For this reason more robust algorithms that make no assumptions about the system noise or the target distribution are often preferable. The particle filter is one such algorithm and has become popular in visual tracking systems due to its accurate performance in challenging tracking problems [4]. The particle filter is an importance sampling method that models the target’s position distribution as a point cloud using Monte Carlo sampling. It makes no assumptions about the shape of the distribution and can accurately model nonGaussian distributions. However, the accuracy of the particle filter is dependent on the number of particles used to model the distribution. As more particles are used the accuracy improves but so does the computational costs. The high computational cost of the particle filter often makes it impractical for real-time tracking systems. An alternate approach that has recently been investigated by several researchers is to use heuristic optimization algorithms to find and track the target. Most of these methods involve the use of a genetic algorithm or the particle swarm algorithm [5, 6, 7]. The advantage of these algorithms is that no assumptions are made
Visual Tracking Using Harmony Search
39
about the system noise or the target’s distribution within a frame. As a result the designer is free to model the target and its predicted movement in any way, which gives this approach the potential for increased accuracy in situations where other methods would be constrained to linear, continuous, or differentiable approximations that might not model the target correctly. However, the high computational cost associated with most of these algorithms keep them from being used in many tracking problems where real-time performance is required. In this chapter we introduce a novel method for visual tracking based on the Harmony Search algorithm called the Harmony Filter. The Harmony Filter treats the visual tracking problem as a frame-by-frame optimization problem that uses the Improved Harmony Search (IHS) algorithm to find the approximated optimal target position at every frame. We show that the Harmony Filter can accurately find the target even when it is poorly modeled for the surrounding environment while still maintaining real-time performance. This chapter is an overview of the Harmony Filter and interested readers are referred to [8] for more technical details. In the section that follows the design of the Harmony Filter is discussed. The focus will be on the way in which the visual tracking problem can be interpreted as an optimization problem, and the use of Harmony Search to find this optimum. Specific ways that Harmony Search was adapted to improve tracking performance will also be discussed. Section 3 gives some tracking results and compares the Harmony filter’s accuracy and performance with that of the particle filter and the UKF.
2 Design of the Harmony Filter By interpreting the visual tracking problem as an optimization problem the IHS algorithm can be used to find the optimal target position. We do this by modeling the target as a color histogram and comparing this histogram with candidate histograms generated from different regions of the frame. Histograms are compared using the Bhattacharyya coefficient that measures the similarity between histograms and is defined as N
Β(t , c) = ∑ t (i )c(i ) , i =1
where N is the number of bins in the histograms, and t and c are the histograms being compared [9]. This approach of modeling targets as color histograms and comparing them using the Bhattacharyya coefficient has been used successfully by various other researchers and has proven to be robust to many of the appearance changes that targets can undergo in a video sequence [9, 10]. At each frame in the video sequence candidate histograms are generated from possible target locations in the frame. Each candidate histogram is then compared with the histogram originally generated from the target and the one that is closest to the target histogram represents the most likely target position in the current frame.
40
J. Fourie, S. Mills, and R. Green
The problem to be optimized is then to find the region in the frame that generates the histogram that is most similar to the target histogram. The search space of candidate regions is every pixel position in the frame and can be very large depending on the video resolution. The distribution of the evaluation function we are optimizing is generally not Gaussian and is often multi-modal with many local optima that make it difficult for traditional optimization algorithms to find the global optimum. The Harmony Search algorithm is therefore an appropriate solution since it makes no assumptions on the search space or target distribution and is fast enough to allow for real-time performance.
2.1 Architecture The Harmony Filter tracking system consists of two components and is illustrated in Figure 2. The main tracker component, shown on the left, receives a constant image stream that is augmented to indicate the target position and rendered to screen. The user starts the system by choosing a target to track by drawing a box around it. The tracker then generates a reference histogram from the indicated region and stores it for future reference. The position of the target is approximated in real-time by the second component that forms the core of the Harmony Filter, the Harmony Search optimizer (HSO). The HSO is initialized by filling the harmony memory (HM) with candidate solutions based on the approximated position from the previous frame. This ensures quick convergence and maintains real-time performance.
Fig. 2 The Harmony Filter algorithm
Visual Tracking Using Harmony Search
41
2.2 Harmony Search Adapted for Visual Tracking The HSO is based on the Improved Harmony Search (IHS) algorithm in which the pitch adjustment rate (PAR) and bandwidth (BW) parameters are updated dynamically to move the focus from exploration at the start of the search to accurate convergence near the end [11]. The IHS algorithm improves the original HS algorithm by decreasing the number of iterations needed for convergence while maintaining high accuracy. It does this with the minimum amount of computational overhead which makes it well-suited to our real-time visual tracking system. 2.2.1 Initialization of the HM As mentioned before, the HM is initialized based on the previous position of the target. A predicted target position is calculated using a simple motion model that assumes steady velocity of the target between frames. This predicted position is then randomly perturbed by small amounts to create initial candidate solution vectors to fill the HM. For this problem we choose the state solution vector that specifies the target’s location, velocity and scale as
xi = [ x, y, x, y , s ] , where x, y is the location of the target in pixel coordinates, x , y is the velocity of the target and s is a scaling parameter that controls the size of the box around the target. The simple motion model used to initialize the HM is defined by
1 xt +1 = xt + xt + a x 2 1 yt +1 = yt + y t + a y 2 xt +1 = xt + a x y t +1 = y t + a y , where
a x , a y are randomly generated accelerations in the x and y directions.
Once the HM has been initialized new candidate solutions are improvised using the standard HS algorithm and the HM is updated until convergence to the optimal solution is detected. Since the predicted target position can be calculated from its velocity and previous position, only the x , y and s components are explored during the improvisation process. This speeds up the convergence by limiting the search space to only solution vectors that are mathematically possible. 2.2.2
Convergence Testing
Convergence is detected using three separate tests. If any of the three tests indicate that the algorithm converged, the algorithm is terminated and the best solution vector found in the HM is returned as the optimal target position.
42
J. Fourie, S. Mills, and R. Green
The first test measures the spatial distance between the best solution in the HM and worst. If the distance is smaller than some threshold and the best solution has a sufficiently high fitness weight (determined by its histogram distance from the reference target histogram) the test passes and convergence is assumed. This test works by assuming that HS has converged when all the solution vectors in the HM become nearly identical. This is usually a good indication that HS found the optimal solution but it is also possible that during the initialization phase all vectors gets initialized to an area far from the true target position. Erratic target motion often causes this situation where all candidate solutions in the HM are equally bad but spatially close together indicating possible convergence. It is therefore necessary to test the weight of the best vector in the HM and ensure that it is sufficiently high to be confident that HS converged to the correct position before the search is terminated. Figure 3 illustrates how this test would detect convergence in three common situations. When the first convergence test fails the second test counts the number of consecutive iterations that have not updated the HM. These idle iterations indicate that no progress is being made and that the target cannot be found or that convergence is slow. After a specified number of consecutive idle iterations it is assumed that no further progress will be made and the search is terminated. When both the first and second test fails the final test bounds the search to a maximum number of iterations. If the number of iterations exceeds the maximum the search is terminated. The convergence tests prevent wasted computations by terminating the search early when no progress is being made or when they detect that the optimal solution has been found. It is important to keep wasted computations to a minimum to ensure real-time performance.
Fig. 3 The first convergence test will fail if the candidates are spread out in the search space or if the best candidate histogram is not sufficiently similar to the reference target histogram. In the first example the candidates are too spread out and the search will continue. The second example shows incorrect convergence or bad initialization and the search will continue due to the best candidate not being similar enough to the target. In the last example the test passes and the search is terminated.
Visual Tracking Using Harmony Search
43
2.2.3 Lost Tracker Recovery In challenging environments the tracker often loses the target momentarily. This is usually due to the target becoming partially or fully occluded by other objects in the frame or the target moving out of frame. An example of this is seen in Figure 4. Erratic, unpredictable movement can also cause the tracker to become unable to find the target. When the tracker loses its target it must recover quickly and the HSO is reset to search the entire frame instead of concentrating on the area predicted by the motion model. Detection of a lost tracker is done by comparing the fitness weight of the best candidate from the previous frame with a specified threshold value. If the weight is below the threshold the tracker is considered lost and the search process is adapted until the best candidate’s fitness is again above the threshold. The search process is adapted by ignoring the motion model and initializing the HM with random solutions from the entire search space (the whole frame). The distributions used to generate random improvisations are also changed from normal around the motion model predicted solution, to uniform covering the whole search space. This indicates that the target can be anywhere in the frame and that all previous knowledge should be disregarded. The ability to quickly recover when the target is lost is one of the novel advantages that the Harmony Filter has over other popular tracking methods like the Kalman Filter. Often when the target moves out of frame or becomes occluded the motion model, which plays a larger role in the Kalman and particle filters, will lead the tracker away from the target’s true position. The tracker then becomes lost and will likely never recover if it only relies on its motion model for direction. The Harmony Filter generally recovers much more quickly due to its weak reliance on a predictive motion model.
Fig. 4 In this example the target is an orange square on the wall. In the left image the tracker is successfully tracking the target indicated by the red square drawn around the correct target position. In a later frame the hand occludes the target completely causing the tracker to lose the target.
44
J. Fourie, S. Mills, and R. Green
In the section that follows the Harmony Filter is compared with a particle filter and a UKF based tracking system in challenging conditions. Its ability to quickly recover from occlusion and erratic movement is shown to be a main reason for its increased overall accuracy and performance.
3 Results In this section the accuracy and performance of the Harmony Filter is illustrated using two example video sequences. We also compare the results with those obtained from particle filter and UKF based visual tracking systems. The video sequences were captured using a low-cost webcam at a resolution of 352×288 at 15 frames/second. The low frame rate combined with the low resolution and poor image quality makes it difficult to accurately model the target and predict its movement. To further complicate the examples, targets were chosen to move erratically and are often occluded. Accuracy in both examples is tested by first manually labelling each frame of the video sequence with the correct position of the target. Tracker accuracy is then calculated by measuring the Euclidean distance from the true target position to the position estimated by the target for each frame in the sequence. Each algorithm’s performance is measured by the amount of time it takes to process a single frame and return an estimated target position. In our first example a man walking along a footpath is chosen as the target. The target and surrounding environment is shown in Figure 5. The sequence starts with the target standing still for several frames at one end of the path and then quickly running in a zigzag way to the end of the path. Near the end of the path the target becomes partially occluded by leaves from the tree in the foreground. He then changes direction and runs back the way he came. The transition from standing motionless to quickly running, combined with rapid changes in direction from the zigzag motion, causes the motion model to fail in accurately predicting the target’s next location. This often causes the tracker to lose the target which makes this example highly appropriate for testing the tracker’s ability to recover from losing the target. The results from this test are shown in Figures 6 and 7. In Figure 6 the accuracy, measured as Euclidean distance from the true position, is compared with a UKF based tracker and a particle filter based tracker. In Figure 7 the performance is compared using the same set of tracker implementations. Two versions of the particle filter is investigated, one with 300 particles and one with 500. Notice from Figure 6 how the particle filter implementations were unable to recover from losing the target near the start of the sequence while the UKF and Harmony Filter managed to track the target for much longer. Near the end of the sequence the Harmony Filter loses the target before the UKF does but immediately starts recovering and eventually accurately captures that target again. However, when the UKF loses the target it just drifts further away without ever recovering.
Visual Tracking Using Harmony Search
45
Fig. 5 In this example the target is a man walking along a footpath. Bad light conditions, glare from the building in the background and glare from the wet footpath make this a challenging environment for color histogram based visual tracking.
Fig. 6 The accuracy of the Harmony Filter is compared with three other tracker implementations. In this example the particle filter implementations suffer from early target loss without recovery while both the UKF and Harmony Filter performs well until almost the end of the sequence. Both trackers eventually lose the target due to occlusion but the Harmony Filter eventually recovers while the UKF does not.
46
J. Fourie, S. Mills, and R. Green
Fig. 7 The performance of the Harmony Filter is compared with three other tracker implementations. The particle filter implementations lag behind the Harmony Filter and UKF implementations by at least 20ms while the performance difference between the harmony filter and the UKF is negligibly small for this example.
In Figure 7 one notices that the performance of the Harmony Filter varies much more than it does with the other trackers. This is due to the convergence detecting tests that might terminate the search early or late depending on its confidence in the solution. The particle filter implementations are clearly slower than both the UKF and the Harmony Filter but the difference in speed between the UKF and the Harmony Filter is negligible in this example with the Harmony Filter only being slightly faster on average. In the second example an orange square is chosen as the target and is often occluded by a much larger but similarly colored object (a hand). The target and environment is shown in Figure 4. As in the previous example the Harmony Filter’s accuracy and performance is compared with that of the UKF and two particle filter implementations. In this example the target is occluded for several frames by moving a hand in front of the camera lens. At the same time the camera is pulled and rotated randomly in all directions to simulate the worst possible erratic motion. During the sequence the target also moves out of frame for several frames forcing all implementations to lose the target. However, the target itself, a simple orange square, is much better represented by a color histogram model than the person in the previous example. This makes it easier for all tracker implementations to find the target and recover it when lost. The results from the accuracy comparison are shown in Figure 8. Notice that all implementations performed well at the beginning of the sequence before the target
Visual Tracking Using Harmony Search
47
gets occluded. However, at approximately frame 70, occlusion causes all four trackers to lose the target and must recover when the target becomes visible again. The Harmony Filter recovers quickly in most cases while the UKF and particle filters never fully recover in this example.
Fig. 8 The accuracy of the Harmony filter is compared with two particle filter implementations and a UKF implementation. The sub-image is an enlarged section of the graph illustrating and comparing performance immediately following a long period of occlusion. The Harmony Filter is shown to recover quickly from occlusion while the UKF and particle filters only momentarily recover the target for one or two frames.
An example comparing the behavior of the four trackers during occlusion recovery and erratic motion is shown in Figure 9. In this example each column represents a frame from the sequence and each row represents a tracker implementation. The Harmony Filter is more accurate in both scale and position compared to the other trackers. The Harmony Filter’s speed for this example is compared with that of the UKF and particle filter trackers in Figure 10. As in the first example, the Harmony Filter’s speed varies depending on the situation but performs faster on average than the other tracking implementations. In both the first and second examples we saw that the performance of the Harmony Filter is not as stable as that of the UKF and particle filter. This is due to the convergence detection scheme of section 2.2.2 that causes the algorithm to terminate early or late depending on how difficult the target was to find. The Harmony Filter’s ability to detect convergence early results in good average performance
48
J. Fourie, S. Mills, and R. Green
Fig. 9 Two frames from a challenging tracking sequence are used to compare the Harmony Filter’s ability to accurately recover the target with that of the UKF and particle filter based trackers. The first image row shows the Harmony Filter accurately indicating the target’s position while the UKF and particle filter trackers still need to recover the target.
over all frames but does not guarantee good performance on every frame unless the maximum number of iterations is bounded to be low enough. One should note that when more stable performance is required the first two convergence tests can be disabled causing the maximum number of iterations to be performed at each frame. The speed of the algorithm can then be controlled by the maximum number of iterations in the same way that the number of particles is used to control the speed of the particle filter.
Visual Tracking Using Harmony Search
49
Fig. 10 The performance of the Harmony filter in the second example is compared with that of the UKF and particle filter trackers. In most cases the Harmony Filter converges faster than its competitors.
4 Conclusions Accurate visual tracking has been the subject of much research and has traditionally focussed on statistical methods. The most success in this field has been obtained using variations of the Kalman and particle filters. However, these methods suffer when the surrounding environment makes it difficult to accurately model the target. In this chapter a visual tracking system based on the Harmony Search algorithm was introduced that could accurately track a poorly modelled target under challenging conditions. Unlike the Kalman and particle filter, no assumption on Gaussian system noise is made making the tracker more robust in situations where this assumption cannot be made. The accuracy of the Harmony Filter under challenging conditions was compared with that of the UKF and the particle filter. The Harmony filter was shown to be more accurate in general and is able to recover from losing the target in situations were neither the UKF nor particle filter was able.
References 1. Gutman, P., Velger, M.: Tracking Targets Using Adaptive Kalman Filtering. IEEE Trans. On Aerospace and Electronic Systems 26, 691–699 (1990) 2. Li, M., Hong, B., Cai, Z., Luo, R.: Novel Rao-Blackwellized Particle Filter for Mobile Robot SLAM Using Monocular Vision. International Journal of Intelligent Technology 1(1), 63–69 (2006)
50
J. Fourie, S. Mills, and R. Green
3. Li, P., Zhang, T., Ma, B.: Unscented Kalman Filter for Visual Curve Tracking. Image and Vision Computing, 157–164 (2004) 4. Isard, M., Blake, A.: Condensation – Conditional Density Propagation for Visual Tracking. IJCV 29(1), 5–28 (1998) 5. Minami, M., Agbanhan, J., Asakura, T.: Manipulator Visual Servoing and Tracking of Fish Using a Genetic Algorithm. Industrial Robot: An International Journal 26(4), 278–289 (1999) 6. Morsley, Y., Djouadi, M.S.: Genetic Algorithm Combined to IMM Approach for Tracking Highly Maneuvering Targets. IAENG International Journal of Computer Science 35 (2008); advanced online publication 19 February 2008 7. Sulistijono, I.A., Kubota, N.: Human Head Tracking Based on Particle Swarm Optimisation and Genetic Algorithm. Journal of Advanced Computational Intelligence and Intelligent Informatics 11(6), 681–687 (2007) 8. Fourie, J., Mills, S., Green, R.: Visual Tracking Using the Harmony Search Algorithm. In: IVCNZ 23rd International Conference on Image and Vision Computing New Zealand, pp. 1–6 (2008) 9. Kailath, T.: The Divergence and Bhattacharyya Distance Measures in Signal Selection. IEEE Trans. On Comm. Technology 15(1), 52–60 (1967) 10. Comaniciu, D., Ramesh, V., Meer, P.: Kernel-Based Object Tracking. IEEE Trans. Pattern Anal. Mach. Intell. 25(5), 564–575 (2003) 11. Mahdavi, M., Fesanghary, M., Damangir, E.: An Improved Harmony Search Algorithm for Solving Optimization Problems. Applied Mathematics and Computation 188, 1567–1579 (2007)
Web Text Mining Using Harmony Search Rana Forsati and Mehrdad Mahdavi *
**
Abstract. The Harmony Search (HS) algorithm in recent years has been applied in many applications in computer science and engineering. This chapter is intended to review the application of the HS method in the area of web document clustering. Clustering is a problem of great practical importance that has been the focus of substantial research in several domains for decades. It is defined as the problem of partitioning data objects into groups, such that objects in the same group are similar, while objects in different groups are dissimilar. Due to the high-dimension and sparseness properties of documents the problem of clustering becomes more challenging when we apply it on web documents. Two algorithms in literature were proposed for clustering web documents with HS which will be reviewed in this chapter. Also three hybridization of HS based clustering with K-means algorithm will be reviewed. It will be shown that the HS method can outperform other methods in terms of solution quality and computational time.
1 Introduction This chapter deals with the application of Harmony Search (HS) in web document clustering. First, two algorithms based on HS will be presented for clustering where they differ in representation of solutions and application of pitch adjusting process. Then we turn into some hybridization of HS based clustering with Kmeans algorithm to combine explorative power of HS based algorithm with finetuning power of K-means. Recently, as the web developed rapidly, a large collection of full-text documents in electronic form is available and opportunities to get a useful piece of information from the web are increased. On the other hand, it becomes more difficult to get useful information from such giant amount of documents. This causes that research areas such as information retrieval, information filtering and text clustering have been studied actively all over the world. Rana Forsati Department of Electrical and Computer Engineering, Shahid Beheshti University, G. C. Tehran, Iran E-mail:
[email protected] Mehrdad Mahdavi Department of Computer Engineering, Sharif University of Technology, Tehran, Iran, E-mail:
[email protected] Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 51–64. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
52
R. Forsati and M. Mahdavi
Clustering is one of the crucial unsupervised techniques for dealing with massive amounts of heterogeneous information on the web [1]. The clustering involves dividing a set of documents into a specified number of groups. The documents within each group should exhibit a large degree of similarity while the similarity among different clusters should be minimized. Initially, document clustering was evaluated for enhancing the results in information retrieval systems [2]. Then, clustering has been proposed as an efficient way of finding automatically related topics or new ones; in filtering tasks [3] and grouping the retrieved documents into a list of meaningful categories, facilitating query processing by searching only clusters closest to the query [4]. On the web, this task has other additional roles; it can be used for enhancing search engine results, enhancing web crawling, and organizing the knowledge. Some of the more familiar clustering methods are: partitioning algorithms based on dividing entire data into dissimilar groups, hierarchical methods, density and grid based clustering, some graph based methods and etc. [5, 6]. The aim of clustering is to find the hidden structure underlying a given collection of data points. The clustering methods proposed in the literature can be classified into two major categories: discriminative (or similarity-based) approaches and generative (or model-based) approaches [7]. In similarity-based approaches, one optimizes an objective function involving the pairwise document similarities, aiming to maximize the average similarities within clusters and minimize the average similarities between clusters. Model-based approaches, on the other hand, attempt to learn generative models from the documents, with each model representing one particular document group. Model-based clustering assumes that the data were generated by a model and tries to recover the original model from the data. The model that we recover from the data then defines clusters and an assignment of documents to clusters. Modelbased clustering algorithms are particularly attractive as each iteration is linear in the size of the input. Also, online algorithms can be easily constructed for modelbased clustering using competitive learning techniques [7, 8]. In an overall categorization, we can divide the web document clustering algorithms from another view into two main categories: hierarchal and partitional algorithms. Hierarchical algorithms [9-12] create a hierarchical decomposition of the given dataset forming a dendrogram—a tree which splits the dataset recursively into smaller subsets and represent the documents in a multi-level and tree-like structure [13]. The hierarchical algorithms can be further divided into agglomerative algorithms or divisive algorithms [14]. In the agglomerative algorithms, each document is initially assigned to a different cluster. The algorithm then repeatedly merges pairs of clusters until a certain stopping criterion is met [14]. On the other hand, the divisive algorithms divide the whole set of documents into a certain number of clusters. Meanwhile partitioning methods cluster the data in a single level instead of a clustering structure, such as the dendrogram produced by a hierarchical technique [15-18].
Web Text Mining Using Harmony Search
53
Although hierarchical methods are often said to have better quality clustering results, usually they do not provide the reallocation of pages, which may have been poorly classified in the early stages of the text analysis [5]. Moreover, thetime complexity of hierarchical methods is quadratic [18]. On the other hands, in recent years the partitioning clustering methods are well suited for clustering a large document dataset due to their relatively low computational requirements [15-19, 13]. Partitioning methods try to partition a collection of documents into a set of groups, so as to maximize a pre-defined fitness value. The clusters can be overlapped or not. It seems that in recent years the partitioning clustering methods are well suited for clustering a large document dataset due to their relatively low computational requirements [11]. The time complexity of the partitioning technique is almost linear, which makes it widely used. In the field of clustering, Kmeans algorithm [20] is the most popularly used algorithm to find a partition that minimizes mean square error (MSE) measure, that, in a simple form, selects K documents as cluster centers and assigns each document to the nearest center. The updating and reassigning process can be kept until a convergence criterion is met. Although K-means is an extensively useful, simple, straightforward, easy to be implemented, and fast in most situations, it suffers from several major drawbacks that make it inappropriate for many applications [21]. The objective function of the K-means is not convex and hence it may contain local minima. Consequently, while minimizing the objective function, there is possibility of getting stuck at local minima (also at local maxima and saddle point). The performance of the Kmeans algorithm depends on the initial choice of the cluster centers. To deal with the limitations that exist in traditional partition clustering methods especially Kmeans, recently, new concepts and techniques have been entered into web data mining, with respect to increasing need for the web knowledge extraction. One major approach is to use machine learning [22, 6, 23] that includes several techniques. One of these techniques is optimization methods that try to optimize a predefined function, which can be very useful in web document clustering. The major challenges for document clustering consist currently in the following three domains [24]: very high dimensionality of the data (~ 10,000 terms), very large size of the databases (particularly the World Wide Web) and understandable description of the clusters. K-means [20] (or its variants) is a good choice for above challenges, because of its efficiency and effectiveness [18]. About the clustering of large document sets, a major part of efforts have been concerned to the learning methods such as optimization techniques. This is mostly owing to the lack of orthognality, and existing high dimension vectors. One of the advantages of partitional clustering algorithms is that they use information about the collection of documents when they partition the dataset into a certain number of clusters. So, the optimization methods can be employed for partitional clustering. Optimization techniques define a goal function and by traversing the search space, try to optimize its value. Regarding to this definition, K-means can be considered as an optimization method. Dividing n data into K clusters give rise to a huge number of possible partitions, which is expressed in the form of the Stirling number:
54
R. Forsati and M. Mahdavi
⎛K⎞ 1 K ∑ (− 1)K −i ⎜⎜ i ⎟⎟i n K ! i =1 ⎝ ⎠
(1)
This illustrates that the clustering by examining all possible partitions of n documents of t-dimensions into K clusters is not computationally feasible. Obviously, we need to resort to some optimization techniques to reduce the search space, but then there is no guarantee that the optimal solution will be found. Recently, the use of global optimization techniques, such as Genetic Algorithm (GA) [25], Self-Organizing Maps (SOM) [26] and Ant Clustering [27], has been used for document clustering. Particle Swarm Optimization (PSO) [28] is another computational intelligence method that has been applied to image clustering and other low dimensional datasets in [29, 30] and to document clustering in [31]. They are capable of searching for optimal or near-optimal solutions on complex, large spaces of possible solutions. Because of this advantage, it may represent another useful tool in the field of cluster analysis. Typically, these stochastic approaches take a large amount of time to converge to a globally optimal partition. Although various optimization methodologies have been developed for optimal clustering, the complexity of the task reveals the need for developing efficient algorithms to precisely locate the optimum solution. In this context, this study presents a novel stochastic approach for document clustering, aiming at a better time complexity and partitioning accuracy. In fact, in optimization problems, we want to search the solution space and with HS this search can be done more efficiently. Since stochastic optimization approaches are good at avoiding convergence to a locally optimal solution, these approaches could be used to find a globally optimal solution. Typically the stochastic approaches take a large amount of time to converge to a globally optimal partition. This chapter is organized as follows. In section 2 we concentrate on the modeling of documents as being suitable for clustering and the different measures for evaluation of clustering algorithm’s efficiency and quality. Then in sections 3 and 4 the HS based algorithms for document clustering will be presented.
2 Web Document Clustering: An Overview Clustering is defined as the problem of partitioning data objects into groups, such that objects in the same group are similar, while objects in different groups are dissimilar. This definition assumes that there is some well defined notion of similarity, or distance, between data objects. When the objects are defined by a set of numerical attributes, there are natural definitions of distance based on geometric analogies. These definitions rely on the semantics of the data values themselves. The definition of distance allows us to define a quality measure for a clustering. Clustering then becomes the problem of grouping together points such that the quality measure is optimized. In this section the process of transforming documents to vectors, similarity measures between document’s vectors and the clustering algorithm evaluation measures will be presented.
Web Text Mining Using Harmony Search
55
2.1 Document Representation and Similarity Computation In most document clustering algorithms, documents are represented using vectorspace model. In this model, each document d is considered to be a vector K d = {d1 , d 2 , …, d t } in term-space (set of document “words”) where d i is the weight of dimension i in vector space and t is the number of term dimensions. In text documents each weight d i represents the term weight of term i in the document. The most widely used weighting approach for term weights is the combination of Term Frequency and Inverse Document Frequency (TF-IDF) [32, 33]. In this approach the weight of term i in document j is defined as (2).
(
w ji = tf ji × idf ji = tf ji × log 2 n / df ji
)
(2)
Here tfji is the numbers of occurrences of term i in the document j; dfij is the total term frequency in data set and n is the number of documents. One of the major problems in text mining is that a document can contain a very large number of words. If each of these words is represented as a vector coordinate, the number of dimensions would be too high for the text mining algorithm. Hence, it is crucial to apply preprocessing methods that greatly reduce the number of dimensions (words) to be given to the text mining algorithm. In those document datasets, the very common words (e.g. function words: “a”, “the”, “in”, “to”; pronouns: “I”, “he”, “she”, “it”) are stripped out completely and different forms of a word are reduced to one canonical form by using Porter’s algorithm [28] . The similarity between two documents must be measured in some way if a clustering algorithm is to be used. The vector space model gives us a good opportunity for defining different metrics for similarity between two documents. The most common similarity metrics are Minkowski distances [34] and cosine measure [33-35]. Minkowski distances computes the distance of documents d and d ′ by (3) (for n = 2 it is converted to Euclidean distance). ⎛ t n⎞ Dn (d , d ′) = ⎜⎜ ∑ d i − d i′ ⎟⎟ ⎝ i =1 ⎠
1/ n
(3)
Cosine measure is defined by (4) where d T ⋅ d ′ is the inner product (dot-product) of two vectors. cos( d , d ′) =
dT • d′ d d′
(4)
where “ • ” denotes the dot product of two vectors, and “ • ” denotes the length of a vector. This measure becomes one if the documents are identical, and zero if there is nothing in common between them (i.e., the vectors are orthogonal to each other). Both metrics are widely used in the text document clustering literatures. But it seems that in the cases where the number of dimensions of two vectors differs
56
R. Forsati and M. Mahdavi
largely, the cosine is more useful. In cases which two vectors have almost the same dimension, Minkowski distance can also be useful.
2.2 Quality Measures To evaluate the performance of different clustering algorithms, we need some measures to evaluate them. Objective clustering evaluation criteria can be based on external, internal, or relative measures [36]. External measures use statistical tests in order to quantify how well a clustering matches the underlying structure of the data. An external quality measure evaluates how well the clustering is working by comparing the groups produced by clustering techniques to known classes. The most important external methods are entropy-based methods, confusion matrix, classification accuracy, average purity [25, 29], and F-measure [16]. In absence of an external judgment, internal clustering quality measures must be used to quantify the validity of a clustering. Internal quality measures are used to compare different sets of clusters without reference to external knowledge. Relative measures can be derived from internal measures by evaluating different clusterings and comparing their scores. However, if one clustering algorithm performs better than other clustering algorithms on many of these measures, then we can have some confidence that is truly the best clustering algorithm for the situation being evaluated. The F-measure tries to capture how well the groups of the investigated partition at the best match the groups of the reference. F-measure compute based on the harmonic means of precision and recall from information retrieval domain. If P and R show Precision and Recall respectively, this measure is defined by precision and recall obtained by (5). In the formulas nij shows the number of members of class j in cluster i (the number of the overlapping member), ni shows the number of members of cluster i and n j shows the number of members in class j. P (i , j ) =
nij ni
,
R(, i, j ) =
nij nj
(5)
The precision, P(i, j ) , is the fraction of the documents in the cluster i that are also in the class j. Whereas the recall, R(i, j ) , is the fraction of the pages in the class j that are in the cluster i. P(i, j ) and R(i, j ) take values between 0 and 1 and, intuitively, P(i, j ) measures the accuracy with which cluster i reproduces class j, while R(i, j ) measures the completeness with which i reproduces class j. The F-measure for a cluster i and class j combines precision and recall with equal weight on each as follows:
F (i, j ) =
2 × ( P(i, j ) R (i, j )) P (i , j ) + R (i , j )
(6)
Web Text Mining Using Harmony Search
57
The F-Measure of the whole clustering is: F =∑ j
nj n
max{F (i, j )}
(7)
The F-Measure tries to capture how well the groups of the investigated partition at the best match the groups of the reference. A perfect clustering matches the given partitioning exactly and leads to an F-Measure value of 1. The second evaluation measure used is the entropy measure, which analyzes the distribution of categories in each cluster. The measure entropy looks at how the various classes of documents are distributed within each cluster. First, the class distribution is calculated for each cluster, then this class distribution will be used to calculated the entropy for each cluster. The entropy E of a cluster ci is defined as:
E (ci ) = −∑ nij log(nij ) j
(8)
where nij is the probability that a member of cluster j belongs to class i and then the summation is taken over all classes. After the entropy is calculated, the summation of entropy for each cluster is calculated using the size of each cluster as weight. In other words, the entropy of all produced clusters is calculated as the sum of the individual cluster entropies weighted according to the cluster size, i.e., k
E=∑ i =1
ni × E (c i ) n
(9)
where ni is the size of cluster i, n is the total number of documents, and k is the number of clusters. The best clustering solution will be the one that leads to clusters that contain documents from only a single class, in which case the entropy will be zero. Because the entropy measures the amount of disorder in a system, the smaller the entropy values, the better the clustering solution is [37]. The purity measure evaluates the degree to which each cluster contains documents from primarily one class. In other words, it measures the largest class for each cluster. In general, the larger the value of purity, the better the clustering solution is. Note that each cluster may contain documents from different classes. The purity gives the ratio of the dominant class size in the cluster to the cluster size itself. The value of the purity is always in the interval ⎡ 1 ,1⎤ . A large purity val⎢⎣ K + ⎥⎦ ue implies that the cluster is a ‘‘pure” subset of the dominant class. In similar way as entropy, the purity of each cluster ci is calculated as P (c i ) =
1 max nij ni j
(10)
58
R. Forsati and M. Mahdavi
The purity of all produced clusters is computed as a weighted sum of the individual cluster purities and is defined as k
ni ∗ P ( ci ) i =1 n
P=∑
(11)
While entropy and the precision measures compare flat partitions (which may be a single level of a hierarchy) with another flat partition the F-measure compares an entire hierarchy with a flat partition.
3 HS Based Clustering: Continuous Representation In [38] the first HS based algorithm for document clustering was proposed. In this algorithm each cluster centroid is considered as a decision variable; so each row of harmony memory, which contains K decision variables, represents one possible solution for clustering. On the other hand, each row contains a number of candidate centroids that represents each cluster. In this case, each solution contains K vectors and forms a matrix row, (C1, C2, …, Ci , …, Ck), where Ci is the ith cluster centroid vector and K is the number of clusters. The objective function is to maximize intra-cluster similarity while minimizing the inter-cluster similarity. The centroid of documents belong to same cluster is computed as: n
∑ (aij )x j ci =
j =1
n
∑ aij
,
1≤ i ≤ K
(12)
j =1
According to improvising step in the HS algorithm, the new vector is generated in each generation. Fitness value of each row, which corresponds to one potential solution, is determined by Average Distance of Documents to the cluster Centroid (ADDC) represented by each solution. This value is measured by equation: ⎧ ni ⎫ ⎪ ∑ D(ci , d ij ) ⎪ k ⎪ j =1 ⎪ ⎬ ∑⎨ n i i =1 ⎪ ⎪ ⎪ ⎪ ⎩ ⎭ f = K
(13)
where K is the number of clusters, ni is the numbers of documents in cluster i, D is distance function, and d ij is the jth document of cluster i. The new generated solution is replaced with a row in harmony memory, if the locally optimized vector has better fitness value than those in HM.
Web Text Mining Using Harmony Search
59
Table 1 F-measure values of different algorithms Dataset
K-means
HS based clustering
DATASET1
0.65348
0.72250
DATASET1
0.70639
0.76560
DATASET3
0.6214
0.70465
The proposed algorithm is compared to K-means algorithm based on F-measure quality measure on three datasets [38]. DATASET1 is collected from Politics area and contains 176 web documents that are selected randomly in some topics of Politics. It is collected in 2006. DATASET2 is collected from News sites and contains 424 different news texts. This dataset is collected in 2006, as well. DATASET3 is selected from DMOZ collection and contains 697 documents. As is evident from Table 1, HS based clustering algorithm outperforms K-means in all datasets. The main drawback of the algorithm developed in [38] is its continuous representation. Continuous representation of clusters’ centroid decreases the efficiency of pitch adjusting process.
4 HS Based Clustering: Discrete Representation In [39] an algorithm called HKA with discrete representation is proposed for document clustering which codify the whole partition P of the document set in a vector of length n, where n is the number of the documents. Thus, each element of the solution is the label where the single document belongs to; in particular if the number of clusters is K each element of the solution vector is an integer value in the range {1..., K}. Let us consider a data set formed by n documents {d i , i = 1,2,… , n} . Also let d ij denote the weight of jth feature of document d i . An assignment that represents K nonempty clusters is a legal assignment. Each assignment corresponds to a set of K centroids C = (c1 , c 2 , … , ci , … , c K ) . Thus, the search space is the space of all permutations of size n from the set {1..., K} that satisfy constraint in which each document must be allocated to exactly one cluster and there is no cluster that is empty. A natural way of encoding such permutations into a string, s, is to consider each row of HM an integer vector of n positions. Each position corresponds to a document, i.e., the i-th position represents the i-th document. In this encoding, each element corresponds to a document and its value represents the cluster number to which the corresponding document belongs. Due to the discrete representation the original PAR process of HS is not applicable so the authors proposed an efficient way to apply PAR process. In improvisation step each value is selected from harmony memory with probability HMCR and with probability (1– HMCR) is randomly selected from set {1,2, … , K } . After generating the new solution, the PAR process is applied. PAR is originally the rate of allocating a different cluster to a document. To apply pitch adjusting process to
60
R. Forsati and M. Mahdavi
document d i the algorithm proceeds as follow. The current cluster of d i is replaced with a new cluster chosen randomly from the following distribution: P j = Pr { cluster j is selected as new cluster} =
Dmax − D ( d i , c j ) K
∑ ( Dmax − D(d i , c j ))
(14)
j =1
where Dmax = max i {D ( NHV , ci )} . Considering the behavior of HKA, it was found that the proposed algorithm is good at finding promising areas of the search space, but not as good as K-means at fine-tuning within those areas, so it may take more time to converge. On the other hand, K-means algorithm is good at fine-tuning, but lack a global perspective. So a hybrid algorithm that combines two ideas is proposed. In the hybrid algorithm at each improvisation step a one-step K-means is included to fine-tune the new solution. The HKA is compared with other algorithms on five standard datasets [39]. Table 2 shows the comparison of F-measure values for K-means and HKA algorithms. The results in Table 2 reveal that HKA outperforms K-means algorithm in all of datasets. Table 2 Comparison of HKA and K-means algorithms based on F-measure Document Set
K-means
HKA
DS1
0.5632
0.7662
DS2
0.5202
0.7824
DS3
0.6117
0.8968
DS4
0.7236
0.8692
DS5
0.4236
0.6805
Figure 1 shows the execution time of HKA algorithms with other four algorithms including K-means, Genetic K-means (GA), Particle Swarm Optimization based clustering (PSO) and a Mises-Fisher Generative Model based algorithm (GM)1 on DS5 [39]. The evaluations were conducted for the document numbers ranging from 1000 to approximately 10,000. For each given document number, 10 test runs were conducted on different randomly chosen documents, and the final performance scores were obtained by averaging the scores from the all tests. Because K-means algorithm is not guaranteed to find the global optimum, it is beneficial to perform Kmeans algorithm a few times with different initial values and choose the trial with minimal ADDC. The GM algorithm has the lowest runtime in comparison to all of other algorithms because the model-based partitional clustering algorithms often 1
An implementation of this algorithm is available at, http://www.cse.fau.edu/~zhong/ software/index.htm
Web Text Mining Using Harmony Search
61
have a complexity of O(n) where n is the number of documents. In contrast, in the other algorithms calculating the pairwise similarities is more time-consuming. For small number of documents the runtime of algorithms is approximately same, but by increasing the number of documents the difference becomes significant. The K-means algorithm has the worst runtime. The runtime of PSO and GA is nearly the same. HKA behaves better than other algorithms except the GM. Specially; the runtime of the HKA is comparable with the GM algorithm.
Fig. 1 Execution time of the HKA algorithm in comparison with GM, K-means, GA, and PSO algorithms on different sub collections of DS5 with different sizes
5 Hybrid HS Based Clustering In this section we review the final set of HS based algorithms for document clustering [40]. These algorithms are the hybridization of HSCLUST algorithm with K-means algorithm in different settings. HSCLUST is same as HKA without one step of K-means in its improvising step. Hybrid algorithms combine the explorative power of the HSCLUST with the fine-tuning power of the K-means algorithm. In the hybrid HS algorithm, the algorithm includes two modules, the HSCLUST module and the K-means module. The HSCLUST finds the region of the optimum, and then the K-means takes over to fine-tune the optimum centroids. In [40] three different approach were proposed for hybridization. In Sequential hybridization, the algorithm starts with HSCLUST algorithm and after a determined number of generations, the K-means algorithm starts with the best vector in harmony memory obtained by HSCLUST. In other words the HSCLUST finds
62
R. Forsati and M. Mahdavi
the proximity of best solution and K-means fine-tunes the obtained solution. In Interleaved Hybridization, after every determined iterations, the K-means uses the best vector from the harmony memory as its starting point. Harmony memory is updated if the locally optimized vectors have better fitness value than those in harmony memory and this procedure repeated until stop condition. The third algorithm hybridizes K-means as one step of HSCLUST. The performances of the algorithms in the document collections considering Fmeasure are shown in Fig. 2. In comparison of the results from different algorithms, obviously, the third hybridized algorithm has the best F-measure among the other algorithms from Figure 2.
Fig. 2 Comparison of the F-measure for hybridized algorithms with HKA and K-mean
6 Summary and Conclusions This chapter has reviewed various HS applications in finding a globally optimal partition with respect to ADDC criterion when grouping given web documents into a specified number of clusters. Two proposed algorithms in literature mainly differ in the type of representation of solutions (i.e. continuous and discrete variables). In addition some hybrid algorithms were reviewed in this chapter. The hybrid algorithms try to combine the explorative power of HS with fine-tuning power of another localized algorithm to find optimal solutions. The results show that HS based clustering algorithm is a good choice for clustering large set of documents. From this successful application, it is expected that more problems will be tackled with HS.
Web Text Mining Using Harmony Search
63
References 1. Húsek, D., Pokorný, J., Řezanková, H., et al.: Web data clustering. In: Foundations of Computational Intelligence, vol. 4. Springer, Berlin (2009) 2. Rijsbergen, V.: Information retrieval. Buttersworth, London (1979) 3. Aslam, J., Pelekhov, K., Rus, D.: Using star clusters for filtering. In: Proceedings of the Ninth International Conference on Information and Knowledge Management, USA (2000) 4. Zhong, S., Ghosh, J.: A comparative study of generative models for document clustering. In: Proceedings of SDM Workshop on Clustering High Dimensional Data and Its Applications (2003) 5. Jain, A.K., Murty, M.N., Flynn, P.J.: Data clustering: A Review. ACM Computing Surveys 31, 264–323 (1999) 6. Grira, N., Crucianu, M., Boujemaa, N.: Unsupervised and semi-supervised clustering: a brief survey. In: Proceedings of 7th ACM SIGMM International Workshop on Multimedia Information Retrieval, pp. 9–16 (2005) 7. Zhong, S., Ghosh, J.: Generative model-based clustering of documents: a comparative study. Knowledge and Information Systems (KAIS) 8, 374–384 (2005) 8. Zhong, S.: Semi-supervised model-based document clustering: A Comparative Study. Machine Learning 65, 3–29 (2006) 9. Guha, S., Rastogi, R., Shim, K.: An efficient clustering algorithm for large databases. In: Proceedings of ACM-SIGMOD Int. Conf. Management of Data (SIG-MOD 1998), pp. 73–84 (1998) 10. Karypis, G., Han, E.H., Kumar, V.: CHAMELEON: A hierarchical clustering algorithm using dynamic modeling. IEEE Computer 32, 68–75 (1999) 11. Olson, C.F.: Parallel algorithms for hierarchical clustering. Parallel Comput. 21, 1313– 1325 (1995) 12. Zhang, T., Ramakrishnan, R., Livny, M.: BIRCH: An efficient data clustering method for very large databases. In: Proceedings of ACM-SIGMOD Int. Conf. Management of Data (SIG-MOD 1996), pp. 103–114 (1996) 13. Zhao, Y., Karypis, G.: Empirical and theoretical comparisons of selected criterion functions for document clustering. Machine Learning 55, 311–331 (2004) 14. Xu, S., Zhang, J.: A parallel hybrid web document clustering algorithm and its performance study. Journal of Supercomputing 30, 117–131 (2004) 15. Cutting, D.R., Pedersen, J.O., Karger, D.R., et al.: Scatter/gather: A cluster-based approach to browsing large document collections. In: Proceedings of the ACM SIGIR Copenhagen, pp. 318–329 (1992) 16. Larsen, B., Aone, C.: Fast and effective text mining using linear-time document clustering. In: Proceedings of the Fifth ACM SIGKDD Int’l Conference on Knowledge Discovery and Data Mining, pp. 16–22 (1999) 17. Aggarwal, C.C., Gates, S.C., Yu, P.S.: On the merits of building categorization systems by supervised clustering. In: Proceedings of the Fifth ACM SIGKDD Int’l Conference on Knowledge Discovery and Data Mining, pp. 352–356 (1999) 18. Steinbach, M., Karypis, G., Kumar, V.: A comparison of document clustering techniques. In: KDD 2000, Technical Report, University of Minnesota (2000) 19. Dhillon, I.S.: Co-clustering documents and words using bipartite spectral graph partitioning. In: Knowledge Discovery and Data Mining, pp. 269–274 (2001) 20. McQueen, J.B.: Some methods for classification and analysis of multivariate observations. In: Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, pp. 281–297 (1967)
64
R. Forsati and M. Mahdavi
21. Anderberg, M.R.: Cluster analysis for applications. Academic Press Inc., New York (1973) 22. Stumme, G., Hotho, A., Berendt, B.: Semantic web mining. In: Proceedings of 12th Europ. Conf. on Machine Learning (ECML2001)/5th Europ. Conf. on Principles and Practice of Knowledge Discovery in Databases, PKDD 2001 (2001) 23. Stumme, G., Hotho, A., Berendt, B.: Semantic web mining state of the art and future directions. Journal of Web Semantics: Science, Services and Agents on the World Wide Web 4, 124–143 (2006) 24. Beil, F., Ester, M., Xu, X.: Frequen term-based text clustering. In: Proceedings of 8th Int. Conf. on Knowledge Discovery and Data Mining (KDD 2002), Edmonton, Alberta, Canada (2002) 25. Raghavan, V.V., Birchand, K.: A clustering strategy based on a formalism of the reproductive process in a natural system. In: Proceedings of the Second International Conference on Information Storage and Retrieval, pp. 10–22 (1979) 26. Cui, X., Potok, T.E., Palathingal, P.: Document clustering using particle swarm optimization. In: Proceedings of the IEEE swarm intelligence symposium, pp. 185–191. 27. Labroche, N., Monmarche, N., Venturini, G.: AntClust: ant clustering and web usage mining. In: Proceedings of Genetic and Evolutionary Computation Conference, pp. 25–36 (2003) 28. Kennedy, J., Eberhart, R.C., Shi, Y.: Swarm intelligence. Morgan Kaufmann, New York (2001) 29. Omran, M., Salman, A., Engelbrecht, A.P.: Image classification using particle swarm optimization. In: Proceedings of the 4th Asia-Pacific Conference on Simulated Evolution and Learning (SEAL 2002), pp. 370–374 (2002) 30. Merwe, V.D., Engelbrecht, A.P.: Data clustering using particle swarm optimization. In: Proceedings of IEEE Congress on Evolutionary Computation (CEC 2003), pp. 215–220 (2003) 31. Cui, X., Potok, T.E.: Document clustering analysis based on hybrid PSO+K-means algorithm. Journal of Computer Sciences 4, 27–33 (2005) 32. Everitt, B.: Cluster analysis, 2nd edn. Halsted Press, New York (1980) 33. Salton, G.: Automatic text processing. The Transformation, Analysis, and Retrieval of Information by Computer. Addison-Wesley, Reading (1989) 34. Cios, K., Pedrycs, W., Swiniarski, R.: Data mining methods for knowledge discovery. Kluwer Academic Publishers, Dordrecht (1998) 35. Salton, G., Buckley, C.: Term-weighting approaches in automatic text retrieval. Information Processing and Management 24, 513–523 (1988) 36. Jain, A.K., Richard, C.D.: Algorithm for clustering in data. Prentice Hall, Englewood Cliffs (1990) 37. Zhao, Y., Karypis, G.: Empirical and theoretical comparisons of selected criterion functions for document Clustering. Machine Learning 55, 311–331 (2004) 38. Mahdavi, M., Chehreghani, M.H., Abolhassani, H., et al.: Novel meta-heuristic algorithms for clustering web documents. Computer Methods in Applied Mechanics and Engineering 201, 441–451 (2008) 39. Mahdavi, M., Abolhassani, H.: Harmony K-means algorithm for document clustering. Data Mining and Knowledge Discovery 18, 370–391 (2009) 40. Forsati, R., Meybodi, M.R., Mahdavi, M., et al.: Hybridization of K-means and harmony search methods for web page clustering. In: Proceedings of IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology, pp. 329–335 (2008)
Population Variance Harmony Search Algorithm to Solve Optimal Power Flow with Non-Smooth Cost Function B.K. Panigrahi , V. Ravikumar Pandi, Swagatam Das , and Ajith Abraham 1
2
3
Abstract. This chapter presents a novel Harmony Search (HS) algorithm used to solve security constrained optimal power flow (OPF) with various generator fuel cost characteristics. HS is a recently developed derivative-free, meta-heuristic optimization algorithm, which draws inspiration from the musical process of searching for a perfect state of harmony. This chapter analyses the evolution of the populationvariance over successive generations in HS and thereby draws some important attention regarding the explorative power of HS. This novel methodology of modified population variance harmony search algorithm (PVHS) easily takes care of solving optimal power flow problem even with non-smooth and piecewise cost functions. This PVHS algorithm was tested on the IEEE30 bus system with three different types of cost characteristics and compared with other reported results.
1 Introduction Optimal power flow is the main tool used for planning an economic operation of power system [1]. In the recent attention in OPF shows the importance of the electric utilities to find the optimal secure operating point corresponding to the each loading condition. The problem of solving OPF involves estimating the optimal solution of control variables like generator real power, generator voltage magnitude and transformer tap settings corresponding to the best objective function. The B.K. Panigrahi and V. Ravikumar Pandi Department of Electrical Engineering, Indian Institute of Technology, Delhi, Hauz Khas, New Delhi, India – 110016 E-mail:
[email protected],
[email protected] Swagatam Das Department of Electronics and Telecommunication Engineering, Jadavpur University, Kolkata – 700 032, India E-mail:
[email protected] Ajith Abraham Machine Intelligence Research Labs (MIR Labs), USA E-mail:
[email protected] Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 65–75. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
66
B.K. Panigrahi et al.
dependent variable includes load bus voltage magnitude, generator reactive power generation, transmission line thermal loading. In general OPF is large scale highly non linear and constrained problem of minimizing the fuel cost. OPF problem has been solved using many traditional techniques such as non linear programming, quadratic programming, mixed integer programming and interior point method. The literature review on these methods is given in Momoh et al. [2, 3]. The disadvantage of these traditional methods is it cannot be applicable in case of the prohibited operating regions and multiple fuels. It also has higher sensitivity to initial solution, so it may trap into local optima. The difficulties in implementing OPF can be overcome by modern stochastic algorithms such as evolutionary programming (EP) [4], tabu search (TS) [5], improved evolutionary programming (IEP) [6], modified differential evolution (MDE) [7], particle swarm optimization (PSO) [9], genetic algorithm (GA) [10] and simulated annealing (SA) [11]. In 2001, Geem et al. proposed Harmony Search (HS) [13], a derivative-free, meta-heuristic algorithm, mimicking the improvisation process of music players. Since its inception, HS has found several applications in a wide variety of practical optimization problems like pipe-network design [14], structural optimization [15], vehicle routing problem [16], water distribution networks [17, 23], combined heat and power economic dispatch problem [18], Dam Scheduling [19] and numerical optimization [20]. The applicability of harmony search algorithm for discrete variable problem is given in [22]. The hybrid version of harmony search with particle swarm optimization applied to water network design is proposed in [24]. In the PVHS [21], the control parameter known as distance bandwidth (bw) has been made equal to the standard deviation of the current population. In this chapter we have used this PVHS algorithm to solve optimal power flow problem having various cost characteristics. The algorithm is applied to IEEE 30 bus test system effectively to show the appropriateness of the method. The simulation results with three different cost characteristics are comparable with the recently reported results.
2 OPF Problem Formulation The objective of OPF problem is to minimize the total fuel cost of generators while satisfying several power system steady state security constraints. If x is the vector of state variables consisting of slack bus real power Pg1, load bus voltages VLk, generator reactive power outputs Qgj, and transmission line thermal loading Sl, x can be expressed as: xT = [Pg1, Vl1,…, VlNL, Qg1,…, QgNG, Sl1, …., SlNB]
(1)
where NL, NG and NB are the number of load buses, the number of generators and the number of transmission lines, respectively. u is the vector of control variables consisting of real power outputs Pg except at the slack bus, generator voltages Vg, transformer tap settings T. Hence, u can be expressed as:
Population Variance Harmony Search Algorithm to Solve Optimal Power Flow
uT = [Pg2,….,PgNG,Vg1,….,VgNG,T1,…,TNT]
67
(2)
where NT is the number of regulating transformers. The objective of OPF problem can be expressed as Minimize F =
∑ Fi (Pgi ) NG
(3)
j =1
where F is the total generator fuel cost and Fi is the fuel cost of generator connected to ith bus. The system equality constraints g(x,u) is described by the following power balance equation
N Pgi − Pdi = ∑ Vi V j Yij cos⎛⎜θ ij − δ i + δ j ⎞⎟ ⎝ ⎠ j =1 N
(
Q gi − Qdi = −∑ Vi V j Yij sin θ ij − δ i + δ j j =1
)
i = 1,..., N
i = 1,..., N
(4)
(5)
where Pgi is the total real power generation at ith bus, Pdi is the total real power demand at ith bus, Qgi is the total reactive power generation at ith bus, Qdi is the total reactive power demand at ith bus, |Vi | is the voltage magnitude at ith bus, |Vj | is the voltage magnitude at jth bus, |Yij | is the magnitude of the ijth element of Ybus, θij angle of the ijth element of Ybus, δi voltage angle at ith bus and δj is the voltage angle at jth bus. The system inequality constraints h(x, u) is consist of the following 1.
Generator constraints: The generator real power outputs, reactive power outputs and voltages are bounded to its lower and upper limit. Pgimin ≤ Pgi ≤ Pgimax i = 1,..., NG
(6)
Q gimin ≤ Q gi ≤ Q gimax i = 1,..., NG
(7)
V gimin ≤ V gi ≤ V gimax i = 1,..., NG
(8)
where Pgimin and Pgimax are the minimum and maximum real power generation at ith generator bus, Q gimin and Q gimax are the minimum and maximum reactive power generation at ith generator bus, V gimin and V gimax are the minimum and maximum voltage magnitude at ith generator bus. 2.
Transformer constraints: Transformer tap settings are bounded by minimum and maximum limits as follows
Timin ≤ Ti ≤ Timax i = 1,..., NT
(9)
68
B.K. Panigrahi et al.
where Ti min and Ti max are the minimum and maximum tap setting limit of ith transformer. 3.
Security constraints: It includes the limits in the voltage magnitude of load buses and thermal loading limits of all transmission lines as follows. V Limin ≤ V Li ≤ V Limax i = 1,..., NL
(10)
S li ≤ S limax i = 1,..., NB
(11)
where V Limin and V Limax are the minimum and maximum voltage magnitude at ith load bus, S limax is the thermal limit of ith transmission line.
Constraints Handling: The problem of handling these constraints in the state variables are accommodated in the algorithm by including the constraints violation as quadratic penalty terms in the objective function itself.
(
Fcorr = F + K p Pg 1 − Pglim 1
(
)
2
lim K Q Q gi − Q gi
(
+ K v V Li − V Lilim
)
2
(
)
2
+ K S S li − S lilim
+
)
2
(12)
where Kp, Kv, KQ and KS are the penalty factors corresponding to slack bus real power generation, load bus voltage magnitude, generator reactive power and transmission line thermal loadings, respectively. In the equation (12) the xlim is equals to xmin if x is lesser than the minimum limit and xmax if x is greater than maximum limit.
3 Harmony Search algorithm 3.1 Classical Harmony Search Algorithm In the harmony search algorithm musician improvises the pitches of his/her instrument to obtain a better state of harmony. The different steps of the classical HS algorithm are described below: Step 1: The 1st step is to specify the problem and initialize the parameter values. The optimization problem is defined as minimize (or maximize) f (x) such that i i xmin ≤ xi ≤ xmax , where f (x) is the objective function, x is a solution vector i i consisting of N decision variables ( xi ) and xmin and xmax are the lower and upper bounds of each decision variable, respectively. Other algorithm parameters, such as harmony memory size (HMS), or the number of solution vectors in the harmony memory; harmony memory considering rate (HMCR); pitch adjusting rate (PAR); and the number of improvisations (NI) or stopping criterion are also specified in this step.
Population Variance Harmony Search Algorithm to Solve Optimal Power Flow
69
Step 2: The 2nd step is to initialize the Harmony Memory. The initial harmony i i , xmax ], as memory is generated from a uniform distribution in the ranges [ xmin
(
i i i xij = xmin + r × xmax − xmin
)
(13)
where i = 1, 2,.., N , j = 1,2,3...., HMS , and r ~ U (0,1) . Step 3: The third step is known as the ‘improvisation’ step. The New Harmony vector y = ( y1 , y2 ,… , y N ) is generated by using memory consideration, pitch adjustment, and random selection. The procedure works as follows:
Pseudo-code of improvisation in HS for each i ∈ [1, N ] do if U (0,1) ≤ HMCR then /*memory consideration*/ yi = xij , where j ~ U (1,2, … , HMS ) .
if U (0,1) ≤ PAR then /* Pitch adjustment */
Yi = Yi + r × bw , where r ~ U (0,1) else /* random selection */
(
i i i yi = xmin + r ⋅ xmax − xmin
)
(14) (15)
endif done Step 4: In this step the harmony memory is updated. The generated harmony vector y = ( y1 , y2 ,… , y N ) replaces the worst harmony in the HM (harmony memory) only if its fitness is better than the worst harmony.
Step 5: The stopping criterion (generally the number of iterations) is checked. If it is satisfied, computation is terminated. Otherwise, Steps 3 and 4 are repeated.
3.2 Modified Population Variance Harmony Search (PVHS) Algorithm In [21] Mukhopadhyay et al. analyze the explorative power in HS as follows:
Theorem 1. Let x = {x1 , x 2 , …, x N } be the current population, Y = {Y1 , Y2 ,…, YN } the intermediate population obtained after harmony memory consideration and pitch adjustment. If HMCR be the harmony memory consideration probability, PAR the pitch-adjustment probability, bw the arbitrary distance bandwidth and if we consider the allowable range for the decision variables (xi) to be {xmin , xmax} where xmax = a, xmin = – a, then
70
B.K. Panigrahi et al. E ( var (Y ) ) =
( m − 1) m
⋅ [ HMCR ⋅ var ( x ) + HMCR ⋅ (1 − HMCR ) ⋅ x
2
_
+ HMCR ⋅ (1 − HMCR ) ⋅ PAR ⋅ bw ⋅ x ⎛ 1 HMCR ⋅ PAR ⎞ a 2 + HMCR ⋅ PAR ⋅ bw2 ⋅ ⎜ − ⎟ + 3 ⋅ (1 − HMCR )] 4 ⎝3 ⎠
(16)
If HMCR is chosen to be very high (i.e. very near to 1) and the distance bandwidth parameter ( bw ) is chosen to be the standard deviation of the current population, then population variance (without selection) will grow almost exponentially over generations. Now, Neglecting the terms containing (1 − HMCR ) , and choosing bw = σ(x ) = var(x ) the expression (16) becomes: E (var (Y )) =
(m − 1) ⋅ ⎡ HMCR m
⎢ ⎣
⎞⎤ ⎟ ⎥ ⋅ var ( x ) ⎠⎦
⎛ 1 HMCR ⋅ PAR + HMCR ⋅ PAR ⋅ ⎜ − 4 ⎝3
(17)
From equation (17) it is seen that if we do not include selection in the algorithm, then the expected variance of the gth population ( X g ) becomes: ⎧⎪ (m − 1) ⎡ ⎛ 1 HMCR ⋅ PAR ⎞⎤ ⎫⎪ E var X g = ⎨ ⋅ ⎢ HMCR + HMCR ⋅ PAR ⋅ ⎜ − ⎟⎥ ⎬ ⋅ var( X 0 ) 4 ⎪⎩ m ⎝3 ⎠⎦ ⎪⎭ ⎣ g
( ( ))
(18)
In equation (10) if we choose the values of the parameters HMCR, PAR in such a way that the term within the second brackets becomes greater than unity, then we can expect an exponential growth of population variance. This growth of expected population variance over generations gives the algorithm a strong explorative power. In modified HS the bw is changed dynamically as
σ(x ) = var(x )
(19)
We also took HMCR = 0.98 and PAR = 0.67 to equip the algorithm with more explorative power after performing a series of experiments.
4 Implementation for OPF The optimal power flow problem is implemented using the PVHS algorithm by taking the control variables u in the each harmony memory and equation (12) as objective. The algorithm stops when the current generation exceeds the total number of generation. The parameters are selected as: total number of generation = 100, harmony memory size (HMS) = 50, harmony memory considering rate (HMCR) = 0.98, pitch adjusting rate (PAR) = 0.67. The detailed implementation methodology is described as follows:
Step 1: Initialize harmony memory size (HMS), harmony memory considering rate (HMCR), pitch adjusting rate (PAR) Step 2: Initialize harmonic memory and evaluate objective function after running load flow
Population Variance Harmony Search Algorithm to Solve Optimal Power Flow
71
Step 3: Improvisation of harmony memory by pitch adjustment Step 4: Run load flow and evaluate the objective function Step 5: Update the harmony memory with this improvised solution if it is better than worst solution in memory Step 6: If stopping criteria is met then print the OPF result and stop, otherwise go to step3.
5 Results and Discussion The PVHS algorithm was tested on IEEE30 bus system consists of 6 generating units, 41 transmission lines and 4 tap-changing transformers [8]. The lower and upper limits on independent variables are shown in Table 1. In all the cases bus 1 is considered as swing bus. The simulation was done by taking a quadratic cost curve in case 1, a piecewise quadratic cost curve in case 2, and quadratic cost curve with valve point loading in case 3. The result of the PVHS algorithm is compared with NLP [8], EP [4], TS [5], PSO [9], IEP [6] and MDE [7]. The algorithm is coded on Intel Pentium IV 2.3 GHz processor and 2 GB RAM memory using Matlab 7.4 [12] programming language.
Table 1 Cost Results of PVHS Algorithm Parameter Pg1 Pg2 Pg5 Pg8 Pg11 Pg13 Vg1 Vg2 Vg5 Vg8 Vg11 Vg13 T11 T12 T15 T36 Ploss Sum(Pg) Penalty Best Cost
Lower Limit 50 20 15 10 10 12 0.95 0.95 0.95 0.95 0.95 0.95 0.90 0.90 0.90 0.90
Upper Limit 200 80 50 35 30 40 1.05 1.10 1.10 1.10 1.10 1.10 1.10 1.10 1.10 1.10
Case1
Case2
Case3
176.1824 48.8268 21.5131 22.126 12.224 12.0011 1.0500 1.0381 1.0114 1.0192 1.0866 1.0847 1.0247 0.9267 0.9993 0.9422 9.4734 292.8734 0.0000 802.3764
139.9997 54.9998 24.0997 34.9994 18.4566 17.9266 1.0500 1.0403 1.0145 1.0256 1.0786 1.0837 1.0059 0.9482 1.0033 0.9463 7.0818 290.4818 0.0000 647.8126
197.5413 52.0571 15.0000 10.0000 10.0000 12.0000 1.0333 1.0100 0.9657 1.0307 1.0981 1.1000 1.0978 1.0983 1.0703 1.0141 13.1984 296.5984 0.0004 930.723
72
B.K. Panigrahi et al.
5.1 Case 1 In this case the fuel cost characteristics of all the 6 generating units are given by quadratic cost function as NG
( )
NG
f = ∑ Fi Pgi = ∑ ai + bi Pgi + ci Pgi2 i =1
(20)
i =1
where ai, bi and ci are the cost coefficients of the ith generator. The generator cost coefficients are found in [6] and the optimized parameters corresponding to minimum cost is given in Table 1. The results of the PVHS algorithm is compared in Table 2 with other reported results. The statistical results of 50 trials are also reported in Table 2. The algorithm converges quickly and the results are better than others. The convergence characteristic of PVHS algorithm for this case is shown in Figure 1. Table 2 Cost Comparison with Other Methods for Case 1 Parameter Best Cost Worst cost Avg cost Std cost
NLP[8] 802.40 -
EP[4] 802.62 805.61 803.51 -
IEP[6] 802.465 802.581 802.521 0.039
MDE [7] 802.376 802.404 802.382 -
PVHS 802.3764 802.3912 802.3805 0.0135
Fig. 1 Convergence of PVHS Algorithm for Case 1
5.2 Case 2 In this case the fuel cost characteristics of the generating units connected at bus 1 and bus 2 are having piecewise quadratic cost curve [6] to model different fuels.
( )
Fi Pgi
⎧ ai1 + bi1 Pgi + ci1 Pgi2 , Pgimin ≤ Pgi ≤ Pgi1 ⎪ 2 1 2 ⎪ a + bi 2 Pgi + ci 2 Pgi , Pgi < Pgi ≤ Pgi = ⎨ i2 ...... ⎪ ⎪aik + bik Pgi + cik Pgi2 , Pgik −1 < Pgi ≤ Pgimax ⎩
(21)
Population Variance Harmony Search Algorithm to Solve Optimal Power Flow
73
where aik, bik and cik are the cost coefficients of the ith generator at the kth interval. The other 4 generators are having same quadratic cost curve coefficients as mentioned in Case 1. The generator cost coefficients are found in [6] and the optimized parameters corresponding to minimum cost is given in Table 1. The results of the PVHS algorithm are compared in Table 3 with other reported results using modified differential evolution algorithm (MDE) [7]. The algorithm converges quickly and the results are better than the other. Table 3 Cost Comparison with Other Methods for Case2 Parameter
MDE[7]
PVHS
Best Cost Worst cost Avg cost Std cost
647.846 650.664 648.356 -
647.8126 648.8110 648.2448 0.2681
5.3 Case 3 In this case the fuel cost characteristics of the generating units connected at bus 1 and bus 2 are also having a sine component to model the valve point loading effect of the generators as
((
Fi ( Pgi ) = ai + bi Pgi + ci Pgi + di sin ei Pgi − Pgi 2
min
))
(22)
where ai, bi, ci, di and ei are the cost coefficients of the ith generating unit. The other 4 generators are having same quadratic cost curve coefficients as mentioned in Case 1. The generator cost coefficients are found in [6] and the optimized parameters corresponding to minimum cost is given in Table 1. The results of the PVHS algorithm are compared in Table 4 with other reported results using improved evolutionary programming (IEP) [6], and modified differential evolution algorithm (MDE) [7]. The algorithm converges quickly and the results are better than the others. Table 4 Cost Comparison with Other Methods for Case 3 Parameter IEP[6] Best Cost 953.573
MDE[7] 930.793
PVHS 930.7237
Worst cost 958.263
954.073
930.7764
Avg cost 956.460 Std cost 1.720
942.501 -
930.7380 0.0162
6 Summary and Conclusions In this chapter, detailed discussion is carried out about the application of population variance harmony search algorithm to solve the optimal power flow problem
74
B.K. Panigrahi et al.
in the presence of security constraints. The algorithm explores the search space quickly with the help of population variance parameter. The PVHS algorithm was tested with IEEE 30 bus test system having three different types of cost characteristics. The comparison of obtained results with other previously reported results shows the effectiveness of the algorithm.
References 1. Wood, A.J., Wollenberg, B.F.: Power Generation, Operation and Control. John Wiley & Sons, New York (1984) 2. Momoh, J.A., El-Hawary, M.E., Adapa, R.: A review of selected optimal power flow literature to 1993 Part I: Nonlinear and quadratic programming approaches. IEEE Trans. on Power Systems 14, 96–104 (1999) 3. Momoh, J.A., El-Hawary, M.E., Adapa, R.: A review of selected optimal power flow literature to 1993 Part II: Newton, linear programming and interior point methods. IEEE Trans. on Power Systems 14, 105–111 (1999) 4. Yuryevich, J., Wong, K.P.: Evolutionary programming based optimal power flow algorithm. IEEE Trans. on Power Systems 14, 1245–1250 (1999) 5. Abido, M.A.: Optimal power flow using tabu search algorithm. Electric Power Components and Systems 30, 469–483 (2002) 6. Ongsakul, W., Tantimaporn, T.: Optimal power flow by improved evolutionary programming. Electric Power Components and Systems 34, 79–95 (2006) 7. sayah, S., Zehar, K.: Modified differential evolution algorithm for optimal power flow with non-smooth cost functions. Energy Conversion and Management 49, 3036–3042 (2008) 8. Alsac, O., Stott, B.: Optimal load flow with steady-state security. IEEE Trans. on Power Apparatus Systems 93, 745–751 (1974) 9. Abido, M.A.: Optimal power flow using particle swarm optimization. Electric Power Energy Systems 24, 563–571 (2002) 10. Bakirtzis, A.G., Biskas, P.N., Zoumas, C.E., Petridis, V.: Optimal power flow by enhanced genetic algorithm. IEEE Trans. on Power Systems 17, 229–236 (2002) 11. Roa-Sepulveda, C.A., Pavez-Lazo, B.J.: A solution to the optimal power flow using simulated annealing. Electric Power Energy Systems 25, 47–57 (2003) 12. Matlab (2007), http://www.mathworks.com 13. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001) 14. Geem, Z.W., Kim, J.H., Loganathan, G.V.: Harmony search optimization: application to pipe network design. Int. J. Model. Simulation 22, 125–133 (2002) 15. Lee, K.S., Geem, Z.W.: A new structural optimization method based on the harmony search algorithm. Comput. Struct. 82, 781–798 (2004) 16. Geem, Z.W., Lee, K.S., Park, Y.: Application of Harmony Search to Vehicle Routing. American Journal of Applied Sciences 2, 1552–1557 (2005) 17. Geem, Z.W.: Optimal Cost Design of Water Distribution Networks Using Harmony Search. Engineering Optimization 38, 259–280 (2006) 18. Vasebi, A., Fesanghary, M., Bathaeea, S.M.T.: Combined heat and power economic dispatch by Harmony Search Algorithm. International Journal of Electrical Power and Energy Systems 29, 713–719 (2007)
Population Variance Harmony Search Algorithm to Solve Optimal Power Flow
75
19. Geem, Z.W.: Optimal Scheduling of Multiple Dam System Using Harmony Search Algorithm. In: Sandoval, F., Prieto, A.G., Cabestany, J., Graña, M. (eds.) IWANN 2007. LNCS, vol. 4507, pp. 316–323. Springer, Heidelberg (2007) 20. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved Harmony Search Algorithm for Solving Optimization Problems. Applied Mathematics and Computation 188, 1567–1579 (2007) 21. Mukhopadhyay, A., Roy, A., Das, S., Das, S., Abraham, A.: Population-Variance and Explorative Power of Harmony Search: An Analysis. In: Third IEEE International Conference on Digital Information Management (ICDIM 2008), pp. 13–16 (2008) 22. Geem, Z.W.: Novel Derivative of Harmony Search Algorithm for Discrete Design Variables. Applied Mathematics and Computation 199, 223–230 (2008) 23. Geem, Z.W.: Harmony Search Optimization to the Pump-Included Water Distribution Network Design. Civil Engineering and Environmental Systems 26, 211–221 (2009) 24. Geem, Z.W.: Particle-Swarm Harmony Search for Water Network Design. Engineering Optimization 41, 297–311 (2009)
A Harmony Search Approach Using Exponential Probability Distribution Applied to Fuzzy Logic Control Optimization Leandro dos Santos Coelho and Diego L. de A. Bernert
*
Abstract. Fuzzy logic control (FLC) systems have been investigated in many technical and industrial applications as a powerful modeling tool that can cope with the uncertainties and nonlinearities of modern control systems. However, a drawback of FLC methodologies in the industrial environment is the number of tuning parameters to be selected. In this context, a broad class of meta-heuristics has been developed for optimization tasks. Recently, a meta-heuristic called harmony search (HS) algorithm has emerged. HS was conceptualized using an analogy with music improvisation process where music players improvise the pitches of their instruments to obtain better harmony. Inspired by the HS optimization method, this work presents an improved HS (IHS) approach using exponential probability distribution to optimize the design parameters of a FLC with fuzzy PI (proportional-integral) plus derivative action conception. Numerical results presented here indicate that validated FLC design with IHS tuning is effective for the control of a pH neutralization nonlinear process.
1 Introduction Fuzzy logic has the capability to handle imprecise information through linguistic expressions. Fuzzy logic techniques have been successfully applied on the control system without exact mathematical plant model, complex and time-varying dynamic processes [1-4]. A reason behind the increasing popularity of FLCs is that FLCs essentially incorporate human expertise in control strategy for controlling processes, exploiting the easier understanding of linguistic interpretation. On the other hand, it is well known that up until now, a conventional proportional-integral-derivative (PID) type controller is most widely used in industry due to its simple control structure, ease of design, and inexpensive cost. However, the PID type controller cannot yield a good control performance if a controlled object is highly nonlinear and uncertain [5]. Leandro dos Santos Coelho and Diego L. de A. Bernert Industrial and Systems Engineering Graduate Program, Pontifical Catholic University of Paraná, Curitiba, Paraná, Brazil E-mail:
[email protected],
[email protected] Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 77–88. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
78
L. dos Santos Coelho and D.L. de A. Bernert
To nullify the basic disadvantages associated with the construction of a threedimensional rule base, researchers in the past decade have proposed different two-input PID-type FLC structures, as combinations of two-term FLCs. See design examples combining the FLC and classical proportional, integral, derivative, proportional-integral, and proportional-derivative controllers in [6-13]. Adding the difficulty of having to tune the membership functions, fuzzy control rules, and scaling factors of FLC-PID, to an unsystematic design procedure usually makes it impossible to achieve adequate performance because the controlled process is too complex. To overcome this flaw, a lot of researches use genetic algorithms [14-19] to be able to optimally set the parameters of the fuzzy controllers. Recently, a new class of meta-heuristics, named harmony search (HS), has been developed. The HS algorithm proposed in [20] has been recently developed in an analogy with music improvisation process where musicians in an ensemble continue to polish their pitches in order to obtain better harmony. Jazz improvisation seeks to find musically pleasing harmony similar to the optimum design process which seeks to find optimum solution. The pitch of each musical instrument determines the aesthetic quality, just as the objective function value is determined by the set of values assigned to each decision variable [21]. In addition, HS uses a stochastic random search instead of a gradient search so that derivative information is unnecessary. This chapter proposes an improved HS (IHS) approach to optimize the scaling factors of a FLC with fuzzy PI (proportional-integral) plus derivative action conception (FLC-PI-D). A contribution of this chapter is the analysis and discussion of the FLC-PI-D control issue using IHS tuning. The FLC-PI-D designs using classical HS and IHS algorithms are compared and have been applied to a pH neutralization nonlinear process. The remaining sections of this chapter are organized as follows: in section 2, fundamentals of FLCs and FLC-PI-D are shown. Section 3 describes the HS and IHS. In section 4, the description of a pH neutralization nonlinear process and the simulation results obtained by FLC-PI-D are evaluated. Lastly, section 5 presents our conclusions and future research works.
2 Fundamentals of Fuzzy Logic Control Fuzzy set theory was introduced in [22] and can be utilized to transform an inexact knowledge into the form of a computer algorithm. In applications it is used by defining a fuzzy system with linguistic variables and with a set of if-then rules. Being composed of control rules of conditional linguistic statements that state the relationship between input and output variables, the FLCs have the enticing abilities of emulating human knowledge and experiences and dealing with model uncertainty. FLCs are typically defined by the nonlinear mapping of system state space for the control space. However, it is possible to identify the result of a FLC as a control surface reflecting the operator’s (or control engineer’s) prior knowledge of the process. The control surface is coded into a knowledge base using a compiler to execute rule-base, termsets, and scale factors [23].
A Harmony Search Approach Using Exponential Probability Distribution
79
Classical FLCs design presents a data flow that is dealt with a fuzzification phase, analysis and execution of rules and, a defuzzification phase as seen in Figure 1.
Fig. 1 Representation of a fuzzy controller
There are two major types of fuzzy controllers: FLCs based on linguistic model (Mamdani type) [24] and FLCs based on interpolative model (Takagi-Sugeno type) [25]. The major difference is that Mamdani fuzzy controllers use fuzzy sets whereas Takagi-Sugeno fuzzy controllers employ functions of input variables in consequent of fuzzy control rules. In this chapter, the FLC of Mamdani type is adopted.
2.1 FLC-PI-D Controller PID (proportional-integral-derivative) controllers are designed for linear systems and they provide a preferable cost/benefit ratio. However, the presences of nonlinear effects limit their performances. FLCs are successfully applied to nonlinear system because of their knowledge based on nonlinear structural characteristics. Hybridization of these two controller structures comes to one’s mind immediately to exploit the beneficial sides of both categories. In this context, fuzzy logic approaches have been shown in numerous studies to be a simpler alternative to improve conventional PID control performance [2, 8, 11], where the usual FLC structure is the FLC-PI or the FLC-PD. This section presents the description of a FLC-PI-D design. The FLC-PI-D design, as proposed by [5, 26], consists of a fuzzy PI plus the derivative control action of the process output, u D (k ) , where:
u PID (k ) = K c ⋅ [u PI (k ) + u D (k )]
(1)
u PI (k ) = K e ⋅ e(k ) + K ∆e ⋅ ∆e(k )
(2)
e( k ) = y ( k ) − y r ( k )
(3)
∆e(k ) = e(k ) − e(k − 1) ,
(4)
80
L. dos Santos Coelho and D.L. de A. Bernert
where Kc, Ke, and K∆e are scaling factors, e(k) is the error signal, ∆e(k) is the change of error signal, y(k) is the output signal, and yr(k) is the setpoint signal. The variables uPI(k) and uD(k) are the control signals of PI and D controllers, respectively. In this context, the derivative control action has the following equation: u D (k ) = K D ⋅ y ( k ) − y r ( k ) ,
(5)
where KD is the derivative gain constant. The principle of this design is that the FLC-PI-D control algorithm has the benefit of implementing the derivative control on the output, avoiding derivative kicks for step setpoint (reference) changes. The basic control diagram and membership functions of FLC-PI-D are shown in Figures 2 and 3, respectively. In this chapter, the following linguistic terms are used: P (Positive), N (Negative), Z (Zero), NS (Negative Small), NB (Negative Big), PS (Positive Small) and PB (Positive Big). In this work, the triangular shape and singleton forms are adopted how membership functions of the FLC-PI-D design.
Fig. 2 Basic control diagram of the FPI+D
Fig. 3 Membership Functions of the FPI+D
A Harmony Search Approach Using Exponential Probability Distribution
81
3 Optimization Based on Harmony Search Algorithm This section describes the proposed IHS algorithm. First, a brief overview of the HS is provided, and finally the modification procedures of the proposed IHS algorithm are presented.
3.1 Harmony Search (HS) Recently, Geem et al. [20] proposed a new HS meta-heuristic algorithm that was inspired by musical process of searching for a perfect state of harmony. The harmony in music is analogous to the optimization solution vector, and the musician’s improvisations are analogous to local and global search schemes in optimization techniques. The HS algorithm does not require initial values for the decision variables. Furthermore, instead of a gradient search, the HS algorithm uses a stochastic random search that is based on the harmony memory considering rate and the pitch adjusting rate so that derivative information is unnecessary. Compared to earlier meta-heuristic optimization algorithms, the HS algorithm imposes fewer mathematical requirements and can be easily adopted for various types of engineering optimization problems [21]. In the HS algorithm, musical performances seek a perfect state of harmony determined by aesthetic estimation, as the optimization algorithms seek a best state (i.e. global optimum) determined by objective function value. The optimization procedure of the HS algorithm consists of following steps [27]: Step 1. Initialize the optimization problem and HS algorithm parameters. First, the optimization problem is specified as follows:
Minimize f(x) subject to xi ∈ Xi, i = 1,..., N
(6)
where f(x) is the objective function, x is the set of each decision variable (xi); Xi is the set of the possible range of values for each design variable (continuous design variables), that is, xi,lower ≤ Xi ≤ xi,upper, where xi,lower and xi,upper are the lower and upper bounds for each decision variable; and N is the number of design variables. In this context, the HS algorithm parameters that are required to solve the optimization problem are also specified in this step. The number of solution vectors in harmony memory (HMS), that is the size of the harmony memory matrix, harmony memory considering rate (HMCR), pitch adjusting rate (PAR), and the maximum number of searches (stopping criterion) are selected in this step. Here, HMCR and PAR are parameters that are used to improve the solution vector. Both are defined in Step 3. Step 2. Initialize the harmony memory. The harmony memory (HM) is a memory location where all the solution vectors (sets of decision variables) are stored. In Step 2, the HM matrix, shown in Equation 7, is filled with randomly generated solution vectors using uniform distribution, where
82
L. dos Santos Coelho and D.L. de A. Bernert
⎡ x11 ⎢ 2 ⎢ x1 HM = ⎢ # ⎢ HMS-1 ⎢ x1 ⎢ HMS ⎣ x1
x12 x22
# x2HMS-1 x2HMS
x1N-1
" "
2 x N1
# # HMS-1 " xN −1 "
HMS xN −1
⎤ ⎥ ⎥ # ⎥ ⎥ HMS-1 xN ⎥ HMS ⎥ xN ⎦ x1N 2 xN
(7)
Step 3. Improvise a new harmony from the HM. A new harmony vector, x' = ( x1' , x2' ,..., x N' ) , is generated based on three rules: i) memory consideration, ii)
pitch adjustment, and iii) random selection. The generation of a new harmony is called ‘improvisation’. In the memory consideration, the value of the first decision variable ( x1' ) for the new vector is chosen from any value in the specified HM range ( x11 ~ x1HMS ) . Values of the other decision variables ( x 2' ~ x N' ) are chosen in the same manner. The HMCR, which varies between 0 and 1, is the rate of choosing one value from the historical values stored in the HM, while (1 - HMCR) is the rate of randomly selecting one value from the possible range of values.
{
}
⎧⎪ x ' ∈ x1i , xi2 ,..., xiHMS with probability HMCR xi' ← ⎨ i' ⎪⎩ xi ∈ X i with probability (1 - HMCR).
(8)
After, every component obtained by the memory consideration is examined to determine whether it should be pitch-adjusted. This operation uses the PAR parameter, which is the rate of pitch adjustment as follows:
⎧Yes with probabilit y PAR Pitch adjusting decision for xi' ← ⎨ ⎩ No with probabilit y (1 - PAR).
(9)
The value of (1 - PAR) sets the rate of doing nothing. If the pitch adjustment '
'
decision for xi is Yes, xi is replaced as follows: xi' ← xi' ± r ⋅ bw,
(10)
where bw is an arbitrary distance bandwidth, r is a random number generated using uniform distribution between 0 and 1. In Step 3, HM consideration, pitch adjustment or random selection is applied to each variable of the new harmony vector in turn. Step 4. Update the HM. If the new harmony vector, x' = ( x1' , x2' ,..., x N' ) is better
than the worst harmony in the HM, judged in terms of the objective function value, F, the new harmony is included in the HM and the existing worst harmony is excluded from the HM.
A Harmony Search Approach Using Exponential Probability Distribution
83
Step 5. Repeat Steps 3 and 4 until the stopping criterion has been satisfied. Usually stopping criterion is a sufficiently good objective function or a maximum number of iterations (generations), tmax. Maximum number of iterations criterion is adopted in this work.
3.2 Improved HS (IHS) Using Exponential Probability Distribution Recently, the use of exponential probability distribution to generate random numbers has been used in evolutionary algorithms [28-30]. Inspired by works of [28, 29], in this chapter, we present an improved HS algorithm using exponential probability distribution. The exponential probability distribution E(a,b) with density function used in this work is given by:
f ( x) =
1 exp (− x − a / b ), − ∞ ≤ x < ∞, with a , b > 0. 2b
(11)
It is evident that one can control the variance by changing the parameters a and b. Our goal is to investigate how this distribution influences the performance of HS. Generating random numbers from the absolute value of the exponential distribution, given by AE, is described as follows [29]: a = 0.3 b = 0.1 u1 = rand
(value adopted in this chapter) (value adopted in this chapter) (number with uniform distribution in the range [0;1])
u 2 = rand
(number with uniform distribution in the range [0;1])
if u1 > 0.5 x = a + blog( u 2 )
else x = a – blog( u 2 )
end AE = |x| Fig. 4 Generating random numbers with exponential distribution adopted in IHS
Generating random numbers using |E(a,b)| for the value of r (see Equation 10 in classical HS) in IHS may provide a good compromise between the probability of having a large number of small amplitudes around the current points (fine tuning) and a small probability of having higher amplitudes, which may allow the harmonies to move away from the current point and escape from local minima. In the IHS algorithm, the Equation 10 of classical HS is modified for xi' ← xi' ± AE ⋅ bw,
(12)
where AE is the absolute value of a number generated with exponential probability distribution.
84
L. dos Santos Coelho and D.L. de A. Bernert
4 Description of pH System and Simulation Results The evaluated case study represents the pH neutralization system described in [31]. The system has the feed streams which are composed of N components (thick stock, chemical additives and white water) and a titration stream (acid or base) at the mixing box. To simplify the formulation, a perfect mixing is assumed after the thin stock passes through the pipe to the open headbox. Therefore, the measured pH value at headbox can represent the real pH value of the thin stock which is fed to the wire section. In this context, the state space equation in continuous time domain is given by [31] V
dx + F ⋅ x = (1 − x)u dt
(13)
x(0) = 0 if u (t ) = 0, t < 0
(14)
pH = f (x)
(15)
where V is the total volume of the solution in the flow box (ℓ), F is total flow rate of the feed (thick stock, chemicals and white water) (ℓ/min), u is the flow rate of the titration stream (acid or base) (ℓ/min) limited in the range (0, 3), and f(x) is a monotonic increasing function representing the equivalent titration curve. Assuming that the zero order hold is used, Equation 13 can be expressed in discrete form by
⎡ (F + u (t ) )Ts ⎤ ⎧ ⎡ (F + u (t ) )Ts ⎤ ⎫ u (t ) x(t + 1) = x(t ) ⋅ exp ⎢− ⎥ + ⎨1 − exp ⎢− ⎥ ⎬ F + u (t ) V V ⎣ ⎦ ⎩ ⎣ ⎦⎭ pH (t + 1) = f ( x(t + 1))
⎡ ⎤ ⎛ x (t ) − 0.5 ⎞ pH (t + 1) = f ( x(t )) = 4.178 ⋅ ⎢atan⎜ ⎟ + 1.8⎥ , ⎝ 0.05 ⎠ ⎣ ⎦
(16) (17) (18)
where Ts is the sampling time and the values of pH (process output) are in range (0, 14). In this chapter, V = 2 ℓ, Ts = 0.1 min, and F = 1 ℓ/min are adopted. The effectiveness and advantages of the proposed FLC-PI-D based on HS and IHS approaches are demonstrated through controlling the pH neutralization system, where is adopted the following setup: • Reference trajectory in optimization phase (servo behavior): The desired reference signal is given by yr(k) = 2 (from sample 1 to 100), yr(k) = 10 (from sample 101 to 200), and yr(k) = 13 (from sample 201 to 300). • Optimization procedure: The HS and IHS approaches are used in optimization procedure of scaling factor parameters of FLC-PI-D. In the sequel it illustrates the main features of the HS and IHS approaches employed:
A Harmony Search Approach Using Exponential Probability Distribution
85
(i) Objective function: In this work, the objective function to be maximized is given by J=
10 1 + ∑ e(k ) + 0.04 ⋅ [u(k ) − u(k − 1)] N
.
(19)
2
k =1
(ii) Search space used in HS and IHS approaches: Ke, K∆e, Kc ∈ [-40, 40] and KD ∈ [-0.3, 0.3]. The classical HS and IHS algorithms were implemented in MATLAB (MathWorks). All the programs were run under Windows XP on a 3.2 GHz Pentium IV processor with 2 GB of random access memory. To eliminate stochastic discrepancy, in each case study, it adopted 30 independent runs for each of the optimization methods involving 30 different initial trial solutions for each optimization method. The total number of solution vectors in classical HS and IHS, i.e., the HMS was 20 and tmax = 300 generations. Furthermore, the bw, HMCR and PAR were 0.01, 0.9 and 0.3, respectively, in tested HS approaches. In this work, the adjustment of the rule base of FLC-PI-D was accomplished by fine tuning and heuristic corrections linked to the knowledge of the process to be controlled, as shown in Figure 5.
Fig. 5 Rule base adopted for the FLC-PI-D design
Tables 1 and 2 summarize the performance and design parameters of FLC-PI-D optimized by HS and IHS methods for 30 runs. As can be seen, for the pH control using FLC-PI-D, the best mean, minimum, and maximum from the 30 runs performed was using IHS. In this context, the best solution was obtained using IHS with the objective function J = 110.4468. Simulation results for the servo behavior of the FLC-PI-D using IHS for the pH neutralization system are shown in Figure 6. Table 1 Convergence of HS and IHS to optimize the FLC-PI-D (30 runs) Optimization Algorithm HS IHS
Maximum J
Mean J
Minimum J
100.9286 110.4468
90.3335 93.9736
81.9827 85.8320
Standard Deviation of J 5.1149 6.9594
86
L. dos Santos Coelho and D.L. de A. Bernert Table 2 Best results of FLC-PI-D and performance data in closed-loop system Parameter Ke K∆e Kc KD Mean of error signal Variance of control signal Objective function, J
HS 0.8514 -44.1318 1.2093 -0.0999 0.2403 1.2742 100.9286
IHS 0.3165 -34.5754 0.8078 -0.0917 0.2167 0.7535 110.4468
14
12
10
output
8
6
4 output signal reference signal
2
0 0
50
100
150 sample
200
250
300
(a) output 3.5
3
control signal
2.5
2
1.5
1
0.5
0 0
50
100
150 sample
200
250
300
(b) control signal Fig. 6 Best result of servo behavior using FLC-PI-D with IHS
A Harmony Search Approach Using Exponential Probability Distribution
87
5 Conclusions and Future Research This chapter presented the development of an IHS algorithm to the FLC-PI-D design. The effectiveness of the proposed control schemes was shown in simulations of a pH neutralization system. The utilization of HS and IHS approaches avoids the tedious manual trial-and-error procedure and it presents robustness in tuning of FLC-PI-D design parameters. The IHS method proposed in this study presents some promising features. Parametric uncertainties affect the closed loop system dynamics. However, the effectiveness of the proposed FLC-PI-D strategy using IHS is corroborated in Figure 6. The aim of future works includes investigating the use of IHS for FLC-PI-D tuning applied to multivariable nonlinear processes.
References 1. Ahn, K.K., Truong, D.Q.: Online tuning fuzzy PID controller using robust extended Kalman filter. Journal of Process Control 19, 1011–1023 (2009) 2. Feng, G.: A survey on analysis and design of model-based fuzzy control systems. IEEE Transactions on Fuzz Systems 14, 676–697 (2006) 3. Mohan, B.M., Sinha, A.: Analytical structure and stability analysis of a fuzzy PID controller. Applied Soft Computing 8, 749–758 (2008) 4. Wang, L., Du, W., Wang, H., Wu, H.: Fuzzy self-tuning PID control of the operation temperatures in a two-staged membrane separation process. Journal of Natural Gas Chemistry 17, 409–414 (2008) 5. Li, H.X., Gatland, H.B.: Enhanced methods of fuzzy logic control. In: Proceedings of FUZZ-IEEE/IFES, Yokohama, Japan, vol. 1, pp. 331–336 (1995) 6. Fadaei, A., Salahshoor, K.: Design and implementation of a new fuzzy PID controller for networked control systems. ISA Transactions 47, 351–361 (2008) 7. Golob, M.: Decomposed fuzzy proportional-integral-derivative controllers. Applied Soft Computing 1, 201–214 (2001) 8. Kwok, D.P., Tam, P., Li, C.K., Wang, P.: Linguistic PID controllers. In: Proceedings of 11th World Congress of IFAC, Tallin, Estonia, USSR, vol. 7, pp. 192–197 (1990) 9. Lan, L.H.: Stability analysis for a class of Takagi–Sugeno fuzzy control systems with PID controllers. International Journal of Approximate Reasoning 46, 109–119 (2007) 10. Li, Y., Ng, K.C.: Reduced rule-base and direct implementation of fuzzy logic control. In: Proceedings of 13th World Congress of IFAC, San Francisco, CA, USA, pp. 85–90 (1997) 11. Mann, G.K.I., Hu, B.G., Gosine, R.G.: Analysis of direct action fuzzy PID controller structures. IEEE Transactions on Systems, Man, and Cybernetics — Part B: Cybernetics 29, 371–388 (1999) 12. Shayeghi, H., Shayanfar, H.A., Jalili, A.: Multi-stage fuzzy PID power system automatic generation controller in deregulared environments. Energy Conversion and Management 47, 2829–2845 (2006) 13. Soyguder, S., Karakose, M., Alli, H.: Design and simulation of self-tuning PID-type fuzzy adaptive control for an expert HVAC system. Expert Systems with Applications 36, 4566–4573 (2009)
88
L. dos Santos Coelho and D.L. de A. Bernert
14. Bagis, A., Karaboga, D.: Evolutionary algorithm-based fuzzy PD control of spillway gates of dams. Journal of the Franklin Institute 344, 1039–1055 (2007) 15. Chou, C.H.: Genetic algorithm-based optimal fuzzy controller design in the linguistic space. IEEE Transactions on Fuzzy Systems 14, 372–395 (2006) 16. Cordón, O., Gomide, F., Herrera, F., Hoffmann, F.: Magdalena Ten years of genetic fuzzy systems: current framework and new trends. Fuzzy Sets and Systems 141, 5–31 (2004) 17. Marseguerra, M., Zio, E., Cadini, F.: Genetic algorithm optimization of a model-free fuzzy control system. Annals of Nuclear Energy 32, 712–728 (2005) 18. Mucientes, M., Moreno, D.L., Bugarín, A., Barro, S.: Design of a fuzzy controller in mobile robotics using genetic algorithms. Applied Soft Computing 7, 540–546 (2007) 19. Wu, C.J., Liu, G.Y.: A genetic approach for simultaneous design of membership functions and fuzzy control rules. Journal of Intelligent and Robotic Systems 28, 195–211 (2000) 20. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76(2), 60–68 (2001) 21. Saka, M.P.: Optimum design of steel sway frames to BS5950 using harmony search algorithm. Journal of Constructional Steel Research 65, 36–43 (2009) 22. Zadeh, L.A.: Fuzzy sets. Information and Control 8, 338–353 (1965) 23. Coelho, L.S., Coelho, A.A.R.: Fuzzy PID controllers: structures, design principles and application for nonlinear practical process. In: Roy, R., Furushashi, T., Chawdhry, K. (eds.) Advances in Soft Computing – Engineering Design and Manufacturing, pp. 147–159. Springer, London (1999) 24. Mamdani, E., Assilian, S.: An experiment in linguistic synthesis with a fuzzy logic controller. International Journal on Man Machine Studies 7, 1–13 (1975) 25. Takagi, T., Sugeno, M.: Fuzzy identification of systems and its applications to modeling and control. IEEE Transactions on Systems, Man, and Cybernetics 15, 116–132 (1985) 26. Qin, S.J.: Auto-tuned fuzzy logic control. In: Proceedings of the American Control Conference, Baltimore, Maryland, USA, pp. 2465–2469 (1994) 27. Coelho, L.S., Bernert, D.L.A.: An improved harmony search algorithm for synchronization of discrete-time chaotic systems. Chaos, Solitons & Fractals 41, 2526–2532 (2009) 28. Coelho, L.S., Alotto, P.: Global optimization of electromagnetic devices using an exponential quantum-behaved particle swarm optimizer. IEEE Transactions on Magnetics 44, 1074–1077 (2008) 29. Krohling, R.A., Coelho, L.S.: PSO-E: Particle swarm with exponential distribution. In: Proceedings of IEEE Congress on Evolutionary Computation (CEC 2006), pp. 5577– 5582 (2006) 30. Narihisa, H., Taniguchi, T., Ohta, M., Katayama, K.: Exponential evolutionary programming without self-adaptive strategy parameter. In: Proceedings of IEEE Congress on Evolutionary Computations, pp. 544–551 (2006) 31. Logghe, D., Wang, H.: Modelling a non-linear pH process via the use of B-splines neural network. In: Proceedings of the IEEE International Conference on Control Applications (1997)
Hybrid Taguchi-Harmony Search Approach for Shape Optimization Ali Rıza Yildiz and Ferruh Öztürk
*
Abstract. Harmony search algorithms have recently gained a lot of attention from the optimization research community. In this chater, a new optimization approach based on harmony search algorithm and Taguchi’s method is presented to solve shape optimization problems. The validity and efficiency of the proposed approach are evaluated in an optimum design problem of a vehicle component by illustrating how the present approach can be applied for solving shape optimization problems. The first application of harmony search algorithm to the shape optimization problems in the literature is presented in this chapter. The results of the shape optimization problem indicate that the proposed approach is highly competitive and it can be considered as a viable alternative in solving real-world optimization problems, finding beter solutions compared to other approaches that are representative of the state-of-the-art in the optimization literature.
1 Introduction Structural optimization has gain a lot of attention due to its great contribution to cost, material and time savings in the procedures of the engineering design. Topology and shape optimization have deserved great attentions in terms of its important purpose and inherent difficulties. Shape optimization is becoming more important as industry attempts to optimize (minimize or maximize) objective functions while still maintaining a sufficiently strong and safe design. The goal of shape optimization is to find the optimal shape of a continuum medium to maximize or minimize an objective function such as minimizing the weight or maximizing the stiffness of the structure, subjected to the stress or displacement constraint conditions. Since classical optimization methods are not only time consuming in solving complex nature problems but also they may not be used efficiently in finding global or near global optimum solutions, it is difficult to design the best product Ali Rıza Yildiz and Ferruh Öztürk Mechanical Engineering Department, Uludag University, Bursa, Turkey Email: {aliriza,fozturk}@uludag.edu.tr Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 89–98. springerlink.com © Springer-Verlag Berlin Heidelberg 2010
90
A.R. Yildiz and F. Öztürk
by classical optimization methods. The increasing demand to lightweight and lowcost structures has forced researchers to develop new approaches. Recent advancements in optimization area introduced new opportunities to achieve better solutions for shape design optimization problems. Therefore, there is a need to develop new methods to overcome drawbacks and to improve the existing optimization techniques to design products economically. Since the heuristic search techniques such as genetic algorithm, simulated annealing, ant colony algorithm, particle swarm optimization, immune algorithm and harmony search algorithm are more effective than the gradient techniques in finding the global minimum, they have been widely applied in various fields of science [1-19]. A detailed review of these algorithms as well as their applications in the optimum structural design can be found in [9, 18]. Fast convergence speed and robustness in finding the global minimum are not easily achieved at the same time. Fast convergence requires a minimum number of calculations, increasing the probability of missing important points; on the other hand, the evaluation of more points for finding the global minimum decreases the convergence speed. This leads to the question: ‘how to obtain both fast convergence speed and global search capability at the same time’. There have been a number of attempts to answer this question, while hybrid algorithms have shown outstanding reliability and efficiency in application to the engineering optimization problems [19-27]. Therefore, researchers are paying great attention on hybrid approaches to answer this question, particularly to avoid premature convergence towards local minima and to reach the global optimum results. Although some improvements regarding shape design optimization issues are achieved, the complexity of design problems presents shortcomings. A new hybrid approach based on robustness issues are used to help better harmony search algorithm. It has been aimed to reach optimum designs by using Taguchi’s robust parameter design approach coupled with harmony search algorithm. In this new hybrid approach, S/N values are calculated and ANOVA (analysis of variance) table for objective function(s) is formed using S/N ratios. According to results of ANOVA table, appropriate interval levels of design parameters are found and then, initial harmony memory is defined according to these interval levels. Then, optimum results of design optimization problem are obtained using the harmony search algorithm. The new hybrid optimization approach is applied to a shape optimization problem taken from automotive industry to demonstrate the application of the present approach to real-world shape design optimization problems.
2 Global Optimization by Hybridization Optimization problems have objective function(s) and constraints that must be satisfied at the same time. A general mathematical model of constrained optimization problems can be defined as follows [28]:
Hybrid Taguchi-Harmony Search Approach for Shape Optimization
Minimize/Maximize fm(x), m = 1,2,..., M
91
(1)
Subject to gj (x) ≥ 0, j = 1,2,..., J
(2)
hk(x) =0, k = 1,2,..., K
(3)
xi(L) ≤ xi ≤ xi(U), i = 1,2,..., n
(4)
A solution x is a vector of n decision variables: x = (x1, x2,…,xn)T. Each decision variable xi takes a value between a lower xi(L) and an upper xi(U) bound. These bounds define decision variable space. In this mathematical model gj (x) and hk(x) define inequality and equality constraints, respectively. Objective function(s) f(x) = (f1(x), f2(x),…, fM(x))T can be either minimized or maximized. The problem is to find optimum variables that satisfy the constraints given by (2) and (3). A larger population makes the algorithm more likely to find good solutions, but also increases computing time taken by the algorithm. The problem with larger population is to tend to converge and stick around certain solutions; therefore, there is a need to define the efficient size of population to efficiently have global optimal results. This shortcoming is eliminated by introducing Taguchi-based initial harmony memory.
2.1 Harmony Search Algorithm The harmony search (HS) algorithm was recently developed in an analogy with music improvisation process where music players improvise the pitches of their instruments to obtain better harmony [14]. The working principle of the HS algorithm is very different from classical optimization techniques. The HS algorithm uses a random search, which is based on random selection, memory consideration, and pitch adjustmenting. It has been successfully applied to various benchmark and real-world problems [14-20]. The steps in the procedure of harmony search are as follows: • • • • •
Step 1: Initialize the problem and algorithm parameters. Step 2: Initialize the harmony memory. Step 3: Improvise a new harmony. Step 4: Update the harmony memory. Step 5: Check the stopping criterion.
For further details about these steps, various HS algorithm structures can be found from Geem [17].
92
A.R. Yildiz and F. Öztürk
2.2 Taguchi Method Taguchi method chooses the most suitable combination of the levels of controllable factors by using S/N table and orthogonal arrays against the factors that form the variation and are uncontrollable in product and process. Hence, it tries to reduce the variation in product and process to the least. Taguchi uses statistical performance measure which is known as S/N ratio that takes both medium and variation into consideration [29].
Finite element analysis
HARMONY SEARCH ALGORITHM Initialize the harmony memory
TAGUCHI’S METHOD
Define design variables and matrix of experiments
Improvise a new harmony Update harmony memory
Check stopping criterion
Optimum settings of design variables
Compute S/N ratios and conduct ANOVA analysis
Determine optimum levels of design variables
Initial memory range for search space
Fig. 1 Hybrid harmony search algorithm based shape optimization approach
Most of the shape optimization problems in industry have uncontrollable variations in their design parameters. There is a need to overcome the shortcomings due to the traditional optimization methods and also to further improve the strength of recent approaches to achieve better results for the real-world design optimization problems. Therefore, in this chapter, a hybrid approach for shape optimization is proposed based on Taguchi’s method and HS algorithm. The architecture of proposed hybrid approach is given in Figure 1. Although the HS algorithm has been used for different optimization studies, it has not been used for shape optimization up to now in literature. For the first time in the literature, HS algorithm and hybrid HS are used for shape optimization.
Hybrid Taguchi-Harmony Search Approach for Shape Optimization
93
Taguchi’s method is introduced to help to define robust initial population levels of design parameters and to reduce the effects of noise factors to achieve better initial harmony memory. The problem with larger population is to tend to converge and stick around certain solutions which may not be the best one. This is handled with the help of robust parameter levels which are embedded into HS algorithm as being initial population intervals. In other words, the design space is restricted and refined based on the effect of the various design variables on objective function(s). The purpose of the ANOVA tables is to help differentiate the robust designs from the non-robust ones. Finally, optimum results of shape optimization problem are obtained by applying HS algorithm. The present approach is considered in two stages as follows: 1) determine efficient solution space using Taguchi’s method, and 2) apply HS to find optimal solution set of design variables. In the first stage, Taguchi’s robust parameter design procedure is used to find the levels of variables for efficient search space as follows: • • • • •
Identify the objectives, constraints and design parameters. Determine the settings of the design parameter levels. Conduct the experiments using orthogonal array. Compute S/N ratios and ANOVA analysis. Find the optimal settings of design parameters.
The main issue of experimental analysis is ANOVA analysis which is formed using S/N ratios for objective function(s). According to results of ANOVA, appropriate levels of design parameters are found, and then initial population of HS is defined according to the levels. Finally, optimum results of the problem are obtained by applying HS algorithm as follows: • • • •
Define initial harmony memory. Use algorithm operators to improvise a new harmony. Update harmony memory. Repeat the loop until the optimum shape is generated.
The trend in the research area of optimization is to improve the efficiency of algorithms. In this chapter, a new hybrid approach is proposed to improve the performance of the HS algorithm. The argument behind the proposed approach is that the strength of one algorithm can be used to improve the performance of another approach in the optimization process. The proposed hybrid approach is one of the first attempts to use Taguchi’s method to define the ranges of initial population space for the HS algorithm to solve shape optimization problems. The combination of Taguchi’s method and HS algorithm is resulted in a solution, which leads to better parameter values for shape optimization problems. The algorithm of the proposed hybrid approach can be outlined as follows:
94
A.R. Yildiz and F. Öztürk
BEGIN Step 1: Taguchi method Begin Choose convenient orthogonal array from Taguchi’s orthogonal arrays. Define levels and intervals For i:=1 to NOE (number of experiments) do begin Compute objective function values end; Choose convenient S/N ratio type based on objective function(s) For i:=1 to NOE do begin Compute S/N ratios end; Constitute ANOVA table for objective functions using S/N ratios Determine optimum levels and intervals using ANOVA table Use these levels and intervals for forming initial population end; Begin Input Step 2: Harmony search algorithm Initialize the problem and algorithm parameters. Initialize the harmony memory. Improvise a new harmony. Update the harmony memory. Check the stopping criterion. end; END
3 Shape Optimization of Vehicle Component In this section, the proposed approach is applied to the optimal shape design of a vehicle part taken from automotive industry. The objective functions are due to the volume and the frequency of the part which is to be designed for minimum volume and avoiding critical frequency subject to strength constraints. In the first stage, the experiments are designed to evaluate the effects of four design variables related to objective functions. The four shape design variables x1, x2, x3 and x4 are selected as shown in Fig. 2. The feasible range of design variables without shape distortions is considered as 6 < x1 < 30; 21 < x2 < 27; 8 < x3 < 14; and 28 < x4 < 46. Matrix experiments are designed using L16 orthogonal arrays and S/N ratios are conducted for each objective. Smaller the better and larger the better characteristics are applied to compute S/N ratios based on each objective as smaller the better for volume and compliance. The details about orthogonal array, S/N ratios, ANOVA analysis, and how they are computed and used for experimental evaluations are given in the reference of Phadke [29]. The parameter levels are taken as x1 = 30; 21 < x2