Oscar Castillo Type-2 Fuzzy Logic in Intelligent Control Applications
Studies in Fuzziness and Soft Computing, Volume 272 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. 257. Salvatore Greco, Ricardo Alberto Marques Pereira, Massimo Squillante, Ronald R. Yager, and Janusz Kacprzyk (Eds.) Preferences and Decisions,2010 ISBN 978-3-642-15975-6 Vol. 258. Jorge Casillas and Francisco José Martínez López Marketing Intelligent Systems Using Soft Computing, 2010 ISBN 978-3-642-15605-2 Vol. 259. Alexander Gegov Fuzzy Networks for Complex Systems, 2010 ISBN 978-3-642-15599-4 Vol. 260. Jordi Recasens Indistinguishability Operators, 2010 ISBN 978-3-642-16221-3 Vol. 261. Chris Cornelis, Glad Deschrijver, Mike Nachtegael, Steven Schockaert, and Yun Shi (Eds.) 35 Years of Fuzzy Set Theory, 2010 ISBN 978-3-642-16628-0 Vol. 262. Zsófia Lendek, Thierry Marie Guerra, Robert Babuška, and Bart De Schutter Stability Analysis and Nonlinear Observer Design Using Takagi-Sugeno Fuzzy Models, 2010 ISBN 978-3-642-16775-1 Vol. 263. Jiuping Xu and Xiaoyang Zhou Fuzzy-Like Multiple Objective Decision Making, 2010 ISBN 978-3-642-16894-9 Vol. 264. Hak-Keung Lam and Frank Hung-Fat Leung Stability Analysis of Fuzzy-Model-Based Control Systems, 2011 ISBN 978-3-642-17843-6
Vol. 265. Ronald R. Yager, Janusz Kacprzyk, and Prof. Gleb Beliakov (eds.) Recent Developments in the Ordered Weighted Averaging Operators: Theory and Practice, 2011 ISBN 978-3-642-17909-9 Vol. 266. Edwin Lughofer Evolving Fuzzy Systems – Methodologies, Advanced Concepts and Applications, 2011 ISBN 978-3-642-18086-6 Vol. 267. Enrique Herrera-Viedma, José Luis García-Lapresta, Janusz Kacprzyk, Mario Fedrizzi, Hannu Nurmi, and Sławomir Zadro˙zny Consensual Processes, 2011 ISBN 978-3-642-20532-3 Vol. 268. Olga Poleshchuk and Evgeniy Komarov Expert Fuzzy Information Processing, 2011 ISBN 978-3-642-20124-0 Vol. 269. Kasthurirangan Gopalakrishnan, Siddhartha Kumar Khaitan, and Soteris Kalogirou (Eds.) Soft Computing in Green and Renewable Energy Systems, 2011 ISBN 978-3-642-22175-0 Vol. 270. Christer Carlsson and Robert Fullér Possibility for Decision, 2011 ISBN 978-3-642-22641-0 Vol. 271. Enric Trillas, P. Bonissone, Luis Magdalena and Janusz Kacprzyk Combining Experimentation and Theory, 2011 ISBN 978-3-642-24665-4 Vol. 272. Oscar Castillo Type-2 Fuzzy Logic in Intelligent Control Applications, 2012 ISBN 978-3-642-24662-3
Oscar Castillo
Type-2 Fuzzy Logic in Intelligent Control Applications
ABC
Author Prof. Oscar Castillo Tijuana Institute of Technology (SNI Level 2) P.O. Box 4207 Chula Vista, CA 91909 USA Email:
[email protected]
ISBN 978-3-642-24662-3
e-ISBN 978-3-642-24663-0
DOI 10.1007/978-3-642-24663-0 Studies in Fuzziness and Soft Computing
ISSN 1434-9922
Library of Congress Control Number: 2011940006 c 2012 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 on acid-free paper 987654321 springer.com
Preface
We describe in this book, hybrid intelligent systems using type-2 fuzzy logic for intelligent control and mobile robotics. Hybrid intelligent systems combine several intelligent computing paradigms, including fuzzy logic, and bio-inspired optimization algorithms, which can be used to produce powerful automatic control systems. The book is organized in three main parts, which contain a group of chapters around a similar subject. The first part consists of chapters with the main theme of theory and design algorithms, which are basically chapters that propose new models and concepts, which can be the basis for achieving intelligent control and mobile robotics. The second part contains chapters with the main theme of evolutionary optimization of type-2 fuzzy systems in intelligent control with the aim of designing optimal type-2 fuzzy controllers for complex control problems. The third part contains chapters with the theme of bio-inspired optimization of type-2 fuzzy systems in intelligent control, which includes the application of particle swarm intelligence and ant colony optimization algorithms for obtaining optimal type-2 fuzzy controllers. In the part of theory and algorithms there are 4 chapters that describe different contributions that propose new models and concepts, which can be the considered as the basis for achieving intelligent control and mobile robotics. The first chapter offers an introduction to the area of type-2 fuzzy logic for intelligent control applications. The second chapter describes the basic concepts and theory of type-2 fuzzy logic that will be used in the applications mentioned in the book. The third chapter describes a general methodology for the design of type-2 fuzzy logic controllers. The fourth chapter describes the important concept of stability in type-2 fuzzy controllers and a systematic method to achieve it. In the part of evolutionary optimization of type-2 fuzzy systems intelligent control there are 5 chapters that describe different contributions on achieving control using hybrid intelligent systems based on type-2 fuzzy logic. The first chapter describes the hardware implementation of interval type-2 fuzzy controllers on FPGAs. The second chapter deals with automatic control of aircraft dynamic systems using type-2 fuzzy controllers generated by genetic algorithms. The third chapter describes the design of type-2 fuzzy reactive and tracking controllers for autonomous mobile robot navigation. The fourth chapter describes the application of genetic algorithm for the automatic design of interval type-2 fuzzy controllers for linear and non-linear plants. The fifth chapter proposes the use of the human evolutionary model for the design of intelligent type-2 fuzzy logic controllers for general applications.
VI
Preface
In the part of bio-inspired optimization of type-2 fuzzy controllers there are 4 chapters that describe different contributions of new algorithms for optimization and their application to designing optimal type-2 fuzzy logic controllers. The first chapter describes the optimization of type-2 fuzzy logic systems using ant colony optimization for the design intelligent controllers for mobile robots. The second chapter deals with an approach for the optimization of membership functions for fuzzy control based on the ant system algorithm. The third chapter describes the application of particle swarm algorithms in the optimization of interval type-2 fuzzy logic control for autonomous mobile robots. The fourth chapter describes the optimal design of intelligent type-2 fuzzy logic controllers for non-linear plants using particle swarm optimization. In conclusion, the book comprises chapters on diverse aspects of type-2 fuzzy logic and evolutionary and bio-inspired models for achieving intelligent control for different applications, including mobile robotics. The combination of evolutionary or bio-inspired optimization methods with type-2 fuzzy logic can be considered as a hybrid approach for obtaining efficient and accurate solutions to complex control problems.
July 21, 2011
Oscar Castillo Tijuana Institute of Technology Mexico
Contents
Part I: Basic Concepts and Theory 1 Introduction to Type-2 Fuzzy Logic Control .................................................3 2 Type-2 Fuzzy Logic...........................................................................................7 2.1 Type-2 Fuzzy Sets ......................................................................................8 2.2 Operations of Type-2 Fuzzy Sets..............................................................13 2.3 Type-2 Fuzzy Systems..............................................................................16 2.4 Summary...................................................................................................22 3 Design of Interval Type-2 Fuzzy Logic Controllers.....................................23 3.1 Introduction ..............................................................................................23 3.2 Fuzzy Logic Systems ................................................................................24 3.3 Experimental Results for Intelligent Control ............................................33 3.4 Summary...................................................................................................47 4 Design of Stable Type-2 Fuzzy Logic Controllers........................................49 4.1 Introduction ..............................................................................................49 4.2 Fuzzy Logic Controllers ...........................................................................50 4.3 Systematic and Design of Stable Fuzzy Controllers .................................52 4.4 Experimental Results ................................................................................56 4.5 Summary...................................................................................................61
Part II: Evolutionary Optimization of Type-2 Fuzzy Systems for Intelligent Control 5 Design of a Type-2 Fuzzy Controller and Its Comparison with Type-1 Fuzzy and PID Controllers for Velocity Regulation in a Motor.................65 5.1 Introduction ..............................................................................................65 5.2 Design of FLC-T1, FLC-T2 and PID Controllers for Speed Regulation of the DC Motor .....................................................................68 5.3 Test and Result the Comparisons with FLC-T2 and FLC-T1 in FPGA´s and PID Controllers ................................................................72 5.4 Summary...................................................................................................75
VIII
Contents
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems for Longitudinal Control of an Airplane ............................................................77 6.1 Introduction ..............................................................................................77 6.2 Background and Basic Concepts ..............................................................77 6.3 Genetic Algorithms...................................................................................81 6.4 Problem Description .................................................................................82 6.5 PID Control and Fuzzy System for Longitudinal Control ........................82 6.6 Simulation Results ....................................................................................84 6.7 Summary...................................................................................................92 7 Optimizing Type-2 Fuzzy Reactive and Tracking Controllers Using Genetic Algorithms.........................................................................................93 7.1 Introduction ..............................................................................................93 7.2 Mobile Robot............................................................................................94 7.3 Evolutionary Method Description.............................................................95 7.4 Simulation Results ..................................................................................101 7.5 Summary.................................................................................................103 8 A Hybrid PSO-GA Optimization Method to Design Type-1 and Type-2 Fuzzy Logic Controllers ...............................................................................105 8.1 Introduction ............................................................................................105 8.2 Theoretical Basis and Problem Statement ..............................................106 8.3 Fuzzy Logic Control Design...................................................................109 8.4 Simulation Results ..................................................................................110 8.5 Summary.................................................................................................118 9 Evolutionary Optimization of Interval Type-2 Fuzzy Systems Using the Human Evolutionary Model ........................................................................119 9.1 Introduction ............................................................................................119 9.2 Fuzzy Controllers....................................................................................120 9.3 The Human Evolutionary Model ............................................................122 9.4 Experimental Results ..............................................................................124 9.5 Summary.................................................................................................131
Part III: Bio-inspired Optimization of Type-2 Fuzzy Systems in Intelligent Control 10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot Using the Ant Colony Metaheuristic..............................................135 10.1 Introduction.........................................................................................135 10.2 S-ACO Algorithm...............................................................................136 10.3 Problem Statement..............................................................................137 10.4 Fuzzy Logic Control Design...............................................................139 10.5 ACO Architecture ...............................................................................141 10.6 Simulation Results ..............................................................................144 10.7 Summary.............................................................................................149
Contents
IX
11 ACO-Tuning of a Fuzzy Controller for the Ball and Beam Problem.....151 11.1 Introduction.........................................................................................151 11.2 Ball and Beam System........................................................................152 11.3 Fuzzy Controller .................................................................................153 11.4 Problem Description ...........................................................................153 11.5 Ant Colony Optimization....................................................................155 11.6 Experimental Results ..........................................................................157 11.7 Summary.............................................................................................159 12 Optimization of Type-2 Fuzzy Logic Controllers Using PSO Applied to Linear Plants...........................................................................................161 12.1 Introduction.........................................................................................161 12.2 Theoretical Basis and Problem Statement ..........................................162 12.3 Fuzzy Logic Control Design...............................................................164 12.4 Simulation Results ..............................................................................165 12.5 Summary.............................................................................................172 13 Optimization of an Interval Type 2 Fuzzy Controller for an Autonomous Mobile Robot Using the Particle Swarm Optimization Algorithm ........173 13.1 Introduction.........................................................................................173 13.2 Optimization Algorithm Using Particle Swarm (PSO) .......................174 13.3 Design of the Fuzzy Controller...........................................................175 13.4 Results of the Simulations ..................................................................176 13.5 Summary.............................................................................................179 References ..........................................................................................................181 Index ...................................................................................................................187
Part I
Chapter 1
Introduction to Type-2 Fuzzy Logic Control
We describe in this book, new methods for building intelligent systems using type-2 fuzzy logic and soft computing techniques. Soft Computing (SC) consists of several computing paradigms, including type-1 fuzzy logic, neural networks, and genetic algorithms, which can be used to create powerful hybrid intelligent systems. In this book, we are extending the use of fuzzy logic to a higher order, which is called type2 fuzzy logic [13]. Combining type-2 fuzzy logic with traditional SC techniques, we can build powerful hybrid intelligent systems that can use the advantages that each technique offers in solving complex control problems. Fuzzy logic is an area of soft computing that enables a computer system to reason with uncertainty [8]. A fuzzy inference system consists of a set of if-then rules defined over fuzzy sets [37]. Fuzzy sets generalize the concept of a traditional set by allowing the membership degree to be any value between 0 and 1. This corresponds, in the real world, to many situations where it is difficult to decide in an unambiguous manner if something belongs or not to a specific class. Fuzzy expert systems, for example, have been applied with some success to problems of decision, control, diagnosis and classification, just because they can manage the complex expert reasoning involved in these areas of application. The main disadvantage of fuzzy systems is that they can't adapt to changing situations. For this reason, it is a good idea to combine fuzzy logic with neural networks or genetic algorithms, because either one of these last two methodologies could give adaptability to the fuzzy system [1]. On the other hand, the knowledge that is used to build these fuzzy rules is uncertain. Such uncertainty leads to rules whose antecedents or consequents are uncertain, which translates into uncertain antecedent or consequent membership functions [20]. Type-1 fuzzy systems, like the ones mentioned above, whose membership functions are type-1 fuzzy sets, are unable to directly handle such uncertainties. We also describe in this book, type-2 fuzzy systems, in which the antecedent or consequent membership functions are type-2 fuzzy sets. Such sets are fuzzy sets whose membership grades themselves are type-1 fuzzy sets; they are very useful in circumstances where it is difficult to determine an exact membership function for a fuzzy set [33]. Uncertainty is an inherent part of intelligent systems used in real-world applications [42]. The use of new methods for handling incomplete information is of fundamental importance [52]. Type-1 fuzzy sets used in conventional fuzzy systems cannot fully handle the uncertainties present in intelligent systems [56]. Type-2 fuzzy sets that are used in type-2 fuzzy systems can handle such uncertainties in a better way because they provide us with more parameters [67]. This book
O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 3–5. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
4
1 Introduction to Type-2 Fuzzy Logic Control
deals with the design of intelligent systems using interval type-2 fuzzy logic for minimizing the effects of uncertainty produced by the instrumentation elements, environmental noise, etc. Experimental results include simulations of feedback control systems for non-linear plants using type-1 and type-2 fuzzy logic controllers; a comparative analysis of the systems’ response is performed, with and without the presence of uncertainty [69]. Stability is one of the more important aspects in the traditional knowledge of Automatic Control [13]. Type-2 Fuzzy Logic is an emerging and promising area for achieving Intelligent Control (in this case, Fuzzy Control). In this book we consider the use the Fuzzy Lyapunov Synthesis as proposed by Margaliot to build a Lyapunov Stable Type-1 Fuzzy Logic Control System [14, 21], and then we make an extension from a Type-1 to a Type-2 Fuzzy Logic Control System, ensuring the stability on the control system and proving the robustness of the corresponding fuzzy controller [22]. This book deals with the design of type-2 fuzzy logic controllers using genetic algorithms [47]. The type-2 controllers were tested with different levels of uncertainty to regulate velocity in a Direct current (DC) motor. The type-2 controllers were synthesized in Very High Description Language (VHDL) code for Field Programmable Gate Array (FPGA), using Xilinx System Generator (XSG) of Xilinx ISE and Matlab-Simulink [70]. Comparisons were made between type-2 versus type-1 fuzzy controllers in VHDL code and a Proportional Integral Differential (PID) Controller, to regulate the velocity of a DC motor [68]. We also present the design of fuzzy systems for the longitudinal control of an F-14 airplane using genetic algorithms [23]. The longitudinal control is carried out by controlling only the elevators of the airplane. To carry out such control it is necessary to use the stick, the rate of elevation and the angle of attack. These 3 variables are the input to the fuzzy inference system, which is of Mamdani type, and we obtain as output the value of the elevators. After designing the fuzzy inference system we turn to the simulation stage. Simulation results of the longitudinal control are obtained using a plant in Simulink and those results are compared against the PID controller. For optimizing the fuzzy logic control design we use a genetic algorithm (GA). The book also describes an evolutionary algorithm approach for the optimization of type-2 fuzzy reactive and tracking controllers applied to a mobile robot [3]. The algorithm optimizes the type-2 fuzzy inference systems for each of the controllers. Both the reactive and tracking controllers are needed to achieve autonomous navigation of the mobile robot. In this book we also propose the use of a hybrid PSO-GA optimization method for automatic design of fuzzy logic controllers (FLC) to minimize the steady state error of a plant's response [49]. We test the optimal FLC obtained by the hybrid PSO-GA method applied on linear systems using benchmark plants. The bioinspired and the evolutionary methods are used to find the parameters of the membership functions of the FLC to obtain the optimal controller [50]. Simulation results are obtained with Simulink showing the feasibility of the proposed approach. A comparison is also made among the proposed Hybrid PSO-GA, GA and PSO to determine if there is a significant difference in the results.
1 Introduction to Type-2 Fuzzy Logic Control
5
The use of new methods for handling incomplete information is of fundamental importance in engineering applications [28]. We simulated the effects of uncertainty produced by the instrumentation elements in type-1 and type-2 fuzzy logic controllers to perform a comparative analysis of the systems’ response, in the presence of uncertainty. We are presenting an innovative idea to optimize interval type-2 membership functions using an average of two type-1 systems with the Human Evolutionary Model [16]. We are showing comparative results of the optimized proposed method. We found that the optimized membership functions for the inputs of a type-2 system increases the performance of the system for high noise levels. We describe the use of Ant Colony Optimization (ACO) for the ball and beam control problem, in particular for the problem of tuning a fuzzy controller of Sugeno type. In our study case the controller has four inputs, each of them with two membership functions, we consider the interpolation point for every pair of membership function as the main parameter and their individual shape as secondary ones in order to achieve the tuning of the fuzzy controller by using an ACO algorithm [15]. Simulation results show that using ACO and coding the problem with just three parameters instead of six, allows us to find an optimal set of membership function parameters for the fuzzy control system with less computational effort needed [48]. In this book we also describe the application of a simple ACO as a method of optimization for membership functions’ parameters of a fuzzy logic controller in order to find the optimal intelligent controller for an autonomous wheeled mobile robot. Simulation results show that ACO outperforms a GA in the optimization of fuzzy logic controllers for an autonomous mobile robot [48]. This work also describes the application of the optimization algorithm for particle swarm known by its acronym as PSO, used to adjust the parameters of membership functions of a fuzzy logic controller (FLC) to find the optimal intelligent control for a wheeled autonomous mobile robot. Results of several simulations show that the PSO is able to optimize the type-1 and type 2 FLC for this specific application [49]. We use the Particle Swarm Optimization (PSO) method to find the parameters of the membership functions of a type-2 fuzzy logic controller (Type-2 FLC) in order to minimize the state error for linear systems. PSO is used to find the optimal Type-2 FLC to achieve regulation of the output and stability of the closed-loop system [50]. For this purpose, we change the values of the cognitive, social and inertia variables in the PSO. Simulation results, with the optimal FLC implemented in Simulink, show the feasibility of the proposed approach. In general, the above mentioned applications of type-2 fuzzy logic in intelligent control are representative of the state of art in the area. However, we also have to mention that there exist applications of type-2 fuzzy logic in pattern recognition [31, 32, 46, 54, 57, 58, 59, 73], time series prediction [5, 9, 29, 36, 43, 66, 85], and classification [24, 38, 55, 63, 83], that have been successful in the real world, but are not the main concern in this book. There have also been important theoretical advances on type-2 fuzzy logic that have enable more efficient processing and type reduction [27, 38, 42, 44, 68, 71], which have helped obtaining solutions to real world problems [72, 74, 77, 86].
Chapter 2
Type-2 Fuzzy Logic
We introduce in this chapter a new area in fuzzy logic, which is called type-2 fuzzy logic [84]. Basically, a type-2 fuzzy set is a set in which we also have uncertainty about the membership function [42]. Of course, type-2 fuzzy systems consist of fuzzy if-then rules, which contain type-2 fuzzy sets [13]. We can say that type-2 fuzzy logic is a generalization of conventional fuzzy logic (type-1) in the sense that uncertainty is not only limited to the linguistic variables but also is present in the definition of the membership functions [56]. Fuzzy Logic Systems are comprised of rules [10]. Quite often, the knowledge that is used to build these rules is uncertain. Such uncertainty leads to rules whose antecedents or consequents are uncertain, which translates into uncertain antecedent or consequent membership functions. Type-1 fuzzy systems, whose membership functions are type-1 fuzzy sets, are unable to directly handle such uncertainties [52]. We describe in this chapter, type-2 fuzzy systems, in which the antecedent or consequent membership functions are type-2 fuzzy sets. Such sets are fuzzy sets whose membership grades themselves are type-1 fuzzy sets; they are very useful in circumstances where it is difficult to determine an exact membership function for a fuzzy set [13]. The original fuzzy logic, founded by Lotfi Zadeh, has been around for more than 30 years, and yet it is unable to handle uncertainties [84]. That the original fuzzy logic (type-1 fuzzy logic) cannot do this sounds paradoxical because the word “fuzzy” has the connotation of uncertainty. The expanded fuzzy logic (type2 fuzzy logic) is able to handle uncertainties because it can model and minimize their effects. In what follows, we shall first introduce the basic concepts of type-2 fuzzy sets, and type-2 fuzzy reasoning. Then we will introduce and compare the different types of fuzzy inference systems that have been employed in various applications. We will also consider briefly type-2 fuzzy logic systems and the comparison to type-1 fuzzy systems.
O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 7–22. © Springer-Verlag Berlin Heidelberg 2012 springerlink.com
8
2 Type-2 Fuzzy Logic
2.1 Type-2 Fuzzy Sets The concept of a type-2 fuzzy set, was introduced by Zadeh [84] as an extension of the concept of an ordinary fuzzy set (henceforth called a “type-1 fuzzy set”). A type-2 fuzzy set is characterized by a fuzzy membership function, i.e., the membership grade for each element of this set is a fuzzy set in [0,1], unlike a type-1 set where the membership grade is a crisp number in [0,1]. Such sets can be used in situations where there is uncertainty about the membership grades themselves, e.g., an uncertainty in the shape of the membership function or in some of its parameters. Consider the transition from ordinary sets to fuzzy sets. When we cannot determine the membership of an element in a set as 0 or 1, we use fuzzy sets of type-1. Similarly, when the situation is so fuzzy that we have trouble determining the membership grade even as a crisp number in [0,1], we use fuzzy sets of type-2. This does not mean that we need to have extremely fuzzy situations to use type2 fuzzy sets [10]. There are many real-world problems where we cannot determine the exact form of the membership functions, e.g., in time series prediction because of noise in the data. Another way of viewing this is to consider type-1 fuzzy sets as a first order approximation to the uncertainty in the real-world. Then type-2 fuzzy sets can be considered as a second order approximation. Of course, it is possible to consider fuzzy sets of higher types but the complexity of the fuzzy system increases very rapidly. For this reason, we will only consider very briefly type-2 fuzzy sets. Lets consider some simple examples of type-2 fuzzy sets [42]. Example 2.1 Consider the case of a fuzzy set characterized by a Gaussian membership function with mean m and a standard deviation that can take values in [σ1,σ2], i.e., μ(x)=exp {– ½[(x – m)/σ]2 };
σ ∈ [σ1,σ2]
(2.1)
Corresponding to each value of σ, we will get a different membership curve (see Figure 2.1). So, the membership grade of any particular x (except x=m) can take any of a number of possible values depending upon the value of σ, i.e., the membership grade is not a crisp number, it is a fuzzy set. Figure 2.1 shows the domain of the fuzzy set associated with x=0.7; however, the membership function associated with this fuzzy set is not shown in the figure.
2.1 Type-2 Fuzzy Sets
9 G aus s ian Type -2
1 0 .9
Membership Grades
0 .8 0 .7 0 .6 0 .5 0 .4 0 .3 0 .2 0 .1 0 0
0 .1
0 .2
0 .3
0 .4
0 .5
0 .6
0 .7
0 .8
0 .9
1
Fig. 2.1. A type-2 fuzzy set representing a type-1 fuzzy set with uncertain standard deviation.
Example 2.2 Consider the case of a fuzzy set with a Gaussian membership function having a fixed standard deviation σ, but an uncertain mean, taking values in [m1, m2], i.e., μ(x)=exp {– ½[(x – m)/σ]2 };
m ∈ [m1,m2]
(2.2)
Again, μ(x) is a fuzzy set. Figure 2.2 shows an example of such a set. Example 2.3 Consider a type-1 fuzzy set characterized by a Gaussian membership function (mean M and standard deviation σx), which gives one crisp membership m(x) for each input x ∈ X, where m(x)=exp {– ½ [(x – M)/σx]2}
(2.3)
This is shown in Figure 2.3. Now, imagine that this membership of x is a fuzzy set. Let us call the domain elements of this set “primary memberships” of x (denoted by μ1) and membership grades of these primary memberships “secondary memberships” of x [denoted by μ2(x, μ1)]. So, for a fixed x, we get a type-1 fuzzy set whose domain elements are primary memberships of x and whose corresponding membership grades are secondary memberships of x. If we assume that the secondary memberships follow a Gaussian with mean m(x) and standard deviation σm, as in Figure 2.3, we can describe the secondary membership function for each x as μ2(x,μ1) = e – ½ [(μ1 - m(x))/ σm]2 where μ1 ∈ [0,1] and m is as in equation (2.3).
(2.4)
10
2 Type-2 Fuzzy Logic Gaussian Type-2 1
0.9
Membership Grades
0.8 0.7
0.6
0.5 0.4
0.3
0.2 0.1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Fig. 2.2. A type-2 fuzzy set representing a type-1 fuzzy set with uncertain mean. The mean is uncertain in the interval [0.4, 0.6]. 1
0.9
Membership Grades
0.8 0.7
0.6
0.5 0.4
0.3
0.2 0.1 M
0 0
0.1
0.2
0.3
0.4
0.5 x
0.6
x1
0.7
0.8
0.9
1
Fig. 2.3. A type-2 fuzzy set in which the membership grade of every domain point is a Gaussian type-1 set.
We can formally define these two kinds of type-2 sets as follows. Definition 2.1 Gaussian type-2 A Gaussian type-2 fuzzy set is one in which the membership grade of every domain point is a Gaussian type-1 set contained in [0,1].
2.1 Type-2 Fuzzy Sets
11 Type-2 fuzzy set in 3D
Axis z
1 0.5 0 1 0.8 10 0.6
8 6
0.4 4 0.2 2
Axis y 0
0
Axis x
Fig. 2.4. Three-dimensional view of a type-2 membership function.
Example 2.3 shows an example of a Gaussian type-2 fuzzy set. Another way of viewing type-2 membership functions is in a three-dimensional fashion, in which we can better appreciate the idea of type-2 fuzziness. In Figure 2.4 we have a three-dimensional view of a type-2 Gaussian membership function. Definition 2.2 Interval type-2 An interval type-2 fuzzy set is one in which the membership grade of every domain point is a crisp set whose domain is some interval contained in [0,1]. Example 2.1 shows an example of an interval type-2 fuzzy set. We will give some useful definitions on type-2 fuzzy sets in the following lines. Definition 2.3 Footprint of uncertainty Uncertainty in the primary memberships of a type-2 fuzzy set, Ã, consists of a bounded region that we call the “footprint of uncertainty” (FOU). Mathematically, it is the union of all primary membership functions [42]. We show as an illustration in Figure 2.5 the footprint of uncertainty for a type-2 Gaussian membership function. This footprint of uncertainty can be obtained by projecting in two dimensions the three-dimensional view of the type-2 Gaussian membership function.
12
2 Type-2 Fuzzy Logic Footprint of uncertainty (FOU) 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0
1
2
3
4
5
6
7
8
9
10
Fig. 2.5. Footprint of uncertainty of a sample type-2 Gaussian membership function.
Definition 2.4 Upper and lower membership functions An “upper membership function” and a “lower membership functions” are two type-1 membership functions that are bounds for the FOU of a type-2 fuzzy set Ã. The upper membership function is associated with the upper bound of FOU(Ã). The lower membership function is associated with the lower bound of FOU(Ã). We illustrate the concept of upper and lower membership functions as well as the footprint of uncertainty in the following example. Example 2.4 Gaussian primary MF with uncertain standard deviation For the Gaussian primary membership function with uncertain standard deviation (Figure 2.1), the upper membership function is upper(FOU(Ã)) = N(m, σ2; x)
(2.5)
And the lower membership function is lower(FOU(Ã)) = N(m, σ1; x).
(2.6)
We will describe the operations and properties of type-2 fuzzy sets in the following section.
2.2 Operations of Type-2 Fuzzy Sets
13
2.2 Operations of Type-2 Fuzzy Sets In this section we describe the set theoretic operations of type-2 fuzzy sets. We are interested in the case of type-2 fuzzy sets, Ãi (i = 1,…,r), whose secondary membership functions are type-1 fuzzy sets. To compute the union, intersection, and complement of type-2 fuzzy sets, we need to extend the binary operations of minimum (or product) and maximum, and the unary operation of negation, from crisp numbers to type-1 fuzzy sets, because at each x, μÃi (x, u) is a function (unlike the type-1 case, where μÃi (x) is a crisp number). The tool for computing the union, intersection, and complement of type-2 fuzzy sets is Zadeh’s extension principle. Consider two type-2 fuzzy sets Ã1 and Ã2, i.e., Ã1 = x μÃ1 (x)/ x
(2.7)
Ã2 = x μÃ2 (x)/ x
(2.8)
and
In this section, we focus our attention on set theoretic operations for such general type-2 fuzzy sets. Definition 2.5 Union of type-2 fuzzy sets The union of Ã1 and Ã2 is another type-2 fuzzy set, just as the union of type-1 fuzzy sets A1 and A2 is another type-1 fuzzy set. More formally, we have the following expression Ã1 ∪ Ã2 = x∈X μÃ1∪Ã2 (x)/ x
(2.9)
We can explain Equation (2.9) by the “join” operation. Basically, the join between two secondary membership functions must be performed between every possible pair of primary memberships. If more than one combination of pairs gives the same point, then in the join we keep the one with maximum membership grade. We will consider a simple example to illustrate the union operation. In Figure 2.6 we plot two type-2 Gaussian membership functions, and the union is shown in Figure 2.7.
14
2 Type-2 Fuzzy Logic
Type-2 Gaussians MFs 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
0
1
2
3
4
5
6
7
8
9
10
Fig. 2.6. Two sample type-2 Gaussian membership functions.
Definition 3.6 Intersection of type-2 fuzzy sets The intersection of Ã1 and Ã2 is another type-2 fuzzy set, just as the intersection of type-1 fuzzy sets A1 and A2 is another type-1 fuzzy set. More formally, we have the following expression Ã1 ∩ Ã2 = x∈X μÃ1∩Ã2 (x)/ x
(2.10)
We illustrate the intersection of two type-2 Gaussian membership functions in Figure 2.8 We can explain Equation (2.10) by the “meet” operation. Basically, the meet between two secondary membership functions must be performed between every possible pair of primary memberships. If more than one combination of pairs gives the same point, then in the meet we keep the one with maximum membership grade.
2.2 Operations of Type-2 Fuzzy Sets
15
Union of two interval type-2 fuzzy sets 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
0
1
2
3
4
5
6
7
8
9
10
Fig. 2.7. Union of the two Gaussian membership functions. Intersection of two Interval Type-2 Fuzzy Sets 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
0
1
2
3
4
5
6
7
8
9
10
Fig. 2.8. Intersection of two type-2 Gaussian membership functions.
16
2 Type-2 Fuzzy Logic
Definition 2.7 Complement of a type-2 fuzzy set The complement of set à is another type-2 fuzzy set, just as the complement of type-1 fuzzy set A is another type-1 fuzzy set. More formally we have Ã’ = x μÃ’1 (x)/ x
(2.11)
where the prime denotes complement in the above equation. In this equation μÃ’1 is a secondary membership function, i.e., at each value of x μÃ’1 is a function (unlike the type-1 case where, at each value of x, μÃ’1 is a point value). Example 2.5 Type-2 fuzzy set operations In this example we illustrate the union, intersection and complement operations for two type-2 fuzzy sets Ã1 and Ã2, and for a particular element x for which the secondary membership functions in these two sets are μÃ1 (x) = 0.5/0.1 + 0.8/0.2 and μÃ2 (x) = 0.4/0.5 + 0.9/0.9. Using in the operations the minimum t-norm and the maximum t-conorm, we have the following results: μÃ1∪Ã2 (x) = μÃ1 (x) ∪ μÃ2 (x) = (0.5/0.1 + 0.8/0.2) ∪ (0.4/0.5 + 0.9/0.9) = (0.5 ∧ 0.4)/(0.1 ∨ 0.5) + (0.5 ∧ 0.9)/(0.1 ∨ 0.9) + (0.8 ∧ 0.4)/(0.2 ∨ 0.5) + (0.8 ∧ 0.9)/(0.2 ∨ 0.9) = 0.4/0.5 + 0.5/0.9 + 0.4/0.5 + 0.8/0.9 = max{0.4, 0.4}/0.5 + max{0.5, 0.8}/0.9 = 0.4/0.5 + 0.8/0.9 μÃ1∩Ã2 (x) = μÃ1 (x) ∩ μÃ2 (x) = (0.5/0.1 + 0.8/0.2) ∩ (0.4/0.5 + 0.9/0.9) = (0.5 ∧ 0.4)/(0.1 ∧ 0.5) + (0.5 ∧ 0.9)/(0.1 ∧ 0.9) + (0.8 ∧ 0.4)/(0.2 ∧ 0.5) + (0.8 ∧ 0.9)/(0.2 ∧ 0.9) = 0.4/0.1 + 0.5/0.1 + 0.4/0.2 + 0.8/0.2 = max{0.4, 0.5}/0.1 + max{0.4, 0.8}/0.2 = 0.5/0.1 + 0.8/0.2 μÃ’1 (x) = 0.5/ (1 – 0.1) + 0.8/ (1 – 0.2) = 0.5/ 0.9 + 0.8/ 0.8.
2.3 Type-2 Fuzzy Systems The basics of fuzzy logic do not change from type-1 to type-2 fuzzy sets, and in general, will not change for any type-n. A higher-type number just indicates a higher “degree of fuzziness”. Since a higher type changes the nature of the membership functions, the operations that depend on the membership functions change; however, the basic principles of fuzzy logic are independent of the nature of membership functions and hence, do not change. Rules of inference like Generalized Modus Ponens or Generalized Modus Tollens continue to apply.
2.3 Type-2 Fuzzy Systems
17
The structure of the type-2 fuzzy rules is the same as for the type-1 case because the distinction between type-2 and type-1 is associated with the nature of the membership functions. Hence, the only difference is that now some or all the sets involved in the rules are of type-2. In a type-1 fuzzy system, where the output sets are type-1 fuzzy sets, we perform defuzzification in order to get a number, which is in some sense a crisp (type-0) representative of the combined output sets. In the type-2 case, the output sets are type-2; so we have to use extended versions of type-1 defuzzification methods. Since type-1 defuzzification gives a crisp number at the output of the fuzzy system, the extended defuzzification operation in the type-2 case gives a type-1 fuzzy set at the output. Since this operation takes us from the type-2 output sets of the fuzzy system to a type-1 set, we can call this operation “type reduction” and call the type-1 fuzzy set so obtained a “type-reduced set”. The type-reduced fuzzy set may then be defuzzified to obtain a single crisp number; however, in many applications, the type-reduced set may be more important than a single crisp number. Type-2 sets can be used to convey the uncertainties in membership functions of type-1 fuzzy sets, due to the dependence of the membership functions on available linguistic and numerical information. Linguistic information (e.g. rules from experts), in general, does not give any information about the shapes of the membership functions. When membership functions are determined or tuned based on numerical data, the uncertainty in the numerical data, e.g., noise, translates into uncertainty in the membership functions. In all such cases, any available information about the linguistic/numerical uncertainty can be incorporated in the type-2 framework. However, even with all of the advantages that fuzzy type-2 systems have, the literature on the applications of type-2 sets is scarce. Some examples are Yager [83] for decision making, and Wagenknecht & Hartmann [74] for solving fuzzy relational equations. We think that more applications of type-2 fuzzy systems will come in the near future as the area matures and the theoretical results become more understandable for the general public in the fuzzy arena. 2.3.1 Singleton Type-2 Fuzzy Logic Systems This section discusses the structure of a singleton type-2 Fuzzy Logic Systems (FLS), which is a system that accounts for uncertainties about the antecedents or consequents in rules, but does not explicitly account for input measurement uncertainties. More complicated (but, more versatile) non-singleton type-2 FLSs, which account for both types of uncertainties, are discussed later. The basics of fuzzy logic do not change from type-1 to type-2 fuzzy sets, and in general will not change for type-n. A higher type number just indicates a higher degree of fuzziness. Since a higher type changes the nature of the membership functions, the operations that depend on the membership functions change,
18
2 Type-2 Fuzzy Logic
however, the basic principles of fuzzy logic are independent of the nature of membership functions and hence do not change. Rules of inference, like Generalized Modus Ponens, continue to apply. A general type-2 FLS is shown in Figure 2.9. As discussed before a type-2 FLS is very similar to type-1 FLS, the major structural difference being that the defuzzifier block of a type-1 FLS is replaced by the output processing block in type-2 FLS. That block consists of type-reduction followed by defuzzification. During our development of a type-2 FLS, we assume that all the antecedent and consequent sets in rules are type-2, however, this need not necessarily be the case in practice. All results remain valid as long as long as just one set is type-2. This means that a FLS is type-2 as long as any one of its antecedent or consequent sets is type-2.
Fig. 2.9. Type-2 Fuzzy Logic System.
In the type-1 case, we generally have fuzzy if-then rules of the form Rl : IF x1 is Al1 and … xp is Alp , THEN y is Yl
l = 1,…, M
(2.12)
As mentioned earlier, the distinction between type-1 and type-2 is associated with the nature of the membership functions, which is not important when forming the rules. The structure of the rules remains exactly the same in the type-2 case, but now some or all of the sets involved are type-2. Consider a type-2 FLS having r inputs x1 ∈ X1, …, xr ∈ Xr and one output y ∈ Y. As in the type-1 case, we can assume that there are M rules; but, in the type-2 case the lth rule has the form Rl : IF x1 is Ãl1 and … xp is Ãlp , THEN y is ìl
l = 1,…, M
(2.13)
2.3 Type-2 Fuzzy Systems
19
This rule represents a type-2 fuzzy relation between the input space X1 × …× Xr, and the output space, Y, of the type-2 fuzzy system. In a type-1 FLS the inference engine combines rules and gives a mapping from input type-1 fuzzy sets to output type-1 fuzzy sets. Multiple antecedents in rules are combined by the t-norm. The membership grades in the input sets are combined with those in the output sets using composition. Multiple rules may be combined using the t-conorm or during defuzzification by weighted summation. In the type-2 case the inference process is very similar. The inference engine combines rules and gives a mapping from input type-2 fuzzy sets to output type-2 fuzzy sets. To do this one needs to compute unions and intersections of type-2 fuzzy sets, as well as compositions of type-2 relations. In the type-2 fuzzy system (Figure 2.9), as in the type-1 fuzzy system, crisp inputs are first fuzzified into fuzzy input sets that then activate the inference block, which in the present case is associated with type-2 fuzzy sets. In this section, we describe singleton fuzzification and the effect of such fuzzification on the inference engine. The “fuzzifier” maps a crisp point x = (x1,…, xr)T ∈ X1 × X2 … × Xr ≡ X into a type-2 fuzzy set Ãx in X. The type-2 output of the inference engine shown in Figure 2.9 must be processed next by the output processor, the first operation of which is type-reduction. Type-reduction methods include: centroid, center-of-sums, height, modified height, and center-of-sets. Lets assume that we perform centroid type-reduction. Then each element of the type-reduced set is the centroid of some embedded type1 set for the output type-2 set of the FLS. Each of these embedded sets can be thought of as an output set of an associated type-1 FLS, and, correspondingly, the type-2 FLS can be viewed of as a collection of many different type-1 FLSs. Each type-1 FLS is embedded in the type-2 FLS; hence, the type-reduced set is a collection of the outputs of all of the embedded type-1 FLSs (see Figure 2.10). The typereduced set lets us represent the output of the type-2 FLS as a fuzzy set rather than as a crisp number, which is something that cannot be done with a type-1 fuzzy system. Referring to Figure 2.10, when the antecedent and consequent membership functions of the type-2 FLS have continuous domains, the number of embedded sets is uncountable. Figure 2.10 shows a situation in which we have assumed that the membership functions have discrete (or discretized) domains. The memberships in the type-reduced set, μY(yi), represent the level of uncertainty associated with each embedded type-1 FLS. A crisp output can be obtained by aggregating the outputs of all embedded type-1 FLSs by, e.g., finding the centroid of the typereduced set. If all of the type-2 uncertainties were to disappear, the secondary membership functions for all antecedents and consequents would each collapse to a single point, which shows that the type-2 FLS collapses to a type-1 FLS.
20
2 Type-2 Fuzzy Logic
Embedded type-1 FLS #1
Embedded type-1 FLS #2
y1
y2
μY(y1)
μY(y2)
x • • •
Embedded type-1 FLS #α
Crisp Output Aggregator y(x)
yα
μY(yα)
Type-reduced set, Y Fig. 2.10. A type-2 FLS viewed as a collection of embedded type-1 FLSs.
If we think of a type-2 FLS as a “perturbation” of a type-1 FLS, due to uncertainties in their membership functions, then the type-reduced set of the type-2 FLS can be thought of as representing the uncertainty in the crisp output due to the perturbation. Some measure of the spread of the type-reduced set may then be taken to indicate the possible variation in the crisp output due to the perturbation. This is analogous to using confidence intervals in a stochastic-uncertainty situation. We defuzzify the type-reduced set to get a crisp output from the type-2 FLS. The most natural way to do this seems to be finding the centroid of the typereduced set. Finding the centroid is equivalent to finding the weighted average of the outputs of all the type-1 FLSs that are embedded in the type-2 FLS, where the weights correspond to the memberships in the type-reduced set (see Figure 2.10). If the type-reduced set Y for an input x is discretized or is discrete and consists of α points, then the expression for its centroid is y(x) = [αk=1 yk μY(yk) ]/ [αk=1 μY(yk) ]
(2.14)
If α is large then data storage may be a problem for the computation of Equation (2.14). This equation can, however, be evaluated using parallel processing, in this case data storage will not be problem. Currently, however, most researchers
2.3 Type-2 Fuzzy Systems
21
still depend on software for simulations and cannot make use of parallel processing. We can, however, use a recursive method to vastly reduce the memory required for storing the data that are needed to compute the defuzzification output. From Equation (2.14), we can calculate A(i) = A(i-1) + yi μY(yi)
A(0) = 0
(2.15)
B(i) = B(i-1) + yi μY(yi)
B(0) = 0
(2.16)
and for i =1,…, α. With these formulas we just need to store A and B during each iteration. From our previous discussions about the five elements that comprise the Figure 2.9 type-2 FLS, we see that there are many possibilities to choose from, even more than for a type-1 FLS. To begin, we must decide on the kind of defuzzification (singleton or non-singleton). We must also choose a FOU for each type-2 membership function, decide on the functional forms for both the primary and secondary membership functions, and choose the parameters of the membership functions (fixed a-priori or tuned during a training procedure). Then we need to choose the composition (max-min, max-product), implication (minimum, product), type-reduction method (centroid, center-of-sums, height, modified height, center-of-sets), and defuzzifier. Clearly, there is an even greater richness among type-2 FLSs than there is among type-1 FLSs. In other words, there are more design degrees of freedom associated with a type-2 FLS than with a type-1 FLS; hence, a type-2 FLS has the potential to outperform a type-1 FLS because of the extra degrees of freedom. 2.3.2 Non-singleton Fuzzy Logic Systems A non-singleton FLS is one whose inputs are modeled as fuzzy numbers. A type-2 FLS whose inputs are modeled as type-1 fuzzy numbers is referred to as “type-1 non-singleton type-2 FLS”. This kind of a fuzzy system not only accounts for uncertainties about either the antecedents or consequents in rules, but also accounts for input measurement uncertainties. A type-1 non-singleton type-2 FLS is described by the same diagram as in singleton type-2 FLS, see Figure 2.9. The rules of a type-1 non-singleton type-2 FLS are the same as those for the singleton type-2 FLS. What are different is the fuzzifier, which treats the inputs as type-1 fuzzy sets, and the effect of this on the inference block. The output of the inference block will again be a type-2 fuzzy set; so, the type-reducers and defuzzifier that we described for a singleton type-2 FLS apply as well to a type-1 non-singleton type-2 FLS. We can also have a situation in which the inputs are modeled as type-2 fuzzy numbers. This situation can occur, e.g., in time series forecasting when the additive measurement noise is non-stationary. A type-2 FLS whose inputs are modeled as type-2 fuzzy numbers is referred to as “type-2 non-singleton type-2 FLS”. A type-2 non-singleton type-2 FLS is described by the same diagram as in singleton type-2 FLS, see Figure 2.9. The rules of a type-2 non-singleton type-2 FLS
22
2 Type-2 Fuzzy Logic
are the same as those for a type-1 non-singleton type-2 FLS, which are the same as those for a singleton type-2 FLS. What is different is the fuzzifier, which treats the inputs as type-2 fuzzy sets, and the effect of this on the inference block. The output of the inference block will again be a type-2 fuzzy set; so, the type-reducers and defuzzifier that we described for a type-1 non-singleton type-2 FLS apply as well to a type-2 non-singleton type-2 FLS. 2.3.3 Sugeno Type-2 Fuzzy Systems All of our previous FLSs were of the Mamdani type, even though we did not refer to them as such. In this section, we will need to distinguish between the two kinds of FLSs, we refer to our previous FLSs as “Mamdani” FLSs. Both kinds of FLS are characterized by if-then rules and have the same antecedent structures. They differ in the structures of their consequents. The consequent of a Mamdani rule is a fuzzy set, while the consequent of a Sugeno rule is a function. A type-1 Sugeno FLS was proposed by Takagi and Sugeno (1985), and Sugeno and Kang (1988) [10], in an effort to develop a systematic approach to generating fuzzy rules from a given input-output data set. We will consider in this section the extension of first-order type-1 Sugeno FLS to its type-2 counterpart, with emphasis on interval sets. Consider a type-2 Sugeno FLS having r inputs x1 ∈ X1, …, xr ∈ Xr and one output y ∈ Y. A type-2 Sugeno FLS is also described by fuzzy if-then rules that represent input-output relations of a system [42]. In a general first-order type-2 Sugeno model with a rule base of M rules, each having r antecedents, the ith rule can be expressed as Rl : IF x1 is Ãl1 and … xp is Ãlp , THEN Yi = Ci0 + Ci1 x1 + … + Cir xr
(2.17)
where i = 1,…, M; Cij (j = 1,…, r) are consequent type-1 fuzzy sets; Yi, the output of the ith rule, is also a type-1 fuzzy set (because it is a linear combination of type1 fuzzy sets); and Ãik (k = 1, …, r) are type-2 antecedent fuzzy sets. These rules let us simultaneously account for uncertainty about antecedent membership functions and consequent parameter values. For a type-2 Sugeno FLS there is no need for type-reduction, just as there is no need for defuzzification in a type-1 Sugeno FLS.
2.4 Summary In this chapter, we have presented the main ideas underlying type-2 fuzzy logic and we have only started to point out the many possible applications of this powerful computational theory. We have discussed in some detail type-2 fuzzy set theory, fuzzy reasoning and fuzzy inference systems. At the end, we also gave some remarks about type-2 fuzzy modeling with the Mamdani and Sugeno approaches. In the following chapters, we will show how type-2 fuzzy logic (in some cases, in conjunction with other methodologies) can be applied to solve real world complex control problems.
Chapter 3
Design of Interval Type-2 Fuzzy Logic Controllers
Uncertainty is an inherent part of intelligent systems used in real-world applications [42]. The use of new methods for handling incomplete information is of fundamental importance [13]. Type-1 fuzzy sets used in conventional fuzzy systems cannot fully handle the uncertainties present in intelligent systems. Type-2 fuzzy sets that are used in type-2 fuzzy systems can handle such uncertainties in a better way because they provide us with more parameters [42]. This chapter deals with the design of intelligent systems using interval type-2 fuzzy logic for minimizing the effects of uncertainty produced by the instrumentation elements, environmental noise, etc. Experimental results include simulations of feedback control systems for non-linear plants using type-1 and type-2 fuzzy logic controllers; a comparative analysis of the systems’ response is performed, with and without the presence of uncertainty [68, 69].
3.1 Introduction Uncertainty affects decision-making and appears in a number of different forms. The concept of information is fully connected with the concept of uncertainty. The most fundamental aspect of this connection is that the uncertainty involved in any problem-solving situation is a result of some information deficiency, which may be incomplete, imprecise, fragmentary, not fully reliable, vague, contradictory, or deficient in some other way. Uncertainty is an attribute of information. The general framework of fuzzy reasoning allows handling much of this uncertainty; fuzzy systems employ type-1 fuzzy sets, which represent uncertainty by numbers in the range [0, 1]. When something is uncertain, like a measurement, it is difficult to determine its exact value, and of course type-1 fuzzy sets make more sense than using sets. However, it is not reasonable to use an accurate membership function for something uncertain, so in this case what we need is another type of fuzzy sets, those which are able to handle these uncertainties, the so called type-2 fuzzy sets. So, the amount of uncertainty in a system can be reduced by using type-2 fuzzy logic because it offers better capabilities to handle linguistic uncertainties by modeling vagueness and unreliability of information [11, 12].
O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 23–47. © Springer-Verlag Berlin Heidelberg 2012 springerlink.com
24
3 Design of Interval Type-2 Fuzzy Logic Controllers
Recently, we have seen the use of type-2 fuzzy sets in Fuzzy Logic Systems (FLS) in different areas of application [13, 28]. A novel approach for realizing the vision of ambient intelligence in ubiquitous computing environments (UCEs), is based on embedding intelligent agents that use type-2 fuzzy systems which are able to handle the different sources of uncertainty and imprecision in UCEs to give a good response [30]. There are also papers with emphasis on the implementation of type-2 FLS and in others, it is explained how type-2 fuzzy sets let us model and minimize the effects of uncertainties in rule-base FLS [30, 75, 76]. There is also a paper that provides mathematical formulas and computational flowcharts for computing the derivatives that are needed to implement steepestdescent parameter tuning algorithms for type-2 fuzzy logic systems. Some research works are devoted to solve real world applications in different areas, for example in signal processing, type-2 fuzzy logic is applied in prediction of the Mackey-Glass chaotic time-series with uniform noise presence [20, 56]. In medicine, an expert system was developed for solving the problem of Umbilical AcidBase (UAB) assessment [63]. In industry, type-2 fuzzy logic and neural networks was used in the control of non-linear dynamic plants; also we can find interesting studies in the field of mobile robots [28]. In this chapter we deal with the application of interval type-2 fuzzy control to non-linear dynamic systems [22, 23, 47, 51]. It is a well known fact, that in the control of real systems, the instrumentation elements (instrumentation amplifier, sensors, digital to analog, analog to digital converters, etc.) introduce some sort of unpredictable values in the information that has been collected [68]. So, the controllers designed under idealized conditions tend to behave in an inappropriate manner. Since, uncertainty is inherent in the design of controllers for real world applications; we are presenting how to deal with this problem using type-2 Fuzzy Logic Controller (FLC), to reduce the effects of imprecise information [35, 61]. We are supporting this statement with experimental results, qualitative observations, and quantitative measures of errors. For quantifying the errors, we utilized three widely used performance criteria, these are: Integral of Square Error (ISE), Integral of the Absolute value of the Error (IAE), and Integral of the Time multiplied by the Absolute value of the Error (ITAE).
3.2 Fuzzy Logic Systems In this section, a brief overview of type-1 and type-2 fuzzy systems is presented. This overview is considered as necessary to understand the basic concepts needed to understand the methods and algorithms presented later in the chapter [13].
3.2 Fuzzy Logic Systems
25
3.2.1 Type-1 Fuzzy Logic Systems In the 40's and 50's, many researchers proved that dynamic systems could be mathematically modeled using differential equations. In these works we have the foundations of the Control Theory, which in addition with the Transform Theory (Laplace’s Theory), provided an extremely powerful means of analyzing and designing control systems. These theories were developed until the 70's, when the area was called Systems Theory to indicate its definitiveness. Soft computing techniques have become an important research topic, which can be applied in the design of intelligent controllers. These techniques have tried to avoid the above-mentioned drawbacks, and they allow us to obtain efficient controllers, which utilize the human experience in a more natural form than the conventional mathematical approach. In the cases in which a mathematical representation of the controlled system is difficult to obtain, the process operator has the knowledge, the experience to express the relationships existing in the process behavior. A FLS, described completely in terms of type-1 fuzzy sets is called a type-1 fuzzy logic system (type-1 FLS). It is composed by a knowledge base, which comprises the information given by the process operator in form of linguistic control rules, a fuzzification interface, which has the effect of transforming crisp data into fuzzy sets, and inference system, which uses the fuzzy sets in conjunction with the knowledge base to make inferences by means of a reasoning method. Finally, a defuzzification interface, which translates the fuzzy control action so obtained to a real control action using a defuzzification method. In this chapter, the implementation of the fuzzy controller in terms of type-1 fuzzy sets, has two input variables, which are the error e(t), the difference between the reference signal and the output of the process, as well as the error variation Δe(t),
e(t ) = r (t ) − y (t )
(3.1)
Δe(t ) = e(t ) − e(t − 1)
(3.2)
so the control system can be represented as in Figure 3.1.
26
3 Design of Interval Type-2 Fuzzy Logic Controllers
Fig. 3.1. System used for obtaining the experimental results for control.
3.2.2 Type-2 Fuzzy Logic Systems If for a type-1 membership function, as in Figure 3.2, we blur it to the left and to the right, as illustrated in Figure 3.3, then a type-2 membership function is obtained. In this case, for a specific value x ' , the membership function ( u ' ), takes on different values, which are not all weighted the same, so we can assign an amplitude distribution to all of those points.
Fig. 3.2. Type-1 membership function.
3.2 Fuzzy Logic Systems
27
Fig. 3.3. Blurred type-1 membership function.
Doing this for all x ∈ X , we create a three-dimensional membership function –a type-2 membership function– that characterizes a type-2 fuzzy set. A type-2 ~ fuzzy set A , is characterized by the membership function: ~ = {(( x, u ), μ ~ ( x, u ) ) | ∀x ∈ X , ∀u ∈ J ⊆ [0,1]} A x A in which
~ is, 0 ≤ μ A~ ( x, u ) ≤ 1 . Another expression for A ~ A=
Where
(3.3)
x∈X u∈J x
μ A~ ( x, u ) /( x, u )
J x ⊆ [0,1]
(3.4)
denotes the union over all admissible input variables x and u. For
discrete universes of discourse
is replaced by
(Mendel and John, 2002).
In fact J x ⊆ [0,1] represents the primary membership of x, and μ A~ ( x, u ) is a type-1 fuzzy set known as the secondary set. Hence, a type-2 membership grade can be any subset in [0,1], the primary membership, and corresponding to each primary membership, there is a secondary membership (which can also be in [0,1]) that defines the possibilities for the primary membership. Uncertainty is represented by a region, which is called the footprint of uncertainty (FOU). When μ A~ ( x, u ) = 1, ∀ u ∈ J x ⊆ [0,1] we have an interval type-2 membership function, as shown in Figure 3.4. The uniform shading for the FOU represents the entire interval type-2 fuzzy set and it can be described in terms of an upper membership function μ A~ ( x ) and a lower membership function μ A~ ( x) .
28
3 Design of Interval Type-2 Fuzzy Logic Controllers
Fig. 3.4. Interval type-2 membership function.
A FLS described using at least one type-2 fuzzy set is called a type-2 FLS. Type-1 FLSs are unable to directly handle rule uncertainties, because they use type-1 fuzzy sets that are certain. On the other hand, type-2 FLSs, are very useful in circumstances where it is difficult to determine an exact membership function, and there are measurement uncertainties. It is known that type-2 fuzzy sets enable modeling and minimizing the effects of uncertainties in rule-based FLS. Unfortunately, type-2 fuzzy sets are more difficult to use and understand than type-1 fuzzy sets; hence, their use is not widespread yet. As a justification for the use of type-2 fuzzy sets, are mentioned at least four sources of uncertainties not considered in type-1 FLSs: 1. The meanings of the words that are used in the antecedents and consequents of rules can be uncertain (words mean different things to different people). 2. Consequents may have histogram of values associated with them, especially when knowledge is extracted from a group of experts who do not all agree. 3. Measurements that activate a type-1 FLS may be noisy and therefore uncertain. 4. The data used to tune the parameters of a type-1 FLS may also be noisy. All of these uncertainties translate into uncertainties about fuzzy set membership functions. Type-1 fuzzy sets are not able to directly model such uncertainties because their membership functions are totally crisp. On the other hand, type-2 fuzzy sets are able to model such uncertainties because their membership functions are themselves fuzzy. A type-1 fuzzy set is a special case of a type-2 fuzzy set; its secondary membership function is a subset with only one element, unity.
3.2 Fuzzy Logic Systems
29
A type-2 FLS is again characterized by IF-THEN rules, but its antecedent or consequent sets are now of type-2. Type-2 FLSs, can be used when the circumstances are too uncertain to determine exact membership grades such as when the training data is corrupted by noise. Similar to a type-1 FLS, a type-2 FLS includes a fuzzifier, a rule base, fuzzy inference engine, and an output processor, as we can see in Fig. 3.5. The output processor includes type-reducer and defuzzifier; it generates a type-1 fuzzy set output (from the type-reducer) or a crisp number (from the defuzzifier) (Mendel, 2005). Now we will explain each of the blocks of Figure 3.5.
Fig. 3.5. Type-2 Fuzzy Logic System
3.2.2.1 Fuzzifier
The fuzzifier maps a crisp point x=(x1,…,xp)T ∈ X1xX2x…xXp ≡ X into a type-2
~
fuzzy set A x in X, interval type-2 fuzzy sets in this case. We will use type-2 singleton fuzzifier, in a singleton fuzzification, the input fuzzy set has only a single
~
point on nonzero membership. A x is a type-2 fuzzy singleton if for x=x' and
μ A~ ( x ) = 1 / 0
μ A~ ( x ) = 1 / 1 x
for all other x≠x'.
x
3.2.2.2 Rules
The structure of rules in a type-1 FLS and a type-2 FLS is the same, but in the latter the antecedents and the consequents will be represented by type-2 fuzzy sets. So for a type-2 FLS with p inputs x1 ∈ X1,…,xp ∈ Xp and one output y ∈ Y,
30
3 Design of Interval Type-2 Fuzzy Logic Controllers
Multiple Input Single Output (MISO), if we assume there are M rules, the lth rule in the type-2 FLS can be written as follows:
Rl: IF x1 is F~1l and ···and xp is F~p l , THEN y is G~ l l=1,…,M
(3.5)
3.2.2.3 Inference
In the type-2 FLS, the inference engine combines rules and gives a mapping from input type-2 fuzzy sets to output type-2 fuzzy sets. It is necessary to compute the join ⊔, (unions) and the meet Π (intersections), as well as extended sup-star com~ positions (sup star compositions) of type-2 relations. If F~ l1 ×"× F~ l p = A l , equation (3.5) can be re-written as
~l = A ~l → G ~ l l=1,…,M R l : F~ l 1 ×" × F~ l p → G
(3.6)
Rl is described by the membership function μ Rl ( x, y ) = μ Rl ( x1 ,..., x p , y ) , where
μ Rl (x, y ) = μ A~l →G~ l (x, y )
(3.7)
can be written as:
μ Rl (x, y ) = μ A~l →G~l (x, y ) = μ F~ l ( x1 ) Π···Π μ F~ l ( x p ) Π μ G~ l ( y ) p
1
= [Π
p i =1
μ F~l i ( xi ) ]Π μ G~l ( y )
(3.8)
In general, the p-dimensional input to Rl is given by the type-2 fuzzy set ~ whose membership function is A x
μ A~x (x) = μ ~x1 ( x1 ) Π···Π μ ~x p ( x p ) =Π ip=1 μ ~x i ( xi )
(3.9)
where X~ i (i = 1,..., p) are the labels of the fuzzy sets describing the inputs. Each ~ D R l such that: ~l = A rule Rl determines a type-2 fuzzy set B x
[
μ B~ l ( y ) = μ A~ D Rl = ⊔ x∈X μ A~x (x) Π μ Rl (x, y ) x
]
y ∈ Y l=1,…,M
(3.10)
This equation is the input/output relation in Figure 3.5 between the type-2 fuzzy set that activates one rule in the inference engine and the type-2 fuzzy set at the output of that engine. In the FLS we used interval type-2 fuzzy sets and meet under product t-norm, so the result of the input and antecedent operations, which are contained in the firing set Π ip=1 μ F~i ( x ' i ≡ F l (x' ) , is an interval type-1 set, i
3.2 Fuzzy Logic Systems
31
−l −l F l (x' ) = f l (x' ), f (x' ) ≡ f l , f − −
(3.11)
Where f l ( x' ) = μ
( x1' ) * " * μ
(x p' )
(3.12)
f (x' ) = μ F~1l ( x1' ) * " * μ F~p l ( x p ' )
(3.13)
−
− F~1l
−l
−
− F~p l
And −
where * is the product operation. 3.2.2.4 Type Reducer The type-reducer generates a type-1 fuzzy set output, which is then converted in a crisp output through the defuzzifier. This type-1 fuzzy set is also an interval set, for the case of our FLS we used center of sets (cos) type reduction, Ycos which is expressed as
1/
M
Ycos ( x) = [ yl , y r ] =
y ∈[ yl , yr 1
1
1
" ]
y ∈[ yl , y r ] M
M
M
−1
"
f 1∈[ f 1 , f ] −
−M
f M ∈[ f M , f −
]
i =1 M
f i yi
i =1
fi
(3.14)
this interval set is determined by its two end points, yl and yr, which corresponds to the centroid of the type-2 interval consequent set CG~i =
θ
1∈J y1
"
θ
N ∈J yN
1/
N yθ i =1 i i N θ i =1 i
~ Gi ,
= [ yl i , y r i ]
(3.15)
before the computation of Ycos (x), we must evaluate equation (3.15), and its two end points, yl and yr. If the values of fi and yi that are associated with yl are denoted fli and yli, respectively, and the values of fi and yi that are associated with yr are denoted fri and yri, respectively, from equation (3.14), we have yl
=
(3.16)
yr
=
(3.17)
M f iy i i =1 l l M fi i =1 l
M f iy i i =1 r r M f i i =1 r
32
3 Design of Interval Type-2 Fuzzy Logic Controllers
3.2.2.5 Defuzzifier From the type-reducer we obtain an interval set Ycos, to defuzzify it we use the average of yl and yr, so the defuzzified output of an interval singleton type-2 FLS is y ( x) =
yl + y r 2
(3.18)
In this chapter, we are simulating the fact that the instrumentation elements (instrumentation amplifier, sensors, digital to analog, analog to digital converters, etc.) are introducing some sort of unpredictable values in the collected information. In the case of the implementation of the type-2 FLC, we have the same characteristics as in type-1 FLC, but we used type-2 fuzzy sets as membership functions for the inputs and for the output. 3.2.3 Performance Criteria For evaluating the transient closed-loop response of a computer control system we can use the same criteria that normally are used for adjusting constants in PID (Proportional Integral Derivative) controllers. These are: 1. Integral of Square Error (ISE). ∞
ISE = [e(t )] dt 2
(3.19)
0
2. Integral of the Absolute value of the Error (IAE). ∞
IAE = | e(t ) | dt
(3.20)
0
3. Integral of the Time multiplied by the Absolute value of the Error (ITAE). ∞
ITAE = t | e(t ) | dt
(3.21)
0
The selection of the criteria depends on the type of response desired, the errors will contribute different for each criterion, so we have that large errors will increase the value of ISE more heavily than to IAE. ISE will favor responses with smaller overshoot for load changes, but ISE will give longer settling time. In ITAE, time appears as a factor, and therefore, ITAE will penalize heavily errors that occur late in time, but virtually ignore errors that occur early in time. Designing using ITAE will give us the shortest settling time, but it will produce the largest overshoot among the three criteria considered. Designing considering IAE will give us an intermediate result, in this case, the settling time will not be so large than using ISE or so small than using ITAE, and the same applies for the overshoot response. The selection of a particular criterion is depending on the type of desired response.
3.3 Experimental Results for Intelligent Control
33
3.3 Experimental Results for Intelligent Control The experimental results are devoted to show comparisons in the system’s response in a feedback controller when using a type-1 FLC or a type-2 FLC. A set of five experiments is described in this section. The first two experiments were performed in ideal conditions, i.e., without any kind of disturbance. In the last three experiments, Gaussian noise was added to the feedback loop with the purpose of simulating, in a global way, the effects of uncertainty from several sources. Figure 3.1 shows the feedback control system that was used for obtaining the simulation results. The complete system was simulated in the Matlab programming language, and the controller was designed to follow the input as closely as possible. The plant is a non-linear system that is modeled using equation (3.22) (3.22) To illustrate the dynamics of this non-linear system, two different inputs are applied, first the input indicated by equation (3.23), which is shown in Figure 3.6, and whose system’s response is in Figure 3.7.
0 .1 .5 1 u (i ) = .5 1 0 1 . 47
1≤ i < 5 5 ≤ i < 10 10 15 20 25
≤ i < 15 ≤ i < 20 ≤ i < 25 ≤ i < 30
(3.23)
30 ≤ i < 35 35 ≤ i < 40
Fig. 3.6. Test sequence applied to the model of the plant given in equation (3.23).
34
3 Design of Interval Type-2 Fuzzy Logic Controllers
Fig. 3.7. System´s response for the inputs given in equation (3.23) which is illustrated in Fig. 3.6.
Now, for a slightly different input given by equation (3.24), see Figure 3.8, we have the corresponding system´s response in Figure 3.9.
0 .1 .5 1 u(i ) = .5 1 0 1.4
1≤ i < 5 5 ≤ i < 10 10 ≤ i < 15 15 ≤ i < 20 20 ≤ i < 25 25 ≤ i < 30 30 ≤ i < 35 35 ≤ i < 40
(3.24)
3.3 Experimental Results for Intelligent Control
35
Fig. 3.8. A second input to the model for testing the plant response.
Fig. 3.9. Output of the plant when we applied the input given by equation (3.24) illustrated in Fig. 3.8.
36
3 Design of Interval Type-2 Fuzzy Logic Controllers
Going back to the control problem, this system given by equation (3.22) was used in Figure 3.1, under the name of plant or process, in this figure we can see that the controller’s output is applied directly to the plant’s input. Since we are interested in comparing the performance between type-1 and type-2 FLC systems, the controller was tested in two ways: 1. One is considering the system as ideal that is, not introducing in the modules of the control system any source of uncertainty (experiments 1 and 2). 2. The other one is simulating the effects of uncertain modules (subsystems) response introducing some uncertainty (experiments 3, 4 and 5). For both cases, as it is shown in Figure 3.1, the system’s output is directly connected to the summing junction, but in the second case, the uncertainty was simulated introducing random noise with normal distribution (the dashed square in Figure 3.1). We added noise to the system’s output y(i) using the Matlab’s function “randn”, which generates random numbers with Gaussian distribution. The signal and the added noise in turn, were obtained with the programmer’s expression (3.25), the result y(i) was introduced to the summing junction of the controller system. Note that in expression (3.25) we are using the value 0.05, for experiments 3 and 4, but in the set of tests for experiment 5, we varied this value to obtain different SNR values.
y (i ) = y (i ) + 0.05 ⋅ randn
(3.25)
The system was tested using as input, a unit step sequence free of noise, r (i ) . For evaluating the system’s response and comparing between type 1 and type 2 fuzzy controllers, the performance criteria ISE, IAE, and ITAE were used. In Table 3.3, we summarized the values obtained in an ideal system for each criterion considering 400 units of time. For calculating ITAE a sampling time of Ts = 0.1 sec. was considered. For all experiments the reference input r is stable and noisy free. In experiments 3 and 4, although the reference appears clean, the feedback at the summing junction is noisy since noise for simulating the overall existing uncertainty in the system was introduced deliberately, in consequence, the controller’s inputs e (t) (error), and Δe(t ) contain uncertainty in the data. In Experiment 5, we tested the systems, type-1 and type-2 FLCs, introducing different values of noise η , this was done by modifying the signal to noise ratio SNR,
s SNR = η
2 2
=
Psignal Pnoise
(3.26)
3.3 Experimental Results for Intelligent Control
37
Because many signals have a very wide dynamic range, SNRs are usually expressed in terms of the logarithmic decibel scale, SNR(db),
Psignal SNR (db) = 10 log10 Pnoise
(3.27)
In Table 3.4, we show, for different values of SNR(db), the behavior of ISE, IAE, ITAE for type-1 and type-2 FLCs. In all the cases the results for type-2 FLC are better than type-1 FLC. In the type-1 FLC, Gaussian membership functions (Gaussian MFs) for the inputs and for the output were used. A Gaussian MF is specified by two parameters {c,σ}:
μ A ( x) =
1 x −c − e 2 σ
2
(3.28)
c represents the MFs center and σ determines the MFs standard deviation. For each of the inputs of the type-1 FLC, e (t) and Δe(t ) , three type-1 fuzzy Gaussian MFs were defined as: negative, zero, positive. The universe of discourse for these membership functions is in the range [-10 10]; their centers are -10, 0 and 10 respectively, and their standard deviations is 4.2466 as is illustrated in Figures 3.10 and 3.11.
Fig. 3.10. Input e membership functions for the type-1 FLC.
38
3 Design of Interval Type-2 Fuzzy Logic Controllers
Fig. 3.11. Input
Fig. 3.12. Output
Δe
membership functions for the type-1 FLC.
cde
membership functions for the type-1 FLC.
For the output of the type-1 FLC, we have five type-1 fuzzy Gaussian MFs: NG, N, Z, P and PG. They are in the interval [-10 10], their centers are -10, -.5, 0, 5, and 10 respectively; and their standard deviation is 2.1233 as can be seen in Figure 3.12. Table 3.1 illustrates the characteristics of the MFs of the inputs and output of the type-1 FLC.
3.3 Experimental Results for Intelligent Control
39
Table 3.1 Characteristics of the inputs and output of type-1 flc.
Variable Input e Input Δe
Output cde
Term negative zero positive Negative Zero positive NG N Z P PG
Center c -10 0 10 -10 0 10 -10 -5 0 5 10
Standard deviation σ 4.2466 4.2466 4.2466 4.2466 4.2466 4.2466 2.1233 2.1233 2.1233 2.1233 2.1233
In experiments 2, 4, and 5, for the type-2 FLC, as in type-1 FLC, we also selected Gaussian MFs for the inputs and for the output, but in this case we have interval type-2 Gaussian MFs with a fixed center, c, and an uncertain standard deviation, σ , i.e.,
μ A ( x) =
1 x −c − e 2 σ
2
(3.29)
In terms of the upper and lower membership functions, we have for
μ A~ ( x ) = N(c, σ 2 ; x ) and for the lower membership function
(3.30)
μ A~ ( x) ,
μ A~ ( x ) = N(c, σ 1 ; x ) 1 x −c − 2 σ 2
2
μ A~ ( x) ,
(3.31) 1 x −c − 2 σ 1
2
where N(c, σ 2 , x ) ≡ e , and N (c, σ 1 , x ) ≡ e . Hence, in the type-2 FLC, for each input we defined three interval type-2 fuzzy Gaussian MFs: negative, zero, positive in the interval [-10 10], as illustrated in Figures 3.13 and 3.14. For computing the output we have five interval type-2 fuzzy Gaussian MFs, which are NG, N, Z, P and PG, in the interval [-10 10], as can be seen in Figure 3.15. Table 3.2 shows the characteristics of the inputs and output of the type-2 FLC.
40
3 Design of Interval Type-2 Fuzzy Logic Controllers
Fig. 3.13. Input e membership functions for the type-2 FLC.
Fig. 3.14. Input Δe membership functions for the type-2 FLC.
For type-2 FLC we used, basically, the software for type-2 fuzzy logic developed by our research group. In all experiments, we have a dash-dot line for illustrating the system’s response and behavior of type-1 FLC, in the same sense, a continuous line for type-2 FLC. The reference input r is shown with a dot line.
3.3 Experimental Results for Intelligent Control
41
Fig. 3.15. Output cde membership functions for the type-2 FLC. Table 3.2 Characteristics of the inputs and output of type-2 flc.
Variable
Input e Input Δe
Output cde
Term
Center c
negative zero positive Negative Zero positive NG N Z P PG
-10 0 10 -10 0 10 -10 -5 0 5 10
Standard deviation σ 1 5.2466 5.2466 5.2466 5.2466 5.2466 5.2466 2.6233 2.6233 2.6233 2.6233 2.6233
Standard deviation σ 2 3.2466 3.2466 3.2466 3.2466 3.2466 3.2466 1.6233 1.6233 1.6233 1.6233 1.6233
Experiment 1: Simulation of an ideal system with a type-1 FLC. In this experiment, uncertainty data was not added to the system, and the system response is illustrated in Figure 3.16. Note that the settling time is of about 140 units of time; i.e., the system tends to stabilize with time and the output will follow accurately the input. In Table 3.3, we listed the obtained values of ISE, IAE, and ITAE for this experiment. In Figures 3.17, 3.18 and 3.19, the ISE, IAE, and ITAE behaviors of this experiment are shown.
42
3 Design of Interval Type-2 Fuzzy Logic Controllers
Fig. 3.16. This graphic shows the system’s response to a unit step sequence. The input reference r is shown with pointed line, for the type-1 the systems’ output y(i) is shown with dash dot line; and for type-2, the system’s output y(i) with continuous line. Table 3.3 Comparison of performance criteria for type-1 and type-2 fuzzy logic controllers for 20 db signal noise ratio. values obtained after 200 samples. Performance Criteria ISE IAE ITAE
Type-1 FLC Ideal System Syst. with un certainty 7.65 19.4 17.68 49.5 62.46 444.2
Type-2 FLC Ideal System Syst. with uncertainty 6.8 18.3 16.4 44.8 56.39 402.9
Experiment 2: Simulation of an ideal system using the type-2 FLC. Here, the same test conditions of Experiment 1 were used, but in this case, we implemented the controller’s algorithm with type-2 fuzzy logic. The output sequence is illustrated in Figure 3.16, and the corresponding performance criteria are listed in Table 3.3, and we can observe that using a type-2 FLC we obtained the lower errors. By visual inspection, we can observe that the output system’ response of the Experiment 1, and this one, are similar as it is shown in Figures 3.17, 3.18, and 3.19.
3.3 Experimental Results for Intelligent Control
43
Fig. 3.17. In uncertainty absence, the ISE values are very similar for type-1 and type-2 FLCs.
Fig. 3.18. In uncertainty absence, the IAE values obtained at the plant’s output are very similar for type-1 and type-2 FLCs, here is more evident that a type-1 FLC works a little better than in Fig. 3.17.
Experiment 3: System with uncertainty using a type-1 FLC. In this case, equation (5.25) was used to simulate the effects of uncertainty introduced to the system by transducers, amplifiers, and any other element that in real world applications affects expected values. In this experiment the noise level was simulated in the range of 20 db of SNR ratio. Figure 3.20 shows the system’s response output. In Figures 3.21, 3.22, and 3.23, the performance criteria ISE, IAE, ITAE are represented graphically.
44
3 Design of Interval Type-2 Fuzzy Logic Controllers
Fig. 3.19. In uncertainty absence, the ITAE values obtained at the plant’s output are similar for type-1 and type-2 FLCs, in accordance with Figure 3.18, it is evident that a type-1 FLC works a little better.
Fig. 3.20. This graphic was obtained with uncertainty presence; compare the system’s outputs produced by type-1 and type-2 FLCs. Note that quite the opposite to Figure 3.16, a type-2 FLC works much better than a type-1 FLC when the system has uncertainty. The overshoot error is lower for a type-2 FLC.
3.3 Experimental Results for Intelligent Control
45
Fig. 3.21. We can see that a type-2 FLC produces lower overshoot errors, quantitatively the ISE overall error of using type-2 is 18.3 against 19.4 of the overall error produced by the type-1 FLC.
Fig. 3.22. In accordance with Fig. 3.20, IAE confirms that we obtained the best system response using a type-2 FLC with uncertainty presence. Moreover, the error of the settling time and steady state is lower using a type-2 FLC.
46
3 Design of Interval Type-2 Fuzzy Logic Controllers
Experiment 4: System with uncertainty using a type-2 FLC. In this experiment, uncertainty was introduced in the system, in the same way as in Experiment 3. In this case, a type-2 FLC was used and the results obtained with a type-1 FLC (Experiment 3) were improved. We can appreciate from Figure 3.20 that the lower overshoot and the best settling times are reached using a type-2 FLC. In Figures 3.21 and 3.22, we can see that with a type-2 FLC the overshoot error decreases very quickly and it remains lower than using a type-1 FLC. In Fig. 3.23, we can observe that through time the lower errors are obtained using a type2 FLC.
Fig. 3.23. Here we can see that the steady state error of the system produced by a type-2 FLC is lower than the error produced by a type-1 FLC with uncertainty present. ITAE will punish heavily all those errors produced with time.
Experiment 5: Varying the Signal to Noise Ratio (SNR) in type-1 and type-2 FLCs. To test the robustness of the type-1 and type-2 FLCs, we repeated experiments 3 and 4 giving different noise levels, going from 30 db to 8 db of SNR ratio in each experiment. In Table 3.4, we summarized the values for ISE, IAE, and ITAE considering 200 units of time with a Psignal of 22.98 db in all cases. As it can be seen in Table 3.4, in presence of different noise levels, the behavior of type-2 FLC is in general better than type-1 FLC. From Table 3.4, considering two examples, the extreme cases; we have for an SNR ratio of 8 db, in type-1 FLC the following performance values ISE=321.1, IAE=198.1, ITAE=2234.1; and for the same case, in type-2 FLC, we have ISE=299.4, IAE=194.1, ITAE=2023.1. For 30 db of SNR ratio, we have for the type-1 FLC, ISE=8.5, IAE=25.9, ITAE=164.9, and for the type-2 FLC, ISE=7, IAE=23.3, ITAE=152.6.
3.4 Summary
47
These values indicate a better performance of the type-2 FLC than type-1 FLC, because they are a representation of the errors, and as the error increases the performance of the system goes down. Table 3.4 Behavior of type-1 and type-2 fuzzy logic controllers after variation of signal noise ratio. values obtained for 200 samples. Noise variation Sum Noise (db) 8 22.72 10 20.762 12 18.783 14 16.785 16 14.78 18 12.78 20 10.78 22 8.78 24 6.78 26 4.78 28 2.78 30 0.78 SNR (db)
ISE 321.1 178.1 104.7 64.1 40.9 27.4 19.4 14.7 11.9 10.1 9.1 8.5
Type-1 FLC IAE ITAE 198.1 148.4 114.5 90.5 72.8 59.6 49.5 42 36.2 31.9 28.5 25.9
2234.1 1599.4 1193.8 915.5 710.9 559.1 444.2 356.9 289 236.7 196.3 164.9
ISE 299.4 168.7 102.1 63.7 40.6 26.6 18.3 13.2 10.3 8.5 7.5 7
Type-2 FLC IAE ITAE 194.1 142.2 108.8 84.8 67.3 54.2 44.8 37.8 32.5 28.6 25.5 23.3
2023.1 1413.5 1057.7 814.6 637.8 504.4 402.9 324.6 264.2 217.3 180.7 152.6
3.4 Summary We have presented the study of the controllers’ design for nonlinear control systems using type-1 and type-2 fuzzy logic. We presented five experiments where we simulated the systems’ responses with and without uncertainty presence. In the experiments, a quantification of errors was achieved and documented in tables for different criteria such as ISE, IAE, and ITAE, it was shown that the lower overshoot errors and the best settling times were obtained using a type-2 FLC. Based on the experimental results, we can say that the best results are obtained using type-2 fuzzy systems. In our opinion, this is because type-2 fuzzy sets that are used in type-2 fuzzy systems can handle uncertainties in a better way because they provide us with more parameters and more design degrees of freedom.
Chapter 4
Design of Stable Type-2 Fuzzy Logic Controllers
Stability is one of the more important aspects in the traditional knowledge of Automatic Control [13]. Type-2 Fuzzy Logic is an emerging and promising area for achieving Intelligent Control (in this case, Fuzzy Control). In this chapter we use the Fuzzy Lyapunov Synthesis as proposed by Margaliot to build a Lyapunov Stable Type-1 Fuzzy Logic Control System, and then we make an extension from a Type-1 to a Type-2 Fuzzy Logic Control System, ensuring the stability on the control system and proving the robustness of the corresponding fuzzy controller [14].
4.1 Introduction Stability has been one of the central issues concerning fuzzy control since Mamdani’s pioneer work. Most of the critical comments to fuzzy control are due to the lack of a general method for its stability analysis [8]. But as Zadeh often points out, fuzzy control has been accepted by the fact that it is task-oriented control, while conventional control is characterized as setpointoriented control, and hence do not need a mathematical analysis of stability. Also, as Sugeno has mentioned, in general, in most industrial applications, the stability of control is not fully guaranteed and the reliability of a control hardware system is considered to be more important than the stability [10]. The success of fuzzy control, however, does not imply that we do not need a stability theory for it. Perhaps the main drawback of the lack of stability analysis would be that we cannot take a model-based approach to fuzzy control design. In conventional control theory, a feedback controller can be primarily designed so that a close-loop system becomes stable. This approach of course restricts us to setpoint-oriented control, but stability theory will certainly give us a wider view on the future development of fuzzy control. Therefore, many researchers have worked to improve the performance of the FLC’s and ensure their stability [13]. Li and Gatland in 1995 proposed a more systematic design method for PD and PI-type FLC’s. Choi, Kwak and Kim present a single-input FLC ensuring stability. Ying in 1994 presented a practical design method for nonlinear fuzzy controllers, and many other researchers have results on the matter of the stability of FLC’s, and Cázarez et al., in 2008 presents an extension of the Margaliot work to built stable type-2 fuzzy logic controllers in Lyapunov sense [21, 22]. O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 49–61. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
50
4 Design of Stable Type-2 Fuzzy Logic Controllers
This work is based on Margaliot´s work, we use the Fuzzy Lyapunov Synthesis to build an Stable Type-2 Fuzzy Logic Controller for a 1 Degree of Freedom (DOF) manipulator robot, first without gravity effect to prove stability, and then with gravity effect to prove the robustness of the controller. The same criteria can be used for any number of DOF manipulator robots, linear or nonlinear, and any kind of plants [14]. This chapter is organized as follows: In Section 4.2 we present an introductory explanation of type-1 and type-2 FLC’s. In Section 4.3 we extend Margaliot’s result to build a general rule base for any type (1 or 2) of FLC’s. Experimental results are presented in Section 4.4 and the summary is given in Section 4.5.
4.2 Fuzzy Logic Controllers 4.2.1 Type-1 Fuzzy Logic Control Type-1 FLCs are both intuitive and numerical systems that map crisp inputs to a crisp output. Every FLC is associated with a set of rules with meaningful linguistic interpretations, such as l l l R l : If x1 is F1 and x 2 is F2 and … and x n is Fn Then w is G l
which can be obtained either from numerical data, or experts familiar with the problem at hand. Based on this kind of statement, actions are combined with rules in an antecedent/consequent format, and then aggregated according to approximate reasoning theory, to produce a nonlinear mapping from input space
U = U 1 xU 2 x...U n to the output space W , where Fkl ⊂ U k , k = 1,2,..., n , are the antecedent type-1 membership functions, and G l ⊂ W is the consequent type-1 membership function. The input linguistic variables are denoted by u k , k = 1,2,..., n , and the output linguistic variable is denoted by w . A Fuzzy Logic System (FLS), as the kernel of a FLC, consist of four basic elements (Fig. 4.1): the type-1 fuzzyfier, the fuzzy rule-base, the inference engine, and the type-1 defuzzyfier. The fuzzy rule-base is a collection of rules in the form of R l , which are combined in the inference engine, to produce a fuzzy output. The type-1 fuzzyfier maps the crisp input into type-1 fuzzy sets, which are subsequently used as inputs to the inference engine, whereas the type-1 defuzzyfier maps the type-1 fuzzy sets produced by the inference engine into crisp numbers.
4.2 Fuzzy Logic Controllers
51
Fig. 4.1. Structure of type-1 fuzzy logic system
u X that associate with each element x of the universe of discourse, U , a number u X (x) in the interval
Fuzzy sets can be interpreted as membership functions [0,1]:
u X : U → [0,1]
(4.1)
For more details of a Type-1 FLS there are several works on this area [8, 10, 13]. 4.2.2 Type-2 Fuzzy Logic Control As with the type-1 fuzzy set, the concept of type-2 fuzzy set was introduced by Zadeh as an extension of the concept of an ordinary fuzzy set [84]. A FLS described using at least one type-2 fuzzy set is called a type-2 FLS. Type-1 FLSs are unable to directly handle rule uncertainties, because they use type-1 fuzzy sets that are certain. On the other hand, type-2 FLSs, are very useful in circumstances where it is difficult to determine an exact, and measurement uncertainties [42]. It is known that type-2 fuzzy set let us to model and to minimize the effects of uncertainties in rule-based FLS. Unfortunately, type-2 fuzzy sets are more difficult to use and understand that type-1 fuzzy sets; hence, their use is not widespread yet [13]. Similar to a type-1 FLS, a type-2 FLS includes type-2 fuzzyfier, rule-base, inference engine and substitutes the defuzzifier by the output processor. The output processor includes a type-reducer and a type-2 defuzzyfier; it generates a type-1 fuzzy set output (from the type reducer) or a crisp number (from the defuzzyfier). A type-2 FLS is again characterized by IF-THEN rules, but its antecedent of consequent sets are now type-2. Type-2 FLSs, can be used when the circumstances
52
4 Design of Stable Type-2 Fuzzy Logic Controllers
are too uncertain to determine exact membership grades. A model of a type-2 FLS is shown in Fig. 4.2.
Fig. 4.2. Structure of type-2 fuzzy logic system
In the case of the implementation of type-2 FLCs, we have the same characteristics as in type-1 FLC, but we now use type-2 fuzzy sets as membership functions for the inputs and for the outputs. Fig. 4.3 shows the structure of a control loop with a FLC.
Fig. 4.3. Fuzzy control loop
4.3 Systematic and Design of Stable Fuzzy Controllers For our description we consider the problem of designing a stabilizing controller for a 1DOF manipulator robot system depicted in Fig. 4.4. The state-variables are
x1 = θ - the robot arm angle, and x2 = θ - its angular velocity. The system’s actual
dynamical equation, which we will assume, unknown, is as shown in equation (4.2):
M (q )q + C (q, q )q + g (q) = τ
(4.2)
4.3 Systematic and Design of Stable Fuzzy Controllers
53
Fig. 4.4. 1DOF Manipulator robot
To apply the fuzzy Lyapunov synthesis method, we assume that the exact equations are unknown and that we have only the following partial knowledge about the plant (see Fig. 4.4): 1. The system may have really two degrees of freedom
θ
and θ , referred to as
x1 and x2 , respectively. Hence, x1 = x2 . 2. x 2 is proportional to u , that is, when u increases (decreases) x 2 increases (decreases). To facilitate our control design we are going to suppose no gravity effect in our model, see (equation 4.3).
ml 2 q = τ
(4.3)
Our objective is to design the rule-base of a fuzzy controller that will carry the robot arm to a desired position x1 = θd . We choose (4.4) as our Lyapunov function candidate. Clearly,
V is positive-definite. V ( x1 , x 2 ) =
Differentiating
1 2 ( x1 + x 22 ) 2
(4.4)
V , we have (4.5), V = x1 x1 + x2 x 2 = x1 x2 + x 2 x 2
(4.5)
Hence, we require:
x1 x2 + x2 x 2 < 0
(4.6)
54
4 Design of Stable Type-2 Fuzzy Logic Controllers
x1 and x2 have opposite signs, then x1 x 2 < 0 and (4.6) will hold if x 2 = 0 ; if x1 and x2 are both positive, then (4.6) will hold if x2 < − x1 ; and if x1 and x2 are both negative, then (4.6) will hold if x 2 > − x1 . We can now derive sufficient conditions so that condition (4.6) holds: If
We can translate these conditions into the following fuzzy rules:
x1 is positive and x 2 is positive then x 2 must be negative big • If x1 is negative and x 2 is negative then x 2 must be positive big • If x1 is positive and x 2 is negative then x 2 must be zero • If x1 is negative and x 2 is positive then x 2 must be zero • If
However, using our knowledge that
x 2 is proportional to u , we can replace each
x 2 with u to obtain the fuzzy rule-base for the stabilizing controller: • If
x1 is positive and x 2 is positive Then u must be negative big • If x1 is negative and x 2 is negative Then u must be positive big • If x1 is positive and x 2 is negative Then u must be zero • If x1 is negative and x 2 is positive Then u must be zero
x1 , x2 , and u follow ele gantly from expression (4.5). Because V = x2 ( x1 + x 2 ) , and since we require that V be negative, it is natural to examine the signs of x1 and x2 ; hence, the obvious fuzzy partition is positive, negative. The partition for x 2 , namely negative It is interesting to note that the fuzzy partitions for
big, zero, positive big is obtained similarly when we plug the linguistic values positive, negative for x1 and x 2 in (4.5). To ensure that x2 < − x1 ( x2 > − x1 ) is satisfied even though we do not know x1 ’s exact magnitude, only that it is positive (negative), we must set x 2 to negative big (positive big). Obviously, it is also possible to start with a given, pre-defined, partition for the variables and then plug
each value in the expression for V to find the rules. Nevertheless, regardless of what comes first, we see that fuzzy Lyapunov synthesis transforms classical Lyapunov synthesis from the world of exact mathematical quantities to the world of computing with words. To complete the controllers design, we must model the linguistic terms in the rule-base using fuzzy membership functions and determine an inference method. We can characterize the linguistic terms positive, negative, negative big, zero and positive big by the type-1 membership functions shown in Fig. 4.5 for a Type-1 Fuzzy Logic Controller, and by the type-2 membership functions shown in
4.3 Systematic and Design of Stable Fuzzy Controllers
55
Fig. 4.6 for a Type-2 Fuzzy Logic Controller. Note that the type-2 membership functions are extended type-1 membership functions.
Fig. 4.5. Set of type-1 membership functions: a) positive, b)negative, c) negative big, d) zero and e) positive big
Fig. 4.6. Set of type-2 membership functions: a)negative, b) positive, c) positive big, d) zero and e) negative big
56
4 Design of Stable Type-2 Fuzzy Logic Controllers
To this end, we had systematically developed a FLC rule-base that follows the Lyapunov Stability criterion. In Section 4.4 we present some experimental results using our fuzzy rule-base to build a Type-2 Fuzzy Logic Controller.
4.4 Experimental Results In Section 4.3 we had systematically developed a stable FLC rule-base, and now we are going to show some experimental results using our stable rule-base to build a Type-2 FLC. The plant description used in the experiments is the same shown in Section 4.3. Our experiments were done with Type-1 Fuzzy Sets and Interval Type-2 Fuzzy Sets. In the Type-2 Fuzzy Sets the membership grade of every domain point is a crisp set whose domain is some interval contained in [0,1]. On Fig. 4.6 we show some Interval Type-2 Fuzzy Sets, and for each fuzzy set, the grey area is known as the Footprint of Uncertainty (FOU), and this is bounded by an upper and a lower membership function as shown in Fig. 4.7.
Fig. 4.7. Interval Type-2 Fuzzy Set
In our experiments we increase and decrease the value of ε to the left and to the right side having a εL and a εR values respectively to determine how much the FOU can be extended or perturbed without losing stability in the FLC. We did make simulations with initial conditions of θ having values in the whole circumference [0, 2 π ], and the desired angle θd having values in the same range. The initial conditions considered in the experiments shown in this paper are an angle θ = 0rad and θ d = 0.1rad . In Fig. 4.8 we show a simulation of the plant made with a Type-1 FLC, as can be seen, the plant has been regulated in around 8 seconds, and in Fig. 4.9 we show the graph of equation (4.5) which is always negative defined and consequently the system is stable.
4.4 Experimental Results
57
Fig. 4.8. Response for the Type-1 FLC
Fig. 4.9.
V for the Type-1 FLC
Figure 4.10 shows the simulation results of the plant made with the Type-2 FLC increasing and decreasing ε in the range of [0,1], and as can be seen the plant has been regulated in around 10 seconds, and the graph of (4.5), which is depicted in Fig. 4.11 is always negative defined and consequently the system is stable. As we can seen, the time response is increasing when the value of ε is increasing.
58
4 Design of Stable Type-2 Fuzzy Logic Controllers
Fig. 4.10. Response for the Type-2 FLC ( ε
Fig. 4.11.
V
for the Type-2 FLC ( ε
→ [0,1) )
→ [0,1] )
With the variation of ε in the definition of the FOU, the control surface changes proportional to the change of ε , for this reason, the value of u for ε ≥ 1 is practically zero, and the plant does not have physical response. To test the robustness of the built Fuzzy Controller, now we are going to use the same controller designed in Section 4.3, but at this time, we are going to use it to control equation (4.2) considering the gravity effect as shown in equation (4.7).
4.4 Experimental Results
59
ml 2 q + gml cos q = τ
(4.7)
In Figure 4.12 we can see a simulation of the plant obtained with a Type-1 FLC, and as can be seen, the plant has been regulated in approximately 8 seconds and Figure 4.13 shows the graph of (4.5) which is always negative defined and consequently the system is stable.
Fig. 4.12. Response for the Type-1 FLC
Fig. 4.13.
V for the Type-1 FLC
60
4 Design of Stable Type-2 Fuzzy Logic Controllers
Figure 4.14 shows the simulation results of the plant obtained with the Type-2 FLC with increasing and decreasing ε values in the range of [0,1], and the graph of (4.5) depicted at Fig. 4.15 is always negative defined and consequently the system is stable. As we can see, if we use an adaptive gain in all the cases of ε can be regulated around 8 seconds.
Fig. 4.14. Response for the Type-2 FLC ( ε
Fig. 4.15.
V
for the Type-2 FLC ( ε
→ [0,1) )
→ [0,1] )
4.5 Summary
61
4.5 Summary Margaliot’s approach for the design of FLC’s is now proved to be valid for both, Type-1 and Type-2 Fuzzy Logic Controllers. In the case of Type-2 FLC’s membership functions, we can perturb or change the definition domain of the FOU without losing of stability of the controller; in the case described in this chapter, we have to use an adaptive gain to regulate the plant in a desired time. For our example of the 1DOF manipulator robot, stability holds when extending the FOU on the domain [0,1), and we also have shown that a FLC designed following the Fuzzy Lyapunov Synthesis is stable and robust.
Part II
Chapter 5
Design of a Type-2 Fuzzy Controller and Its Comparison with Type-1 Fuzzy and PID Controllers for Velocity Regulation in a Motor
This chapter proposes the design of a Type-2 Fuzzy Logic Controller (FLC-T2) using Genetic Algorithms (GA). The FLC-T2 was tested with different levels of uncertainty to regulate velocity in a Direct current (DC) motor [70]. The FLC-T2 was synthesized in Very High Description Language (VHDL) code for Field Programmable Gate Array (FPGA), using Xilinx System Generator (XSG) of Xilinx ISE and Matlab-Simulink. Comparisons were made between the FLC-T1 versus FLC-T2 in VHDL code and Proportional Integral Differential (PID) Controller, to regulate the velocity of a DC motor, to evaluate the difference in performance of the three types of controllers, using the test t-student statistic.
5.1 Introduction The use of classical control techniques such as PID control, in some cases results to be a good alternative for controlling some systems. However the higher the accuracy required in the system control the adjustment is more difficult as they are quite sensitive to noise signals and introduce variations sometimes when there are delays in the system. This kind of subjectivity has implications for modeling these systems through fuzzy logic [8]. There is great interest in research and development of fuzzy systems, especially those based on type-2 fuzzy logic due to the advantages in the management of uncertainty, which is why there are great expectations regarding their use in control systems as a possible way to compensate for errors due to instrumentation systems, among others [13]. However, these systems require large computing resources that difficultly can be provided by a personal computer, so that the investigation of different alternatives for their implementation is a topic of current research such as fuzzy control implemented in programmable logic devices [70]. Fuzzy logic controllers are used successfully in many application areas, and these include control, classification, etc. [2, 6, 7, 17, 18, 19, 34, 39, 40, 41]. Fuzzy systems are every time used more, because they tolerate imprecise information and can be used to model nonlinear functions of arbitrary complexity. A fuzzy inference system (FIS) consists of three stages: Fuzzification, Inference and Defuzzification. In Figure 5.1, the fuzzy system information processing is shown.
O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 65–75. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
66
5 Design of a Type-2 Fuzzy Controller and Its Comparison
Fig. 5.1. Type-1 Fuzzy System
Type-1 fuzzy systems use exact membership functions, while type-2 fuzzy systems are described by membership functions with uncertainty. Uncertainty is an attribute of information, which may be incomplete, inaccurate, vague, weak, contradictory, and so on. The type-2 fuzzy systems consist of four stages: Fuzzification, Inference, Type Reduction and Defuzzification. We describe below these stages. The fuzzification maps a numeric value x=(x1,… xp)T ϵ X1× X2 ×… × Xp=X , into a type-2 fuzzy set Ax in X. Ax is a singleton fuzzy set if μAx =1/1 for x=x’ and μAx=1/0 for all others x ǂ x’. The Inference (reasoning) stage consists of two blocks, the rules and the inference engine, it works the same way as for type-1 fuzzy systems, except the antecedents fuzzy sets and the consequent are represented by type-2 fuzzy sets. The process consists of combining the rules and map the input to the output (type2 fuzzy sets), using the Join and Meet operations. The Type Reductor is used to convert all type- 2 fuzzy sets to type-1 fuzzy intervals on the output. There are several methods to calculate the reduced set, such as joint center, center of sums, height, center joint, among others. The Defuzzification stage consists in obtaining a numeric value for the output. Using the COS type reductor [13], the defuzzification is an average value since the range is given by [yl,yr]. In Figure 5.2, the type-2 fuzzy system information processing is shown. −
FOU ( A1 ) −
μ A1 ( x '1 )
x1 ∈ X
μ ( x'1 ) − A1
A (× ' ) −
x'1
x1
y = f ( x) ∈ X
−
A (× ' )
FOU ( A ) −2
x2 ∈ X
f l (×) f r (×) −
μ A ( x '2 )
μ ( x'2 ) −A
x'2 x2
Fig. 5.2. Type-2 Fuzzy System
COS
5.1 Introduction
67
A type-2 fuzzy system can be implemented on a general purpose computer, or by a specific use of a microelectronics realization such as the FPGA. An FPGA is a semiconductor device that contains in its interior components such as gates, multiplexers, etc. These are interconnected with each other, according to a given design. These devices use the VHDL programming language, which is an acronym that represents the combination of VHSIC (Very High Speed Integrated Circuit) and HDL (Hardware Description Language). The FPGAs can be used to implement specific architectures to accelerate a particular algorithm. Applications that require a great number of simple operations are suitable for implementation on FPGA. A processing element can be designed to perform this operation and several instances of it can be used to perform parallel processing. These systems based on rules incorporate linguistic variables, linguistic terms and fuzzy rules. The acquisition of these rules is not an easy task for the expert and is of vital importance in the operation of the controller. There are methods to optimize those elements, such as genetic algorithm (GA). A GA is a stochastic optimization algorithm inspired by the natural theory of evolution. From a principle proposed by Holland, the GA has been used successfully to manage wide variety problems such as control, search, etc. The GA is inspired by the mechanism of natural selection where stronger individuals are likely to be the winners in a competing environment. Here the GA uses a direct analogy of such natural evolution. Through the genetic evolution method, an optimal solution can be found and represented by the final winner of the genetic game. Figure 5.3 shows the GA cycle.
Fig. 5.3. GA cycle
Of course, the GA is not the best way to solve every problem, GAs have proven to be a good strategy because of their optimal results. The GA has applications in a wide variety of fields to develop solutions to complex problems, including optimization of fuzzy systems, offering them learning and adaptation, they are commonly called genetic fuzzy systems or fuzzy system hybrids. This chapter describes a method for genetic optimization of the triangular and trapezoidal membership functions (MF) of a type-2 fuzzy logic system (FLC-T2) for hardware applications such as the FPGA. This method involves taking only certain points of the membership functions in order to give greater efficiency to
68
5 Design of a Type-2 Fuzzy Controller and Its Comparison
the algorithm. The GA has been tested in a FLC-T2 and FLC-T1 to regulate the speed of a direct current motor using the Matlab platform and Xilinx System Generator (XSG). Comparisons were made between the FLC-T1 versus FLC-T2 in VHDL code and FLC-T2 versus PID Controller with Ziegler-Nichols tuning, to regulate the velocity of a DC motor, to evaluate the difference in performance of three types of controllers, using the test t-student statistic. This chapter is organized as follows; in section 2 we present a design of FLCT1, FLC-T2 and PID controllers for speed regulation the DC motor. The test and results of the comparisons of FLC-T1, FLC-T2 versus PID for speed regulation of the DC motor are shown in Section 3. Finally, Section 4 presents the conclusions. 5.2 Desig n of F LC-T1, F LC-T2 and PID C ontrollers
5.2 Design of FLC-T1, FLC-T2 and PID Controllers for Speed Regulation of the DC Motor 5.2 Desig n of F LC-T1, F LC-T2 and PID C ontrollers
The FLC-T1 is coded in VHDL, the FLC for the fuzzification stage, is able to instantly calculate the degree of membership, using a method to calculate the slopes, the inference is working with the max-min and the defuziffication with the method of heights. The FLC-T1 has two inputs one output, each input and output contains three membership functions two trapezoidal one triangular. Figure 5.4 shows the triangular and trapezoidal membership functions (MF) that are used.
a)
b)
Fig. 5.4. Parameters of the Membership Functions. a) MF trapezoidal, b) MF triangular.
For optimization of the FLC using GAs, you must define the chromosome that represents the information of the individual, which in this case is related to the universe of discourse and the linguistic terms. Figure 5.5 shows the chromosome of the GA.
Fig. 5.5. GA chromosome.
5.2 Design of FLC-T1, FLC-T2 and PID Controllers
69
In Table 5.1, we show the boundary parameters of the chromosome. Table 5.1. Boundary parameters of the chromosome
Parameters
Ïnput 1 0 < a2 < 128 b1 = 128 128 < a1 < 255
Input 2 0 < a2< 128 b1 = 128 128 < a1 < 255
Output 0 < a2 < 128 b1 = 128 128 < a1 < 255
We implemented the FLC-T2 using the average method [68] in the FPGA. The FLC-T2 is coded in VHDL, the FLC for the fuzzification stage, is able to instantly calculate the degree of membership, using a method to calculate the slopes, the inference is working with the max-min composition and the defuziffication with the method of heights. Figure 5.6 shows the block diagram of the average FLC-T2 for the regulation of speed of a DC motor, the systems inputs are the error (x1), and change of error (x2). The system has only one output (y). −
FOU ( A1 ) −
μ A ( x '1 ) 1
−
A (× ' ) −
x'1
x1
FOU ( A ) −2
−
μ A ( x' 2 )
x1 ∈ X
−
x'2
x2 y = f ( x) ∈ X
−
x2 ∈ X
FOU ( A1 ) μ ( x '1 ) − A1
A (× ' ) −
x'1
x1 −
FOU ( A ) −2
μ ( x' 2 ) − A
x'2
x2 −
Fig. 5.6. Block diagram in XSG of FLC.
The FLC-T2 has two inputs and one output, each input and output contains three membership functions, two trapezoidal one triangular. Figure 5.7 shows the triangular and trapezoidal membership functions (MF) that are used.
70
5 Design of a Type-2 Fuzzy Controller and Its Comparison μ ( x)
μ ( x)
a1 a0u
a2
b1
a3u a0l
a3l
b0u
x
b2u
b2l
b0l
a)
x
b)
Fig. 5.7. Parameters of the type-2 Membership Functions. a) MF trapezoidal, b) MF triangular.
For the optimization of the FLC-T2 using GAs, you must define the chromosome that represents the information of the individual, which in this case is related to the universe of discourse and the linguistic terms. Figure 5.8 shows the chromosome used for the GA. a2l b1
a1l
a2l b1
a1l a2l
a2u b1
b1 a1l
a1u a2u b1
a1u a2 u b1 a1u
Fig. 5.8. GA chromosome.
In Table 5.2, we show the boundary parameters of the chromosome. Table 5.2. Boundary parameters of the chromosome
Parameters U PU
Parameters L PL
Ïnput 1 0 < a2U < 128 b1U = 128 128 < a1U < 255
Input 2 0 < a2U < 128 b1U = 128 128 < a1U < 255
Output 0 < a2U < 128 b1U = 128 128 < a1U < 255
PU && a2U >a2L b1L = 128 PU && a2L >a2U
PU && a2U >a2L b1L = 128 PU && a2L >a2U
PU && a2U >a2L b1L = 128 PU && a2L >a2U
Figure 5.9 shows the input of the FLC-T2 with fixed and variable parameters. Each input and output has a size of 8 bits. μ(x)(8bits) 255
0
a2
b1
128
a1
255
x ( 8 bits )
Fig. 5.9. Points of type-2 Membership Functions input and output
5.2 Design of FLC-T1, FLC-T2 and PID Controllers
71
The blue points are fixed, the red dots are the parameter a2, the green dots are fixed (b1) and the yellow dots are the parameter a1. The GA is of multiobjective type for FLC-T1 and FLC-T2, which means that to determine the best individual, three evaluations are performed: a) Minimum overshoot
o1 = max( y (t )) − r b) Minimum undershoot
o2 = min( y (t )) − r c) Minimum output steady state error (sse) 1000
sse =
y (t ) − r
t = 201
Where y(t) is the output of the system and r is reference. The FLC linguistic terms were optimized with the GA, but the fuzzy rules are not changed. The process of the GA is described below: Generate the initial population, Fitness Evaluation (o1, o2, sse), Selection, Crossover, Mutation, Reinsert and Simulation using the XSG platform in Matlab-Simulink. For the PID controller design, we used the Ziegler-Nichols tuning method [36], this method has the following steps: 1.
Using only proportional control starting with a small gain value, increase the gain until the loop begins to oscillate. 2. Record the controller critical gain Kp=Kc and oscillation period of the controller output Pc. 3. Adjust the controller parameters according to Table 5.3. Table 5.3. Controller parameters with Ziegler-Nichols method
Kp
Ki
P
0.5Kc
PI
0.45Kc
0.833Pc
PID
0.6Kc
0.5Pc
Kd
0.125Pc
72
5 Design of a Type-2 Fuzzy Controller and Its Comparison
5.3 Test a nd Result t he Co mpariso ns
5.3 Test and Result the Comparisons with FLC-T2 and FLC-T1 in FPGA´s and PID Controllers 5.3 Test a nd Result t he Co mpariso ns
The FLC-T1, FLC-T2 and PID controllers are analyzed; each was given a level of uncertainty and a comparison was made between them. The results were evaluated using t-student statistics. To test the FLC-T2 and FLC-T1 the speed control was simulated using a mathematical model of the plant in Matlab-Simulink, as shown in Figure 5.10.
Fig. 5.10. Model of FLC-T2 and FLC-T1
The FLC-T1 and FLC-T2 have the inputs, error (e(t)) and change of error (e'(t)), and the output is the control signal (y(t)). The inputs are calculated as follows: e(t)= r(t) – y(t) e’(t)= e(t) – e(t-1) where t is the sampling time. The reference signal r(t), is given by: 15 r (t ) = 0
t > 0 t ≤ 0
Each input and output of the FIS-T2 and FIS-T1 has three linguistic terms. For the linguistic variable error and change of error, the terms are {NB, Z, PB} in this case NB is Negative Big, Z is Zero and PB is Positive Big. For the linguistic variable control signal are {BD, H, BI} in this case BD is Big Decrement, H is Hold and BI is Big Increment. The PID controller model is shown in Figure 5.11, the uncertainty block is used to test the PID controllers with different levels of noise.
5.3 Test and Result the Comparisons
73
Fig. 5.11. Model of PID
In Table 5.4, we show the comparison between the FLC-T1, FLC-T2 versus PID for different levels of uncertainty. We note that the FLC-T2 is better at different levels of uncertainty (noise), while the noise free FLC-T1 has similar behavior to the FLC-T2 and PID is better. Table 5.4. FLC-T1, FLC-T2 versus PID results for velocity regulation in a DC motor No.
FLC
1
T2 T1 PID T2 T1 PID T2 T1 PID T2 T1 PID T2 T1 PID T2 T1 PID T2 T1 PID T2 T1 PID T2 T1 PID T2 T1 PID
2
3
4
5
6
7
8
9
10
Uncertainty level factor 0 0 0 0.001 0.001 0.001 0.005 0.005 0.005 0.008 0.008 0.008 0.05 0.05 0.05 0.08 0.08 0.08 0.1 0.1 0.1 0.5 0.5 0.5 0.8 0.8 0.8 1 1 1
Error 0.6298 0.8249 0.6197 0.6343 0.8283 0.8394 0.6403 0.8279 0.8528 0.6505 0.8215 0.8528 0.6244 0.7975 0.8528 0.6244 0.7946 0.8660 0.6116 0.7532 0.8792 0.6823 0.8301 0.8791 0.7173 0.8932 0.8905 0.7402 0.9387 0.8972
74
5 Design of a Type-2 Fuzzy Controller and Its Comparison
We analyse statistically the performance of the three controllers using t-student test. Table 5.5 shows the statistical results of the three controllers. Table 5.5. FLC-T1, FLC-T2 versus PID results for velocity regulation in a DC motor Controllers comparison
t-student
FLC-T1 Vs FLC-T2 FLC-T2 Vs PID
8.22 6.93
As shown in Table 5.5, the FLC-T2 has a better performance compared with the FLC-T1 and PID, with a degree of confidence of 95 percent. Figure 5.12 shows the velocity of FLC-T2 comparison with FLC-T1 and PID controllers with no level of uncertainty (x=0).
Fig. 5.12. Behavior of FLC-T2 comparison with FLC-T1 and PID controllers for velocity motor with x=0.
Figure 5.13 shows the velocity of the FLC-T2 in comparison with the FLC-T1 and PID controllers with a particular level of uncertainty (x=1). As shown in Figure 5.13, it is very difficult to determine which controller has better performance, for that reason we decided to perform a t-student statistics test shown in Table 5.5 which tells us that the FLC-T2 is better compared to FLC-T1 and PID controllers.
5.4 Summary
75
Fig. 5.13. Behavior of FLC-T2 comparison with FLC-T1 and PID controllers for velocity motor with uncertainty level (x=1).
5.4 Summary We proposed a tuning PID controller and genetic optimization of FLC-T1 and FLC-T2 for the regulation of speed of a DC motor, where three triangular and trapezoidal membership functions for the two inputs and one output are used in the optimization. The GA only optimizes parameters of membership functions, the objective function of GA considers three characteristics: overshoot, undershoot and steady state error, so that makes it a multiobjective GA. The FLC-T1 and FLC-T2 are encoded in VHDL code for implementation in FPGA. Each FIS-T1 is simulated in an FLC-T1 for speed control of the DC motor. The best FLC-T1 was obtained in 70 generations with 85% crossover (crossover single point) and 75% selection (universal selection) and 70% Mutation, with an error of convergence of 7.34e-4, in a time of 19.35 minutes with a speed of 15 rpm. Each FIS-T1 is simulated in an FLC-T2 for speed control of the DC motor. The best FLC-T2 was obtained in 30 generations with 85% crossover (crossover single point) and 75% selection (universal selection) and 10% Mutation, with a error of convergence of 9.55e-4, in a time of 30.0088 minutes with a speed of 15 rpm. The PID controller tuning was performed with Ziegler-Nichols method the values constants obtained are kp=0.5, ki=0.2 and kd=0.025. Comparisons were made between the FLC-T1 versus FLC-T2 in VHDL code and FLC-T2 versus PID Controller, to regulate the velocity of a DC motor, to evaluate the difference in performance of three types of controllers, using the test tstudent statistic, giving better results for the FLC-T2. Matlab-Simulink and XSG were used to perform the simulations in all cases.
Chapter 6
Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems for Longitudinal Control of an Airplane
In this chapter we present the design of fuzzy systems for the longitudinal control of an F-14 airplane using genetic algorithms [23]. The longitudinal control is carried out by controlling only the elevators of the airplane. To carry out such control it is necessary to use the stick, the rate of elevation and the angle of attack. These 3 variables are the input to the fuzzy inference system, which is of Mamdani type, and we obtain as output the value of the elevators. After designing the fuzzy inference system we turn to the simulation stage. Simulation results of the longitudinal control are obtained using a plant in Simulink and those results are compared against the PID controller. For optimizing the fuzzy logic control design we use a genetic algorithm.
6.1 Introduction This chapter focuses on the field of fuzzy logic and also considering the control area [8]. Both areas can work together to solve various problems, in this case the longitudinal flight control. Over time the airplanes have evolved and at the same time improving their techniques for controlling their flight and avoid accidents as much as possible [65]. For this reason, we are considering in this paper the implementation of a system that controls the horizontal position of the aircraft. We created the fuzzy system to perform longitudinal control of the aircraft and then we used a simulation tool to test the fuzzy controller under noisy conditions. We designed the fuzzy controller with the purpose of maintaining the stability in horizontal flight of the aircraft by controlling only the movement of the elevators. We also use a genetic algorithm to optimize the fuzzy logic control design.
6.2 Background and Basic Concepts In this section we present the background of aviation and how it has been changing over time and also some basic concepts for understanding this work [63].
O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 77–92. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
78
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
6.2.1 Aviation History In 1680 Giovanni Borello studied the application of the flight muscles of birds and he came to the conclusion that a person could never fly by himself. In the nineteenth century Sir George Cayley established the modern concept of a plane and he applied the idea of a fixed wing capable of lifting the airplane. Cayley established the aerodynamics foundation. In 1804 Cayley constructed a plane and realized his first unmanned flights. Cayley worked during the 5 decades following in his prototype and in 1853 an assistant of Cayley performed a flight of short duration in the plane that was in England. In 1856 Jean-Marie Le Bris realized his first sky gliding flight higher than his point of departure thanks to the glider "L'Albatros Artificiel", which for takeoff was drawn by horses in the beach. Etienne Lenoir who was a Belgian inventor has the Credit for the first internal combustion engine in 1859, he developed only one horsepower and it was inefficient, but that resulted in billions of internal combustion engines have been built since then. Many people were part of that inventions and development of the aircraft up to date is in continue growth and development for the benefit of humanity. If we want to speak about a war plane we can say something about the F-14 airplane because it is the airplane that has been used for this task. The development of the F14 came about because of the need to improve the aging American Fighters in use in the early days of the Cold War. Some form of upgrade was required if the United States was to maintain its competitive edge over the Soviet Union. As a result, the U.S. Navy and the U.S. Air Force teamed up to explore the possibility of developing a fighter plane that would, as far as possible, be appropriate for the needs of both forces. The practical flight aircraft was only possible once there was the energy source capable of driving. 6.2.2 Control Surfaces Every aircraft has control surfaces or other means which are used to generate the forces and moments required to produce the accelerations, which causes the aircraft to be steered along its three-dimensional flight path to its specified destination. A conventional aircraft is represented in Fig. 6.1. It is shown with the usual control surfaces, namely elevator, ailerons, and rudder. Such conventional aircrafts have a fourth control, the change in thrust, which can be obtained from the engines. Many modern aircraft, particularly combat aircraft, have considerably more control surfaces, which produce additional control forces or moments. Some of these additional surfaces and motivators include horizontal and vertical canards, spoilers, variable cambered wings, reaction jets, differentially operating horizontal tails and movable fins. One characteristic of flight control is that the required motion often needs a number of control surfaces to be used simultaneously.
6.2 Background and Basic Concepts
79
Fig. 6.1. Conventional Aircraft diagram representation.
6.2.3 Flight Maneuvers Any aircraft is capable of 3 possible rotations about 3 mutually perpendicular axes whose intersection point is above the center of gravity of the airplane (see Fig. 6.2).
Fig. 6.2. Possible rotations around the 3 axes.
As we can appreciate from Fig. 6.2, Pitch is the type of rotation that is done on the Y axis of the plane and it can be represented as an ascent or descent of its nose. Roll is a movement around the longitudinal axis of the plane (X axis) and be seen as a lateral inclination thereof. Yaw is a rotation about the vertical axis (Z) of the plane, and produces a change in the horizontal direction of flight. Each flight maneuver is assigned to a particular type of control: side control, direction control and longitudinal control. The first one, controls the ailerons and if one of these is flexed downward, it results in an increased lift on the wing for causing the rise of the same, while if the wing is bent upward, the wing produces a sustainability decrease, encouraging the decline of the plane. The second one controls the rudder and this is done using the pedals. For a yaw movement to the right, the driver presses the right pedal, thus turning the rudder surface to the right. Finally, the longitudinal control is responsible for controlling the elevators and when we talk about longitudinal control we make reference to the pitching motion generated by
80
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
the aircraft. All controlled flight consists of either one, or a combination or more than one, of these basic maneuvers. It is important to know what can happen if you have to control the flight of an airplane because, when back pressure is applied to the elevator control, the airplane’s nose rises in relation to the pilot. When forward pressure is applied to the elevator control, the airplane’s nose lowers in relation to the pilot. When right pressure is applied to the aileron control, the airplane’s right wing lowers in relation to the pilot. When left pressure is applied to the aileron control, the airplane’s left wing lowers in relation to the pilot. When pressure is applied to the right rudder pedal, the airplane’s nose moves (yaws) to the right in relation to the pilot. When pressure is applied to the left rudder pedal, the airplane’s nose moves (yaws) to the left in relation to the pilot. 6.2.4 Forces Involved in Flight Four forces act upon an aircraft in relation to straight-and level, un-accelerated flight. These forces are thrust, lift, weight, and drag (see Fig. 6.3).
Fig. 6.3. The four forces acting on an airplane.
Thrust is the forward force produced by the powerplant/propeller. It opposes or overcomes the drag force. As a general rule, it is said to act parallel to the longitudinal axis. This is not always the case as explained later. Drag is a backward, retarding force, and is caused by disruption of airflow by the wing, fuselage, and other protruding objects. Drag opposes thrust, and acts rearward parallel to the relative wind. Weight is the combined load of the airplane itself, the crew, the fuel, and the cargo or baggage. Weight pulls the airplane downward because of the force of gravity. It opposes lift, and acts vertically downward through the airplane’s center of gravity (CG). The lift opposes the downward force of weight, is produced by the dynamic effect of the air acting on the wing, and acts perpendicular to the flight path through the wing’s center of lift. Each airplane has a standard mathematical model and usually linear models are applied whose parameters are obtained from wind tunnel
6.3 Genetic Algorithms
81
tests results using a scale model. These models are evaluated in each operation point with the information obtained in the tests. There are more sophisticated nonlinear models that approximate the aerodynamic coefficients by truncated Taylor series.
6.3 Genetic Algorithms Genetic algorithms (GAs) are numerical optimization algorithms inspired by both natural selection and genetics. We can also say that the genetic algorithm is an optimization and search technique based on the principles of genetics and natural selection. A GA allows a population composed of many individuals to evolve under specified selection rules to a state that maximizes the “fitness”. The method is a general one, capable of being applied to an extremely wide range of problems. The algorithms are simple to understand and the required computer code easy to write [25]. GAs were in essence proposed by John Holland in the 1960's. His reasons for developing such algorithms went far beyond the type of problem solving with which this work is concerned. His 1975 book, Adaptation in Natural and Artificial Systems (recently re-issued with additions) is particularly worth reading for its visionary approach. More recently others, for example De Jong, in a paper entitled Genetic Algorithms are NOT Function Optimizers , have been keen to remind us that GAs are potentially far more than just a robust method for estimating a series of unknown parameters within a model of a physical system. A typical algorithm might consist of the following: 1. Start with a randomly generated population of n l−bit chromosomes (candidate solutions to a problem). 2. Calculate the fitness ƒ(x) of each chromosome x in the population. 3. Repeat the following steps until n offspring have been created: A. Select a pair of parent chromosomes from the current population, the probability of selection being an increasing function of fitness. Selection is done "with replacement," meaning that the same chromosome can be selected more than once to become a parent. B. With probability pc (the "crossover probability" or "crossover rate"), cross over the pair at a randomly chosen point (chosen with uniform probability) to form two offspring. If no crossover takes place, form two offspring that are exact copies of their respective parents. (Note that here the crossover rate is defined to be the probability that two parents will cross over in a single point. There are also "multi−point crossover" versions of the GA in which the crossover rate for a pair of parents is the number of points at which a crossover takes place.) C. Mutate the two offspring at each locus with probability pm (the mutation probability or mutation rate), and place the resulting chromosomes in the new population. If n is odd, one new population member can be discarded at random. 4. Replace the current population with the new population.
82
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
5. Go to step 2. Some of the advantages of a GA include: • Optimizes with continuous or discrete variables, • Doesn’t require derivative information, • Simultaneously searches from a wide sampling of the cost surface, • Deals with a large number of variables, • Is well suited for parallel computers, • Optimizes variables with extremely complex cost surfaces (they can jump out of a local minimum), • Provides a list of optimal values for the variables, not just a single solution, • Codification of the variables so that the optimization is done with the encoded variables, and • Works with numerically generated data, experimental data, or analytical functions.
6.4 Problem Description The purpose of this work was to develop an optimal fuzzy system for automatic control to maintain the aircraft in horizontal flight [23]. The goal was to create the fuzzy system to perform longitudinal control of the aircraft and also to use a simulation facility to test the fuzzy controller with noise. The main goal was to achieve the stability in horizontal flight of the aircraft by controlling only the movement of the elevators.
6.5 PID Control and Fuzzy System for Longitudinal Control If we want to use the longitudinal control we need to use 3 elements, which are: a)
Stick: The lever of the pilot. Moving the control stick backwards (toward the pilot) will rise the nose of the plane, and if push forward there is a lowering of the nose of the plane. b) Angle of attack(α). c) Rate of elevation (q): The speed at which an aircraft climbs. We need the elements above mentioned to perform elevator control. The comparison of the control system was carried out first using the PID controller (see Fig. 6.4) for longitudinal control and then we compared the results obtained with the same plant but using a fuzzy controller that was created and eventually carried out the simulation of the 2 controllers and the comparison of the results of fuzzy control with respect to PID control.
6.5 PID Control and Fuzzy System for Longitudinal Control
83
Fig. 6.4. Simulation Plant with a PID Controller.
The fuzzy system has 3 inputs (stick, angle of attack and rate of elevation) and 1 output (elevators) (see Fig. 6.5).
Fig. 6.5. Structure of the Fuzzy System.
The fuzzy system that we used as a controller has 3 membership functions for each of the inputs and 3 membership functions of the output. We worked with different types of membership functions, such as the Gaussian, Bell, Trapezoidal and Triangular. The rules that we used for the fuzzy system are shown in Fig. 6.6.
84
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
Fig. 6.6. Fuzzy System Rules.
6.6 Simulation Results In this section we present the results obtained when performing the tests using the simulation plant with the PID and Fuzzy controllers. It also presents the results obtained by optimizing the fuzzy system with a genetic algorithm. 6.6.1 Results with PID Controller The first simulation was performed with the PID controller and we obtained the elevators behavior shown in Fig. 6.7. We obtained an average elevator angle of 0.2967.
Fig. 6.7. Elevators Behavior.
6.6 Simulation Results
85
6.6.2 Results with the Fuzzy Controller Once the simulation results with the PID Controller were obtained, we proceeded with our Fuzzy Controller (see Fig. 6.8) using the fuzzy system that was created previously.
Fig. 6.8. Simulation Plant with the Fuzzy Controller.
The simulations were carried out with different types of membership functions and the obtained results are shown in Table 6.1. Table 6.1 Results for simulation plant with a type-1 Fuzzy Controller
Membership functions Errors comparing with PID
Comments
Trapezoidal
Triangular
Gauss
Bell
0 .1094
0.1131
0.1425
0.1222
Fast Simulation
Less Fast Simulation
Slow simulation in comparison with previous
Slow simulation in comparison with previous
86
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
Having obtained the above results, we used a genetic algorithm to optimize the membership functions of the fuzzy system [26] and after implementing the genetic algorithm we obtained the optimized results shown in Table 6.2. The fitness function of the GA is based on the error between the PID and fuzzy controllers as shown in:
(6.1)
Where YPID the output of the PID controller, YFS is the output of fuzzy controller and n is the number of points used in the comparison. Table 6.2 Results for simulation plant with the Fuzzy Controller and Genetic Algorithm
Genetic Algorithm
Error with respect to PID
Using Trapezoidal membership functions
0.0531
Using Gauss membership functions
0.084236395
Using Bell membership functions
0.0554
Using Triangular membership functions
0.0261
Given the above results we can see that better results were obtained using genetic algorithms and in particular the best result was using Membership functions of triangular type. The best fuzzy system that the genetic algorithm produced is shown in Fig. 6.10. The convergence of Genetic Algorithms is shown in Fig 6.9.
6.6 Simulation Results
87
Fig. 6.9. Convergence graph of Genetic Algorithms
As we can appreciate when we used the genetic algorithm the best result that we obtained was when we worked using triangular membership functions because we obtained an error of 0.0261. The best fuzzy system generated by the genetic algorithm is shown in Fig. 6.10.
Fig. 6.10. The best fuzzy system obtained with the GA.
88
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
When we performed the simulation in our plant, we started using square wave form and we obtained the previous results. We also worked with a sine wave form as a reference obtaining the following results (Table 6.3). Table 6.3 Results for simulation plant with a type-1 Fuzzy Controller
Membership functions Errors comparing with PID
Trapezoidal
Triangular
Gauss
Bell
0 .0494
0.0661
0.05
0.0608
Having obtained the above results, we used a genetic algorithm to optimize the membership functions of the fuzzy system and after implementing the genetic algorithm we obtained the results shown in Table 6.4. Table 6.4 Results for simulation plant with Fuzzy Controller and Genetic Algorithm
Genetic Algorithm
Error with respect to PID
Using Trapezoidal membership functions
0.0491
Using Gauss membership functions
0.0237
Using Triangular membership functions
0.0426
Using Bell membership functions
0.004
When we apply the Genetic Algorithm using sine wave in our simulation plant we could observe differences between the simulations (see Fig. 6.11). As we mentioned before we used 4 types of membership functions, such as bell, gauss, trapezoidal and triangular.
6.6 Simulation Results
89
At the time of carrying out the simulation the error was 0.004 using bell membership functions, as we can appreciate this is the better result. The decrease of error is because when we work with sine wave at the time of carrying out the simulation, our plant does not have many problems for the type of waveform and that is because the sine wave is easy to follow(more continues). When we work using square wave we have more complex behavior because this kind of wave is more difficult. To consider a more challenging problem we decided to continue working with square wave and in this form improve our controller.
Fig. 6.11. Convergence graph of Genetic Algorithms
We were also interested in improving the controller by adding noise to the plant. We decided to use Gaussian noise to simulate uncertainty in the control process. The Gaussian Noise Generator block generates discrete-time white Gaussian noise. You must specify the Initial seed vector in the simulation. The Mean Value and the Variance can be either scalars or vectors. If either of these is a scalar, then the block applies the same value to each element of a sample-based output or each column of a frame-based output. Individual elements or columns, respectively, are uncorrelated with each other. When the Variance is a vector, its length must be the
90
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
same as that of the Initial seed vector. In this case, the covariance matrix is a diagonal matrix whose diagonal elements come from the Variance vector. Since the off-diagonal elements are zero, the output Gaussian random variables are uncorrelated. When the Variance is a square matrix, it represents the covariance matrix. Its off-diagonal elements are the correlations between pairs of output Gaussian random variables. In this case, the Variance matrix must be positive definite and it must be N-by-N, where N is the length of the Initial seed. The probability density function of the n-dimensional Gaussian noise is expressed as follows: (6.2)
Where x is a length-n vector, K is the n-by-n covariance matrix, µ is the mean value vector, and the superscript T indicates transpose matrix. The Gaussian Noise Generator block in plant is shown in Fig 6.12.
Fig. 6.12. Simulation Plant with Gaussian Noise.
As we mentioned previously, we worked using Gaussian noise and when you want to work with Gaussian noise you have to specify previously mentioned values as shown in Fig. 6.13.
6.6 Simulation Results
91
Fig. 6.13. Inside of the Gaussian Noise Generator block
The values that we can change are: 1. 2. 3. 4. 5.
6.
7.
8.
Mean value: The mean value of the random variable output. Variance: The covariance among the output random variables. Initial seed: The initial seed value for the random number generator. Sample time: The period of each sample-based vector or each row of a frame-based matrix. Frame-based outputs: Determines whether the output is frame-based or sample-based. This box is active only if the Interpret vector parameters as 1-D are unchecked. Samples per frame: The number of samples in each column of a framebased output signal. This field is active only if the Frame-based outputs are checked. Interpret vector parameters as 1-D: If this box is checked, then the output is a one-dimensional signal. Otherwise, the output is a two-dimensional signal. This box is active only if the Frame-based outputs are unchecked. Output data type: The output can be set to double or single data types.
We started to use 41 in the initial seed, as we obtained the results and we decided to use a higher value of initial seed. When we simulated, we obtain the results shown in Table 6.5.
92
6 Genetic Optimization Design of Type-1 and Type-2 Fuzzy Systems
Table 6.5 Results for simulation plant with Fuzzy Controllers and Gaussian noise (type-2 and type-1 )
Membership functions
Noise Level 84
123
580
1200
2500
5000
Triangular
0.1218
0.1191
0.1228
0.1201
0.1261
0.1511
Trapezoidal
0.1182
0.1171
0.1156
0.1196
0.1268
0.1415
Gauss
0.1374
0.1332
0.1356
0.1373
0.1365
0.1563
Bell Type 2 Triangular
0.119
0.1172
0.1171
0.1203
0.1195
0.1498
0.1623
0.1614
0.1716
0.163
0.1561
0.1115
In this case a type-2 fuzzy system (last row) produces a better result when the noise level is sufficiently high.
6.7 Summary Based on the results obtained with the proposed method we can say that to achieve control of the plane in the Pitch axis, the fuzzy controller is a good alternative to achieve good control of the elevators and maintain the aircraft on the Pitch axis as required. The result that we obtained was better when genetic algorithm optimization with triangular type membership functions was used. It is important to consider different membership functions because the differences can be appreciated and the best result can be selected. When we worked with a higher level of noise in our simulation plant, the type- 2 fuzzy controller achieved a good result and the error was less than the previously obtained with type-1 fuzzy systems. It is important to know that when working with a higher level of noise in most cases the result will be better if type-2 fuzzy systems are used because they can endure more uncertainty than type-1 fuzzy systems.
Chapter 7
Optimizing Type-2 Fuzzy Reactive and Tracking Controllers Using Genetic Algorithms
This chapter describes an evolutionary algorithm approach for the optimization of type-2 fuzzy reactive and tracking controllers applied to the intelligent navigation of a mobile robot. The evolutionary algorithm optimizes the Fuzzy Inference Systems for each of the controllers.
7.1 Introduction In this chapter we consider the optimization of a type-2 fuzzy reactive controller and a type-1 tracking controller for a mobile robot [3]. The reactive behavior will be provided by the type-2 reactive controller and the tracking controller will keep the robot on a desired path. On previous work, we have considered the same problems where we use type-1 fuzzy reactive and tracking controllers, however now we use a Genetic Algorithm to optimize each of the controllers on obtaining the desired responses [3, 47, 48]. These two controllers on future work will be later combined as one system to provide the two essential behaviors for the robot navigation system, tracking and reaction. There are many traditional techniques available to use in control, such as PD, PID and many more but there are also different approaches in the control area, some of these use different areas of soft computing and fuzzy logic that was introduced by Zadeh [84]. Fuzzy logic was also applied in the control area by Mamdani where the concept of FLC (Fuzzy Logic Controller) originated. Later on Zadeh introduced a new type of fuzzy set call “type-2 fuzzy sets”, from where the interval type-2 fuzzy logic area emerged and gain more acceptance on the scientific community, due to its more simplistic evaluation method [42]. It’s also important to mention that the control area is not the only one where the fuzzy concepts are applied but it‘s where the most work has been done [81, 82]. This chapter is organized as follows: In section 2 we describe the mobile robot used in these experiments, section 3 describes the development of the evolutionary method. Section 4 shows the simulation results. Finally, section 5 shows the Conclusions.
O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 93–103. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
94
7 Optimizing Type-2 Fuzzy Reactive and Tracking Controlleers
7.2 Mobile Robot In this section we describ be the particular mobile robot considered in this work [33]. The robot is based on thee description of the Simulation toolbox for mobile robotts, which assumes a wheeleed mobile robot consisting of one or two conventionaal, steered, un-actuated and not-sensed wheels and two conventional, actuated, annd onal wheel chair model). This type of chassis providees sensed wheels (conventio two DOF (degrees of freeedom) locomotion by two actuated conventional nonnsteered wheels and one orr two un-actuated steered wheels. The Robot has two degrees of freedom (DOFs): y-translation and either x-translation or z-rotation, Fig. nfiguration, it will have 2 independent motors located oon 7.1 shows the robots con each side of the robot and d one castor wheel for support located at the form of thhe robot.
Fig. 7.1.. Kinematic coordinate system assignments.
The kinematic equation ns of the mobile robot are as follows: (7.1) 1
1
Eq. 7.1 describes the seensed forward velocity solution 1 1 Eq. 7.2: describes the Actuated A Inverse Velocity Solution Where under the Metricc system, the variables are defined as follows ,
Translational velocities v [ ],
Robot z-rotational velocity v [ ,
],
Wheel rotatio onal velocities [
],
(7.22)
7.3 Evolutionary Method Description
95
Actuated wheel radius[m], , Distances of wheels from robot's axes [m].
7.3 Evolutionary Method Description In this section we describe the Genetic Algorithm (GA) applied to each of our problem, of finding the best type-2 fuzzy reactive controller and tracking controller for a mobile robot. 7.3.1 Type-2 Reactive Controller The function of the reactive control is to give to some extent the same ability that we apply when we are driving, that is to react to unexpected situations, traffic jams, stop lights, etc, in a more basic concept, to the problem that is the navigation of the robot. The FIS that we are optimizing is an interval Mamdani type-2 fuzzy system, consisting of 3 inputs, that are the distances obtained by the robots sensors described on section 2, and 2 outputs that control the velocity of the servo motors on the robot, all this information is encoded on each chromosome. 7.3.2 Type-1 Tracking Controller The function of the path tracking control is to put the robot on its path and maintain the robot on the correct path, and it will do this by keeping the error (Δ℮p, Δθ), which represents the error relative to the position and the error relative to the orientation of the front of the robot to a minimum value, the FIS is a Mamdami type FIS and consists of 2 inputs that are (Δ℮p, Δθ) and 2 outputs that control the velocity of the servo motors on the robot (Fig. 7.2), all this information is encoded on each chromosome.
Fig. 7.2. Fuzzy controller inputs ℮p, ℮θ
96
7 Optimizing Type-2 Fuzzy Reactive and Tracking Controllers
7.3.3 Genetic Algorithm The purpose of using an evolutionary method is to find the best controllers possible and this can be obtained using the GA, as it searches along the result space, combining the attributes from the best controllers in generating new ones, this concept taken from the building block theory [25, 26]. For obtaining a forward moving behavior response out off a reactive control. We want to optimize the parameters in the Membership Function but also the number of Membership functions and this means that we will also optimize the number of rules making this a multi objective problem. For this we will take advantage of the HGA (Hierarchical Genetic Algorithm) intrinsic characteristic to solve multi objective problems. Now let us state the main goal of the HGA. The main objective is to optimize on each controller the following: Reactive Type-2 Controller o o o
Fine tune the Interval Type -2 Fuzzy Memberships Optimize the FIS if then fuzzy rules Power Usage
Tracking Type-1 Controller o o
Fine tune Memberships Functions Optimize the FIS if then fuzzy rules
In Fig. 7.3, we show the global cycle process of the GA, under the Evaluation of each individual, in which we are going to measure the effectiveness of each of the controllers (FIS (Fuzzy Inference System)) represented by each Individual chromosome, in our test area, that will take place in a unknown environment (Maze) for the reactive controller and a closed environment for the tracking.
Fig. 7.3. Genetic Algorithm process
7.3 Evolutionary Method Description
97
7.3.4 Objectives A)
Reactive Controller
The objective is to guide the robot through the maze avoiding any collision. It’s not our objective to optimize the robot to find the maze exit, we use a maze to optimize the reactive control because of the characteristic it offers to the simulation, i.e. it is a closed space where the robot cannot easily wonder off and each wall is considered an obstacle to the robot that it must avoid while it moves around. B) Tracking Controller The objective is to put the robot on its path and maintain the robot on the correct path. 7.3.5 Genetic Algorithm Process The robot simulation will come to a stop when any of the following 3 action occurs: 1. 2. 3.
Finds the exit. Simulation time expires; this is global parameter we establish before each GA cycle. Hits an obstacle: any collision will cause the simulation to stop.
7.3.6 Chromosome Encoding Each individual on the population will represent a controller, each of which will be encoded on a vectorial structure that will have “n” main sections, one for each variable (input and output). Each main section will contain 2 subsections (control genes, Connection genes). Reactive Controller The controller will have 3 input variables and 2 output variables, the 3 inputs correspond to each of the ultrasonic sensors the robot has, and the 2 inputs represent the velocity that will be sent to each of the 2 servomotors on the robot. Fig. 7.1 shows the location of the servomotors and sensor. The control genes consist of 5 bit vectors, this will indicate which fuzzy membership is or not active, the connection genes are divided in 5 subsections, 5 is the maximum number of membership allow per variable, each of which can be trapezoidal or triangular interval type-2 membership function, and each of this subsection is divided in to 2 sections one that indicates the type of the membership function and the other the parameters for the function that is divided in 2 sections the upper and lower part of each membership function. Figure 7.4 shows the chromosome structure.
98
7 Optimizing Type-2 Fuzzy Reactive and Tracking Controllers
Fig. 7.4. Reactive Controller Chromosome Architecture
Tracking Controller The controller will have 2 input variables and 2 output variables, the 2 inputs correspond to (Δ℮p, Δθ), which represents the error relative to the position and the error relative to the orientation of the front of the robot, and the 2 inputs represent the velocity that will be sent to each of the 2 servomotors on the robot. The control genes consist of 5 bit vectors, this will indicate which fuzzy membership is or not active, the connection genes are divided in 5 subsections, 5 is the maximum number of membership allowed per variable, each of which can be trapezoidal or triangular, and each of these subsections is divided in to 2 sections one that indicates the type of the membership function and the other the parameters for the function. Figure 7.5 shows the chromosome structure.
Fig. 7.5. Tracking Controller Chromosome Architecture
7.3.7 Fuzzy Rules The rules population is a different and separated population for each controller with respect to the control population, this is because the optimization procedure is totally different, but they are tightly related because the number of active rules
7.3 Evolutionary Method Description
99
depends on the number of active membership functions. In order to optimize the fuzzy rules we have a population off all the possible subsets keeping one restriction that the number of active membership function must be the same. With equation 3 we obtain the size of the fuzzy rules population, where m,n,p represent the maximum number of membership functions we allow for the input variables, and k is the maximum number of membership function for the output variables, in our case (m=n=p=k=5) Equation 7.3 gives a total of 625 fuzzy rules subsets. (7.3) In this case, we will only have one active subset that can match the fuzzy controller that has the following membership functions active, , , , , , Where a, b, c are the number of active membership functions for the input variables and d,e for the output variable, and we use a index table for each of the fuzzy subsets, see Table 7.1. Table 7.1 Rules Index Table.
, , , ,
Input Input Input Output Output 01 02 03 01 02 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 2 2 2 1 1 3 1 1 2 1 3 2 2 1
A Special mutation operator is applied (Equation 7.4) to find the optimal fuzzy rule set for the reactive controller, the shift operation that is use, changes the consequent part of the rule. , , , ,
, , ,
∆ ,
∆
(7.4)
is the consequent of the rule that has i, j, q, r, s. active Where , , , , membership functions, ∆ , ∆ represent our shift operator, with a probability of 0.01. 7.3.8 Objective Function The GA will be generating individuals that will need to be evaluated and assigned a crisp value that will represent the robot’s performance on each of the criteria that we want to improve. For this, we need to provide the GA with a good evaluation scheme that will penalize unwanted behaviors and reward with higher fitness
100
7 Optimizing Type-2 Fuzzy Reactive and Tracking Controllers
values those individuals that provide the performance we are looking for in our controller. Reactive Controller The criteria to measure the FIS global performance will take into consideration the following. o o o
Covered Distance Time used to cover the distance Battery life.
For this, we have decided to measure the robot´s performance with a Fitness FIS and a Neural Network (NN), where we have added simple rules that reward individuals depending on their covered distance, the time it took to cover the distance and the remaining battery life at the end of the run, and training a NN to detect cycle trajectories that don’t have the desire fordwardmoving behaviour on the reactive controller (see Fig. 7.6).
Fig. 7.6. Fitness Function Reactive Controller
The NN has two inputs and one output, and 2 hidden layers, with this module integrated in our evaluation method, the fitness for each individual is calculated with Equation 7.5. , ,
0.35 0.35
Where: Fitness value of the i-th individual, Crisp value out of the fitness FIS, Looping trajectory activation value.
(7.5)
7.4 Simulation Results
101
Tracking Controller We will measure the FIS performance, on the RMSE, of the error of the position along all the robot trajectories against the desired path, this will let us measure the goodness of the tracking control.
7.4 Simulation Results 7.4.1 Reactive Controller Fig. 7.7 and Fig. 7.8, and Table 7.2 show the simulation results obtained with the GA for the optimization of the fuzzy type-2 reactive controller.
Fig. 7.7. Reactive Results.
102
7 Optimizing Type-2 Fuzzy Reactive and Tracking Controllers
Fig. 7.8. Reactive Results. Table 7.2 Reactive Results Table. Membership Chromosome Control Genes Representation Population Size No. of Offspring Crossover Crossover Rate Mutation Mutation Rate GA Parameters Generation Selection Results Rank
Binary
One Point 1.0 Bit Mutation 0.02
Connections Genes Real Number 20 2 One Point 1.0 Random Mutation 0.02
Fuzzy Rule Chromosome Integer
Shift index operation
8000 Roulette Wheel with Ranking Fitness
Active Rules
1
0.3607
Active FM’s (S1+S2+S3+M1+M2) (3+3+4+4+4)=18
2
0.3304
(3+3+4+4+4)=18
36
3
0.3300
(3+4+3+3+3)=16
36
4 5
0.3300 0.3299
(3+4+3+3+3)=16 (5+3+3+2+2)=15
36 45
6
0.3299
(5+3+3+2+2)=15
45
7
0.3226
(3+4+3+3+3)=16
36
8
0.3179
(5+3+3+2+2)=15
45
9
0.3143
(2+2+2+4+4)=14
8
36
7.5 Summary
103
7.4.2 Tracking Controller Fig. 7.9 shows some of the initial simulation results obtained with the proposed tracking controller.
Fig. 7.9. Tracking Controller Results
7.5 Summary The problem of optimizing a type-2 reactive controller with a GA it’s of munch greater complexity one reason for this is that we have a bigger solution space to handle, when optimization the membership functions double the number of parameters, while still maintaining the complexity of optimizing the if-then rules. As future work, we will consider combining both the reactive and tracking controllers with a type-2 fuzzy system that we expect will improve overall performance of the robot navigation.
Chapter 8
A Hybrid PSO-GA Optimization Method to Design Type-1 and Type-2 Fuzzy Logic Controllers
In this chapter we propose the use of a hybrid PSO-GA optimization method for automatic design of fuzzy logic controllers (FLC) to minimize the steady state error of a plant's response. We test the optimal FLC obtained by the hybrid PSO-GA method applied on linear systems using benchmark plants [49]. The bio-inspired and the evolutionary methods are used to find the parameters of the membership functions of the FLC to obtain the optimal controller [50]. Simulation results are obtained with Simulink showing the feasibility of the proposed approach. A comparison is also made among the proposed Hybrid PSO-GA, GA and PSO to determine if there is a significant difference in the results [49, 50].
8.1 Introduction Optimization is a term used to refer to a branch of computational science concerned with finding the “best” solution to a problem [4, 25]. Here, “best” refers to an acceptable (or satisfactory) solution, which may be the absolute best over a set of candidate solutions, or any of the candidate solutions. The characteristics and requirements of the problem determine whether the overall best solution can be found. Optimization algorithms are search methods, where the goal is to find a solution to an optimization problem, such that a given quantity is optimized, possibly subject to a set of constraints. Some optimization methods are based on populations of solutions. Unlike the classic methods of improvement for trajectory tracking, in this case each iteration of the algorithm has a set of solutions. These methods are based on generating, selecting, combining and replacing a set of solutions. Since they maintain and they manipulate a set, instead of a unique solution throughout the entire search process, they use more computer time than other metaheuristic methods [4]. This fact can be aggravated because the “convergence” of the population requires a great number of iterations. For this reason a concerted effort has been dedicated to obtaining methods that are more aggressive and manage to obtain solutions of quality in a nearer horizon. This chapter is concerned with bio-inspired optimization methods where a hybrid PSO-GA is proposed. In this case, we combine each method in order to obtain the best feature to design an optimal fuzzy controller (FLC) applied for linear O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 105–118. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
106
8 A Hybrid PSO-GA Optimization Method to Design
systems. We expect better results from the hybrid PSO-GA method than those traditional methods like GA and PSO. Also we compare the proposed method with genetic algorithms and particle swarm optimization used separately. The bioinspired methods are used to find the parameters of the membership functions to obtain the optimal FLC to stabilize the plant. Related work: Up to date there are several research papers using genetic algorithms and particle swarm optimization for different optimization problems like mathematical functions, fuzzy controllers, control parameters, the vehicle trajectories, scheduling problems and many more [40, 41, 47, 48, 45, 60, 62, 64, 78, 82]. However, in this paper we used the hybrid PSO-GA to generate an optimal fuzzy logic controller finding the best parameters of the membership functions to control stable and unstable linear systems and this is the difference between our method and the methods of the following authors. This chapter is organized as follows: Section 2 presents the theoretical basis and problem statement. Section 3 introduces the controller design where a Hybrid PSO-GA is used to select the parameters of the membership functions of the FLC, GA and PSO are also applied for comparison purposes. Robustness properties of the closed-loop system are achieved with a fuzzy logic control system using a Takagi-Sugeno model where the error and the change of error, are considered as the linguistic variables. Section 4 provides a simulation study of linear systems using the controller described in Section 3. Finally, Section 5 presents the conclusions.
8.2 Theoretical Basis and Problem Statement 8.2.1 Particle Swarm Optimization (PSO) PSO is a population based stochastic optimization technique developed by Eberhart and Kennedy in 1995, inspired by social behavior of bird flocking or fish schooling [50]. PSO shares many similarities with evolutionary computation techniques such as Genetic Algorithms (GA). The system is initialized with a population of random solutions and searches for optima by updating generations. However, unlike the GA, the PSO has no evolution operators such as crossover and mutation. In the PSO, the potential solutions, called particles, fly through the problem space by following the current optimum particles. Each particle keeps track of its coordinates in the problem space, which are associated with the best solution (fitness) it has achieved so far (The fitness value is also stored). This value is called pbest. Another "best" value that is tracked by the particle swarm optimizer is the best value, obtained so far by any particle in the neighbors of the particle. This location is called lbest. When a particle takes all the population as its topological neighbors, the best value is a global best and is called gbest. The particle swarm optimization concept consists of, at each time step, changing the velocity of (accelerating) each particle toward its pbest and lbest
8.2 Theoretical Basis and Problem Statement
107
locations (local version of PSO). Acceleration is weighted by a random term, with separate random numbers being generated for acceleration toward pbest and lbest locations. In the past several years, PSO has been successfully applied in many research and application areas. It is demonstrated that PSO gets better results in a faster, cheaper way compared with other methods. Another reason that PSO is attractive is that there are few parameters to adjust. One version, with slight variations, works well in a wide variety of applications. Particle swarm optimization has been used for approaches that can be used across a wide range of applications, as well as for specific applications focused on a specific requirement. 8.2.2 Genetic Algorithms (GA) Genetic Algorithms (GAs) are adaptive heuristic search algorithms based on the evolutionary ideas of natural selection and genetic processes [25, 26]. The basic principles of GAs were first proposed by John Holland in 1975, inspired by the mechanism of natural selection where stronger individuals are likely the winners in a competing environment. GA assumes that the potential solution of any problem is an individual and can be represented by a set of parameters. These parameters are regarded as the genes of a chromosome and can be structured by a string of values in binary form. A positive value, generally know as a fitness value, is used to reflect the degree of "goodness" of the chromosome for the problem which would be highly related with its objective value [49]. The GA works as follows: 1. 2. 3.
4. 5.
Start with a randomly generated population of n chromosomes (candidate solutions to a problem). Calculate the fitness of each chromosome in the population. Repeat the following steps until n offspring have been created: a. Select a pair of parent chromosomes from the current population, the probability of selection being an increasing function of fitness. Selection is done with replacement, meaning that the same chromosome can be selected more than once to become a parent. b. With probability (crossover rate), perform crossover to the pair at a randomly chosen point to a form two offspring. c. Mutate the two offspring at each locus with probability (mutation rate), and place the resulting chromosomes in the new population. Replace the current population with the new population. Go to step 2.
The simple procedure just described above is the basis for most applications of GAs.
108
8 A Hybrid PSO-GA Optimization Method to Design
8.2.3 Hybrid PSO-GA We propose a hybrid method using particle swarm optimization and genetic algorithms to find an optimal FLC to control the plants. The hybrid method uses the same population/swarm in the two methods in the same iteration obtaining the best individual/particle. PSO and GA communicate with each other; every four iterations the best individual/particle is injected into the population of the worst method and vice versa. We used the maximum number of iteration/generations to stop the method keeping only the best FLC obtained. The proposed method works as follows: Start with a randomly generated particles/population (candidate solutions to a problem). 2. Assign to the variables S and Chrom the particles/population generated. 3. Repeat the following steps until max number of iteration/generations 3.1 Start PSO method. 3.1.1 For each particle do. 3.1.1.1 Calculate fitness value. 3.1.1.2 If the fitness value is better than the best fitness value (pBest) in history then, set the current value as the new pBest. 3.1.1.3 Choose the particle with the best fitness value of all particles as the gBest. 3.1.1.4 Update all particle velocities. 3.1.1.5 Update all particle positions. 3.1.1.6 Until "n" particles. 3.1.1.7 Save the best particle information in variable BM 3.2 Terminate PSO. 3.3 Start GA method. 3.3.1Calculate the fitness of each chromosome in the population. 3.3.2 Repeat the following steps until n offspring have been created: 3.3.2.1 Select a pair of parent chromosomes from the current population, the probability of selection being an increasing function of fitness. Selection is done with replacement, meaning that the same chromosome can be selected more than once to become a parent. 3.3.2.2 With probability (crossover rate), perform crossover to the pair at a randomly chosen point to a form two offspring. 3.3.2.3 Mutate the two offspring at each locus with probability (mutation rate), and place the resulting chromosomes in the new population. 3.3.3 Replace the current population with the new population. 3.3.4 Go to step 5. 3.3.5 Save the best individual information in variable BM 3.4 Terminate GA. 1.
8.3 Fuzzy Logic Control Design
109
4. if counter = 4 4.1 Obtain the minimum result of the BM variable 4.2 if minimum value was obtained by PSO method then 4.3 reinsert the information of the particle in the GA population (Chrom) 4.3 else 4.4 reinsert the information of the best individual of GA in the Swarm of the PSO 5. Terminate the validation. 6. Terminate the Hybrid method until Maximum number of iterations/generations. The procedure described above is used to find an optimal fuzzy logic controller combining the PSO and GA to exploit more completely the space of solutions. 8.2.4 Problem Statement To test the optimized FLCs obtained with the bio-inspired methods; we used two different linear systems. We consider two benchmark problems called Plant 1 and Plant 2 with different levels of complexity [50]. Plant 1 is given by the stable second order transfer function:
w2n ε = 0.5, wn = 2 s 2 + 2ε wn s + wn2 where wn is the natural frequency and ε is the coefficient damping. g (s) =
(8.1)
Plant 2 is given by the following transfer function:
g ( s) =
1 2 s +4
(8.2)
8.3 Fuzzy Logic Control Design In this section we design a fuzzy logic controller (FLC) where the optimal controller was found using the proposed hybrid PSO-GA, GAs and the PSO. For the FLC a Takagi-Sugeno type of fuzzy system is used with two inputs a) error, and b) error change, with three membership functions for each input, “Negative, Zero and Positive” (Gaussian and triangular), and one output, defined with constant values. Fig 8.1 shows the FLC membership functions for the plant control and Table 8.1 shows the Fuzzy Rules.
110
8 A Hybrid PSO-GA Optimization Method to Design
Table 8.1. Fuzzy rules of the FLC
Negative Zero Fig. 8.1. Gaussian and Triangular membership Positive functions.
Negative N N Z
Zero N Z P
Positive Z P P
Once we obtained the FLC design, we set the parameters of both methods: the GA chromosome has 17 genes of real values that represent the two inputs, error and error change and one output constant values and using different values in the genetic operator’s; mutation and single point crossover. We use different values for the cognitive, social parameters of the PSO and inertial value to balance the swarm. For the hybrid PSO-GA method we apply the same parameter configuration used in GA and PSO. The three bio-inspired methods use the same space of solutions (population) that we use to find the optimal values of the parameters of the membership functions. Table 8.2 shows the parameters of the membership functions, the minimal and the maximum values in the search range for the Hybrid PSO-GA, GA and PSO to find the best fuzzy controller system for the linear plants. Table 8.2. Parameters of the Membership Functions
Plant 1 MF Type Gauss Triang Gauss
Point a b a b c a b
Min Value 0.3 -1.2 -0.8 0 0.3 0.3 0.8
Max Value 0.6 -0.8 -0.3 0 0.8 0.6 1.2
Plant 2 MF Type Gauss Triang Gauss
Point a b a b c a b
Min Value 1.8 -6 -3 0 0.5 1.8 4
Max Value 2.8 -4 -0.5 0 3 2.8 6
8.4 Simulation Results 8.4.1 Plant 1 Using the Hybrid PSO-GA Method Table 8.3 presents the main results of the FLC obtained with the hybrid PSO-GA method showing in the first row the best result.
8.4 Simulation Results
111
Table 8.3. Results of the FLC Obtained by Hybrid PSO-GA for Plant 1.
No. 1 2 3 4 5 6 7 8 9 10
Swarm/ Iter./ Pop. Gener. 70 200 200 200 200 200 200 200 200 150
200 70 70 70 70 70 70 70 70 80
C1
C2
0.2706 0.178 0.8963 0.4743 0.4587 0.178 0.5159 0.5279 0.6608 0.7293
0.0403 0.4863 0.3534 0.5077 0.6339 0.4863 0.0732 0.5336 0.1696 0.1387
Inertia Cross. Mut. 0.3254 0.5381 0.6738 0.5163 0.1024 0.5381 0.1455 0.6763 0.8927 0.8532
0.7 0.5 0.7 0.6 0.5 0.6 0.5 0.7 0.8 0.7
Time Exec.
Average error.
0.2 1:46:07 0.10956 0.2 1:20:14 0.11375 0.1 1:18:21 0.11517 0.2 1:28:50 0.11559 0.5 1:42:23 0.11584 0.1 1:23:22 0.11595 0.2 1:36:49 0.11616 0.4 1:25:52 0.11785 0.3 1:29:15 0.11833 0.1 1:15:23 0.11971
Fig 8.2a shows the membership functions of input 1 and input 2 of the optimal FLC and Fig 8.2b shows the particles behavior of the Hybrid PSO-GA giving the best FLC to control the plant 1. Fig 8.2c shows the control result of plant 1 using the optimized FLC obtained with the Hybrid PSO-GA. (a)
(b)
(c)
Fig. 8.2. (a) Input 1 and input 2 membership functions of the optimized FLC; (b) behavior of hybrid PSO-GA for plant 1, and (c) closed-loop response of plant 1 with the optimized FLC.
112
8 A Hybrid PSO-GA Optimization Method to Design
8.4.2 Plant 2 Using the Hybrid PSO-GA Method Table 8.4 presents the main results of the FLC obtained with the hybrid PSO-GA method showing in the second row the best result. Table 8.4 Results of the FLC Obtained by Hybrid PSO-GA for Plant 2. Time exec.
Average error.
No.
Swarm/ Pop.
Iteration / Generation
C1
C2
Inertia
1
200
70
0.05
0.05
1
0.5
0.2
0.045568 1:10:15
2 3 4 5
200 150 80 100
70 80 120 150
1 1 1 0.5171 0.521 0.8254 0.7372 0.816 0.7541 0.6608 0.1696 0.8976
0.5 0.7 0.5 0.5
0.1 0.1 0.2 0.2
0.045656 0.04605 0.046147 0.046674
0:50:02 1:11:57 1:00:36 1:41:48
6 7 8 9 10
200 120 200 200 200
70 70 70 70 70
0.5 0.5 1 0.8149 0.9059 0.1706 0.15 0.15 1 0.005 0.005 1 0.25 0.25 1
0.5 0.5 0.5 0.6 0.7
0.1 0.1 0.2 0.2 0.1
0.046756 0.050639 0.05402 0.054236 0.054476
0:52:53 0:53:02 1:07:10 1:05:40 1:53:35
Cross.
Mut.
Fig 8.3a shows the membership functions of input 1 and input 2 of the optimal FLC and Fig 8.3b shows the particles behavior of the Hybrid PSO-GA giving the best FLC to control the plant 2. Fig 8.3c shows the control result of plant 2 using the optimized FLC obtained with the Hybrid PSO-GA. (a)
(b)
(c)
Fig. 8.3. (a) Input 1 and input 2 membership functions of the optimized FLC; (b) particles behavior of hybrid PSO-GA for plant 2, and (c) closed-loop response of plant 2 with the optimized FLC.
8.4 Simulation Results
113
8.4.3 Plant 1 Using the GA Table 8.5 presents the main results of the FLC obtained with genetic algorithms showing in the ninth row the best result. Table 8.5. Results of the Type-1 FLC Obtained by genetic algorithms.
No
Indiv
Gen
Cross
Mut
1 2 3 4 5 6 7 8 9 10
90 120 90 90 50 40 45 70 150 20
75 70 75 35 45 25 30 45 80 15
0.5 0.5 0.5 0.5 0.7 0.7 0.6 0.5 0.7 0.8
0.2 0.1 0.2 0.2 0.1 0.4 0.2 0.1 0.1 0.3
GA Time 0:19:48 0:23:36 0:20:25 0:09:10 0:06:45 0:03:00 0:04:03 0:10:08 0:33:25 0:00:54
Average error 0.03667 0.04236 0.07037 0.07081 0.07682 0.08112 0.08260 0.08757 0.08868 0.09151
Fig. 8.4a shows the membership functions of input 1 and input 2 of the optimal FLC and Fig 8.4b shows the evolution of the genetic algorithm giving the best FLC to control the plant 1. Fig. 8.4c shows the control result of plant 1 using the optimized FLC obtained with the GA. (a)
(b)
(c)
Fig. 8.4. (a) Input 1 and input 2 membership functions of the optimized FLC; (b) evolution of the GA for plant 1, and (c) closed-loop response of plant 1 with the optimized FLC.
114
8 A Hybrid PSO-GA Optimization Method to Design
8.4.4 Plant 1 Using PSO Table 8.6 presents the main results of the FLC obtained with the PSO method showing in the first row the best result. Table 8.6. Results of the FLC Obtained by PSO No. 1 2 3 4 5 6 7 8 9 10
Swarm (Pop.) 200 200 200 200 200 200 200 200 200 200
Max Iteration 70 70 70 70 70 70 70 70 70 70
C1
C2
Inertia
0.4542 0.9667 0.183 0.6798 0.0016 0.484 0.7046 0.1344 0.1223 0.1589
0.5052 0.3883 0.8722 0.7371 0.8994 0.704 0.9151 0.3959 0.5346 0.0366
0.9038 0.8501 0.9289 0.6119 0.6983 0.7194 0.9988 0.2534 0.0681 0.6223
Time exec 0:26:26 0:44:46 0:09:23 0:54:22 0:45:59 0:49:16 0:05:59 0:58:29 0:57:48 1:04:45
Average error 0.081179 0.086795 0.087324 0.089289 0.090177 0.092952 0.095280 0.096134 0.103938 0.109765
Fig 8.5a shows the membership functions of input 1 and input 2 of the optimal FLC and Fig 8.5b shows the particles behavior of the PSO giving the best FLC to control the plant 1. Fig 8.5c shows the control result of plant 1 using the optimized FLC obtained with the PSO. (a)
(b)
(c)
Fig. 8.5. (a) Input 1 and input 2 membership functions of the optimized FLC; (b) particles behavior of the PSO for plant 1, and (c) closed-loop response of plant 1 with the optimized FLC.
8.4 Simulation Results
115
8.4.5 Plant 2 Using GA Table 8.7 presents the main results of the FLC obtained with the genetic algorithms showing in the seventh row the best result. Table 8.7. Results of the FLC Obtained by Genetic algorithms for Plant 2.
No.
Indiv.
Gen.
1 2 3 4 5 6 7 8 9 10
120 70 150 90 90 90 45 40 50 20
70 45 80 35 75 75 30 25 45 15
% Remp 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7
Cross 0.5 0.5 0.7 0.5 0.5 0.5 0.6 0.7 0.7 0.8
Mut. 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.4 0.1 0.3
Time Exec. 0:22:30 0:10:42 0:31:09 0:10:43 0:23:01 0:17:57 0:04:32 0:03:17 0:07:51 0:01:02
Average error 0.10676 0.10681 0.10723 0.10918 0.10935 0.10969 0.11193 0.11784 0.11831 0.12315
Fig 8.6a shows the membership functions of input 1 and input 2 of the optimal FLC and Fig 8.6b shows the evolution of the GA giving the best FLC to control the plant 2. Fig 8.6c shows the control result of plant 2 using the optimized FLC obtained with the GA. (a)
(b)
(c)
Fig. 8.6. (a) Input 1 and input 2 membership functions of the optimized FLC; (b) evolution of the GA for plant 2, and (c) closed-loop response of plant 2 with the optimized FLC.
116
8 A Hybrid PSO-GA Optimization Method to Design
8.4.6 Plant 2 Using PSO Table 8.8 presents the main results obtained with the PSO method of Plant 2 showing in the first row the best result. Table 8.8. Results of the FLC Obtained by PSO for Plant 2.
No. 1 2 3 4 5 6 7 8 9 10
Swarm (Pop.) 200 200 200 200 200 200 200 200 200 200
Max Iteration 70 70 70 70 70 70 70 70 70 70
C1
C2
Inertia
0.0429 0.7580 0.7488 0.8149 0.0660 0.8660 0.5543 0.7154 0.0158 0.4458
0.6746 0.1716 0.0884 0.9059 0.7696 0.1036 0.6067 0.2479 0.0882 0.9566
0.8477 0.5573 0.9051 0.1706 0.5558 0.5554 0.4974 0.5130 0.2155 0.3233
Time exec 0:34:32 0:49:17 0:39:05 0:49:38 0:44:32 1:05:25 0:50:25 0:55:45 1:02:43 0:51:22
Average error 0.131933 0.136293 0.141524 0.148655 0.150427 0.151731 0.152046 0.154302 0.160239 0.164745
Fig 8.7a shows the membership functions of input 1 and input 2 of the optimal FLC and Fig 8.7b shows the particles behavior of the PSO giving the best FLC to control the plant 2. Fig 8.7c shows the control result of plant 2 using the optimized FLC obtained with the PSO. (a)
(b)
(c)
Fig. 8.7. (a) Input 1 and input 2 membership functions of the optimized FLC; (b) particles behavior of PSO for plant 2, and (c) closed-loop response of plant 2 with the optimized FLC.
8.4 Simulation Results
117
8.4.7 Comparison Results of the Optimization Methods Table 8.9 presents the comparison results of the Best FLC obtained with the GA, PSO and the hybrid PSO-GA method applied to the plant 1 and plant 2. Table 8.9. Comparison of the average error obtained by the optimization methods.
Plant 1 No.
Method
Time exec.
Average error.
1
GA
0:33:25
0.088680
2
PSO
0:26:26
0.081179
3
Hybrid PSO-GA
1:46:07
0.109560
No.
Method
Time exec.
Average error.
1
GA
0:04:32
0.111930
2
PSO
0:34:32
0.131933
3
Hybrid PSO-GA
0:50:02
0.045656
Plant 2
In Table 8.9 we show the comparison of the optimization methods and we can observe a significant difference in the results obtained by hybrid PSO-GA with respect to the GA and PSO results obtained separately in plant 2 which is more complex to solve. We apply a t-Student test using the Minitab 15.1 to compare the proposed method with each GA and PSO individually for Plant 1 and Plant 2. Table 8.10 shows the t-Student test for the comparison of the GA and PSO with the hybrid PSO-GA for Plant 1 and Plant 2. Table 8.10. Result of the t-Student test applied to Hybrid PSO-GA.
Mean
StDev
SE Mean
10
0.07290
0.01900
0.00600
10
0.11579
0.00278
0.00088
PSO Hybrid PSO-GA
10
0.09328
0.00848
0.00270
10
0.11579
0.00278
0.00088
GA Hybrid PSO-GA
10
0.11261
0.00575
0.00190
10
0.04941
0.00391
0.00130
10
0.14920
0.01020
0.00320
10
0.04902
0.00388
0.00120
N
Plant 1
Plant 2
GA Hybrid PSO-GA
PSO Hybrid PSO-GA
Estimate for difference -0.04294
95% CI for difference -0.05667
T-Value -7.08
-0.02921 -0.02251
-0.02880
-7.98
-0.01622 -0.06320
-0.05823
27.26
-0.06818 -0.10017
-0.09260 -0.10774
29.12
118
8 A Hybrid PSO-GA Optimization Method to Design
Since the t-Value is sufficiently high, we can conclude that there exists sufficient statistical evidence to say that the hybrid PSO-GA is better than GA and PSO for Plant 2. In the case of Plant 1, we obtain better results with the GA and PSO because the problem is not sufficiently complex.
8.5 Summary We described in this chapter the application of bio-inspired methods to design optimized fuzzy logic controllers using genetic algorithms, particle swarm optimization and a hybrid PSO-GA method. To test these optimized FLCs we use different plants. In particular we presented results of a genetic algorithm, PSO and a hybrid PSO-GA, using two benchmark problems with different level of complexity. The main result shows that the optimal FLC gets stability in less than 10 seconds. On the other hand, the FLCs obtained by PSO are better than the FLC’s obtained by the GA because the PSO is less time consuming in the process and achieves lower overshoot in one of the plants, the plots of the results shows this difference. However the results obtained by the hybrid method show the best result in plant 2 with respect to the other two methods; based in this fact we feel that the hybrid method will obtain better results when used in more complex problems. The t-Student test applied to the hybrid PSO-GA with respect to the GA and PSO for the Plant 2, shows that there exists sufficient statistical evidence to confirm a significant difference in the results with a 95% of confidence. We have achieved satisfactory results with the GA, PSO and the hybrid PSOGA; the next step is to solve the problem using Type-2 FLC in a perturbed environment and considering multiple objective optimization to obtain better results. Moreover, in the future we will extend the results for nonlinear systems.
Chapter 9
Evolutionary Optimization of Interval Type-2 Fuzzy Systems Using the Human Evolutionary Model
Uncertainty is an inherent part in controllers used for real-world applications [53]. The use of new methods for handling incomplete information is of fundamental importance in engineering applications [13]. We simulated the effects of uncertainty produced by the instrumentation elements in type-1 and type-2 fuzzy logic controllers to perform a comparative analysis of the systems’ response, in the presence of uncertainty [68]. We are presenting an innovative idea to optimize interval type-2 membership functions using an average of two type-1 systems with the Human Evolutionary Model [16]; we are showing comparative results of the optimized proposed method. We found that the optimized membership functions for the inputs of a type-2 system increases the performance of the system for high noise levels [69].
9.1 Introduction Uncertainty affects decision-making and appears in a number of different forms. The concept of information is fully connected with the concept of uncertainty. The most fundamental aspect of this connection is that the uncertainty involved in any problem-solving situation is a result of some information deficiency, which may be incomplete, imprecise, fragmentary, not fully reliable, vague, contradictory, or deficient in some other way [69]. The general framework of fuzzy reasoning allows handling much of this uncertainty; fuzzy systems employ type-1 fuzzy sets, which represent uncertainty by numbers in the range [0, 1]. When something is uncertain, like a measurement, it is difficult to determine its exact value, and of course, type-1 fuzzy sets makes more sense than using crisp sets [13]. However, it is not reasonable to use an accurate membership function for something uncertain, so in this case what we need is another type of fuzzy sets, those which are able to handle these uncertainties, the so called type-2 fuzzy sets. So, the amount of uncertainty in a system can be reduced by using type-2 fuzzy logic because it offers better capabilities to handle linguistic uncertainties by modeling vagueness and unreliability of information. In industry, type-2 fuzzy logic and neural networks has been used in the control of non-linear dynamic plants [3, 14, 28, 30, 32, 34, 35, 51, 55]. O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 119–131. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
120
9 Evolutionary Optimization of Interval Type-2 Fuzzy Systems
This chapter deals with the optimization of interval type-2 membership functions in a fuzzy logic controller (FLC). Since, uncertainty is inherent in controllers for real world applications, as a first step, we are presenting how to deal with it using type-2 FLC to diminish the effects of imprecise information. We are supporting this statement with experimental results, qualitative observations, and quantitative measures of errors. For quantifying the errors, we utilized three widely used performance criteria, these are: Integral of Square Error (ISE), Integral of the Absolute value of the Error (IAE), and Integral of the Time multiplied by the Absolute value of the Error (ITAE). Then as a second step, we optimized the parameters of the Gaussian membership functions (MFs) using the Human Evolutionary Model (HEM) which will be explained in section 9.3, and ISE as the fitness function. In this case, we used as an output, the average of two type-1 system.
9.2 Fuzzy Controllers A FLS, described completely in terms of type-1 fuzzy sets is called a type-1 fuzzy logic system (type-1 FLS). It is composed by a knowledge base that comprises the information given by the process operator in form of linguistic control rules; a fuzzification interface, who has the effect of transforming crisp data into fuzzy sets; an inference system, that uses them in conjunction with the knowledge base to make inference by means of a reasoning method; and a defuzzification interface, which translates the fuzzy control action so obtained to a real control action using a defuzzification method [8, 10, 13].
Fig. 9.1. System used for obtaining the experimental results.
In this chapter, the implementation of the fuzzy controller in terms of type-1 fuzzy sets, has two input variables such as the error e(t), the difference between the reference signal and the output of the process, as well as the error variation Δe(t),
9.2 Fuzzy Controllers
121
e(t ) = r (t ) − y (t )
(9.1)
Δe(t ) = e(t ) − e(t − 1)
(9.2)
so the control system can be represented as in Fig. 9.1. A FLS described using at least one type-2 fuzzy set is called a type-2 FLS. Type-1 FLSs are unable to directly handle rule uncertainties, because they use type-1 fuzzy sets that are certain. On the other hand, type-2 FLSs, are very useful in circumstances where it is difficult to determine an exact certainty, and measurement uncertainties [42]. Similar to a type-1 FLS, a type-2 FLS includes fuzzifier, rule base, fuzzy inference engine, and output processor [13]. The output processor includes type-reducer and defuzzifier; it generates a type-1 fuzzy set output (from the typereducer) or a crisp number (from the defuzzifier). A type-2 FLS is again characterized by IF-THEN rules, but its antecedent or consequent sets are now type-2. In the case of the implementation of the type-2 FLC, we have the same characteristics as in type-1 FLC, but we used type-2 fuzzy sets as membership functions for the inputs and for the output. For evaluating the transient closed-loop response of a computer control system we can use the same criteria that normally are used for adjusting constants in PID (Proportional Integral Derivative) controllers. These are: 1.
Integral of Square Error (ISE). ∞
ISE =
[e(t )] dt 2
(9.3)
0
2.
Integral of the Absolute value of the Error (IAE). ∞
IAE = | e(t ) | dt
(9.4)
0
3.
Integral of the Time multiplied by the Absolute value of the Error (ITAE). ∞
ITAE = t | e(t ) | dt
(9.5)
0
The selection of the criteria depends on the type of response desired, the errors will contribute different for each criterion, so we have that large errors will increase the value of ISE more heavily than to IAE. ISE will favor responses with smaller overshoot for load changes, but ISE will give longer settling time. In ITAE, time appears as a factor, and therefore, ITAE will penalize heavily errors that occur late in time, but virtually ignore errors that occur early in time.
122
9 Evolutionary Optimization of Interval Type-2 Fuzzy Systems
9.3 The Human Evolutionary Model The main idea of this computational model,is to combine synergetically diferent techniques for performing search and optimization tasks. HEM was defined as follows [16]: HEM = (H , AIIS , P, O, S , E , L, TL / PS , VRL, POS ) where H AIIS P O S E L TL/PS VRL POS
Human Adaptive Intelligent Intuitive System Population of size N individuals Single or a multiple objective optimization goals Evolutionary strategy used for reaching the objectives expressed in O Environment, here we can have predators, etc. Landscape, i.e., the scenario where the evolution must be performed Tabu List formed by the bests solutions found/Pareto Set Visited Regions List Pareto Optimal Set
Fig. 9.2 is a schematic representation of one individual which is comprised of three parts: a genetic representation gr, which can be codified using binary or floating-point representation; a set of genetic effects ge, that are attributes of each individual such as “physical structure”, “gender”, “actual age”, “maximum age allowed”, pheromone level”, etc; these attributes give to the algorithm some of the human like characteristics that will define in great part, the individual behavior.
Fig. 9.2. Representing one individual in HEM.
The third part in the individual representation is devoted to individual’s fitness values. An individual pi is defined as pi=(gri,gei,fvi) where gri=(gri1,…,griM) is a vector (a row) of the matrix GR of dimension M × N. The genetic effects (gei) are rows in a matrix GE. In this method we can have one or several fitness values (fv), so we can handle single objective optimization problems (SOOP), and multiobjective optimization problems (MOOP). Fitness values are defined as vectors fvi
9.3 The Human Evolutionary Model
123
in the matrix FVJ×N, in this way we have fv=(fv1,…,fvJ). In this context, a population Pi is defined as Pi=(GRi+GEi+FVi). In the attribute geigender, we have the valid values set {M,F,0}, in this set M alludes a subpopulation of male individuals, F is used for the female subpopulation, and 0 means that this attribute will not be considered. The genetic attribute geiactAge contains the actual age of an individual; its value corresponds to the number of generation that the individual has survived. We can set the maximum life expectance for each individual in the attribute geimaxAge. The task of the attribute geiphLevel is to leave trace about which individuals have been involved in previous generations producing good offsprings. Fig. 9.3 shows the general structure of HEM.
Fig. 9.3. General structure of HEM.
In Figure 9.3, we have a general description of HEM containing six main blocks. In the first block, we show that the human or group of humans is part of the system. HEM is an intelligent evolutionary algorithm that learns from experts their rational and intuitive procedures that they use to solve optimization
124
9 Evolutionary Optimization of Interval Type-2 Fuzzy Systems
problems. In this model, we consider that we have two kinds of humans: real human beings and artificial humans. In the first block of Figure 9.3 we show that real human beings form one class. In the second block, the artificial human implemented in the AIIS of HEM is shown. Humans as part of the system are in charge of teaching the artificial human all the knowledge needed for realizing the searching task. The AIIS should learn the rational and intuitive knowledge from the experts; the final purpose is that the artificial human eventually can substitute the human beings most of the times. HEM has a feedback control system formed by blocks three and four; they work coordinately for monitoring and evaluating the evolution of the problem to be solved. In the fifth block, we have a single objective optimization (SOO) method for solving single objective optimization problems (SOOP). In addition, using the SOO method we can to find the ideal, utopian and nadir vectors for multiple objective optimization problems (MOOP). In the sixth block, we have a multiple objective optimization (MOO) method, which is dedicated to find the Pareto optimal set (POS) in MOOP.
9.4 Experimental Results Figure 9.1 shows, the feedback control system that was used for achieving the results of this paper. It was implemented in Matlab where the controller was designed to follow the input as closely as possible. The plant was modeled using equation (9.6)
y(i) = 0.2 ⋅ y(i − 3) ⋅ 0.07y(i − 2) + 0.9 ⋅ y(i −1) + 0.05⋅ u(i −1) + 0.5 ⋅ u(i − 2)
(9.6)
The controller’s output was applied directly to the plant’s input. Since we are interested in comparing the performance between normal type-1 and type-2 FLC system versus optimized type-2 FLC system, we tested the controller in three ways: 1.
2.
3.
Considering the system as ideal, that is, we did not introduce in the modules of the control system any source of uncertainty. See experiments 1, and 2. Simulating the effects of uncertain modules (subsystems) response introducing some uncertainty, and diverse noise levels. See experiments 3, 4 and 5. After optimization of the interval type-2 MFs, we repeated case two above. See experiment 6.
For case one, as is shown in Fig. 9.1, the system’s output is directly connected to the summing junction, but in the second case, the uncertainty was simulated introducing random noise with normal distribution (the dashed square in Fig. 9.1). We added noise to the system’s output y(i) using the Matlab’s function “randn” which generates random numbers with Gaussian distribution. The signal and the added noise in turn, were obtained with the programmer’s expression (9.7), the
9.4 Experimental Results
125
result y (i ) was introduced to the summing junction of the controller system. Note that in (9.7) we are using the value 0.05, for experiments 3 and 4, but in the set of tests for experiment 5 we varied this value to obtain different SNR values. y (i ) = y (i ) + 0.05 ⋅ randn
(9.7)
We tested the system using as input, a unit step sequence free of noise, r (i ) . For evaluating the system’s response and compare between type 1 and type 2 fuzzy controllers, we used the performance criteria ISE, IAE, and ITAE. In Table 9.3, we summarized the values obtained for each criterion considering 200 units of time. For calculating ITAE we considered a sampling time Ts = 0.1 sec. For experiments 1, 2, 3, and 4 the reference input r is stable and noisy free. In experiments 3 and 4, although the reference appears clean, the feedback at the summing junction is noisy since we introduced deliberately noise for simulating the overall existing uncertainty in the system, in consequence, the controller’s inputs e(t ) (error), and Δe(t ) contains uncertainty data. In experiment 5, we tested the systems, type-1 and type-2 FLCs, introducing diverse values of noise η , this is modifying the signal to noise ratio SNR [79, 80],
s SNR = η
2 2
=
Psignal
(9.8)
Pnoise
Because many signals have a very wide dynamic range, SNRs are usually expressed in terms of the logarithmic decibel scale, SNR(db),
Psignal SNR(db) = 10 log10 Pnoise
(9.9)
In Table 9.4, we show, for different values of SNR(db), the behavior of ISE, IAE, ITAE for type-1 and type-2 FLCs. In almost all the cases the results for type-2 FLC are better than type-1 FLC. In type-1 FLC, we selected Gaussian MFs for the inputs and for the output. A Gaussian MF is specified by two parameters {c,σ}:
μ A ( x) =
1 x−c − e 2 σ
2
(9.10)
c represents the MFs center and σ determines the MFs standard deviation. For each input of the type-1 FLC, e(t ) and Δe(t ) , we defined three type-1 fuzzy Gaussian MFs: negative, zero, positive. The universe of discourse for these membership functions is in the range [-10 10]; their centers are -10, 0 and 10 respectively, and their standard deviations are 9, 2 and 9 respectively. For the output of the type-1 FLC, we have five type-1 fuzzy Gaussian MFs: NG, N, Z, P and PG. They are in the interval [-10 10], their centers are -10, -4.5,
126
9 Evolutionary Optimization of Interval Type-2 Fuzzy Systems
0, 4, and 10 respectively; and their standard deviations are 4.5, 4, 4.5, 4 and 4.5. Table 9.1 illustrates the characteristics of the inputs and output of the FMs of the type-1 FLC. For the type-2 FLC, as in type-1 FLC we also selected Gaussian MFs for the inputs and for the output, but in this case we have an interval type-2 Gaussian MFs with a fixed standard deviation, σ , and an uncertain center, ie.,
μ A ( x)
1 x −c − = e 2 σ
2
c ∈ [c1 , c 2 ]
(9.11)
Table 9.1 characteristics of the MFs of the inputs and output of the type-1 FLC Variable
Term
Center c
Input e
negative zero positive negative zero positive NG N Z P PG
-10 0 10 -10 0 10 -10 -4.5 0 4 10
Input ∆e Output cde
Standard Deviation σ 9 2 9 9 2 9 4.5 4 4.5 4 4.5
In terms of the upper and lower membership functions, we have for μ A~ ( x) ,
N (c1 , σ ; x) x < c1 μ A~ ( x) = 1 c1 ≤ x ≤ c2 N (c , σ ; x ) x > c 2 2
(9.12)
and for the lower membership function μ A~ ( x) , N (c2 , σ ; x) μ A~ ( x) = N (c , σ ; x ) 1
where N (c1 , σ , x ) ≡ and N (c 2 , σ , x ) ≡ e
1 x −c1 − e 2 σ 1 x −c2 − 2 σ
2
,
2
.
c1 + c 2 2 c1 + c 2 x> 2 x≤
(9.13)
9.4 Experimental Results
127
Table 9.2 Characteristics of the MFs of the inputs and output of the type-2 FLC. Variable
Term
Center c1
Center c2
Standard Deviation σ
Input e
negative zero positive negative zero positive NG N Z P PG
-10.25 -0.25 9.75 -10.25 -0.25 9.75 -10.25 -4.75 -0.25 3.75 9.75
-9.75 0.25 10.25 -9.75 0.25 10.25 -9.75 -4.5 0.25 4.25 10.25
9.2 2.2 9.2 9.2 2.2 9.2 4.5 4 4.5 4 4.5
Input ∆e Output cde
Hence, in type-2 FLC, for each input we defined three interval type-2 fuzzy Gaussian MFs: negative, zero, positive in the interval [-10 10], as illustrates Fig. 11.4 for input e. For computing the output we have five interval type-2 fuzzy Gaussian MFs NG, N, Z, P and PG, with uncertain center and fixed standard deviations in the interval [-10 10], as can be seen in Fig. 9.5. Table 9.2 shows the characteristics of the MFs of the inputs and output of the type-2 FLC. In experiment 6, to simulate the interval type-2 MFs of the FLC, we used two type-1 FLCs. Using HEM as the optimization method, ISE as a fitness function, we found the best values, see table V, for the MFs of the inputs of these controllers. Through an average of the two type-1 optimized FLCs, we repeated experiment 5, and calculated again the values of ISE, IAE and ITAE, as can be seen in Table 9.6. For the experiments with interval type-2 MFs not optimized, we used, basically, the type-2 toolbox that we developed previously. Experiment 1. Ideal system using a type-1 FLC. In this experiment, we did not add uncertainty data to the system. The system trends to stabilize with time and the output will follow accurately the input. In Table 9.3, we listed the obtained values of ISE, IAE, and ITAE for this experiment. Experiment 2. Ideal system using a type-2 FLC. Here, we used the same test conditions of Experiment 1, but in this case, we implemented the controller’s algorithm with type-2 fuzzy logic. The corresponding performance criteria are listed in Table 9.3.
128
9 Evolutionary Optimization of Interval Type-2 Fuzzy Systems
Fig. 9.4. Input e membership functions for the type-2 FLC.
Fig. 9.5. Output cde membership functions fot the type-2 FLC.
Experiment 3. System with uncertainty using a type-1 FLC. In this case, we simulated using equation (9.7), the effects of uncertainty introduced to the system by transducers, amplifiers, and any other element that in real world applications affects expected values. In Table 9.3, we can see the obtained values of ISE, IAE, and ITAE for a simulated 10 db signal noise ratio. Experiment 4. System with uncertainty using a type-2 FLC. In this experiment, we introduced uncertainty in the system, in the same way as in Experiment 3. In this case, we used a type-2 FLC and we improved those results obtained with a type-1 FLC in Experiment 3, see table 9.3.
9.4 Experimental Results
129
Table 9.3 Comparison of performance criteria for type-1 and type-2 fuzzy logic controllers for 10 db signal noise ratio. values obtained after 200 samples. Performance Criteria ISE IAE ITAE
Type-1 FLC Ideal SysSyst. with tem uncertainty 5.2569 205.0191 13.8055 155.9412 46.0651 1583.4
Type-2 FLC Ideal Syst. with System uncertainty 5.2572 149.3097 13.7959 131.77 45.8123 1262.2
Experiment 5. Varying the signal to noise ratio in type-1 and type-2 FLCs.
To test the robustness of the type-1 and type-2 FLCs, we repeated experiments 3 and 4 giving different noise levels, going from 30 db to 6 db of SNR ratio in each experiment. In Table 9.4, we summarized the values for ISE, IAE, ITAE considering 200 units of time with a Psignal of 22.98 db in all cases. As it can be seen in Table 9.4, in presence of diverse noise levels, the behavior of type-2 FLC is better than type-1 FLC above 10 db. From Table 9.4, taking two examples, the extreme cases; we have for an SNR ratio of 8 db, in type-1 FLC the next performance values ISE=1004, IAE=352.45, ITAE=4526; for the same case, in type-2 FLC, we have ISE=903, IAE=330.38, ITAE=4104. For 10 db of SNR ratio, we have for type-1 FLC, ISE=205.01, IAE=155.94, ITAE=1583.4, and for type-2 FLC, ISE=149.3, IAE=131.77, ITAE=1262.2. These values indicate a better performance of type-2 FLC than type-1 FLC above certain noise values, because they are a representation of the errors and the higher they are the performance of the system is worst. To optimize the interval type-2 MFs of the FLC, we simulated the system using two type-1 FLCs. We maintain the centers constant of the Gaussian MFs of the inputs and varied its standard deviations. After using HEM as the optimization method, and taking ISE as the fitness function, we found the best values of the MFs, as can be seen in table 9.5. With the new values of the MFs of both type-1 FLCs, we repeated experiment 5, but in this case, we used the average of the two type-1 FLCs as the output of the type-2 system. Table 9.6, shows the results for this experiment, as can be seen, all the values of ISE were improved, and in general we can see that the performance of the system is better. Experiment 6. Optimizing the interval type-2 MFs of the FLC.
130
9 Evolutionary Optimization of Interval Type-2 Fuzzy Systems
Table 9.4 Behavior of type -1 and type-2 fuzzy logic controllers after variation of signal noise ratio. values obtained for 200 samples. SNR db 6 8 10 12 14 16 18 20 22 24 26 28 30
Type-1 FLC
Type-2 FLC
ISE
IAE
ITAE
ISE
IAE
ITAE
1208 1004 205.0 89.77 56.47 36.28 23.76 16.14 11.36 8.54 6.87 5.9 5.38
392.3 352.4 155.9 102.1 80.88 64.36 51.54 41.75 34.65 29.25 25.15 22.2 20.12
4903 4526 1583.4 974.97 769.51 610.86 485.19 386.45 310.04 249.67 202.46 166.38 139.27
1113 903 149.3 89.8 56.78 36.39 23.81 16.04 11.25 8.39 6.72 5.78 5.27
368.76 330.38 131.77 102.21 80.85 64.21 51.32 41.59 34.28 28.78 24.78 21.92 19.77
4388 4104 1262.2 974.93 770.25 610.65 485.16 386.6 308.87 247.89 201.07 165.21 137.47
Table 9.5 Characteristics of the optimized MFs of the inputs and output of the type-2 FLC. Variable
Term
Center c1
Standard Deviation σ1
Center c2
Standard Deviation σ2
Input e
negative zero positive negative zero positive NG N Z P PG
-10 0 10 -10 0 10 -10 -4.5 0 4 10
9 2 9 9.2 2.2 9.2 4.5 4 4.5 4 4.5
-10 0 10 -10 0 10 -10 -4.5 0 4 10
8.0298 1.0987 8.1167 8.7767 1.0987 8.5129 4.5 4 4.5 4 4.5
Input ∆e Output cde
Table 9.6 Comparison of performance criteria for type-1 FLC, and type-2 fuzzy logic controller with optimized MFs, for 10 db signal noise ratio. values obtained after 200 samples. SNR db 6 8 10 12 14 16 18 20 22 24 26 28 30
Type-1 FLC
Type-2 FLC
ISE
IAE
ITAE
1208 1004 205.0 89.77 56.47 36.28 23.76 16.14 11.36 8.54 6.87 5.9 5.38
392.3 352.4 155.9 102.1 80.88 64.36 51.54 41.75 34.65 29.25 25.15 22.2 20.12
4903 4526 1583.4 974.97 769.51 610.86 485.19 386.45 310.04 249.67 202.46 166.38 139.27
ISE 616.4 437.3 115 72.8 45.6 28.9 18.6 12.6 8.9 6.8 5.6 4.9 4.5
IAE
ITAE
274.7 226.7 116.6 90.9 71.3 56.3 45.2 37 30.8 26.3 23.1 21 19.6
3005 2509 1119.6 866.8 674.1 528.4 419.4 337 273.8 227.7 195.6 172.8 157.8
9.5 Summary
131
9.5 Summary We observed and quantified using performance criteria such as ISE, IAE, and ITAE that in systems without uncertainties (ideal systems) is a better choice to select a type-1 FLC since it works a little better than a type-2 FLC, and it is easier to implement it. It is known that type-1 FLC can handle nonlinearities, and uncertainties up to some extent. Unfortunately, real systems are inherently noisy and nonlinear, since any element in the system contributes with deviations of the expected measures because of thermal noise, electromagnetic interference, etc., moreover, they add nonlinearities from element to element in the system. In the simulation of real systems, systems with uncertainty, we observed that the results presented in Table 9.4 demonstrated that the performance of this kind of controllers is better under high noise levels. After optimizing the interval type2 MFs the performance of the system is improved as we can see in Table 9.6. We can say that using a type-2 FLC in real world applications can be a better choice since this type of system is a more suitable system to manage uncertainty, as we can see in the results shown in Tables 9.5 and 9.6.
Part III
Chapter 10
Optimization of a Fuzzy Controller for an Autonomous Mobile Robot Using the Ant Colony Metaheuristic
In this chapter we describe the application of a Simple ACO (S-ACO) as a method of optimization for membership functions’ parameters of a fuzzy logic controller (FLC) in order to find the optimal intelligent controller for an Autonomous Wheeled Mobile Robot [15]. Simulation results show that ACO outperforms a GA in the optimization of FLCs for an autonomous mobile robot [48].
10.1 Introduction Nowadays, fuzzy logic is one of the most used methods of computational intelligence and with the best future; this is possible thanks to the efficiency and simplicity of Fuzzy Systems since they use linguistic terms similar to those that human beings use [84]. The complexity for developing fuzzy systems can be found at the time of deciding which are the best parameters of the membership functions, the number of rules or even the best granularity that could give us the best solution for the problem that we want to solve [26]. A solution for the above mentioned problem is the application of evolutionary algorithms for the optimization of fuzzy systems [11, 12]. Evolutionary algorithms can be a useful tool since its capabilities of solving nonlinear problems, wellconstrained or even NP-hard problems. Among the most used methods of evolutionary algorithms we can find: Genetic Algorithms, Ant Colony Optimization, Particle Swarm Optimization, etc. [12, 15, 16, 24, 40, 41, 46, 47, 48, 49, 50]. This chapter describes the application of evolutionary algorithms, such as the Ant Colony Optimization as a method of optimization of the parameters of the membership functions of the FLC in order to find the best intelligent controller for an Autonomous Wheeled Mobile Robot [15, 48]. This chapter is organized as follows: Section 2 shows the concept of Ant Colony Optimization and a description of S-ACO which is the technique that was applied for optimization. Section 3 presents the problem statement and the dynamic and kinematic model of the unicycle mobile robot. Section 4 shows the fuzzy logic controller proposed and in Section 5 it’s described the development of the O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 135–149. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
136
10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot
evolutionary method. In the Section 6 the simulation results are shown. Finally, Section 7 shows the Conclusions.
10.2 S-ACO Algorithm Ant Colony Optimization (ACO) is a probabilistic technique that can be used for solving problems that can be reduced to finding good path along graphs. This method is inspired on the behavior presented by ants in finding paths from the nest or colony to the food source [15]. The S-ACO is an algorithmic implementation that adapts the behavior of real ants to solutions of minimum cost path problems on graphs [48]. A number of artificial ants build solutions for a certain optimization problem and exchange information about the quality of these solutions making allusion to the communication systems of the real ants. Let us define the graph G = (V , E ) , where V is the set of nodes and E is the matrix of the links between nodes. G has
nG = V nodes. Let us define LK as
the number of hops in the path built by the ant k from the origin node to the destiny node. Therefore, it is necessary to find:
Q = {qa ,..., q f q1 ∈ C }
(10.1)
Where Q is the set of nodes representing a continuous path with no obstacles; qa ,..., q f are former nodes of the path and C is the set of possible configu-
(
)
rations of the free space. If x (t ) denotes a Q solution in time t, f x (t ) expresses the quality of the solution. The general steps of S-ACO are the followings: k
k
•
Each link
(i, j ) is associated with a pheromone concentration denoted asτ ij .
•
A number
k = 1,2,..., nk are placed in the nest.
•
On each iteration all ants build a path to the food source (destiny node). For selecting the next node a probabilistic equation is used:
τ ijk α j∈N ijk τ ij (t ) k pij (t ) 0
if j ∈ N ik (10.2)
if
j ∉ N ik
10.3 Problem Statement
137
N ik is the set of feasible nodes (in a neighborhood) connected to node i
Where,
with respect to ant k,
τ ij is the total pheromone concentration of link ij, and α is a
positive constant used as again for the pheromone influence.
(
)
Remove cycles and compute each route weight f x (t ) . A cycle could be generated when there are no feasible candidates nodes, that is, for any i and
•
any k,
k
N ik = ∅ ; then the predecessor of that node is included as a former
node of the path. Pheromone evaporation is calculated with equation (10.3):
•
τ ij (t ) ← (1 − ρ )τ ij (t )
(10.3)
[ ]
Where ρ ∈ 0,1 is the evaporation rate value of the pheromone trail. The evaporation is added to the algorithm in order to force the exploration of the ants, and avoid premature convergence to sub-optimal solutions. For ρ = 1 the search becomes completely random. •
The update of the pheromone concentration is realized using equation (10.4): nk
τ ij (t + 1) = τ ij (t ) + Δτ ijk (t )
(10.4)
k =1
Where
Δτ ijk is the amount of pheromone that an ant k deposits in a link ij in a
time t. • o o
Finally, the algorithm can be ended in three different ways: When a maximum number of epochs has been reached. When it has been found an acceptable solution, with f ( xk (t )) < ε .
o
When all ants follow the same path.
10.3 Problem Statement The model of the robot considered in this paper is a unicycle mobile robot (see Figure 10.1), that consists of two driving wheels mounted of the same axis and a front free wheel [3, 4, 47].
138
10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot
Fig. 10.1. Wheeled Mobile Robot [10]
A unicycle mobile robot is an autonomous, wheeled vehicle capable of performing missions in fixed or uncertain environments. The robot body is symmetrical around the perpendicular axis and the center of mass is at the geometrical center of the body. It has two driving wheels that are fixed to the axis that passes through C and one passive wheel prevents the robot from tipping over as it moves on a plane. In what follows, it´s assumed that motion of the passive wheel can be ignored in the dynamics of the mobile robot presented by the following set of equations:
M (q )ϑ + C (q, q )ϑ + Dϑ = τ + Fext (t )
(10.5)
cos θ 0 v q = sin θ 0 w 0 1 ϑ q = ( x , y ,θ )
T
Where
(10.6)
J (q )
is the vector of the configuration coordinates;
τ = (τ 1 ,τ 2 ) is the vector of torques applied to the wheels of the robot where τ 1 and τ 2 denote the torϑ = (v, w)
T
is the vector of linear and angular velocities;
ques of the right and left wheel respectively (Figure 1); bounded disturbance vector;
(
)
M (q ) ∈
2× 2
Fext ∈
2
uniformly
is the positive-definite inertia ma-
trix; C q, q ϑ is the vector of centripetal and Coriolis forces; and D ∈ is a diagonal positive-definite damping matrix. Equation (10.6) represents the kinematics of the system, where ( x, y ) is the position of the mobile robot in the X-Y (world) reference frame, θ is the angle between heading direction and the x-axis v and w are the angular and angular velocities, respectively. 2× 2
10.4 Fuzzy Logic Control Design
139
Furthermore, the system (10.5)-(10.6) has the following non-holonomic constraint:
y cosθ − x sin θ = 0
(10.7)
which corresponds to a no-slip wheel condition preventing the robot from moving sideways. The system (10.6) fails to meet Brockett’s necessary condition for feedback stabilization, which implies that anon-continuous static state-feedback controller exists that stabilizes the close-loop system around the equilibrium point [15]. The control objective is to design a fuzzy logic controller of τ that ensures:
limt → ∞ qd (t ) − q(t ) = 0
(10.8)
for any continuously, differentiable, bounded desired trajectory
qd ∈
3
while at-
tenuating external disturbances.
10.4 Fuzzy Logic Control Design In order to satisfy the control objective it is necessary to design a fuzzy logic controller for the real velocities of the mobile robot. To do that, a Takagi-Sugeno fuzzy logic controller was designed, using linguistic variables in the input and mathematical functions in the output. The error of the linear and angular velocities ( vd , wd respectively), were taken as inputs variables, while the right (τ 1 ) and left
(τ 2 )
torques as outputs. The membership functions used on the input are trapezoidal for the negative (N) and positive (P), and a triangular was used for the zero (C) linguistic terms. The interval used for this fuzzy controller is [-50 50] [10]. Figure 10.2 shows the input and output variables, and Figure 10.3 shows the general FLC architecture.
(a)
(c)
(b)
(d)
Fig. 10.2. (a) Linear velocity error. (b) Angular velocity error. (c) Right output output
(τ 2 ) .
(τ 1 ) . (d) Left
140
10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot
Fig. 10.3. Fuzzy Logic Controller Architecture.
The rule set of the FLC contains 9 rules, which governs the input-output relationship of the FLC and this adopts the Takagi-Sugeno style inference engine, and it is used with a single point in the outputs, this mind that the outputs are constant values, obtained using weighted average defuzzification procedure. In Table 10.1 we present the rule set whose format is established as follows:
Rule i : if ev is G1 and ew is G2 then F is G3 and N is G4 where
G1..G4 are the fuzzy set associated to each variable i=1,2,…,9. Table 10.1 Fuzzy rules set
ev / e w
N
C
P
N C P
N/N C/N P/N
N/C C/C P/C
N/P C/P P/P
To find the best FLC, we used a S-ACO to find the parameters of the membership functions. Table 10.2 shows the parameters of the membership functions, the minimal and maximum values in the search range for the S-ACO algorithm to find the best fuzzy logic controller.
10.5 ACO Architecture
141
Table 10.2 Parameters of the membership Functions.
MF TYPE
POINT
Trapezoidal
Triangular
Trapezoidal Constant (N) Constant (C) Constant (P)
a b c d a b c a b c d a a a
MINIMAL VALUE -50 -50 -15 -1.5 -5 0 1.8 0.5 5.1 50 50 -50 0 50
MAXIMAL VALUE -50 -50 -5.1 -0.5 -1.8 0 5 1.5 15 50 50 -50 0 50
It is important to remark that values shown in Table 10.2 are applied to both inputs and both outputs of the fuzzy logic controller.
10.5 ACO Architecture The S-ACO algorithm was applied for the optimization of the membership functions for the fuzzy logic controller. For developing the architecture of the algorithm it was necessary to follow the next steps: 1. Marking the limits of the problem in order to eliminate unnecessary complexity. 2. Representing the architecture of the FLC as a graph that artificial ants could traverse. 3. Achieving an adequate handling of the pheromone but permitting the algorithm to evolve by itself.
142
10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot
10.5.1 Limiting the Problem and Graph Representation One of problems found on the development of the S-ACO algorithm was to make a good representation of FLC. First we reduced the number of elements that the method needed to find by deleting the elements whose minimal value and maximal values are the same (see Table 10.2) and therefore if they were included they will not change any way. Table 10.3 shows the parameters of the membership functions included in the search.
Table 10.3 Parameters of Membership Functions Included in S-ACO Search
MF TYPE
POINT
Trapezoidal
c d a c a b
Triangular Trapezoidal
MINIMAL VALUE -15 -1.5 -5 1.8 0.5 5.1
MAXIMAL VALUE -5.1 -0.5 -1.8 5 1.5 15
The next step was to represent those parameters shown in table 10.3; to that, was necessary to discretize the parameters in a range of possible values in order to represent every possible value as a node in the graph of search. The level of discretization between minimal and maximal value was of 0.1 (by example: -1.5, 1.4, -1.3,…, -0.5). Table 10.4 shows the number of possible values that each parameter can take. Figure 10.4 shows the search graph for the proposed S-ACO algorithm, the graph can be viewed as a tree where the root is the nest and the last node is the food source.
Table 10.4 Number of Possible Values of the Parameters of Membership Functions
MF TYPE Trapezoidal Triangular Trapezoidal
POINT c d a c a b
COMBINATIONS 100 15 33 33 15 100
10.5 ACO Architecture
143
Fig. 10.4. S-ACO Architecture
10.5.2 Updating Pheromone Trail An important issue is that the update of pheromone trail be applied in the best way possible. In this sense we need to handle the evaporation (Equation 10.3), and increase or deposit of pheromone (Equation 4), where the key parameter in evaporation is denoted by ρ that represents the rate of evaporation and in deposit of phe-
romone is denoted by Δτ that represents the amount of pheromone that an ant k deposits in a link ij in a time t. For ρ we assign a random value and Equation 10.9 shows the way how the increase of pheromone is calculated.
Δτ = Where
(emax − ek ) emax
(10.9)
emax = 10 is the maximum error of control permitted and ek is error of
control generated by a complete path of an ant k. We decided to allocate emax = 10 in order to stand Δτ ∈ 0,1 .
[ ]
144
10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot
10.6 Simulation Results In this section we present the results of the proposed controller to stabilize the unicycle mobile robot, defined by Equation (10.5) and Equation (10.6), where the matrix values are defined as
0.3749 − 0.0202 M (q ) = , − 0.0202 0.3739
0 0.1350θ C (q, q ) = , 0 − 0.150θ 10 0 and D = 0 10 The evaluation was made through computer simulation performed in MATLAB® and SIMULINK®. The desired trajectory is the following one:
vd (t ) = 0.2(1 − exp(− t )) wd (t ) = 0.4 sin (0.5t )
ϑd (t ) =
(10.10)
and was chosen in terms of its corresponding desired linear
vd and angular
wd velocities, subject to the initial conditions q (0 ) = (0.1,0.1,0, ) and ϑ (0 ) = 0 ∈ T
The gains γ i , i=1, 2, 3 of the kinematic model are
2
γ 1 = 5, γ 2 = 24
and
γ3 = 3. 10.6.1 S-ACO Algorithm Results for the FLC Optimization Table 10.5 shows the results of the FLC, obtained varying the values of maximum iterations and number of artificial ants, where the highlighted row shows the best result obtained with the method. Figure 10.5 shows the evolving of the method.
10.6 Simulation Results
145
Table 10.5 S-ACO Results of Simulations for FLC Optimization
Iterations
Ants
α
ρ
20 20 25 25 25 25 25 25 25 25 25 25 25 10 10 40 40 40 40 50 50 50 50 25 25 25 25 50 62 50 50 60 60 60
10 10 10 10 10 10 10 100 100 100 100 100 100 15 15 65 65 65 65 70 70 70 70 80 80 80 80 80 50 80 80 90 90 90
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random
Average Error 1.5589 1.451 1.5566 1.4767 1.4739 1.6137 1.6642 1.3484 1.3413 1.3360 1.2954 1.4877 1.2391 1.6916 1.4256 1.2783 1.4011 1.2216 1.2487 1.3782 1.0875 1.4218 1.475 1.4718 1.4212 1.3221 1.1391 1.2148 1.0322 1.1887 1.2158 1.3493 1.3060 1.3161
Time 00:01:30 00:01:34 00:01:46 00:01:51 00:02:05 00:02:08 00:01:54 00:20:30 00:18:44 00:18:31 00:18:32 00:18:41 00:18:31 00:01:14 00:01:09 00:19:17 00:19:45 00:19:33 00:19:49 00:26:09 00:27:35 00:33:45 01:08:48 00:14:55 00:15:00 00:14:52 00:15:41 00:28:43 00:24:49 00:29:55 00:29:56 00:41:56 00:39:48 00:40:00
146
10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot
0.25 Best = 1.0322
log10(f(x))
0.2
0.15
0.1
0.05
0
0
10
20
30 40 Iteración
50
60
70
Fig. 10.5. Evolution of the S-ACO for FLC Optimization.
Figure 10.6 shows the membership functions of the FLC obtained by S-ACO algorithm.
(a)
(b)
Fig. 10.6. (a) Linear velocity error, and (b) angular velocity error optimized by S-ACO algorithm.
Figure 10.7 shows the block diagram used for the FLC that obtained the best results. Figure 10.8 shows the results of linear and angular errors, and Figure 10.9 shows the output results of the fuzzy controller that represents the torque applied to the wheels of the autonomous mobile robot.
10.6 Simulation Results
Fig. 10.7. Block diagram for simulation of the FLC
Fig. 10.8. Linear and angular velocity errors
147
148
10 Optimization of a Fuzzy Controller for an Autonomous Mobile Robot
Fig. 10.9. Right and left torques
The positions errors of the autonomous mobile robot can be observed in Figure 10.10. Figure 10.11 shows the desired trajectory and obtained trajectory.
Fig. 10.10. Position errors in x, y,θ .
10.7 Summary
149
Fig. 10.11. Obtained trajectory
10.7 Summary A trajectory tracking controller has been designed based on the dynamics and kinematics of the autonomous mobile robot through the application of ACO for the optimization of membership functions for the fuzzy logic controller with good results obtained after simulations.
Chapter 11
ACO-Tuning of a Fuzzy Controller for the Ball and Beam Problem
We describe the use of Ant Colony Optimization (ACO) for the ball and beam control problem, in particular for the problem of tuning a fuzzy controller of Sugeno type. In our case study, the controller has four inputs, each of them with two membership functions, we consider the interpolation point for every pair of membership function as the main parameter and their individual shape as secondary ones in order to achieve the tuning of the fuzzy controller by using an ACO algorithm [15]. Simulation results show that using ACO and coding the problem with just three parameters instead of six, allows us to find an optimal set of membership function parameters for the fuzzy control system with less computational effort needed.
11.1 Introduction Control systems engineering has an essential role in a wide range of industry processes and over the last few decades the volume of interest in fuzzy controller systems has increased enormously as well as their optimization [8]. Also the development of algorithms for control optimization, such as ACO has been an area of active study [15, 40, 41, 48]. Ant colony optimization (ACO) is a bio-inspired population based method, modeling real ant abilities [48]. In ACO, the information gathered by a single ant is shared among the ant colony and exploited to solve the problem, in this sense ACO acts as a multi-agent approach for solving combinatorial optimization problems such as the ball and beam problem [15]. In our study case the used model has four inputs, each of them with two membership functions, and we use an ACO algorithm in order to tune the fuzzy controller, according with the fitness function measured by the root mean squared error (RMSE), Fig. 11.1 shows the architecture used. This chapter is organized as follows. Section 2 briefly describes related work. Section 3 describes the ball and beam model. In Section 4 the Fuzzy controller is introduced. Problem description is presented in Section 5. Section 6 describes the basic ACO algorithm concepts. Section 7 show experimental results. Finally, conclusions and future studies are presented in the last section. O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 151–159. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
152
11 ACO-Tuning of a Fuzzy Controller for the Ball and Beam Probleem
F 11.1. Architecture of the System Fig.
11.2 Ball and Beam m System The control system used for f our purpose is the ball and beam system, which is onne of the most popular modeels used for benchmark and research works, this is widelly used because its simplicity y [8]. Figure 11.2 illustrates this system.
Fig. 11.2. Ball and beam system
The control task is mo ove the ball to a desired position by changing the beam angle, this system is open n loop unstable because the system output (ball positionn) increases without limit fo or a fixed input (beam angle) and a feedback control is needed in order to keep th he ball in the desired position on the beam, because manny modern industrial processses are intrinsically unstable, the importance of this typpe of models becomes relevaant in order to test different type of controllers such as thhe fuzzy ones.
11.3 Fuzzy Controller
153
11.3 Fuzzy Controller Figure 11.3 shows the architecture of the control system.
Fig. 11.3. Fuzzy Controller
A fuzzy controller is a control system based on fuzzy logic, which is widely used in machine control and has the advantage that the solution to the problem can be cast in terms that human operators understand taking advantage of their experience in the controller design. Fuzzy inference system has four inputs; ball position, ball velocity, beam angle, and beam angle change velocity, as shown in Fig. 11.4.
Fig. 11.4. Fuzzy Inference System
11.4 Problem Description 11.4.1 Objective The objective of a tuning process is to adapt a given membership function parameter set, such that the resulting fuzzy controller demonstrates better performance, finding their optimal parameters according with a determined fitness function [25]. 11.4.2 Membership Functions The fuzzy controller has four inputs, each of them has two membership functions and their shape is generalized bell type, Eq. 11.1 shows this type of function.
154
11 ACO-Tuning of a Fuzzy Controller for the Ball and Beam Probleem
(11.11)
Parameter a represents standard deviation, b represents the function shape, andd c is the center where locatted the function.
Fig. 11.5. 1 Generalized bell membership function
Fig. 11.5.b shows how generalized bell membership parameter b1 with 0.7 resemblance a triangular shaape, and b2 with 1.5 resemblance a square shape. 11.4.3 Universe of Discourse For every input we havee six parameter values that define our “universe of diiscourse”, because memberrship function shape is generally less important than thhe number of curves and th heir placement, we consider the interpolation point foor every pair of membershiip function as the main parameter and their individuual shape as secondary ones in i order to tune the fuzzy controller. 11.4.4 Main Parameterrs Main parameter is defineed as the interpolation point and Fig. 11.6 shows us hoow this point movement affeccts membership functions distribution.
Fig. 11.6. Membership M function interpolation point movement
11.4.5 Secondary Param meters Secondary parameters aree defined by individual membership functions shape, annd Fig. 11.7 shows us their variation. v
11.5 Ant Colony Optimization
155
Fig. 11.7. Membership function shape variation
By coding the problem with just three parameters instead of six, allows us to find an optimal set of membership function parameters for the fuzzy control system with less computational effort needed.
11.5 Ant Colony Optimization 11.5.1 ACO Algorithm According to the algorithm shown in Table 11.2, the iterative process of building, evaluating, and updating pheromone is repeated until a termination condition is met. In general, the termination condition is either a maximum number of iteration of the algorithm or a stagnation test, which verifies if the solutions created by the algorithm cannot be improved further. Table 11.1. ACO algorithm
Pseudocode of a basic ACO algorithm 1 2 3 4 5 6 7 8 9
begin Initialise(); while termination condition not met do ConstructAntSolution(); ApplyLocalSearch(); //optional UpdatePheromone(); end returnbestsolution end
11.5.2 Fitness Function The fitness function establishes the quality of a solution. The measure considered in this case, will be the function called root mean squared error (RMSE), which is defined as:
156
11 ACO-Tuning of a Fuzzy Controller for the Ball and Beam Problem
ε
1
(11.2)
Where xt with tilde is the estimated value (reference signal), xt is the observed value (control signal), and N is the total observation samples, this is counted not from beginning, but since controller show stable conditions. 11.5.3 Heuristic Information The heuristic information represents a priori information, as we our concern in minimizing the value from the fitness function, and in order to get an heuristic information before running the algorithm, we compute the fitness value from the lower and upper parameters values which represent a vertex or edge on the graph, and then assigning a normalized value to every selected parameter value, obtained by subtracting the lower from the upper and dividing its result by the total number of parameters. Heuristic information acts as a short term memory used for ants as relative information from the current node to next node. 11.5.4 Pheromone Pheromone is a chemical that ants deposit on ground when following a certain path while looking for food, this is a form of indirect communication named stigmergy, which allows a coordinated behavior in order to find the shortest way from their nest to food. Pheromone acts as a long term memory to remember the whole path traversed for every ant [15]. 11.5.5 Building Solutions Candidate solutions are created by simulating the movement of artificial ants on the construction graph by moving through neighbor vertices of the construction graph G. The vertices to be visited are chosen in a stochastic decision process, where the probability of choosing a particular neighbor vertex depends on both the problem dependent heuristic information and the amount of pheromone associated with the neighbor vertex. An intuitive decision rule to select the next vertex to visit, which combines both the heuristic information and the amount of pheromone associated with vertices, is to make the decision based on the vertices’ probabilities. Given an ant currently located at vertex from i to j, the probability of selecting a neighbor vertex is given by
11.6 Experimental Results
157
(11.3) ,
∑
According to Equation (11.3), the probability of choosing a particular neighbor vertex is higher for vertices associated with greater amount of pheromone and heuristic information, and subsequently increases in line with increases of the amount pheromone. The pheromone varies as a function of the algorithm iteration according to how frequent (the more frequent, the higher the pheromone) the vertex or edge has been used in previous candidate solutions. 11.5.6 Pheromone Trails After all the ants finished building the candidate solutions of an iteration, the updating of pheromone trails in the construction graph is usually accomplished in two steps, namely reinforcement and evaporation. The reinforcement step consists of increasing the amount of pheromone of every vertex (or edge, in the case that pheromone is associated with edges of the construction graph) used in a candidate solution and it is usually only applied to the best candidate solution. In general, the pheromone increment is proportional to the quality of the candidate solution, which in turn increases the probability that vertices or edges used in the candidate solution will be used again by different ants. Assuming that pheromone values are associated with vertices of the construction graph, a simple reinforcement rule given by ∆
,
(11.4)
where∆ is the amount of pheromone proportional to the quality of the candidate solution CS to be deposited. For instance, the control optimization is based on the definition of an “odor” associated to each sample represented by an ant and the mutual recognition of ants sharing a similar “odor” to construct a colonial odor used to discriminate between nest mates and intruders. In other approaches, when a specialized ant meets a given object it collects it with a probability that is the higher the sparser are the objects in this region, and after moving, it brings in the object with a probability that is the higher the denser are the objects in this region.
11.6 Experimental Results We conduct several experiments, using the Ant System (AS) algorithm as the optimizer in all the cases, Table 11.2 shows the obtained results.
158
11 ACO-Tuning of a Fuzzy Controller for the Ball and Beam Probleem Ta able 11.2. Results Average Comparison TYPE
Ants No.
Trails No..
Alpha α
Beta β
Evap. ρ
Iter
Init.Pher τ
Error
AS
10
100 0
1
2
0.1
100
0.01
0.09877
AS
100
100 0
1
2
0.1
100
0.01
0.08466
AS
10
1,000
1
2
0.1
100
0.01
0.07430
AS
100
1,000
1
2
0.1
100
0.01
0.07083
AS
10
10,00 00
1
2
0.1
100
0.01
0.06103
AS
100
10,00 00
1
2
0.1
100
0.01
0.06083
ε
On one hand we use parameter as the influence weight to select heuristic innformation, on the other haand we use parameter as the influence weight to seleect pheromone trails, the num mber of ants was switched from 10 to 100 every samplle, similar criteria was taken n for the number of trails from 100 to 1,000. When runnning ACO, every iteration n of the algorithm choose different membership parameeter sets, they are tested, and a keeping the best-so-far till reach the maximum num mber of iterations, obtainin ng at the end the optimal set for every run. Fig. 11.8 shows the best error convergence and represents a typical run behavior.
Fiig. 11.8. Best error convergence graphic
We show in Fig. 11.9 9 the best membership functions generated by the algoorithm. Simulation of the fuzzy f controller shows in Fig. 11.10 the scope for the baall and beam fuzzy control.
Fig. 11.9. 1 Best membership functions generated
11.7 Summary
159
Fig. 11.10. Control graphic scope
11.7 Summary We described on this chapter how we can use the interpolation point for an input pair of membership functions as the main parameter and their individual shape as secondary ones to get a simpler representation of the optimization problem. The fuzzy controller used is of Sugeno type, with four inputs, each of them with two membership functions, Ant Colony Optimization algorithm was tested to tune the fuzzy controller, and simulation results have been shown that ACO works well for the ball and beam control problem. We can conclude that coding the problem with just three parameters instead of six, and using ACO as the optimizer method allows us to find an optimal set of membership function parameters for the ball and beam fuzzy control system. For future work, we propose to try different shapes of membership functions, as well as trying to generalize the interpolation point method for more than two membership functions, showing more granularity. Another direction could be to try using type 2 fuzzy logic, and adding a certain type of perturbation into the system in order to observe its behavior versus the use of type 1 fuzzy logic. Following with Ant algorithms, we can try different methods, such as; Ant Colony System (ACS), Elitist Ant System (EAS), Ant System Rank (ASrank), MaxMinAnt System (MaxMinAS), Fuzzy Ant Colony Sytem (FACO), etc. Recent works are concerned in trying to get ACO-hybrid algorithms such as; FACO, PSO-ACO or GA-ACO, it seems to be a good idea trying them on others well known control problems, like bouncing ball, inverted pendulum, flow control, motor control, etc.
Chapter 12
Optimization of Type-2 Fuzzy Logic Controllers Using PSO Applied to Linear Plants
We use the Particle Swarm Optimization (PSO) method to find the parameters of the membership functions of a type-2 fuzzy logic controller (Type-2 FLC) in order to minimize the state error for linear systems [50]. PSO is used to find the optimal Type-2 FLC to achieve regulation of the output and stability of the closed-loop system [49]. For this purpose, we change the values of the cognitive, social and inertia variables in the PSO. Simulation results, with the optimal FLC implemented in Simulink, show the feasibility of the proposed approach.
12.1 Introduction Optimization algorithms are search methods, where the goal is to find a solution to an optimization problem, such that a given quantity is optimized, possibly subject to a set of constraints [4, 25]. Some optimization methods are based on populations of solutions. Unlike the classic methods of improvement for trajectory tracking, in this case each iteration of the algorithm has a set of solutions. These methods are based on generating, selecting, combining and replacing a set of solutions. Since they maintain and they manipulate a set, instead of a unique solution throughout the entire search process, they used more computer time than other metaheuristic methods. This fact can be aggravated because the “convergence” of the population requires a great number of iterations. For this reason a concerted effort has been dedicated to obtaining methods that are more aggressive and manage to obtain solutions of quality in a nearer horizon. This chapter is concerned with bio-inspired optimization methods like particle swarm optimization (PSO) to design optimized fuzzy logic controllers (FLC) for linear problems. This method is used to find the parameters of the membership functions obtaining the optimal FLC for plant control. This chapter is organized as follows: Section 2 presents the theoretical basis and problem statement. Section 3 introduces the controller design where a PSO is used to select the parameters. Robustness properties of the closed-loop system are achieved with a type-2 fuzzy logic control system using a Takagi-Sugeno model where the error and the change of error, are considered the linguistic variables. Section 4 provides a simulation study of the plant using the controller described in Section 3.
O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 161–172. springerlink.com © Springer-Verlag Berlin Heidelberg 2012
162
12 Optimization of Type-2 Fuzzy Logic Controllers
12.2 Theoretical Basis and Problem Statement Particle Swarm Optimization (PSO). PSO is a population based stochastic optimization technique developed by Eberhart and Kennedy in 1995, inspired by social behavior of bird flocking or fish schooling [50]. PSO shares many similarities with evolutionary computation techniques such as Genetic Algorithms (GA) [49]. The system is initialized with a population of random solutions and searches for optima by updating generations. However, unlike the GA, the PSO has no evolution operators such as crossover and mutation. In the PSO, the potential solutions, called particles, fly through the problem space by following the current optimum particles. Each particle keeps track of its coordinates in the problem space, which are associated with the best solution (fitness) it has achieved so far (The fitness value is also stored). This value is called pbest. Another "best" value that is tracked by the particle swarm optimizer is the best value, obtained so far by any particle in the neighbors of the particle. This location is called lbest. When a particle takes all the population as its topological neighbors, the best value is a global best and is called gbest. The particle swarm optimization concept consists of, at each time step, changing the velocity of (accelerating) each particle toward its pbest and lbest locations (local version of PSO). Acceleration is weighted by a random term, with separate random numbers being generated for acceleration toward pbest and lbest locations. In the past several years, PSO has been successfully applied in many research and application areas. It is demonstrated that PSO gets better results in a faster, cheaper way compared with other methods. Another reason that PSO is attractive is that there are few parameters to adjust. One version, with slight variations, works well in a wide variety of applications. Particle swarm optimization has been used for approaches that can be used across a wide range of applications, as well as for specific applications focused on a specific requirement. The basic algorithm of the PSO has the following nomenclature: i
x v p p c ,c r ,r
-Particle position
k i
-Particle velocity
k
i
-Best “remembered” individual particle position
k
g
-Best “remembered” swarm position
k
1
2
1
2
-Cognitive and Social parameters -Random numbers between 0 and 1
12.2 Theoretical Basis and Problem Statement
163
The equation to calculate the velocity is: i
v
k +1
=
i
i
i
g
i
k
k
v + c r p − x + c r p − x k
1
1
k
k
2
2
(12.1)
and the position of individuals particles is updated as follows:
x
i k +1
=
i
i
k
k +1
x +v
(12.2)
The basic PSO algorithm flow diagram as follows: 1) Initialize a)
Set constants
b) Randomly
k ,c ,c max
1
initialize
2
particle
x i0 ∈ D
position
i = 1,..., p c)
in
R n for
0 ≤ v i0 ≤ v 0max
Randomly initialize particle velocities
i = 1,..., p
for
d) Set k = 1 2) Optimize a)
Evaluate function value
b) If c)
If
f f
i k i k
≤ ≤
f f
i best
then
g best
then
f f
f
i
using design space coordinates
k
i best g best
=
i
i
i
k
k
k
i
g
i
k
k
k
f ,p =x f ,p =x
=
x
i k
. .
d) If stopping condition is satisfied then goto 3. e) f)
v Update al particle positions x Update all particle velocities
i
k
i k
for i = 1,..., p for i = 1,..., p
g) Increment k. h) Goto 2(a). 3) Terminate Problem Statement. To test the optimized FLCs obtained by the bio-inspired methods; we used different linear systems. We first consider two benchmark problems called Plant 1 and Plant 2 with different levels of complexity [50]. Fig 12.1 shows the Simulink block diagram used to simulate the Plants.
164
12 Optimization of Type-2 Fuzzy Logic Controllers
Plant 1 is given by the following second order transfer function:
w2n ε = 0.5, wn = 2 s 2 + 2ε wn s + wn2 where wn is the natural frequency and ε is the coefficient damping. g (s) =
(12.3)
Plant 2 is given by the following transfer function:
g ( s) =
1 s +4 2
(12.4)
Fig. 12.1. Simulink block diagram of the Plant 1 and Plant 2.
12.3 Fuzzy Logic Control Design In this section we design a fuzzy logic controller (FLC) where the optimal controller was found with the first optimization method, which in this case is the genetic algorithm [49]. For the FLC a Takagi-Sugeno type of fuzzy system is used with two inputs a) error, and b) change of error, with three membership functions each input, “Negative, Zero and Positive” (Gaussian and triangular), one output which are constant values, and nine fuzzy rules (IF – THEN). Fig 12.2 shows the FLC membership functions for the plant control. Once we obtained the FLC design, we used an optimization method to find the optimal Controller.
Fig. 12.2. a) input 1 “error”, b) input 2 “error change”.
12.4 Simulation Results
165
Table 12.1 shows the parameters of the membership functions, the minimal and the maximum values in the search range for the PSO method to find the best type1 fuzzy controller system and Table 12.2 shows the parameters of the membership function of the type-2 FLC. Table 12.1. Parameters of the membership functions for type-1 FLC. Plant 1
Plant 2
MF Type Gaussian
Triangular
Gaussian
Point a b a b c a b
Minimum Value 0.3 -1.2 -0.8 0 0.3 0.3 0.8
Maximum Value 0.6 -0.8 -0.3 0 0.8 0.6 1.2
MF Type Gaussian
Triangular
Gaussian
Point a b a b c a b
Minimum Value 1.8 -6 -3 0 0.5 1.8 4
Maximum Value 2.8 -4 -0.5 0 3 2.8 6
Table 12.2. Parameters of the membership functions for type-2 FLC.
MF Type
Gaussian
Triangular
Gaussian
Plant 1 Minimum Point Value a 0.13 b -1.2 a’ 0.22 b’ -1.2 a -1 b 0 c 0.15 a’ -0.75 b’ 0 c’ 0.5 a 0.13 b 1 a’ 0.22 b’ 1
Maximum Value 0.14 -1 0.43 -1 -0.75 0 0.25 -0.25 0 0.75 0.14 1.2 0.43 1.2
MF Type
Gaussian
Triangular
Gaussian
Plant 2 Minimum Point Value a 1.8 b -7 a’ 1.5 b’ -7 a -3 b 0 c 0.5 a’ -2 b’ 0 c’ 1 a 1.8 b 3 a’ 1.5 b’ 3
Maximum Value 2.8 -3 1.6 -3 -2.5 0 2 -1 0 3 2.8 7 1.6 7
12.4 Simulation Results In this section, we evaluate, through computer simulations performed in MATLAB® and SIMULINK®, the designed FLC for the two plants using the PSO optimization method. We use random values in the cognitive (C1), social (C2) and inertia parameters of the PSO.
166
12 Optimization of Type-2 Fuzzy Logic Controllers
12.4.1 PSO with type-1 FLC for Plant 1 Table 12.3 presents the main results of the FLC obtained with the PSO showing in the first row the best result. Table 12.3. Results of the Type-1 FLC for Plant 1 obtained by PSO. No. 1 2 3 4 5 6 7 8 9 10
Swarm (Population)
Max Iterations
C1
200 200 200 200 200 200 200 200 200 200
70 70 70 70 70 70 70 70 70 70
0.4542 0.9667 0.183 0.6798 0.0016 0.484 0.7046 0.1344 0.1223 0.1589
C2 0.5052 0.3883 0.8722 0.7371 0.8994 0.704 0.9151 0.3959 0.5346 0.0366
Inertia
Time exec
0.9038 0.8501 0.9289 0.6119 0.6983 0.7194 0.9988 0.2534 0.0681 0.6223
0:26:26 0:44:46 0:09:23 0:54:22 0:45:59 0:49:16 0:05:59 0:58:29 0:57:48 1:04:45
Average error 0.081179 0.086795 0.087324 0.089289 0.090177 0.092952 0.095280 0.096134 0.103938 0.109765
Fig 12.3 shows the Particles behavior of PSO giving the best type-1 FLC for controlling the plant 1 and fig 12.4 shows the membership functions of the optimized controller.
Fig. 12.3. Behavior of PSO particles of Type-1 FLC optimization.
12.4 Simulation Results
167
Fig. 12.4. Input a “error” and input b “errordev” of the optimized FLC.
The simulations result of the optimized Type-1 FLC for Plant 1 is shown in the fig 12.5.
Fig. 12.5. Simulations result of type-1 FLC for Plant 1.
12.4.2 PSO with Type-1 FLC for Plant 2 Table 12.4 presents the main results of the FLC obtained with the PSO showing in the first row the best result.
168
12 Optimization of Type-2 Fuzzy Logic Controllers Table 12.4. Results of the Type-1 FLC for Plant 2 obtained by PSO.
1
Swarm (Population) 200
Max Iterations 70
Inertia
Time exec
0.6746
0.8477
0:34:32
Average error 0.131933
0.0429
2
200
70
0.7580
0.1716
0.5573
3
200
70
0.7488
0:49:17
0.136293
0.0884
0.9051
0:39:05
4
200
70
0.141524
0.8149
0.9059
0.1706
0:49:38
5
200
0.148655
70
0.0660
0.7696
0.5558
0:44:32
0.150427
6 7
200
70
0.8660
0.1036
0.5554
1:05:25
0.151731
200
70
0.5543
0.6067
0.4974
0:50:25
0.152046
8
200
70
0.7154
0.2479
0.5130
0:55:45
0.154302
9
200
70
0.0158
0.0882
0.2155
1:02:43
0.160239
10
200
70
0.4458
0.9566
0.3233
0:51:22
0.164745
No.
C1
C2
Fig. 12.6 shows the particles behavior of PSO giving the best type-1 FLC for controlling the plant 2 and Fig. 12.7 shows the membership functions of the optimized controller.
Fig. 12.6. Behavior of PSO particles of Type-1 FLC optimization.
Fig. 12.7. Input a “error” and input b “errordev” of the optimized FLC.
12.4 Simulation Results
169
The simulation result of the optimized Type-1 FLC for Plant 2 is shown in fig 12.8.
Fig. 12.8. Simulations result of type-1 FLC for Plant 2.
12.4.3 PSO with Type-2 FLC for Plant 1 Table 12.5 presents the main results of the FLC obtained with PSO showing in the first row the best result. Table 12.5. Results of the Type-2 FLC for Plant 1 obtained by PSO. No. 1 2 3 4 5
Swarm (Population)
Max Iterations
200 200 200 200 200
90 70 70 70 70
C1 0.5149 0.8149 0.8129 0.7646 0.8168
C2 0.3317 0.9059 0.8159 0.9229 0.9359
Inertia
Time exec
Average error
0.6808 0.1706 0.1906 0.1096 0.4806
7:05:20 12:44:19 10:52:09 9:50:45 11:05:43
0.08028 0.08794 0.08894 0.12521 0.12630
Fig 12.9 shows the particles behavior of PSO giving the best type-2 FLC for controlling the plant 1 and fig 12.10 shows the membership functions of the optimized controller.
170
12 Optimization of Type-2 Fuzzy Logic Controllers
Fig. 12.9. Behavior of PSO particles of Type-2 FLC optimization.
Fig. 12.10. Input a “error” and input b “errordev” of the optimized FLC.
The simulation result of the optimized Type-2 FLC for Plant 1 is shown in fig 12.11.
Fig. 12.11. Simulations result of type-2 FLC for Plant 1.
12.4 Simulation Results
171
12.4.4 PSO with Type-2 FLC for Plant 2 Table 12.6 presents the main results of the FLC obtained with PSO showing in the first row the best result. Table 12.6. Results of the Type-2 FLC for Plant 2 obtained by PSO. No. 1 2 3 4 5
Swarm (Population) 200 200 200 200 200
Max Iterations 90 70 70 70 70
C1
C2
Inertia
Time exec
0.5149 0.8149 0.8129 0.7646 0.8168
0.3317 0.9059 0.8159 0.9229 0.9359
0.6808 0.1706 0.1906 0.1096 0.4806
7:05:20 12:44:19 10:52:09 9:50:45 11:05:43
Average error 0.08028 0.08794 0.08894 0.12521 0.12630
Fig. 12.12 shows the Particles behavior of PSO giving the best type-2 FLC for controlling the plant 1 and Fig. 12.13 shows the membership functions of the optimized controller.
Fig. 12.12. Behavior of PSO particles of Type-2 FLC optimization.
Fig. 12.13. Input a “error” and input b “errordev” of the optimized FLC.
The simulation result of the optimized Type-2 FLC for Plant 2 is shown in Fig 12.14.
172
12 Optimization of Type-2 Fuzzy Logic Controllers
Fig. 12.14. Simulations result of type-2 FLC for Plant 2.
12.5 Summary We described in this chapter the use of an optimization method for the simulation design of optimized FLCs. In particular we presented results for PSO in Type-1 and Type-2 FLC optimization for linear plants. The simulation results show that the closed-loop system with the type-1 FLC obtained is stabilized in less than 10 sec. On the other hand, the Type-2 FLC’s obtained are better than the Type-1 FLC’s because they gets stabilization in less than 5 seconds, but with more overshoot in the second Plant that the first one. The plots of the results show this difference. We have achieved satisfactory results with PSO; the next step is to solve the problem using Type-2 FLC in a perturbed environment and considering multiple objective optimization to obtain better results. Moreover, we will extend the results to nonlinear systems, like for autonomous mobile robots.
Chapter 13
Optimization of an Interval Type 2 Fuzzy Controller for an Autonomous Mobile Robot Using the Particle Swarm Optimization Algorithm
This chapter describes the application of the optimization algorithm for particle swarm known by its acronym as PSO, used to adjust the parameters of membership functions of a fuzzy logic controller (FLC) to find the optimal intelligent control for a wheeled autonomous mobile robot [47]. Results of several simulations show that the PSO is able to optimize the type-1 and type 2 FLC for this specific application [15].
13.1 Introduction Over the years, science and technology advance by leaps and bounds. Sometimes faster sometimes slower, but always moves forward. It is with this development which new branches and areas of application. One of them, and for this research, the most important, is the branch of control applied to autonomous mobile robots [3, 13]. There are many techniques and control algorithms for these robots, each with its own characteristics, each of them and they offer advantages and disadvantages that allows the scientist the option to use the one you serve for your homework or research. Given the specialization of new mechanisms are required well control techniques are able to offer a satisfactory job in performing this task [3, 39, 47, 48] One such technique is called "Fuzzy Logic", which is considered one of the best [84]. This is its versatility, flexibility and simplicity. This technique became known in the years 60 (in 1965 by Lotfi A. Zadeh, professor at the University of California Berkeley) for the article "Fuzzy Sets" Information and Control. Fuzzy logic is one of the most used methods of computational intelligence and the better future, this is possible thanks to the efficiency and simplicity of fuzzy systems because they use linguistic terms similar to those that humans use [8, 10, 13]. The complexity in the development of these fuzzy systems can be found in deciding what the best parameters of membership functions, the number of rules, or even the best detail that could give us the best solution to the problem we want solve [25, 26]. O. Castillo: Type-2 Fuzzy Logic in Intelligent Control Applications, STUDFUZZ 272, pp. 173–180. © Springer-Verlag Berlin Heidelberg 2012 springerlink.com
174
13 Optimization of an Interval Type 2 Fuzzy Controller
A solution to the problem mentioned is the application of bio-inspired algorithms for optimization of fuzzy systems [3, 4, 41, 47, 48, 60]. Optimization algorithms can be a useful tool because of its ability to solve nonlinear problems either limited or even NP-hard problems. Among the most widely used optimization methods are [15]: genetic algorithms (GA), Ant Colony Optimization (ACO), particle swarm optimization (PSO), etc. This chapter describes the application of particle swarm algorithm (PSO) as a method of optimizing the parameters of membership functions of the proposed fuzzy logic controller (FLC) in order to find the best intelligent controller for an autonomous mobile robot wheel.
13.2 Optimization Algorithm Using Particle Swarm (PSO) Optimizer by clouds or swarm of particles (PSO) is a relatively new technique that is slowly taking rise and recognition as an effective and efficient algorithm [50]. While PSO algorithm shares similarities with other evolutionary computation techniques while also differs in certain respects and needs no evolution operators such as crossover and mutation [47, 49]. PSO emulates the swarm behavior of insects, a herd of grazing animals, a cloud of birds, a host of fish in these swarms or clouds that made the search for food in a collaborative manner. Each member of a swarm adapts its search patterns, learning from his own experience and experiences of other members, i.e. taking into account their cognitive beliefs and social beliefs. These phenomena are discussed in the algorithm and the mathematical models are built on the method for updating the positions of each particle. In the PSO algorithm, a member in the swarm, called a particle, represents a possible solution is a point in the search space. The global optimum is considered as the location of food, the problem would be implemented as the optimal solution found. Each particle has a fitness value and a speed to adjust the flying direction according to the best. The general formula (equation 13.1) for determining the motion of particles which are presented below, is shown in two parts the cognitive and social part of which are crucial to identify the type of algorithm that is being implemented in our case we used the Full GBEST i.e. both C1 and C2 must have values greater than 0 but less than 4, respectively. Vid = Vid (t + 1) + C1rid(t) [Yid(t) – Xid(t)] + C2r2(t) [Yid(t) – Xid(t)]
(13.1)
There is another formula (equation 13.2) that is critical for the update of each particle, this assesses the current position of the particle and the previous position to choose which is the most appropriate to find more quickly the result this position is recalculated at each new iterations that is the algorithm. Xi(t+1) = Xi(t) + Vi (t +1)
(13.2)
13.3 Design of the Fuzzy Controller
175
13.3 Design of the Fuzzy Controller As determined by one of the most used and effective techniques to solve control problems is to use fuzzy systems to meet the control objective, so it is necessary to design a fuzzy controller for the actual speed of the mobile robot. In this research work, a type inference systems using Takagi-Sugeno type fuzzy system in order both 1 and 2, the use of linguistic variables in the input and output functions is applied. The error of linear and angular velocities (respectively) was taken as input variables, while the left and right pairs are taken as outputs. The membership functions used in the entry are trapezoidal for negative (N) and positive (P), and a triangle was used to zero (C) linguistic terms. Figure 13.1 shows the input and output variables used, these are used for both types of fuzzy logic (1 and 2). (a)
(b)
Fig. 13.1. Variable input / output: (a) error of the linear velocity (ev). (b) Angular velocity error (ew). (c) exit fee (τ 1). (d) exit left (τ 2).
The FLC has 9 rules, which are adapted to the style of Takagi-Sugeno controller, so the output has a single point, so the results are constants values (P, C, N), which obtained through a procedure using a weighted average defuzzification by. ϖ ϖ ϖ ϖ ϖ ϖ ϖ
R1: R2: R3: R4: R5: R6: R7:
If Vangular VLineal is C is C, then τ τ 1 is C and C 2 is If Vangular VLineal is C is P, then τ τ 1 is C and P 2 is If Vangular VLineal is C and is N, then τ τ 1 is C 2 is If P and Vangular VLineal it is C, then 1 is P and τ τ 2 is If Vangular VLineal is P and is P, then τ τ 1 is P and P 2 is If VLineal is P and Vangular is N, then 1 is P and τ τ 2 is If VLineal is N and Vangular is C, then τ τ 1 is N and C 2 is
C P N C P N C
176
13 Optimization of an Interval Type 2 Fuzzy Controller
ϖ R8: If VLineal is N and Vangular is P, then τ τ 1 is N and P 2 is P ϖ R9: If Vangular VLineal is N and is N, then τ τ 1 is N and N 2 is N The linguistic terms of input variables are shown in the first row and column of Table 13.1, the rest of the content corresponds to the linguistic terms of output variables. Table 13.1 FLC Rules
ev/ew N C P
N N/N C/N P/N
C N/C C/C P/C
P N/P C/P P/P
13.4 Results of the Simulations This section presents the results of proposed controller to stabilize the autonomous mobile robot. The evaluation is done through computer simulation done in MATLAB ® and Simulink ® 2007b. Table 13.2 shows the results of the FLC, obtained by varying the values of maximum iterations and the number of particles, where the highlighted row shows the best result obtained with the method. Figure 13.2 shows the behavior of the optimization method. Table 13.2 Results for PSO using the constriction coefficient for type-1. Experiment
Iterations
Swarm
No.
Coefficient
Average
Constriction
error
Runtime
1
50
50
1.0
0.0606
00:20:05
2
100
200
1.0
0.2670
02:44:53
3
100
100
1.0
0.0301
01:49:55
4
100
150
1.0
0.0315
01:54:31
5
100
50
1.0
0.0266
03:16:34
6
100
57
1.0
0.0211
00:41:38
7
100
300
1.0
0.0276
04:04:54
8
100
80
1.0
0.0527
01:03:45
9
150
80
1.0
0.0260
01:35:17
10
300
150
1.0
0.0307
04:30:16
11
500
200
1.0
0.0529
39:56:23
12
200
90
1.0
0.0345
01:54:59
13
150
100
1.0
0.0496
01:36:37
14
100
53
1.0
0.0230
00:39:29
13.4 Results of the Simulations
177
Fig. 13.2. Evolution of PSO for the optimization of FLC.
Figure 13.3 shows the membership functions of the FLC obtained by the PSO algorithm, and achieved the desired path and the degree of error was obtained
(a)
(c)
(b)
(d)
Fig. 13.3. (a) linear velocity (ev), (b) Angular velocity (ew), (c) shows the desired path and the trajectory obtained, (d) plots representing the degree of error in the simulation.
178
13 Optimization of an Interval Type 2 Fuzzy Controller
As you can see, the above results are acceptable for type-1 FLC obtaining a final result of 0.0211 using 57 particles and 100 iterations in a time of 47 minutes and 38 seconds for this experiment, but as previously mentioned were also simulations with type-2, taking into account the same parameters and conditions of Takagi-Sugeno controller, the results of these simulations are presented below in Table 13.3. Figure 13.4 shows the convergence of the PSO algorithm. Table 13.3 Results of PSO using the constriction coefficient for type-2. Experiment
Iterations
Swarm
No.
Coefficient Constriction
Average
Runtime
error
1
100
150
1.0
0.0659
02:20:31
2
100
200
1.0
0.0675
02:56:21
3
100
250
1.0
0.0666
03:05:31
4
200
150
1.0
0.0663
03:55:06
5
200
200
1.0
0.0651
04:07:14
6
200
250
1.0
0.0642
04:20:10
7
200
300
1.0
0.0536
04:54:43
8
200
350
1.0
0.0554
05:12:09
9
250
350
1.0
0.0600
05:38:20
10
300
300
1.0
0.0531
06:12:57
11
300
350
1.0
0.0503
07:30:28
12
300
380
1.0
0.0500
07:55:08
13
350
400
1.0
0.0501
08:10:15
14
350
450
1.0
0.0503
08:59:01
15
400
300
1.0
0.0502
12:31:11
Fig. 13.4. Plot of convergence of PSO algorithm.
13.5 Summary
179
Figure 13.5 shows the membership functions of the FLC obtained by the PSO algorithm, and achieved the desired path and the degree of error was obtained.
(a)
(c)
(b)
(d)
Fig. 13.5. (a) linear velocity (ev), (b) Angular velocity (ew), (c) shows the desired path and the trajectory obtained, (d) plots representing the degree of error in the simulation.
The above results are acceptable for type-2 fuzzy logic control because we obtain a final result of 0.0500 using 380 particles and 300 iterations in a time of 7 hours 55 minutes and 08 seconds for this experiment, which is cannot be considered high due to the complexity of the problem. The type-2 fuzzy controllers were implemented with the type-2 fuzzy logic toolbox that was developed previously by our research group [17, 18, 19].
13.5 Summary With the results of the experiments shown in Table 13.4, we can determine that for this particular problem the optimized type-2 fuzzy logic controller clearly outperform its type-1 counterpart.
180
13 Optimization of an Interval Type 2 Fuzzy Controller Table 13.4 Comparison of results of PSO algorithm for type-1 and type-2. Iterations
Swarm
Average error
PSO with type-1
Runtime
100
57
0.0211
00:41:38
300
380
0.0050
07:55:08
fuzzy logic PSO with type-2 fuzzy logic
The trajectory tracking controller is designed based on the dynamics and kinematics of mobile autonomous robot through the application of PSO for the optimization of membership functions of fuzzy controller both type-1 and type-2 with the good results obtained after simulations.
References
[1] Aliev, R.A., Pedrycz, W., Guirimov, B.G., Aliev, R.R., Ilhan, U., Babagil, M., Mammadli, S.: Type-2 fuzzy neural networks with fuzzy clustering and differential evolution optimization. Information Sciences 181, 1591–1608 (2011) [2] Al-Jaafreh, M.O., Al-Jumaily, A.A.: Training type-2 fuzzy system by particle swarm optimization. In: IEEE Congress on Evolutionary Computation, CEC 2007, Singapore, pp. 3442–3446 (2007) [3] Astudillo, L., Castillo, O., Aguilar, L.T., Martínez, R.: Hybrid Control for an Autonomous Wheeled Mobile Robot Under Perturbed Torques. In: Melin, P., Castillo, O., Aguilar, L.T., Kacprzyk, J., Pedrycz, W. (eds.) IFSA 2007. LNCS (LNAI), vol. 4529, pp. 594–603. Springer, Heidelberg (2007) [4] Astudillo, L., Melin, P., Castillo, O.: A new optimization method based on a paradigm inspired by nature. In: Melin, P., Kacprzyk, J., Pedrycz, W. (eds.) Soft Computing for Recognition Based on Biometrics. SCI, vol. 312, pp. 277–283. Springer, Heidelberg (2010) [5] Bajestani, N.S., Zare, A.: Application of optimized type-2 fuzzy time series to forecast Taiwan stock index. In: 2nd International Conference on Computer, Control and Communication, pp. 275–280 (2009) [6] Cai, A., Quek, C., Maskell, D.L.: Type-2 GA-TSK fuzzy neural network. In: Proceedings of IEEE Congress on Evolutionary Computation, CEC 2007, pp. 1578–1585 (2007) [7] Cao, J., Li, P., Liu, H., Brown, D.: Adaptive fuzzy controller for vehicle active suspensions with particle swarm optimization. In: Proceedings of SPIE-The International Society of Optical Engineering, vol. 7129 (2008) [8] Castillo, O., Melin, P.: Soft Computing for Control of Non-Linear Dynamical Systems. Springer, Heidelberg (2001) [9] Castillo, O., Melin, P.: Hybrid intelligent systems for time series prediction using neural networks, fuzzy logic and fractal theory. IEEE Trans. on Neural Networks 13, 1395–1408 (2002) [10] Castillo, O., Melin, P.: Soft Computing and Fractal Theory for Intelligent Manufacturing. Springer, Heidelberg (2003) [11] Castillo, O., Martinez, A.I., Martinez, A.C.: Evolutionary computing for topology optimization of type-2 fuzzy systems. Advances in Soft Computing, vol. 41, pp. 63–75 (2007) [12] Castillo, O., Huesca, G., Valdez, F.: Evolutionary computing for topology optimization of type-2 fuzzy controllers. STUDFUZZ, vol. 208, pp. 163–178 (2008) [13] Castillo, O., Melin, P.: Type-2 Fuzzy Logic: Theory and Applications. Springer, Heidelberg (2008)
182
References
[14] Castillo, O., Aguilar, L.T., Cazarez-Castro, N.R., Cardenas, S.: Systematic design of a stable type-2 fuzzy logic controller. Applied Soft Computing Journal 8, 1274–1279 (2008) [15] Castillo, O., Martinez-Marroquin, R., Melin, P., Valdez, F., Soria, J.: Comparative study of bio-inspired algorithms applied to the optimization of type-1 and type-2 fuzzy controllers for an autonomous mobile robot. Information Sciences (article in press, 2011) [16] Castillo, O., Melin, P., Alanis, A., Montiel, O., Sepulveda, R.: Optimization of interval type-2 fuzzy logic controllers using evolutionary algorithms. Journal of Soft Computing 15, 1145–1160 (2011) [17] Castro, J.R., Castillo, O., Melin, P.: An Interval Type-2 Fuzzy Logic Toolbox for Control Applications. In: Proceedings of FUZZ-IEEE 2007, London, pp. 1–6 (2007) [18] Castro, J.R., Castillo, O., Martinez, L.G.: Interval type-2 fuzzy logic toolbox. Engineering Letters 15(1), 14 (2007) [19] Castro, J.R., Castillo, O., Melin, P., Martinez, L.G., Escobar, S., Camacho, I.: Building fuzzy inference systems with the interval type-2 fuzzy logic toolbox. Advances in Soft Computing, vol. 41, pp. 53–62 (2007) [20] Castro, J.R., Castillo, O., Melin, P., Rodriguez-Diaz, A.: A hybrid learning algorithm for a class of interval type-2 fuzzy neural networks. Information Sciences 179, 2175– 2193 (2009) [21] Cazarez-Castro, N.R., Aguilar, L.T., Castillo, O.: Genetic optimization of a type-2 fuzzy controller for output regulation of a servomechanism with backlash. In: Proceedings of the International Conference on Electrical Engineering, Computing Science and Automatic Control CCE 2008, Mexico, pp. 268–273 (2008) [22] Cazarez-Castro, N.R., Aguilar, L.T., Castillo, O.: Hybrid genetic-fuzzy optimization of a type-2 fuzzy logic controller. In: Proceedings of the 8th International Conference on Hybrid Intelligent Systems, HIS 2008, Barcelona, pp. 216–221 (2008) [23] Cervantes, L., Castillo, O.: Design of a fuzzy system for the longitudinal control of an F-14 airplane. In: Castillo, O., Kacprzyk, J., Pedrycz, W. (eds.) Soft Computing for Intelligent Control and Mobile Robotics. Studies in Computational Intelligence, vol. 318, pp. 213–224. Springer, Heidelberg (2010) [24] Chua, T.W., Tan, W.W.: Genetically Evolved Fuzzy Rule-Based Classifiers and Application to Automotive Classification. In: Li, X., Kirley, M., Zhang, M., Green, D., Ciesielski, V., Abbass, H.A., Michalewicz, Z., Hendtlass, T., Deb, K., Tan, K.C., Branke, J., Shi, Y. (eds.) SEAL 2008. LNCS, vol. 5361, pp. 101–110. Springer, Heidelberg (2008) [25] Cordon, O., Gomide, F., Herrera, F., Hoffmann, F., Magdalena, L.: Ten years of genetic fuzzy systems: current framework and new trends. Fuzzy Sets and Systems 141, 5–31 (2004) [26] Cordon, O., Herrera, F., Villar, P.: Analysis and guidelines to obtain a good uniform fuzzy partition granularity for fuzzy rule-based systems using simulated annealing. International Journal of Approximate Reasoning 25, 187–215 (2000) [27] Coupland, S., John, R.: New geometric inference techniques for type-2 fuzzy sets. International Journal of Approximate Reasoning 49, 198–211 (2008) [28] Dereli, T., Baykasoglu, A., Altun, K., Durmusoglu, A., Turksen, I.B.: Industrial applications of type-2 fuzzy sets and systems: A concise review. Computers in Industry 62, 125–137 (2011)
References
183
[29] Garcia, J.C.F.: An evolutive interval type-2 TSK fuzzy logic system for volatile time series identification. In: Proceedings of the IEEE International Conference on Systems, Man and Cybernetics, pp. 666–671 (2009) [30] Hagras, H.: Hierarchical type-2 fuzzy logic control architecture for autonomous mobile robots. IEEE Transactions on Fuzzy Systems 12, 524–539 (2004) [31] Hidalgo, D., Melin, P., Licea, G., Castillo, O.: Optimization of Type-2 Fuzzy Integration in Modular Neural Networks Using an Evolutionary Method with Applications in Multimodal Biometry. In: Aguirre, A.H., Borja, R.M., Garciá, C.A.R. (eds.) MICAI 2009. LNCS, vol. 5845, pp. 454–465. Springer, Heidelberg (2009) [32] Hidalgo, D., Castillo, O., Melin, P.: Type-1 and type-2 fuzzy inference systems as integration methods in modular neural networks for multimodal biometry and its optimization with genetic algorithms. Information Sciences 179, 2123–2145 (2009) [33] Hidalgo, D., Melin, P., Castillo, O.: Optimal design of type-2 fuzzy membership functions using genetic algorithms in a partitioned search space. In: Proceedings of the IEEE International Conference on Granular Computing, GrC 2010, San Jose, August 2010, pp. 212–216 (2010) [34] Hidalgo, D., Melin, P., Mendoza, O.: Evolutionary optimization of type-2 fuzzy systems based on the level of uncertainty. In: Proceedings of the IEEE World Congress on Computational Intelligence, WCCI 2010, Barcelona (July 2010) [35] Hsiao, M., Li, T.H.S., Lee, J.Z., Chao, C.H., Tsai, S.H.: Design of interval type-2 fuzzy sliding-mode controller. Information Sciences 178, 1686–1716 (2008) [36] Innocent, P.R., John, R.I., Belton, I., Finlay, D.: Type-2 fuzzy representations of lung scans to predict pulmonary emboli. In: Proceedings of the Annual Conference of the North American Fuzzy Information Processing Society, NAFIPS 2001, Vancouver, pp. 1902–1907 (2001) [37] Jang, J.R., Sun, C.T., Mizutani, E.: Neuro-Fuzzy and Soft Computing. Prentice-Hall, Upper Saddle River (1997) [38] Jeng, W.-H.R., Yeh, C.-Y., Lee, S.-J.: General type-2 fuzzy neural network with hybrid learning for function approximation. In: Proceedings of the IEEE Conference on Fuzzy Systems, Jeju, Korea, pp. 1534–1539 (2009) [39] Juang, C.-F., Hsu, C.-H.: Reinforcement ant optimized fuzzy controller for mobilerobot wall-following control. IEEE Transactions on Industrial Electronics 56, 3931– 3940 (2009) [40] Juang, C.-F., Hsu, C.-H.: Reinforcement interval type-2 fuzzy controller design by online rule generation and Q-value-aided ant colony optimization. IEEE Transactions on Systems, Man, and Cybernetics, Part B Cybernetics 39, 1528–1542 (2009) [41] Juang, C.-F., Hsu, C.-H., Chuang, C.-F.: Reinforcement self-organizing interval type2 fuzzy system with ant colony optimization. In: Proceedings of IEEE International Conference on Systems, Man and Cybernetics, San Antonio, pp. 771–776 (2009) [42] Karnik, N.N., Mendel, J.M.: An Introduction to Type-2 Fuzzy Logic Systems. Technical Report, University of Southern California (1998) [43] Khanesar, M.A., Teshnehlab, M., Kayacan, E., Kaynak, O.: A novel type-2 fuzzy membership function: Application to the prediction of noisy data. In: Proceedings of the IEEE International Conference on Computational Intelligence for Measurement Systems and Applications, CIMSA 2010, pp. 128–133 (2010) [44] Kim, G.-S., Ahn, I.-S., Oh, S.-K.: The design of optimized fuzzy neural networks and its application. Transactions of the Korean Institute of Electrical Engineers 58, 1615– 1623 (2009)
184
References
[45] Leal-Ramirez, C., Castillo, O., Melin, P., Rodriguez-Diaz, A.: Simulation of the bird age-structured population growth based on an interval type-2 fuzzy cellular structure. Information Sciences 181, 519–535 (2011) [46] Lopez, M., Melin, P., Castillo, O.: Optimization of response integration with fuzzy logic in ensemble neural networks using genetic algorithms. SCI, vol. 154, pp. 129– 150 (2008) [47] Martinez, R., Castillo, O., Aguilar, L.: Optimization with genetic algorithms of interval type-2 fuzzy logic controllers for an autonomous wheeled mobile robot: a comparison under different kinds of perturbations. In: Proc. IEEE FUZZ Conference, paper # FS0225 (2008) [48] Martinez-Marroquin, R., Castillo, O., Soria, J.: Parameter tuning of membership functions of a type-1 and type-2 fuzzy logic controller for an autonomous wheeled mobile robot using ant colony optimization. In: Proceedings of IEEE International Conference on Systems, Man and Cybernetics, San Antonio, pp. 4770–4775 (2009) [49] Martinez, R., Rodriguez, A., Castillo, O., Aguilar, L.T.: Type-2 fuzzy logic controllers optimization using genetic algorithms and particle swarm optimization. In: Proceedings of the IEEE International Conference on Granular Computing, GrC 2010, pp. 724–727 (2010) [50] Martinez, R., Castillo, O., Aguilar, L.T., Rodriguez, A.: Optimization of type-2 fuzzy logic controllers using PSO applied to linear plants. In: Castillo, O., Kacprzyk, J., Pedrycz, W. (eds.) Soft Computing for Intelligent Control and Mobile Robotics. Studies in Computational Intelligence, vol. 318, pp. 181–193. Springer, Heidelberg (2010) [51] Melin, P., Castillo, O.: A new method for adaptive model-based control of non-linear dynamic plants using a neuro-fuzzy-fractal approach. Journal of Soft Computing 5, 171–177 (2001) [52] Melin, P., Castillo, O.: Simulation and Control of Non-Linear Dynamical Systems. Taylor and Francis, London (2002) [53] Melin, P., Castillo, O.: A new method for adaptive model-based control of nonlinear plants using type-2 fuzzy logic and neural networks. In: Proc. IEEE FUZZ Conference, pp. 420–425 (2003) [54] Melin, P., Castillo, O.: Hybrid Intelligent Systems for Pattern Recognition. Springer, Heidelberg (2005) [55] Melin, P., Castillo, O.: An intelligent hybrid approach for industrial quality control combining neural networks, fuzzy logic and fractal theory. Information Sciences 177, 1543–1557 (2007) [56] Mendel, J.M.: Uncertainty, fuzzy logic, and signal processing. Signal Processing Journal 80, 913–933 (2000) [57] Mendoza, O., Melin, P., Castillo, O., Licea, G.: Type-2 Fuzzy Logic for Improving Training Data and Response Integration in Modular Neural Networks for Image Recognition. In: Melin, P., Castillo, O., Aguilar, L.T., Kacprzyk, J., Pedrycz, W. (eds.) IFSA 2007. LNCS (LNAI), vol. 4529, pp. 604–612. Springer, Heidelberg (2007) [58] Mendoza, O., Melin, P., Castillo, O.: Interval type-2 fuzzy logic and modular neural networks for face recognition applications. Applied Soft Computing Journal 9, 1377– 1387 (2009) [59] Mendoza, O., Melin, P., Licea, G.: Interval type-2 fuzzy logic for edges detection in digital images. Int. Journal of Intelligent Systems 24, 1115–1133 (2009) [60] Menolascina, F., Bevilacqua, V., Zarrilli, M., Mastronardi, G.: Induction of fuzzy rules by means of artificial immune systems in bioinformatics. STUDFUZZ, vol. 242, pp. 1–17 (2009)
References
185
[61] Mohammadi, S.M.A., Gharaveisi, A.A., Mashinchi, M.: An evolutionary tuning technique for type-2 fuzzy logic controller in a non-linear system under uncertainty. In: Proceedings of the 18th Iranian Conference on Electrical Engineering, ICEE 2010, pp. 610–616 (2010) [62] Muñoz, R., Castillo, O., Melin, P.: Optimization of fuzzy response integrators in modular neural networks with hierarchical genetic algorithms: The case of face, fingerprint and voice recognition. In: Castillo, O., Pedrycz, W., Kacprzyk, J. (eds.) Evolutionary Design of Intelligent Systems in Modeling, Simulation and Control. Studies in Computational Intelligence, vol. 257, pp. 111–129. Springer, Heidelberg (2009) [63] Ozen, T., Garibaldi, J.M.: Investigating Adaptation in Type-2 Fuzzy Logic Systems Applied to Umbilical Acid-Base Assessment. In: European Symposium on Intelligent Technologies, Hybrid Systems and their implementation on Smart Adaptive Systems, EUNITE 2003, Oulu, Finland (2003) [64] Park, K.-J., Oh, S.-K., Pedrycz, W.: Design of interval type-2 fuzzy neural networks and their optimization using real-coded genetic algorithms. In: Proceedings of the IEEE Conference on Fuzzy Systems, Jeju, Korea, pp. 2013–2018 (2009) [65] Poornaselvan, K.J., Gireesh Kumar, T., Vijayan, V.P.: Agent based ground flight control using type-2 fuzzy logic and hybrid ant colony optimization to a dynamic environment. In: Proceedings of the 1st International Conference on Emerging Trends in Engineering and Technology, ICETET 2008, pp. 343–348 (2008) [66] Qiu, Y., Zhang, Y.-Q., Zhao, Y.: Statistical genetic interval-valued fuzzy systems with prediction in clinical trials. In: Proceedings of the IEEE International Conference on Granular Computing, San Jose, pp. 129–132 (2007) [67] Sánchez, D., Melin, P.: Modular neural network with fuzzy integration and its optimization using genetic algorithms for human recognition based on iris, ear and voice biometrics. In: Melin, P., Kacprzyk, J., Pedrycz, W. (eds.) Soft Computing for Recognition Based on Biometrics. SCI, vol. 312, pp. 85–102. Springer, Heidelberg (2010) [68] Sepulveda, R., Castillo, O., Melin, P., Montiel, O.: An efficient computational method to implement type-2 fuzzy logic in control applications. Advances in Soft Computing, vol. 41, pp. 45–52 (2007) [69] Sepulveda, R., Castillo, O., Melin, P., Rodriguez-Diaz, A., Montiel, O.: Experimental study of intelligent controllers under uncertainty using type-1 and type-2 fuzzy logic. Information Sciences 177, 2023–2048 (2007) [70] Sepúlveda, R., Montiel, O., Lizárraga, G., Castillo, O.: Modeling and simulation of the defuzzification stage of a type-2 fuzzy controller using the xilinx system generator and simulink. In: Castillo, O., Pedrycz, W., Kacprzyk, J. (eds.) Evolutionary Design of Intelligent Systems in Modeling, Simulation and Control. SCI, vol. 257, pp. 309– 325. Springer, Heidelberg (2009) [71] Starczewski, J.T.: Efficient triangular type-2 fuzzy logic systems. International Journal of Approximate Reasoning 50, 799–811 (2009) [72] Tan, W.-W., Wu, D.: Design of type-reduction strategies for type-2 fuzzy logic systems using genetic algorithms. SCI, vol. 66, pp. 169–187 (2007) [73] Urias, J., Hidalgo, D., Melin, P., Castillo, O.: A method for response integration in modular neural networks with type-2 fuzzy logic for biometric systems. Advances in Soft Computing, vol. 41, pp. 5–15 (2007) [74] Wagenknecht, M., Hartmann, K.: Application of fuzzy sets of type 2 to the solution of fuzzy equations systems. Fuzzy Sets and Systems 25, 183–190 (1988)
186
References
[75] Wagner, C., Hagras, H.: A genetic algorithm based architecture for evolving type-2 fuzzy logic controllers for real world autonomous mobile robots. In: Proceedings of the IEEE Conference on Fuzzy Systems, London (2007) [76] Wagner, C., Hagras, H.: Evolving type-2 fuzzy logic controllers for autonomous mobile robots. Advances in Soft Computing, vol. 41, pp. 16–25 (2007) [77] Walker, C., Walker, E.: Sets with type-2 operations. International Journal of Approximate Reasoning 50, 63–71 (2009) [78] Wang, C.-H., Cheng, C.-S., Lee, T.-T.: Dynamical optimal training for interval type-2 fuzzy neural network (T2FNN). IEEE Transactions on Systems, Man, and Cybernetics, Part B Cybernetics 34, 1462–1477 (2004) [79] Widrow, B., Glover, J.R.: Adaptive noise cancelling: principles and applications. IEEE Proceedings 63, 1692–1716 (1975) [80] Widrow, B., Stearns, D.: Adaptive Signal Processing. Prentice-Hall, Upper Saddle River (1985) [81] Wu, D., Tan, W.-W.: A type-2 fuzzy logic controller for the liquid level process. In: Proceedings of the IEEE Conference on Fuzzy Systems, Budapest, pp. 953–958 (2004) [82] Wu, D., Tan, W.-W.: Genetic learning and performance evaluation of interval type-2 fuzzy logic controllers. Engineering Applications of Artificial Intelligence 19, 829– 841 (2006) [83] Yager, R.R.: Fuzzy subsets of type II in decisions. J. Cybernetics 10, 137–159 (1980) [84] Zadeh, L.A.: The concept of a linguistic variable and its application to approximate reasoning. Information Sciences 8, 43–80 (1975) [85] Zarandi, M.H.F., Turksen, I.B., Kasbi, O.T.: Type-2 fuzzy modelling for desulphurization of steel process. Expert Systems with Applications 32, 157–171 (2007) [86] Zhao, X.-Z., Gao, Y.-B., Zeng, J.-F., Yang, Y.-P.: PSO type-reduction method for geometric interval type-2 fuzzy logic systems. Journal of Harbin Institute of Technology 15, 862–867 (2008)
Index
antecedent 3 ant colony optimization 5, 136 ant system 151 aircraft control 4, 77 aircraft dynamic systems 4, 82 airplane control 4, 77 autonomous robots 4, 138, 173 ball and beam problem 5, 151 bioinspired optimization 106 bioinspired methods 106 chromosome 68, 97 chromosome representation 68 coding 68, 97 computing with words 54 control 4, 65, 151 consequents 3 crossover 67 defuzzification 21, 29 design of fuzzy systems 49 direct current motor 4, 65, 73 evolutionary algorithms 4, 67, 93 evolutionary computing 4 evolving type-1fuzzy systems 98 type-2 fuzzy systems 7, 8, 179 fuzzy controllers 4, 179 fitness evaluation 70, 71 footprint of uncertainty 11 fuzzy if-then rule 3
fuzzy inference system Mamdani 4 Sugeno 5 fuzzy Lyapunov stability 4, 49 fuzzy Lyapunov synthesis 4, 49, 61 fuzzy modeling 61 fuzzy reactive control 4, 93 fuzzy reasoning 66 fuzzy set 8 Gaussian type-2 fuzzy set 9, 126 genetic algorithms 3, 67, 93, 107 genetic fuzzy systems 67 hardware implementation 4, 67 hierarchical genetic algorithm 96 human evolutionary model 5, 119, 122 intelligent control 5, 119, 173 intersection of type-2 fuzzy sets 14 interval type-2 fuzzy control 23, 61, 119, 173 interval type-2 fuzzy set 9, 119 linguistic variable 67 lower membership functions 12, 126 Mamdani model 4 membership function Gaussian 110, 125 generalized bell 83, 158 trapezoidal 68, 139 triangular 68, 110, 139 mobile robot 4, 93, 138
188 motor control 4, 68 mutation 67 objective function 67, 99 optimization 5, 98, 105, 173 optimizing fuzzy systems 4, 99 particle swarm optimization 5, 106, 161, 172, 173, 180 population 71, 81 robot control 5, 93 robot model 94, 138 robot system 94, 138 selection mechanism 67 selection operation 67 soft computing 3 stability 4, 50
Index stable type-2 control 50 Sugeno fuzzy model 22, 164 Sugeno fuzzy control 5, 139, 164 triangular type-2 fuzzy set 56 trapezoidal type-2 fuzzy set 56, 97 tracking controller 4, 93 type-2 fuzzy controller 4, 25, 28, 103, 161, 172, 179 type-1 fuzzy logic 3, 7, 25, 119 type-2 fuzzy logic 3, 7, 119, 161 type-2 fuzzy rules 7 type-2 fuzzy set 7, 8, 119 type reduction 6, 31 type-2 systems 7, 17, 103 type-2 Sugeno FLS 22 union of type-2 fuzzy sets 13 upper membership function 12