CCIMPUTATIC) INTELLI~EN in
CrrNTROL ENGINEERING
CONTROL E N ~ I ~ E R I N ~ A Series of Reference Books and ~
~
t
~
o
o
~
Editor NEIL MJNRO, PH.D.*D.W. Professor Applied ControlE n g ~ ~ e ~ n g Universi~of M~chesterInstitute of Science andT ~ ~ o l o ~ Manchester, United Kingdom
onl linear Control of Electric Machinery, b y Darren M. ~ ~ Jun ~ Nu, and ~ i ~ oy tC. h Burg 2. C o ~ ~ u t a t i o nIntelligence al in Control Engineering, b y ~ o E. King ~ e 1,
Addi~ionalV o l u ~ e in s reparation
s ~
COMPUTATIONA INTELLIGENCE in
CONT ENGIN)-cRING
Robert E. King ~ffiver~ity of Patras Patras, Greece
MARCKL
MARCELDEKKER, INC. DEKKER
NEWYORK* BASEL
Library of Congress Catalo~ing-in-~ublication Data King, RobertE. Computational intelligencein control engineering/ Robert E. King. p.cm. -- (Controlengineering) ISBN 0-8247-1993-X (alk. paper) 1. Intelligent control systems, 2. Computational intelligertce-Industrial appli~ations. I. Title. 11. Series:Control engi~eering(Marcel Dekker) TJ217,5.K56 1999 629.8-dc2 1
98-56656 CIP
This book is printed on acid-free paper. Headqu~~ers Marcel Dekker, Inc. 270 Madison Avenue, New York, NY 10016 tel: 2 1~-696-9000;fax: 212-685-4540 Eastern He~isphe~eDistribution Marcel DekkerAC Hutgasse 4, Postfach8 12, CH-4001 Basel, Switzerland tel: 4 1-6 1-26 1-8482; 4fax: 1-6 1-26 1-8896 World Wide Web h~p://www.dekker.com The pub~isheroffers dis~ountson this book when orderedin bulk ~uantities.For more information, write to Special Sales~rofessionalMarketing at the h e a d q u ~ e raddress s above. copyright^ 1999 by Marcel Dekker, Inc. All Rights Reserved. Neither this book nor any part may be reproduced or transmi~edin any form or by any means, electronic or mechanicaI, including photocopying, micro~lming,and recording, or byany i n f o ~ a t i o nstorage and retrieval system, without p e ~ i s s i o nin writing from the publisher. Current printing (last digit): 1 0 9 8 7 6 5 4 3 2 RINTED IN THE UNITED STATES OF AMERICA
This Page Intentionally Left Blank
ries Introdu~t ion ~y text boo^ have been written on control e n ~ e e ~ desc~bing g, new t e c ~ ~ u for e s control^^ systems, or new and better ways of mathematic d y f o ~ ~ existing a ~ methods g tosolvetheeveruincreasin.gcomplex problems faced by practicing engineers. However, few of these boob finlly address the applicatio~aspects of controle n ~ e e ~Itgis. the intentionof this new series to redress this situation. li stress applicatio~issues, and notjust the ma~ematics "he series w of control e ~ ~ e eIt ~w g provide . ill texts that not only containan expos6 of both new and well-es~blis~ed tec~ques, but also present detailed exams the solution of real-world probples of the appli~ationof these m e ~ o d to lems. The authorsd l be drawnfiom both the acadernic worldand the relevant a ~ p l i c a t i osectors, ~ ady many exciting examples of the application of control lished fields of electrical, m e c h ~ c a(l ~ c l u aero~ g ), and chemical e n ~ e e ~We g . have only to look around in today's automated society to see the use of advanced roboticst e c ~ q u e in. s cturing industries; the use of automated control and ~vigation stems in air and s d a c e transport systems; the increasing useof intelligent in the many artifacts ava~ableto the domestic c o ~ ~ e r reliable supply of water, gas, and electrical power to the doand to industry. However, there are currently many chalapplica~~i~ that could benefitfiom wider exposure to the of control ~ethodolo~es, and thesys~ematicsy~e~-oriented basis inherent in the ap~~cation of control techniques. V
vi
Series ~ntrodu~tion
This new series will present books that draw on expertise theacademicworldandthe a p p ~ e a domains, ~ o ~ and will be useM not only as academically r e c o ~ e n d e dcourse texts but also as ~ d b o o k for s ~racti~oners in many a~plicatio~ do ma^.
has developed into a wellmestablishedengineeringdiscipline that has foundapplication in space t e c ~ o l oindustry, ~, household appliances and other t e c ~ o l o cal ~plementations.It was d e s i ~ e dto monitor and correct the perf o ~ ~ ofcsystems e withoutthe inte~entionofahumanoperator. Lately, with the growth of digital computers and the universal acceptance of systems theory, it was discovered and used in softer fields of an interest such as ecology, economics, biology, etc. In the meanwhile, being a dynamic discipline, Automatic Control with the aid of the digitalcomputer has evolvedfromsimple s e ~ o ~ e c h a ~ stom san a u t o n o ~ o u s s e l f ~ o r g a ~ ~ n g d e c i s i o n - ~ me a ~ ntho g do lo^ thatwas given the name of ~ ~ t ~ Z~ ~o ~i ~~ oSeveral eZ ~. t ~ ~ f e s t a t i o o nfsIntelligent Control have been proposed by various scientists in the literature. Fuzzy, Neural,~ e r ~ c ~Intelligent, c a l Cerebellar and Linguistic control systems are typical examples of such theoretically developed Intelligent Controls. However, the application of such sophisticated methodologies to est real life ~ r o ~ l e m is sfar behind the theory. The areas with the need and the smallest tolerance for adopting the techniques resulting from such theoreti~alresearch are the industrial complexes. The main reason is the lack of suitable intelligent computational algorithms and interfaces designed especially for their needs, This book attempts to correct this by first presenting the theory andthen developing various corn-
h the last 50 years, Automatic Control Theory
vii
putational a l g o r i t ~ sto be adapted for the various industrial applications that require Intelligent Control for efficient production. nt The author, who was one of the first to actually ~ p l ~ m eIntellige~tControl in i n d u s ~accom~lishes , this goal by developin by stepsomeofthemost impo~ant ~telligent ~o~putational rithms. His industrial experience, coupled with a str ground, has beenchanneledintocreatingabook academic education and a manual for the practicing i n d u s ~ a l engineer. Such a book fills a major gap in the global literature on Corn~ ~ t a ~ i InteZZi~ence ~naZ and could serveas a textfor the developing areas of biological, societal and ecological systems.I am very proud to introduce such an impo~antwork.
Conventional control techniques based on industrial three-term controllers are almost~ v e r s a l l yused in i n d u s ~ and manufac~ingtoday, despite theirobviouslimitations,Modemcontroltechniqueshavenot proved possibleto apply because of the dif~cultiesin e s t a b l i s ~ nfaith~ fbl microsco~icmodels of the processes under control. Itis not surprising, therefore, that manual control consti~testhe norm in industry. In the early 1970s InteZZi~ent ControZtechniques, which emulate the processing of h~~ owle edge about controllinga process by machine3 appeared and a new era of controlwas born. ~telligentControl has come a long way since then, breaking down the barriers of industrial conservatism with impressiveresults, ~telligentControl, which includes Fuzzy, ~ e u r a~~ e, u r o ~ ~ z y and ~ v o l ~ t i o n u r y C o nis~ the o l ? resultof applying C o ~ ~ u t a t ~ oIntelnal ligence to the control of complex systems. This class of unconventional controlsystems differs radically from conventional (or hard control) systems that are based on classical and modern control theory. The tech~ q u e of s ~telligentControl are being applied increasingly to i n d u s ~ a l control problems and are leading to solutions where conventional control methods have proved unsuccessfbl. The outcome of their application to industry and manufac~inghas been a s i ~ ~ c a improvement nt in productivi~,reduced energy c o n s ~ p t i o nand improved product quality, factors that are ofp a r a m o ~importance t in today’s global market, This book presentsan ~troductionto ComputationalIntellig includes Expert ~ y s t e ~ , gence, the branch of Soft C o ~ p ~ t i nwhich ix
X
Preface
Fuzzy Logic, A r t ~ c i a l ~ e u~r a l e ~ando~ vro l ~ u t i o Co~putation n~~ te~ with special emphasis on ~ ~ e n e t i c A l g and o r i~t ~i ~~ u l aAn~euling~ its application to Control Engineering. The theoretical backgromd requiredto allow the readerto comprehendthe ~ d e r l y i n gprinciples has beenkept to a ~~, The reader is expected to possess basic a familiari~with of conventional control principles since it is inconceiv ntional control techniques can beappliedwithout an ~derstandingof conventional control techniques. The book is written at a level suitable for both mder~aduateand graduate students as well as for practic engineers interested in learning about the new ene era ti on of ~ c o tional control systems that they are likelyto see in increasing n ~ b e r in s the next ~ l l e The~ primary ~ . objective of the book is to show the reader how the fusion of the techniques of Computational ~telligence techniques can be applied to the design of ~telligentSystems that, me like conventional control systems, can learn, remember and make decisions. After many years of teaching in higher education, the author took leave to work in industry only to face the t e c ~ o l gap o ~ between control theory and practicefirsthand, He is one of those rare academics and even rarer control engineers who had afree hand to experiment online with new ideas on large-scale industrial processes.He spent erable time trying to apply conventional moderncontrol techni str rated with the outcome, sought mconventional t e c ~ ~ u e s yield solutions to the difficult industrial control problems that His search ledhim fast to fmzy c o n ~ o land later to neural co~trol, whichheappliedtotheprocessindustrywithconsiderablesuccess. g Those ~ioneeringyears in industry proved critical to his t ~ n about control practice and the use of Co~putation~l rnte~l~gence, which is proving to be a powerful tool with which to bridget ethe~ ~ o l o ~ After some ten years in industry, the author r e ~ e to d academe, applying inverse technology transfer by inst~ctinghis students on ~ t e l l i ~ eControl nt techniques that have proved successhl inpractice. This book is the result of the experience gained during those years in industry and of teachingthis material to his class on Computational Intelligence and ~telligentControl. Many of the examples resented in the book are derived fromthis experience.
~
Preface
I
xi
Chapter 1 is an introduction to the techniques of Computational Intelligence, their origins and application to Control Engineering. Conventional and ~telligentControl are compared, with a view to focusing on the differences which led to the need for Intelligent Control in industry and m a n u f a c ~ n g Chapter . 2 discusses Expert Systems with reference to their engineering applications and presents some common applications in industry and ~ a n u f a c ~ i n Chapter g. 3 discusses ~telligent Control Systems,their goals and objectives while Chapter 4discusses its principal components. The elements of Fuzzy Logic on which Fuzzy Controllers are based are presented in Chapter 5 while Chapter 6 discusses the mechanisms of FuzzyReaso~ng,Le., the inference engine that is the kernel of every fuzzy controller, Chapter 7 defines the fizzy algorithm, methods of f i ~ i ~ c a t i oand n de-fu~ificationand outlines the principal fizzy controller design considerations. The requirements for real-time finzzy controllers, both supervisory as well as embedded, are discussed in Chapter 8, which also includesexamplesofindustrialapplications. Chapter 9 presents fuzzy three-term industrial controllers that are replacing many con~entionalthree-term controllers in the industrial envir o ~ e n t Chapter , 10 outlines theTakagi-SugenoModel-BasedFuzzy techniqueandfuzzygain-schedulingthat fuse conventional and fuzzycontrol. NeuralControl, the secondimportanttechniqueofIntelligent Control, is presented in Chapter 11. The elemental artificial neuron and ~ultinlayerartificial neural networks that form the kernel of neural controllers areintroduced in this Chapter.Thedeltaandback-propagation a l ~ o r i ~two s , of the most common algoriths for training neural network, are described in Chapter12,Chapter 13 discusses howneural controllers can be trained from linguistic controlrules identical to those used in fuzzy control. Finally,the result of fusing fuzzy and neural techniques of Computational Intelligencein the design of hybridneuro-fuz~ controllers is discussed in Chapter 14. Evol~tionaryComputation,thelatest entrant in the field of ~ o ~ p u t a t i o nIntelligence, al and GeneticA l g o r i t ~ sthe , best known exa~ techniques, are presented in ample of stochastic n ~ e r i c optimization Chapter 15, Chapter 16 introduces Simulated Annealing, an alternative stochastic techniquethat has foundconsiderable application in engifieering optimization. Finally, Chapter 17 emo on st rates how these two
xii
Preface
t e c ~ ~ u can e s be used to advantage in the design of conventional and nal intelligent controllers. An extensive Biblio~aphyon ~ o ~ p ~ t a t i oInnce andits applications is given in Chapter 18. Appendix A offers a step-by-step study for the design of controller of a realistic non- line^ dynamic plant using MATLAB Fuzzy Toolbox. Appendices B and C offer listings of the MATLAB mfiles of Genetic and Simulated Annealing A l g o r i t ~ s Finally, . Appendix D offers a listing of a MATLAB m-file for ~ a i n d u~ s ~ a neural ln ~ the Neural Toolbox. These m-files can bed o ~ o a d e d from the author's website given in the Appendix,
This book would not have been written but for two people: an anonymous donor and Dr. Mark Hardy, ~ u c ~ oProfessor s s of ~urgeryin the D e p ~ e nof t Surgery at the College of Physicians& S ~ g e o of' n ~Columbia University in New York, who performed his kidney ~ansplant. ave him the most precious of gifts: t v e . The author is forever indebted to them, Theauthorgratefullyacknowledgesthe con~butionsof his former s ~ d e n t N. s ~tonopoulosto Chapter 2, K.Kouramas to Chapters 2 and 10, P. Skantzakis to Chapter 1 1, G. Tsitouras to Chapter 13 and V. Goggos to Chapters15,16 and 17.
Series I~troductionby Neil Munro Foreword by George N. Saridis
vii *
Preface
1. ~ n t ~ o ~ ~ c t i o ~ 1.1 Conventional Control 1.2 ~telligentControl 1.3 Computational Intelligencein Control
xpert Systems in Industry 2.1 Elements of an Expert System 2.2 The Needfor Expert Systems 2.3 Stages in the ~ e v e l o p ~of e ~ant Expert System 2.4 The Representationof Knowledge 2.5 Expert System P ~ a d i ~ s 2.5.1 Expert systems for product design 2.5.2 Expert systems for plant s ~ u l a t i o ~ and operator training 2 5.3 Expert s u p e ~ i s ocontrol ~ systems
2 6 8
13 15 17
18 20 20
21 22 23 xiii
content^
XiV
2.5.4Expert systems for the design of ~ d u s ~ icon~ollers al 2.5.5 Expert systems for fault prediction and diagnosis 2.5.6 Expert systems for the prediction of emergency plant~onditions 2.5.7 Expert systemsfor energy ma~agement 2.5.8 Expert systems for production s~~edul~g 2.5.9 Expert systems for the di of m a l ~ c t i o n s
24 24 26 26 27 28
~ntelligentControl 3.1 Conditions for the Use of~telligentControl 3.2 Objectives of ~telligentControl
31 33 34
T e c ~ n i ~ of ~ e~sn t e l ~ i Control ~~nt 4.1 Unconventional Control 4.2 Autonomy and~telligentControl 4.3 ~ o ~ ~ e d g e - B aSystems sed 4.3.1 Expert systems 4.3.2 Fuzzy control 4.3.3 Neural control 4.3.4 Neuro-fkzy control
39 40 45 48 49 50 51 51
lernents of Fuzzy Logic 5.1 Basic Concepts 5.4 pera at ions on Fuzzy Sets 5.5 Algebraic Properties of Fuzzy Sets 5.6 ~ ~ g u i s tVariables ic 5.7 Connectives w z y Reasoning
6.1 The Fuzzy Algorithm 6.2 Fuzzy Reasoning
53 54 59 60 63 64 64 69
71. 74 76
Conrents
6.2.1 Generalized Modus Ponens(GMP) 6.2.2 Generalized ModusTollens (G") 6.2.3 Boolean plication 6'2.4 ~ ~ ~ s i implication e w ~ ~ z 6.2.5 Zadeh implication i 6.2.6 M a ~ d a nimplication 6.2.7 Larsen implication 6.2.8 GMP implication 6.3 The Compositional Rules of Inference
xv
77
77 7 78 79
79 80 80 81
7. The Fuzzy Control Algorithm
89 7.1 Controller Decomposition 90 7.2 Fu~ification 91 7.2.1 Steps in the ~ ~ f i c ~ t i o n a l g o r i t ~96 7.3 De-fuzzification of the Composite Controller Output Membership Function 98 7.3.1 Center of area(COA) de-fuzzificatiom 98 (COG) 7.3.2 Center of gravity de-fuzzification 99 7.4 Design Considerations 100 7.4.1 Shape of thefuzzy sets 100 7.4.2 Coarseness of thefuzzy sets 100 7.4.3 Completeness of the fuzzysets 101 7.4.4 Rule conflict 102
8. Fuzzy Industrial Controllers 8.1 Controller Tuning 8.2 Fuzzy Three-Term Controllers 8.2.1 Generalized three-term controllers 8.2.2 ~ ~ i t i o n controller ed architec~e 8.2.3 Hybrid architectures 8.2.4 Generic two-termfuzzy controllers 8.3 Coarse-Fine Fuzzy Control
105
9. Real-time Fuzzy Control 9.1 Supervisory Fuzzy Controllers 9.2 Embedded Fuzzy Controllers 9.3 The Real-time Execution Scheduler
11 120 123 124
106 107 108 109
112 113 117
xvi
Contents e
~ o ~ e l - ~ Fuzzy a s ~ Control d 10.1 The Takagi-SugenoModel- base^ Approach to Fuzzy Control 30.2 Fuzzy ~ a r i a ~ land e s Fuzzy Spaces 10.3 The Fuzzy Process Model 10.4 TheFuzzy Control Law 10.5 The Locally LinearizedProcess del 10.5.1 Conditions for closed system stability 10.6 The Second Takagi-Sugeno Approach 10.7 Fuzzy ~ain-Scheduling
le Neural Control 1 1 1 The ElementalArtificial Neuron 11.2 Topologies of Mu~ti-layer Neural Networks 11.3 Neural Control 11.4 P r o ~ e ~ iof e sNeural ~ o n ~ o l l e r s 1 1.5 Neural Controller ~chitec~e~ 1 1.5.1 Inverse model architecture 11.5.2 Specialized training architectwe 1 1S . 3 Indirect learning architecture e
135 136 137 139 141 142 144 144 146
153 156 158 160 161 162 164 165 166
169 12.1 The ~ ~ ~ ~ o ~ - ~ oAlgorithm ~ T r a i ~ n g170 173 12.2 TheDelta Training Algorithm 175 12.3 Multi-layerA N Training Algorithms 176 (BP)Algorithm 12.4 The ~a~k-pro~agation
Neural Network Training
1% Rule-Based Neural Control 13.1 Encoding Linguistic Rules 13.2 Training Rule-Based NeuralControllers
181 t 82 183
193 14 1 Neuro-Fuzzy Controller~ c ~ t e c ~ e s 194 195 14.2 Neuro-Fuzzy~ s o m o ~ h i s m
uzzy Control
~~ntents
15.
evolution^^ Computation
15.1 evolution^ A l g o r i ~ s 15.2 The ~ p t ~ i Problem ~ ~ o n 15.3 evolution^ O p t ~ ~ t i o n 15.4 Genetic A l ~ o ~ t ~ s 15$4.1~ t i a l i ~ t i o n 15.4.2 Decoding
15.4.3 E~aluationof the fitness 15.4.4 ~ e c o m b ~ a t i oand n mutation 15.4.5 Selection 15.4.6 Choice of p~ametersof a GA 15.5 Design of~ t e l l i ~ eControllers nt Using GAS 15.5 1 Fuzzy c~ntroll~rs 1 5 5.2 Neural controllers
xvii
203 205 207 208 211 212 212 213 214 215 217 22 1 22 1 222
226 228
17.1 Qualitative Fitness Function 17.2 Controller Suitabili~
23 236 237
A. ~om~utational ~telligence B. ~telligentSystems C, Fuzzy Logic and Fuzzy Control D,Fuzzy Logic and Neural Networks E. Artificial Neural Networks F. Neural and NeuroaFuzzy Control C , Computer and Advanced Control H. E v u l ~ t i o n a~~l g o r i ~ s I. MATLAB and its Toolboxes
247 247 247 248 25 1 252 253 254 254 257
17'. E v o ~ u t i Design ~ n ~ ~of Controllers
xviii
~ o n ~ e n ~ ~
259 Case Study: Design ofa Fuzzy Controller Using MATLAB 259 A, 1 The Controlled Process 26 1 A.2 Basic Lin istic Control Rules 26 1 264 266 A S System ~ t a ~ i l i ~ tRules ion A.6 On the Universe of Discourse of the 267 Fuzzy Sets 268 A.7 On the Choiceof Fuzzy Sets 269 14.8 Compensation of Response A 270 14.9 Conclusions
pendix B
279
Simple GeneticA l g o ~ t ~
pendix C
285
S i m ~ a t e d h e a l i Algorithm ng
289 Network Training Algorithm
du~tion ~odem control theory, which has contributedso s i ~ f i c a n t l yto the exconquest of space, has not had similar success in solving the control problems of industry and m a n u f a c ~ n g .Despite the progress in the field since the 1950s, the chasm between theory and practice has been ~ d e ~ and n gmany of the needs of industry remain unsolved. ~d~~ has had little choice, therefore, but to rely heavily on conventional ( s o m e t ~ etermed s hurd) control techniques that are based on industrial thee-tern controllers. U n f o ~ a t e l ythese , simple and ubiquitous devices cannot always cope with the demands and complexity of modern m ~ u f a c ~ i systems. ng The chasm between theory and practice has led to a search for newand ~ c o n ~ e n t i o ntechniques al thatarenotsubjecttotheconand limitations of modem control theory to solve the control s faced by industry and m a n u f a c ~ g ,The b r e a k t ~ o ucame ~ in the mid-1 960s with the introduction of Fuzzy Logic by Zadeh. The appl~cationof Zadeh’s theory to control was to come a ~ o s ten t years later and it was to take even more years before it received the respect and acceptance thatit rightly deserved. At about the same time, Widrow ~emons~ated the use of ADALINES (Adaptive Linear Networks), which are a p~mitiveform of A r t ~ c i u~ ~e ~~ r u ~e (ANNs), ~ in control. o ~ This was a radical departure from conventional control since a generic controller was trained to perform a specific task instead of being deed. The two approaches were developed independently andit was to many years before these concepts were appliedto any de 1
The application of Fuzzy Logicto Control Engineer~gwas first demons~atedin Europe and Japanin the mid-1970s. ~ a m d presented a ~ the first demons~ationof Fuzzy Logic in 1974 on an experimental process. This demonstration of F&zy Logic Control (FLC) gave the impetus for a seeminglyendless series of applications, which continues unabated to this day. With a few notable exceptions, Zadeh's theory of Fuzzy Logic went unnoticed in the West for many years while, in the meantime, there was a frenzy of activityin Japan applying the theory to such varied fields as home appliances, cameras and ~ ~ s ~ o ~ asystems. t i o n Not until the early 1980s did industries in the West seriously consider applying fuzzy control. At the forefront ofthis thrust was the process industry and in particular the cement indus~ry,which was the first to apply the new t e c ~ q u to e control large-scale processes. The developments in the field since then have been impressive and today there are hundreds of plantsw o r l d ~ d being e successllly controlled bysuch t e c ~ q u e s . The field of Artificial Neural Networks, which ev sep~ately,has had a dif~cultevolution. Appearing in the field that offered much promise and potential, it was thwarted by quate computational facilities and a lack of effective network tr a l g o r i t ~ sRe-emerging , in the 1980s, by which time s ress had been made in both training algorithms and co researchanddevelopment in the field hasevolvedrapidly. ~ i f i c i a l Neural Networks can be found today in a host of applications from c o ~ ~ c a t i o nspeech s, analysis and synthesis, control and
'
o n ~ ~ n t ~ oControl na~
Despite the advances in the theory of automatic control, most indus~ial plants, even to this day, are under the exclusive supe~isionand control of human operators. Their obse~ationson the state of the plant from a host measurements taken from sensors in the plant coupled with their owle edge and experience of the plant lead them to decide on what control strategy to take in order to achieve the desired product quality and production specifications. In the past, industry has had little option but to use ~ l ~ s i c ~ C o ~ ~ theory ~ o Z that is based on macroscopic models of the plant in designing appropriate conventional controllers. These methods depend on
Introd~~tion
3
empi~cal owle edge of the dynamic behavior of the controlled plant, derived fiom ~ e a s ~ e m e noft sthe control and m ~ p u l a t e dvariables of that plant. ~raditionallyindustry has relied heavilyon three-term (PD) controllers, that are incorporated todayin most Remote Terninal Units (RTUs) and ~ r o ~ ~ a Logic b l Controllers e (PLCs). The ubiquitous three-term controller is used today to control all kinds of devices, industrial processes andm a n u f a c ~ n gplants. Their tuningis based on simple appro~imantsof the controlled plant dynamics and on design m e ~ o d s such as the classical onesby Nichols and Ziegler or more modem techniques such as those of Persson and Astrom. Most often in practice ~ n is ~ ge r f o ~ e d h e ~ s t by i c expert a ~ l y tuners in situ. Without doubt, these simple industrial controllers have offered sterling service for many decades and will continue to do so for many more,wherever s i ~ p l i c iand ~ robustnessareessentialandcontrol speci~cationspermit.However, thee-tern controllers c m o t always satisfy the increasing Complexity of modem industrial plants and the ~ e ~ i ~ i l productivity ity, and product quality, which are day’s very competitive global market. The problemis furedby theincreasing enviro~entalrestrictionsbeing placed on industry andmanufac~ing. M ~ ~ e Control rn was introduced in the early 1960s and is a rigorous me tho do lo^ that has proved invaluable for ~ n d solutions ~ g to w e l l - s ~ c ~ econtrol d problems. With a few notable exceptions, however, its application to industry has been disappointing and few industrial controllersare designed withthis m e ~ o d o l oThe ~ . reasons forthis discrepancy are the complexity, ~ c e ~ a i n and t y vagueness with which i n d u s ~ a processes l are characteri~ed conditions that do not allow for ready modeling of the controlled plant, essential to the application of modem control methodologies. Despite more than five decades of research and development in the theory and practice of Control Engineering, most industrial processesare byand large still controlledmanually.Today,Supervisory Control And Data Acq~isition(SCADA) Systems and ~ i s ~ b u t Coned trol Systems (DCS) make the operators’ task considerably easier, A partial schematic of such an information system using a distributed architecture, is s h o w in Figure l l
-
4
~ ~ a ~1 t e r
erat tor
ons soles
Figure 1.1 ~ i s ~ r i ~ u~t oendt r o~l y s t e marchitec~ure
The operator console possesses oneor more screens that display the essential variablesof the plant t ~ o u a~ graphical h user inter~~ce by which the operator interacts with the plant. A typical example of such a display is shown in Figure 1.2. In plants where the various sub-processes interact,it is clear that the control problem can be severe, requiring operator skills that can only be acquired after years of experience. Today, ~ ~ l t i ~ane ~ i a ~ e are finding ~ their l way ~ into ~ the control room, i ~ ~ r o vthe i nman~
Figure 1.2 A typical graphical user interface
In.most industrial applications, h~~ operators close the loop between the controlled and the control variablesof the controlled plant, Operators respond to observations of the principal variables of the plant andcontinuously stride to satisfy o~ennconflict~g objectives,e,g., ema and. m a ~ m i ~ nproductivi~ g and profit while m i ~ m i ~ nenergy g Proper operation of a process is thus very much dependent on the experience of the operator,his owl edge about the process andits dynamics and the speed with which he responds to plant disturbances, rnalhc-
'ons.Theyieldof a processcan vary quite operator and less experienced operators able to control a plant effectively,~ ~ i c u l aunder r l ~ abno which they have never met before, Thecontrolactionsof a humanoperatoraresubjective, fieq~ently ~co~prehensible and often prone to errors p ~ c u l ~ when ly they are under stress, Indeed in the case of a b n o ~ a oper l ~onditions¶ their actions may ially dangerous and there margin for errors. Delays in cisions can lead to disastrous results as was amply demonstrate^ in the ~ h e ~ o b nuclear yl reactor disaster. Thus in mode^ complex plants there exists a very real need to assist operators in their decision-ma~ng,p~icularlyin a b n o ~ a situal tions in which they often are bomb~dedwith c o ~ i c t i n g advent of ~om~utational ~telligence and unconventional f many of the tedious and complex chores of ~ o ~ t o and ~ n g a plant, assuring them fast and consistent supporttheir in decision~~a~n~.
Intell~~ent Control During the past twenty years or so, a major effort has been under way to develop new and unconventional control techniques that can often ment or replace conventional control techniques. A number of unconventionalcontrol t e c ~ ~ have ~ eevolved, s offerisolutions to many dif~cultcontrolproblemsin i n d u s ~andmanufac This is theessenceofwhathasbeentermed ~ ~ a c ~ i ~ u l ~ o is ~ a~ collection o l , of techni~ueswhich practicing engineers have found effective and easy to use in the field. Itis true to say that virtually all the conventional control could not have been possible but ity of co~putationallypowerfulandhi d computers. ~ i ~ ~ cresearch a n has t been out in ~ d e r s t ~ d emulating human intelligence while9 in parallel, d e v e l o ~ i ninference ~ engines for ~rocessingh ~ a knowledge. n The resultant t e c ~ q u e sinco~oratenotions gathered fiom a wide range of sp~cializationsuch as neurolo~,psychology, operations research, conventional control theory, computer science and c o ~ ~ c a t i o theory. n s Many of the results of
this effort have migrated to the field of Control ~ngineeringand their hsion has led to a rapid growth of new techniques suchas inductive reasoning, c o ~ e c t i o ~ sand m paralleldistributedprocessing for dealing with vagueness and~ c e ~ a ~ t y . This is the domain of soft Co~putjng,which focuses on stoe, empirical and associative situations, typical of the industrial and manufacturing environment.rntelljgent Con~ollers(sometimes termed sop controllers) are derivatives of Soft Computing, being characterized by their ability to establish the ~ c t i o n arelationship l between their inputs and outputs from empirical data, without recourse to explicit models of the controlled process. This is a radical departure from conventional controllers, which are based on explicit ~ c t i o n a relations. l Unlike their conventional c o ~ t e ~intelligent ~ s , controllers can learn, remember and make decisions. The hctional relationship between the inputs andoutputs of an intelligent controllercan be specified either: e e
in~i~ectZy by means of a relational a l ~ o r i trelational ~, matrix or a ~ o w l e d base, ~ e or ~ ~ r e c tfrom l y a specified training set.
The first categorybelongstothedomainof Fuzzy ~ystems while ~ i f i c i a Neural l Networks belong to the second. Generality, in which similar inputsto a plant produce similaroutputs so that s e ~ s i t i v i ~ to p e ~ b a t i o n in s the plant inputs is minimized, is an inherent feature of such systems. Generality implies that the controller is capable of opcorrectly oni n f o ~ a t i o nbeyond the trainingset, ~ t e l l i ~ e controllers, nt whatever form they may take, share the following properties: they e e
e e
use the same process states, use parallel distributed associative processors, assuregenerality,and are capable of codifying and processing vague data.
The ~ ~ c i pmedium al of inte~ligentcontrol is C o ~ ~ u ~ a t i o n a l r~telligence,the branch of $08~ o ~ p uwhich ~ i ~includes g Expert Syst e Fuzzy ~ ~Logic, A r t ~ c i a lNeuralNetworks and their derivatives.
E v o l u t i o n a ~ C o ~ p ~ t (Genetic a ~ i o n ~ l g o r i and t ~ ~~ ~ m u ~ a t e ~ ing) is a very recent addition to this rapidly evolving field.
~nne
The field of Expert ~ y ~ tthee first ~ ,class of systems thatthis book discusses, is the precursor to Computational Intelligence and is the most successful outgrowth of Artificial Intelligence, Expert systems use 1in'stic d e s to specify domain knowledge and are used extensively toin industry in such diverse applicationsas fault prediction, fault dianagement, production management and s u p e ~ i s o ~ ~~onologically, fuzzy logic was the first technique of intelligent control, Neural, neuro-fuzzy and evolutionary control and their derivatives followed later, each technique offering new possibilities and makingintecontrolevenmoreversatileandapplicableinaneverincreasing r f industial applications. The third technique of intelligent control considered in this book appeared towards the end of the 1980s and is based on ~ i ~ c iNeural a l ~ e ~ o rNeural ~ s . networks have had a varied history, p r o ~ e hav ~s remainedstagnantuntilthemid-1980swhenefficient t r a ~ a1 g rithms were developed and fast computational platforms became readily available.Sincethen,neuralnetworkshavehad a remarkableresurgence, being successfully used in a wide range of applications such as c o ~ ~ c a t i o n speech s , analysisandsynthesispattern reco~tion, system identification and control. Finally, mid-1990s thein evolution^^ C o n ~ o of Evolutiona~~ Com~uting,emerged as a viable method ntrol. This technique, which is possible only because of the rapid developments in~omputerhardware and software, uses stochastic metho~s. Since the early 1990s a major effort has been underway to develop derivatives of these t e c ~ q u e in s order to exploit the best features ofeachinthedesignofintelligentco s. Thesenew t e c ~ q u e s haverevolutionizedthefieldofControering,offeringnewhope s of in dust^ andmanuinsolvinmanyofthe ~ i f f i c contro ~t factwin
Computational Intelligence is based on concepts that practicing control engineers use ona daily basis and has played a major role in rethe chasm between advanced control and e n g i n e e ~ gpractice. Thenewcontrol t e c ~ ~ u based e s on ComputationalIntelligenceno longer face the barrier of disbelief that they faced when they first appeared. ~ ~ e successful r o applications ~ in a variety of fields attest to the u s e ~ e s and s power of these techniques. Compu~tionalIntelligenceusesnumericalrepresentationof ~ o w l e d ~inecontrast to Artificial Intelligence, which uses symbolic representation. This feature is exploited in Control Engineering, which deals withn ~ e r i c adata l since control and controlled variables are both d e ~ n nume~cally. ~d Computational ~ t e l l i ~ e n cadapts e n a ~ a l l yto the e n g ~ e e world, r ~ ~ requiring nofiwther data conversion. The t e c ~ q u e s of Computational Intelligence share the following properties: they
* * 0
*
use a numerical representationof knowledge, demonstrate a d a ~ t a b i l i ~ , have an i ~ e r e ntolerance t to errors, and possess speeds comparableto those of humans,
Soft con~ollers ider the control strategy that must be applied to a plant in order to satism specific design req~ements.This action can be the result of operations on a set of pre-specified linguistic control an artificial neurules, as in the case ofFuzzy Controllers, or of training ral network with numerically codedrules as in the case of Neural Controllers. In either case, the primary objective is to generate control actions which closely match those of an expert human operator. In this m a ~ e r the , controller can assist the h ~ a operator n to m a i n t a ~the plant under his supe~isionat its nominal operating state whiles ~ u l t a neouslycompensatingforhisinconsistencyand ~ e l i a b i l brought i~ about by fatigue, boredom and difficult working conditions. Intelligent controllers can be trained to operate effectively in con~itionsof v a ~ e n e s and s ~ c e ~ aof~ both t y the plantstate and plant e n v ~ o ~ e and n t can respond to foreseen si~ationsautonomously, Le., ~ t h o u inte~ention t fiom the plant operator, They differ, however, from their human ~ o ~in their t ability e ~ to learn ~ new control rules or to adapt to new situations for which they have not been trained. Selfo r ~ ~ con~ollers ~ n g that have the ability to learn new rules on-line
~ h a p ~1e r
10
have been variously proposed in the literature and tried out in the laboratory, but none has beenc o ~ i s s i o n e dso far in am a n u f a c ~ plant. ~g The main reason is that this class of controllers assumes extended testing and expe~entationon the controlled plant under normal ope rat^ conditions, as i ~ a t i o nthat few plant~anagersare likely toenterta~. A variety of ~ c h i t e c ~have e s been proposed for the desi implementation of high level intelligent controllers for large-sca terns. One ofthe most usefulis the ~ e r ~ c h i c a l a r c h i tproposed e c ~ e by idis is in the mid-1 970s. In this, i n f o ~ a t i o nfirom the controlled plant flows with decreasing frequency from the lowest to the hi the hierarchy. In contrast, management directives (on such m a ~ e r sas production quotas, product qualities, etc,) flow in the reverse direction with increasing frequency as they descend the hierarchy, leading ulti~ a t e to ~ yselection of the best control strategy that must beimpose^ on the plant. Saridis’ p~nciple,on which a number of success~l intelli~ent hier~chicalprocess management and control systems have been developed, can be parap~asedas: ‘~~ncrea~ing/decreasing~re~i~ion is a c c o ~ ~ ~ n i e d by decre~in~/increasi~g inte~~igence’~. It is usefid, finally, to note the features that every ~~teZZ~ge~t ~ y s t involving e~ clusters of~telligentcontrollers must support:
-
C ~ r r e c ~ e sLe., s the ability to operate correctly for specific sets of commands and plant safety constraints. ~ o b ~ ~ Le., e sthe s ability to operate acceptably despite wide variationsin plant parameters. The higher layers of the hierarchy must possess an inherent ability to deal with unforeseen variations. ~ x ~ e n ~ i- Le., ~ i Zthei ~ability to accept extensions to both hardware and software without the necessityfor major modi~cationsto either, Extendibility impliesmodula~ty, which is the p a ~ i t i o ~ nofgthe system into easily modifiable software and hardware modules, ~ e ~ ~ i.e., ~ the i ability Z i ~ to use the same soflware in
-
Intro~~ction
11
different applications.To possess this feature, the system must be general or possess an open architecture. The field of intelligent control is one of the most exciting and prom is^^ new directions of automatic control that is o p e ~ n gup new frontiers for research and developmentin radical solutions to thecontrol of industrial systemsin the new mille~ium.
This Page Intentionally Left Blank
ysterns in Indust
.
Expert Systems, which are the most commercially successful result of research in Artificial Intelligence, are software entities that emulate the cognitive abilities of human experts in complex decision making situations. As one of the primary activities of Computer Science and dependent heavily on the rapid developments in computer technology, Expert Systems have been eagerly adopted by industry and applied to a wide lications. Expert Systems belong to the field of rnteZZigent ~ ~ ~ w ~ S ~e s t ~e ~ s~ constitute e - ~one~of the e principal ~ that fields of activity of Computational Intelligence, afield which has been referred to as the science that, attemptstoreproducehumanintelligenceusing co~p~tational means. Computational Intelligencehas also been referred to as the science that attemptsto make computers perform tasks at which humans, for now atleast, are better! Com~utationalIntelligence has many branches, one of the earliest and most important of which belongs to EjGpert S y ~ t e ~The s . other branches of Computationa~Intelligence are shownin Figure 2.1 and are a varietyof in~oducedin subsequentchapters.Expertsystemsuse methods to represent knowledge and derive decisions while they have theability to mana~eknowledgefromdifferentsources of human thought and activity. The manner in which this h owl edge is r~presented in the computatio~ale n v ~ o ~ edepends nt on the nature of the howledge and the field of expertise. In an industrial e n v i r o ~ e n t ~ o w l e d ~ e is typically represented in thef o m of linguistic rules which describe the actions that must be takenin response to specified excitations. 13
14
C ~ a p i2~ r
Figure 2. I Branches of Co~putational ~nt~lligence
There are many techniques forrepresent~gknowle onehasits a d ~ ~ t a g eand s disad~~tages. The p ~ c i p a ltheor~tical researchissue is howtogive ExpertSystemstheabilitytosearch throughthe do ma^ knowledgesystematicallyandarriveatdecisions rapidly. The following are techniques c o ~ o used ~ yfor ~epresentin~ ~owled~e:
Expert Systems in Industry
15
2.1 Elements of an Expert System Expert systems are the outcome of a major effort in computer science to emulate the cognitive faculty of humans. Artificial intelligence is the basis for this field of endeavor, which includes such areas as pattern recognition, artificial speech, artificial vision,amongothers.Conventional computers o h a r e can be viewedas the synergy of:
S o f ~ a r e= Data $. Algorithm Here,thealgorithmprocessesdata in atop-downsequential m ~ e r in until the result is arrived at, In contrast,computersoftwareused Expert Systemscan be described as the synergyof:
System = Knowledge $. Inference
In this case the system structure differs radically and the principal eleg e which is a depository of all the available ments are the ~ o ~ l e d base, domainspecificknowledgeandthe inference engine, thesoftware whose fimctionis to infer decisions. An Expert System can be characterized as an intelligent owledge-based system provided it reproducesknowledge in theformof rules. The most significant characteristic of this class of systems is that it draws on human knowledge and emulates human experts in the manner with which they arrive at decisions. One definition of an Expert System is thus: “An ExpertSystem is the embodi~entof knowledge elicited ~ u ~ experts, a n suitably encoded so that the com~utat ~ o n system a~ can ofer intelligent advice and deriveintelligent concl~ionson the operationof a system”.
om
Production rules axe a conve~entform by which to represent the knowledge of domain experts. Before describing this method, we note somealternativemethodsforrepresentingknowledgethathavebeen found usehl in industrialapplications. In general,knowledgethat is useful in solving real industrial problemshas two components:
~ h a p ~2e r
16
facts, which constitute ephemeral~ f o ~ a t i subject on to
changes with time (e.g., plant variables) and which ~ o ~ refers Z e ~ to ~ ethe , m ~ einr which experts in the specific field of application arrive at their decisions.
~ ro c e ~ ~ ra Z
Proceduralknowledge(e.g., i n f o ~ a t i o nflows, controlse~uencesand actions, etc.) and the step-by-step procedure which must be followed in thespecific manufac~ingplant, is evidently h o r n by prod~ctionengineers and is the result of years of experience with working with the plant or process. This is one of the principal reasons why Expert ~ystemshave attracted so much a~entionin the indust~alworld. The use of rules is the simplest way to describe a m ~ u f a c ~ dure, while l i n ~ i s t i crules of the classical if ...then . else form are most com.monly used by hwnans.
~ o r n aExperts i~
Figare 2.2 Basic ~ ~ e ~ eofnan t sExpert ~ y s t e ~
Systems Expert
in rndust~y
The basic elements of an Expert System are shown 2.2. An Expert System includes the following elements: 0
0
0
0
0
17
in Figure
the ~ o w Z e ~ base, g e which comprises facts and rules with which to control aplant, the inference engine, which processes the data in the knowledge basein order to arrive at logical conclusions? the exp~anations ~ ~ - s y s t e which m , is capable of a giving a rational explanation on how the decision was arrived at, the ~ o w ~ e d g e a c ~ ~ isystem, s i t i o nwhich is used by the owle edge engineers to help them analyze and test the knowledge elicited from human domain experts and the man-machine or user interface system through which the h ~ a operator n interacts with the system.
The Need for Expert Systems The develop~entsin the field of Expert Systems rapidly found proponents in i ~ d u s despite t~ the inherent reluctance to adopt new technology. The ap~licationof Expert Systems in industry and m a n u f a c ~ i n ~ was left to innovative manufac~erswhoweresufficientlybroad~ n d e to d take the risk in the expectation that the outcome would increase their competitive position and their market share. Despite some early failures of Expert Systems, which were toutedfor what they were supposed to dobutdidn’t,thepositiveresultswhichwerereported motivated more manufac~ersto invest in knowledge-based technology. This in tam led to M e r research anddevelopment in the field of Expert Systems in universities and researchestablis~ents.The reasons that has motivated industry to adopt knowledge-based techniques are the follo~g:
* *
the lack of an explicit quantitati~edescription of the physical Plant, the existence of the knowledge and experience to control the plant, and
18
Chapter 2 9
the ability ofa class of knowledge-based systemsto vagueness and uncertainty thatis character is ti^ of many industrial plants.
A common featme in industrial andmanufac~ingsystems is that theirquantitativemodelsthataresupposed to predicttheir d ~ ~ i c behavior are either&own or do not possess sufficientfidelity, This is ~articularlytrue in the case of large-scalei n d u s ~ a plants l whose quanpossible titative description is a difficult, tedious and occasionally task for lack of sufficientdeep ~ o w Z e ~ g Deep e . owl edge is the result of microscopic knowledge of the physical laws that govern of a plant. In contrast, s~#ZZow~ o w Z e ~ gisethe result of holistic or macroscopicknowledgeandisreadilyavailablefrom h~~ domain experts. This knowledge is acquired after years of experience in operating the plant and observing its peculiarities and nuances,
Stages in the Development of an Expert System In developing a knowledge-based system using an Expert System, it is essential to concentrate first on theu~jectivesof the Expert System and not how these objectives can bemet.Great effort mustthereforebe made to specify these objectives andconstra~the domain o f the Expert System. ~ a ~ e ~ uspeci~cations ate of the constraints of the Expert System over which it is expected to h c t i o n and ~ w ~ ~expectations t e d were the basic reasons for failure of many early Expert Systems to meet user re~uirements. Once the domain of the Expert System has been specified, we are in a position to select thetools and ~ e ~ h with o ~ w~~~ s to desi Expert System. During this phase of ~evelo~ment, the howled neer elicits the rules by which the plant is to be controlled fiom domain experts. F o l l o ~ ginterviews that invariably include qu~stioMaireson what variables are observed and what con troll in^ actions the domain expertswouldtakeineveryconceivablesituation,the howl acquired is storedin a suitablycodedform in thebaseofan ore than a Expert ~ystemshell. An Expert ~ystemshell is ~ollectionof s o h a r e elements that perform all the tasks of an Expert
System. While in the past Expert Systems were developed using objectoriented languages, notably LISP, it is inconceivable today to develop such a system without a shell. It shouldbe noted that knowledgeelicitation is one of the most p a i n s t a ~ gtasks in the design procedure. Human domain experts are often reluctant to part with their knowledge, fearful that d i ~ l knowledge ~ n ~ gained after years of experience may lead to their redundancy and termination. In the fist stage of development of any Expert System, it is very useful to implement a rapid prototype. The objective here is not development of a complete Expert System, but a prototype that will form the basis of the final system under development. Oncethe k n o ~ l e d gengi~ neer has a thorough understand in^ of the rules elicited from the domain experts and the manner in which decisions are arrived at and justified, he must then encode the knowledge in a form suitable forpro~essingby the Expert System. It is noted that the rapid prototype need not possess all the features oftheendproduct,butshouldincorporatethebasic features that can be evaluated by both the domain experts and the end users. Should the prototype system demonstrate deficiencies and difficulties in inferring decisions, it is clearly preferable to makec o ~ ~ c t i o n s and i ~ ~ r o v e m e nat t s this stage rather than in the end product when it may be verydifficult and costly. h the i ~ ~ l e ~ e ~stage t ~oft the i oExpert ~ System, the howledge elicited from the domain expertis transferred to the Expert System that m s on a suitable p l a t f o ~Early , Expert Systems invariably ran on powerfbl workstations or special ~ ~ o computers s e (such as the shortlived LISP machines) which were subsequently superceded by common ~crocomputers.Today, most Expert Systems can run on high end PCs or workstations. Once completed, the Expert System is tested off-line until the end usersare convinced ofits ability to infer correctresults and support its decisions. It is noted that it is often difficult and economic to test the Expert System exhaustively,Le., for all possible conditions,in practice. For these reasons, end users must develop a close liaison with. the Expert ~ystemdesigner, assisting him whenever some discrepancyis observed between their decision and that of the Expert System. Such ~iscrepanciesarise from rule conflict,m i s ~ d e r s t a n d ~ gors errors in the knowledge base.
he Represent~tionof Knowled Simplici~in representing knowledge in an Expert System is essential and a variety of techniques have been proposedto this end. One of the most c o ~ o representations n of domain knowledge is the ~ e c ~ s pee, ~on each branch. of which represents some action. Every branch of the tree ma nates from a node where a condition is examined. Dependi outcome of this condition?a specific branch of the tree is trave the next node. The tree may have many branches and nodes, S Expert Systems proposed for d i a ~ o s i sin medicine had t h o u s ~ d sof branches and nodes, making them c ~ b e r s o m e ,slow and d i f ~ c to ~t use. ~ p l e m e ~ t a t i oofn an Expert System can be either direct, using an object oriented ~ r o ~ ~ language i n g such as LISP, Prolog, C++, VisualBasic,Visual C++, Visual J++, VisualFortran, etc, or,more conveniently using angxpert ~ ~ s~~eZZ t esuch ~ as G2, NEiXPERT, etc. As noted earlier, the rule base of an Expert System contains lin~ f o m with which plant g~isticrules of the classical if ... t ~ ...e else operators are trained and subsequently use to justify their decisions. These rules may appear as strings in their original form or encoded into n ~ ~ r i c form. a l ~uantitativedescriptions of a plantarenotalways forward, particularly when only incomplete and vague data on the plant are available. To make descriptions possible in such cases, special t e c ~ q u e ssuch as Fuzzy Logic (which is introduced in chapter 5 ) or proba~ilisticmethods are used.
xpert System P ~ r ~ d i ~ ~ ~ Expertsystemshavebeen d i f ~ s i n gintoindustryrapidlysincetheir introduction in the mid-1970s. Today, Expert Systems can be found in a variety of industrial applications, the most success~lexamples of which of a manufac~ingplant are described briefly below. The typical stages are shown in Figure 2.3, which shows where Expert Systems can benefit ~ro~uction~
Expert ~ystemsin In~ustry
21
.I Expert systems for product design ModernFlexible
~ a n u f a c ~ i nSystems g (FMS)producespecialized quality, limited production runs and short life cycles, ~ r o ~ ~These ~ t products ~ o ~undergo . changes often and their st be completed in very short times, imposing considerable stress on product designers. Expert computer-aided-de si^ systems are now available to assist the designer, permitting him to exploithis creative abilities to the utmost while advising him on design and materials c o n s ~ a i ~following ts extensive background computations.
. -~
"
Figure 2.3 The manufacturing environment
22
WhileconventionalComputerAidedDesign(CAD) so~are can process geometric shapes rapidly, the designer needs to know rapidly certain characte~sticsof the productbeingdesi s ~ ~ n ~ ~ s ,dis~butions, t h e ~costs, a l etc. Expert CAD systems provide all this i ~ o ~ a t i while o n in addition advising the designer of a l t e ~ a t i v ~ shapes from a priori experiencewithsimilardesigns.The tre product design today does not yet permit total design with expert systems since design normally depends on the designer’s i n ~ i t i o nand aesthetic knowledge, the prehistoryof the product and economicfactors that are dif~cultto inco~oratein a knowledge base. Thefinal product is a set of d i a ~ or~plans, s design speci~cationsand various d o c ~ e n t s on which~ a n u f a c will ~ ~then g proceed, as shown in Fi
Expert systems for plant ~ i ~ ~ land ~ t i o ~ operator training The t r a i ~ n gof operators to control modern indus~ialplants is irnportant, t ~ e a c o n s ~ i and n g very expensive when perfonne physical plants. Apart from the dangers involved should some wrong control action be taken with on-line training, the u n e v e ~ e s sof productionand h certain quality of theproductproduced training makes this procedure undes~ableand very costly. Plant s h u lators, which simulate the plant and can be p r o ~ ~ toe take d into account faults and m a l ~ c t i o n sin the plant (quite similar, in fact, to flight sim~lators)are today being used extensively to train new plant operators. Usually an instructor, unseen to the trainee operator, enters m a l ~ c t i o n and s observes the trainees’reactions and ~ e r f o ~ a n c e . The role of the instructorcan be taken by Expert Systems, which can tirelessly repeat plant ~ a l ~ c t i o and, n s like their h ~ a countern parts, examine and instruct the trainee operators. The ~ o w l e ~ with ge which to operate a plant is embedded in a set of if .. then .. else d e s that are used to operate the plant.~ultimediaand Virtual Realitycan be used in theman-machine interface in t r a i ~ n gplantoperators,even before the plant has been c o ~ i s s i o n e dThe . same system can also be used to refresh old operators’ knowledge, much as pilots must undergo periodic t r a ~ n and g certi~cationusing fli&t s ~ ~ a t o r s .
Expert ~ y s t e ~insIndustry
23
2.5.3 Expert supervisory control systems Reference was madein Section 2.3 to the use of Expert Systems for the supervision and control of Computer Integrated Manufac~ing(CIM) systems, The primary objective of any Supervisory Control And Data Acquisition (SCADA) system, which constitutes the kernel of any CIM system, is data acquisition, the overall supervision of the health of the plant,promptalarming of out-of-rangevariablesandcontrolofthe principal variables of the plant under control. Supervisory control systemshaverevolutionizedproductionplants,increasing productivi~ while significantly reducing production costs. The next stage in their evolution was the introduction of Computational Intelligence techniques that broadened their abilities significantly. The new generation of supervisory control systems exploits the knowledge and experience of domain expertsin automatically correcting for plant m a l ~ c t i o n sand discrepancies. New and advanced intelligent control techniques that were inconceivable until recently, are now commonly incorporated into most commercially available SCADA systems, fhther improving product quality and productivity while ~imultaneously reducing production costs. Expert systems are being used in ~ n d u s ~control, ~ a l which is an integral partof any SCADA system,in the following fields: 0
the design of industrial controllers, and the supe~isionand control of m a n u f a c ~ plants. ~g
One of the major difficulties in the design of plant controllers, p~icularlyin the case of large-scale multivariable plants, using conventional control techniques, is the unavailability of explicit models of the plants. Forthis reason industrial automation leans towards the use of three term (PID) controllers and various empirical and semi-empirical design techniques have been proposed to determine the parameters of these controllers.Examples of these designtechniquesarethewellknownmethodsofZieglerandNicholsandmodernvariantsdueto Persson and Astrom. Incontrast, expert controller techniques, which can exploit the knowledge of expert controller tuners, can often offer superior results. A number of vendors currently offer such software products.
24
Chapter 2
The use of Expert Systems in the design of industrial controllers has two aspects, The first involves the rules on the most appropriate technique to use in order to achieve the desired result. These rules are dependent on the specific plant to be controlled andcriteria by which the ~ 0 ~ ~~ ~0 2~i.e.,Ztheiperformance ~ , of the closed plant, is judged. The second aspect involves rules that specify the best con^^€ s ~ ~to follow t e in ~ any si~ation,given as advice to the operator.
.4 Expert systems for the design of
industrial controllers Hurnanoperatorsaretrainedtouse lin~uisticrules thatinvolvethe pr~cipalmeasured plant variables in order to maintain the plant at the desiredstatefollowingsomeexogenousdisturb ce.The operator's speed of reaction is critical in achieving a high quality of control and satisfactory product quality. Inaction, delays and inconsist~ncies inthe actions of the operator dueto f a t i ~ or e when underp r ~ s s ~ e , i n v ~ a ~ leadstouneconomicoperation and in theworstcase, to disas~ous results, a prime example being the~ h e ~ o bnuclear yl power plant, The necessity to assist the operator in his routine tasks and advise him on the best strategyto follow in extreme cases orin rare situations which he may not have met earlier, was the motivation for the ~evelopmentof a new class ofexpert s u p e ~ i s oco~ Coupled with the rapid developments in computer tec ene era ti on of control systems is a reality that is fin manufac~n~. Expert supe~isorycontrol systems do not require deep bowledge of the plant to be controlled, but are based on s ~ ~ 2 2~ ~oww 2 e ~ ~ e of the form normally used by hurnan operators, The ~ d a m e ~ t real ~ u i r e ~ e is n tthe existence of a conventional supe~isorycontrol system to which the Expert Systemis appended. *
pert systems for fault p r ~ d i c t i ~and n A very s i ~ f i c a n field t of ap~licationof Expert Systems has been in equipm~ntfault prediction and diagnosis, sometimes termed ~ e ~ o n~~ i t i €o nMany * ~ such ~ systemshave a u ~ e n t e dexist in^ data
acquisition systems and have proved invaluable for the prediction of faults in eq~pment.Examples of faults that are important to predict are increased wear of bearings of rotating machinery due to vibrations or excess friction due to overheating. This class of on-line, real-time Expert Systems is giving new meaning to the field of p r e ~ i c t ~ v~e a i ~ ~ e ~ a ~ ~ ~ r o d u c t i vis i ~bene~tingthrough improved estimates of the time-to-go before catas~ophicfailure to the equipment is likely to occur. This is particul~lyimportant in the case of large equipment for which expensive spare parts have to be in stock, to be usedin case of a break do^. Expert systems can minimize and even eliminate stocks t ~ o u g htimely proc~ement.TheuseofExpertSystemsforfaultpredictionresults leads to a drastic reductionin the mean time to repair equipment and a co~espondingincrease in the a v a i l ~ b i l of i ~the eq~pmentand, most importantly, an increase in plantproductivi~. In preventive maintenance, historical data is gathered from suitablesensorsattachedtotheequipment (e.g,, tempera~es,pressures, vibrations, etc,). Real-time measurements of critical variables are compared with expected or desired values and any discrepancy is used to d i a ~ o s the e possible cause of the discrepancy from rules embedded in the Expert System. Following spectral analysis of such measurements of bearing sounds bystandardsignalprocessing t e c ~ q u e s ,theExpert System suggests what maintenance will be required and when best to perform it. Expert systems for fault diagnosis can be either off-line or online. In the former case, maintenance personnel enter into a dialog with the Expert System, supplying answers to questions posed by the Expert System on the health of the equip~ent.The Expert System then gives inst~ctionson what M h e r measurements and what actions should be followed that will focus on the source of the ~roblemand then give advice on how to repair it. It is obvious that rapid fault diagnosis is of paramount im~ortancein a m a n u f a c ~ i n g e n v i r o ~ e nwhere t every minute of lost production results in a loss of profit. It should be evident why expert fault prediction and diagnosis systems have been the subject of considerable c o ~ e r c i a linterestandhavefoundsuchextensive application.
26
Chapter 2
xpert systems for the prediction of ~ ~ e r plant ~ ec o~~ ~ ci t i ~ ons Effective control of large complex industrial systems, such as nuc~ear reactors, power dis~butionnetworks and aircraft, is critically impo~ant since b r e ~ d o ~ cans lead to ores seen andpotentially d i s ~ s ~ o u s results, In recent history, the Chemobyl disaster stands outas a leading example of h ~ a error. n Likewise, power blac~outsover large areas of the power distribution network, are often the result of human error. But the most visible example is pilot error, when h ~ ~ e ofd lives s are lost because of wrong pilot decisions that have been made in si~ationsof i ~ e n s pressure, e A human operator has great difficultyin making decisions when f~cingconflicting or excessive ~ f o ~ a t i o n , p ~ i c u lifa runder l y stress. Real-time Expert Systems, using data fiom the plant and rules derived from logicalr e a s o ~ gand prior experience, advise the plant operator on the best course of action to take in order to avert a catastrophe andr theplant to its nominaloperating state as quickly as possible, m ~ m adis~ption l of production and damageto the e q ~ p ~ e n t .
xpert systems for energy ~
~
a
~
e
With the ever~increasin~ costs of energy, the management of ene large industrial plants is of major concern and means to conta costs are actively sought. Energy-intensive industries, such as the metallurgical, cement andpetroc~emical i~dustries, have a very real needto containtheirenergydemandandmostnowadaysusesomeformof energy management system. In large manufac~ingplants the electric energy pricin is dependent on the power absorbed over, for instance, each 15nminute period. The power provider and the ~ a n u f a c ~ agree e r on a p ~ c i n g policyforeveryminute ' duringtheday,thecostof ener~ periods and prohibitively high in. s i ~ ~ c a n t lower l y in o ds. In turn, the consumer agrees to restrict his energy intake to lhits. A s i ~ f i c a n penalty t must be paid if the co are exceeded in my period. Such additional costs cm non~co~petitive,
~
e
Expert Systems in ~ n ~ ~ s t r y
27
It is therefore necessaryto accurately predict what the power absorbed over each period will be and to monitor the energy demand by shedding loads in time to avoid exceeding the contractual energy limit. The decisionon which loads to shed and whento do so ~ t h o u disruptt ing production^ is a very dif~cultand tiring taskfor a human who would have to make this decision every 15 minutes throughout the day and night. The operator has toh o w which equipment can be shut down and which must, at all costs, be left ~ n in order g to avoid major disruption of the production line or manufac~ingplant and how long before each piece ofeq~pmentcan be restarted without causing excess wear to it. In a largeplant this is normallyperformedbyshedding auxilia~ equipment that is not considered absolutely essentialto the m a n ~ f a c ~ " ing plant (e.g., circ~ationpumps, conveyor belts) and in the worst case by a total stoppage of production in periods of highenerw cost. Many electric energy intensive plants today are forced to shut down production peak hoursin order to conserve energy. Real-time expert energy management systems have been developed and have been very successhl in c o n t a i ~ energy g costs, replacing the human operator in this arduous task. Indeed, avoiding just one ortwo overload penalties often pays for the cost of the Expert System! The rules by which equipment can be operated, the order in which they may be shed, when and how many times per day they can be restarted are elicited fiom human operators and are embedded in the Expert System rule base,Thereal-timeexpertenergymanagementsystem is then executed every few seconds following prediction of the energy absorbed at the endof the timing period. Naturally, the magnitude of the load that must be shed is critically dependent on the time-to-go before the end of the period: the shorter the time left, the larger must be the load that must be shed and the greater the malbction that is incurred. Accurate predictionandeffectiveandfastdecisionsfromtheExpertSystemare essential to proper operation.
2.5.8 Expert systems for production s ~ h e d u ~ i n ~ ~roductions c h e d ~ ~ing m a n u f a c ~ n gplants with multiple parallel production lines is essential in order to maintain high product throughput despite changesin production priorities, equipment malbctions and variations in the raw materials,In deciding w ~ production ~ c ~line can be
28
Chapter 2
used to manufacture a specific product, the production m ~ a g e rmust h o w the production capacity and limitations of each production line, the overall production schedule, equipment andstora e capabilities, etc. Whenaproduction line is d i s ~ p t e dfor whateverreason, it is ofien necessarytoswitchproduction lines andchangethe priorities with which the product is produced, p e ~ ~ i high n g priorityitems to be completed first while lower priority itemsare placed in a queue. The ~ o n g - t eproduction ~ schedule is normally produced on a weekly or monthlybasisbutchanges to it maybenecessarydue to equipment failures, Whenthese failures are serious enou~hto cause extended production ~ i s ~ p t i oitnis necessary to reacompute the productionschedule.Operationalresearchtechniquesbasedonlinear integer or mixed-integer p r o ~ is ~the conventional n ~ approach to this problem, but theset e c ~ q u e are s timencons~ing. An alternative way to reschedule production is t ~ o u g hthe use of e~piricalrules that are followed by production management, Expert schedulin~systems using this knowledge and experience are considerably simpler to use and lead to equally feasible results much faster and have been used with excellent results,
xpert systems for the diagnosis of ~a~functions This a~plicationinvolves Expert Systems for the diagnosis of m a l h c tions in the sub-systems of m a a n u f a c ~ system. g The methodrequires decomposition of themanufac~ingsystem into a set of interact in^ subsystems and leads to the development of a knowledge base from which the cause of the malhction can be inferred, The method is p~icularly (FMS) discrete production useful in Flexible ~ a n u f a c ~ Systems ng ical examples of whichare beverage bottling, cigarette packing and foodc a ~ n lines. g A m a l ~ c t i o nin any sub-system can leadto a total shutdown of the production line and it is therefore critically important to diagnosethe source of the m a l ~ c t i o nas quickly as possible in order that the mal~ c t i o n i equipment n~ be repaired rapidly and be put on-line once more. Thus sensors (photocells, inductive detectors, etc,) are placed at critical points along the production line, fkorn which flow rates can be estimated contin~ously.It is obvious that rapid reinstatement of the production line
-
Expert ~ y s t e in ~ Is n ~ ~ ~ t r y
29
is of p ~ a m o impo~ance ~t in order to maintain high equipment availIn largebottlingorcanning a b i l i ~andmeetproductionschedules. plarits, for instance, the sensors are linked to the Factory Data Acquisition (FDA) system and measurements are cont~uouslycompared with the desired values. Should some unit along the line m a l ~ c t i o nthen , clearly both the proceed^^ and succeeding units will suffer the consequences. Due to the interactive nature of most production systems and work cells, it is obvious that when any sub-system m a l ~ c t i o n s ,the sub-systems upstream and down-stream will be affected sooner or later. ~ p ~ s t r e aunits m must thus be stopped in time to avoids t r a n ~ ~ z a tas j ~anconse~uenceof the a c c ~ u ~ a t i oofnpartially shed products which may exceed the c a ~ a cofi ~the silos or queues if the m a l ~ c t i o npersists for some time, while d~wn-stream,units must be stopped because sof tarvatj~~. Expertsystems for thediagnosis of equi~mentm a ~ ~ c t i o n s contain the rules by which a m a l ~ c t i o ncan be transmitted to adjacent units embedded in their knowledge base. The Expert System continuously ~ o ~ t othe r smaterials flows and should the mass balance for each unitbeessentiallyconstant,thennoalarm is issued.However,when some m a l ~ c t i o noccurs, the Expert Systemis executed with the object of d e t e ~thei source ~ ~ of the fault. Timing is clearly of the essence.
This Page Intentionally Left Blank
hapter 3
ent Control ~telligentcontrol takes a radically different approach to the control of industrial processes and plants from conventional control. The howledge and e x ~ e r ~ e n cof e human operators constitutes the basis for this new approach to Control Engineering for which Computational Intelligence provides the theoretical fo~dation.In this chapter we s ~ a r i z ~ the potential and some limitations of intelligent control andwe attempt to address thequestions on how, where, whenand uader what con~itions can intelligent controlbe applied in practice, Intelligent control seeks solutionsto the problem of controlling plants from the viewpoint of the human-operator. In other words, the technique seeks to establish some kind of cognitive model of theh ~ a ~ operator and not the plant under his control. This is the point at which int~lligentcontrol departs from conventional control and it is ~ ~ o u ~ t edly true that the technique could not have been possible but for the rapid progress in computer technology. ~omputatio~al Intelligence provides the tools with which to make intellig~ntcontrol a reality. The reproduction of human intelligence and the mechanisms for inferring decisions on the appropriate control actions, strategy or policy that must be followed are embedded in these tools. Figure 3.1 shows how Co~putationalIntelligence can be classified according to the form of the knowledge (Le., s ~ c ~ ore unstrucd tured) and the manner in which this knowledge is processed (i.e., symbolic or n ~ e ~ c a lFor ) . control applications, knowledge can be stmctured or not, but processing is ~ v a r i a b ~ny ~ ~ ~ cFuzzy a l and , neural 31
32
Chapter 3
control fonn the core of intelligent control and are the principal components of computational intelligence.
Sym~olic
Expert Syste~s
N~~erical
Fuzzy Systems
Ne~rul Systems
Intelligence Figure 3.I Classl~cationof Com~utati~nal
In contrast to conventional control, intelli~entcontrol is bas on advanced computational techniques for reproducing human h o edge and experience. Thus in intelligent control the focus of interest moves away from the tedious task of e s t a ~ l i s ~ nang explicit, microscopic model of the controlled plant and the subsequent desi r e s p o n ~ nhard ~ controller, to the emulation of the c o ~ t i v emechanisms used by humans to infer and support control decisions. ~telligentcontrol has been applied withconsi~era~le success in the process industry. Examples can be found in the petrochemical, cement, paper, fertilizer and metals industries. With time, it is pre~icted that intelligent control will difhse into most branches of i n d u s ~by manufac~ingand beadoptedbyprogressive o r ~ ~ z a t i o nthat s are seeking to improve their strategic position in the global market t ~ o u ~ improved ~roductivityand product quality.
I n t e l i i ~ e n~~ontr o l
33
3.1. ~onditionsfor the U s e of ~nt~lli~ent Control ~telligent con~ollers use e~pirical~ o d e that l ~ form the framework on how and not why the controlled plant behavesin a particular manner,instead of relying on explicit mathematical models of the plant. The hdamental problem in developing an intelligent controller is elicitation and representation of the knowledge and experience of human operators in a m a ~ ethat r is amenable to computational processing. Intelligent systems invariably use a collection of heuristic and non~he~istic facts of c o ~ o logic n as well as other forms ofowle edge in combination with inferencemecha~smsin order to arrive at and support their decisions. A basic characteristic of this class of systems is that these systems are able to infer decisions from incomplete, inaccurate and certain info~ation,typical of many industrial and manufacturing enviro~ents.As noted in chapter 2, intelligent systems can be applied 0
0
u~-line, e,g,, for controller design, forfault diagnosis and production manage~entor u~-li~e, e,g,, for fault prediction and s u p e ~ i s control. o~
In con.ventiona1 control,theknowledgeaboutthecontrolled plant(Le., its model) is usedimplicitly in designingthecontroller, whereas in. intelligent control, the knowledge about the plant is distinct fiom the m e c h a ~ that s ~ infer the desired control actions. This is shown schem~tically inFigure 3.2. It is obvious that an inte~ligent~ o n ~ o l ~ e r can therefore be easily configured for any plant by simply ~ o d i ~ i its ng knowledge base. The most c o ~ o means n to reproduce knowledge are lin~istic rules, ~ometimestermed control pro~ocols, which relate the state of the plant to the co~espondingdesired control actions. Theserules represent s~~llow ~~pirical ~ u w l e d ~deep e , ~ o w ~ or~ ~do d~ eel - ~ ~ ow^ed edge about the plant.
~ h a ~ t3e r
34
Figure 3.2 Basic e l e ~ e n t sof an i n ~ e l l i ~ e n t ~ o n ~ o l l e r
ectives of Intell~~ent Control The principal objectives of intelligent control are max~izationof: 8 8
the strategic success (Le., profit) of the business productivi~
In order to succeed in these objectives,it is p r e s ~ e dthat an intelent controller is technically correct. The success of any application is based on both technical and social factors that must co-exist and cooperate in order to bring about the desired results. The distinct characteristics of each mustth~reforebe respecte~,o ~ e ~ i con~icts s e will arise which are bound to minimize its impact and effectiveness. Thuscontin~ingcooperation among plant management, production management and plant op~ratorsis essential to the acceptance of any such systerri, Doubts and in~ifferencesof o p ~ o n for , whatever reason, by any one of those volved, may easily doom any system unless it has been studiedin. depth. ~ e easy~to s The opt^^ solutions using social criteria are by no d e t e ~ i n eor measure, For an intelligent system to be technically correct it is necessary that its technical speci~cationsmeet the d e m ~ of ~ the s p ~ i c u application. l ~ There are a number of vendors that offer intelligent controllers for the process industry. All claim to meet the demands of industry and the choice of which one is the most suitable is not al-
ways easy. Costis one factor but prior experience with a similar plantis considered the most i m p o ~ factor ~ t in making a decision on which system to purchase. The socially opthum solution is given by the support that plant~anagement,production m ~ a ~ e m eand n t plant operators are preparedto give to a p ~ i c ~system a r to make it successful. In c o n s i d e ~ gintellige~tcontrol seriously for solving production control problems, which conventional control is unable to solve, answers must be s o u ~tot the f o l l o ~ n gquestions: will the proposed system 0
e e 0
0
0
repay its cost in finite time? decrease the costof production? increase productivi~? lead to savings in energy? improve equipment availability? be simple to use or require specialized knowledge thatis not available in-house? ~ecreasethe workload of plant operators?
It is i~plicitlyassumed that the knowledge to control the plantis available by theplantoperatorswhohavespentyearsoperatingthe plant. It should be obvious that intelligent control is not a candidate when this knowledge is absent or incomplete, as in the case of an entirely ne^ plant for which there is no prior experience. In practice this s i ~ t i o nis not very likely to occur since most new plants are based on earlier designs for which some prior knowledge exists. It is d i ~ ~ c utol tstate all the technical propertiesof a successfbl intelligent system since they vary according to the application. The success of an intelligent system is very much dependent on the support of the users of the system. Intelligent controllers~are d e ~ t i l i z and e d even red when user support is ~ d e ~ e d . ~ s s ~ i that n g plant management has been convinced that intelcontrol could lead to an improvement in the strategic position of the business, improve productivity and lead to a reduction in production costs, it is still necessary to convince plant operators to use the system. This is not always an easy task, as by tradition, operators are fearful of any new tec~ologythat may u n d e ~ i n etheir post, future and usehlness in the business. These are natural feelings that have to be taken into
36
C ~ a p t 3~ r
account when any new system is introduced. This inbred fear can be greatly reduced by includ~gthe plant operators in the system development process and providing adequate training to alleviate his fears. The older generation of plant operators spent years controlling plants from central control areas with classical i n s ~ e n t a t i o nadjust, ing the setpoints of conventional three term controllers and tediously plant activity manually. Today, the new generation of plant ophave been brought up in the era of computers, consoles with a1 user interfaces and all the benefits of ~omputer~ t e ~ a t e d ~ a n u f a c systems, ~ g Even the older plant operators have adapted, even though sometimes reluctantly, to the new e n v i r o ~ e n tNew . plant operators no longer view the introduction of advanced t e c ~ o l as o ~a threat but on the contrary, show great interest andan enviable ability to assimilate and use it effectively to improve their working conditions. This is especially true where management has had the foresight to provide the necessary trainingin advance. The days of pulling down control switches and turning control b o b s are gone, replaced by the touch of' a light pen or a fmger on a screen or the click ofa keyboard or a mouse. eport generation is a matter of seconds instead of hours, days or even weeks. ~ f o ~ a t i oisnpowerand this can ~doubtedlybe e ~ a n c e d through the useof intelligent techniques, From the viewpointof ~anagement,the success of an intelligent control system is judged solely on how rapidly the system will repayits inves~ent.This is measured from the observed (and not assumed) increase in productivi~,the energy red~ctionand the improvement in the mean-ti~e-be~een-fail~es of the plant. ~provementsof the order of 5-3094 are not ~ c o ~ ino the n process industry. History has shown that since their introduction,manufac~ersthat have takena d v ~ t a g eof the new control techniques have benefited s i ~ ~ c a n ton l yall counts. Thespecializationrequired to develop intel ~ n o w l e d ~ ne ~ i n e e r iItn would ~. be very wrong to c that no knowledge of conventional control and system theory is necessary to design such systems. On the contrary, a veryth of the abilities and limitations of classical and mo niques must consti~tethe background of the knowle most successful intelligent control systems that have b been designed by control engineers with a very thorough backound in conventional control techniques.
Control
Intelligent
37
Knowledge ~ n g ~ e e r i nrequires g the cooperation of owle edge engineers,domain experts andplantoperators in thedesignphase, c o ~ i s s i o ~ nand g operation of an intelligent system, Characteristics such as the ~ ~ a Z i ~ , ~ e p t e~ectiveness ~ o ~ ~ ofo the ~ inference Z e ~ ~ e , engine and thes ~ i t ~ ~ofi Z thei ~man-machine interface,are important to y acceptance of an intelligent system. the e ~ c i e n c and An intelligent system based on computational intelligence uses linguistic rules with which to describe the knowledge about controlling the plant. Beforeeliciting the rules Erom human operators, it is very important to stipulate the bounds of this knowledge, otherwise the system is likely to be unwieldy. It should be obvious, firtherrnore, that the intelligent systems o h a r e can be written in any high-level language or be developed on some expert system shell that simplifies the design process significantly.
This Page Intentionally Left Blank
4
iques of I n t e l l i g e ~Control ~ Conventional control systems design relies on the existence of an adequate macroscopic model of the physical plant to be controlled. first The stage in the analysis of such a systemis therefore the developmentof an explicit mathematical model of the controlled plant that adequately reproduces the c h ~ a c t e ~ s t iof c sthe plant with fidelity. The model can be determined either from first physical laws or using some technique of identi~cationfrom operating data mined from the plant. There exist a variety of design techniques thatcan then be used to design an a p ~ r o p ~ ate hard controller, Today, this task is made simpler through the use of computeraidedcontrolsystemsdesign s o h a r e withwhichtheperf o ~ a n c of e the closed system can be rapidly evaluated and optimi~ed. The ultimate objective is clearly the development of a hard controller that satisfies specific performancespeci~cations. On completion of the design, the hard controller is then implemented in hard~areor software that will executein real-time on a process c~mputer,The design of a co~ven~ional co~troller, pa~icularly in the case of m ~ t i v a ~ a bplants, le is a tedious and painstaking process that requires repeated cycles ofanalysis,synthesisandtesting.Thedesign hope~lly conver~es to an acceptable solution andulti~atelyto c o ~ i s sioning. In order to use conventional design techniques, it is essential that the model of the plantbe simplified yet be sufficiently comprehen39
sive so that it reproduces the essential dynamicfeatures of the physical plant. Modern m a n u f a c ~ n gplants have to meet incre for more flexible production and improved quality while nt enviro~ental cons~aints’ Though there were tions that modern control theory would meet these demands, it has failed by and large to do so to any s i ~ ~degree c ~ intindustry and manufacturing, which thus far have had to be content with conventional industrial ~ e e - t con~ollers. e ~ of simple, practical and robustcontrollers for induson low order holistic models of the physical plant. These approximants form the basis for the designof industrial controllers that satisfy relaxed performancecriteria. Three-term con~ollersare the backbone of i n d u s ~ a l c o n ~and o l these ubiquitous, simple and robust controllers have offered sterling service. However, these con~oller~ can only perform at their best at the nominal operating point of the plant about which the approx~antholds. When the operating point away from the nominal point, their p e r f o ~ a n ~iseinv~iablyde due to the inherent non-linearity of the physical plant. A number of t e c ~ ~ u have e s beenproposedto ant~cipatethis pro c o ~ o example n of whichis gain-scheduling, a variant sidered in a later chapter. The objective here is one of extending the domain over which satisfacto~controller performance is ma~tained.Adaptive controllers are another class of controllers whose parameterscan be varied to track es in the operat~gpoint. Here, periodic identi~cationis required in order to follow the changesin the plant dynamics. Thedepee o ~ ~ ~ tofoa controller ~ o ~ yis closely relatedto the range ofo~erationof s s . of autonthe controller and consequently to its ~ o ~ ~ ~Thee degree controller is higher than that of a fixed conomy of a gainmsche~ule~ optroller but lower than that of an adaptive controller whose range of eration is co~espondinglygreater.
n ~ o n ~ ~ n t Control ion~ There are many situations in practice where, due to foreseen ch in the controlled plant andits operational e n v i r o ~ e n ta, greater of autonomy is required. ~onventionalcontrol t e c ~ q u e soften fail to
Tec~niquesof Intelli~entControl
41
provide the necessary autonomy which these situations demand and this has led to an extensivesearchfornewadvancedcontrolteckniques which offer high autonoiay and robustness despite the unfavorable operating conditions, uncertainty and vagueness that characterize the plant and its enviro~ent.This is typically the domain of industry and manuf a c ~ i n gCoincidentally, . this is also the domain of Intelligent Control. This recognition was not long in coming and it was not long before the beneficial results of applying Intelligent Control to industry became evident. Many industrial processes are so complex that any attempt at describing them analytically is often fitile. Even if much effort is expended in d e t e ~ i n i n gsomeforrnof explicit model, it is usually so complex as to make it of little use for the design of a suitable controller. To apply modern control design techniques it is necessary to simplify the model though linearization and then model reduction before proceeding to determine an appropriate linear controller. This design procedure used often in design exercises leaves much to be desired in practice, as the original control problemis no longer attacked. Instead, some idealized controller for an idealized plant is determined and the probability that this controller is applicable to the real problem is small indeed, variably resort has to be taken to parameter tuning on-linein ordertoobtainacceptableperformance.Techniquesfordesigningand analyzingnon-linearplantsarevirtuallynon-existentandwhattechniques are available apply to very restricted situations. Thus the designer invariably falls on simulation to design an acceptable controller which mustthenbetestedexhaustively in thefield,aniterative,timeconsuming procedure. The field of~ n ~ ~~ ~~ ti oa ~2 ~which ~ i relies o n ,largely on Prog r m a b l e Logic Controllers (PLCs) and industrial three-term controllers, is now being confronted with new control techniques which find their origins in SoEt Computingand ~omputational~ t e ~ l i g e ~The ce, need to maintain tight production and quality control in large scale industrial and manufac~ingplants producing products withhigh specifications, and the inability of conventional control techniques to satis@ these requ~ements,has led to emergence of a new class of auto~atic controltechniques.What sets thesenew conventional t e c ~ i q u e s apart is their ability to arrive at control decisions and control strategies in ways that are radically different from those of conventional control. It
42
Chapter 4
is not ~ e a s o n a b l e ,therefore,thatthenew class of conventional control techni~ueshascausedconsiderableinterest in i n d u s ~ a land m a n u f a c ~ gcircles and has led to innovative controllers which have been applied to many difficult problemsin in dust^. In this new class of controllers, thep ~ objective m ~ is m i ~ m i ~ t i of o nthe u n c e ~ a i nand ~ v a ~ e n e sw sith which i n d u s ~ aprocesses l are shrouded, leading to controllers with high autonomy and robustness. and decision m ~ n procg The reproduction of the esses of human a operator of an plant executing his control task has been the subject of intense research since the 1950s, iti ion in the 1970s with the ~ p l e ~ e n t a t i oofn the first exp rule-based control system. The first practical conventional i n d u s ~ a l controllers were commissioned in the early 1980s in the cement industry, an industry with many difficult problems particularly in the critical ~ l process. ~ The n development ~ of conventional controllers since then has been very rapid and they areto be found today not onlyin most process i n d u s ~ ebut s in all kinds of household appliances as well, The new field of unconventional control, whichis based on the ~ o w l e ~ and g e experience of human operators,is better known as Intelligent Control andis suppo~edby fuzzy, neural, n e u r o - and ~ ~ evoluontrol techniques. This book is devoted exclusively to these es and their application to practical industrial~roblems.In line g this field is somewith the use of the term Soft C o ~ ~ ~ tini nControl times lsnownas Soft Co~troZ. ode^ control theory, which is based on a microscopic description of the controlled plant using differential or difference eqwn contrast, be described as Hiwd C o ~ t r ~since Z it uses thmic computing techniques. There are ~ d ~ e n tdifa l en conventional and intelligent control t e c ~ ~ u eThese s. ~ifferencesare h i ~ i g h t e din this chapter. It is ~ p o to ~ note~thatt control in no way supercedes conventional control, but rather a u ~ e n t s itin an effort to resolvesomeofthedifficultandunsolvedc problems which industry and m a n u f a c ~ i nface. ~ A ~ d a m e n t adifference l between conventional and ~nteZZ~ge~t C O ~ ~isQthe Z manner in which the plant and controllerare viewed. This is seen schematically in Figure 4.1. In conventional control, the plant and con~ollerare viewed as distinct entities. The plant is ~ssumedinvaxiant and designed to perform a specific task~ t h o u the t con~ollerin
~ e c h n i ~ uof e sIntelligent Control
43
mind, The controller is subsequently designed independently and after In contrast, in intelligent control, the plant the plant has been completed. and the controller are viewedas a single entity to be designed and com~ssioned s~ultaneously. Thus plants which are unstableby nature are stable when a unified approachis taken. A typical example is a helicopter that is by nature an unstable plant, butso long as its controller is operational is perfectly stable.
Figure 4.I (a) ~onventionaland (b)rntelligent control c o n ~ g u r a t i o ~
The generalized closed control system is shown in Figure 4.2. Here block P depicts the controlled plant, block C depicts the controller and block S specifies the desired closed system performance specifications. In c~nventionalcontrol blocks P and C are assumed linear (or l i n e ~ z e dand ) the blockS defmes the cost function, or criterion of performance,e.g.,stabilitymargin,risetime, settling time,overshoot, steady state error, integral squared error, etc. following some exogenous disturbance, The f o l l o ~ ch~acteristics g apply to industrial processes: a
the physical processP is so complex that it is either not know explicitly oris very difficultto describe in analytical terms, and the s~ecificationsS ideally demanda high degree of system autonomy so that the closed system can operate satisfactorily and without~ t e ~ e n t i odespite n faults in the system.
Chapter 4
44
Control Action
Figure 4.2 Closed control system variu~les
The inte22~~ent control p r o b 2 e ~can be stated in precisely the same way: given the plant P,fmd a controller C that will satisfy specifications S that may be either qualitative or quantitative, The basic difference here is that in intelligent control it is not ne cess^ to have an explicit description of the plantP. ~ ~ e r m o ritemay , not always be possible to separate the plant and controller. Since intelligent controlis often rule-based, the control rules are embedded in the system and form an integral element of the system. This structure presents newpossibili~es for hproved integrated m ~ u f a c ~ i nsystems. g As illustrated in Figure 4.3, ~telligentControl is the firsion of S y s t e ~ s ~ h e o r y ~ C o ~Science, p u t e r ~ ~ e r a t i Research ~ns and ~ o ~ p u t a tiona2 ~ n t e 2 ~ i ~ e nthat c e bondsthem.Thesetechniquesarenowbeing called upon to solve problems of control engineering, which were hitherto unsolvable. ~telligentcontrol has been claimedto be able to reproduce h ~ a n - l i ~ prope~ies e such as adaptation and learning under unfavorable and uncertain conditions. There is considera~ledebate on this matter and many have refuted these claims,No one has refbted the fact, however, that intelligent control is capable of controlling 1 only manually very dustrial processes that have hitherto been controlled
T e c ~ n i ~ u of e sIntel~igentControl
45
successfully. Industry has only to take advantage of this fact to benefit si~ficantly.
Comp~tational Intelligen~e
Figure 4.3 Intelligent Control
4.2 ~ u t o n o and ~ y Intelligent Control '
An intelligent system is designed to fimction in an uncertain and vague in~ustrialor m a n u f a c ~ i n g e n v i r o ~ ewith n t a view to increasing the success of the business. Successis defined as satisfaction of the system objectives, p ~ m ~ i the l yprofit margin. Intelligent control systems are required to sense the environment, infer andjustiQ the appropriate control action on the system so as to improve productivity, reduce energy consumption and labor costs. In advanced forms of autonomous systems, intelligence implies the faculties of perception and thought, the ability to make wise decisions and act correctly under a large range of foreseeable conditions in order to survive and thrive in a complex and often hostile environment. In order to relieve the human operatorof his often boring and tire~is required t in intelligent ~ ~ some control task, a high degree of ~
~
46
~ h a p t e 4r
supe~isorycontrol systems, In the case of humans, these faculties are credited to his natural intelligence. In order to approach this level of inby m e c h ~ s t i c telligence under conditions of ~ c e r t and a ~vagueness ~ ~ e a n s it, is necessary to develop advanced inference and decision support techniques. ~ u t o n o ~ofyoperation is the objective and intelligent control is the meansto this objective. Thetheoryof intelli entsystems,whichwasdeveloedby S ~ ~ ifuses s , the powerful techniques for decision support of So and advanced techni~uesof analysis and synthesis of conventional Systems Theory. The fision of ~ o ~ ~ u t a t i o n a ~ I n t e ~Op~i~ence, e~ations ~esearch, ~ ~ ~ ~Science u t and e r S y s t e ~~ h e offers o ~ a mifiedapproach to thedesignofintelligentcontrolsystems.The of this fusion is Soft Control, which today is one of the most inter areas of research and development in Control E n ~ e e r i n g .
with Intelligence is ~ s ~ b u t e d ~ e r ~ c and ~ c ainl laccord~ce y ~ ~ dprinciple i s ~ of“ i n c r e ~ i n ~ ~ r with e c ~ di oenc r e ~ i ~ ~ i~~e~~ as is depicted in Figure 4.4. Most practical ~ e r a r c ~ c a l ~ t e l l i gconent trol systems have three layers:
Techniques of Intelligent Control 0
* 0
47
the ~ ~ a n i z a t i layer o n in which high level management decisions, e.g., production scheduling, are made, the Co~r~ination layer for the tasks that have been decided on at the O r ~ a ~ ~ tlayer. i o n As in the case of the uppermost layer of the hierarchy, this layer normally possesses intelligence, and the ~ ~ e c ~layer, t i owhich ~ has littleor no intelligence, is the layer in which the commands of the higher layers are executed. This layer involves low-level controllers embedded in the plant Remote Terminal Units (RTU). Recently, some vendors have added some degree of intelligence into this layer.
LA
Figure 4.5 ~ i s t r i ~ uurchitecture te~ of an intelligent system
The uppermost layer o f the hierarchy is activated rarely and at random as need requires and uses qualitative reasoning to arrive at its decisions, The intermediate O r ~ ~ ~ t level i o nis activated by produc-
tionmanagementand has lowrepetitionfrequency,perhapsonce or twice daily. Inthis layer, management arrives at a l o n g - t e ~production policy that must be followed to achieve production goals. The production policy that has been decided in the h i ~ e s layers t is relayed to the ~oordinationlayer, which is responsible for c a ~ i n out g this policy. In this intermediate layer, decisions on changes in the policy can be made should, for instance, a seriousm a l ~ c t i o nor breakdown occur in a production line, if raw material shortages are asce~ained,or if changes are made in customer priorities, The ~oordinationlayer is also responsi~le for pro~uctquality control,m a ~ i ~ ~ tofi productivi~ on of each unit in thefactoryandforcoordinationbetweenthevariousm units. the structure of an intelli~entsystem i s n o ~ ~ l l ~ represented vertically in Figure 4.4 to indicate its hierarc~calarchitecture, in practice such systems use a ~ i s ~ i b u t e d a r c ~based t e c ~one a er clienthewer structure, as shown in Figure 4.5. Here, the ~ ~ a n i zacts and ~ x e c ~ t o are r s clients of the as the server while the ~o~rdinators system.
Intelligent controllers use a qualitative description on how a process operates instead of an explicit quantitative descriptionof the physical principles that relate the causes to the effects of the process, An ~ t e l l i controller is therefore based on knowledge, stated lin~sticallyin the form of ~ r o ~ u c t ~rules, o n which are elicited from human experts. Appro~riateinferencemechanismsmustthenbeusedtoprocess this knowledge in order to arrive at suitable control decisions. One or more of the following techniques of Com~u~tional Intelli~encemay be used to this end:
T ~ c h n i ~ u of e srntelli~entControl
49
xpert systems The objective of an expert system is to permit a non-expert user to exploit the a c c ~ u l a t e dknowledge and experience of an expert in a specific field of expertise. owle edge-based expert systems use rules, data, events, simple logic and any other form of knowledge in conj~ction withsearchtechniquestoarriveatdecisions.Where an elementof owle edge is missing then the expert system cannot but return a “don’t h o w ” response, implying an inability to arrive at a decision.An expert system cannot extrapolate data and infer from similar or adjacent howledge. Expertsystemsoperateeither on-Eine whendecisionsarerequired in real-time, as in the cases of fault prediction, energy management and s u ~ e ~ i s ocontrol, ry or Q~-Eine, as in the cases of interactive, dialog-based systems for fault diagnosis and production management.In dialog-basedexpertsystemsusingdecisiontrees,forwardandbacktracking mechanisms for searching the tree have proved successhi in industrial applications.In the category of on-line expert systems, nuna ber of vendors supply real-time expert supervisory control systems for industrial appli~ations. In the case where a complete decision tree that can account for every possible situation thatmay arise in practice is available, then such ~owledge~based systems offer a simple and effective solution to the conventional control problem. Expert systems can be developed using object-oriented languages such as LISP, Prolog and C++ or any of the available expert system shells, such as G2, NEXPERT, etc. It should be obvious that situations involving uncertain^ and vagueness cannot be treatedeffectivelyusingconventionaldecision-treebasedexpertsystems. In contrast, when insuf~cientor incomplete howledge about a process is available and when unce~aintyand vagueness characterize the plant and its meas~ements,then such owle edge-based expert systems are not always able to arrive at decisions and are consequently macceptable for real-time control purposes. It would be extremely fm+ t r ~ t to ~ receive g a “don’thow’’ or a conflicting decisionin the case of an ores seen emergency when immediate action is required! In situations of certain^ and vagueness, more effectivemecha~sms,capable of inferring decisions firom incomplete data, are necessary. Fuzzy logic
and ~ i ~ c ineural a l networks and their hybrids are the p ~ m eax ~~ p l e s of t e c ~ ~ u that e s possess approp~atem e c h ~ s m sto deal with uncertainty and vagueness.
.Z Fuzzy control The a s s ~ p t i o n sthat industrial processes can be modeledby sets of algebraic ordi~ferentialequations and that the measurements fiom sensors are noise-free and exact rarely holdin practice. Likewise, the degree of u n c e ~ a ~in t ythe controlled process, which is characte~zedby the completeness and v a ~ e n e s of s the ~ o ~ a t i that o n is mined fiom the process, playsa major part ind e t e ~ i ~ the n g behavior of a closed industrial system. Many industrial processes can be controlled adequately by human operators whose knowledge of mathematical models, a1 and the ~ d e r l y physical ~g principles on which the process operatesis limited to non~e~stent. Human operators have an~ e r e n ability t for deciding on acceptable or satisfacto~actions to follow from ~ ~ ~ l i t a t j v e i ~ o ~ a t i oreceived n from a variety of apparentlydisparate s o ~ c e s . ~ a ~ a l lwhere y , control of a process or plant is in the hands of i ~ decisions, ~ ~ but operators, it is inapprop~ateto talk abouto ~ t control rather ~ c c e ~control ~ ~ ~decisions, l e Itis unlikely that two operators will makeidenticaldecisionsinanygiven si~ationandtheonlyway to evaluate the ~ ~ aof ltheir j ~ decisions is to evaluate the productivi~of the process under their control. ~ ~ p e r i e n chas e shown that there is alproductivN ways a best operator who is consistently capable of increased ity. This is the operator whose knowledge should be elicited since he clearly h o w s how to get the most out of the process! F ~ u z ycontrol requires some ~ualitative desc~ption of the with whicha human operator can controla process. Zadeh has note for many complex processesa high l ~ v e olf recision is not ~ossibleor even n e c e s s a ~in order to provide ~cceptab~e ~ o n ~ oThis l , is a pivotal concept in ~omputational~ t e l l i g e n ~and e forms the basisof unconventional control.Fuzzy logic, whichin. no way replacesproba~ilitytheory, is the m~erlyingtheory for dealing with a p p r o ~ a t e r e a s o ~inn gmcertain si~ationswhere truthis a matter of degree.
~echniquesof Intel~i~ent Control
51
4.3.3 Neural control Artificial NeuralNetworks(ANNs)wereoriginallyproposed in the 1940s but limitations in the hardware andin t r a ~ n methods g at the time did not permit their practical application. Extensive and often disheartening research followed over the next decades and it was not until the 1980s thatANNs became established as a viable technique of Computational Intelligence. ANNs are made up of densely parallellayers of simple nonaline~neurons (or nodes) whichare interconnected with varying weights (the synaptic weights) that completely specilj the behavior of the network onceit has been trained. Various network ~ c h i t e c ~have es been proposed and their application to conventional control was simply a matter of time. A M s may be constructed with both analog and digital hardware and exhibit the properties of massive parallelism, robustness and fault tolerance, properties whichmake them ideally suited to control applications. F ~ e r m o r ANNs e possess: e e e e
e e e
the abilityto learn from experience instead of from models, the ability to generalize and relate similar inputsto similar outputs, the ability to generate any a r b i ~ non-linear a~ hctional relationship between their inputs and outputs, a dis~butedarchitecture whichis eminently suited to parallel computatio~, iderent stability, the ability of absorbing new knowledge without destroying existing knowledge, and the ability to learn on-line, despite disturbances in the process. 9
4.3.4 Neuro-fuzzy control Traditionally, fuzzy andneuralsystemswereconsidered as distinct, sincetheir origins are verydifferent. This restrictiveviewpointhas changed radically since the late 1980s when it was realized that both fields belon~edto ~omputationalIntelligence and had much in common. Fuzzy systems are very powerful for representing linguistic and s ~ c ~ knowledge e d by means of firzzy sets, but it is up to the experts
to establish the owle edge base that is used in the system. Execution of the fuzzy algorithm is performed as a sequence of logical steps at &e end o f ~ h i acfull ~ explanation of the steps that were taken and the d e s that were used in ~ v i n at g the conclusion is made available. In contrast, A W s are ideal for the representation of an a r b i ~ no~inear a~ ~ c t i o n arelationship l with parallel process^^ methods, can be trained fiom ~ ~ sets but i do not ~ offer g any m e c h ~ s mfor gi~ingexplanations on the decisionsat which they arrive. It is natural, therefore, to consider the advantages and benefits that a fusion of the two methods may present. This possibili~is discussed at length in a later chapter and it is shown how fuzzy c o n ~ oand l wal control can be combined with interest in^ results.
hapter 5
nts of Fuzzy Logic Uncertainty can be traced to Heisenberg’s principle, which established m~lti~valued logic in the1920s. In the late 1930s the mathematician Max Black applied continuous logic sets to of elements and symbols and named this ~ n c e r t ~ i The n ~ .developments that followed allowed fordegrees of ~ ~ c e r t ~with i n ~truth , and falsity being at the extremes of a continuous spectrumof uncertainty. In his s e ~ a publication l entitled “FSets”,Zadehpresented in 1965 the theory of multi-valued logic, which he termed Fuzzy Set Theory. Zadeh used the term Fuzzy Logic and established the foundations of a new area of scientific ~ndeavorthat continues to this day. Initially, many have beencritical of Zadeh’s theory, claiming that Fuzxy Logic is nothing but probability theory in disguise. Zadeh was to develop his theory into ~ o s s ~ ~ i Z i ~ which T ~ e odiffers r y , s i ~ ~ c a n tfrom ly probabili~theory. In contrast, in Japan the theory of Fuzzy Logic was rapidly assimilated into a host of ap~licationsthat have yielded enormous profits! Kosko conjectures that the principles of Fuzzy Logic are much closer to the Far Eastern concept of logic than ~istotelianlogic which the West espouses and this was the reason why the Japanese were more appreciativeof Fuzzy Logic. The theory ofFUZZY Logic establishes the basisfor represent in^ ~ o w l e d and ~ e develop in^ the mecha~smsessential to infer decisions on the appropriateactions that must be takento control aplant, Since the late 1970s, Fuzzy Logic has found increasing application in the process 53
54
Chapter 5
i ~ d u sin~ traffic , and train control systems and most notably in household appliances. The ~ d ~ e n t elements a l of Fuzzy Lo ic ne cess^ to mderstand the t e c ~ ~ u of e sFuzzy ~ o n ~are o lp r e ~ e n t ein~this chapter. For is referred firther in depth study of the theory of Fuzzy Sets, the reader to the nuerous books and paperson the subject givenin the ~ i b l i o ~ a phy in chapter 18,
In classicalsettheory, a set consistsof a f i t e or i ~ l ~ t e n of ~ b e r elements belonging to some specified set termed the ~ ~ i v oef ~dis-s ~ elements of the universe of discourse may or may not bec o ~ r s e The . long to the setA, as shown in Figure5.l . *
A
x
The crisp or Boolean c h ~ a c ~ e ~ s t i c i s expressed as the discontinuoush c t i o n
fA (x)
I ifxeA == 0 if x 4 A =I:
~ c in t i Fi on~~x)
~ ~ e ~ eofnFuzzy t s Logic
5s
~ ~ ~ e ncan e sbes introduced in the theory of sets if the ch~acteristic 0 ction is generalized to permit an infinite number of values between and I , as shown in Figure 5.2.
PA
PA
I
1
support set
A
x
1 1
of Discourse UntverseUniverse
L
support set of Discourse
Figure'5.2 ~ ~ a ~ofptr~angu~ar ~ e s and t r a p e z o i d a ~ ~ zsets zy
If Xis the universe o ~ ~ i ~ cwith o ~ elements ~ s e x (Le., the region to which the physi~alvariable is confined), then we may stateX= ( x ) . A fmzy set A on the universe of discourse Xcan be expressed symbolically as the setof ordered pairs
for the cont~uousand discrete cases respectively. Here ~ A ( x )is termed the ~ e ~ ~ e r s ~ ~ fofux nonc the t ~set o A~ and is a mapping o f the universe of discourseX on the closed interval10,I ] . The me~bershipfimction is simply a measure of the degree to which x belongs to the set A , lee.,
1
It is noted that the symbols and imply a tion to theinte~ationand s ~ a t i o n .
fizzy set and bear no rela-
Chupter 5
56
The s ~ p p o set r ~ A of a set is a subset of theuniverse of discourse Xforwhich , u A ( ~ ) > O , fuzzy set is a mapping of thesupport set on the closed interval [0,1]. As an example, consider the temsome point in a plant. Consider €or example the , This can be described in terms of a set of positive inte~ersin the range[O,1001 and definedas A=(Low) . This set e the degreeto which the t e ~ p e r a is ~ econsidered Low over the all possible tempera~es.Here, the members~p~ c t i o ,uA(x) n has discrete values specifiedin degrees Centigradeby the set: ruA(O)=~A(5)=,UA(10)=~~(15)=~A(20)=1.0, r u ~ ( ~ 5 ~ = 0ruA(30)=0.8, .9, , ~ A ( ~ 5 ) = 0ru~(40)=0.3, .~, ,~~(45)=0.1, r u ~ ( 5 0 ) = , ~ ~ ( 5..... 5 ) =, ~ ~ ( 1 0 ~ ) = 0
More compactly,this set can be expressed as: ~A(x)=
(1/0 + 1/5 + 1/10 + 1/15 + 1/20 + 0.9/25 + 0.~ / 3 0+ 0.6/35 + 0.3/40 + 0.1/45 + 0/50 + 0/55 +....0/100~
The symbol '+' represents the ~~~0~operator in set theory and must not be confused with ~ i t ~ e taddition, ic A graphical representation of the co~espond~ fuzzy g ~ e ~ b e r s hfunction ip is shown in Figure 5.3.
Figure 5.3 Discrete ~ e ~ ~ efunction r s hof~the fizzy set A=(Low)
Blements of Fuzzy Logic
57
A fuzzy varia~Zeis one whose values can be considered labels of h z z y sets, Thus T E ~ P E ~ T U Rcan E be considered as a f i u qvariable which can take onlinguistic values such as Low,~ e d i u m~, ~ r mHigh ~ l , and Yery-H~gh,This is precisely the way that human operators refer to plant variablesin relation to their nominal values. Itis shown in the following thatfuzzy variables can be readily described by fuzzy sets. In general, any fuzzy variablecan beexpressed in terms of phrases that combinefuzzy variabzes, Zin~uisticdescr~torsand hed~es. Thus the values of the Euzzy variable T E ~ P E ~ T U RinEthe forego in^ le canbedescribed as High; NOT High, r~ther-Hig~,NOT Yery-High, extremely-H~gh,quite-~ighetc., labels suchas High, negation NOT, connectivesAND and hedges suchas extremely, r~ther, qu~te etc. Figure 5.4 shows the variableT ~ M ~ E ~ T with U R aE few of its values,
I
I
T B ~ P E ~ T U~inguistic ~ Variable
Linguistic V ~ ~ u e s
~ @ m b e values r s ~ ~ Universe ofDiscourse (degrees 0
20
40
60
80 100
F i ~ ~ 5.4 r e The linguis~icvariable T E ~ P E ~ and T ~some E of its values
The dependence of a linguistic variable on another can. be described by means of afwzyconditiona~state~entof the form:
or s ~ b o l i c a l l yas: SI - 4 3 2 where Si and S2 are fuzzy conditiona~state~entswhich have the general f0IlSl: S :Xis14
and A E X A l i n ~ i s t i cmeaning can be iven to the X, for example: specify the value of
fbzzy subset A to
IF the LOAD is ~~a~~THEN TORQUE is ~ e r ~ - ~ i g ~ OR Il? the ERROR is Ne~at~ve-Larg~ THEN OUTPUT is Negative-~~~ge. Two or more hzzy conditional s~tementscan be combined (or i n ~ l u d ein~ another) so as to form a com~osite con~itional statement such as:
R : IF SI THEN (IF S2 THEN $3). It should be obvious that the composite statement into the two simpler conditional statements:
The composite statement(or rule): IF theERROR is N~~ative-La~ge THEN
can be decompose^
Elements of Fuzzy Logic
59
(IFC ~ G E - I N - E R R O R is Positive-Large THEN OUTPUT is Positive-Large) can be written more simplyas apair of rules:
R' : IF ERROR is Negative-Larg@ THEN R 2 R 2: IF C ~ ~ E - I N - E R ~is~~ositive-Larg@ R THlZN OUTPUT is Po~itive-~arge This is the most useful rule structure in practice. Human operators are invariably taught to control plants with linguistic rules o f this type, rather than composite rules that appear be to far too complicated. The number of rules that are required to control a plant varies enormously and depends on the complexity of the plant. Human plant operators rarely use more than appro~mately30 rules for routine control tasks, since rules that are rarely used tend to be quickly forgotten. To c o n ~ oal complex plant like a rotary kiln as many as 60-80 rules may be required but as few as 5 are necessary to control simple appliance^ like washing machines or cameras.
5.2 Fuzzy Algorithms Two or moreibzzy conditional statements can be combined with the OR (or ELSE) connective to form afuzzyalgorit~mRN of the form:
R~ : R ' O R R ~ O R R ~ O.... R ORP For example a subset of l i ~ ~ i s trules i c used to control a steam engine can be written as: IF SPE is ~egative-LargeTHEN (IF CSPE is NOT (Negative-Large OR N e g a t i v e - ~ e ~ i u m TW ~ N CFUEL is Positive-Large~ OR IF SPE is ~egativ~-small THEN (IFCSPE is (Positive-Large OR Positive-Smal~ THEN CFUEL is Positive-Smal~
where SPE = Speed Error CSPE = Change in Speed Error GFUEL = Change in Fuel Intake
It is ~ o t e that d linguistic control mles are of the f ~ i l i a if. r .. t ~ ...eeZse ~ form, where else is replaced by the connectiveOR.
uzzy Operators The operators min (for m ~ and max~ (for maxim^) ) can be used for either one or two elements. Thus the o~erationsmin and max on two elements a and b are defined respectively as:
a A b = min. (n,b) = a if a S b = b ifa>b a V b = max (a,b)= a if u2b = b if a
1
0 I
OR (max V)
AND (min
A)
~ l e ~ e noft Fuzzy s Logic
61
The operators min and max two of sets A and I3 result in the sets C and D as follows: C = AAI3 = ~ ~ n ( a , bb') }aEA, be13
D = A V B = (max(u,b)} 'd aeA, beB and are shown in Figure 5.5, The AND operator is therefore synonymous with the min operation and the OR operator with the max operation. Itis worth remembe~ngthis in the following chapters. When operators are used on one element only they imply the m i ~ (inf m or ~ infmum) or maxim^ (sup or supremum) of all the elements of the set, thus:
a == /L4
==
a=V A
inf(A) a e A and = sup(A) a e A
Operators can also be used as functions on elements of discrete sets, e.&
When the elements of the set are functions of a variable, then the operators are expressed as:
Chapter 5
62
It is noted, fially, that expressions that involve the min and max operators use identical rules to those of ~ i t ~ e t m i c~ t i p ~ i c a t iand o~ addition r~spective~~.
1 -
0
1
-
1 1
0
-
I -
0 -
~ i ~5.5~ ~raphical r e represent~tion of the min and max ope ratio^
.4 Operations on Fuzzy Sets A Euzzy set A on X is said to be a null set if its membership h c t i o n is zero everyw~ere,Le.,
The ~ o ~ ~ ~2 of e a~fuzzy e nsett is simply:
Two fuzzy sets are considered j~en~icaZ if their m e ~ b e r s h i ~ h c t i o n s are identical everywhere on the universe of discourse, Le.,
A fuzzy set B is a subset of A if the membershiph c t i o n of B is smaller or equal to that of the fuzzy set A everywhere onX; Le,,
A c B if ,uA (x)<
,uB(x)
Vx EX
The un~onof two fuzzy sets A and I3 on X is defined as:
64
Chapter 5
Igebraic Properties of Fuzzy Sets The standard defi~tionsfor the union, in~ersectionand c o ~ ~ l e ~ of ent classical logic can readilybe extended to fuzzy sets. The classical properties of sets can be expressedin terms of membership~ c t i o n For s ~ instance, thed i s ~ i b u t i o n ~ p r o pineterms ~ offixmy sets becomes:
while DeMorgan’s theorem becomes:
The following ropert ties apply only to fuzzy sets:
where E is the unit set specified bypA(x)= I V X E Xand
inguistic Variables As was noted earlier, a linguistic variable can take on values that are . general the value of a statements of a natural or artificial l a n ~ a g eIn linguistic variableis specified in terns of the following terms: primary terms whichare labels of fuzz;y sets, such as hi^^, Low, all, ~ e ~Zero, i ~ ~ , negation NOT and connectives AND and OR, hedges such as very, nearly, a l ~ o sand t markers suchas parentheses ( ).
65
Elements of Fuzzy Logic
The primary terms may have either continuous or discrete membership ~ c t i o n s . C o n t ~ u o membership us hctions are n o ~ a l l ydefined by analytic hctions. The Danish company F. L. Smidth in its fbzzy controllers designed for the cement industry uses ~aussian-like m ~ m b e r s ~ p h c t i oofn sthe type shown in Figure 5’7given by the expression:
X
Figure 5.7 E x a ~ ~ l of e sm e m b ~ r sfunctions h~ used in the F, L. S ~ i d tfuzzy h controller
The triplet (a,P,y) defining the shape of the F. L. Smidth E u q sets shownin Figure 5.7 is given in the following table:
66
Chupter 5
An alte~ativeway of defining continuous ~ e ~ ~ h ce - r s ~ tions is thou& the generic S and I? h c t i o n s shown in F i ~ e 5.8(a) s and 5.8(b).The firstis ~onotonicand is specified by: for x l a for a&lB for /?&ly for x 27
x Figure 5*8(a)The generic m ~ m b e r s h ~
fS(x,a,p, u ~ c ~y )i o ~
67
~lementsof Fuzzy Logic
The second generic membership h c t i o n is the IT h c t i o n that changes ~ o n o t o n i cat i ~one point only. This h c t i o n can be defined in terms ofS hctions. In this case the parameterp represents the width of the function between the median points where the mem~ershiph c t i o n has a value of 0.5. This h c t i o n is given by:
from standardized ~ o n t ~ u o fuzzy u s sets can also be constructed ~apezoidalor an^^ ~ c ~ i o nThree s . examples of ~ a p e z o i d h ~e l tions thatrepresenttheprimary sets (Srna~l,M ~ ~ i u rand n ~ a r ~ are e) 5.9. These fuzzy sets can be uniquely defmed using four p a r ~ e t e r sthe , inflexion points b and c and the left and right extinction points a and d that defmethe support set. Figure 5.10 shows examples of some o f the membership h c tions available in the ~ T ~ Toolbox. A Finally, B discrete ~ ~ fuzzy sets are sets of s i n ~ l e t o ~ ons a finite universe of discourse, For example, if the universe of discourse is given by the f ~ t set: e X=(0+1+2+3+4+5+6)
X
Figure S.B(b)The generic m e m b e r s h ~ f u nI?(x,a$,y) cti~~
E.l
1
l I
a
b
-X
X
0
x
then the h z z y sets for the linguistic variables s ~ a l l , as shown in Figure 5.1 1 could be defined as the sets: ~~~~~~
mall ( x ) = (0.3 + 0.7 + 1 + 0.7 + 0.3 + 0 + 0 ) ~ m e ~ ~( 0~+(0 x+ ~0.3=+ 0.7 + 1 + 0.7 + 0.3) plarge(x) = (0 + 0 + 0 + 0 + 0.3 + 0.7 + I >
and large
*
Elements of Fuzzy Logic
69
.7 Connectives Negation (NOT) and the connectives AFJDand OR can be defined in terms of theco~plement,union and intersection operations respectively. Usually the connective ANDis used for fuzzy variables which havedifferent universes of discourse. If
A = {pA(x)/x)
for X E X
= { p ~ ~ ) /for ~ YE ) y
it follows that
A AND B = p ~ ( xA ) p ~ ~ ) / ( x for , y )x ~ l y y; e Y = P A n S (x,y)/(x,Y)
The connective OR connects linguistic valuesof the same variable. It is obvious that both variables must belong to the same universe of discourse.
X
X
X ""
Figure 5.11 E~umplesof discrete m e ~ b e r sfunctions h~ made up of sin~letons
Thus if A =: { ~ A ( x ) / xfor ) XEX B = { ~ A ( x ) / x ) for X E X
then
The connective OR can be used only when the have ~ ~ e runiverses e ~ t of discourse exceptin the case e ~ as in ables appear on thesame side of a conditio~alilf .*, . t ~ statement the rule:
if the ~ R E S S U ~isEHjg~or theSPEED is Low then FUEL FEED must be Zero. c _
The NOT operator is s ~ o n ~ o with. u s ~ e g a t i oin~ a n a ~ a l A = ~ ~ ~ for( xely x ~ x ~ NOT A = 2= ( I - ~ ~ ( x ) / x ~ The statement“ ~ R ~ S S UisRNOT ~ High”’ is clearly identical to ement “PRE sSURE is ~ o ~ - ~ i ~ ~ ’ . L ~ ~ s t hedges i c are usefbl in generating a larger set o f linstic values from a smallersetofprimaryterms.Thus wing the term Large, h e ~ ~ very, e s the connectives NOT, AND and the p~~ wemay generatethenew fixzzy sets very-Large, N O T - v ~ ~ - ~ ~ ~ g e , Large- ~ ~ - N O T - ~ e ~ - L a r getc. e , In this mannerit is possibleto ~ o m ~ uthe t e members~p fimtion of complex terms such as:
A = NOT-Small ~ - N ~ T - ~ a ~ g e whose m e m ~ e r s ~ ~ FA(x) “
h is ction /&nall(x)]
A [I
. C(Lavge(x)I*
hapter 6
Fuzzy Reasoning At the core of every fuzzy controller is the inference en~ine,the computational mechanism with which decisions can be inferred even though the knowledge may be incomplete, It is this very mecha~smthat can give linguistic controllers the powerto reason by being able to extrapolate knowledge and search for rules which only partially fit any given situation for which a rule does not exist. Unlike expert systems that depend on a variety of techniques to search decision trees, fuzzy inference engines perform an exhaustive search of the rulesin the knowledge base of causes. The to d e t e ~ i n the e degree o f j t for each rule for a given set contribution to the final decision of rules that exhibit a small degreeof fit is clearly small andmay even be ignored while rules with a hi g e e of fit are dominant, It is clear that a numberof d e s may c o n ~ b u t e to the fmal result to varying degrees. A degree fit ofof unity means that only one d e has fEed and only one unique rule contributes to the final decision, while a degree of fit of zero implies that the ruledoes not contribute to the fmal decision. Werence engines can takedifferentformsdependingonthe m ~ e inr which Serence is defined. It is therefore prudent to review the ~ d ~ e n t aofl fuzzy s logic that will allow us to understand how the i ~ e r e n c eworks and how it may be implemented. Afmzy propo~~tio~aZ i ~ ~ Z i cdefines ~ t ~ the o ~ relationship between the linguistic variables of a fluzzy controller. Given two fiuq sets A and B that belong to the universes of discourse X and Y respectively, then we define the fuzzy propositional implication as: 71
R : IFATHENB=A+ B=AxB where A x B is the ~ ~ r t eproduct ~ i ~ of n the two fuzzy sets A and B. The ~ ~ e s i product an is an ~ s s e n t i ~operation l of all fuzzy in~erenceengines. Using the conjunctive operator (min), the Cartesian product is d e ~ ~ as: ed
while for the case of an a ~ ~ e b r a ~ c p rthe o ~~uac~~e s i product an is:
fuzzy sets: Thus, for example, given the discrete
whose co~espo~ding discrete members~p hctions (sometimes termed of ~ e ~ b e rare: s ~ ~ )
an
using the ~ n i o n(or more generally ~ i ~ j u n c t ~operator, on) the ~ ~ r o d ~using c t the conj~ctive(min) operator is:
&
=A x
B
=5
(min(1, 0.8)/( 1,I), min(I, 0.6)/(I)2), min(I, 0.4)/(1,3),min(I, 0.2)/(1,4), min(0.7, U.~)f(2,1),min(0.7, 0.6)/(2)2)) min(O. 7, U.4)/(2,3), min(O.7, 0.2)/(2,4), . . . . . t
e.....
~
e
s
i
Fuzzy ~ e a ~ o n i n g =
73
{0.8/(1,1)+ 0.6/(1,2) + 0.4/(1,3)+ 0.2/(1,4)+ 0.7/(2,1) + 0.6/(2,2)+ 0.4/(2,3)+ 0.2/(2,4)+ 0.2/(3,1) + 0.2/(3,2)+ 0.2/(3,3)+ 0.2/(3,4))
This Cartesian product can be conveniently represented by means of the r e l a t i o ~ a~ ~ a ~ i x ~
2 3
0.7 0.2
0.6 0.2
0.4 0.2
0.2 0.2
which is s h o w in graphical form in Figure 6.1.
~ i ~ 6.~I ~ rr uep h i c representution ~l of the retationalmatrix RA
Likewise, the Cartesiana l ~ e ~ rproduct ~ i c is computed asfollows:
R* = A X l?
0.60/(1,2~ 3. 0.~0/(1,3) + 0.20/(lJ4)+ 0.56/(2,1)+ 0.42/(2,2)+ 0.28/(2,3)+ 0.14/(2,4)+ 0.16/(3,l) 0.12/(3,2) + 0*08/(3 ~ 3+) 0*04/(3~ 4))
= ~0.80/(1,1)+
Chapter 6
74
whose r@~ationa~ matrix is:
I 3 I 0.16 I 0.12 1 0.08 I 0.04 1 which is shown graphicallyin Figure 6.2. It is observed that the cal represe~tationsof the relational matrices of the twoC ~ e s i a nproducts have similarities. The C ~ e s i a nproduct based on the conj~ctive operator minis much simpler and more efficient to implement computationally md is therefore generally preferredin fuzzy c ~ n ~ o i linference er nes. Most commercially available fbmy con~ol~ers in fact use this method. r
Y
e Fuzzy Algorithm The membership h e t i o n that specifies fuzzy i ~ ~ ~ i c uist igiven ~ n in s and p ~ of ~the sets ) terms of the individ~imembership ~ c t i o n p,&) A and B in different ways,as described below. Assume that
where yt is some implication operator and
h general, if A’, A’, ... AN are fuzzy sub-sets of X and B’,
...
are i nthe ~ ~ ~ t e c e ~ore causes ~ t s and thecomesub-sets of ~ ( c o ~ e s p o n dto ~ ~ e or~effects t s respectively), then thefuzzya ~ ~ ~ is~ defined i t has~the set of rules:
....................
l?,
*....I.....
This form is typically used in fuzzy control and is identical to the manner and termsin which human operatorsthink. The c o ~ ~ c t i OR, v e abbreviated as 9, depends on the fuzzy innplica~onoperator yt. Thus the membership h c t i o n for N rules in a algorithm is given by:
The foregoing relations apply to simple variables A and B. In general, the part of the conditional statement of the form “IF ... THEN . ELSE” involves more than one variable andcan be expressedas a series of nested statements of the form:
IF A1 T m N (IF A2 THl3N .... (IF ANT€EN B))
or as a state~entwhere the antecedents are related~ tive AND, i.e.,
o the connecu ~
IF (AI AND A2 AND .... AN) THEN B whereupon:
or
As noted earlier, the knowledge necessary to control a plant is usually I F( c a ~ eT) m N (efexpressed as a set of l i n ~ i s t i cd e s of the form ' fect)'. These are the rules with which new operators are trainedto conand they constitute the ~ o ~ l e base ~ g of e the system. In s possible that not all the mles necessary to control a plant licited, or are known. It is therefore essential to use some able of i ~ f e r r i the ~ g control actionin this case, Erom available mles. In classical ~ ~ O ~ ~ s i tcaZc~Z~s i o ~ a Zthe conditional statement(or rule):
IFATHENB ssed symbolically as:
is e ~ ~ v ~ ltoe the n t operation 2 V B, where A and B are sub-sets of the universes of discourse X and Y respectively and 2 = N O T A . In fuzzy c and approx~atereasoning there are two fuzzy implication inference mles:
eneralized Modus Ponens (GMP) In fuzzy logic there existtwo principal categories of inferences. The fust is Generalized Modus Ponens(or GMP) defined as follows: GMP:
Premise 1: x is A ' Premise 2: IF x is A THENy is B Consequence: y is B
is related to f ~ ~ a da~a-driven r d inference, which finds use in all controllers.Theobjectivehere is to infertheeffectgiven A '=A and B '=B then GMP reduces the cause, For the special case where to Modus Ponens. ~~~
eneralized Modus Tollens ( G M ~ The second category is Generalized Modus Tollens (or G~ the following holds:
Gl":
for which
Premise 1 :y is B ' Premise 2: IF x is A T€EN y is B Consequence: x is A '
G I " is directlyrelatedto ba~~ards ~oa~-drive~ ~~fe ~ e c ~ ~ n which i s ~ sfind , application in expertsystems. In contrast to GMPJthe objective here is to infer the cause that leads to a particulareffect. For the special case where A = 2 and B ' = B then GM1" reduces to Modus Tollens. The most common inference relations, with which fuzzy inference en~inescan be c o n s ~ c t eare ~ , given in the f o l l o ~ ~Itg will . observed that they have differ in^ degrees of complexity and s i ~ p l i c of i~ use and only the last two have found extensive application in practice.
.
-
.
"
"
-
.~
implication The classical binary plication due to~ o o Z euses the c o ~ ~ ~ c tunion ive operator in addition to ne~ationand is d e ~ as:~ e ~
For the case of N rules, use is made of the connective AND in which case:
@ = /\k Rk where k=1,2....N and
~ j c z(also k n o w as Zadeh's ~ ~ e trule i of c The ~ ~ ~ j eimplication implication) is one of the first c~onologicallyand is based on ti-valued logic. It is similar to Boole's i~plicationbut in this case interse~tionis replaced by simple ~ i t ~ e ta~dition, ie Le.,
RL =(A x Y ) $ ( X x B ) md PR(X#)
= I A ( I ..PA(x)
P ~ ) )
Likewise, thei ~ ~ ~ i c a tfor i o the n ease of N rules use is made of the connective AND is given by:
.2.5 Z
a implication ~ ~ ~
The ~ a mas-min ~ e implication ~ involves themas and min operators and is defined as:
and
Zadeh‘s fuzzy implication rule is difficult to apply in practice and it took several years before~ a ~proposed ~ a a~ simplification i that made it especially usefulfor control applications.
6.2.6 ~ a r n implication ~ a ~ ~ The ~ aimplication ~ rule is ~ a simpli~cation ~ of ~ the implication i proposed by Zadeh and uses only the min operator and is defined as:
For a fuzzy a l ~ o r i comprising t~ N rules use is made of the c o ~ e c t i v eOR, in which case the implication is:
Finally, the Larsen i~plicationd e uses ~ i t ~ e t~ultiplicatio~ ic in the om put at ion of the Cartesian product andis d e ~ n e das:
For a fuzzy a l g o ~ t ~ coMective OR, Le.,
c o m pN~ rules, s i n ~use is made of the
@ = V kRk where k=1,2....Nand
j ’ s ~ u r ~ e ~im~lications ’s have ~ o Both ~ u ~ d u ~ and extensive application in practical control e n g ~ e e ~due to their com~utatio~al simplici~. Nearly all industrial fuzzy controllers use one or theother of these two fuzzy implicationsintheirinference engine^. ~ ~ ~ d aimplication, ~ i ’ s being computationallyfaster, is found most often,
i ~ p l i cion ~t For co~pleteness,it is usefbl to revisit ~ @ n e r a Z ~j ~ e ~o Ponens d with ~ a view to compa~ngit with the implication rules previously defied. Here
and using the~ o u ~ d e d ~ r o d u c t
~
d
Fuzzy R e u s o n i ~ ~
81
6.3 The ~ o ~ ~ o s i t i Rules o n ~ lof I n f e r ~ n ~ ~ Fuzzy controllers variably involve numerous rules and it is essential, therefore, to establish suitable ~ e c h ~ s with m s which to process these rules in order to arrive at some consequent. Given, for instance, two sequential fuzzy conditional rules:
it is possible to combine the two rules into a single rule by absorb in^ the ~ t e ~ e d iresult a t ~ B and find the relations~pbetween antecedent and the u l t ~ ~consequent te directly, Le.,
R ' ~: IFA THEN c The com~ositionof these tworules into one canbe expressed as: = R' 0
R2
where Q implies rule c ~ ~ p o sIn~ terns ~ ~ oof~the. m a x - m ~operator^ use^ by M ~ ~ ~theamembers~p ~ i , function of the resultant compositional rule of inference is:
and in the caseof the Larsen plication rule using the max-product operators:
W e n discrete members^^ ~ c t i o n sare used,thecomposiw tional rule of iderence in the case of ~ a ~implication ~ ~ n is ~ i~ l o ~ o u s to the inner product of two matrices in which m~tiplicationand addition For sen innare replaced by the min and max operators,respecti~e~y. plication, addition is replaced by the max operator while multi~lication is ~ i t ~ e t i c . In the following, we discuss the proced~efor d e t e ~ i ~ n c ~ n s e ~ u(or e ~ effect), t giventhe antecedent (or cause). Given
and thecom~ositio~al rule of inference:
We wish to infer the conse~uentif the antecedent is modi~ed s l i ~ t l yto 14 ', Le.,
Fuzzy reason in^
83
Making use of the fuzzy compositional rule of iderence using the m a x ” oper~torsfor instance:
B’=A’oR =
VXbA @)/.x A ~ ~ ( x , y ) / ( x , yfor ) ) x E X and y E Y
or using the max-product operators:
B’=A’oR =
VXbA (x)/x
0
~ ~ x , y ) / ( x , yfor ) )x
E
X and y
E
Y
By way of example consider the rule:
‘IF A is Slow THEN B is Fast’ iven thefuzzy sets for Slow and Fast are givenby the discretemem~era ship ~ c t i o n s :
~~(~)=(I+0.7+0.3+0+0+0> ~~~) = (0+ 0 + 0.3 + 0.7 + I + I >
Figwe 6.3 Thefizzy sets ‘Slow’and ‘Fast’in the example
on the verses of discourse X; Y = (0,1,2,3,4,5,6> The discrete membership h c t i o n s are shown in Figure 6.3. We wish to determine the ~ ~’ for t ~ which there nod e exists. outcome if A = ‘ ~ Z jSlow
The procedure is s ~ a i g h t ~ othough ~ ~ d ,tedious. The first step is to compute the Cartesian product and usi the m h o~eratorthis is simply:
Thus if the antece~entA is modi~edsomewhat, by displacin~ the elements of the discrete fuzzy set one place to the lee to represent ~ Slow ’Zthen the~ o ~ ~ ~~iscrete ~~ a m l ~e m ~ ~~ r s ~ p the fuzzy set A = ‘ ~ction: ,uA(x)
=(I
+ 0.7 + 0.3 f 0 + 0 f 0)
becomes
which is shown in Figure 6.4.
Using the fuzzy compositional inferenced e :
B’=A’oR and the max-min operators (i.e., the ~ p e ’ ~=) max (&
@A
a compositional ~ ~rule):
~ ~ ~ ) ) )
a
~
Fuzzy ~easoning
X
85
Y
~ i ~ u6.4 r eThe co~positionalinference rule using themax-min operator^
then the discrete membership h c t i o n of the new consequent 13’ can be readilycomputed.Therelationalmatrix ( m i n ~lA ( ~ ) , , u ~ ~contains ))) elements of the matrix RA and the discrete members~p hction ,uAl(x) and is given by:
Thefinaloperation in d e t e ~ i ~ ntheg membership ~ c t i o n ,us@) of the new consequence is selection of thelargest e ~ e ~ e in n teach c ~ lwhich ~ is ~ equivalent ~ , to applying the max operator in each column. These are shown in bold. The result of the procedure is shown in Figure 6.4 and is: ,u~@)= (0 + 0 + 0.3 + 0.7 + 0.7 + 0.7)
It is noted that the dis~lacementof the members~p~ c t i o for n the new condition must be s ~ ~ Z Zotherwise , all the elements of the relational matrix will be zero and no conclusio~can be drawn By way of c o m p ~ i ~ o nthe , co~espondingresult using the max-pro~uctrule of c o ~ ~ o s i t i oinference: ~al
87
Fuzzy Reasoning
The m ~ i m elements ~ m of each column are therefore: ,~gl(yI=I
(0+ 0 + 0.15 + 0.35+ 0.49 + 0.49)
which are shown graphically in Figure 6.5.
X
Y
Figure 6.S ~ o ~ p o s i t i o nin~eren~e al using the ~ ~ - ~ r o d u ~ i
In general, i n d u s ~ a lfirzzy controllers are multiv~able,involving m inputs andp outputs. It is, however, simpler to think in terms of p ~uruZZe2fuzzy controllers each with one output only. In practice this is achieved by multiplexing a multi-input single output controller since the precedents are the same and only the antecedents change in each case. For the case of a hzzy controller with m inputs and one output only:
Now, given
the consequent B ' is given by the
relations^^:
where
Finally, for completeness, if the max-product is used in the compositional Serenee rule, the c o ~ e s ~ o n dexpressions ~g for the resultant consequen~eis given by:
where now
for k= I , 2...m andj=I 2...n.
hapter 7
he Fuzzy Control orit hm dustr rial processes are invariably m~tiRvariable and considerable research has gone into developing conventional a n a l ~ i c a l t e c ~ q ufor es multi-variable plants both in the time and frequency domains. All of these techniques assume the plant is linear, but with rare exceptions, these t e c ~ q u e have s not found their way into industry because of their complexi~andrestrictions.There is nocomparabletheoryfornonlinear processes and thus industry has had to be content with various confi~ationsof conventional industrial three-term controllers. Itis obvious that this a~angementleaves much to be desired, leaving a gap betweencontroltheoryandpracticewhich has beenwaitingtobe bridged. Soft control is proving to be this very bridge. Fuzzy controlis by nature eminently suitedto multi-v~iableand non-linear processes. Fuzzy linguistic rules required to control a multivariable plant have already been considered in earlier chapters. It was observed there that whereas the antecedents of each rule differ for each output va~able,the precedents are identical. This suggests that a multivariable fuzzy controller can conveniently be decomposed into a set of single-output controllers equal to the number of outputs. h practice, the meas~ementsof plant variables even if cont ~ ~ a t by e noise d and the control actions to the plant ac~atorsare cri~it7,In order to apply theEuzzy a l g o r i t ~it is therefore ne cess^ first t o ~ ~ the z m z e~a s ~ e dplant variables and following completion of the 89
90
~ ~ a p t7e r
o r i t h to ~ e ~the ~resultz andz thereby ~ return to the engineering world, This chapter discusses the procedureof cation and d e n ~ ~ ~ c a tasi othey n apply to practical control,
ontroller Decorn The decomposition of a fuzzy m~ti-input multi-ou~ut(MI~0) controller into a set of multi-input sin~le-ou~ut (MISO) fbzzy co~trollers (FC,, FCz ... FCJ as shown in Figure 7.1 The o u ~ u of t ~a multiin parallel in amultivariable fuzzy controllercanbecomputed processor or sequentially by m ~ t i p l the e ~MIS0 ~ controllers when ~ ~ ~ ~ u t a t i ~ nare a l nottcritical. hes
YI
Y2
Y3
Yn
Figure 7.I ~ e c o ~ ~ o s iof~ai multi-in~ut on multi-ou~ut in~remen~al fuzzy c o ~ ~ ~into l la set ~ rof multi-in~ut sin~le-ou~ut in~rementa~ ont trollers
The algorithm for computing the crisp output of a fuzzy controller involves the following three steps: (1) ~ f i c a t i o n (2) iderence (3) d e a ~ ~ c a t i o n To make these steps easierto ~derstand,consider a fuzzy controller with three inputs and a single output only. It should be obvious that the procedurethat follows can be generalized for any numberinof puts. Given a MISO controller with inputsx!, x2, x3 and outputy and assuming that the linguistic control rules are of the form:
then themembersh~ function of the o u ~ uof t the controller is given by:
where the operator p implies m ~ - m i nor product. Using the intere ~the ~ j-th rule d ( k )[O, ~ 1'3 is section operator, the degree of f u ~ l l m of defined by:
and is co~putedevery time the algorithm is executed. The degrees of ~ f i l ~ eare n tthusa measure of how c ~ o s the e ~in~utsto the c ~ n t r o l l e ~ match the control rules. They can be viewed conveniently as w e i ~ ~ t s that are assigned to every rule. In practice only a small number of the rules in the rule-base (typically less than 6 ) will exhibit non-zero degrees of Eulfillmentat any instant. The expression for the degree Mfilhent of given above applies when the M a m d ~ n i m ~ - mimplication in rule is used. For the case of
~0 plication, " the co~espondin~ ~ expression ~ for the 0 de ~lfillmentis:
~
~
~
The fkzy implication rules yield the members~p~ c t i o nof the output of thecontroller fiom knowledge of thec ~ r r e n t i n s t ~ ~ ~ ~ n e o ~ s ~ ~ ~ of the ~ inputs ~ to the ~ controller ~ exl(k), n~ s ~~~ 3 ( ~~ Thus ) . k at ~ , o nthe output of the controller any instant k the m e m ~ e r s ~ p h c t iof using the ~ ~fiLa;zy plication ~ rule is:i ~
or, the ~
~
-
~implication r ~ rule: ~ ~
c
t
where XI, X2 and X' are the co~espondi~g fuzzy sets of the controller inp~ts.These computations are simplified s i ~ ~ c a n t iflthe y sets of the inputs to the controllerare taken as s ~ n ~ Z e ~defined o ~ s as:
ereup up on;
Example 7.1 ill~stratesthe procedure.
The Fuzzy Control A l ~ o r i t h ~
93
Example 7.1 Graphical interpretation of fwzification The various operations required to establish fuzzy the set of the outputof a hzzy controller are illustrated graphicallyin this example. For simplicity assume that the controller hastwo inputs and a single output.Assume that the first input to the controllerInput-1 (xI)is specified by 5 fuzzy sets,while Input-2 (xz) isspecified by 3 fuzzy sets.Thelinguistic variablesareassumed to be VL=Very"ow, L&LOw, Z@ZerO, LH=Little-High, ~ H = ~ e d i ~ - H i and g h ,VH=Very-High. Assume that the following15 control rules constitute the rule base:
R': IfInput-1 is LOand Input-2 is VL thenOutput is LO l?: If Input-1 is ZO and Input-2 is VL thenOutput is 20 &: IfInput-1 is LHand Input-2 is VL then Output is LH R4: @'Input-1 isMHand Input-2 is VL then Output is LH &: IfInput-1 is VHand Input-2 is VL then Output is LH @: IfInput-1 is LO and Input-2 is ZO then Output is LO R7:IfInput-1 is 20 and Input-:! is ZOthen Output is LH R': IfInput-1 is LHand Input-2 is ZOthen Output isMH R9:IfInput-1 isMHand Input-2 isZOthenoutput isMH R": IfInput-1 is VHand Input-2 is ZO then Output is VH R": IfInput-1 is LOand Input-2 is VHthen Output is LH R12: IfInput-1 is ZOand Input-2 is VHthen Output isMH RI3: IfInput-1 is LHand Input-2 is VHthen Output isMH RI4: Iflnput-1 i s M H a ~ dInput-2 is VHthen Output is VH R": Iflnput-1 is VHand Input-2 is VHthen Output is VH
that cande depicted more compactly by meansof the rule matrix:
For simplici~,assume, firthemore that the fuzzy sets of the inputs and outputs are triangular and areas shown in Figure 7.2.
~ h a ~7~ e r
94
Theuniverses of discourse of Input-1 and Input-2 are ass ~ e d s and ~ eare~ expressed i c as percentages of their m~~ permissiblevalues. Output y involves 5 fizzy sets and is a s s ~ e d my value between a ~ ~ e ~Thus i cthe. inputs to the controller can take k=100% of their r n permissible ~ values ~ while the output c my value ~ e ~ e 0e md n ~ 0 of~ its%m ~ permissible m value, ~ For example, the Output y could represent the opening of a servo-valve, while Input-1 could be a pressure deviation and Input-2 could be the t e m p e r a ~ edeviation about their nominal values.
VL
-100%
VH
I
1
I
100%
The first five rulesin the rule base are depicted ~aphicallyin Figure '7.3. Ass~e, ~erm that~ at r the e , instmt of execution of the a l g o ~the ~ , ~ ~ t ~ n t a ninputs e o ~ sto thecon~ollerare -20% and -50% respectively.
Algorithm The Control Fuzzy
95
Every rule is now examinedwith a view to determine the degree to which it contributes to the final decision. This measure is termed the degree of f ~ ~ l Z9. ~ The e ~computational t time required for this determiof rules in the rule base. Fortunation is clearly dependent on the number nately, rarely are more than 20 to 50 rules required in practice and consequently ~om~utational time is ~ i ~ m a l . output
,
Ix
LO
20
W
MH
W
Figure 7.3 Graphical representation o f ~ r s t ~rules v e in the rule base
For the given valuesof the inputs, iti s clear that rulesR’,R4 and R5 have no part in the final decision (and consequently the output) since n t the non-fired these rules have not fired. The degrees of ~ l ~ l l m e of rules are consequently zero. The intercepts of the vertical lines corresponding to the instantaneous valueof Input-1 and Input-2 and the ~ are: corresponding fiuzy sets specifying them e m ~ e r s hvaEue
,
~hapter7
96
and
respectively. The degree of f~~llment aj for every rule is ~ o ~ p u from t ~ dthe ~ e ~ ~ ~ ae l ~reand s~ theh operation ~ ~ i n ~ * , Here ~ 2 ) .
Steps in the ~ u z z i ~ c ~ t i o ~
a~~o~ithm
The fist step in the hzzy controller algorithm is d e t e ~ ~ a t i oofnthe ~ i n i r n uintercepts ~ for each input, Le., their r n e ~ ~ e ~ s ~ i ~ If ~~n~tio any rule has zero intercept then it is discarded in s u b s e ~ ~ ecomputant tions, as it does not c o n ~ i b u ~toethe final decision. The second step involves dete~inationof the degrees o ~ f ~ ~ Z Z rnent of every rule. Using thevzin operator, this is e~uivalentto s c ~ n g the intercepts of every rule horizontally. Should any intercept be zero then this rule clearly does not contributeto the final conclusion. ~ e The third involves dete~inationof the ~ ~ ~ ~ o~ s i et e ~ f u n c t i o ~of the o u ~ u otf the controller. This o ~ ~ r a t i oisnde~endenton the choice of fuzzy implication rule. Thusin. the case of Larsen implication, the ~ e ~ b e rfimction s ~ p of the output of the controlleris the union ofthe in~ividual members^^ hctions for each rule that has fired ed with theco~espondin~ degree offulfil~ent,i.e.,
The FUZZYControl Al~orithm
97
This is shown in ~ a p ~ c form a l in Figure 7.4. The r e s u l t ~ t com~osite members~p function of the output of the controller is shown in the lower right hand side diagram of Figure 7.5. Using ~ f f m ~imf f ~ i plication, the composite membership function of the controller outputis the on of the ma^^^ values of the weighted m e ~ b ~ r ~s ~~ p t i o ~ s of each rule that has fired, Le.,
This procedure is shown in Figure 7.5 for comparison.
LO
20
Figure 7.4 ~eterminutionof the ~ o m p o s i ~mee ~ b e r s ~ ~ controller output using the Lursen impli~ution
LH
MH VH
fofu the n~tio~
98
Chapter 7
e = ~ ~ z z i ~ c ~oft the i o n~ o ~ p o ~ i t ~ ontroller Output ~ ~ ~ ~ e ~ s h i p F~n~tion The final step in the fuzzy controller a l ~ o is~d te "~~ ~ c a t i in on which the composite members~p tion on of the output is ~ o n v e ~ e d into a ~~~~Z~ crisp value that uniquely specifies the desired control action, It must be noted that there is no theoretical basis for decidin~which is the best way to perfonn de-per cation. A number of schemes have been proposed,each of which presents varying degreesof computat~onal comple~ity.Simplicity and speed of computation appear as the prim^ requ~ements.Below,we note those d e - ~ ~ i ~ c a t i o n t e c ~ qthat ues have f o application ~ ~ in. practical controlappli~ations:
I ~ i ~ u7.5 r e~eterminationof thefuzzy set of the contro~~er output using the ~ a ~ d a n i i ~ ~ ~ i ~ u t i o n
.i Center of area ( COA) d e n f ~ z ~ i ~ c ~ t ~ ~ n h this method the center of the area under the composite ~ e m ~ e r s h i p ction of the output of the controllerp&) is taken as the final output of the controller:
The Fuzzy C o n ~ oAl l ~ o r i ~ h ~
99
where S is the support set of pVCy). In the case where the composite membership ~ c t i o is n discrete withI elements, this becomes:
This method is sensitive to changes in the shape of the m e ~ b e r s ~ ~ hctions of the output. Because it yields intuitive results, this method has found extensive usein practical fiq control.
In this method, thecenters of gravity of the i ~ ~ i v j ~ components ~ff2 of the composite membership h c t i o n of the rules that have fired are combined by w e i ~ t i them n ~ in accordance with their degrees of ~ f i l l m e n t . The outcomeis given by:
i=l
On concluding de-fizzification, the crisp output of the controller is deposited in the real-time database for transmission to the plant actuators.
100
C ~ u ~7~ e r
n ~onsid~r~~ions The p~ncipalfactors that must be considered prior to implementation of the fuzzy controla l g o r i t ~are thef o l l o ~ n g :
.l Shape of the fuzzy sets In the continuous case, the f!uzzy sets are ~ ~ u e defied l y by some fiuzy sets can be d e f ~ e d analytic function while in the discrete case the by arrays whose size depends on the number quanti~tion of levels. The shape of the fuzzy sets used in the design ofa fuzzy controller has been the subjectof considerable research andit is fair to state that at this time there is no theory which canwid; the designer on the best shape to use for a speci~capplication, Experience in similar controllers and computational ease appear to be the basic criteria in select in^ the shapes of members~p hctions.In practice it appears ~ ~ u ~and~ i lr ua r~ ~ ~ o ~ ~ ~ c t i o n are s generally used, though ~ ~ ~ s j ~ ~ - l i ~aree used~byc t i o n s a ~ ~ bofe vendors r offuzzy controllers for the process industry. It has been claimed that theo u ~ u of'the t controller is rather insensitive to the shape of the membership function. s om par is on of the performance of a simple control system to changes in the m~mbershi~ ~ c t i o n of s both the inputs and outputsof the Euzzy con~olleris made in Appen~ixA.
o ~ s ~of~the~ fuzzy s s sets Thenumber of fuzzy setsthatarerequired to specifL a variable is termed the cQarse~essof the controller and determines the accuracy of the controller. High accuracy requiresa large n ~ b e of r fuzzy sets and c o ~ e s ~ o ~ dmemory i n g requ~ements.In some cases it is desirable to use two or more levels of co~senessto control a process. Thus when the process variables areat some d i s t ~ c efiom the desired o p e r ~ t i npoint, ~ coarse control is applied through the use of very fewfuzzy sets. As the ectory of the process approac~esthe ope rat^ point, the number of fuzzy sets is increased. Thisresults in finer control with increased accu- ~ ~ eused in classical racy. This t e c ~ ~ is u not e unlike c ~ a ~ s e control control. An example of a pair of fuzzy sets for coarse-fine control is shown in Figure 7.6, Here, three fuzzy sets (NZ - N e ~ a t j ~Ze.~. Zero,
The FUZZYControl A ~ ~ o r i t h ~
101
and PO - P ~ s i t i v e are ) used for coarse control and fivefor fine control. This technique has been applied with success in a number of processes req~ringhigh terminal accuracy.
NB
NM
NS
&
PS
PM
PB
Figure 7.6 Coarse-finefuzzy sets
7.4.3 Completeness of the fuzzy sets The firmy control algorithm must leadto a unique control action for any set of inputs. This property is termed c o ~ ~ z e t e ~and e s sdepends on the contents of the ~ o w l e d ~ e - b a sase well as the number and shape of the fuzzy sets used to describe the inputs and outputs of the controller. The m ~ e inr which the fuzzy sets are defmed on the universe of discourse, as well as the degree with which they overlapspecifies the i ~ t e of~the i controller, ~ i.e.its ability to infer a plausible outcome under all circumstances. In the example of Figure 7.6, the overlap, defined as the ~ t ~ r s e c t ~ofothe n fuzzy sets, is at least 50%. In this case there will always be a dominant rule which has membership in excess of 0.5 SO that an outcome will always be forthcoming. In the worst case, two rules at most will fire with an equal embers ship of 0.5 but still there will be no a m b i ~asi to ~ the final result. In contrast, the fuzzy sets in Figure 7.7 possess points on the universe of discourse where the intersection is less than 0.5. This leads to hifly uneven control surfaces and irregular control actions. Indeed
~ ~ a ~7 t e r
102
there are regions on the universe of discourse wheremembers~pis zero whereupon if the instantaneous value of the input falls in these re no rule can be fired with the result that the controlleris unable to any control action. This is clearly desirable and indicates that sets must overlapin order to obtain a continuous output.
Figure 7.7 Fuzzy set o v e r ~ a ~
.4 Rule ~
~ n ~ i ~ t
The set of l i n ~ s t i rules c used to control a plant or process is n o ~ a l l y elicited fkom expert human operators or domain experts. It is an undisn is putedfactthatthe ~ o ~ l e d gelicited e from two h ~ a o~erators rarely the same. Though they may have been trained with the same rules, with experience and time they have learned to modify them, believing that in this manner they can control the process better. Of course “better” is clearly a subjective criterion, since it may imply increased prod u c t ~ v i reduced ~, energy costs oreven less trouble to theoperator. Many of these criteria are conflicting. Thus in eliciting thehowled e for a controller it is advisable to restrict interviews to one humanoperator,e.g.,the knowledge on how to control the plant ef~cientlyand disputed. If this is not possible, then there is little r e c o ~ s ebut for the plant engineer to state the rules that he wishes to be followed. Evenso, d e c o ~ is i ca tcommon phenomenon and some means mustbe found this conflict. By simply ~ t i n the g rules in s e ~ ~ e n t ioral der it is v ~ a l l ypossible to do so, however. ~ ~ p means ~ care a
~
The Fuzzy Control ~ l ~ o r i t h ~
103
very effective when the number of inputs to the controller are three or less whereupon rules can be represented in the form of tiles whose colors specify the controlaction required. This is none other than theFmzy A s s ~ c ~ ~e~~~ ~ ~ ~ v or e F~~ and Figure 7.8 shows an example of this simple technique thathas proved very useful in practice, The human eye is an excellent detector of abnormal color changes and thus by simply looking at the manner in which the colors of the tiles vary in control space it is possible to identify possible conflict.
Figure7.8 ~epresentationof the knowledge base in tile form or Fuzzy A s s o ~ i a t i ~Memory e FA^
This Page Intentionally Left Blank
uzzy Industrial Control The industrial three-tern controller without doubt consti~testhe backbone of industrial control, having beenin use for over a century. Threeterm controllers can take a numberof forms, fiom the early mecha~cal to later ~ydraulic,p n e ~ a t i c analog , and digital versions. The modern form takes the form of multi-tas~ngdiscrete-time three-term algorithms embedded in almost all industrial PLCs and RTUs. Undisputedly, industrial progress would have been greatly limited but for these ubiquitous controllers. To this very day, the majority of industrial plants rely almost exclusively on this ine~pensive,robust and easy to use conventional controller. The output of a conventional industrial controller normally involves three-terms: thefirst is proportional to its input (the P tern), the second is propo~ionalto the integral of the input (the I term) and the third is proportional to the derivative of the input(the 1)term). In most practical applications, the firsttwo terms are sufficient and only a small fraction of industrial controllersmake use of the derivativetern. Threetern ont trollers can be c o n f i ~ e din a variety of ways, fiom the simplest autono~oussingle-loop controllerto cascade control when a single controller is insufficient to provide the necessary control due to the interactions in the controlled variables of the plant. Three-term controllers can also be configured so as to provide ratio or blending control when ~ u ~ t i t i must e s be maintained as percentages, typically found in materials blending and mixing processes. 105
Productivity is closely related to the ~~~Z~~ of control. Low quality of control implies poor product quality with products cthat~ o t meet standards, reduced productivity, loss of competitiveness and ultimately the collapse of the~ a n u f a c ~ eEffective r. controlis thus of vital importance where high product quality and productivity are essential, standards are to be maintained and market share assured, operation of a plant implies correct tuning of the controllers to meet the product specifications while the efficiency of a plant is critically dependent on specifjling the correct p a r ~ e t e r of s thesecon~ollers. Traditionally, a three-term controllers are tuned on-line by human experts who excite the plant by injecting appropriate d i s ~ ~ a n c e s to the set-points and then systematically adjust,the parameters (Le., gain con st ants^ of the controller until the plant meets its desi is normally necessary whenever the operating condiarechanged,Controller tuni requires considera~le ence and takes time to master. The way in which a human tunes a control loop or plant is based on h e ~ s ~rules i c which involve such factorsas the rise time, settling time and steady state error of the closed system. Indeed, as will be seen later in this chapter, these rules are put to good usein the design of expert controller tuners, which a n ~ b e of r vendors offer today.
Manual tuning can be suppo~edby simple a n a l ~ i c a l t e c ~ q u which es, systematically determine the best (in some sense) controller parameters ~ ~of the controlled ~ based on a simple macroscopic model (or plant. Ziegler and ~ i c ~ ooffered ls design procedures to tune indus~ial controllers as far back as the 1940s that arestill used to this day, By observing the initial slope of the response of the plant when su~jectedto a step d i s ~ ~ a n and c e the dead time of the plant before it respon~s,a lex plant can be approxim~tedby the classical first order lag plus has dead time a ~ ~ r o ~ i m aThis n t . simple but very appro~imat~ appro~ch formed the basisfor improved variants on the~iegler-~ichols approach. Modem tuning techniques suchas those by Persson and Astrom require additional info~ationfrom the response of the controlled plant and require morecomputationaleffortbutyieldvastlyimprovedplantre-
~
Fuzzy Indus~ialControllers
107
sponses, All these techniques assume that the controlled plant is scalar, Le., has a single input and a single output and are not applicable to multi-variableplants. Multiva~ableplants,forwhichthree-termcontrollers do not find ready application, require an entirely different approach to controller design. For best performance three-term controllers must be tuned for all operating conditions. U ~ o ~ a t e l the y ,dynamic characte~sticsof most industrial plants depend on their operating state and production rates and these are far fiom linear or stationary. At h r e e - t e ~controller is normally tunedfor best (note that use of the word o ~ t i is~ tactfilly u ~ avoided) perfo~anceat a specific operating state. When the operating conditions of the plant change, so does the opera tin^ state, whereupon the parameters of the controller may no longer be the best and as a consequence performance is degraded. The degree to which such degradation is acceptable clearly depends on the nature of the controlled plant, plants that arehighly nonlinear being the most difficultto control effecs sa controller is a measure of its ability to opertively. The r o b ~ ~ e of ate acceptably despite changesin the operating state of the plant. Where the variations in the plant are severe, a three-term controller with fixed parameters is no longer effective and alternate techniques, which are capable of ~ a c ~ i ntheg changes in the plant must be employed. Such t e c ~ q u e sas g a i ~ - s c ~ e d ~ ~auto-tuning ing, and adaptive control are c o ~ o used ~ yto extend the domain of effectiveness and thereby therobus~essof the controller.Fuzzy logic can likewisebe used to extend thed o ~ aofi ~effectivenessof a three-term controller,
8.2 Fuzzy Three-Term Controllers The advent of Euzzy control motivated many researchers to reconsider the f a ~ lrobust i ~ three-term controller in the hope that “ f i ~ f L i n g it” would i ~ p r o v eits domain of effectiveness.This is a case of a technology r e t r ~ ~int ~ , ~ ~omp~tational c h ~telligence is applied to improve a well-known device. The result has been a new generation of intelligent ~ e e - t controllers e ~ with increased robustness that a number of vendors currentlyare offering. Fuzzy logic can be applied to three-term controllersin a number of ways, One obvious approachis to fuzzifL the gains of the three-term
controller by establishing rules whereby these gains are varied in accordance with the operating state of the closed system.In this case the controller output has the generalized form
which when fuzzified can be expressed as the weightedsum
Hybrid fuzzy three-term controllers in which only the proportional and derivative terms are fuzzifled while the integral term remains conventional, have also been used. In this case the controller outputis
An alte~ativeclass of fuzzycontrollers,whichpossessthe zzy characteristics of a two-term PI controller is the ~ ~ n e r i c ~ ucon~r~ZZer which has been used extensively in practice. Generic fuzzy controllers are very simple and require few rules to operate effectively. Using the closed system error andits derivative only, thisclass of fuzzy controllers is normally incre~entalwith output Du =fie,De) which must subse~uentlybe integrated (or a c c ~ ~ a t etod )generate the final controller output.
e n ~ ~ ~ lthree-term ize~ controllers The out~utof a convent~ona~ three-term controller cont~insa term pro~ o ~ i o ntoa lthe error e between the desired and the actual output of the con~olledplant,atermproportionaltothederivativeoftheerror ~ e ~ ~ eand / da tterm ~roportio~al to the integral of the error ledt. In practice it is ofien preferable to use the derivative and the integral of the output of the processinsteadoftheerror in order to avoidsudden changes in the output when changing the setpoint,Le., bump-less operation. If the fuzzy sets of the error, derivative and integral terms E, aredE
and 123 respectively, then the control rulesof a generalized fuzzy threeterm controllercan be expressed as:
X: IF e is Er AND De is AEr AND Fdt is IEr THEN u is
u
Further, if the d o n operator relates the control rules, then the fuzzy algorithm reduces to the fuzzy implication rule
The fuzzy set of the output of the generalized fuzzy three-term controller is thus given by
U = (ExAExlE) o Rr whose membership ~ c t i o is n consequently
for e EE, D l k d E and h d t eIE. A graphical display of the parametersurface of such a three-term controller would have to be three-dimensional and it would be difficult to comprehend the effect of each parameter on the controller output,
8,2,2 Partitioned controller architecture It is often more convenient to partition the three-term controller into two independent fuzzy sub-controllersthatseparatelygeneratethesignals apDand ul that correspond to the proportional plus derivative term and the integral term respectively. The resultis a fuzzy proportionalplus derivative sub-controller FPD in parallel with a fuzzy integral controller FPI as shown in Figure 8.1. Both sub-controllers are fed with the error and its derivative. The second sub-controller requires an integrator (or accumulator) to generate the integral term. Both this controller and the generic two-term fuzzy controller that is discussed in a later section in this chapter require the error derivative De. In situations where the sig-
C ~ a p t e8r
110
na1 contains high frequency extraneous noise, there may be certain misgivings in genera tin^ the derivative or difference term &om the error since noise aggravates the situation. In this case it is clear that some form of low passfiltering or signal processingis necessary to re~ucethe effect ofhigh frequency noise.
e
UPD
U
De
~ntegrator
~o~ ~on~roller into two ~ u ~ - ~ o n t r o l l e r s Figure 8.1 D e ~ o ~ p o sofi a~thr~e-term
The d e matrix or Fuzzy Associative Matrix for the FPD fuzzy subcontrollers is:
This FAIU contains 7x7=49 rules, a number that must be compared to thecase of a ~ e e - t controller e ~ whichwouldrequire 7x7~7==343 rules and co~es~onding memorystoragelocations in its owle edge base, It is noted that theFAM shown aboveis s ~ e about ~ the c principal diagonal. Itis possible to take advantage of this fact and store only half the d e s if memory must be conserved, Rulep jacent d e s are syste~aticallyeliminated, canM e r reduce the number
Controllers Industrial Fuzzy
111
of rules that haveto be stored to about a quarter of the original number or about a dozen. Applyingthe ~ a ~ ~ compositional a n i ruleand c o d i g the controller inputse and De to the closed interval[-3,3] and quantizing the two inputs into 7 levels, results in the relational matrix shown below. The entries in the matrix are the numerical values ofupD that are stored in the controllermemory: this form of Zook-up table control is very simple to ~ p l ~ m e and n t has been applied extensively in practice. By altering some of the entries in the matrix it is possible to trim the performance of the controller finther, intentionally warping the control surface in order to compensate for inherent non-linearities in the plant characteristics, In the design study presented in Appendix A, it is shown how step-response asymmetry may be compensated for using this approach.
1
0 eIDe -3 -2 -I I -3 -3 -3 -2 -2 -3 -2 1-3 1-3 1-3 1-2 1-1
2
-I
lo
The relational matrixis shown graphically in Figure8.2. This is none other than the control surface of the FPD sub-controller. Due to ~ u a n t i ~ t i oofnthe controller inputs, the controller output is not continuous and smooth and is sometimes referred to as a ~uZtiZeveZreZay co~~oZZer. Clearly the control surface can be smoothed and the controller performance improved by using extrapolation techniques in which case the control actions are defined everywhere in the bounded control space.
Figure 8.2 Control surface of the FPD s ~ ~ - ~ o n t r o l l ~ r
ybrid architectures Various hybrid ~ c ~ t e c that ~ ecombine s fuzzy and d e t e ~ i ~ s teleic ments have been proposed for the three-tem controller. One such arc ~P+D e subc ~ t e c is ~ shown e in Figure 8.3. In this ~ c ~ t e the controller FPD is identical to the one considered earlier but the i ~ t ~ ~ a l term involves a gain coefficient which is the result of using the simple rules given below. Thepropo~ionaland derivativeterns are d e t e ~ i n e ~ from the simple set of rules
while the integral gainis varied a ~ c o r to d the ~ ~f o l l o rules ~ ~
Fuzzy ~ndustrial~ o n t ~ o ~ l e r s
113
The final outputof this hybrid fuzzy controller is the sum
De e
Figure 8.3 Hybrid three-term controller
Extending the method further, it is possible to design a threeterm controller using the configuration shown in Figure 8.4 with each of the controller parameters (kp, kl and kD)specified by independent rules, lee.,:
8.2.4 Generic two-term fuzzy controllers The phase plane, which portrays the trajectory of the error between desired and actual output of a process, is a useful domain in which to specifjl the linguistic controlrules of the process. Figure8.5(a) shows a typical trajectory in phase-space, analogous to state space in which one of the states is related to its derivative, Figure8.5(6) shows the errore(t) and the corresponding rateof change of error De(t) in response to a step excitation of the plant.
114
Chapter 8
De e
Figure 8.4 Fuzzy contro~~er with independent~~~zypara~et$rs
The temporal error responseto a step e~citationand its derivative canbe broken up into regions defined by their zero crossover points. Thus the error may be coarsely described as positive, zero at the crossover or negativ~.A s s ~ e therefore, , that the three fiuzy sets ~POsjtive, Zero and ~ ~ ~ ~ suffice t j v to e describe ) each control variable.
In Region 1 we can thus write the first generic control de:
The objective of this rule is to apply maximum positive control action ., torque in the case of a se~omotor)to the controlled processin order to force itto accelerate to its f'iial value with a mum rise time. In Region 2 the correspond in^ generic control rule is:
Here the objective is to apply maximum negative control action to deceZer~tethe process in order to minimize overshoot. Using similar reaso^^, the 11 d e Fuzzy Associative Memory that followsis derived.
Fuzzy industria^ Controllers
115
e
1 I
0.5
0
-0.5
-1 i ii iii iv v vivii
viii ix (6)
Figure 8.5 (a) ~ ~ a s e - s p a ~ e t r a and j e c t(6 o)~ti~e-domainresponse
It is ob~iousthat finer control canbe achieved if the n ~ b e of r control rules is increased, The number of rules is conse~ue~tly a measure of the~ a ~ u l aofr ithe ~ controller.
Increasing the number of fuzzy sets assigned to each control ~ ~ efor , variable to 19 and using 5 fuzzy variables PL for ~ O s i t i v e - L ~PM P o s i t i v e - ~ e ~ i uPS ~ ,for Posirive-S~al~~ ZO for Zero, NS for N e ~ a -
Fuzzy Industrial Controllers
117
t i v e - ~ ~ aN~ l ~ ,for N e g a t i v e - ~ e d i uand. ~ NL for Nega~ive-La~ge leads to the FAM given above. DU e De
Generic Fuzzy Controller Integrator
Figure 8.7 Generic two-term incrementalfuzzy controller
Figure 8.7 shows a schematic of the generic two-tern architecture. This incremental fuzzy controller is generic since it can be applied to any dynamic process thatexhibits under-damped behavior. Being incremental, it is necessary to supply the nominal controller output uo to the controller in order to generate the total control variable.
8.3 Coarse-Fine Fuzzy Control W e n a controller is required to operate under conditions of both large and small excursions of its inputs from their nominal values, it is convenient to usetwo or more sets offuzzy rules to effect improved control. For large excursions of the controller input variables, coarse control is applied with the objective of forcing the plant to return to its nominal operating point as rapidly as possible. Accuracy of control is of secondary importance under these circumstances and only a few rules are required.Whentheplantvariablesreachsomesmallregionaboutthe nominal operating point then fine control is applied. Here a new set of control rules necessary to effect the desired fine control actions are used and these involve a larger number of rules and fuzzy sets. Under normal operating conditions the controller uses fme control for small excursions about the nominal operating point. An alternative way of achieving coarse-fine control is through z o o ~ i n gof the universe of discourse of each controller input variable.In
this case the universe of discourse is varied, either in discrete regions in control space or smoothly as the plant approaches the desired ope rat^ point (see fuzzy ~ainascheduling in chapter 10). This approach has been used to great effect forthecontrol of high precision mechatro~cdevices,
hapter
1-tirne Fuzzy Contro C~onolo~ically, fimzy control was the firstform of intelligent control. It was to radically alter the course of Control Engineering with seemingly infinite applications. Fuzzy control appears today in real-time applications rangingfkom domestic appliances (suchas air-conditioners and reors where it has become a major selling point) to hi~-speed omobiles and process control. Zadeh's theory of fuzzy sets laid the foundations ofF w Control and the revolutionin Control Engineering that continuesabated to this day. mereas the fo~dationsof fuzzy settheoryareonsolid $Pun4control is still verymuchan art, requiringknowledge and experience to implement correctly. Soft control is not a panacea for all control problems and it would be wrong to state that it will ultimately replace conventional control. There are numerous cases where conventional controlresults in excellent qualityof control and thereis no need to replace it. There are howevermany cases, especiallyin industry, that have defied solution using any of the conventional control t e c ~ q u e s and here fuzzy control has proved invaluable, offering solutions where none existed previously. The control strategy of an i n d u s ~ a lplant may oftenbedescribed in linguistic terms by way of control rules or control ~rotocols that relate the control actions to the controlled variables in l ~ n ~ ~ s t ~ c terns. The res~tantfiuzy controller must faithfully replicate the actions frons which the controld e s were elicited. of the human operator 119
120
Chapter 9
As noted earlier, therules (sometimes referred to as ~ r o ~ ~ c t i o n as a set rules) by which a plant can be controlled are normally expressed of relational statements of the form:
These rules, which are suitably encoded, are stored in the owle edge baseofthecontrollerandareprocessed by a fuzzy inferenceenplication ~ c t i o n prese~ted s in chapter 6 . gine based on one of the
ervisory Fuzzy ~ o n ~ r o l l ~ r ~ Theelements (i-e., buildingblocks)of schematically in Figure 9.1 and are:
a fuzzy controllerareshown
a r e a l - t i ~ e d a tbase a RTD~ where the current and the previous values of the control variables of the physical planto b ~ a ~ e d &om the localRTUs are deposited (usuallyf o l l o some ~ ~ form of signal processingto remove extraneouss real-time database also contains the values of the variables (i.e,, control actions) and the time when the previous action was taken on the plant. The real-time databaseis the interface between the physical plant and the controller, the ~ o ~ l e base ~ g A23 e in which the control rules, suitably coded, are stored, a database FS in which thefizzy sets of the inputs and outputs of the controller are stored, a ~ ~ FZ zwhere ~ the e inputs ~ to the con~ollerare transformed into the domain fuzzy of sets, an inferen~e engine IE, the kernel of thefizzy co fuzzy sets of the control software with which the computed, a d e - ~ z ~ DF e rwhere theEuzzy sets of the outputs are transformedbackintotheengineerimainandthe n~erical controlactionsaredepositedieal-timedatabase R for transmittal to the RTUs which subse~uent~y enforce these control actions on the physical plant and, finally
Reul-tim~Fuzzy Control e
121
a ~ e v e l o ~ msystem e ~ t L?,S through which the engineer interacts with thefizzy controller during the development or whenever modifications have to be made. This module is removed once the controlleris finalized.
Datubase RTDB
~evelopmentSystem DS
Figure 9.1 ~lementsofa fuzzy controller
Chapter 9
122
In mode^ i n d u s ~ a lplants, the link between the s u p e ~ i s o ~ control system (whether S C m A or DCS) and the physical p l ~ bein t con~olledis a Local Area Network (LAN) to which t e ~ n aunits l are a ~ a c h eThe ~ . RTtJs inc~udeanalog to conve~ersfor the conversion of the physical variables at rates that can reach thousands of samples per seconds. These units i n v ~ a b l yinclude s o h a r e with which three-tem con~ollers(PDD) can be ~ ~ l e ~ e n t e d ~ as we11 as software with which the RTUs can c o ~ ~ c awith t e the host r (Le., s e ~ e rvia ) the LAN, Theclien~servera r c ~ t e c ~ e sho~ e 9.2 and is one of the most c o ~ o n It is noted that in the new generationof indus sensors and ac~atorswith built-in micro-controllers that can be directly c o ~ ~ c t to e dthe LAN are gradually replacingRTUs.
PC
PC
Clients
Distri~utedsupervisory control systems involve a cluster of industrial ~ a d ~crocomputers, e RTUs, ~croacon~ollers and pe~pherals c o M ~ c t ~toda LAN. Each component of the cluster performs real-time control of a specific sub-process of the plant. The hostGO
contains the real-time database where all current data on the state of the plant is stored and *canserve this data to any of the clients ( s o m e t ~ e s referred to as ~ ~ in the e cluster ~ ont demand. ~ ~ An alternative architecture involves a dis~i~~ted ~ea~-ti~e dat u ~ in~ which, e each client retains the data pertinent to the tasksit is assigned, The clientcan transmit this data to any other client on demand. This leads to considerably more data having to be t r a n s ~ ~ eover d the LAN between clients, resulti~gin data ~ a n s ~ s s i odelays, n Finally, a hybrid a r c ~ t e c in ~ ewhich the local real-time databases are m ~ o r e din the server can be used, In this case, each client must continuously update the data that has changed since the last transmissionin the master database in the host computer. The advantage ofthis last architectureis that in the unlikely case that the host computer fails and its data is lost or corrupted, then the master database canbe restored fkom the local databases in the clients when the host becomes operational again.
.2 ~ r n ~ e d d eFuzzy d Controllers Fuzzy c o n ~ o l l ~are r s increasingly being embedded in ~croacon~ollers fuzzy for operationat the lowest level of the control hierarchy. Chip-size ~cro-controllershave found their way into a variety of products suchas es, printers, video cameras, laser printers, cars, household appliances, and so forth. The use of real-time embedded~cro-con~ollers is spreading rapidly for two reasons: convenience and cost. Except for memo^ restrictions, embedded controllers can be p r o ~ a ~ to e do d ~ s do. Unlike their larger just about an^^ their larger c o u n t e ~ can c o u n t e ~ ~which s , operate under such real time operating systems as Unix or Windows NT, there is no standardized real-time operating system for micro~controllers.Windows CE, which features a d e t e ~ s t i c scheduler, may change this si~ation,however. The p r o ~ ~ i lann g guage of choice for micro-controllers in the foreseeable hture is likely to be Java, which is processor indepe~dent.~ c r o - c o n ~ o l l e r h a r d ~ ~ e has generally been restricted to 16 and 32 bit processors but 4-bit and even 64-bit processors are in use, fomer the in. domestic appliances, folThe architec~eof embedded intellig~nt~croacon~ollers lows that presented in the previous section closely. Only the development system is independent and resides ina host PC where all develop-
ment is performed off-line. Once thedesign has been completed, the executable software, which includes the knowledge base,fuzzy sets, inferine, W f i e r and de-hzifier, is downloaded to the microvia a local link or is burned into an erasable pro read-onlymemory (EPROM) which is then plugged into the microcontroller. A new class ofintelligentindustrialthree-term controllers is gradually replacing conventional i n d u s ~ a controllers l in a number of ations that require increased autonomy. These controllers ations where the o~erationaldemands of the ap~lic~tion xed or p r o ~ ~ gains. e d Intelli~entindustrial controllers are implemented in s o h a r e in micro-controllers (MC), programmable logical controllers (PLCs) or remote terminal controllers ( R T ~ s ) and a number of vendors today offer appropriate software for their development. In new plants it would be wise to consider inco~oratinginent controllers that have been shownto enhance control over conventional industrial controllers. In order to minimize memory requirementsas well as accelerate computation in embedded hzzy controllers, many vendors restrict both the n ~ b e and r the shape of the permissible fuzzy sets for both inputs and out~uts. Trian~lar fuzzy sets are almost ~ v e r ~ a lused l y for the inputs and outputs of the controller. Rules are coded numerically and the n ~ b e ofr fuzzy sets is restricted. Singletons areoften used to define the fuzzy sets oftheoutputs of thecontrollers as they simplify def u ~ ~ ~ aconsi~erably. t i o ~
~telligentcontrollers residein a devoted i~telligeni agentor are distrib~ uted t~oughoutthe clients in the cluster. They can be executed either at regular intervals (analogous to discrete-time control) or on demand. In the case of a devoted intelligent agent, the executable pro fuzzy controllers is scheduled to run at fixed time intervals. The execution interval is clearly dependent on the dynamics of the plant under control. The execution intervalis typically set equal to one-tenth to one~ e n t i e t hof the value of the smallest time constant of the plant. In some cases, ~ a ~ i c u lin~ process ly control, wherestatic control is acce~table,
FuzzyReal-time
Control
I25
the execution interval is set equal to the settling time of the plantas determined fiom expe~mentalobservations. An alternative techniquefor scheduling the ~telligentcontroller which is useM p ~ i c ~ a rwhen l y dealing withfast dynamic plants, is to have a con~o2s c ~ e ~ ~that 2 e rcontinuously tracks the inputsto the fuzzy controller and their changes. Based on some measure of the rates of change (or differences) of these inputs, the control scheduler is pro~ a ~ to decide e d whether or not the controller should execute. Clearly if the inputs to the controller (i.e., the plant variables) do not change significantly with time, imply in^ that the plant is station^ and operating at its nominal state, then thereis no reason to effect control and the controller a l g o r i t ~is not executed. Conversely, if the inputs are chan~ing s i ~ ~ c ~ ~ t l y , that i ~ the p l plant y i n is~ in transition then i ~ e d i a t ace tion must be taken in order to restore it to its nominal state. By continuously following the changes of the controller inputs, the control scheduler is therefore in a position to issue commands on when to execute the controller. If, following execution and after some mini^^ time interval, the control scheduler continues to observe that the rates of the controller inputs exceed pre-specified limits, then it sends another command to execute the controller and continues to do so until the plant returns to its nominal state. This scheme leads to a controller that executes at irregular intervals and on demand. The control scheduler is s h o w schematically in Figure 9.3
Execution Scheduler
Figure 9.3 The real-time execution sehe~uler
On executing the fuzzy a l g o ~and ~ f o l l o ~de~ cation, the new control variables are deposited in the real database. At regular intervals ( ~ e a s in ~ milliseconds) e ~ and p t variables since there has been a s ~ ~ch ~ e incthe ~control ' the a l ~ was o executed, ~ ~ this ~ o ~ a t i is o ~n ~ s via ~ the ~ e on the plant.This fito the approp~ateRTUs for ~ e d i a t action nal action closes the control loop. The s ~ c of~a fuzzy e controller can be seen to be very era1 andis applicable to a wide variety of plants and processes. The o that is required to change the controller is to r n ~ d the i ~n ~ b e r s inputs and outputs of the controller, the shape andn ~ b e of r the sets and, most i m p o ~ ~ t lthe y , rule base.
le 9.1 W a ~ t ~ w a t etre~tment r control An interesting applicationof real-time k z y control to an enviro~ental problem is outlined below. The system has been usedin a ~ ~ c i pwaa l ter-treatment plant, achieving s i ~ ~ c a n timproved ly water treatment over e ~ s t i n g ~ e t h oThe d s .system was implementedon a c o ~ e r c i aPLC. l T ~ o suitable u ~ modi~cationof the biological ~ e a ~process, ~ n t stabilization of the nitrogen c o m p o ~ d s(nitrates, ~ o ~canaalso) be a~hieved.Biolo~ical treatment is classi~edby thetype of microo r g ~ s m that s are used in the removal of the organic load and is either aerobic, anaerobic or both. Because of the anoxic zonein aerobic treatment, the simultaneous removal of both nitrates and ~ o n i isapossible. Interest is n o ~ a l ~focused y on secondary biolo ical ~ e a ~ e and n t on aerobic ~ e a ~ e inn pt ~ i c u The ~ ~wastewater . t r ~ a ~ e plant n t consi~ered in this paper involves extended aeration and is a v~iationof the active sludge method.A sc~ematicof the plantis s h o in~Figure 9.6. Here two zones as well as a seconthe biological reactor possesses a tank with dary settling tank Wet sludge is fed into the anoxic zone in which low o ~ ~ conditions e n prevail and ~ e - n i ~ ~ c a t itia o nally takes place. To operate satisfa~to~ly, this stage requires low oxygen ~oncentr~tions in the presence of nitrates.
e
d
FuzzyReal-time
~ontrol
127
Sludge is transferred to a second aerated zone where organic load is removed and ~ ~ f i c a t i take o n place. A fraction of this sludgeis then returned to the anoxic zone while the remainder is fed to the secondary settling tank. The ~ u a n t of i ~sludge returned for furthert r e a ~ e n depends t on factors that affect ~trificationand de-~tri~cation and is therefore one of the process variable^ that must be controlled. Finally, a fkaction of the sludge in the secondary settling tankis returned to the biological reactor, while the rest is removed and fed to the fbsion stage.
Sludge feed
Primary settlin~tank
Secondar~ settl~ng tank
\
\
Re~ainingsludge
Sludge Drying Figure 9.5 S~hematicof a typical wa~tewatertreatment p l a ~ t The fraction of sludge fed back to the biological reactoris another variable that must be controlled. In all wastewater treatment plants it is necessary to control the oxygen content in the aerated zone of the reactor. The oxygen content depends on the removal of the organic load and nitrification. The removal of organic load,~trificationand de-~tri~cation are the three principal quantities in a wastewater treatment plant that must be controlled. This is achieved by a suitable control strategy for the following threem a ~ p ~ a t variables: ed
Chapter 9
1. the oxygen supply to the aerated zone ( ~ ~ ~ e e ~ , 2, the mixed liquid returnsrate from the aerated zone tothe anoxic zone of the biological reactor (R-ml)and 3. the sludge returns rate from the secondary settling t biological reactor( ~ - s ~ ~ ~ ~ e ) ,
Meusure~entof
Ban
Reuctor
for fusion
Figure 9.6. The ~reatment process and its princ~al varia~les The con~olledvariables of the plant and inputs to the con~ollerare: the ammonia concen~ationin the reactor (N-NE3), the nitrateconcen~ationin the reactor(N-NO,), the dissolved oxygen in the reactor(DO), the t ~ m p e r a ~ inethe reactor(TE~~), the mixed liquids ~ p e n d e dsolids concentration in there~ctor (MLSS), 6. the d i ~ e r e n ~ine~iochemicaloxygen demand D (BOD) between the entrance and exit of the secondary settling td.
1 2. 3. 4. 5.
R e a l - t i ~ eFuzzy Control
129
The integrity of the controller is directly related to the number of
fuzzy variables used. Increasing the number of f i z z y variables, however, increases thememory requirements of the controller logarit~ically. For wastewater plant control, the three fuzzy variables, HI (HZgh), OK and LO ( L ~normally ) suftice to characterize the controller inputs. Trapezoidal fuzzy sets (me~bershipfunctions) are computationally simple and effectivein practice. Similarly, the m ~ p u l a t e dvariables or controller outputs must be allocated an appropriate numberof l i n ~ i s t i cdescriptors. Five fuzzy variables, Le., VH ~ e r y ~ i gHI~ (HIg~), ), OK, LO ( ~and VL ~ ~ e) r y ~provide u ~ ) sufficiently fine control. Finally, for computational simplicity, singletons are used to describe the fuzzy sets of the controller outputs, leading to a particularly simple andfastprocedurefor de-~zification.Theknowledgewithwhicha given wastewater plant is controlled must first be elicitedfkom plant operators. This is a painstaking task and one that is critical for proper operation. If the 6 m ~ p u l a t e dvariables have 3 descriptors each, then the theoretical m~~ number of rules is 36 or 729, a number which is clearly an age able and practically unnecessary. In practice 50 rules sufEce to provide controlof a wastewater treatment plant.Of these some 27 are required to stabilize the organic load (BOD), 1I to stabilize the ~ ~ f i c a t i oprocess n while 12 rules similar to those for ~trificationare necessary to stabilizede-~trification. The 50 rules, Which form the knowledge base of the controller, are considered to be the minimum necessary to achieve acceptable control of a wastewater treatment plant under most operating conditions. A subset of these rules is shown in the Tablep. on 130, The control rules have the s t ~ d a r dform:
R :IF 0 (BOD) is Yj) AND (r/rLSSis Yz) AND (TEMP is Y3) AND (DO is Y4) AND (IN- NH, is Ys) AND (IN- NO, is Y&) IXEP? (0,Feed is Ui) AND (R-Sludge is Uz) AND (R-rnl is U$
The controller outputs are all normalized to the range [O, I 00)%. Under normal operating conditions the plant outputs have nominal values of 50% and the co~espondinglevels of reactorstabili~ation,~trification and de-~tri~cation are 9U%, 70%and 60% respectively.
130
Chapter 9
L =Low, OK= nor~ul,H~High,VH=V e ~ y ~ i ~ h , B=Big, VB= V e r y ~ i gS=S~ull, ~ VS=V e ~ y S ~ u l l
~ i g u r e9.7. Variations in oxygen~eedin response to a triangularperturbatio~in the L) (BOD) and 0,Feed Finally, Figure 9.7 shows the effect on the oxygen feed td the rea~tor of a ~ ~ ~p e ~l b a at i o nof r 50% on L) (BOD) and MLSS about their nominal values.
Real-time Fuzzy Control
E
1 ~
~
131
a 9.2 ~ Rotary p ~ kiln ~ control
The rotary kiln is the basic process in cement production. Raw feed is processed in a cyclone pre-heatercomp~singthe rotary kiln and precalciner strings, both of which supply pre-heated feed to the rotaqy kiln, a long tubular structure with a refkactory lining. Fuel, either coal dust or $f1 oil is burnt at the exitof the kiln in a long flame that extends along most of the length of the kiln. T ~ o u ~ othe u tlength of the kiln there is a hot airflow induced by an induction fan at the top of the precalciner.As a result of this hot air mass, thereis a transfer of heat between the hot air andthe raw feed.The raw feed undergoes crystallization as it reaches the end of the kiln where the t e m p e r a ~ e are s of the order of 1400 degrees. The kilnis rotated at a few revolutions per minute to allow forthe lava-like fluidto exit the kiln and flow to the grate cooler where it solidifies into clinker. Clinker, when added to gypsum and ground to a fine powder in a f~sh- ind ding mill, results in the fmal product, cement. The cement production processis very ener~intensive, re~uiring large quantities of fuel in the kilning stage and electric power in the finish ding process. As the cost of energy constitutes the largest component of the total cost of production, it is clear that every effort must be made to keep this cost to a minimum. The kilning process is one of the most diMicult processes to control, It is s i ~ f i c a nthat t this process is one of the few r e m a ~ in g the process industry, which generally relies on human operators.Many attempts have been made to model the process and then apply modern theory to control it. All these attempts have failed dismally due to the complexity, non-linearity and distributed nature of the process. Until the advent of hzzy kiln control, first introduced by F. L. Smidth of Denmark in the early 1980s, all cement kilns were manually controlled. A kiln operator’s objective is to produce clinker of the desired specifications and production rate while ~ z fuel feed, ~ and at allg times m a i n t a ~ the ~ g process in a stable state. U n d e r - b ~ n g(Le.,usinglessfuel,whichresultsinlowerkiln tempera~es)the rawmaterialleads to clinkerwhich is less reactive and thus undergoes an incomplete change of phase of the raw material. The lava-like material, which slowly slides down the kiln. may then. solidify, a catastrophic situation that results in kiln shut-down and repairs to the kiln lining. Over-burning, on the other hand, leads to excessive he1 cons~ption, less reactive clinker and high refkactory lining wear.
Most kiln operators prefer to operate the kiln in the r b ~ n however, g as it is more stable.In between the two extremes, however, there is a narrow region of stable operation in which high productivity and product quality canbe achieved. Kiln operators find this state very ~ i ~ c utol maintain t for long periods or time as the controls must be continuously m ~ p u l a t e dto account for small changes in the operating state of the process. Kiln operators learn to control their plant from linguistic rules of the type:
IF the Kiln-KW demand is High AND the outlet oxygen content02 is Low AND the Previous-Fuel-Feed is OK THEN make a~ ~ reduction ~ Z to the Z Fuel-Feed AND make NO change to the induced draft fan speed V]C]DF Here, Kiln-KW, outlet oxygen content 02 and Previous-Fuel-Feed constitutetheinput fuzzy variables,while ~ ~ e n t Fuel-Feed and induced draft fan speed VIDE’ are the output fizzy variables. Appro~mately50-60l i n ~ i s t i crule are used to provide very good control of the kiln under normal operating conditions. For start-up and shut- do^ conditio^, as well as abnormal situations, diffe~entsets of rules may be used. The fizzy controller can controlthis most difficult of proce~sesas well as, and certainly more consistently than, a human operator, by observing the same control variables and adjusting the same m ~ p ~ a t e d variables. Fuzzy kiln controllers can easily maintain controlof the process in this stable interm~diatestate, consis~entlya c ~ e v i n g m ~ kfuel ed economy and highproductivi~.Fuzzy kiln ont trollers n o ~ a l l yreside in a client on a client-server network, receivingi ~ o ~ a t i on o nthe current g m ~ p ~ l a t variables ed to values of the control variables andr e ~ n the thereal-timedatabaseonthefileserver for t r a n s ~ ~ to a the l local RTUs. The fuzzy controller can be executed either at regular intervals or f o l l o ~ n gan i n t e ~ p from t the control scheduler, which m o ~ t o r sthe t ~ m p ~ rchanges al in the control variables. z y kiln control,he1 costs have been reducedby up to 5% Using k while productivi~has been increased by an e q u l amount. Today t is a very large n ~ b e of r kilns w o r l d ~ d eunder fizzy control. ~imilar h z z y controllers have been used to control all of the processes associated with cement production.
Real-time Fuzzy Control
133
Hierarc~calintelligentcontrolhasalsobeenusedtocontrola cluster of fuzzy controllers, each controlling a different sub-process of the kilning process. The cement industry was the first process industry to adopt fuzzy control and today a number of vendors supply such controllers. There is c e ~ anoi doubt ~ ~ that h z z y control has resulted in a major change in the cement dust^ and many process industries are now following suit, encouraged by the progress in the field.
VIDF
I
I
..
Rotary Kiln
~ i ~ u9.10 r e The rotary kiln intellig@ntcontrol system and thep r i n c ~ u control l andcontrolled variables
This Page Intentionally Left Blank
hapter 10
ased Fuzzy C Two distinct trendsin the design offuzzy controllers have evolved in the last decade or so. The first, based on ~ e ~ r i s t~i co ~ l e ofd the ~ econtrol actions necessary to control a process, has been dealt with at length in the preceding chapters. Heuristic fuzzy control does not require deep owle edge of the controlled processin order to be applied successfully. This feature has made heuristich z z y control very popular in the industrial and m a n u f a c ~ n g e n v ~ o ~ ewhere n t s such ~ o w l ~ is d ~often e l a c ~ n In ~ .general, soft control is possible only if heuristic owle edge of the control policy is known u priori. Thus for new processes, where there is no such prior knowledge, heuristic soft control is not a candidate. It is also clear that the heuristic approach cannot resolve such issues as overall system stability and system performance. This implies that this approach is case-dependent and it is therefore not possible to generalize theperfo~anceof fuzzy controllers fiorn knowledge of their behavior in other applications. The l ~ t a t i o n sof the heuristic approach led to a searchfor more rigorous methods that combineihzzy logic and the theoryof mod~ s e dControl which has atem control. The result was M ~ d e l ~ ~ Fuzzy tracted considerable attention and has been applied successfully in a n ~ b e of r applications, p~icularlyin Japan, for the control of hi ~s~mes speed trains, helicopters, robotic arms and more. The technique the ex~stenceof an explicit microscopic model of the c o n t r o l l ~ ~ ~ r o c e s s of s u f ~ c i ~fidelity nt from whicha series of linearized models can be derived for each nominal operating state. The model-based fizzy control i
135
136
Chapter 10
me tho do lo^ is thus a fusion of S U J and hard control t e c ~ q u e and s
offers a~vantages in si~ations where s t a b i l i ~and transient behavior must be g~aranteed. In conventional ~a~n-scheduling control, the selection of the scheduling procedure, Le., the control law to use, is dependent on some e x o ~ e ~ ovariable. us In c o n ~ a s t , ~ ~gain z z y s c h e ~ ~ Z iwhich ~ g , is a special form of model-based fuzzy control, uses li~guisticrules and fuzzy reasoning to d e t e ~ i n ethe co~espondi~g control law, Issues of stability, pole placement and closed loop dynamic behavior are resolved using conventional modern control techniques.
,I The T ~ a ~ i - S u ~~ e o~ o~ Approach to Fuzzy Control
e
~
-
In the mid-1980s Takagi and Sugeno proposed the use of fuzzy reasoning to speczjj the control law of a conventional state feedback controller so that the overall system would have g u ~ ~ t e properties. ed The original controller that Takagi and Sugeno proposedis characte~zedby a set of fizzy rules that relate the current state of the process to its process ~ o ~ eand Z the corresponding con~oZtaw. These composite rules have the form:
R: IF (state)THEN ~ u z zprocess y ~
o AND~ Vuzzy e c o ~~t ~ olaw). Z
Consider a physical process described by its non-ho~ogeneous state equations:
where XE R" and U E I)Zm are the crisp n-dimensional process state vector and ~ - d i ~ e n s i o ncontrol al vector respectively and x0 is the i ~ t i a 1state. This explicit description of the process may be the result of deep howledge about theprocess or the result of identification of the process fkorn ex~erimentaldata usinganyof the ~ e l l - system ~ o ~identi~cation ~ec~ques. One of the interesting features of the first Takagi and Sugeno fuzzy c o n ~ o l l ~isr sthat der certechnique for desi~ning model-~ased
~
~
~ o d e l - ~ a s Fuzzy e d Control
137
tain conditions that are, ~ f o ~ a t e l not y ,always easy to satisfy, this i Z jclosed ~ system while s ~ e c z ~the i~g technique g ~ a r ~ ~ t e e s s t foff bthe transient behavior of the closed system through pole-placement. These are properties that are inconceivable with the heuristic fuzzy controller design t e c ~ q u eThe . difficulties in meeting the conditions for stabili~ o f the first method proposed by Takagi and Sugeno were eliminate^ in the second version that uses state differences. Both techniques are outlined in this chapter,
10.2 Fuzzy Variables and Fuzzy Spaces Consider the crisp process state vector x define on a closed, real set X. The fuzzy state variffbZesxI are fuzzy sets defined on X.The values of these variables are termed thefuzzy values of the fuzzy state variable and are written as @X& Forevery fuzzy value of x, there exists a corre( x ) ,specifies the membership sponding membership h c t i o n L ~ ~ ~ ~which value of the crisp value x,* of this variable. In general we define:
for the continuous case and
where kiis the n ~ b e of r fuzzy values xI. In order to simplify the analysis that follows it will be assumed that: 0 0 0
the shapes o f the fuzzy sets of areidenticalfor all i, the number of fuzzy numbers kl = k;! =...=k, and that @X,,= @X2i... = @X, = @Xn1.
138
~ h a ~10t e ~
Examples of such fuzzy sets are s h o w in Figure 10.1
I
Figure IO. 1 Fuzzy sets of the state x,
The state vector x of a process is defined over some space. Every crisp value x* of the state vector corresponds to a specific state in state space. In the case of fuzzy controllers based on the TakagiSugeno model, the states take on fuzzy values and consequently the concept of state space mustbe modified to accountfor the fuzzy values of the state vector. Knowing that everyfuzzy variable has a finite number of fuzzy values, we can then generate a finite number of Euzzy vectors that result from the combi~ationsof the fuzzy values, Each element of the crisp state variable x is Euzzified as in the heuristic fizzy control case. In eachfuzzy r e ~ofi fu~zzy~state space, a ~ region, e Z e.g., rule uniquely defines the ZocaZ~rocess~ ~ in that (10.1)
The ~ymbolismx=@X implies that the state of the process x belongs to the fuzzy region @X.The consequent of each rule describes
an explicit local modelof the process in the correspondingfuzzy region ~ 2Simple . examples of fuzzy process rules for both continuous and discrete-time processes are:
IF u is Low AND x is High THEN the process modelis ;i:= -0. 7x - 0 . 2 -~3,~l u ELSE IF u is High AND x is Low THEN the process modelis ;i: = - 0 . 6 ~ - 0 . 3 -~2~. 8 ~ and Given the process parametric model Pressure(k+l)=ao Pressure(k) + bl Valve(k) +b2 Input-Flow-Rate(k) IF Pressure(R+I) is High AND Valve@)is CZosed AND Input-Flow-Rate@) is ~ e ~ - H i g h THEN the process parameters are ao=-3, bl=2 and b2=-l ELSE IF Pressure(kf1) is Low AND Valve(k) is OKAND Input-Flow-Rate(k) is High THEN the process parameters are ao=-#, b, =1 and b2=-2
ELSE etc.
310.3 The Fuzzy Process Model It is o ~ s e that ~ ewhereas ~ the antecedent of the fiuzy process d e s are similar to those usedin the heuristic fuzzy control case, the~ o n s e ~ ~ e n t s are analytical expressions that describe a process model, ~ r o c e s srules c m be expressedin terms of the elements of the crisp process state as:
In any fuzzy region @x" the process can thus be speci~edby the state e q ~ a t ~ o ~ :
where
are the degrees of ~ l ~ l l m e of n tthe local models of the process sin^ M a ~ d a 'sn fuzzy ~ compo~itionalrule. For each nominal state of the process, a state e ~ u a t i oof~ the form of (10.2) is ~ e t e ~ i n eUsing d . the setof fuw;y process rules(10.1) we esta~lishthe &zy o ~ e ~ - ~Z oo ~~ of e~ Zthe process, which is the ed sum of the local modelsJ(x,u) ,i.e. ( 10.4)
where (10.5)
are the n o r ~ a l i d~ e ~~ ~ of ef u~~ l sl ~ e or n tprocess function ~ e i ~ ~ t s . Clearly thesum of the weightsis unity, i.e.
1
~ o ~ e l - 3 a sFuzzy e d Control
141
10.4 The Fuzzy Control Law Similarly, for every antecedent there esist two consequents, the second one of which specifies the state f e e d ~ a control c~ law that must be applied in order to stabilize the process. This, of course, assumes that all states are measurable, a restrictive limitation of the technique in practice. W e r e it is not possible to measure all the state variables then observers or other forms of state estimators may be used to provide the m i s s ~ gstates provided an explicit microscopic model of the process is available. The second consequent of every rule in the fuzzy region @X has the form:
while the c o ~ ~law o l that must be applied to the process so that stabili~ is assured at any n o m ~ a states l is derived in an analogous ~ a ~and e r is:
where
The overull control law is thus the weighted sum: (10.8)
ol whicharecomputed where w d are the c o ~ ~ weights (10.5).
in Equation
e Locally Li~eari~ed Process Model When the nonlinear model of the process is linearized (also termed Lyf f ~ ~ nlinearization^ ov about each nominal state of the process, the result is a set of locally linearized models of the controlled process described by state equations: (10.9)
where
e) are the usual partial derivativesof the nonlinear ~ c t i o n s ~ (evaluated at the n o ~ i n aconditions l (x1,ui).The set of locally l i ~ ~ a r i z e ~ mato ~ e l s these ~ o ~ i nstates a l defines the state equations of the controlled process e the 2 at those states and is termed the overall fuzzy o ~ e n - Z o o~~ o ~ of process. For each line~izedlocal model there must be a c o ~ e s ~ o ~ d ~ lineffrc o ~ ~law o l that ~ a r a n t e e sclosed system stability while satisflin8 t i ~ e - ~ o m a criteria. in The complete set of control laws consti~tes the ~ Z o ~ aco~trol Z law of the closed system. In. the T a ~ a g i - ~ ~ g eapno proach, the decision on the process model and the control law to use clearly depends on the nominal state of the process and is based on fuzzy l i n ~ i s t i rules. c The Zineari~e~~rocess model rule (10.2) now becomes:
R i :IF x=@x' THEN x = A , x + Biu
(10.10)
Modern control theory assumes thatall the states of the process are meas~ableor can be estimated, in which case a constant s ~ a feed~e ~a~~c~ntrollaw of the form: i u =lqx
(10.11)
~ o d e l - ~ a s Fuzzy e d Control
143
can be applied, where Ki ,is a suitably gain m ~ ~ iUsing x . any pole~ Z u c e ~ etechnique, nt the elements of the gain matrix are chosen so that the poles of the closed system yield the desired transient behavior. The fizzy c o n ~ orule l is therefore:
R,
J
R; :IF X=~DX' THEN uz=.Kid
;
(10.12)
NOW,from the definitionsof wsf(x) and wcJ(x) it is seen that thesetwoare in factidentical,whereupontosimplifLnotation, let wsi(x)= w'(x) and wcJ(X) = wJ(x). S u b s t i ~ t i nEquation ~ (10.5) in (10.4), we obtain the ~ e r a lClosed l System ~ i n ~ r iFuzzy z e ~~ o d e l ; w i ( x ) ( ~+iBiU) ~
x=
(10.13)
I
and likewise the overall control law: u = CWJ((x)KjX
(10.14)
J
Finally, substi~tingEquation (10.14) in (10.13) yields the overall homogeneous closed system state equations: x=
T x w'(x)wJ@)(A, + BiKJ)X
(10.15)
or i=
c l
where
w' ( X ) W J (x)A,x J
(10.16)
144
Chap~er10
is a Huwitz matrix. It should be noted that with this tech6 though lineari%ed models of the process have been usedin the development, both theoverall system state e~uationsand the overall control luw are not linear because of the no~inearityof the n o ~ a l i % e d m e m ~ e r s ~ p ~ c t i o n w'(x) s and w'(x). This leads us to the conclusion that asymptotic stability of the closed system can be guaranteed only locaZ~,Le., a r ~ ~ d each nominal state, and cannot be inferred elsewhere.
Q ~ d i t i Qfor ~ sclosed system s t ~ ~ i ~ i t y Theconditionsfor stability oftheTakai-Sugenomodel-based e statedas follows:
fuzzy
The closed s y s t e ~(10.15) is a s y ~ ~ t o t i c a l ~ sand t a ~stale ~ i l i z a ~atl ethe origin x=0, ifand only if 1. the matrix Aij is Hurwitz, i.e., all its e ~ ~ e ~ v a lpo~sess ues n ~ ~ a t ireal v e parts and 2. there exists a positive d e ~ ~ ima~rix t e P s u c ~t ~ a t (10.17) Eventhoughthese stability conditions are necessaryandsufficient, it is very difficult to d e t e ~ i n ea suitable positive definite matrix P. F ~ h e ~ o rife the , matrix Aij is not H w i t z then a matrix P which satisfies quat ti on (10.17) does not exist and this t e c ~ q u is e not applicable.
e Second 'I: ~ ~ i - S ~ ~ e n o
Ap~ro
To overco~ethese limitations, Takagi and Sugeno proposed a second a ~ ~ r ~that a c follows h the one already outlinedin principle, but differs in the f o ~ u l a t i o nof the fuzzy rules. Thus the rule whichdefines the fuzzy open loop modelis modified to: R:: IF xd=@x' THIN x' = f ,
(XI,
u')
(10.18)
where xd is the desired state of the process. The modified model-based fuzzy control approach determines whichfuzzy region the desired state of the process belongs to before deciding what control lawto follow. It is noted that the desired state need not be stationa~but may c h a n ~ ~ continuously withoutthe need to re-compute the control law. The desired state xd and the control law ad are the result of solving the steady state equations:
A s s ~ that g the desired state xd is constantorvariesvery slowly with time so that i d d l , the nodinear system can then be linearized about( x d , d ) to yield: i=Ad(X"Xd)+3d(w"d)
(10.19)
which are linear state equations involving the state and control inputdev i ~ t i from o ~ ~ their nominalstates x d and ?&respectively, while
and
The modi~edtechnique has the following limitations that may make a~~lication difficult: e
it i s valid ody for ~ ~ deviations ~ 2 in the 2 state and input vectors from their nominal values and for every changein the n o m ~ astate, l the rules by which decisions are made must be changed and the linearization procedure repeated.
Chapter 10
146
~ain-schedulingis a well-known technique of conventional dustr rial control that is used when the plant is subject to changes in its operatin state. Here the gains of the controller are varied in accordance with some exogenous variable. A typical example is aircraft control: as the altitude of the aircraft increases the influence of the control surfaces decreases due to the t h i ~ e rair. This in turn requires a greater control action to achieve a pa~icularresult. If altitude (as measured by an altimeter) is refore used as the exogenous variable to adjust the controller gains at en altitudes, then the controlling effect can scheduled to be essentially the same whatever the altitude. The adjustments to the controller gains are step-wise, resulting in bumpy control whenthe a ~ j u s ~ e nare ts effected. Automatic transmission in vehicles is another well-known example. The distinct changes in the gear ratios while acce~eratingare a cause of jerky motion is desirable. To avoid these sudden changes some manufac~ersoffer i n ~ ~ ~variable e l y ratio ~ a n s ~ i s s i o that n s lead to smooth motion. Refering to the problem described in the previous section, if it were possible to generate a set L) of known nominal states x', for which a is computed,then co~espondingset S oflinearizedprocessmodels funv gain-scheduling can offer distinct advantages.In this scheme, the transition from one nominalstate to another is smooth since the system eters can. be made to vary smoothly along the trajectory. These two sets are clearly invariant with changes in the nominal states. For any ing nominal state that does not belongto the set D,an a p p r o ~ i ~ ~ tmodel can be derived from models belonging to the set without recourse to linearization. For each nominal state xd the locally linearized model is stored e 2 S while the co~espondingcontrol law is stored in. the in the ~ o ~ base ~ o ~law ~ base o l U, The nominal states x' in the n o ~ i n states ~ 2 base I> can be conveniently chosen to be at the centers of the fuzzy regions @X, Le., the states x % @ 2 at which:
p,
( x 1 ) = ~ i ~ ( l..., , lI ), = 1.
Thus at the centers of each fbzzy region, the linearized system in the ~onsequentsof the firzzy rules are givenby quat ti on (10.19) with xi
~ o d e l - ~ aFuzzy ~ e d Control
147
in place of .xd. The set of rules which describe the fuzzy open-loop model reduce to:
Rd: E x d = @ . THEN i i=Ai(x-xd)+B'(u-ud)
(10.20)
and the control lawrules are definedby:
Rd: E .xd=@2 THEN u=g(x-xd)+ud
(10.21)
Where the gain matrix ~ ( ~is computed , ~ ) on the basis of the l ~ e a r i ~ eclosed d system defined in the corresponding f k z y region .LA!. The fuzzy open loop modelis now specifiedin terms of the deviation^ of the state and control actions from the nominal values, i.e.: ( 10.22) I
The overall control law is now given by: u =ZwJ(Xd)*K*(x-Xd)+Ud
(10.23)
J
It is observed that both the closed system model and the control law are linear since the normalized membership h c t i o n s w'(xd) and ~ ( ~ are d constants ) less than unity. As in the previous case, the closed system is now given by:
W i ( X d ) W j ( ~ d ) [ A+l B ' K J ](x - x & ) It follows that
Z w ' ( x d )= Z w ' ( x d ) = r , ) i ; : w t ( x d ) w j ( x d=) I Here
w ' ( x ~ ) A;' Bd =
Ad = f
and
wf(xd)Bf 1
(10.24)
Chapter IO
148
Kd =
(Xd)KJ
WJ J
In an analogous way
X=Ad(~--~d)+Bd(~-~d) and u =Kd(x-xd)+ud
The overall closed systemis stable at the nominal state xdif and only if:
Re{& (A*)) < 0 m = 1,2,..., n where 1, are the eigenvalues of the matrix
If these conditions hold, then we canstate the following:
The fuzzy ~ a i n - s c ~ e ~ Uclosed ~ e d s y s t e ~(10.24) is a s y ~ ~ totically stable if and only ~ p o ~ i t i v e ~ e ~ n i t e ~ Pu t ~ i c e s and Q exist s ~ c that h
A @ P+PA*=-Q In s proach are: 0
0
0
~
( 10.25)
a the advantages ~ , of the second ~ ~ a ~ i - ap~ u ~ e ~
the approach leads to linear descriptions of the open and closed system descri~tionsand the desired ~ontrollaw, computation of the control law and the conditions for stability are well established and the determination o f the matrix P is almost always possible.
~ o ~ e l - ~ aFuzzy s e d ~ontrol
149
The second Takagi-Sugeno technique combinesthe simplicity of h e ~ i s t i fuzzy c logic with rigorous hard control techniques and offers the possibility of specifling the desired closed system response as well as the conditions for stability. It suffers, however, from the fact that an explicit analytical model of the process must be h o r n .
Example 10.2 Fuzzy gain-scheduling of a simple process The second Takagi-Sugeno approach is illustrated by way of an example for fuzzy gain-scheduling. Aircraft exhibit dynamic characteristics which vary significantly with altitude: if a controlleris tuned at low altitudes then control performance is grossly degraded with altitude due to the t h i ~ n air. g Thus gain-schedulin~is resorted to in order to adapt the parameters of the controller with altitude, The example presented here a s s ~ e as linearized scalar model ofthe dynamics of the aircraft or ‘plant’. The explicit model of the plant is assumed lsnown at ground level xd=O and at some other specified altitude x d = l . The process rules are assumed, for simplicity, to be:
I?’:IF xd=O THEN x = f,(x, u ) = -0.5~+ 0 . 5 ~ (a) R’: IF xd=I THEN i = f i (x,u) = --x + 2u
(b)
At low alti~de,case (a), the dynamics of the plant are slow with a normalized time constant of T=2 whereas at high altitude in case (b),the response of the plantis faster, with a time constant T=O.5 and is considerably moresensitive to controlactions.The co~espondingstep responses are shown in Figure10.2.
150
Chapter 10
Figure 10.2 Step r e s p o ~ e sof the plant at the two altitudes The ans sit ion of the dynamics of the plant with altitude is a s s ~ e dto vary ~ ~ 0 0 tConsider h ~ . the use of a h z z y gain-scheduling controller whose control rules are as follows:
Ro: IF xd=O T E N ui = &&,xd)=
k~(x-xd)
R' : IF xd= 1 T E N u2 = g2(x,xd)= k2(x-x~) In order to obtain the desired closed system response atboth altitude extremes, the state feedback gains kl=O. 6, kpO.4 are selected so that the eigenvalue of the closed system is at (-0.2,O) in both cases. hzzy members~p~ c t i shown o ~ To simplify the analysis, let the e 10.3 indicate how the transition of the d ~ a m i c sof the plant follows the altitude. It is clear that at very low altitudes the ma~ematical model of the plant is predom~antlyof type (a) but as a l t i in~ ~ ~ creases the type(a) model increasingly fades into type(b)until x=xd at w ~ c the h modelis entirely type(b).
151
~ o d ~ l - ~ aFuzzy s e d Control
I
0
x
Figure 10.3 Fuzzy sets of ~ u i n - s ~ ~ e d ~ l i n ~
The gain-schedulingfuzzy sets can be describedby the ex~ressions p l ( x ) = f - x and pZ(x)=x. It is noted that pl+p2=l'dx. The overall fuzzy process ~ o is therefore ~ e given ~ by the w e i ~ t e dsum: ;i. = W,("0*5(X
- X d ) + 0,524) + W2(-(X - X d ) + 2u)
where wI and w 2are the normalizedm e m b e r s ~ p ~ c t i o n s :
sum: The overall fuzzy control law is therefore the weighted
The fuzzy ~ain-schedulingcontroller provides the control actions all values to force the closed system to follow the desired response for of altitude. The response of the closed system to a very large step demand in altitude fromx=0 to x=xd=l is shown in Figure 10.4(b). Figure o respons~ n, of an i n v ~ r i system u ~ ~ gov10.4(a) shows for ~ o m ~ ~ sthe erned by: x = -0.2x
3- 0.2u
Chapter 10
152
1
0.8 0.6 0.4 0.2
5
I0
20
~ i ~ IO.~4 ~r ee s p ~ of~(a) e san invaria~ts y s t ~with ~ the d~sired ~ y n a ~characteristics ic and (3)the fuzzy gain-sched~~ed p~ant Since the closed systemwith the f k z y gain scheduleris clearly nonlin, it would be ~ e a s o n a b l eto expect the two responses shown in Figure 30.3 to be the same. It is noted thatin the proximity ofx=O and x=xd the response of the closed system approaches the responseo f the invariant system,as desired.
hapter 11
eural Control The emulation of human cognitive ability is one of the primaryfields of research interest in ~omputationalIntelligence. The human is nowhere near as fast or as accurate in calculating as a modern computer, yet even at a very early age one can easily recognize objects and relate them in their natural e n v i r o ~ e neven t if they are distorted or partially hidden. Exactly the opposite is true with computers - they are far more capable than humans in p e r f o ~ i n gtedious tasks that involve extensive numerical computations yet they have difficulty performing cognitive tasks despite the impressive progress made in Artificial Intelligence. The ability to learn through experience is one of the principal characteristicsofhumans.Humanshavethecapacitytostorehuge ~ u ~ t i t i and e s types of info~ation,recall this data and process it in a very short time with little difficulty. One possible explanation for this superiori~is the lack of suitable computer software to emulate the human’s ability to process info~ation.A second explanation is the fact that the human brain and computers work in radically different ways, the brain being much more efficient at processing information. The human brain is extremely powerful, comprisin~a huge number (of the order of ~ ~of ’simple ) processing elements or~ e ~ reach ~ ~ones of, whichis can g the others.This is ~ u s s ~ ~v ~ e r u Z Z e and Z~s~ pable of c o ~ ~ c a t i with it is interesting that mode^ computer designs are increasingly following this architec~e. TheneuronsofanArtificialNeuralNetwork(ANN)areare ranged in such a manner as to process information in parallel and siI. 53
multaneously. Each neuron sends activation or de-activation si otherneuronswhile its activationdepends on signalsreceivedfrom r n e ~ o n to s which it is connected. The termsyna~sesis commonly usedfortheseconnections. S~table interco~ection of thesesimple elements can yield powerfuln e ~ o r k with s thea ~ i ltoi learn, ~ adapt and infer.Theuseof artificial neural n e ~ o r k sis sometimes known as connection^^^ and ANNs can thereforebeviewed as ~ e n e r a ~ i ~ e ~ connection~st~ a c ~ i nor e s~ e n e r a l i ~ e ~ ~ n c t i o n ~ a p p e r s . Since their reaemergence in the early 1980s, there has been an explosion o f interest in the application o f A N N s for ~ualitativereasoning, which is at the core of the fields ofSoft ~ o ~ ~and~~ nt t ei ~ nl i ~~ e ~ t Systems. This interest has beenenco~agedby the increasingavailabili~ of p o w e ~ l p ~ a computing llel p l a t f o ~ capable s of veryhi tio~alspeeds and p ~ a l l e l~ r o ~ ~ techniques, i n g ~ulti are ding use in an ever- creasing range of a~~lications, from image tion, voice analysis and synthesis to system identification and industrial control, This chapter, and those that follow, present the most commonly used ANN architectures that have found application in Control ~ngineering,the basic n e ~ o r k - l e ~ n g a l g o and r i t ~e s~ ~ p lofe s i n d ~ s ~applications. al The originsof A l W s are tobe found some fifty years agoin the work o f ~cCullochand Pitts. The first contribution in the area of network l e ~ was g due to Hebb in 1949 who showed that l e ~ ing complex n e ~ o r k achieved can sbe adapting by the synn, an o~, in apses.. Rosenb€att in~oducedthe ~ e r c e p ~ear the late 1950s. The operation of multi-layer ANNs was not fully ~derstoodin those early days and research was restricted to structured perceptrons. ~ i l s s o nfollowed in themid- 1960s with learning ~ ~ c ~ i and n e spm ~ c ~ i nthat e s were made upof clusters of t ~ e s ~ o l d ~ n andPapert s published ~ theirseminalwork which they proved that Perceptrons are limited in their abilityto learn, p o ~ t i to n ~their inabili~to represent a s ~ p l XOR e logic element^ This work was to dampen the enthusiasm in A W s and research in the f i e l ~ was virtually paralyzed for almost a decade. ~ o ~ a t e lAyN,N s re-emerged in the early 1980s duemaidy to the work of Hopfield who continued his research on network methods,New ANN a r c ~ t e c ~ eand s p o w e r ~ llearningalg
Neural ~ o n t r o l
15s
were introduced in the field in themid-1980srekindlinginterestin ANNs and their application, The rapid progress in very large-scale integrated circuitry (~~~~ and parallel computers aided the developmentsin A N N s and today the field of neural networks consti~tesa thriving area of research and development. In a very comprehensive paper, Hunt et al. in 1992 (see the iblio~aphyin chapter 18) presented a host of applications of neural networks in Control Engineering and the reader is well advised to refer to to this work. The properties that make A N s particularly ~pplica~le control applications are the following: e e e e
being non-l~e&r by nature, they are eminently suited to the control of non-linear plants, they are directly applicable to multi-variable control, they are inherently fault tolerant due to their parallel structure, faced with new situations, they have the ability ~e~eraZize to and e x ~ a ~ o l a t e .
These prope~iessatis@ the fbndamental requirements for their use in Intelligent Control. Neural controllers and Euzzy controllers, thus constitute the core ofintelli An ANN is essentially a cluster of suitably interconnected nonlinear elements of very simple form that possess the ability of learning and adaptation. These networks are characterized by their topology, the way in which they c o ~ ~ c awith t e their e n v ~ o ~ e nthe t , m ~ e inr which they are trained and their ability to process informatio~.ANNs are classi~edas: e
e
static when they do not contain any memory elements and their i ~ p u t m o relationship ~~ut is some non-linear instantaneoush c tion, or ~ ~when they ~ involve ~ memory ~ elements i and c whose behavior is the solution of some differential equation
156
Chapter I I
he Elemental Artificial Neuron A M s are c o n s ~ c t e dfrom ele~ental art~cial neurons (which vaguely a ~ ~ r o ~ m physical a t e neurons)thataresuitably i n t e r c o ~ e ~ t evia d 6ranches. The syna~ticw e i ~ ~ are t s the aim or t ti pliers of these ranches anduniquelyspec@the input-ut ~ansferfunctionyirnc~ionalr e l a ~ i ~ or n s~~a~p p i n of ~ ) theneuralnetwork.Thesynaptic ed are tia ally ~o~ and w e i ~ t sof an ~ ~ a i n network mined f o l ~ o ~ ~n g a i using ~ ~some g network~ a i law ~ which g aimsat ~ ~ m i some ~ n measure g of the error between the output of the n e ~ ~ r k and the desired output of the network. A model of an elemental artificial neuron (also referred toas a node) is shown in Figure 11.1. A static ne~ronhas a s ~ e orrlinear co~6iner,whose outputCF is the weightedsum of its inputs, Le.: = wlxl + w2xZ+ ....w,,x,,
+b
where w and x are the synaptic weight and input vectors of the neuron respectively, while b is the bias or offset. A. positive implies activation, whereas a negative weight implies the input. The absolute value of the synaptic weight defines the ~ ~ @of n ~ t ~ the co~ection.The weighted sum CT activates a ~ j s t o r t (or i ~ c~ o ~ ~ ~ e s ' e l e ~ e n t f (). One form that this element can take is the t~eshold unit, in which the output of the neuron is triggered when the inner product <w,x> exceeds the bias6. There are many variationsof the nonlinear ~istortingelement, the most common of which are
~ e u r aControl l
157
4) ~ y ~ e r ~ otangent: lic
1- e-" f(CF)= -='/z(I+tanha) E [ - I , 1+ e-"
I]
Acr) = CT if 00 =O if d 0
Xn
Figure 11.1 The e l e ~ ~ n t a l a r neuron t ~ ~ ~ ior a lnode
The input to the compression element [T may take on either of the following forms, depending on whether the neuron is static or ~ y ~ ~ m i c : e+
w ~ i ~ h tsum e d (for the case ofstatic m e m o ~ l e s sneurons):
n
n+l
u = ~ W j x+ zb = C w j X i ; X n + l =I)b=wn+l 1=I
*
i=I
a ~ c u ~ u z a t~e du ~(for u tthe case of~
y n e ~ o~n with s a
~
memo^):
o ( k ) = o ( k - 1) +
c n+l
w i x i( k )
Here k is the time index andit is necessa~to store the previous valueof the weightedsum a(k-1).
1.
p o l o ~ of ~ e~~u l t i ~ l Neur ~ye~
As noted earlier, A N N s are clusters of neuronss ~ c ~ hierarc~cally e d in a m ~ t i p l i cof i ~layers. The neurons of a network, depicted as circles . . 11.2 and 11.3, are normally s ~ c ~ ine layers, d res~tingin d ANNs. The input layer of the network i s at the lowest layer of the hierarchy while the highest layer corresponds to the o ~ ~ u t layer and yields the output of the network. ~ e e d - f o ~ANNs a r ~ are networks wherei n f o ~ a t i o nflows suco f the network and no cessively from the lowest to the highest layers feedback is involved. Figure 1 1.2 shows an example of a m~ti-layered A N belonging to this class. It is observed that the internal or ~ i d ~ e ~ Z~yersof the network c o ~ ~ c awith t e the e n v i r o ~ ~only n ~t ~ o u ~ in principle, havemy the input and output layers, Though an ANN may, n ~ b e of r hidden layers, it has been proved that one hidden layer suffices to generate anya r b i mapping ~ ~ between inputsmd o ~ e p e n d i non ~ the ~ ~ in which e ther v a ~ o u sn e ~ ~ in n sthe network are connected, Le., the ~ e ~ t oo ~ ro l~or o ~~ e ~ archite~o r ~ ture, the followingconsti~tethe principal classes of ANNs: ~ ~ precurrent ~ e ~l e ~ owhere r k the nodesof one layer interact with nodesof the s a ~ elower , and hi~herlayers,
~
a
0
0
~ e e ~ ~ o ~ a in r which ~ i nnf oe~ a~t i o nflows r ~ from the lowest to the highest layers, ~ e e networks ~ ~ in~which c i ~ o ~ a t i from o n any nodecan return to this node through some closed path, including that from the output layer to the input layer and s y ~ ~ ea ~ t oi -c~ s o c i a t inv e ~ ~ whose o rconnections ~ and synaptic weightsare symmetric.
Ou~uts
Output
Layer
idd den Layer
Input Layer
/ / / I
Inputs
Figure 11.2 Feed-fiorward network
Figure 11.2 shows an example of a multi-layerf e e d u f o ~ aANN r~ involving an input layer, a single hidden layer and an output layer. This is a very common feed-forward network topology. Figure 11.3 shows a s~~le-layered Hopfield network, which involves feedback.In contrast to feed-forward networks, every node of a Hopfield network is connected
~hapter11
160
to all others. These ANNs can be useful in Soft Control because they possess the following three properties: they can learn from experience ratherthan p r o ~ ~ i n have the ability to generalize, can generate arbitrary non-linearinput-ou~utm a p ~ and ~ ~ s are distri~utedand i ~ e r e n t l yparallel.
0
0
Figure 11.3 ~ o p ~network e ~ d withfeedback
eural Control In order to compare any conventional control method with conventional methods it is necessary to e n ~ e r a t ethe basic characteristi~sof each method and to specify some measure of comparison. Thus for neural control: e
~ o ~ ~ l i ~ e ~ ANNs r s yare~ directly t e ~ s~pplica~le : to nonlinear controlas a conse~uenceof their ability to produce any arbitrary input-output mapping,
~ e u r aControl l 0
e
161
~arallel~r~cessing: ANNs have a parallel structure inherently, thereby permitting high computational speeds. The parallel s ~ c implies ~ e that neural controllers have a much r reliabili~and fault tolerancethan conventional controllers, lear~ingand a~a~tation: A N N s can be trained from prior o~erationaldata and can generalize when subjected to causes that they were not trained with, and ~ultivariables ~ s t eA~N :N s have the inherent abilityto process multipleinputs and generate multiple outputs simultaneously, making them ideal for multivariable intelligent control.
From the control viewpoint, the ability of neural n e ~ o r k sto cope with non-linear phenomena is pa~icularlysignificant. As is well known, there is no unified theory of non-linear control and there exists a host of scattered techniques capable of giving solutions onlyto specifi~ cases. ANNs can therefore be used to advantage in the design of nonlinear controllers for nonlinear plants, particularly since the design is the result of learning.
roperties of Neural Controllers mode^ intelligent control systemsare capable of some degreeof autonomy and the fbsion of modern control techniques and Computational ence assures them increased efficiency in changing, vague and uncertain e n v ~ o ~ e n tThe s . ultimate objective is: autonomous intelligent systems capable of ~derstandingand adapting to the changes in both the operat~gconditions and the e n v i r o ~ e n in t order to consistently ~ a ~perfo~ance. ~ i ~There e are many si~ationswhere autonomous intelligent systems are considered essential, typically in cases of high danger such as in nuclear reactor and ~ ~ einspection, n t space and u n d e ~ ~ t exploration er where intelli~entrobots are already playing their part, This objective is feasible using the techniques of Computational Intelligence. Both man and machinecan control an industrial plant. Thereis, however, a ~ d ~ e n tdifference a l in the ~ a n n e rin which they do so.
162
C ~ u ~I It ~ r
Man processes 1 e andseeminglydisparate es of s t ~ com~ i pared to m a c ~ ose stimuli are usually ted. The reason for this is not so much the absence of sensors but the m ~ e inr which t to process these s t i m ~are i processed. Hurnans have an ~ e r e n a~ility ' s of data ~ u i c and ~ y ef~ciently,sorting what is relewhat is not while fusinginfo~ationfiom a variety of ing at a conclusion. Machines do not havethis ability andit is unce~ainwhether they will in the foreseeable bture. Finally, neural networks have thef ~ l l o properties ~ g that make them pa~icularlyusefix1 for control: they possess a collective processi are inherently adaptable, are easily implemented, achieve their behavior following training, can be used for plants that are nonulinear multi~a~able, and can process large numbers of inputs oand u ~ u t s r nthem a~n~ suitable formulti-va~ablecontrol, are relatively immune to noise, are very fastin computin~the desired control action due to their parallel nature and do not require an explicit model of the controlle~process.
eural Controller A r c h i t ~ c t ~ ~ ~ ~ Smith demons~atedthe first a~plicationof a neural net1 in the mid-196~s. Theyused a single ADALINE ( ~ ~ a p t i LInear ve on) to c o n ~ o an l inverted p e n d u l ~and showed ~ controller ~ was ~ just as ~ effective ~ as a~ c Z e that this element^ ~ v e ~ t i o n controller ~l after being trained, Theincreasing d e m ~ d sforimproved p r o d u ~ t i ~ i ~ , p r o d ~ ~ t ~ualityand plant efficiency coupled with the increasing complexi~of ~ d u s ~plants a l have led inevitablyto a search for more advanced control t e c ~ ~ u e Since s . the late 1980s, s i ~ ~ c a activity nt in the use of s for i~entificationand control of systems has been obse~ed ease of use, their ~ e r e nreliability t and fault tolerance, has made a viable m e d i for ~ control. Manyarc~tecturesfor the control ofp l ~ t s
Neural Control
163
with A N N s have been proposed since the mid-1980s and the subject still presents considerable interest, not only in research but also practice. An alte~ativeto fuzzy controllers in many cases, neural controllers share the need to replace hard controllers with intelligent controllersin order to increase control quality. The problem of macroscopic identification of physical plants from normal operational data using multi-layerANNs reduces to one of finding a d ~ ~hctional i c relations~pbetween the plant inputs and outputs. The method is well established and is not limited to linear app r o ~ a n t s By . way of example, consider the case of a SISO discretetime system that is to be identified by the ANN shown in Fi The input to the ANN is fed fiom the inputto the physical plant. If, following t r a ~ n g the , output of the ANN is identicaZ to that of the plant then we say that the plant has been exact& ident~ed.In practice, perfect identification is unlikely and the plant can be identified only approximately. TheBdelity of the approx~ationdepends on the complexi~of the network andis directly relatedto the order of the neural networkand the numberof past samplesof the input that are used.
X
Y
~ i ~11.4 u ~r u~l t i - l ~dynamic er neuraln e ~ o r model k of u S ~ S ~ p l u n t
By placing a series ofn delayors D (i.e., elements that delay the 11.4, in effecta onesampleperiod) in series as shown in delay line, we obtain the input signal x(k) of it ~ ( ~ ~- (~k -)2,).. x(k-n). The n del the transversal ge~eratesthescalar delayline are thenfedtoamulti-layeat si a1y. This s i ~ aisl then compared with the desired signal d &om the cal plant, The object of identi~cationis to ~ ~ msome i measur ~ e difference (d-y), by suitably adjusting (Le., network trai~ng)the ights of theANN. As will be seenin. the f o l l o ~ n ga, similar technique is used for the controlof plants usingA W s .
The success of the bac~npropagationt r a i ~ n ga l ~ o for~ multi~layer t ~ neural networks, which is presented in some detail in the next was i n s ~ e n t ain l opening the gates to a flood of applications o for control.
Figure 11.5 Inverse ~ o d estructure l
A neural controller that has found use in practice due to its simplicity uses an inverse model of the plant, The method has much in
~ontrol
~eural
165
c o ~ o with n conventional a u t o - ~ n gDuring . the training phase of the ANN, which is performed off-line with known train in^ sets, the objective is to establish the inverse relationship P" between the output(s) and the input(s) of the physical plant, in effect the inverse ~ansfer functi~n if the plant is linear. Thus if the physical plant is characterized by the mapping y=P(u), then € o l l o ~ n training g the ANN will ideally generate the inversemapping u=P'(y) so that the overall relationship between the input and the output of the closed controlled systemis unity, i.e., perfect tracking! Network trainingis based on some measure of the open s y s t e ~error between the desired and the actual outputs e,=d-y of the closed system. A flow diagram of the method is shown in Figure 11.5. It should be obvious that the very simplicity of the method is ~uestionable.In theory the method should work but in practice it may not, because identi~cationof an inverse mapping can never be exact, in which case the overall transfer relationship of the system is not unity, In order to work, even partially, the method requires repeated identi~cation at regular intervals, a fact that makes the method impractical for most industrial applications.
Figure 11.6 ~ ~ e c i a ~ itraining z e d architect~re
11.5.2 ~ ~ e ~ i ~training l i z earchitecture ~ The lack of robustness of the previous architecturecan be compensated for by using what has been referred to as the "specialized training" ar-
166
Chapter I I
chitechre. The flow diagram of this a r c ~ t e c is ~ eshown in Figure 11.6 in which the closed system error becomes the driving force. In this chitectwe, the ANN is placed in series with the plant, as in the previous case, but w i the ~closed loop. The resultis creased r o b u ~ ~ ecouss pled with the advantagesof conventional feedba~k,since traini based on some measure of the closed system error e,=d-y, considerablymore difficult, however,with this s ~ c t u r e due , to the feedback action. arm
.3 Indirect learning archit~ct~re The indirect training architecture is more complicate^ than eitwo d ~ ~ i c ther of the~ r e c e d i n ~ m e since ~ o d sit involves not one but A N N s and its training is considerably more difficult. Here, oneANN is trained to model the physical plant following identification while the d second ANN performs the on trolling task using a ~ e e d - f o ~ a rnetwork. Both A l W s are trained on-line fiom normal o ~ e r a t i nrecords ~ A of the architectureis shown in Figure 1 1.7.
Y*
'LL
Y
Figure 11.7 I n ~ i ~learning ~ c t architectu~e
Neural ~ o ~ t r o l
167
During the training phase, the simulator ANN learns the functionalrelationshipbetweeninput( s) and ou~ut(s)(Le.,the ~ ~ n ~ ~ e f ~ ~ c t i oof n )the physical plant.This is the identi~cationphase, which is based on some measure of the error between the output of the plant and ANN', Le., e*=y-y*. that of the plant model simulator Training can be either off-lineoron-linewithrandomor pseudo-random signals. ~i~ultaneously, the overall error e=d-y is used to train the controller ANN. The advantage of this architecture is that it presents easiertraining of the controllerANN on-line since the error can be propagated backwards through the simulatorANN at every s ~ p l i n ~ instant.
This Page Intentionally Left Blank
ural Network Trainin Heuristic knowledge on how to control a plant can be used to train an artificial neural network provided this knowledge is suitably encoded. The resultant neural controller is thus simply an ANN whose s ~ a p t i c weights are trained with this encoded knowledge using an appropriate ~ a i n i n ~ ~ Z gNetwork o r i ~ ~training ~. is basic to establishing the h c tional relations~pbetween the inputs and the outputs of any neural network and considera~leeffort has been spent on finding faster and more efficient t r ~ ~ n g a l gwhich o r i ~will s reduce the time required to train a network. There are two basic classes of network training: e 0
su~ervisedlearning that involves an external sourceof knowledge about the systemor ~ n s u ~ ~ r vZearnin~ i s e ~ that involves no external sourceof owle edge and learningrelies on local i n f o ~ a t i o nand internal data.
In the case of supervised learning, the desired outputs of the network for every given input condition are specified and the network learns the appropriate hctional relationship between them following repeated application of training sets of input-ou~utpairs. The popular ~ a c k - p r o p a ~ a ~a~lo ~n o r i which ~ ~ ~ is, used in many a~plications,belongs to this class. This a l g o r i t ~gets its name from the fact that the synapticweights of amulti-layernetworkareadaptediterativelyby 169
170
Chapter 12
propagating some measure of the error between the desired and actual output of the networkfrom its output back toits input. In the case of ~ s u p e ~ i s elearning, d no r ~ c o ~ e s p o n ~t s sired output of the n e ~ o that available. Here, the network is auto-associative, the different inputs in different ways. Typical are feature detection and data clustering. Hebb's a tive l e a ~ are n ~two examples of ~ s u p e ~ i s e1 d wide range of network topologies such as those due to Hop~eld,Hamming and B o l t ~ a also ~ , use the same method of learning. In general, these networks, with their ability to generate a r b i t r ~mappin~sbetween theirinputsandoutputs, are used as associativememoriesandclassifiers.
+
A basic adaptive element is the ADAptive Llnear NEuron ( ~ that was introduced by Widrow and Hoff' in the 1960s. This element has a linear in~utRou~ut relationship. The element is usefid in ~ t r o d u c i ~ ~ the ~ d ~ e n t concepts a l of network t r a ~ n g Clusters . o f A~~~~ canbeassembledintocomplexnetworks t e ~ e d~A~~ ~ u l t i p l eA ~ A L ~which s ) were usedin early classifiers ~ a c ~ n e s , ~ e t w o r kcantbe r a c~on~ ~v e ~ e n t expl ly of a single may firsthowthesynapticweights nerate a given hctional relations hi^ between its inp and its outputs, It will be seen that the same principle can be used for adapting nonlinear neurons and finally, multi-layer ANNs. le newon with inputs: ~~~
which, w e i ~ t e dby an arrayof synaptic weights:
results in the weighted sum:
~
Neural ~
e ~~ r~a irn ~k n ~
An ADALINE has alinearfunctionalrelationshipgiven
171
by
Aa)=cr and can be trained by adapting its synaptic weights provided the desired output d is known. Training is based on some measure of the ~ ~ s c r e or~ error ~ ~ ce=d-y y between the desired and actual outputof the element Widrow and Hoff presented the fEst successhl ~ a i ~ algon g rithm for ADALINES in the 1960s. They named their training procedure the LMS a l ~ (foro Least ~ Mean ~ Squares), using the squared error for each trainingset as the objective ~ c t i o ni.e. ,
1
=i
which is computed for all the elements of the training set. We seek the values of the synaptic weights that minimize the objective function. The inputs to the A D A L M may be either binaryor real, whereas the values of the synaptic weights are alwaysreal and may be positive or negative, fying activation and de-activation respectively. h terns of the inputs and the synaptic weights of the element, the error is:
where <w,x> is the inner product of the synaptic weight vector and the input vector andthus the squared error is:
whose expected value is: &e2) = E(d)- 2E(d<w,x>) + E( <w, <x,x>w>)
The partial derivativeof the expected value with respect to the synaptic weights is:
17
Chapter 12
dE(e2
- -2p + ~ R w
"
av
(12.1)
where p = E(&) and R = E(<x,x>)
R is the power of the input signal whilep is the expectation of the product of the desired output and the input vector. Setti tive in E~uation12.1 to zero yields the optimum synaptic weight vector:
which is h o w as the Wiener solution.If the matrix R and the vectorp are ow explicitly then the o p t i synaptic ~ ~ weight vectorw * can be computed directly.In practice, however, R andp are not h o w and the Wiener solution~ f o ~ a t ecannot l y be used. ~ i ~ and o Hoff w observed that using the partial derivative of the squared instantaneous error
instead of its ex~ectation,made little difference to the final result. This o ~ s e ~ a t i o n s ~ p l inetwork f i e d training s i ~ f i c a n t l ysince the s ~ ~ ~ error ~ e ~ s i t icould v i ~ now be expressedin. terms of the synaptic weights and the error directly, Le.,
The ~ i ~ r ~ w ~ ~ o can ~ abel expressed g o r i as ~ the iteration: (12.2) where A is some positive constant thatdefines the rate of convergenceof the a l ~ o r i t This ~ . expression shows how the synaptic w e i ~ t sat the
r
e
Neura~Network Training
173
following iteration ofthetrainingproceduremustbeadapted.The search direction that must be followed is dependent on the sign of the gradient: thus if the gradient is negative then clearly the search trajectory is t e n ~ towards ~g some minimum. The algorithm is initiali%ed with arbitrary initial synaptic weigh vector wo and a new training set is applied to the element. The iteration is terminated once the squared error in that iteration falls below some acceptable value. Ateach iteration the change in the erroris
and using the fact that the change in the synaptic weight is
it follows that
This means that the error is reduced by a factor of a at each iteration. This factor thus plays a major role in the stability of convergence of the algorithm and mustlie in the range O
The
~~~~~
Tr~iningAlgorithm
The original ~ i ~ r o w - ~ o ~ a l ~ omust r i t hbemmodified when the neural element c o n ~ a i ~ a nonlinear s element. However, in order to develop a
1’74
C h u ~ ~12 er
systematic ~ a procedure ~ for g the general case, it is ne cess^ to place certain res~ctionson the nonal~earelement. As will be seen below, the ~ d ~ e n tcondition a l on then o n ~ l i n eelement ~ is that it must be ~ f o m l differentiable, y i.e., the n o n ~ l ~ must e ~ not i ~exhibit discontinuities. Given a neuron with cr=<w,x>, output y=Jcr) and error e=d-y, the error ~ e ~is given ~ by ~ the t partial ~ vderivative: ~ ~
It is obvious that for the error sensitivityto exist e v ~ ~ h ~it r e , is necessary that the gradient of the nonlinear ~ c t i o gn(a) =j”(o) exist for all values of cr. This implies that the nonlinear fimction must be difa linear n e ~ o nclearly ferentiableorsmooth. In thespecialcaseof g(o)=l. The development of theDelta algorithm follows that of the Wi~ r u w - ~ u ~ a l g oclosely. r i t ~ Here, the squared error sensitivi~is
which shows how the adient g of the nonlinear ~ c t i o enters n ~ the t r a i algorithm. ~ ~ This expressionis very similarto that ofthe Wi Hoff al~orithmexcept that an additional term has been added. l ~byothe ~ iteration t ~ The Delta t r a ~ n ~ is agiven
In order to accelerate conver~enc~, it is p o s s i ~ ~toe vary the value of /z accord~gto the progress achievedin traini iterationyfor example, the value of /z may be made n o m of the change in the synaptic weights. If the rate of change of the nom ofthesynapticweightsdropsbelowsome pre-speci~edlower limit, then the value of A is doubled whereas if the error n o m rises above some upperpre-speci~e~ limit then the value of/z is halved. This is perhaps the simplest possible approach to adapting the value o f the
N ~ u ~Na l ~ ~Training u r ~
175
multiplier A, and much more sophisticated ways are available that are beyond the scope of this book.
~ u ~ t i ANN ~ ~ Training a ~ ~ r Algorithrns aining algorithm for a single nonlinear neuron is s ~ a i g h t f o ~ a r d and is a variation of the original ~ i ~ r o ~ - ~ o ~ a l ~ oA rmulti-layer ithm. ANN comprises an input layer, a hidden layer and an output layer, each of which involves many nonlinear neurons. Indeed some A N N s used in tion, speech analysis and synthesis involve thousands of one or more of the layers ofANN an involves linear neurons. U ~ o ~ a t e l however, y, there is no way to h o w a priori how many neurons are required in each layer with which to generate a specified ~ p u t ~ o mapping. u ~ ~ t At this time, the choice is ~ b i t r aand ~a matter of e x ~ e ~ ~ e ~ t a Tt i orn , a is~p e~r f o ~ first e ~ for a given number of neurons, the number is then reduced and the ANN is re-trained. The number of neurons is W h e r reduced at each successive training session until the measure of the error starts to increase. For control applications,it is essential that the size of theANN in the neural controller be limited both in the number of layers and the number of neurons per layer. Fortunately, minimal neural networks involving an input layer, a single hidden layer andan output layer, with a total of less than10 nodes have proved quitesuccess~lin ~ r a c t i ~neual ralcontrollers.Thissmallsizeimpliesfasttrainingandre-training should the circ~stancesrequire this. The problem of supervised learning of a complex multi-layer be viewed as an iterative a l g o r i t ~for systematically minimeasure of the discrepancy between the inputs and outputs of the n ~ t w o by r ~ adapting the synaptic weights and biases in each layer ofthenetwork.Thestructureoftheiterativetraining a l g o ~ for t ~ synaptic weights of the network is shown in Figure 12.1. ining algorithm for a multi-layerANN is a variation of the for a single neuron.In this case vectors are replaced by matrices whose dimensions depend on the layer number and the number of neurons in each layer. In the next sectionback-pro~agation,the most popular n e t w o r k - ~ a ~ ~algorithm, ng is presented.
176
~ h a ~ t12 er
The Ba~k-propa~at~on (BP) ~lgori~hm A m ~ t i ~ l a y neural er network is characterized by the number of neurons it possesses in each layer. Thus, for i n s t ~ c e a, 30-~0-10ANN has 30 neurons in the input layer, 50 in the second or hidden layer and10 neurons in the output layer. The analysis of the back-propagation algorithm i s resented below in s i m p l i ~ ~form d so that it can be easily ~ d e r ~ t o o d . ~ e n e r a l i ~ a tion of the a l ~ o rtoi multi-layered ~ ANNs with many neurons is relatively s ~ a i ~ t f o ~but a r requires d multiple indices on the various synaptic weight vectors for each layer being considered, In order to avoid ~ e c ~ s co~~lications s a ~ wewillconsiderasimple 2-2-1 BNN involving two neurons in the input layer, two in the hidden layer and one layer. This mal ANN has, ~cidentally,been used SUCneural controller for a large mill used for pulveri for a cement kilnas well as a con~ollerfor a finish cutting lathe.
Figure 12.1 The s t r ~ ~ t uorfethe network trainingp r ~ c e ~ u r e
Neural N ~ ~ o raining r k
177
The signals at the inputs and outputs of the neurons of the first layer are respectively:
while the weighted signal at the output of the second ( o u ~ u tlayer ) is:
The synaptic weights of thefirst layer are given by the vectorw and thoseof the second layerby the vector v. The erroris
e =d-y3=d-Ao3)
Figure 12.2 An example of a simple 2-2-1 ANN
C ~ u p ~12 er
178
The partial derivatives of the squared error with respect to the synaptic weightsin each layer therefore are
de
- 2e-;
de
”
fi,
i = 1,3
fi,
Following the steps taken in developing the Delta training algorithm presented in the previous section, the synaptic weights of the first layer must be adapted according to
where W=={wvfand the weights of the output layer as
The training a l g o r i t ~thus requires evaluation of the partial derivatives of theerrors with respect tothe synaptic w e i ~ t of s both layers, Le., the errorsensitivities
de ae and av dW ~ r o p ~ i the n g iteration index k to simplify notation, thechain rule is used to derive thefirst three partial derivativesfor the first layer, which are:
The reader is encouraged to derive the remaining three partial derivatives following the same procedure. It is noted that given the input-output relationship of the compression fimction anal~ically,the derivative g can be readily derived. Thus for the tanh non-lineari~,used very comonly as the distorting or compression function of the node:
In the same manner, the partial derivatives for the neuron in the second layer are
These expressions are especiallysimpleifthepropagation is one layer only. Thus given some random values for the synaptic weights in all layers of the ANN and the known input vector, the first pass is made during which the signals al, 02) 0-3 are computed. Computation of the neuron outputsyl, y2, y3 then follows from which the various nonline~rfunctions and their derivatives gg)are computed. At every iteration of the algorithm, the corrections to the synaptic weight matrix A Wk for the first layer and the synaptic weight vector Avk for the second layer are computed. Thesecorrections are then added
the previous synaptic weights and the algorithm is repeated until convergence, defined as satisfaction of some error measure, is achieved, whereupon the a l g o r i t ~is t e ~ n a t e d It. is obvious that €or complex A W s containing many layers and neurons in each layer, it may be necessary to perform many thousands of iterations before ~onvergence is achieved and clearly com~uterswith high ~omputationalspeeds are essential. Finally, it must be noted that the bac~-propagationalgorithm, conve~entand used extensively for ~ a i n i nA~N s , is by no means the fastest ~ a i ~ algorithm. n g Many variations of this a l ~ o r i t ~ have been developed by additional terms to the synaptic weight adaptation vector which take into account such factors as the mom en^ of learning. This a~ditionalterm results in a s i ~ ~ c aincrease nt in the rate of convergen~eof the training a l g o r i t ~ .
WO vo
X
First layer
Second layer
Figure 12.3 Flow chart for the b a c ~ - p r ~ p a ~ a t i o n a l ~ o rthe i t h2-2-1 ~ f oANN r
hapter 13
ased Neural Con
.
Neural controllers that can be trained from linguistic rules are a relatively new concept in Soft Control. As for the case of heuristic fuzzy controllers?it is expectedthatrule-basedneuralcontrollerswillplay their part in ~ ~ e r i the n gd i f ~ s i o nof Computational Intelligence to ControlEngineering.Asnoted earlier, Soft Control is basedonthe owle edge and experience of human operators who are normally trained to control a plant using linguistic rules of the classicalIF ( c ~ ~THEN ~ e ) ( e ~ e cELSE ~ ) form. In the previous chapters, methods were presented for process~gheuristic l i ~ ~ i s tcontrol ic rules of this form using Fuzzy Logic, In this chapter we discuss a simple, yet effective technique by which linguistic rules can be encoded into a suitable f o m with which be the artificial neuralnetworkcontained in aneuralcontrollercan trained, This technique can be considered as a special case of neurofuzzy control that was examined in the previous chapter. Theneuralnetworksused in neuralcontrollersarenormally static, i.e., they contain no elements with memory, yet the overall controller may indeed be dynamic because it may be fed delayed versions of the inputs. F ~ ~ e r m o rthese e ? neural networks are characterized by the fact that they are ~ j ~since j they ~ ~ involve Z a very small n ~ b e of r neurons and hidden layers. Simplicity being of the essence in indus~rial controllers where high reliability and robustness are of primary importance, it is not uncommon to find neural controllers with as few as 10 neurons. 181
n
~
~ Lin~uistic ~ i n Rules ~
The ~ a i ~ of n ag neural networkis n o ~ a l l yperformed witha numeric set, There are n ~ e r o u s c o ~ e r c i aavailable lly software packages from a n ~ b e of r vendors, notably MATLAB andits Neural Toolbox, Neural, ~euralware,etc., which make this task a relatively simple matter. As control rules involvingl i n ~ i s t i cvariables c m o t be used directly for network training, it is therefore necessary to encode the ling ist tic rules into numerical form prior to using themin existing network t r a ~ packages. g The problem reducesto one of findinga mapping
ir: R(L) ”+ R(Q) thatmapsthe l i ~ ~ i s (Le., t ~ cq~litative)ruleset R(L) into a correspondin~n ~ e r i c a (Le., l quan~tative)~ a i ~ set n gR(Q). This procedure has been proved very effective in training neural controllers for a numberofapplications, &om large-scaleindustrialplantsto m e c h a ~ o ~ c systems using even simple ~~sformations. The following simple example shows the procedure for trans~ o lin~uistic ~ rules ~ intog numerical data. Defining thel i n ~ i s t i cvariables NL = ~ e g a t i v e - ~ a r gNSM e ~ = ~ e g a t i v e - ~ ~ aOK ll, = ~ o r ~ a l ~ PSM = P o s i t i v e - ~ ~ a PL l ~ , = Positive-~ar~e then a one-to-one transf o ~ a t i o of n l i n ~ i s t i cvariables into theirn ~ e r i c aequivalents l defined in the normalized range1-1,I f could beas follows:
This is an example of a linear mapping that follows h~~ intuition. Non-linear mapping may be used when necessary to com~ensate for any non-linear behavior of the plant being c o ~ ~ o l l e dThus . a rule with threeinputvariables, INPUT-1, INPUT-2 and INPUT-3 and
~ u l e - ~ ~~seeudr aControl l
183
THEN C O ~ T ~ O L - V ~ I ~must B L Ebe~ ~ s i t i v e - ~ ~ r g e
willappear as the ~ ~ i nstring: i ~ g 1-03, 0.5, 01 -+ [ I ] . Thistraining string can be used directly to form the~ ~ i nseti of ~ agneural network of specifiedtopology.Thecorresponding MATLAB NeuralToolbox statement is simply:
while the corresponding output is specified by the statement:
The training setis the collection of all the ( P I T) pairs co~es~onding to every ling~sticrule in the rule base.
r a i ~ Rule-Based i ~ ~ Neural The training of rule-based neural controllers of specified topology is performed off-line. Theresults of this training are the optimum values of the s ~ ~ p tweights ic and the biases of the neural network that yield the required co~trolsurface. These weights are subsequently d o ~ o ~ tod e ~ thereal-timeversion of thecontroller.Should it provenecessaryto modify Qr add any rule then the network must be re-trained off line. F o ~ a t e l y small , changes require very short training times since the network p ~ ~ e t e will r s be initialized with its previous known values rather than entirely random values as in the case of a new controller. h order to train the network itis necessary to mapall the N linguistic rules contained in the rule base in accordance with the chosen mapping. For the earlier example, the numerical strings for each rule (i.e., the (PIT) pairs) are concatenatedto form the training string: P=[-1.0 -0.5 0
. . .1 ;
-1.0 -0.5 0.5
-1.0; 0.5; -0.5;
string of N triplets
-
ple input single output neuralcon~olleris as follows: T= [O 0 . 5
-0 .5 . .. . . -1
0] ; string o f N c o ~ r ~ ~ ~ ~ ~ ~ i n O ~ t ~ ~ t S
This training setis subse~uently repeatedly appliedto the neural network, h ~ ~ e ord even s t h o u s ~ of ~ stimes in r ~ d o morder until the synapights converge. The i ~ t i a l e s t ~ aof t ethe s ~o~ ery e ~ (Le., ~ iteration c ~ of the a c c ~ r ~ with ~ce rithm (BPI is by far themostpopular ~ a alg ~ n ~ slowly, p ~ i c u l ~when l y the network contains many n e ~ o n and s layers. F o ~ a t e l y in , the ~ a j ofocontrol ~ ~applications this situation does sinceneuralcontrollersnormallycontainveryfewneurons. is considered completed when some measure of the error between the desired and actual outputs of the network reaches some accepta~lelimit, orthe number of epochs reachsome upper limit.
le 13.1 Design of a rulebased neur ~ o n ~ r o ~for l e ra ~ e ~ ~ ~ t system r o n ~ c A schematic diagram of am e c h a ~ o ~ device c involving a finish latheis showninFigure 13.1, The cuttingtool,onwhichaforcesensor is attached, is forced to follow a desired force on the object being turned on the lathe. The quality of fnish of the object is c~ticallydependent onthe rate with whichthe metal is cut. Itis i ~ ~where o ahigh ~ ~q~ality t ~~~h is required that the depth of cut be controlled with great a c c ~ a c y X .n most existing cutting lathes this is achieved with conventional two-tern (PI) controllers. Here we will present how an ~ c o n v e ~ t icontroller o~l may be used with equal or better results. The ~ a neurallnetwork shown in Figure 13.2 will be used in the neural controller. The network will be trained using l i n ~ s t rules. i~ The controller has two inputs: the error between desired and actual force Q and the change in error Dek=ek-ek,,.
R u ~ e - ~ a sNeural ed Control
185
The incremental output of the network isDuk= ~ ~ g p ewhile ~ g ~ e ~ the output of the neural controller is simply:
Force Sensor
Figure 13.1 A force-cutting lathe
Finally, the output of the controller is weighted before being applied to the plant as:
The p a r ~ e t e r sgi, gp and gc are the n o ~ a l i z i n ggains ofthe controller, necessary to convert the inputs to the controller into the range [ - I , I ] .The value forg ~ = ( c ~ uwhile k ) ~the ~ pair of controller parameters (&,gp)are tuned on-line or obtained inan identical manner to the ZieglerNichols method. The lin~uisticcontrolrulesrequired to controlthelathecutting form ofthecheckerboardpatterninthe process are showninthe linguistic rule matrix in Figure 13.3.
186
C ~ a ~ tI3 er
Figure 13.2 ~ i n i m aneural l controllerfor the mec~atronicsystem
Both the ERROR (e) and the ~ ~ ~ E - O ~ - E R R(De) O R are quantized into five elements (equal to the number of l i n ~ i s t i cvariables asd to each controller input) over then o ~ a l i z e dranges [-I, I].Here, each con~ollerinput has been a s s i ~ e dseven l i n ~ s t i cvariables and consequentlythe ~ i ~ g ~ i sRule t i c ~ a ~ r (~~ ix or Fuzzy Ass~cia~ive ~ e ~ ( ~ r~contains y ~ 49 possible ~ , rules not every one of which is specified. Typically some 20-30% of the possible elements of the FAM are specified. In the example shown in Figure13.3, the FAM contains 13 of the 49 possible d e s .
~ u l e - ~ a s~e edu r aC l o~~ol
187
Here PL = Positive-large, PM = P o s i t ~ v e - ~ e ~ i uOK m , = orm ma^, NS = ~ ~ ~ a t i v e - s m uPS l l ,= Positive-Sma~l, NM ~ e g a t i v e - ~ e d i u mPM , = Positive-~e~ium, PMS = Positive-~edium-Small and NMS = Negative-~~dium-Small. If thel ~ ~ i s tvariables ic for the inputs to the controllera sare si~ed the following numerical values:
and theco~espondingcontroller output:
then the n u m e r i c u ~ ~ z associative zy memory ( ~ matrix~is shown A in ~ e control variable is specified in the Figure 13.4. The m a ~ ~ ofd the darkened elements of the matrix. All other elements are left blank. The neural network will perform the necessary interpolation.
+I Figure 13.4 N ~ m e r i ~FAA4 ai
e
The t r a i ~ set g compris~g13 rules is given below:
The complete network t r a i ~ n gprogram in MATLAB is given in Appe~dixD. On exe~utingthis program the following synaptic wei are o ~ t a i ~ e d : w,,=
0.7233 wz1= 1.0764 v,= 0.798 v,= 0.2237 wI2= 0.2674 w2,= -0.9706
where wij are the synaptic weights of the first layer and vi the s ~ p t i c biases are: w e ~ ~oft the s second layer.The co~esponding
r ~ Rate and the or^ ErFigure 13.5 shows the N e ~ o Learning ror (Le., the sum of squared errors) as ~ c t i o n of s then ~ b e of r epochs. It is noted that less than l U U epochs are required to bring about conversion. This ans slates into a few secondsof computational time depending on the platform used. "he p e r f o ~ ~ of c ethe closed system with the n e ~ a ~ ~ o n ~ o l ~ ~ r compares favorably with that of a conventional two-term con~ollerin Figure 13.6, proving that ~ ~ o n v e n t i o ncontrol al can be as good as conv e ~ t i ~ ncontrol al andoften superior.
~ule-~ased
189
~ Control eural
Network Error
Network Learning Rate
Epoch
Figure 13.5 N e ~ o r Brrors k and N e ~ o r Learning k Rates as functions of epochs
;
...........;.* ...........: ............ ..........................
I 1
;............
.............
.................................................
i! I !
0.2 ........ ...................................... + : d
*
I
I
10
20
I
30 Time (second)
.............................
... ............ .......... I
I . .
I
1
40
50
Figure 13.6 Comparison ofstep responsesof the mechatronic system with the conventional controller(contin~ousline) and the neuralco~~roller (crosses)
A schematic of a large vertical mill which is used to pulverize coal which
is fed toa rotary kilnproduc~gclinker at oneof E ~ o p e ’ largest s cement kiln whereitselfmanufac~ers.This coal is injectedintoarotary ignites. The kiln produces clinker which is the principal consti~entof cement (see also Example9.2). Every cluster of cement kilns has one or more adjoined coal mills that feed them with pulverized coal. The coal mills normally operate d i s c o n t ~ u o ~ and l y on demand. When in operation, a coal mill normally produces more pulverized coal than a kiln can ~onsumeand thus an intermediate storage silo is used to store exc~ss production. When the level of coal in the silo drops below some predetermined level, the coal mill is automatically started. Due to the danger of fire because of the combustibili~of the coal, special care must be taken to maintain the coal mill e ~ v ~ o ~ inert. e n t Convention~l multivaria~lecontrollers have not been successfulcon in troll^^ this process, a task normally le& to human operators. The process and the principal c o n ~ o and l ~ o n ~ o l l e d v ~ a are bles showninFigure 13.7. Theoperatormanipulatesthreeprincipalvariables: the raw feed to the coal mill (FEED), the air feed to the mill ( m R ) and the pulverized coalr e ~ (RDPR) s and his decisionis based on ~ e a s u r e ~ e nof t s the ~ i f f e r e ~ t iPressure al in the mill (Dzt), the Exit T e m p e r a ~ eof the pulverized coal(EXT) and the ~ n d e r - p r e s s ~ine the l for both the inputs and mill (UP). The operator sets the n o m ~ a values the o u ~ u t sof the controller and the objective of the cont~olleris to r n a ~ t the a ~ process in the desired state despite d i s ~ b ~ ctoe the s operation of the process from external sources. operators are trained to control this process using a set of linguistic rules. It is interest in^ to note, however, that despite this common t r a i ~ gset, human operators develop their own control st rate^ over time which often vary from operator to operator. It is not s~rising, therefore, that plant performance and productivity vary accord~gly.Operational consistency with h~~ operators is des~ablebut rarely obtained in practice,Intelli~entcontrollers, in contrast, assure such consistencyona24-hourbasis. In the specific example a set of!125 rules ( 5 x 5 ~ 5 )were elicited&om human operators, examined for conflict and consistency and f o ~ e the d knowledge from which the controllers were trained. ~~~
: ~
Five l ~ ~ i s tvariables ic are used for each controller input,s ~ ~ c i e n t FAM has toyieldthedesiredaccuracy,whereupontheoverall 3x5x5x.5=375 rules. In practice this numberis unwieldy and itis simpler todesignthreeindependentthree-inputsingle-output sub-con~ollers which me executed sequentially. Here the sub-controllers have identical c a ~ e but s different efliects. The three sub-controllers can c~nsequently be trained independently. Fewer than125 rules me necessary in practice toachieve satisfacto~control.Rulepruning was syste~aticallyperformed with a view to reducing the number of control rules without loss of controller perfo~ance.This led to a reduced training set of65 rules, an example of which is given below: R: IF DP is ~ e ~ - ~ AND i g hEXT is H.gh AND UP is OK TmhJ FEED is ~ e ~ - ~ i HADR g ~ is o K m RDPR is OK
DP(0)
RDPR(0)
Figure 13.7 Rule-based neural control of a coal mill
The controller algorithm is resident in the supervisory control system and is executed every 10 seconds. If the resultant ~crementalcontra1 actions are small, indicativeof stable operation, theyare ignored and the processis ~ a i n t a ~ at e dits previous state. Two such n e ~ a coal l mill controllers have been in continuous operation since 1992 and haveco~sistentlyled to energy demandredu~tion of a p p r o ~ ~ a t e5% l y and acomp~ableincrease in productivi~~ food for thought for anyone still doubting the economics of intellige~tcon~ol!
euro-Fu Control Neuro-fkq controllers consti~tea class of hybridSoft Controllers that ic and artificial neural networks. Though the p~nciplesof d artificial neural networks are very different, the two techni~ueshave impo~antc o ~ o features: n hzzy logic aims at reproducing themecha~smof human cognitive faculty while neural networks attempt to emulate the human brain at the physiological level. In fhzzy controllers linguistic rules embody the knowledge on ~o~ to control a physical plant. In a neural controller this knowledge is e ~ ~ in ethestructure ~ ~ and e the~synapticweightsofthenetwork. in A N N s is analogous to the Merence engine F e ~ d R f o ~ aprocessing rd in fuzzy logic. Fuzzy controllers use fizzy compositional rules to arrive at their decisions, require ~ i ~ c a t i of o nthe input variables and decation of the compositefuzzy set of the outputin order to obtain a crisp output from the controller. In contrast, neural controllers use simple a r i ~ e t i ctechniques, operating directly in the physical world, In bothcases,currentdata from thephysicalplantbeingcontrolled is stored in a real-time database and then processed by an approp~atealgo~with which ~ the ~ twoe techniques r arrive at this r i ~Only , in the ~ control action do they differ radically. The ability to ~ e ~ e r a Z ~Le,, z e ,to extrapolate when faced with a new situation, is a feature common to both. E v o l v ~from ~ very different origins, fuzzy and neural controllers developed independently by researchers with very different backounds and very different objectives. Scant thought was given to the 193
possibili~of combi~ngthe two at the time. It did not take much time, however, for control engineers to realize that the operations of a fuzzy controller could be implementedto advantage with ~ i ~ c ineural a l networks, which, because of their ~ e r e n parallelism t and the^ superior co~putationalspeed, could lead to ~ o n ~ o l l ecapable rs of si hi~er b a nasdrequired ~ d ~ ina n ~ b e ofr critical s i ~ t i o n s . ~ e ~ o - f u z zcontrol y has been the subject of n ~ e r o books ~s and it is beyond the scopeof this book to delve in depth into the v ~ o u s ~ c h i t e c ~ that e s have been proposed, This chapter presents a brief in~oductionon how the two t e c ~ q u e scan be com~inedand how the fuzzy controller a l g o r i t ~canbeimplementedwith ~ i f i c i a lneural ne~orks.
uro-Fuzzy C o ~ t r ~ l l e r A r ~ h ~ t e ~ t u r e ~ It is logical to examine the fusion offuzzy logic and A W s with a view to developing hybrid neuro-fuzzy controllers that possesses the best attri~utesof both techniques in the hope that this will lead to a superior class of intelligent controller.In principle it should be ~ o s s i ~tol e““new controller or “‘&zzfl’ a neural controller. It is useful, atetheprincipalcharacteristics of hybridneuron controllers: they possessan architecture derivedfrom both t e c ~ q u e s , they have elements of both fizzy and neural controllers, each of which performsa separate task and two their design m e ~ o d o l ois ~a combination of the techniques.
A n ~ b e of r n e ~ o controller - ~ ~ c ~ t e c have ~ e sbeen pro~osed,each with features that make them suitable for specific applications. ~ o n s i d e ~fuzzy g and neural elements as distinct e~tities,it is possi~leto construct a controller s t ~ c ~ ine layers, d someof which me z z y elements. A i~plementedwith neural elements and others with h fuzzy element can, for instance, act as supervisor to a neural ~lement that controls some conventional industrial thee-term controller. The follow in^ characteristics of ANNs areuseful in con~ollers:they
Neu~o-Fuzz~ Co~~ol 0
* * *
195
use a distributed representation of knowledge, aremacroscopicestimators, arefault-tolerantand can deal with uncertainty and vagueness.
The Serence m e ~ h ~ sinma fizzy controller follows a series of systematic steps (the fmzy a l ~ o r j and t ~ in ~~ the process justi~esits decisions by den ti^^^ w ~ i c hrules have been fiied and what contribution each d e had on the fmal decision. Thereis no similar m e c h ~ s min a neural controller, which is conse~uentlyunable to justify its decisions. In this sense a neural controlleris little more thana black box capableof p e r f o ~ i n gan arbitrary~ c t i o n amapping l ofits inputs toits o ~ ~ u t s . we imply the useof A erm ~~ne~ra~jzatjon~’ controllers, It is possible, for instance, to represent e with a separate ANN, m a i n t a ~ gthereby an iso~ o r (Le., ~ the~samejform) ~ between ~ the two techniques. Alternac with many neurons tively, it is possible to represent each l i n ~ s t i rule and synaptic weights using only one ANN. This destroys the isornorphism, but leadsto a much simpler implementation.In the first case, the resultant controlleris unduly complicated, whereas in the second the resultant controller hasa compact structure with few neurons and very few o ~ ” ,of fuzzy logic are introlayers. it^ the term “ ~ z ~ c a t ~concepts duced in A N N s in which case the resultant controller will have neural e ~ ~ v ~of~then basic t s fizzy operators, e.g., min, max, max product and others. The hybrid neuro-fuzzy controller that is described in the foolrises a multi-layered feed-forward network that implements s of a fuzzy controller using c o ~ e c t i o ~techniques. st This e x a p l e of ~ @ ~ r a l design j z e ~ shows how it is possible, in principle, to s u b s t i ~ the t ~elements (or building blocks) of controller with neural e ~ ~ v a l e n t The s . resultant hybrid neuroontroller uses a variety of ~ s s ~ i lneurons ar and is certainly not the most practical or economical solution to n e ~ o control. a ~ The structure ofthis neurofuzzy controller is interesting though impractical, however, because it
196
Chapter I #
retains the flow of operations of a fuzzy controller while e ~ ~ h a s i ~ the concept ofi s o m o ~ ~ s m .
' 14.1 shows a multinlayerneuralnetworkofthehybrid nemantroller, It is observedthateachlayerof the neuralnett . causes and effects (i.e., inputs and outwork has a fuzzy e q ~ v ~ e nThe of the ~ u t s )of the network co~espondto the input and o u ~ u nodes t network, while the~ d d e nlayers p e r f o ~the i n t e ~ e ~ i a t e o p e r ~on tio~s the sets while e m b e d d i ~the ~ ~ o w l e d base. ~e very node in the ~ e layerc of the~ network ~ p e~ r f o ~ sa nonlinea ~ a p p i nof~the m e m ~ e r s ~ p ~ c tofi othe n si n ~ u t v ~ a bThe ~es. second layer involvesa cluster of neurons that have been trained to map the desired ~ e r n b ~ r s ~ ~ ~The c t nodes ions. p e r f o ~the same ~ c t i o as n the ~ o w l e d ~ base e in a ~~~~~~~
euro-~uzzy Control
197
while the co~ectionsbetween the second and third layers correspond to the iderence engine in a Euzzy controller. The nodes in the third layer map the members~p~ c t i o n of s the output variables.In the fourth and fiial layer, there is only one node for the output of the network and a node from which the training sets are introduced to the network. The various neuronsof each ANN are shown as nodes in Figure 14.1 and have properties which depend on the layer to which they belong. The relation between the inputs and output of an elemental neuron is, as before, simply: C T = ~ ; ~q W wherey ,
=ACT)
where 7 is the output, ui are the inputs, CT is the weighted sum, Wi the synaptic weights, and A.) the non-linear (compression) h c t i o n of the elemental neuron. There arep inputs and p + l synaptic weights for each neuron to accountfor the biasterm, In the first layer, each neuron distorts the weighted sum of the inputs so that it corresponds to the membership hction. For example, if the fixmy set is Gaussian, then
where rij are the centers and sij the standard deviations of the membership hctions. Here, the synaptic weights of the first layer of the network must be equalto the centers of the membership functions, Le.,wij= &. Using ~ ~ ~fwzzy~compositional ~ ~ rule i for' instance, s the nodesin the second layer of the controller perform the ANR operator (Le., min) in which a=min( u1, uz....up)and Aa) =CT The neurons in the ~ ~ layer i perform r ~ the OR operator required in thefinalstage of the h z z y compositionalrule.Herethesynaptic weights in this layer areunity and
The f Q ~ r tlayer ~ of the network possessestwo sets of nodes. The first set is required for ~ e a ~ ~ c a tand i oinn the case where the i ~ the s ~ a p t i cwei sets of the output are also ~ a u s s then nodes and the non-linear co~pression~ c t i o are n definedby
The second setof nodes in this layer transfer the elements of the training sets to the networkin a reverse direction,Le., from the o u ~ uto t the input of the network and here = di. The training of the network is p e r f o ~ e din two phases, at the ) n e ~ o n sin the fist and third end of ~~c~ the parameters ( ~ ~ , sof~ the layer are d e t e ~ n e d .During this phase,thenetworkalso learns the control d e s , storing this knowledge in the s ~ a p t i c w e iof ~ tthe s con~ e c t i o between ~s the second and third layer.
A simple example of a hybrid neuro-fizzy controller is considered here. The controller has two inputs and one output,It will be assumed that each ’ is ~ s s i ~ three e d fizzy variables LOW, OK and High. Assume, fbrore,thatthe fbzzy sets of theinputvariables are ~ ~ ~as a s h o in~ Figure14.2. Each input to the network is fed to three ANNs, each of which has an put-ou~ut relatio~hip(Le., mapping) a p ~ r o ~ a the t ~ coneg h z y set. The output of each ANN thus represents the cone~ e m b e r s ~ p ~pl’, c t pi oi and n pi.
r
,
~euro-FuzzyControl
lu
199
i
'i Figure 14.2 Fuzzy sets of the input variables
Furthermore, assume that the knowledge base comprises five rules distributed in control space(Le., FAM) as s h o w in the tile diagramof Figure 14.3.
Figure 14.3 Rules in control space
200
~ h a ~ t14 er
Given the members~pvalues for each input, the nodes in the second layer compute the degree of ~lfillmentof each rule, as shown in Figure 14.4. For the given input values, only rules R3 and R5 are fired and the c o ~ e s p o n d ~degrees g of ~ l ~ l l m eare n t 0.2 and 0.5. Figure 14.5 shows the neuro-fizzy controller with two puts, five rules and one output. The five rules in the ~ o ~ l e base d ~ are e e m ~ ~ dini ethe ~ second layer. The ~ o ~ e c ~ i between o n s the nodes in this layer and the next are ~ e t e ~ i by n ~the d rules. Thus, for example, the node co~espondin~ to rule R3 has ~ o ~ e c t i o &om n s the nodes represent~gthe hzzy sets OK and OK res~ectiv~ly while the node forrule R5 is linked to the nodes Hi ami LO of the fust layer.
Neuro-Fuzzy Control
20 1
Output De-~zz~cuti~~
L0:OK:Hl
R1 :R2:R3:R4,
L0:~~:HI
W L
Figure 14.5 The simple n e u r o ~ u ~controller zy with 2-inputs, I-output and 5 rules
The outputs of the nodes of the second layerare the degrees of Mfillment of each rule. The fizzy sets of the con~butionsfkom each rule that has fired me combined (using the union operator) in the third layer and finally the fourth and final layer perfoms the task of de-fiuzi~ing the output fiuzy set to yield a crisp output at the output of the newofhzzy controller.
This Page Intentionally Left Blank
lutionary Computat of intelligent controllers based on c conventional control techniques will ~doubtedlybecome increasingly common in the near future and these developments will rely heavily on the use of the stochastic methods of soft C o ~ ~ in~seeking t i optimum ~ ~ results, These hybrid methods offer a new and very exciting prospect for Control Engineering, leading to solutions to problems that cannot be solved by conventional analytical or numerical optimi~tionmethods. Althoughstochasticmethodsofoptimizationarecomputerintensive, the impressive progress that has been observed in com~uter h ~ d w a r eover the past decades has led to the ready a v a i l a ~ i l of i ~ extremelyfastandpowerfulcomputersthatmakestochastictechniques very attractive. One of the ascending techniques of ~telligentControl is the fusion of Fuzzy and Neural Control with Evolutionary Computation. Evolutionary Computation is a generic term for comp~tational methodsthatusemodels of biological evolutionary processes for the solution of complex engineering problems. The techniquesEvol~tionof ary ~ o m p ~ t a t i ohave n in common the emulation of the natural evolution of individuals ~ c ~through e s processes inspired from natural selection and reproduction. These processes depend on the fitness of the indi~iduals to s w i v e and reproduce in a hostile e n v i r o ~ e n t . ~ v o l ~can t i o be n i o ~ that can be emulated by a computer. viewed as m o ~ t i ~ i z ~ tprocess E v o l u t i o ~Computation is essentially a stochastic search technique with r e ~ ~ k a babilities le for searching for global solutions, 203
204
Chapter 1.5
There has been a dramatic increase in interest in the t e c ~ q u e s of evolution^ Computation since their introduction in the ~ d - 1 ~ 7 ~ ~ . Many applicati~nsof the t e c ~ ~ have u e been reported, includin~solving ~ r o b ~ ~ofmnumerical s andcombinato~alo p t i ~ ~ t i othe n,o ~ t i m ~ placing of components in VLSI devices,thede of o p t ~ u mcontrol of evolusystems,economics,modelingecologicalsythestudy e am0 tionary phenomena in social systems, and m a c ~ learning, ers. The idea behind evolution^ Computation is best ex~lainedby in~ ~ h a l e (1992): ~ c z the e x ~ p l quoted e
Do what nature does, Let us take rabbits as an exam~le:at any given time there is a p o ~ ~ l a t i oofn rabbits. Xhese fmter, smarter rabbits are less l i to be ~ eaten ~ by foxes, and therefore more of them s u ~ i v eto do what rabbit^ do best: make more r a ~ ~ i t Of s. course, some of the slower, d u ~ b e r r a ~ b iwill t s survive jwt because they are lucky. This s u ~ i v i n ~ ~ o p ~ lofa trabb~ts i o n starts b ~ e e d i nThe ~ , b r e ~ d i n ~ r e sin~ al t good s m ~ t u r eof r ~ b b ~ t ~ e ~ e t i material: some slow rabbits breed withfast ra~bits, some fast with fast, some smart rab~itswith dumb rabbits~and so on. And on the top of t k t , nature throwsin a ‘wild hare’ every oncein a ~ ~ ibyl e ~ u t a t i some n ~ of therabbit gene ti^ mater~al~ ~ e s u l t i ~baby g r a ~ will ~ (on ~ t~ ~e r a ~ be e )faster and smarter than those in the al p o ~ u l a t i obecause ~ morefaster, smarter parents s u ~ i v e d the foxes . . By analogy,in evolution^ Computation,solutionsthatmaxi) have a mize some measureof fitness (the criterionor cost ~ c t i o n will r probabili~of p a ~ i c i p a in t ~ the ~ reproduction process for new ons and it is likely that these solutions are better than the previous ones. This is a ~ d ~ e n tpremise a l in evolution^ Computation. Soluon evolve by f o l l o ~ nthe ~well-~o~ tions of m o p t ~ ~ t i problem p~nciplesof “survival of the fittest”. The basic p ~ c i p l e sthe , of evolution^ ~ o m p u t ~ ~are i o nin~ r i n c i ~ta l~ c ~ ~ and u eoperators s troduced in this chapter and an example illustrates howan evolution^ ~ l g o r i can t ~ be usedto determine the global optimump ~ ~ e t eofr as complex problem.In Chapter 17 the techniqueis applied to the desi optimized control systems. ~~~
~ ov ~o pl u~ttiaot~i oa n~
205
volutionary Algorithms Historically, EvolutionaryA l g o r i t ~ were s introduced at the end of the 1950s, but due to the lack of readily available fast computers, the whole field did not becomeknown for many years. Initially, Evolutiona~Pro~ ~ was proposed n as g an alternative method of Artificial Intelligence, while Evolutionary Strategies were designed and used for thesolution of difficult optimi~tionproblems. The seminal book by Holland entitled ~ ~ ~ a ~ t aint i~oa nt u r a land Art~ciaZSystems " publishe~in 1975, laid the foundations of the technique and introduced the ~ e n e t i c Algorit~m~ which is the most popular~ v o z u t i o n a ~ A l ~ o r i t h m . Genetic A l g o r i ~ s(GAS) derive their name from the genetic processes of natural evolution. They were developed &om Holland in the mid-1 960s and have been implementedsuccesshlly in a broad range of control applications, e.g., the design of neural andfuzzy controllers, for tuning of industrial controllers and for the creation ofhybrid hzzy/ evolution^ and n e ~ a ~ e v o l u t i ocontrollers, n~ etc. During the 1980s, the rapid progressin computer technology permitted the use of the Evoorithms in difficult large-scale opti~zationproblems and the method rapidly diffused into the scientific c o ~Today, ~ new ~ . applicationsofEvolutionaryAlgorithmsarebeingreported in large n ~ ~ eand r sthe field has finally achieved general acceptance. The terminology in the field of Evolutionary Computation is derived from Biology and Genetics. This terminology may lead to some confusion to the engineer who must associate the new terminology with known engineering terms. Here, the terms used will be adapted to make them easierto comprehend. Although EvolutionaryA l g o ~ t appear ~ s to be extremely simple compared with their biological counterparts, they are, however,sufficientlycomplicated so as toyieldsolutionswhere conventional numerical methods have been known to fail. ~voZ~tionary AZgorithms are a subset of Evolutionary Computation and belongto the generic fields of the simulate^ ~vulutionand ATThe search for an optimum solution is based on the namal t ~ c i aLife. l processes of biological evolution andis accomplished in a parallel manner in the parameter search space. Thet e ~ n o l o g yused in evolution^ omp put at ion is f a ~ l i Thus, ~ . candidate solutions of an optimization pro~lemare termed i ~ ~ i v i ~ ~The a l~s o, ~ ~ l aoft solutions io~ evolves in accordance with the laws of natural evolution. After ~ t i a l i ~ a t i o the n, population undergoes selectionJ reco~~ination and ~ ~ t a trepeatedly io~
until some t e ~ a t i o ncondition is satisfied. Each iteration is termed a ~ e ~ e r a i iwhile Q ~ ¶the in~vidualsthat ~ d e r recombination ~ o and mutation aren a m e d ~ a r e that ~ t ~ yield~ ~ ~ r i ~ g s . ~ e Z e c ~aims i o ~ at improv~gthe average quality of the population, giving the individuals with ~ ~ e increased r c h ~ c e~sfor ~ l replication in thenextationofsolutions. election has the f e a ~ ~ of the p a r ~ e t e search r space. offocusingthesearch in promisin ~l edbymeansof a ~ ~ efuncs s Thequality of every i n d ~ v i d is tion, which is analogous to an Q~~eciive fu~ctiQ~. The a s s ~ ~ t i othat n better i n ~ v i d have ~ s increased c h ~ c e to s reproduce even bett spring is based on the fact that there is a strong co~elationb fitness of the parents and that of their offsp~ng.In Genetics this correlation is termed ~ e r e ~Through i ~ . selection, exploitation of the n ~ e ~ ca~genetic informatio~ is thereby achieved. ugh r e c o ~ ~ i ~ atwo t ~ parents Q ~ , exchange their char ic info~ationresponsible for high values of fitness recombines * ent, then the chances that their o f f s p ~ will g hav fitness values are co~espondinglyincreased. ~ e c o ~ b i n a t i oisn also rederferred to as ~rQssover. Likewise, t ~ o ~uu t~a t ~an o ~individ~l , hange in one of its characte~stics, Le., in a specific secMutation aims at ~ ~ o ~ u cnew i n gcharacte~sticsto does not necessarily exist in theparents,lea thereby to an increase in the variance of the pop~ation.Exploration of the search spaceis achieved through the operators of recombination and mutation The cornerstone of EvolutionaryA l g o ~ is~ the s iterative procedure ine x p l o ~ gthe search space whilesimult~eouslyexploiting the is being a c c ~ ~ a t during e d the search. This is in tionali~lies, Thou& e ~ ~ Z o ~a ~syste~atic t ~ Q ~ , ~ a ~ ~ o pling of the search space is achieved, while ~0~~ e ~ ~ ~ Qthei inf o ~ a t i o that n has beena c c ~ ~ a t during e d e x ~ l o r a is ~ oused ~ to search for new areas of interest in which exploration can be continued. ~~~e exploitation, exploration includes random steps. It shouldemphasi~d be that ‘ ~ r ~ d oex~loration” m does not mean“ex~~oration ~thout ~ection” since the technique focuses on the mostp r o ~ s i n gdirections~
~Qolutionary Co~pu~u~ion
207
The most common types of ~ v o l u t i o n aAlgorithms ~ are: 0 0
0 0
0
GeneticAlgorithms EvolutionaryStrategies ~ v o l u t i o n ~a ~ r o ~ ~ ClassifierSystems Genetic P r o ~ ~ g
n
g
The first three are used extensively in o p t i ~ ~ t i o n p r o ~ l e m ~ , while Classifier Systems are used in machine learning. Finally, Genetic g is used in the automatic production of computer p r o ~ ~ s . It is noted that Genetic Pro~ammingand Classifier Systems are ofien considered as special cases of Genetic A l ~ o r i and ~ s not as special cases of Evolutionary Algorithms.
p t i m i z ~ t i oProblem ~ In the generalized o p ~ i z a t i o nproblem, the objective is a search of the values of a vector x E M, whose cost or objecti~~ functi~n is to be minimized, i.e.:
The solution of the problem requires ~ e t e ~ i n a t i of o nthe o p t i m ~solution vectorx*, for which:
In practice, the space of feasible solutionsis often bounded, Le., G M by ~ c t i ofo the ~ form g : M+% and an analytical solution to theproblem is unlikely.Onlywhen p and gj are p~icularlysimple ~ c t i o n can s conventional n ~ e r i c a l o p t ~ i ~ t i o n msuch e ~ oasd lins ear and nonmlinear pro~ammingbe used. Also, o p t ~ ~ t i problems on met in practice often requiresi~plification,resulting therebyin solutions that do not correspondto the original problem.This is one of the p ~ n c i pal reason^ for the adoption of ~ c o n v e n t i o ~ astochastic l optimization
methods, such as Genetic A l g o r i ~ that s are not bound by such constraints.
volut ionary Optimization
1
The field of~ v o ~ ~ t i o ~ a ~ has generated ~ ~ t ~ considerable ~ ~ ~ a t interi o n est and excitement in the enginee~ngc o and is one ~ of the as~ elds of Control Enginee~ng.The technique can yield solutions ation problems that cannot be solved otherwise. In Sofi Control, in p ~ i c ~ aafker r , the initial period of enthusiasm, it became necessary to search for optimum sol~tionswhere heuristics and prior knowledge could not be applied or were not always usehl, For example,issues c o n c e the ~ ~best form of thefuzzy sets to use in a Fuzzy Controller or thebesttopologyandthenumberofneurons ers ofthe ANPJ being used in Neural Control are now being using Evolutiona~ ~ptimization. The w e l l - ~ numerical o~ optimi~ationmethods of no~inear do not alwayslead to acceptablesolutions in practical becoming entrapped in. local ~~a instead of yielding s , combinationwithlocal globalsolutions, evolution^ A l g ~ r i t ~ in ~ 1 1 - c l i m b ~techniques, g in most casesare able tolocate global opt^^ solutions andare rapidly superce~ngclassical techniques. What then are the benefits of evolution^ e om put at ion and what are the reasons for the intense interest in this field? The answer is simple: Evolutiona~A l ~ o r i t are ~ s robust, ~exibleand adaptable and they can yield global solutions to any problem, whatever the form of the objective ~ c t i o n Conventional , numerical optimi~tionmethods, in con~ast,can yield excellent results in a specific class of problem fail in all others. The main differences between Evolutionary Algor and ~onventionalnumerical optimizatio~methods are thefollowing: they
0
seek the o p t i m solution ~ by searching apo~ulationof in parallel and notin an points of the search (solution) space isolated space, do not require derivative i n f o ~ a t i o nor any other information. The, direction of search is influenced by the evaluations
~
~ o ~ ~p ou lt ua t i o n a r y
0
0 0
209
of the objective fbnction and of the respective fitness fbnction only, use stochastic (probabilistic) transition and not d e t e ~ ~ s t i c on rules in the o p t ~ i ~ t i procedure, are simple to implement and apply, can yield a population of optimum feasible solutions in a problem and not a unique one. The choice of the best solution is then left to the user, This is very usefulin practical problems where multiple solutions exist as well as in multiobjective optimization problems.
+
Result
Figure IS.I Struct~reof a simple ~ ~ o l u t i o n a Ar yl ~ o r i t ~ ~
The search process, which is followed by a simple evolution^ orithrn. for the solution of an optimization problem is shown in the flow chart of Fig. 15.1 andis summarized as follows:
Chapter 15
210
1. a pop~ationof i ~ ~ isolutions al is created he~istical~y or rando~ly, 2. thefitness of every individ~lasolution is evaluated, using the fitness ~ c t i o n , wdepends ~ c h s ~ o n ~on l ykhe n every co~espondingvalue of the objective~ c t i o of candidate solution, 3, the ~eZectionoperator gives improved chances to the better solutions for survivalin the next ene era ti on, 4. using, the r ~ ~ o ~ b i ~operator, ~ t i o ntwo parents, w ~ have ~ h been chosen randomly using the selection operator, exchange n ~ e ~ c a l i ~ o ~according a t i o nto, a pre-d~fined probabili~of reco~bination, 5, using the~ ~ t ~operator, t i o partial ~ n ~ e r i c a~l o ~ a tisi o ~ p e ~ b e according d to a pre-defined p r o b a ~ i lof i ~m~tation, 6. the fitness valuesof the new population are re-ev~luatedand 7. if theter~inution criter~on (statistical orte~poral)is not e satisfied, thena return is made to the 3rdstep, o t h e ~ i s the algorithm is t e ~ ~ a t and ed 8. the best solutionfiom the setof opt^^ solutions is selected. If the o p t ~ ~ t i po rno b l e ~has c o n s ~ a i ~ tthen s , there are two alternative methodsof approaching an o p t ~ i ~ t i o n p r o ~ l e ~ : 9
e
the fist uses penalties (solutions which violate the constraints are penalized and their respective fitness ~ c t i o n values are reduced) and the second uses a mapping of the candidate solutions with si~ultaneoususe of the exploration operators (reco~~ination and mutation).
The pseudo-code of a simple ~ v o l u t i o ~ a ~
A is Q s~ o r~i t ~ o
below: k=O ; s2/0 Initialization of the it~rutionindex I ~ t ~ o ~ u l aP(k) t i o;% ~ Initia~izationof the ran do^ population Evaluate P(k) ; ?4~ ~ a l u u t i ofnthe Fitness of the initia~p o ~ ~ l a t i ~ n ~ t i l ( d o ~% e ) Iteration till the ter~ination criter~~n be satis~ed k:= k + 1; 96 Incre~ent it~ra~ion index or epoch P':= s ~ l e c t ~ ~ eP(k) n t s; % Selection of the s u ~ - p o p u ~ ~for t i o nthe
~
~ v o~l ~o ~ t ipountaartyi o n
21 1
reproduction of the o ~ s p r i n ~
recombine P'(k) ; % ~ ~ c o ~ b i n a t i o n mutate P'(k) ; % ~ u t a t i o n evaluate P'(k) ; 96 valuation of t ~ e ~ t n eofs sthe new popul~tion P := survive P, P'(k) ; % Selection of ~urvivors
enetic Algorithms Here, we will limit ow interest to the most popular evolution^ Algo~ ~was . noted above, Holland proposed rithm, the Genetic A Z ~ o r i tAs Genetic Algorithms in the 1970s, having studied the adaptabili~of organisms as a natural phenomenon. Since the early 1980s, Genetic Algorithms have been used extensively in optimi~tionproblems. ~ e a n ~ h i l ~ , the research efforts during the 1980s and 1990s resulted in the development of many new forms of Genetic A l ~ o r i t ~which s , differ significantly from the initial version proposed byHolland. It is beyondthe is refe~edto scope of this book to describe these variants and the reader the Biblio~aphyin chapter 18 for M h e r study. ThedifferencesbetweenGenetic A l g o r i ~ s ,Evolution ~ ~ a t e ~and i e ~s v o l u t i o n a ~ P r o ~liea ~ini the n g operations that candidate solutions are subject to during the evolutionary procedure. These differences may be critical in a successhl implementation of an Evolutionary Algorithxn but in practice, they are of lesser impo~ancecompared with the properties that they share. It is worthy of note that since the early 1980s each technique has borrowed principles from the others and their differences have tended to disappear. In the design and use of a Genetic Algorithm, the following issues must be considered: the
* * e
*
* e
creation of the initial population - initiaziz~tion, r e ~ r e s e ~ t a t i o n - m aof ~ the ~ i ncandidate ~ solutions, e v a Z ~ t i of ~ nthe fitness of every candidate solution, ~ m ~ ~ e ~ e n t of f f tthe i oexploration n operators recom~inationand mut~tion, selection o f the parents for reproduction of theo ~ f s p -~ n ~ sezection and choice of the~ f f ~ a ~ e of t ethe r s Genetic Algorithm
The various stages ofa simple Genetic~ l ~ o rarei discussed t ~ in some detail below.
An initial po~ulationof N candidate solutions (one for eachof the N un~ 0 ~is created s ) and for every solutio~individual/c~omoso~e X i the ". co~espond~ objective g h c t i o n value pi is eval~ted.A1 ods for the creation of the initial population or part of it, Q. tistical analysis of the search space or through h e ~ ~ treasoning. ic
The N candidate solutionsof the optimi~tionproblem are converted into s of length L; that are used to represent real numbers as follows: 000. ...O = mini mu^ value of the p a r a ~ e t e ~ ~ 0.. ~== minimum . value o f t h e p a r a ~ e t e+r 4x2' 000.. .10 = ~ i n i value ~ u of ~ the p a r a ~ e t $~ r4x2'
..............
t .. * t ...
1 1 1 . .1 1 == m ~ i m value u ~ of the parameter where q = ( m a . value - min ~ u l u e ) j ( 2 ~ - 1Clearly ). the discreti~ationstep q specifies the precision ofthe ~e~resentation while the length L of each representation need not be equal for all candidate solutions. When the optimization problem is m~tidimensional,then the partial strin concatenat~das shown in Figure 15.2 in order to create a single binary string. Other mappings that are commonly used are representationswith real numbers and the Gray code. By way of example, consider a simple ~o-dimensionaloptimization probiem whose objective~ c t i o is n quadratic: v)(x)=x;+ x; where 0&&7 are integers. Herewe select the length of the binarystring to be L =3 since 23=8, s ~ ~ c i e to n trepresent the integer values of the solutions.Thusthestring 000 0 0 represents ~ the s lution (0, 01, the
~ o~m ~ o~ lu~t taitoi no un r v
213
string 000 001 the solution (0, I ) , the string 111 111 the solution (7,7), etc. Following accepted terminology, the binary string is nameda ~ e ~ u ~thep decoded e , information thephenotype, while every individual solution is a c ~ ~ o ~ o s u ~ e .
. . . .*.
... .*.
Fig. 15.2 C r ~ u t ~ oofnthe string in u m ~ l t i d i ~ ~ ~ i o n u l ~ofr oo~timizution bt~m
15.4.3 Evaluation of the fitness I
E v ~ l u a t i oof~thefitnessofeverycandidatesolution is ~ d a m e n t a in l Genetic ~ l g o ~ t ~ s . a Genetic M e n ~ l g o r isi used ~ for the optimization of an objective fitnetion, the fitness is analogous with the objective hction. If the objective h c t i o n takes positive values only, then the fitness values and the objectiveh c t i o n values of an ~dividualare synonymo~s,If not, then a ~ a n s f o ~ a t i oisn necessary to reflect the ~ u a l i t a ~ vdifference e of the candidate solutions while ensuring that the ~ ~values e aresalways ~ positive. Usually, we use the reZ~t~ve of theindivi~~l-solutions defined as:
ness
j=l
~ ~ m ~ i n a t and i o nm ~ t ~ t i o n The r e ~ o ~ ~ ~and ~ ~tatio t i ion o noperators perform thenecessa~exploo recomb~ation u ~ (or crossover), nuration of the search space, ~ merical ~ f o ~ a t i o(Le., n the genetic ~ ~ t e isre xi c ~h ~ ~g e dbetween two r ~ d o m ~ d ~ v while i d ~ l~s , o mutation u a~it-digit is p e ~ ~ e d and its value is changed, For e x ~ p l econsider , thef o l ~ o two ~ g 3-digits Q1=
and Q2=
The crossover point is chosen randomly and in the example the result of recom~inationin the third gene (or digits) of the tvvo binary s t ~ n are ~ s the new strings: Crossover Point
Q*=
[
0
1
1
I
1
and Q2*=
In string Q1 the digits to the right of the crossover point are exed with these of the second string Q2, while the opposite is done be Crossover can thewith ~ e r f o ~ at e done or more omly. An altema~iveform of' crossover is or^ cr~ssoverwhere every di it of every o f f s p ~ ghas equal proba~ilitiesofbeingtaken from eitherparent.Thefrequencywith which the crossover operator actson the candidate solutions dependson some pre-defined crossover probabili~pCross E [O, 13. Practical values of the cross~ver probabili~ are in the range [O.64.951,while t e c ~ q u e s
~ o~mv ~o ul ~t at itoi on na ~
215
have been proposed where the same search process adapts the crossover ~robabili~. During tati ion, a random bit that is selected with some predefined ~utation probabili~ pmuh takes on values of 0 or I at random, This operation resultsin an increase in the v a r i a ~ i Z of i ~ the population. Mutation is necessary since potentially useM genetic material may be lost at specific locations of the generation during previous operations. For instance, after mutation of the second digitlgene which is chosen randomly, the string,:
is ~ a n s f o ~ into: ed
Figure 15.3 depicts the operationsof crossover and ~utationin ~ e ~ o space, i n p ~ e n o space ~ ~ e in the objective fimction and correlated to the ~ ~ e~ ~s n sc t i o n .
N individuals are chosen for survivalin the next gen~ ~ i ~eZection, n g eration accordingto their fitness values from a population ofN candidate sol~tions-individuals.Individuals with high fitness values have an increased probabili~of survival in the next generatio~iteration,compared to those with low fitness values, Many methods of selection have been proposed but here only the popular ~u~Zette-w~eeZ ~ e is considered. ~ ~ u Consider the surface ofa roulette wheel thatis divided according to the fitness values, Le., the angles of every sector of the roulette wheel are set propo~io~al to the fitness, If the relative fitness valuesare equal (an.unlikely situation in practice), then the roulette sectors will have equal angles, implying that thereis an equal probabili~that the roulette ball will stopin any of the sectors.
~
~
~
Chapter 15
216
'It f = (0.25, 0.24, 0.Id, 0.35)
f = (0.44, 0.01> O J 1 , 0.04)
~ i ~ 15.3 ~ ~e~resentation r e of the Crossover and tatio ion
t era tors
The h ~ o ~ e t i c case a l of the ball stopping on a dividing line is discounted! In reality, the fitness values are unequal in which case the sectors of the roulette will also be unequal, implying that pthe rob~bili~ of the ball stopping in any given sector increases with the angle of the sector. It is not improbable, however, that the ball will stop in a sector with a small angle, Imagine now that the ballis rolled and f i n ~ l ystops in one of the N sectors of the roulette wheel. The sector where the ball stops defines the c~omosomethat will undergo evolution. It is o~vious that the ballmay fall two or more times in a sector whichc o ~ ~ s p o n to ds fitness value and the co~espon~ing solutio~c~omosome is sem equal n u b e r of times for survival in the next gen in the next sol~tionwith low fitness may not be selected for survival generation.
~volutionaryComputation
-.....A/A
217
Chromosome Fitness
1 011100 000011 2 3 110100 4 010011 TOTAL “..*.Y...Y1..Y”..Y.“..I......~..I.(UU..(.‘*
% Totally ””” ..x. , ,
25 9 52 13 1170
25.25% 9.09% 52.53% 13.13% .,.....**.*100%..” ...*.. #..“.....I..”
..I.
.,#.
Figure 15.4~oulette-wheelselectionfor the obje~tive function yl(xl,x2) =x12+x: anda population of N=4
15.4.6, Choice of the parameters of a The main parameters thatkust be considered in the design of a Genetic Algorithm are the pop~ationsize of the N solutions-individuals and the valuesoftheprobabilitiesof reco~binatio~crossover andmutation. There are no general rules for selecting the appropriate probabilities but some general ~ i ~ e l i non e s values that give acceptable results have been established from experience. These guidelines suggest the following: N ~ [ 6 01001, , pC,,,~[0.6,0.91 and p,~[0.001,0.01]
It is noted that the probability of recombination is referred to the population N , while the probability of mutation is referred to all the digits of the population. Also, it is worthy of note also that Genetic Algor i ~ have ~ sbeen used for the optimizationof the parameters of the Genetic A l g o ~ t (Le., ~ s ~et~-GAs).
218
~ h a p t e rI5
~ a ~ 15.1 p ~~ oe n ~ t r ~optimiz~~ion ine~ of a complex function A difficult objective fimctionis chosen for the demons~ationof the potential of the Genetic ~ g o ~Assume ~ s that . the € o l l ~ ~ objective ng ction mustbe minimized:
where xl,x2 E [-I,I ) . As shown in Figure 15.5, the function p(x~,x2)has multiple minima, which would be difficult to locate using conventional numerical methods ofopti~zation.Even if the initial starting state in the search space were good, it would be difficult to avoid en~apmentin some localo p t i m ~ . ~ i g u r e15.6 shows the ~o-dim~nsional contour of p(xl,xz). Note that the minim^ value of the ~ c t i o is n at (0, 0), while the search space is a square with axes(-1,I) and (-1, I ) . In Appendix C a pro^^ for the solution of the optimization problem of the fhction p(xl,xz) is presente~. The program is writtenin MATLAB and is based on routines that can be found at the~ a t h w o r kweb s site www.mathwor~.com. Executing the Genetic Algorithm to optimize the objective ~ction p(xI,x2) with random initial conditions leads to the results depicted in Figures 15.7 and 15.8. In Figure 15.7 the evolution of the opti~zation trajectory of theo ~ t i solution m ~ in every generationis shown while in 15.8 the evolution of the objective tion on in every ~ e n ~ a t i o n (Le., iteration) is shown. The upper, middle and lower curves co~espond to the worst, average and m i ~ ormoptimum ~ solution respectively. It is noted that the Genetic A l g o ~that t ~ has been implemented in this example followsan elitist strategy, Le., it preserves the optimumsolution, found so far, in every generation. Finally, the other parameters of the Genetic A l g o r i t ~are pop~ZatiQn-s~ze~lO, probabili~of mutation ~ ~ = O . probabili~ O~, of crossover pcm8=0.5 and m ~ i m u mnumber o f generations magen= 40. The length of the binary string for every paramet~ris 12, in which casethe concatenate^ string has24 digits.
~omputatiun ~vo~utiunury
219
1
-1
-1
Figure 15.5 The objective~uncti~n v)(xI,x2)
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
Figure 15.6 Contour graph of the objective functionv)(xl,x2)
1
Chapter 15
220
-0.5
-1
0.5
0
1
Figure 15.7 ~volutionof the trajectory of the op~imums o l ~ ~ i o n in every ene era ti on 3
25
2
1.5
1
0.5
0 10
20
30
40
50
60
Figure 15.8 ~ v o ~ u ~ofi othen ~est/average/wo~st so~ution everyforepoch
~ ~ o~l uo t~i po un taartyi o n
22 '1
15.5 Design of Intelligent Controllers Using GAS 15.5.1. Fuzzy controllers The traditional design of fuzzy controllers is based primarily on heuristic techniques. The main problemin fuzzy control designis the d i f ~ c uinl ~ defining a hostof parameters, such as the number and shape of thefbzzy sets of the inputs and outputs, the form of the inference engine and the deu~zzificationmechanism. Their choice has considerable i ~ u e n c eon the overall behaviorof the controller. ~ n f o ~ a t e laty present , the theoretical fo~dationsfor determining the o p t ~ u msolutions does not exist and consequently only experience with similar problems can be used in their design. Often, the resultis acceptable, but thereis no guarantee that there does not exist a better solution. The f l e ~ b i lof i ~Evolutionary ~ l g o r i is~ the s p ~ n c i ~motial vating factor for their use in determining the optimum values of the parameters of a fuzzy controller. As was mentioned in previous chapters, the linguistic values of Euzzy a variable are defined by theirmembers~p hctions, When the members~p hctionsare triangular, thenthe three parameters a, b and c shown in Figure 15.9 uniquely specify the fuzzy set, The parameters of everyfuzzy set are encoded into binary strings of sufficient length to give the desired precision. For n fuzzy sets and m variables and encodingwithp digits, the total length of thec ~ o ~ o s o ~ e is clearly nmp digits.
a
P
Y
X
Figure 15.9P a r a ~ ~ t eof r sa triangularfuzzy set
Chapter 15
222
If the dynamic behavior of the process is known and thereexists a macroscopic model of the process, then we may use the single objective ~ c ~ (or o cn~ t e ~ o to n ) evaluate the perfo~anceof the closed system to a step dis~bance:
where 2 ” . These are the familiar ITAE and ZSE criteria res~ectively, Alte~ativelysome criterion which involves overshoot, steady state error and rise time could be used.
eural controllers The perfo~anceof a neural controller depends critically on the mehitecture of the ANN used, Le.? the number of neurons in every layer, the n ~ ~ ofether layers and the topology of the ~ e ~ o rthe k , form of the compression ~ c ~ and o the n algorit~ used to train the network. The d e t e ~ n a t i o nof these parameters is based on the howland experienceof the designer and anydiscussio~on optimum deis of no conse~uence.The d e t e ~ n a t i o nofthe p ~ ~ ~ tofea neur s ral controller can, however, be t r ~ s f o ~ into e d an optimi~tion ~roblem for which Evolutionary Algorithms ery attractive, Genetic ~ l ~ o ~ t hare m sc d very efficient rapidly in finding the ~ ~ ~ ~ o opt^^ x i ~ solution ~ t e of an opti~izationproblem, but they are generally slow in finding the precise solution. For better convergence,Genetic A l g o ~ t ~ cans becombinedwithlocal-se t ~ c ~ ~ usuch e s as , hill climbing? which are ideally suited to ~ndingoptimum solutions in the small. It is noted that for an ~ i ~ c i Neural a l ~ e ~ with o mr layers ~ and yti neurons in the ith-layer, the total number on is: of ~ ~ a m ~ tinethe r s o ~ t ~ i z a t i problem
1=0
~ ~ n e ~ c
is decoded into a binary string witb I; digits, the of osome is clearly NL. It is obvious that the use in problems ~ l g oinvolvin~ ~ t ~ ANNs s with t h o u s ~ d of s neu-
~o~putation ~vo~utionary
223
rons becomes difficult and extremely time-consuming. HoweverA N N s , which are used in Neural Controllers, usually have a very simple archi30 neurons or more than one hidden layer, tecture with rarely more than in which caseGASare very efficient. s the field The second application of evolution^ A l g o r i t ~ in of Neural Control has to do with the evolution of the topology of the network (i.eS9the manner in which the neurons of the networkare interconnected) with or without parallel evolution of the weights of the network. This problem is practically unsolvable with conventional optimization methods, The main characteristic that makes Evolutionary Algorithmsattractive for a broad class of optimization problems is their robus~essbecause: e e
e
e 0
they do not require specific knowledge or derivative information of the objectiveh c t i o n discontin~ties,noise or other unpredictable phenomena have little impact on the performance of the method they perform in parallel in the solution space, exploring the search space with simultaneous exploitation of the i ~ o ~ a t i derived on and theydo not become entrapped in local optima they have good performancein m~tidimensio~al largescale optimization problems they can implement in many differentoptimi~ation problems without big changes in their a l g o ~ t ~ i c structure
The main disadvantages of GAS are that they: e
e
face some difficulties in locating the precise global optimum, althoughit is easy for them tolocate the vicinity where the globalo p t i m exists ~ and require a great numberof evaluations of the objective fhction and therefore require considerable cornputational power.
With regard to the first disadvantage, many hybrid e v o l u t i o ~ ~ a l g o r i t ~ s which , embed local search techniques, have been proposed.
Methodslike ~ l l - c l ~ bor~~g ~ ~ a ~e~~~ t e d (presente~in the next chapter) in ~om~ination with E v o ~ u ~ o n ~ have ~ ~ gbeen o r i ~ s developed in order to d e t eexact ~ the e iml overall the prove p e r f o ~ ~search of etic c ethe n. a l ~ o r i ist ~that due to Moed and Saridis for global o p t i m i ~ t i ~Concerningthesecond disad~anta~e, the ~ a m a t i cevolution in co~puter in combination with the progress in parallel computer m chines is tending to ~ i ~ i this z ~sadvanta~e. e
Annealing S ~ u l a t e d h e a l i n gwhich , has much in common with Evolutiona~ Computation, is aderivative-freestochasticsearchmethodfordetermining the solutions of an optimization problem. The method was proposed by ~ ~ p a et~al. cin k1983 and has since been used extensively to solve large-scale problems of combinatorial optimi~tion,such as the w e l l ~ ~~a voe l~i nsalesman ~ problem(TSP) and in the design ofVLSI circuitry. The main difference between Evolutionary Computation and S ~ u l a t e dAnnealing is that the latter is inspired by the annealing process for metals during cooling while the former is based on evolutionary processes. The ~ ~ n c i p of l e a ~ e a isl simple: ~ ~ at high tempera~esthe molecules in a metal move freely but as the metal is cooled gradually this mo~ementis reduced and atoms align to form crystals. This crystalof ~ ienergy. ~Metals that i are ~ line form actually constitutes a state adually reach a state of m i ~ r energy n ~ n a ~ a l l y while , if they are forcibly cooled they reach apolyc~stallineor amorphous state whose energy level is s i ~ f i c a n t l yhigher. Metals that are annealed are pliable while thelatter are brittle. However, even at low temperatures there exists a small, but finite p r o ~ a b i l that i ~ the metal will enter a state of higher energy, This implies that it is possible that the metal will leave the state ofm i ~ m ~ energy for a new state where the energyis increased. During the cooling process, the intrinsic energy may rise or drop but as the t e m ~ e r a ~ is e lowered the probabili~that the energy level will increase suddenly is re225
226
Chapter 16
duced. The p r o ~ ~ b ithat l i ~a change in the state of the metal at some t e m p e r a ~ eT and initial energy levelEl to some other state with energy level E2 is given by:
p = e KT ifE-pEl =I otherwise ’ s where 1v is B o 1 t ~ ~constant. This t h e ~ o d ~ a mprinciple ic was adaptedto n ~ e r i c aanalysis l i sin 1953 giving rise to the terms ~ i ~ u lA an nt ~~u ~~by ~ e ~ o ~ oet lal, ~ ~ a t e d attempts ~ toe ~ a l ~~ene~ ~. This iszs ~ l aetor ~ i a ~ y ~ ~ h~c tni ogno ivn modern control theory. In implementing the~ e ~ oalgorithm ~ o ~ the ~ following s must be h o r n : 0
0
the objective h c t i o n p (by analogy with the energyE of the metal) whose mi^^ is s o u ~and, t a control p a r ~ e t e T(the r simulated tempera~e)whose temporal strategy defines the changes in the s ~ ~ a t temed perature at every iteration of athe lgori~.
~ l t ~ the o uanalogy ~ betweenthephysicalannealingprocessand ~ ~ ~ a t e isd far fkom ~perfect, e ~there i is n clearly ~ much in cornmons In all the stochastic al rithms of o p t i ~ ~ t i oan n ,a~emptis made on from ani ~ t i a l r ~ point d o mto an o p solution ~ ~ le. This can lead to entrapment in some local optiitmaybe difficult if not possible to extricate. ng does not sufferthis problem, since thet ~ c ~ is~ u e hes the solution space randomly. For the solution of an optimi~tionproblem with Simulated ~ e a l the~ follo ~ , me required: 1. an initial randomsol~tionvector XIin the b o ~ d e d p m ~ e t space is selected andits objective h c t i o n (o(x1) is computed, 2. an initial t e m p e r a ~ eT(O)= &nit is specified,
Si~ulatedanneal in^
227
3, using some stochastic or heuristic strategy,a new solution vector x2 is selected and the corresponding objective function value is evaluated p(x~)¶ 4, the difference of the objective function llp = p ( x ~ ) - ~ (is ~,) computed, 5. if dpO accept the solution vector according to ~the r o ~ a ~ofi Z i ~ acce~tance: A0
”
p(k)= e
T(k)
otherwise goto step 7, 6 . set x I=x2 and ~(x,)=p(x2) and weight the current simulated temperature with the coefficientA, where O
T(k+l) = Aqk), where k is the iteration index, 7. if the current simulated temperature is lower or equal to the final temperature, Le., T(k)S T$nal,then accept the current solution vector as being o ~ t i ~otherwise u ~ , returnto Step 3 and repeat the process.
If the Simulated Annealing algorithm is to succeed, it is i ~ p o ~ a n t that the temporal annealing strategy that is followed, Le., the ~ i ~ u Z a t e ~ t e ~ ~ e r a t u r e ~ r be o ~suitable. Ze, The rate at which the simulated temperature is decreased depends on the weighting coefficient 2. Too high a simulated cooling rate leadsto n o n - energy ~ ~ solutions, ~ ~ while too low a coolingrateleadstoexcessivelylongcomputationtimes.The closer the value of A is to unity, the slower simulated temperature decreases. Figwe 16.l shows the probability of acceptance of the solution p(lz), as a functio~of the iteration index for different values2,ofIn order to achieve effective exploration of the search space, it is advisable to use 0.95<;1<0.98.Finally, as in Evolutionary Computation, the trajectory of an o p t i m i ~ t i ~problem n is critically dependent on the initial estimates of the o p t i m ~solutions that are heuristic or the result of statistical analysis.
Chapter 16
I 10 I 9
28 37
46
55 64
73 82 91 100 109 118
Figure 16.1 aria ti on of the acceptance p r o ~ a ~p(A) i~i~ CIS a fun~tionof the i t e r ~ t i ~ index n k.
plication Examples Two examples of the application of si~ulatedannealing are presented below. In the first, the ~ o - d ~ e n s i o npara~eter al o p t ~ z a t i o nproblem that was presented in the previous chapter on~ v o l u t i o n ~ ~ o m p u t a t i o ~ is used. The second application example shows how ~ i ~ ~ l a t e ~ heal ing can be used to advanta~eto obtain the o p t i ~ u ~ c o e ~ ~ of ~ iae n t s two-tern (PI) indus~alcontroller.
S i ~ u ~ a t Annea~ing ed
229
Example 16.1 Constrained optimization of a complex function The problem statement in this example is identical to that of Example 15.1 in the previous chapter and refersto the problem of finding the parameters x/ and x2 which minimize the multi-peaked objective hetion: ~ ( x * , x ~ ) = x ~ ~ + x ~~ -oO ~. ~( 3 ~ ~COS(47E2)+O. )-0.4 7
The parameter search spaceis bounded by the squarex ~ , x ~ E [ - I , IFigure ], 15.5 showed that the objective k c t i o n has multiple minima in the permissible parameter search space.An example of the trajectory of the solutions in the bounded search space using simulated annealing algorithm is shown in Figure 16.2. The evolution of the objective functionp(xl, x2) is shown in Figure 16.3, During the initial iterationsof the algorithm and particularly when the simulated t e m p e r a ~ eis high, the trajectory appears random with large ~ u c ~ a t i o nWith s . successive decreases in the simulated temperature, however, the algorithmis seen to converge. Without systematically decreasin~thesimulatedtemperature,thesolution to theproblemat everyiterationwould be totallyrandom, so~ethinganalogoustothe Monte Carlo method and convergence is unlikely. Finally, Figures 16.4 and 16.5 show the trajectories of the parameters xI and x2 as they converge to the null state (0’0) at which the objective h c t i o n has a minimum. This is the stateof minimum “energy”. Convergence is achieved inappro~mately150 iterations. It is noted that convergence is achieved~ i t ~knowledge o ~ t of the derivative of the objective ~ c t i o nThis . is particularly useful when the derivativeof the is objective function, requiredby most non-linearp r o ~ a ~ i methods, ng d i ~ c u lor t impossible to obtain analytically.
~ h a ~ t16 er
230
-0.5
0.5
0
1
Figure 16.2. ~ r a j e c t of o ~the s o ~ u t i oin~the sea~chspace (xl,x2)
0 0
-1 50
100
150
200
250
300
350
Figure 16.3 ~ ~ o ~ u tofi othe n objectivefunction p(xl,x2) as afunction of the iteration index
Si~ulatedanneal in^
"I' 0
23 1
i
4
i
10
15
20
25
30
35
0
0
0
0
0
0
i
50
Figure 16.4 ~volutionof x1 us a ~ n c t i o nof the iteration index
1 0.8 0.6
0.4
0.2
0 -0.2 6.4 -0.8 -0.8 I
50
10
15
20
25
30
35
0
0
0
0
0
0
Figure 16.5 ~volutionof x2 as a ~ n c t i o nof the i t e ~ ~ t i oindex n
232
C ~ u ~ t16 er
xamplc; 16.2 ~ p t i m i ~ a t i oof'a n tw~term i n d u ~ t r i controller ~l
-
Given a simple SISO (Single Input Single ~ u ~ uplant t ) whose step response, derived from exp~mentaldata, is shown in Fi plant is to be controlled by a classic i n d u s ~ a ~l o - t controller e ~ (PI), whose input-ou~ut relations~p is simply:
Here e is the error between the desired and the real output the control variable.The unknown p a r ~ e t e r sof the i n d ~ s ~controller al are the gains K' and IC, whose o p t i ~ values u ~ are sought. One way of d e t ~ ~ i the ~ n"best" g gain pair is to use classical tuning methods such as those of Ziegler and Nichols or modern tuning t e c ~ q u e ssuch as those of Persson and Astrom (see ~ i b l i o ~ a p hiny chapter 18). These methods (i) assume a simpli~eddynamic modelof the plant and(ii) use heuristics to arrive at the"best" parameters insteadof an ~ a l ~ i cerror al criterion. Here in contrast, an ~ a l ~ i ccrit~rion al is used directly andthe opt^^ pair is determined using stochastic tec~iques
1.2 1
i
I
i
t
I
I
30
40
50
"""
0,4 0 .a n
10
20
Simulated Annealing
233
Using the ITAEi criterion it is desired to obtain the values of the parameter pair (KPtKi), which minimize the objective fimction (Le., error criterion):
where T a. An example of theevolution of thecriteriondependent from the iterations is depicted in Figure 16.7. Convergence is achieved in about 120 epochs (iterations).
Figure 16.7 Evolution of the objectivefun~tion
Figure 16.8 Evol~tionof the parameters of the industriul controller
234
~ h a p t e 16 r
Figure 16.8 shows the evolutionof the p~ameterpair (KpJC;) of the dustr rial con~oller.It is noted that conver~enceis achieved, whatever the initial values of the unknown p ~ ~ e t e rFinally, s. the step response of the closed-loop system is shown in Figure 16.9. This response must be ~ o ~ p with ~ ethat d of Figure 14.6 for the non-opti~izedneural controller. A cursory glance willcodlrrn that the response of this sy perior.
I
Figure 16.9Step response of the c l o s e ~ - l o o ~s ~ s t e m with mini~umITAE
lutionary Design of ontrollers The criteria used in the design of control systems, better known as objective or cost hctions, are normally formulated in terms of anal~ical ~ c t i o n sIn , practice, multiple engineering objectives are often difficult to express in closed analytical form and great effort is spent trying to fiid suitable expressions that resultin acceptable system performance.In industrialthree-termcontrollerdesign,forinstance,the o p t i m ~parameters of the controller must satisfjl not only specific closed system speci~cationsbut may also involve economical, ecological, production factors.Thesemultipleobjectivesaredifficult to , conflicting and impossible to satisfy simultaneously. ont troller design with multiple objectives can be attempted using a composite objective h c t i o n in which the various objectives me assigned weights or penalties and the design problem is tr~sformedinto a nonlinear o ~ ~ i z a t i oproblem. n Nonlinear p r o g r ~ i nis ~the traditional met~odfor o b t a ~ nnumerical ~ solutionstothisproblem,but there is no ran tee that the procedure will reach a global o p t i m ~The . problem is compounded if the parameter search space is bounded. Stochastic o p t ~ ~ t i using o n Evolutionary ~ r o g r ~ i or n gSimulat~dAnnealing is an attractive alternative when numerical solutions are required ficant inroads in its use have been made in recent years. measure of performStochastic optimi~tionwith a ~~azitative ance of a closed system, instead of quantitative terms, offers distinct ad235
vantages in controller design to the Control Engineeras he is able to relate to the design problem directly in linguistic terms rather than t~ou some abstract analyticalfomulation.
evolution^^ A l g o r i t ~ sare used mainly in optimization
proble~sand especiallyinconstrainedproblemsinwhichtheobjective ~ c t i o nis co~plicated.This class ofproblems is usually difficult to solve with conventional numerical methods. In the stochastic approach using evol u t i o n ~ p r o ~ athe ~ imulti~le n ~ , objective ~ c t i o nis t r ~ s f o m e d intoa co~positefitnessfimction,whichthen consti~testhe force ofthe evolutiona~ search ~rocedure. Human knowledge and engineering objectives can normally be expressed in qualitative terms when a q ~ t i t a t i v e f o ~ ~ a is t i onot n possible. Considering the flexibility of ~ v o l u t i o nComputation, ~ it is at c o m p ~ s o nof the candidate solutions can bep e ~ o us~ e ~ linguistic rules. The fomulation of the o ~ t i ~ ~ t~roblem ion way as to use linguistic objectives consti~testhe ~fference betweenthestochastictechniqueusing evolution^ fuzzy fitnesscriteriaandconventional foms ofEv r i b s . In the qualitative design technique, fitness is expressed in terms of l i n ~ i s rules ~ c thatareprocessedusingan i ~ e r e ~ c e ~ e c h ~ s m whose outcome is de-fuzzifled to yield crisp values for the fitness. It is recalledthat in theclassical ~ v o l u t i o n a ~ A l g o r i t ~ s ~ e s c r iin be~ Chapter 15, the fitness values are computed from an analytical objective ~ction. In the generalizedo ~ t i ~ z a t i problem, on the objectiveis a search n~ ~ i z e d for the values of a vector x E M,whose objective ~ c t i o is 1,e., p(x)
-+min
The ~ c t i o np(x) expresses the engineering ~ ~ j ~ ~ tini v~ ec st i o n a ~ In form and is some measure of the behavior of the system being studied. the stochastic design technique, a Genetic A l g o r i b is used to search for the optimum values of the ~o~ vector xeM in the sarne ~ a ~ e r that was described in Chapter 15. The main difference here is that the
evaluation of fitness does not follow the classical approaches, but is derived fkom a set of linguistic rules that express the multiple engineering objectives of the problem. The consequent of each fuzzy rule is taken as z z y linguistic values from the the objective h c t i o n p that can take m h set:
Assume also that the array a =r (ai, a2
... am>
is the setof ~ ~ ~ e t ewhich r s , consist of the antecedents, and
is the set of q fixzzy values of the variable ai. Then, the l ~ ~ i s trules ic that specifjr the fitness function in the Evolutionary Algorith take the fornl:
R: IF al is viI AND a2 is v2,AND a3 is v3, ...THEN p is wi The total number of design rules is thus equal toai *nl+a2*nz+. ..+ak*nk.
The ~ o ~ l e about d ~ econtrolling a system exists in the form of linguistic e s consequents ) (Le., rules whose antecedents (Le., controllera t ~ i ~ ~ tand controller s ~ ~ t a ~ i Zuniquely j ~ ) specifjra p ~ i c ~ design. ar m a t is required therefore are rules that describe, in linguistic terns, how the controller a ~ b u t e affect s the perfo~anceof the closed system. Once this is done the stochastic desi technique reduces to one of using r e a s o ~ gto infer the suitability of any design, ~e-~zzification of the membership h c t i o n of the suitabili~yields a crisp value for the fitness that issu~sequently usedasthefitnessmeasureinthestochastic A Genetic Algorithm is then used to determine o p t i ~ ~ t i procedure. on the ~ Z ~ ~~ ~a t Z ofi the ~ aparameters of the controller.
The controller attributes are describedby fizzy sets, three to five being; s ~ ~ l c i for ~ nmost t practical purposes. These fizzy sets ~ tdesign, e ~ The speci~cationsnormal the ~ e ~ i ~r et ~~ i of~ the o t ,time (i.e.,thetimefor des industrial co~trollersare o v e ~ ~ ~ o rise the-loopresponse to reachsomespecifiedpercentage of' its fmal value)and settZi~g time(Le., thetime r e q ~ e dforthe close~Rloo~ response to reach some specified percentage of its fiial value). More s~eci~cations can be added as ne cess^, e.g. stea~ymst~te error in which and the ma^^ p e ~ i s s i b l econtrol actions that can be used, case the complexity of the com~utational problem is i~creased propo~ionally. fizzy sets for the Rise Time, Considerforexample,the Large Overshoot and Settling Timeto be Small, Medium while the fwcq sets of the resuitant~i tness to be Ve~-SmalZ,all, ~egative-Medium, ~edium, Positi~e-Mediu~, Large and Very-Lar~e. A sample ofsuita~ili~ rules can therefore be stated as follows:
anz
R': IF (Rise-Time is S m a l ~AND (Overshoot is S m a l ~ ( ~ ~ t t l i n ~ - T iismSmalo e T E N (Fitness is Ye R2: IF (Rise Time is ~edium) ANI) (Overshoot is ~ ~ AND a l (SettliLg-Time i s S m ~ Z ~ T m N ( F i t n e siskrge) s R3:IF (Rise-Time is Mediu~)AND (Overshoot is M e ~ i ~ m ) (Settling-Time i s ~ a r ~ e ) T ~ N ( F i t ~ise s s ive-Medium) : IF (Rise-Time is Large)AND (Overshoot is Mediu~) AND (Settling-Time is Large)T m N (Fitness is S ~ a Z ~ ) IF (Rise-Time is Large)AND (Overshoot is Large) (Sett1ing"ime i s L ~ r g e ) T ~ N ( F i t n eiss~~e ~ - S m a l o
':
Examplesof members~p ~ c t i o n sthatcanbeused in the ~ualit~tive design technique are shownin Figure 17.1. A se~lingtime of the closed system is to remain constant, the fitness with rise time and overshoot is s h o w in Figure 17.2, The complete set of linguistic rules, containing 3j=27 rules, consti~testhe rule-base of the design procedure andis given in the Table that follows, These d e s maybemodified to satisfyanycontrolobjectiveand ~ T and itsL Fuzzy Toolbox ~ can be used to ~ p l e m e n the t desi tec~que.
~
~volutiunaryDesign of Controllers
M ~ b a s Function ~ p Plots I
Input Vanable Rise Time
(a)Rise-Time M ~ b a $ Function ~ p Plots
Input Vanable Ovashoot
(b) Overshoot
Input VmbIe S W n g T h e
(e) Settling-Time
Figure I 7. I Fuzzy sets used in thequalitative design technique
239
240
Chapter 17
(d)
Figure 17.1
~itness
continue^^ Fuzzy sets used in thequali~u~ive ~ e s i techni~ue ~n
Figure I 7.2. The~ t n e ss~rface s
~volut~onary Design of Controllers
24 1
242
Chapter I 7
Rule-~ase for the q~alitativeevaluation of controller~tness using Rise-Time, Overshoot and Settli~g-~ime.
~volutionury~ e s i o ~f nont trollers
243
Example 17.1 Design of an optimum indu~trialtwo4erm controller for t temperature control of a greenhouse The qditative controller design technique is applied to the desi two-term (Pocontroller to control the e n ~ o ~ e inside n t a greenhouse. Following step a demandinthereference t e m p e r ~ ~Tw3 e the t e m p e r a ~ eT at some point in the greenhouse shown in Figure 17.3, has the characteristic dead time followed by anexponentialriseshown in Figure 17.4.
Figure I 7.3 S ~ h e ~ a tofi cthe on trolled greenhouse The proposedtechnique is model-freeandnoattemptismade to obtain a low order a p p r o ~ of~ the t plant in order to tune the closed system. Here it is sufticient to know only the continuous or discrete step resgonse. The design objective is to find the optimum parameters (Xp, Kt) of atwo-termcontrollerthatwillleadtoaclosedsystemstep response with a nominal rise time Trtg=26units, a nominal overshootof p-10% and a nominal settlingof T,=20 units. Instead of definingsome qu~titative criterionwithpenalty ~ c t i o n s ,qualitativemeasures are usedtodescribethedesired a ~ b u t e of s the closed system. Each attribute is therefore assigned a h z y variable, which define the suitability of the overall system.
Chapter I 7
244
The h z y sets of the three attributes that form the inputs to the inference engine are assumed to be triangular while the kzzy sets of thesuitability ~ c t i o nare Gaussian. The hzzy sets are shown in Figure 17.1. In deriving the controlsurface,use is made of the ~~d~ ~ j nco~positional - ~ ~ inference rule. ~ e ~ ~ ~ ~ uses c a t i o n theCenter of Gravity(COG). A simpleGenetic ~ g o r i t which ~ , used to obtain the global optima of follows an elitist s ~ a t eis~fmally , thecontrollerparameters. It is observedthatfitnessdecreaseswith ~ c r e a s i novershoot ~ and increasing rise time.
1.2
10
20
30
40
50
Figure I 7.4N o r ~ a l j zstep e ~ response of the gr~enhouse Thestep re~ponseofthe o p t i m u ~systemdesignedwith the proposed hybrid Evolutionary - Fuzzy (E-F) technique is compared in e dr n i ~ ~ u r n Figure 17.5 with that of the same c o n t r o ~ ~ e r d e s i ~for ITm. It is evident that the response of E-F the design is superior, being better damped, and reachesthe steady state faster than the ITAE design. It is interesting to note that the E-F design has a higher I T m index than that of the IT& design. That the E-F design is superior to the n used in the I T m design is no surprise since a ~ u Z t ~~l rei t e ~ owas former.
Evolutionary Design of Controllers
245
E-F
0.4
0.2
Figure 17.5 Comparison of closed system step responses for the optimum E-F and mi~imumITAE controllers P
Example 17.2 Design of an optimum neural controller for a lathe cutting process A rule-based neural controller for a cutting lathe was described earlier in chapter 16 and a schematic of the lathe cutting process was shown in Figure 16.7. The response of the process to a small step demand in feed ratewasshowninFigure 16.8. Theobjective in this casestudyisa I;,$,, an controller with a rise time of less than some specified value p% of thesteady state valueanda overshootthatdoesnotexceed settling time T,,, less than some specified value. These design objectives canbeachievedby (i) theproperchoiceofthecontrolrules,(ii)the Serence mechanism and (iii) optimization of the gee parameters of the controller. Assume that the first part of the controller design procedure that involves rule elicitation and rule-encoding,has been completed and that a suitable neural network of specified topology has been designed and trained to generate the desired control surface, as in chapter 16, Our concern here isthe second part of the design, Le., the optimization of the gee controller parameters.
246
C ~ u ~ tIe7r
Twenty-seven rules relating the design attributes were ne cess^ to specifjt the desired prope~iesof the closed system completely and are displaye~in Figure 17.3. The fizzy sets of the thee con~ollerdesign a~ibutes consti~te the inputs to the inference engine and are assumed lar while the h z y set for the fitness ~ c t i o is n t ~ e as n ~aussianas shown in Figure 17.1.
Figure I 7.6Step responses o~optimumc o n ~ o ~ ~ e r s for the o p ~ i E-F ~ uand ~ m i ~ i m u mITAE c o ~ ~ o ~ ~ e r s The step response of the optimum controller designed with the ~ ~ a l i t a t i v e ~ v o l u t i-oFnu~z q (E-F) de t e c ~ ~ is u ecompared withthat of the same c o n ~ o l l e r ~ e s i ~ n e d mum I T M in Figwe 17.6. The response of the qualitative de superior, behg better damped and faster in reaching the steady state than the ITAE desi p r e s ~ a b l ybecause a multi-obje~tivecriterion has been used.
hapter 18
liograp~y This ~ i b l i o ~ r must a ~ ~iny no way be viewed as c~mpletebut only i~dicativeof what is available in the literature.
A Computational Lntelligence e
Eberha~R. C., Dobbins R, C. and Simpson P.K. (1996) : Computational I ~ t e l ~ i ~ e PC n c eTools, AP Professional. Kaynak 0 ,(1998) : C~mputationalIntelligence: Soft Comnputing and ~ u ~ ~ y - n e u r o I n t e with ~ a t iApplicati~ns, on Sprin~er-Verla~, Berlin. P a l a ~ s w M., a ~ Attikiouzel Y. and Marks R.(Eds) (1996) : ~ o m p u t a t i ~ n a ~ ~ n t ~-lal idynamic ~ e n c e systems perspective, IEEE Press, F W . Pedrycz V V , (1997) : ComputationalInt~lli~ence - an In~oduction,CRC Press. ~ hand GoebelR. (1998) : Computa~~ona~ Poole D., M a c ~ o A. Intelli~enee,Oxford UniversityPress, Oxford. Reusch B. (Ed), ( 1999) : C o ~ p u t a t i o n ~ l ~ n t e l l iTheory ~ e n c ~and : Appli~ations,Springer-Verlag, Berlin. in ~ystemsand Tzafestas S. G. (Ed.) (1999) ; Computational~ntelli~ence Control: Design and Ap~lications,Kluwer Academic Publications, ~ i n ~ h a Ma, m, 247
ent Systems ~ t s a ~P,i J.,s Passino K. M. and Wang S, J. (1989) : “Towards intelligent autonomous control systems: a r c ~ t e c and ~ e fundamental issues”, Journal of Intelligent and obo otic S y s t e ~VOX. , 1, pp. 3 15-342. B e ~ a r dJ. (1988) : “Use ofde-based systems for process control”, IEEC ~ o n ~ oSystems l ~ a g a z i n eVol. l 8, No, 5 , pp. 3-13. Bigger C. J. and Coupland J. W. ( 1982) : Expert ~ y s t e :~as ~ i ~ Z i o ~ aEpE~Publications, y, London. Chiu S. (1997) : evelo loping C o ~ e r c i aApplications l l M a ~ ~ z i nApril, e, ~ontrol”,IEEE C o n ~ oSystems Francis J. C. and Leitch R. R. (1985) : ~ ‘ ~ t e l ~ ih~oe n t process control”,h o c IEE Conference on C o n ~ o lLondon. , Harris C. J,, Moore C . G, and Brown 1411. (1993) : ~ntelli~ent ~ontrol, Aspects of Fwzy Logic and Neu~alNets, World Scientific, Singapore. Saridis G, N,(1979) : “Towards the realization of intelligent control”, PFOCIEEE, Vol. 67, NO.8, pp. 1115-1 133. aridi is G. N. and ~ a l a v K. ~ P. s (1988) : “ ~ a l ~ i cdesign a l of ent machines”,Automatica, Vol. 24, No. 2, pp. 123-133. ( 1996) : ““Onthe theory ofintelli~entmachines: a ~omprehensiveanalysis”, Int. J o u ~ n aof~Intelligent ~ontroZand ~ystems,Vol. 1, No, 1, pp. 3-14. Tzafestas S, G, (Ed.) (1993) : Expert Systems in~ n g i ~ e e r i n g Applicatio~slSpringer-Verla~,Berlin. o Appli~ations d s of I n t ~ l ~ i ~ e n t Tzafestas S. G . (Ed.) (1997) : ~ ~ t ~and Co~troZ,Kluwer Academic~u~lishers, Hin~ham, Ma. Tzafestas S. G , (Ed.) (1997) :~ n o w l e ~ Based g e ~ystems~ o n ~ o l l World Scientific, Singapore. Valavanis K. and Saridis G.N. ( 1992) : Inte~~igent r o b ~ tsystem i~ t ~ e o~~ e: sand i app~~~ations, ~ luwer Academic Publishers? H i n ~ ~Ma. a~,
~iblio~r~p~y
249
6. Fuzzy Logic and Fuzzy Control Astrom K. J,, Anton J. J. and ArzenK.-E,, (1986) : “Fuzzy Control”, ~ u t o ~ a t i cVol. a , 22, No. 3. Berkan R. C. (1997) : Fuzzy s y s t e ~ design s ~ r i n c ~ Z eEEE s , Press, W . Boverie S., Demaya €3.and Titli A. (199 1): “Fuzzy logiccontrol compared with other automatic control approaches”, Proc. 3 ~ t h CDC Con~erence,Brighton. Chen C-L., Chen P-C. and Chen C-K.(1993) : “Analysis and design of control systems”, Fuzzy Sets andS y s t e ~ sVol. l 57, pp. 125140. He S.-Z., Tan S., Xu F.-L. and Wang P.-Z. (1993): “Fuzzy s e l f - ~ n of g PID Controllers”,Fuzzy Sets a n ~ S y s t e ~Vol. s ) 56, pp. 37-46. J a m s ~ dIvl., i Vadiee N. andRoss T. J. (Eds.) (1994) : Fuzzy Logic and Control, Prentice Hall, N u . J a m s ~ dM., i Titli A,, Zadeh L. A. and BoverieS. (Eds.) : Ap~lication~ ofFuzzy Logic, Prentice Hall, Upper Saddle River,NJ. Kickert W. J. M. and Mamdani E. H. (1978) : “Analysis of fuzzy logic s ) 1, pp. 29-44. controller”, Fuzzy Sets and~ y s t e ~Vol. King P. J, and Mamdani E. H. (1975) : “The application of fuzzy control systems to industrial processes”, Proc. IFAC ~ o r l Congress, d &€IT Press, Boston. King R, E. and Karonis F. C. (1986) : “Rule-based systems in the process industry”, Proc. 25th IEEE CDC, Athens. King R. E. and Karonis F. C. (1988) : “Multi-layer expert control of a large-scale industrial process”, Chapter inFuzzy C o ~ ~ u t i ~ g , Gupta MI. M. and YamakawaT. (Eds.), Elsevier Science Pu~lishers, N Y . King R, E. (1992) : “Expert supervision and controlof a large-scale and Robotic Syste~slVol. 2, No, 3. plant”, J. ~ntelli~ent King IC. E. (1996) : ~‘Syner~istic fuzzy control”, Chapter in Ap~lication~ ofFuzzy Logic, Jamshidi M., Titli A., Zadeh L. A. and Boverie S. (Eds.), Prentice Hall, Upper Saddle River, NJ. Klir C . J. and Yuan B.(1995) : Fuzzy Sets andFz.~zyLogic - ~ h e o r yand A~~Zications, Prentice Hall, N Y . Klir G. J,,St ClairU.and Yuan B. (1997): Fuzzy Set Theory Foundations andApplications, Prentice Hall, N Y . Kosko B. (1994) : Fuzzy ~ h i ~ ~ iHyperion ng,
Kosko B. (1 996): Fuzzy Engineering, Prentice Hall, N Y . Larsen P. M. ( 1980) : dustri rial applications of fuzzy control”, Int. Journal of an-~achine Studies, Vol, 12 (one of t h e ~ r spublit cations on applications of f i z y control). Lee C. C, (1990a) : “Fuzzy logic control systems: fuzzy logiccontroller - Part I”, IEEE ~ransactionson Systems, an and Cyberneti~s, Val. SMC-20, No. 2, pp 404-418. (contains an extensive 3 i ~ l i o ~ raphy onfuzzy c o n ~ o ~ . Lee C. C. (1990b) : “Fuzzy logic control systems: fuzzy logiccontroller - Part II”, IEEE ~ransactionson S y s t e ~ s ,an and ~ ~ b e r n e ~ i c s , Vol. SMC-20, NO. 2, pp. 419-435. Li Y. and Lau C. (1989) : ‘‘~evelop~ent of fuzzy a l g o r i t ~ for s fu systems”, IEEE Control S y s t e ~ ~s a ~ ~Vol.i 9,~No.e 3,,pp. 6577. M a m d a ~E. H. and Gaines€3.R. (Eds) (1981) : Fuzzy ~ e a s o n i and n ~ its ~ p ~ l i c a t i o nAcademic s, Press, N Y . M a ~ d E. a H. ~ (1974) : ‘‘An appli~ationof fuzzy al~orithmsfor the control ofa dynamic plant”, Proc. ZEE, Vol. 12 1,No. 12, Mendel J. M. (1995) : “Fuzzy logic systemsfor ~ngineering:a tutorid”, Proceedings ZEEEJ Vol. 83, No. 3, Mar 1995, pp. 345-377(con~ainsan e x ~ e n ~ list ~ v eof references on Fmzy ~ o ~ i c ) . Negoita C, V, (198 1) : Fuzzy ~ y s t e ~Gordon sJ andBrow. Negoita C . V. (1985) : Expert s ~ s t e and ~ s fuzzy systems, enj jam in Co. ~ ~ i nPublis~ng g s Mylnek D. M. and Patyra M. J. (Eds.) (1996) : Fuzzy logic i ~ p l e ~ e n t a tion and application^ J. Wiley, N Y . Pedrycz W. (1989) : Fuzzy control and fuzzy systems, J, Wiley and Sons,
m.
Ross T. J. (1995) : Fuzzy logic with engine~ringapplications~McGraw Hill, NY. Rutherford D. and Bloore G. (1976) : “The implementation of fuzzy algorithms for control”, Proc. IEEEJ Vole64, No. 4, pp. 572-573. Sugeno M. (1985) ; ~ndustrialplications of Fuzzy C ~ n ~ oElsevier l, - North Holland. Science Pu~l~shers Sugeno M, and Kang G. T. (1986) : “Fuzzy mo~ellingand control of multilayer incinerator”,Fuzzy Sets and Systems, Vol. 18, pp. 329346,
Sugeno M, and Yawagawa T. (1993): ‘(A fuzzy-logic-based approachto qualitative modeling”,IEEE Trans. on Fuzzy Systems, Vol, 1, No. 1, pp. 7..31. Takagi T, and SugenoM. (1985) : “Fuzzy identi~cationof systems and its application to modeling and control”,IEEE Trans onS y s t e ~ s , Man and CyberneticsJ VoleSMC-15, pp. 116-132. Terano T., Asai IC. and SugenoM. (1989) : Appliedfuzzy s y s t e ~ s , Academic Press, N Y . Tzafestas S. G. and Venetsanopoulos A.N. (Eds) (1994) : Fuzzy ~ e a s o ~ i in n gInformation, Decision and Control Systems, Kluwer Academic Publishers, Hingham, Ma. Wang P. P. and Tyan C-Y. (1994): c‘Fuzzy dynamic system and fuzzy linguistic controllerclassi~cation”,A~tomaticaJVol. 30, No. 11, pp. 1 769- 1774. Wang L-X. (1994): Adaptivefuzzy systems and control - de si^ and s t a ~ i l i ~ a n a Prentice ~ s i s , Hall, N Y , Yen J., Langari R. and Zadeh L.A. (Eds.) (1995) : Indus~rial applications of fuzzy logic and intelligent systems, E E E Press, NY. Zadeh L. A. (1965): “Fuzzy Sets”, Information and C o n ~ o lVol. , 8, pp. 3-1 1.(the de~nitivepaper which laid out thefoundations of Fuzzy Logic). Zadeh L. A. (1972) : “A rationale for hzzy control”, Trans. A S ~ E , Jou~nalof Dynamic Systems andControl, Vol. G-94, pp. 3-4. to the analysis of Zadeh L, A. (1973): ““Outline of a new approach complex systems and decision processes”,IEEE Trans. zn Systems, an and Cy~ernetics~ Vol. SMC-3, No. 1, pp. 28-44. Zadeh L. A, (1988) : “Fuzzy logic”, IEEE Computer, Vol. 21, No. 4, pp. 83-93. Z i ~ e H. ~J. (1996) a ~ : Fuzzy set theory and its applications, Kluwer Academic Publishers, Hingham, Ma.
e
Fuzzy Logic and Neural Networks
Chen C, H, (Editor) (1995) : Fuzzy logic and neural networkhandbook, EEE Press, N Y .
252
C ~ a p t e 18 r
l s ~ ~ He, u Fujioka c ~ R. and TanakaH. (1993) : “Neural netvvorks that learn from fuzzy if-thenrules”, IEEE Trans. on Fmzy ~ystems) V O ~1,. NO.2, pp. 85-97. n~ n e ~ o and r ~f m z y ~artalopoulosS. V. (1996) : ~ n d e r s t a n d i neural logic, E E E Press, N Y . Kosko I3. (1992) : Neural N e ~ o and r ~Fuzzy~ y s t e ~asd,y n a ~ i c s~stemsapproach to machine intelligence)Prentice Hall, N ” . Yager R. 131. ( 1992) : “~plementingfuzzy logic controllers using a neural network framework”,Fuzzy Sets andS y s t e ~ sVol. , 148, pp. 53-64.
rtificial Neural Networks Aggamal M. ( 1997) : “A SystematicClassi~cationof Neural-NetworkBased Control”, IEEE C~ntrol ~ystems ~ a g ~ i nApril, e , pp, 7593. (contains some I70 referen~eson neural c o n t ~ o ~ . Dayhoff J. ( 1990) : Neural n e ~ o r arc~itectures, k Van Nostrand ~ e i ~ o lN dY ., Haykin S. (1994) : Neural n e ~ o rEEE ~ , Press, N Y . Hebb I3. (1988) : ““Theorga~zationof behavior’,, in Neurocomputing: found~tionsand research (Eds. Anderson A. and RosenfeldE.), MIT Press, Boston, Mass. Marcos S., Q., Vignat C., Dreyfus G,, Personnaz L. and Roussel-Ra~ot P. (1992): “A ~ ~ ~ a me e ~ odfor r k adient a l g o r i t ~used s for aptation and neural networktraining”, Int. Jou~nalof Circuit Theory and ~ ~ p ~ i c a t i oVol. n s , 20, pp. 159-200. M c C ~ l l o u ~W. h and Pins W, (1943) I “A logical calculus of the ideas ca~ i ~ a n e nint nervous activity”,~ u l ~ e tofi n~ a t h e ~ a t i Biophysics, Vol, 5. Minsky M. and Papert S. (1969) : ~ e r c e p ~ o : nan s introduction to co~putational~ e o ~ e t rM y ,T Press, Boston. Nahas E, P,, Henson M. A, and SeborgI>.E. (1992) : “Nonlinear Corninternal model control strategy for neural network models”, puters in Chemical Engineering, Vol. 16, No. 12, pp. 1039-1057. Narendra IS. S. and M ~ o o p a d h y a yS. (1992) : ‘ ‘ ~ t e l l i ~control e~t neural networks”,IEEE Control ~ y s t e m s ~ a ~ aApr., zine) pp. 11-18.
~ibliog~~phy
253
Patterson D, W, (1996) : A r t ~ c i a l ~ e u~r a le ~ Theory o rthrough ~ ~ a c ~ r o p a g a t i oPrentice n, Hall, N Y . Rosenblatt F, (1958) : “The Perceptron: a probabilistic modelfor i n f o ~ a t i o nstorage ando r ~ a ~ z a t i in o nthe brain”, ~sychological ~ e v i e wVol. , 65. (the de~nitivework on the Perceptron), Widrow B., Winter R. G. and Baster R. A. (1988) : “‘Layered neuralnets for pattern recog~tion”,IEEE Trans. Acoustics, Speech and ~ i ~Processing, a l Vol. 36, No. 7, pp. 1109-1118,
F. Neural and Neuro-Fuzzy Control Comeliusen A,, Terdal P., Knight T. and Spencer J. (1990) : “computation and control with neural networks”, ~ u c l e a Instrur ~ e n t and s ~ e t h o d sin P ~ y s i c s ~ e s e aA293, r c ~ , pp. 507-5 16. Guez A., EilbertJ. E. and Kam M. (1988) : “Neural network architecture for control”,~~~E Control Systems Magazine, April, pp. 22-25. Hunt K. J., Sbarbaro D., Zbikowski R. and Gawthrop P. J. (1992): “Neural networksfor control systems - a survey”, ~ u t o ~ a t i c a , Vol. 28, NO.6, pp. 1083-1 112. Jang J.-S. R., Sun C.-T. and Mimtani E. (1996): ~euro-Fuzzyand Soft C o ~ ~ u Prentice ~ i ~Hall, ~ ,Upper Saddle River, NJ. Kohonen T. (1988) : ~e~organization and associative m e ~ o r y , Springer-Verla~,Berlin. r k fiuzzy logic Lin C. T. and Lee C. S. G. (199 1): “ ~ e u r a l - n e ~ obased control and decision system”,IEE3 Trans. on Com~uters,Vol. C40, NO. 12, pp 1320-1336. l Control Systemswith S~uctureand Lin C. T. (1994) ; ~ e u r aFuzzy ~ a r a ~ e tLearning, er World Scientific, Singapore. Lin C. T. and Lee C. S. G. (1996) : ~ e u r a l ~ u z z y s y s tPrentice e ~ s , Hall, N Y ,
Miller W.T., Sutton R. S. and Werbos P.J. (Eds) (1990) : ~ e ~ r a l ~ e ~ o rControl, ~ ~ oblIT r Press, Boston, Mass. Nauck D, and %use R. (1996) : ‘ ‘ ~ e s i ~ newo-fuzzy ng systems through backpropagation” in FuzzyModeling Paradig~sand ~ r a c t(Ed. i ~ ~Pedrycz K), Kluwer Academic Publishers, H i n ~ hMa, ~, Nie J. and Linkens D. (1995): Fuzzy-~euraZControt, Prentice-Hall I d , , UK,
254
C h a ~18 t ~ ~
Omatu S., Khalid M, and YusofR. (1995) : euro-con~ol and its appljc~t~ons, Sp~nger-Verlag,Berlin. Palm R., D r i a ~ o vD. andhell en do^^ H. (1996) : ~ o d eBased l C o n ~ oSpringer, l~ Berlin. Tsitouras C. S. and King R.E. (1997) : rule-~ased neural contr~lof mechatronic systems”,Proc. Int. Journul of Intelligent me^^^ tronics, Vol. 2, No, 1, pp. 1-11. Von Altrock C.( 1995) ; Fuzzy Logic and ~ e u r o ~ u zapplicatjons zy ”, Prentice Hall, W . Wu Q. H,, Hogg. I3. vir, and Irwin G. W. (1992) : ““A neural network regulator €or bo-generators", IEEE Trans.on ~euraZ~ e ~ o r ~ , Vol. 3, No.1, pp. 95-100.
uter and Advanced Control Astrom K. and Hagglund T. (1995) : PID ~ o n ~ o l l e rTheory, s: Design and Tuning, ~ s t ~ eSociety n t of America, Research Triangle Park, NC. Harmon Ray W. (198 1) : ~ ~ v a n c e d ~ Control, r o c ~ s sMcGraw Hill,W . Olsson C, and Piani G. (1992) ; Computer Systemsfor Auto~ationand C o ~ ~ orenti l , ice-Hall, Heme1 Hempstead, Herts. Popovic D. and BhatkarV. P, (1990) : ~ j s t ~ j ~ ~ t e d CCoo m n ~~ofor ~l t e r Indust~ialA u t o ~ ~ t i oMarcel n, Dekker,N Y . Tzafestas S. C. (Ed) (1993) : Appl~edControl, Marcel Dekker, NY.
~ngelineP, J., Saunders G. M. and Pollack J, €3,(1994) : ‘‘An evolution a l g o r i t ~that constructs recurrent neural n e ~ o r k s ”IEEE , Trans on ~ e u r ~ l Vol, ~ 5e , No. ~ o1,rpp.~ 54-65. , Back T., H ~ eU. land Schwefel H-P. (1997) : ‘‘Evoluti~na~ ~ o ~ p u t a t i o n : C o ~on.e the n t sHistory and CurrentState”, IEEE Trans on Evolutionary ~ o ~ p u t a t i oVol. n , 1, No. 1, pp 3 - 17. ~ c ~ n t a iover n s 220 references on Evolutjonar~and Genetic Algorithms).
~ibli~grap~y
255
Dasgupta D. and Michalewicz is. (Eds) (1997): Evolutionary Algorithms in En~ineering,Springer Verlag, Berlin. Davis I.,. (199 1); andb boo^ of Genetic Algorithms, Van Nostrand,N J I . DeGaris H. (1991) : “ G e W T S - Genetically p r o ~ a ~ neural e d nets”, Proc. IEEE Intl. Joint Con$ on Neural Networks, Singapore. DeJong K. A. (1 985): ““Genetic Algorithms- a 10 year perspective”, Proc. First Intl. Conj on Genetic Algor~thms,Hillsdale, NJ., pp. 169- 99. 1 Fogel D. B. (1994) : ‘‘An Introduction to Simulated Evolutionary Opti~ization”,IEEE Trans. Neural Networks, Vol. 5 , No, 1, pp. 3-15. Fogel D. B. (1 995) : ~volutionaryComputation: Towardsa new p ~ i l o s o p ~of ymachine intelligence, E E E Press, NY. Fogel D. B. (Editor) (1997): and book of Evolutionary Cornputation, IOP Publishing, Oxford. Fogel D.B. (Editor) (1 998) : Evolution~ry Co~putationthe Fossil Record, IEEE Press,M . (Selected readings on the history of Evolutionary Algorithms). Goggos V. and King R. E. (1 996): “Evolutionary Predictive Control”, C o r n ~ ~ t eand r s ~ h e ~ iEngineering, ca~ S u p ~ ~ e ~Beon n tCornputer Aided Process engineer in^, pp. S8 17-822. Goldberg D. E, (1985) : “Genetic algorithms and rule learning in dynamic systems control”,Proc 1’’ Int. Conj on Genetic Algor i t ~ m and s their A~plications,Hills~ale,N.J., pp. 5- 17. Goldberg D,E. (1989) : Genetic A l ~ o r i t h min~Search, ~ptimizationand Machine ~ e u ~ n ~Addison-~esley, ng, Reading, Mass. (seminal b ~ onoGenetic ~ Algorit~ms). ~ r e f ~ e n s tJ.e ~(1e 986): “Opti~izationof control parametersfor Genetic Algorithms”, IEEE Trans. onSystems, Man and Cybernetics, Vol. 16, NO. 1, pp. 122-128. l Artificial Systems, Holland J.H. ( 1975) ; Adaptation in ~ a t u r aand University of Michigan Press, Michigan. Holland J. H. (1990) : “Genetic Algorithms”,Scientific American, July, pp. 44-50. Karr C . L. and Gentry E. J. (1993): “Fuzzy Control of pH using Genetic Algorithms”, IEEE Trans. on Fuzzy Systems, Vol. 1, No, 1, pp. 46-53.
256
Chapter 18
Kim J., Moon Y. and Zeigler E”. (1995) : “Designing Fuzzy Net Controllers using GeneticA l ~ o r i t ~ sIEEE ” , ~ontrol S~stems, pp. 66-72. Lin F. T., Kao C. Y., Hsu C, J. C. (1993): “Applying the genetic approach to Simulated Annealingin Solving some NP-Hard Problems”, IEEE Trans. on S y s t e ~ san and ~ y ~ e r n e t i cVol. s* 23,No. 6 , pp. 1752-1767. Man K. F., Tang T. S., Kwong S . and Halang W. A. (1997) : ~ e n e t i c Algorithmsfor Control and Signal ~ r o c e s s i nSpringer-Verl~g’, ~, Berlin. Maniezzo V. (1 994) : “Genetic evolution of the topology and wei l ~istri~ution of neural networks”,IEEE Trans. on ~ e u r aNetworks, Vol. 5 , No. 1, pp 39-53. Marti L (1992) : “Genetically generated neural networks”,Proc, IEEE Intl. Joint Con$ on ~ e ~ r~a le ~ opp.rN-537-542, ~ , Michale~czZ. (1992) : Genetic Algorith~s+ Data Struct~res== Evolutio~~ r o ~ aSpringer-Verlag, ~ s , Berlin. Michalewicz 2. and Schoenauer M. (1996) : “Evolutiona~ Algorit~s for constrained parameter optimization problems”,Evolutionary ~ o ~ ~ u t a t iVol. o n ,4, No, 1, pp. 1-32. ~ a for ~ the Moed M, C. and Saridis G . N,(1990) : “A ~ o l t machine organization of intelligent machines”’, IEEE Trans. on S ~Vol.~ , 20, NO. 5, pp. 1094-1 102, Mo~enbainH., S c h o ~ i s M. c ~ and BornJ. (~199 1) : “The parallel tic A l g o r i t ~as function opti~izer”,~arallel~ o ~ ~ ~ t i n g , Vol. 17, pp. 619-632, Park D., Kandel A. and Langholz G.(1994) : ‘‘Genetic-based new fuzzy r reasoning models withapplication to fuzzy control”, IEE8 Trans on Systems, an ana‘ ~ y ~ e r n e t i cVol. s , 24, NO.1, pp. 39-47. Spears W. M, DeJong K. A,, Bock T., Eogel D, €3.and DeGaris Ha ( 1993) : ‘‘AnOverview of evolution^ om put at ion'^, Proc. ~ u r o ~ e ~onference an on ~ a c ~ ~earning. n e Srinivas M, and PatnaikL. M. (1 99 1) :”Learning neural network weights a nsearchce using Genetic A l g o r i t ~-si ~ p r o v i ~ g p e r f o l ~by space reduction”, Proc IEEE Int. Joint ConJ on ~ e u r a~l e ~ o r ~ , Sin~apore.
Varsek A,, Urbancic T. and Filipic€3.(1993) : “Genetic A l g o r i t ~ in s Controller Design and Tuning”, IEEE Trans on Systems, Man and Cybernetics, Vol. 23,No. 5 , pp. 1330-1339. Zhang J, (1993) : “Learning diagnostic knowledge through newal in Informatics and networks and genetica l g o ~ t ~ sStudies ”, ~ontrol,Vol. 2, No. 3, pp. 233-252.
and its Toolboxes Bishop R. H, (1997): ~ o d e r Control n Systems A n a ~ s i sand Design using M TLAB andSimulink, Addison Wesley, Reading, Mass. Cavallo A. (1996): sing A44TLAB, Simulink andCo~trolSystem Toolbox :A Practical Approach, Prentice Hall,N Y . Dabney J. and Haman T. L. (1998) : ~ a s t e r i n gSimulink 2 :~ y n a m i c System Simulationfor M T L A ~Prentice , Hall,N Y . Djaferis T, E. (1997) : Auto~aticControl :the power of f ~ e d ~ a using ck MA TLAB, PWSPublishers. Dorf R. C. (1997) ; ~ o d e r nControl ~ y s t e m s A n a ~and s i sDesign ~ i n g M TLAB and Si~ulink,Addison Wesley, Reading, Mass. Gulley Neand Roger JangJ.4. (1995) ; Fuzzy Logic ~ o o l b o x ~ use or with A44 TLAB, M a ~ ~ o r kBoston, s, Mass. Moscinski J. and~ g o n o Z.~ (1995) s ~ : Advanced Control with A44 TLAB and Sim~link,Ellis Horwood, Hertfordshire.
This Page Intentionally Left Blank
se Study: of a Fuzzy Cont ATLAB I
This ~ p p e n d considers i~ a case study for the design of a generic fuzzy controller for the control ofa simple, yet representative process. The dynamic process e ~ b i t no~inear s behavior and response a s ~ e t for ~ , which it is desired to compensate. The objective is to show the reader the ste~by-stepprocedurethatmustbefollowedandtheeasewith which it is possible to examine the performance of the resultant fuzzy controller using MATLAB andits ~ i r nand ~ Fuzzy i ~ Toolboxes. The steps in the design pro~edureare explained in suf~cient detail so that the advantages and disadvantages of fuzzy control over conventional three-tern control can be evaluated. The case study includes a comprehensive study of the effects of the choice of fizzy sets is based on the on the perfo~anceof the closed system. The case study le given in the book by Gulley and Roger Jang (1995) on the use of the MATLAB Fuzzy Toolbox.
ontrolled Process The ~ o ~ t r o lprocess l e ~ comprises a single storage tank shownin Fi A. 1. Fluid inflowis controlled by a flow control valve, while outflow is 259
~ p p e n Ad ~ ~
260
through a fixed opening at the bottom of the tank. Outflow depends on the pressure in the tank and consequently on the level of the fluid in the The control objective is to maint~inthe level of the fluidin the t stora~etank h(t) constant so that the outflow rate remains c o n s t ~ despite p e ~ b a t i o n sin the inflow rate. In order to m a ~ t a i nthe st0 level c o n s t ~ t it , is necessary to b o w the level of the fluid i at all times. This can be achieved by usingan inductive, ca~acitive or ~ l ~ a s sensor, o ~ c for instance. Even a ~ o ~ t ball i n c~o ~ e c t e dto a ~otentiometerwill do if the v ~ i a t ~ o nins the fluid level are r~l~tively small. The c o ~ ~ o l lhas e r the error e@)= h d - h(t) where h d and h(t) are the desired and actual levels of the fluid in the tanls respectively as input and the rate~ (with ~ which ) the valveis opened or closedas output.
ow
Figure A, I The controlted proc~ss
A.2 BasicLinguisticControlRules ~ i t h o u knowing t anything about the controlled process characteristics and using only basic qualitative knowledge, it is possible to control the level of fluidin the storage tank by following the thee intuitive rules:
R': IF the error-in-the-fluid-level is ZEro (i.e., the actual levelis equal to the desired level) THENthe control-valve-rate must beZEro (Le., do nothing), p:IF the error-in-the-fluid-level is LOtv (i.e., the actual levelis less than the desired level) THEN the control-valve-rate must bePositive-large (so that the will fill as quickly as possible), R3:IF the error-in-the-f hid-level is HIgh (Le., the actual level is higher than the desired level) THEN the cont rol-valve-ra t e must be~Egative-large(so that the tank will emptyas fast as possible), Since the controller must send a q~antitativeaction to the control valve, then the following additional i~ormationis required:
* *
the m ~ i m u m ~ermissiblechange t~ (also termed thedeadzone) in the nominal valueof the fluid level and the m ~ i m rate u ~of change of t h e ~ ~ level^ i d (which can be computed fiom the dimensionsof the storage tank and the m a x inflow ~ ~rate or by experimentalmeas~ements).
A Simple Linguistic Controller A very simple q~alitativeor lin~istic con~oller can be i~plemented very easily with just the thee rules given above. Thus for example, let stic variable ~ O R m abe l assigned a tolerable discrepancyfiom the desired levelof f a meters, If the levelis greater than t~ meters below thedesiredlevelthenthevalvemustopenat its highestrate POsitive-Large. By contrast if the level of fluid in the tank exceeds the de-
262
Appen~ixA
sired level by cr then the rate of valve closure must be~ ~ ~ a t ~ v e - ~ ~ r It is noted that this simple principle is used in simple on-off con~ollers relays in b ~ l d i n gthennostats for which not owl edge of the room s or characte~sticsis required! ~ n f o ~ a t e lthis y , simple controller leads to un ciliationsinthelevel of fluid in thetankwith a peaktopeak of 20 ~ e t e r s as , seen in Figures A,2(a) and A.2(6). ~ ~ h e ~ the o step r e response, Le., the fluid levelas a function o f time in res~onseto a sudd i can. increase in change in the desired level, is ~ y ~ ~ eAs~seen, desired fluid level leads atodifferent response thana decrease in the desired level. This is c h ~ a c t e ~ s t oi cf fluid systems since fluid pressure and level are n o ~ i n e ~related. ly There is no way of estimating the fiecy ofoscillation since thereit is a s s ~ e that d thereis no ~ o w l e d ~ e of the d ~ ~ of cthe cs o n ~ o l l eprocess. ~ It is observed, however, that d e incr~asesthe fiereducin~the dead-zone 2a reduces the ~ p l i ~ and quency of the oscillation, This is observed in Figures A.2(a)and A.2(b). Reducin~the dead-zone to zero will, in theory, lead to an infinite fiey of the i ~ e r e n t quency of oscillation.In practice this is ~ i k e l because delays in the relay. In any case this continuous chatte since it shortens relay life.
Figure A.2(a) Step r e s p o ~ oef ~ ~ ~ g u contro~~er i s t i ~ with a=@I
Figure A2@) Step r e s p o ~ eof ~inguisticcontroller with a=O,O25
Thesystemcanbemodeledusing Toolbox simply typing the instruction
~ T L A B / S ~ u l i ~ u ~
sltank at which the flow diagram shown in Figure A.3 appears, In this file we are given theo p p o to~ compare ~ the step responsesof the fizzzy and fuzzy controllers for the same conditions. The fixzzy sets in this simple case have the Booleanform shown e 5.1, As a consequence the output of the controller can only take oneof three possible values,Le., POL, ZER or NEL. The ~ualitative controller is equivalent to a thresholdlogicunitwithdead-zone, as shown in Figure A.4. If the fluid level erroris within the dead-zone then the controller gives no output and the process coasts freely. However, when the absolute error exceeds the dead-zone then the controller gives a command ofsgn(e).
A ~ ~ e n dAi x
264
U
Sienal Ometator
Inflew
scope
ahrnge
Detivativc
Figure A.3 ~ i ~ u ~ i n k ~ o w using dis a 1~tank ra~
U
1 -d
-1
e MATLA
esign Tool
With the simple l i n ~ i s t i ccontroller, the oscillations (ormore precisely, Z i cycles) ~ ~ of~the fluid in the storage tank about its desired value are enerally acceptable except when coarse control is require^ only. The const~ntc h a ~ ofe the ~ controller ~ ~ relay ~evitablyleads t
I
of the control valve, which is in a state of continuous motion. We must find a suitable control strategy that will dampen these oscillations and ultimately eliminate them. It is also desirable to find some technique to compensate for the responsea s ~ e t ~ . We could, of course, follow the road of conventional control, identi~ingthe process dynamics by applying step d i s ~ b a n c e sto it, d e t e ~ ~ an simple g approximant and using the cookbook techni~uesof Ziegler and Nichols, or moreso~histicatedmethods in order to establish the p ~ ~ e t e ofr sthe required three-term controller. This procedure is quite tedious and t i m e - c o n s ~ ~and g it is doubtfbl that all objectives can be satisfied simultaneously. It is certain, however, that a conventional three-tem controller cannot compensate for the observed asymmetric response. If we could change the control strategy by adding some additional stabilizing rules and some advanced inference mechanism so that t ~ of~ abruptly , as in the case of the controlaction changes ~ ~ o oinstead the simple controller,then we could achieve stabilization ands i ~ ~ c a n t improvement in the closed system response. The solution is to turn to conventional control techniques and design a fuzzy controller with one of the a~ailablecomputer aided design packages. This case study is based on MATLAB and its Toolboxes. In the following, we present the procedure that must be followed in the design of a simple genericfuzzy controller. Our objective is a robust hzzy controller which can be described by simple linguistic rules but which will not exhibit the problems that were enco~teredwith the sim~lelinguisticcontrollerdescribedearlier. The next step in the design procedure following encodingof the control rules, is to decide on the n ~ b e of r h q sets for every input and output variableof the controller. We must also speciQ the shape of the co~espondingfiwzy sets, some of the availablechoices being shown in Figure 11S. In this study we experiment with a numberof shapes in an attempt to find acceptable overallperfomance. The FIS Editor in the F ~ - ~ o o l b oshown x in Figure AS. is a simple and effective tool that makes designing fuzzy controllers simple. As was noted in earlier chapters of this book, it is not necessary to speciEy many fuqsets for the inputs to the controllerin order to obtain acceptable accuracy, Most i n d u s ~ aapplications l use 3 to 5 fuq sets. M e r e fine control is essential then many more h q sets ar
266
Appendix A
quired. In the IF. I;, Smidth kiln controller, for instmce, more than a dozen fuzzy sets are used. h the fuzzy controller proposed here, only three f b z q sets LOW, OK and HIgh are used for the input variables for si~plici~.
The oscillations in the fluid level in the storage tank which were observed with the simple qualitative controller resulting &om the use of d adding two more rules which involve only three rules,can be d ~ p e by e level errur ~ e ( t ) / ~This t . is a classical proced~e the ~ e r ~ v u t o~fvthe even in conventional control. However, in order to avoid any problem using derivatives of the set point, we prefer to use the derivative of the m e a s ~ e dfluid level in the tank ~ ~ ( as t )the/ second ~ ~ inputto the ~ practice ~ ( ~ ) the . decontroller in addition to the level error e ( ~ ) = ~ In rivative is replaced by the first b a c ~ a r d difference s of the level ~ h ~ = ~ ~ hk-1.
Figure A. 5. The FIS Editor in the fuzzy design tool
Design ofa Fuzzy ~ o n ~ u l l Using er ~
T
~
267 A
Adding the followingtwo rules can, indeed, stabilize the closed system:
R4:IF error-in-the-fluid-level
is ZEro AND the rate of change-of-level is N~gative-Small THEN the control valve must be closed slowly, i.e., the control-valve-rate must be NEgative-S~all "
hf: E error-in-the -f luid-level is ZEro ANL) the rate-of-change-of- level is Positive-Small THEN the control valve must be opened slowly, Le., the control-valve-rate must be Positive-Small These 5 control rules maybe specified in manyways,themost conve~entof whichis linguistic, as shown in Figure A.6. 1. If (level is OK) then (valve is no-change)
2. If (level is low) then (valve is
open-fast) 3 . If (level is high) then (valve is
close-f ast) 4. If (level is OK) and (rate-of-change-of
level is positive) then (valve is close-slow) 5. If (level is OK) and (rate-of-change-of level is negative) then (valve is open-slow)
Figure A.6. The control rules in l i n ~ u i sform ~i~
A.
n the Universe of Discourse of the Fuzzy Sets
The universeof discourse of every input to the controller depends on the p e ~ s s i b l erange of that variable. Errors are confined to e€ [-0, 0] and the change of errors to dh(t)/dtlmax€[-p, p]. The two p~ametersCT and p
~
268
thus uni~uelyspecifL the universes of discourse of the two Controller inputs. The output of the controller is the rate with which theflow convariables~i.e., trolvalve is openedorclosed . Herewespecify 5 N ~ ~ - ~ ~ r ~ e , N Zfiro, ~ ~ aP Q t is ivt i~v e- -~~ ~and ua~~~~ l~ , s i ~ i v e ~ ~ for finer control. The universe of discoursethis in Case is n o ~ a l i z to e~ [-l,l]where +l indicatesthatthevalve is entirelyopen(Le., l 0 0 ~ open) and -1 that it is closed (Le., 0% open). The median 0.5 implies that the valveis atthe center ofits range.
n the Choice of Fuzzy Sets The h z z y sets of the controller inputs and outputs can be given any of the most c o ~ o shapes n offered in the Fuzzy Toolbox, such as trian~ular, trapezoidal, Gaussian, etc. (see Figure 5.12). Various combinations are tried and the resultant control surface and co~espondi behavior of the closed system are com~~ed. The control surface is a graphical inte~retationof the control actions in input space, Le., how the outputs of the controller vary as ~ c t i o n sof the controller inputs. For a given set of control rules the control surface dependson the shape of theh z z y sets of both the inputs and the outputs of the controller but this does not greatly affect the dynamic perfo~anceof the closed system. The control surface ofa generic controller withtwo inputs gives us an ~ e d i a t eindication of the m a ~ ~ of d the e control action in control space but clearly when the controller has more thantwo inputs, the control surface becomes a manifold which is possible to visualize. Should the perfo~anceof the closed system prove ~ s a t i s f a c t o the ~, control surface can be examined to see how the d e s must be m o ~ i ~ e d or whatnew rules must be addedto bring about the desired behavior. h the design example, the control surfaces were computed using an i n f ~ r ~ n cengine e based on M a ~ d a ~ i ’c so ~ ~ o s ~ ~i ~i of e~r ae ~2 rule ce while COG (Center Of Gravity) was used to d e - h i @ the fuzzy set of the controller output. The Fuzzy Toolbox provides altern both the inference engine and de-hzzi~cation.. The follow in^ five cases were considered in the design study:
1. Case A Figure A.7: Inputs with3 triangular fuzzy sets and outputs with5 symmetric triangularfuzzy sets with large ~ )no overlap. support ( 5 ~ and 2. Case 13 - Figure A.8: Inputs with3 triangular fuzzy sets and a
c hzzy sets with small outputs with5 s ~ e t r i triangular support and no overlap. 3 . Case C Figure A.9: Inputs with 3 Gaussian fuzzy sets and outputs with5 s ~ e t r i triangular c fuzzy sets with small support and no overlap. 4, Case 1)- Figure A.lO: Inputs with 3 Gaussian fizzy sets and outputs with5 a s v e t r i c angular fizzy sets with small support and no overlap. 5. Case E - Figure A. 1 1: Inputs with 3 Gaussian fuzzy sets and outputs with5 asymmetric triangularfizzy sets with small support and some overlap.
-
It is noted that triangular fuzzy sets with small suppo~,Le., a, p 4 approx~ates~n~Ze~ons (see chapter 5 ) that have been used in industrial fkzzy controllers. The advantage of using singletons is the simplicity and speed of the computations ford e - ~ f i c a t i o n A . number of vendors use singletons in their products, e.g., s5-~rofuzzy, S7Fuzzy-Control by Siemens and FuzzyTech by Allen Bradley. For every one of the five cases we present the control surface and the co~espondingstep response. Figure A. 12 shows the computer ~ are c fired ~ for a screen from the Fuzzy Toolbox which showsw ~ rules given controller input values and the corresponding controller output for the CaseE.
o m p e ~ s a t i oof~ Response Asym A s y ~ ine the~ step response of a closed system is not an common pheno~enonin practice due to the inherent n o ~ i n e a ~ t i eins the controlled plants. In these cases, the step response for a positive demand ficantly from the response for a negative demand.A typical example is in the control of pressure, which is related by the square root o f the observed height,as shown in the example analyzedin this Appendix. A conventional i n d u s ~ a three-term l controller cannot easily com-
270
pensate for this a s ~ e h ~con~ast, . a s ~ cane be c~ for relatively easily in soft controllers (both fuzzy and in8 the control surface approp~ately.This can be achieved easily by displac~gone or more of thehzzy sets laterally on theverse of dis.1O(c) forinstance,the et ~ ~ ~ i t i has v e - ~ ~ left withtheconsequenthecontrolactionfor small positive errors in the liquid level is greater than that for small ne~ativeerrors. Thus €or small discrepanciesin the liquid level about the nominal level, the rate with which the valve is changed is increased when the tank is f i l l ~ gand decreased when it empties. This leads to ensation of response a s ~ e ~ .
It should have become clear that altering the shape of the the con~ollerdoes not leadto major ch 7(c)to A.1 l(c). In cases s M ( c ) and A.8(c) are of the firzzy sets of b p responses are shown and A. 1l(b) are ~ s a t i s f a c t obecause ~ their steady~stateerror is none try is severe. It is noted,also,that in these zeroandresponsea two cases,boththe ar fuzzy sets with alarge s u p ~ set o ~andthe s~gletonshave step c responses. In contrast, in cases C , D and E the control surfaces are smooth because of the smooth ~~aussian) shapeofthe sets ofthecontrollerinputs.Thecorrespo responses are seen to be superior. In cases D and E (see Fi and B. 1l(e)) the step responses are almost s ~ e ~Finally, c . three cases the steadyastate errors are essen~allyzero and ov igible. Case E appears to be the best as it demonstrates onse, zero steadyastate error and no overshoot. seen in all five cases, the closed system step res~onseis ficantly by the shape of thefuzzy sets of the inputs and to a lesser extent by the fuzzy sets of the con~oller ou~ut. In ~eneral, sm sets have s m o o ~ e control r s ~ f a c ~~~1~~~ s, and improved responses. The best sets are not generallyknown and are the subject of
Design of a Fuzzy Con~ollerUsing MATLAB CASE A
Figure A. 7Ca) Input fuzzy sets
u tsets Figure A, 7(b)~ u ~fuzzy
Fi~ureA.7(c) Control s u ~ a c e
27 1
272
Appendix A CASE I3
Figure A.8(a) Input fuzzy sets
u tsets Figure A.8(b) ~ u ~fuzzy
Figure A,8(c)Control surface
Design of a Fuzzy nal troller Using ~ CASE C
Figure A. 9(a) Input fuzzy sets
Figure A. 9(b) O u ~ ufuzzy t sets
Figure A.9(c)Control surface
T
~
273 A
~
Figure A. I O(a)~ n ~ u t ~ usets zzy
Figure A. I O(c) Control's u ~ a c ~
CASE E
276
Appendix A
Figure A. 12(a) Step r e s p o ~for e Case A
Figure A. 12(b) Step ~ e s p ofor ~ eCase B
Design of a Fuzzy Con~ollerUsing LA^
Figure A.12(c)Step responsefor Case C
Figure A. 12(4 Step responsefor Case D
277
Figure A. 12(e) Step r e s p o ~ e ~Cuse or E
\
Appendix €3
ple Genetic Algor The m-files given in the Appendicesthatfollow can be~ o w n l o a d e d ~ othe m author’s web site ~.lar.ee.u~atras.rrr/lar/re~a.~tm
Main-Program - ga.m popsize=lo; % Population Size maxgen-50; % Number of Generations (iterations) length=l2; % Length of genotype (Le. number of bits in the binary array) pcross=0.8; Probability of Crossover pm=0,01; % Probability of Mutation ; bits= [length length] vlb= [-I -13; Vub= [I 11 ; phen=init(vlb,~b,popsi~e,2); % Initialization of the population of phenotypes [gen, lchrom, coarse, nround] = encode(phen, vlb, vub, bits);% Conversion of phenotypes to binary string [fitness, object] =score (phen,popsize ; % Evaluation of Fitness & Objective Function x=-l:O.l:l; % Display of the contourgraph of the objective function y=-l:O.l:l; [x1,ylf =meshgrid (x, y) ;
figure (1); contour (x,y,z ) ; [best-obj(l), index] = min(object); % Store th candidate of the initial population best-gen=gen ( index,: ) ; best~hen=phen (index, : ) ; [worst-obj (11, indexl] = max(object); worst candidate of the initial population worst-cur-gen=gen (indexl) ; worst-cur-phen=phen (indexl) ; avg-obj I l ) = O ; % Calculate the average performance of the population for k=l:popsize (1)=avg-obj (1)+object (k) ; avg- obj end ; avg-obj (1)=avg-obj (1)/popsize; best-x(l) =bestshen(J) ; best-y (1 =bestuphen( 2 ) ; for i1=1: 2 fprintf (1,'%f ,best-phen(1)); end ; fprintf ( \ n t ) ; fprintf (1,'BEST : \nt,best-obj (1), for i=l:maxgen % St ne~~en=reprodu ; % Mate two members of the gen=mate (gen) population Crossover Operation gen=xover (gen, pcross) ; Mutation Operation gen=mutate (gen, ; pm) ; [phen, coal = decode(gen, vlb, vub, bits) Decode the genotype of the new populatio to phenotype ; [fitness, abject] =score(phen,popsize) Evaluation of the Fitness& Objective Functions [best-cur-obj , index] = min(object); % Store the best candidate of the current population : ; bes t-cur-gen=gen (index, best-curphen=phen ( index, : 1 ;
[worst-obj (i+l) , index11 = max(object); % Store the worst candidate of the current population worst-cur-gen=gen(indexl); worst-cur-phen=phen (indexl) ; avg-obj(i+l)=O; %i Average performanceof the current population for k=l:popsize avg-obj (i+l) =avg-obj (i+l) ; +object (k) end ; avg-obj (it-1) =avg-obj (i+l) /popsize;
if(best-cur-obj best-obj(i)) % Apply Elitist Strategy phen (indexl , : ) = bestBhen; gen (indexl , : ) = best-gen; = best-obj (i) ; object (indexl) best-obj (i+l) = best-obj (i) ; elseif (best-cur-obj e = best-obj (i) ) bestxhen = best-cur-phen; best-gen = best-cur-gen; best-obj(i+l) = best-cur-obj; end i best-x (i+l) =best-phen (1); % Display evolution of the best solution on the contour graph best-y(i+l) =best-phen(2) ; hold; ; line (best-x, best-y) for i1=1:2 fprintf(1, '%E ',best-phen(il)); end ; fprintf (1,I - - - > %f\n',best-obj (i+l)) ; fprintf ( \n I ) ; fprintf(1,'BEST : %f WORST : %f AVG : %f \n*,best -obj (i+l>,worst-obj (i+l) ,avg-obj; (i+l)) end xx=l:maxgen+l; % Display evolution of objective functions for the worst, average and best solutions figure( 2 ) ; plot(xx,best-obj,xx,worst_obj,xx,avg-obj); grid;
File init.m- This function creates a random population function phen=init(vlb,vub, siz, sea) for i=l:siz phen(i, :)=(vub-vlb) .*rand(l, + sea) vlb; end
%
File sc0re.m- This function computes the fitness and the objective function values of a population function [fitness, object] =score (phen, popsize) for i=l:popsize object(i)=~hen(i,1)*2+~hen(i,2)*2-
%
0.3*cos(3*pi*phen(i,l))0.4*cos(~*pi*phen(i/2))+0.7;
fitnesa
(i)
=1/
(object el) ;
(i)
end
The
following m-files called by the main program can be downloaded directly from and~ Tsite ~ W web O R ~ ~ bear the indication: % Copyright (c) 1993 by the ~ a t h ~ o ~ Inc. ~s, % Andrew Potvin 1-10-93,
the
enc0de.m - This function converts a variable from real to binary = function [gen,lchrom/coarse,n~oundl encode (x,vlb,vub,bits) lchrom = sum(bits); coarse = (wb-vlb). / ( ( 2 . *bits)-1); [x-row, x-col] = size ( x ) ; gen = E 3 ; if -isempty(x) , 1)*vlb) . / . temp = (x-ones (x-row, (ones (x-row, 1)*coarse); b1O = round(temp); nround E find(blO-temp>le-4); ; gen = blot02 (b10,bits) end
% File
/
Simple Genetic A l ~ ~ r i t ~ m
283
repr0duc.m- This function selects individuals in accordance to their fitness function [new-gen, selected] = reproduc (old-gen, fitness) norm-fit = fitness/sum(fitness); ) ; selected = rand (size (fitness) sum-fit = 0; for i-1 :length(fitness), sum-fit sum-fit + norm-fit (i) ; index = find(selected<sum-fit); selected(index) = i*ones (size (index) ) ; end :) ; new-gen = old-gen (selected, % File
E
File mate.m- This function mates two members of the population function [new-gen,mating]= mate (old-gen) Ejunk,matingl = sort(rand(size(old-gen,x),I)); new-gen = old-gen (mating, :) ; %
File x0ver.m- This function performs the Crossover operation function [new-gen, sites] = xover (old-gen, PC) 2) ; lchrom = size (old-gen, sites = ceil (rand(size (old-gen, 1)/2,1)* (lchrom-1) ) ; sites = sites.* (rand (size (sites) ) cpc); for i = l:length(sites); new-gen( [2*i-1 2*i] , :) = old-gen(E2*i-12*iJ,1:sites(i)) . . .
old-gen( end
[2*i
2*i-1]
,sites(i)+l:lchrom)];
File mutate'm- This function performs the Mutation operation function [new-gent mutatedl = mutate (old-gen, Pm) )
284
App~ndixB
File dec0de.m- This function coverts a variable from binary to real function [x, coarse] = decode (gen,vlb,vub, bits) bit-count = 0; twosow = 2."(O:max(bits))I ; for i=1:length (bits) , pow-mat( (l:bits(i))+bit-countti) = two-pow (bits : -1(i) : 1) ; bit-count = bit-count + bits(i) ; end 1) ; gen-row = size (gen, coarse = (vub-vlb). / ( (2. "bits) -1); inc = ones (gen-row, 1)*coarse; 1)*vlb + (gen*pow-mat). *inc; x = ones (gen-row, %
File blOtob2- This function converts a variable from base10 to base2 function b2= b10t02(blO,bits) bit-count = 0; b2-index = [I ; bits-index = l:length(bits); for i=bits-index, bit-count = bit-count + bits(i) ; b2-index = [b2-index bit-count]; end for i=l:max(bits) , r = rem(bl0,2); b2 ( : ,b2-index) = r; b1O = fix(blO/2); tbe = find( all.(blO==O) 1 (bitsfbits-index)==i) ; if -isempty (tbe) , blO(:,tbe) = [ I ; b2-index(tbe) = [I ; bits-index(tbe) = [ I ; end , if isempty (bits-index) return end b2-index = b2-index-1; end
nnealing
Main-Program sa.m Tinit=120; % Initial Simulated Temperature 1=0.98; % Temperature Decrement Parameter Tfinal=0.00001; % Final Temperature Comp~tationand Display of objective Function Contour x=-l:O*l:l; y=-l:O.l:l; [xl,y11 =meshgrid (x,y ) ; z~=x~.A2+y1.A2-~.3*cos(3*pi*x~)”.4*cos(4*pi*y~)~~.~; figure(1); contour ( x , y , zl) ; Tcur=Tinit; % Initialize Simulated Temperature + 2*rand; % Select First Solution (xl, x21 x2=-1+2*rand; 2 (1)=x1^2+x2^2-0~3*.c0s (3.*pi*xl) 0.4*cos(4*pi*x2)+0.7;
xl=-1
285
286
Appendix C
while TcunTfinal % Start of Simulated Annealing Loop x-l=-l + 2*rand; % Select New Solution(x-1, x-2) x-2=-1 + 2*rand; % Evaluate New Objective Function Value z-1=x-1*2+x-2*2 - o.~*cos(~.*~~*x-I)0.4*cos(4*pi*x-2)+0.7; g=exp(-( (2-1-z (i)) /Tcur)) ; % Acceptance Probability if ((2-1 c z(i)) 1 (rand 9 ) ) xl=x-l; ; x2 =x-2 z (i+l)=z-1; else z(i.4) = z(i); end Tcur=Tcur*l; New Simulated Temperature rl (i+l)=XI; r2 (i+l); =x2 title('Search for the xlabel ( 'x axis ) ; ylabel ( ' y axis'); i=i+l; End of Loop
global
optimum
point');
f=find(z==min(z)); fprintf(1,'The~inimumvalue has of the Obj. func. been observed so far is : %f in the d iteration\n', min(z) , f ( U 1 ; fprintf (1,'x=%f ,y=%f\nI (1)) ,rl,r2(f (f(1))); hold; line (rl,r2) ; ti~le('~o~ement of x-y parameters
in
the
search
xlabel( 'x parameter' ; ylabel('y parameter'); figure (2) ; plot ( 2 ); title('0bective Function values versus Iterations');
Si~ulatedAnnealing A l g ~ r i t h ~ xlabel ( Iterations ; ylabel ( 'Objective Function' )
;
figure(3); plot (rl); title('Novement of the x parameter'); ylabel ( ' x parameter I ) ; xlabel ( I Iterations ; figure (4); plot (r2); title('Movement of the ylabel( ' y parameter1 ; xlabel ( Iterations ' ;
y
parameter') ;
287
This Page Intentionally Left Blank
Appendix I>
e t ~ o r kTraining A1 % Main-Program net.m
P=[O.8 0.8; 0.8 0; 0.8 -0.8; 0.3
0.3; 0.3 -0.3; 0 0.8; 0 0; 0 -0.8; -0.3 0.3; -0.3 -0.3; - 0 . 8 0.8; -0.8 0 ; -0.8 -0.81; T=[1 0.55 0 0.35 0 0.55 0 -0.55 0 - 0 . 3 5 0 -0.55 -11 ; [R,Q] = size (P) ; Sl =2; [S2,Q] = size (T) ; [WlO,E3101 = rands (Sl,R ) ; Randomize network
parameters W20 = rands(S2,S1)*0.5; E320 = rands(S2,1)*0.5; disp-freq = 20; max-epoch = 9999; epoch limit err-goal = 0.01; error measure limit lr = 0.01; learning rate lr-inc = 1.05; learning increment lr-dec = 0 . 7 ; learning decrement err-ratio = 1.04; error ratio mom-const=0.95; TP = [disp-freq max-epoch err-goal lr lr-inc lr-dec mom-const err-ratio); [WlO,BlO,W2O,B2O,epochs,TR]=trainbpx(WlO,~lO,
tpurelin',W20,B20, 'purelin',P,T,TP) ; training algorithm with linear neurons in 289
290
Appendix D both layers plottr(TR); plot results W10 ; print synaptic weights of first layer W2O ; print synaptic weights of second layer B10 ; print bias of first layer B20 ; print bias of second layer
nde
Adaptive linear networks (LU~ALMS), 156,162,170 Artificial intelligence,13 ~ i ~ c ineural a l networks, 1 , 5 1, 153 autoassociative, 1 59 feedback, 159 feed-fo~~ networks, d 159 generalized h c t i o n mapping, 154 ~ o p f i e l d r e c ~networks, ent 158 multiul~yernetwork topologies, 158 Artificial neurons,153, 156 dynamic, 158 static, 156 Cartesian product,72 Classical control,2 Compositional rulesof iderence, 81 Computational ~telligence,6,9, 13,23,31,41, 153
Computer integrated~ ~ u f a c ~ i n g (CIM), 23,36 Control: protocols, 1 19 rules, 1 19 Conventional control,39 Deep ~ o ~ l e d g18,32 e, D e - ~ i ~ c a t i o98 n, center of area (COA), 98 center of gravity (COG), 98 Elemental ~ i ~ cn ei ~~o nl156 , Embedded fizzy controllers, 123 Evolutiona~: algorithms, 20 computation, 203 control, 8 controller suitability,237 decoding, 2 12 design of ~o~ventional controllers, 235 design of intelligent controllers, 221 29 1
Index
292 n evolution^] operations, 205 crossover, 206,214 mutation, 206,2 14 recomb~ation(see crossover) sele~tion, 206,2 15 simulated evolution,205 o p t ~ z a t ~ o205,208 n, p r o g r ~ i n g 2, 1 1 strategies, 2 1 1 Expert systems, 13,49 classi~cation,32 development, 18 d i a ~ o s i of s m a l ~ c t i o n s28 , elements, 15 energy m~agement,26 fault d i a ~ o s i s20,24 , fault prediction, 24 implementation, 19 industrial controller design, 24 LISP mac~nes,19 need, 17 operator training, 22 p ~ a d i ~20s , plant sim~ation,22 prediction of emergency plant conditions, 26 predictive m a ~ t e n ~ c25 e, product design, 21 production scheduling, 27
~ o w l e d ~20 e, shells, 18,20 superviso~control systems, 23 tools and methods,18 Flexible m ~ u f a ~systems ~ i n ~ (FMS), 21,28 F ~ z i ~ c a t i o91,96 n,
degree of ~ ~ l l m e n t , ~ a p ~ ~ct ea~ r~e t a t i oof,n 93 Fuzzy: a l g o r i t ~59 , associative memo^ (FLLM), 103,115 conditional statements, 58 control, 54,89 a l g o r i ~ 89 , controllers, 105 coarse-fine, 1 17 decomposition, 90 embedded, 123 gain~scheduled,40, 136 generalized t~eeuterm,10 generic ~ o - t e1~ 13, hybrid a r c ~ t e c ~ e1s 12 , integrity, 101 opt~ization using genetic algorithms, 22 1 p ~ i t i o n e d~ c ~ t ~109 c ~ e , real-time, 1 19 robus~ess,107 T a ~ ~ i - S ~ g e1n36,144 o, three-term, 107 fitness criteria, 236 ~ain-schedul~g, 1 36,146 implications, 78 ~ ~ o l ~78a n , GMP, 80 Larsen, 80 ~ ~ k ~ i 78 e ~ i ~ z , ~ a m d a n i79 , Zade~,79 inference engine, 71 degree of fit, 71 l i n ~ i s t i c v ~ a b l64 es, logic, 1,7, 8 a l ~ o r i59,74 ~, basic concepts,54 logic control (FLC)(see a h Fuzzy con~ollers),2
Index operators, 60 conjunctive, 72 propositional plication, 7 1 reasoning, 71,76 relational matrix, 73 sets, 55, 100 algebraic properties of,64 choice of, 268 coarseness of, 100 completeness of, 10 1 linguistic descriptorsof, 57 membership h c t i o n of, 55 operations on,63 complement, 63,64 connectives, 69 ~eMorgan'stheorem, 64 intersection, 63,64 product, 63 union, 63,64 shape of, 100 s u p ~ set o ~of, 56 singletons, 67,92 systems, 32 variable, 57 universe of discourse of,55 ~ a ~ - s c h e d u l econtrollers, d 40 ~ener~lized: Modus Ponens(GMP), 77 Modus Tollens (CMT), 77 Genetic a l g o r i ~(GAS), s 8,205, 21 1 fitness hctions, 203,206, 213 i~tialization,2 21 parameters, 2 1 7 Hard control, 42 HWan: intelligence, 6 operators, 59
293 Industrial: control, 23 controller optimization, 232 Inference engine, 6, 15, 17 effectiveness, 37 q u a l i ~37 , Intelligent: agents, 124 control, 6, 11,31,41,43 autonomy, 45 basic elements, 34 conditions for use, 33 objectives, 34 t e c ~ q u e s39 , controllers, 7,35 correctness, 10 extendibility?10 precision, 10 reusability, 10 robustness, 10,40 systems, 10 acceptance, 37 architecture, 46 design tools and methods, 18 distributed architecture,47 efficiency, 3 7 hierarchical structure, 46 ~owled~e: base, 76 based systems, 13,48 embedded, 193 empirical, 33 engineering, 3 7 and experience, 3 1 heuristic, 135 Learning machines, 154 Linguistic: controller, 26 1 descriptors, 57
294 ~Lin~stic] rule matrix, 186 rules, 8, 14,16,20,32,59 values, 57 variables, 57 M ~ d 1,79,84,111 ~ , ~ e m b e r s ~ p h c t i55 on, generic S, 66 generic Il,67 ~odel-basedk z z y control (see also Tag&-Sugeno controllers), 135, 136 mode^ control, 3 Multi-level relay controller, 1 1 1 Neural: control, 51,153,160 learning and adaptation,161 parallel processing, 161 de-based, 18 1 con~ollers,160 ~ c ~ t e c ~162 es, indirect learning, 166 inverse model, 164 specialized training, 165 design using genetic a l g o ~ ~222 s, fidelity, 163 indirect ~ a ~ of,n 166 g inverse modelof, 164 multi-v~able,161 properties of, 161 rule-based, 181 network traininga l g o r i ~ s , 169 back-propagation (BP), 169, 176 flow chart, 180 Delta, 173 least mean squares (LMS), 171
Index
multi-layer, 175 supervised learning,169 ~ u p e ~ i s learning, ed 169 ~ i ~ o ~ - 170 H o ~ , Neuro-hzzy control, 8,5 1,193 a r c ~ t e c ~ e194 s, isomo~~sm 195 , ~ i f i c a t i o nof neural controllers, 195 neurali~tionof k z y controllers, 195 Numerical Fuzzy Associative Perceptron, 154 Procedural knowledge, 16 Real-time: expert systems,26 execution scheduler,124 fuzzy control, 119 Relational a l ~ o7 ~ ~ , Represen~tionof ~ o ~ l e d g20 e, Response a s ~ e ~ compensation, 269 Rule: co~position,82 conflict, 102 encoding, 182 ~anularity,116 Rule-based: neural control,181 network training, 183 Saridis' principle,10,46 Shallow owle edge, 18,24,32 Simulated annealing,8,225 ~ e ~ ~ o p ao lli gs o ~226 ~ , opti~ization: constrained, 229 industrial controller, 232
Soft: computing, 7,41,42, 154,203 control, 42 S u p e ~ i sk oz ~y controllers, 120 de-Wfier, 120 fuzzifier, 120 iderence engine, 120 owle edge-base, 120 ~eal-timedata base, 120 Symbolic representation, 9 (see T a g ~ ~ - S u ~ controllers eno also Model-based controllers), 136, 144 first approach, 136 fuzzy control law, 141
fizzy process models, 139 k z y variables andk z y
spaces, 137 locally linearized process model, 142 second approach, 144 stabili~ ~onditi~ns, 144 U n c e ~ a i and n ~ vagueness,7,53 Unconventional control?6,40 Universe of discourse, 55 Waste-water ~ e a t m econtrol, ~t 126 Widrow-Hoff t r a i ~ n ~ al~o~t~, 170,172,173 Zadeh, 1,50,53,119